About Matt Williams

Matt is Computer Officer at the University of Birmingham in the UK, providing support and management of computing resources for Particle Physics research. For Volumes of Fun he manages the website as well as looking after the build system, Linux porting and continuous integration for PolyVox. Follow him on Google+.

Our first game jam: Ludum Dare 33

Last weekend David and I took part in our first ‘game jam’ event. As part of Ludum Dare 33 we had 72 hours in which to make a game from scratch (or as close to that as possible) following a prescribed theme. You can find our live-updates that David was posting throughout the weekend on our Ludum Dare page (start from the bottom) but I’ll give a summary here.

If you would like to play the game it’s available from our Ludum Dare page or directly from our website. You can also download the project source.

Continue reading

Share

Development preview of Cubiquity for UE4

Just a quick notice for those who have been waiting on news of the Unreal Engine 4 integration of Cubiquity. Today I have released a pre-alpha development preview of the plugin.

Development is happening on GitHub under our new GitHub organisation. If you want to keep up-to-date with the latest developments, that’s the place to be. For information about how to test out the plugin, see the post on the Unreal Engine forums.

Do note that this is still a very early release which while functional is quite rough around the edges. Expect bugs and missing features but do let me know on the Unreal Engine forum post if you give it a try or of there are features want.

Share

Update on Cubiquity for Unreal Engine 4

It’s been a little while since my last update on the progress of integrating Cubiquity with Unreal Engine 4 but plenty has been going on behind the scenes. Since the last video I’ve improved performance, added support for Coloured Cubes terrain, added LOD support, tested large map support and made sure that all of the functionality of Cubiquity is being exposed. A lot of time has just gone into making the code-base more future proof and reducing duplication between the different terrain modes.

Check out the video below to see the new features in motion as well as me just blowing stuff up at the 9:42 mark.

This more or less marks the features I wanted present for the first pre-release, so between now and then I will mostly be working on tidying things up and hopefully adding some initial documentation. I don’t have any ETA on the first release since this is fitting around my full-time job but any information will be posted here and on twitter.

The best place to follow development is the WIP thread on the Unreal Engine Forums.

Share

First look at Cubiquity for Unreal Engine 4

As you might have seen if you’re following us on Twitter, I’ve been working hard recently to get Cubiquity working with Unreal Engine 4. Both David and I have long been fans of the Unreal games and the engine and so I’m having great fun diving into the code. I haven’t spend a lot of time on it yet but earlier this week I had the time to push the integration to a point where I can start showing off some features. Take a look at the video below for an overview of the current state.

The aim is to have at least feature equivalence between the UE4 version and the Unity3D version. So far I have only the smooth voxel terrain working and haven’t started on the coloured cubes version yet. There is live editing in the editor preview mode but not yet integrated as an editor tool such as users might be used to after working with UE4’s heightmap terrain features but this is something I will try to get in before the first official release. For the first beta release I want to spend some time neatening up the interface to the engine to make what’s currently available as usable as possible.

I’ll be posting an update here on the blog when there’s code out for people to test but in the meantime follow us on Twitter @VolumesOfFun (or me personally @milliams) or track our updates on the Unreal Engine Forums.

Share

Cubiquity now works on Linux

Well it’s taken me a few weeks of on and off work but I’ve got Cubiquity working on Linux as a Unity3D add-on. You can try it right now from the Git repository and as long as everything works correctly, it will be available in the next official release.

Cubiquity for Unity3D running on Linux

Cubiquity for Unity3D running on Linux

Porting

There are two essential parts to Cubiquity: the core Cubiquity code where all the magic happens and a thin wrapper providing a C interface to allow easy interaction with Unity’s C♯ code. Cubiquity builds heavily upon PolyVox which has been working on Linux for years now so at least we had a good base to work from. Like PolyVox, Cubiquity is written in C++ which makes it easily portable meaning I had to only make a few trivial changes to the code to get it to build. After a few tweaks to the CMake files, we had a libCubiquityC.so file built and ready.

In order to ease installation and avoid library mismatches, we decided that statically linking all that we could was the best option. Luckily, Cubiquity has few 3rd-party dependencies — in fact it only depends on the C++ standard library and two small Boost libraries. Boost was only being used to fill in features which are now part of C++11 and so by increasing our compiler requirement we could remove the Boost usage entirely. Once here it was simple enough to statically link in libstdc++ and avoid and difficult dynamic library requirements.

For testing purposes, David sent me a simple Unity application which had been exported for Linux and used Cubiquity to create a simple terrain. The idea was that I should be able to place the libCubiquityC.so alongside the executable and the Mono runtime would find the library and load the appropriate stuff from inside it. With a bit of tweaking of the C♯ loading script and recompiling the library as 32-bit (because the Unity app I was using was 32-bit) I was able to run the Unity application and have it render a terrain.

As you can see in that last link, the terrain was not rendering properly and so David set to work getting the shaders working correctly and fighting with some tricky Unity bugs and now it all seems to be working well.

What’s next

Getting Cubiquity working on Linux, as well as being an end in itself, is a useful step towards getting it running on OS X. We are compiling it with both GCC and Clang (which is the OS X compiler) to make sure the code stays portable. In the medium-term we’re working towards being able to easily build the library for all our supported platforms from one place and so I’ve been investigating cross-compiling from Linux to both Windows and OS X. I will give a more detailed description of what I’m doing in a future post but we do already have DLLs and DYLIBs building and they are undergoing testing at the moment. Once we’re confident in the Linux build, we will work on testing out OS X support.

Share

Python bindings for PolyVox preview

As part of the next release of PolyVox, we’re going to have the first Python bindings available and supported as well as preliminary support for C♯ bindings. This will allow easy integration of voxels into the technologies you’re already using.

History

For a long time now (at least 4 years) we’ve had some form of Python bindings available for PolyVox, created via the SWIG tool. If you were paying attention in those days, you would have seen that the bindings were often broken or even disabled from building completely. This was largely due to the fact that PolyVox was a fast-developing piece of software without a stable API. We didn’t want to slow down the development of new features by having the impedance of also having to update the bindings.

However, since we starting making proper numbered releases (beginning with 0.2.0 last year) the API has settled down and we’re making promises about how much (or little) it will change. This makes it a much more suitable target for building bindings to other languages.

Current status of Python bindings

My main target for the next release of PolyVox (0.3 when it’s out) has been improving and polishing the bindings for Python. In addition to the Python bindings, I have also enabled the building of C♯ bindings for those who would like to try those out too. The Python bindings are better supported however (we have nightly tests run on them, documentation and a demonstration example) and are less liable to change.

If you’re interested in taking a look, then I’ve uploaded a first draft of a section documenting the Python bindings which introduces the bindings and goes through a short code example. That short example is expanded as a full example in the usual example location, PythonExample.py, which renders a blocky sphere to the screen using Python, PyOpenGL and PyGame without a single line of C++ needing to be written.

Voxel sphere rendered by Python

A voxel sphere rendered though PyOpenGL

For example, creating a volume is as simple as

import PolyVoxCore as pv

r = pv.Region(pv.Vector3Dint32_t(0,0,0), pv.Vector3Dint32_t(63,63,63))
vol = pv.SimpleVolumeuint8(r)

You can set the value of any voxel with a single call like:

vol.setVoxelAt(x, y, z, 10)

and you can extract a polygon mesh to be passed to your 3D engine of choice with

mesh = pv.SurfaceMeshPositionMaterialNormal()
extractor = pv.CubicSurfaceExtractorWithNormalsSimpleVolumeuint8(vol, r, mesh)
extractor.execute()

The unusually long names for the classes is an artefact of SWIG being able to represent all the varieties of C++ template instances. You’ll also notice that the API is not very Pythonic at present. I’m trying to get all the functionality working before adding another layer of Pythonicness.

All of the above is already in the develop branch of Git already so feel free to try it out. If you have any question please do ask in the comments below or in the forums.

In a future post I’ll detail some of the technical challenges I’ve faced to get all of PolyVox’s functionality working in both Python and C♯ via SWIG.

Share

PolyVox 0.2.1 released

As a late Christmas present to you all we’ve just released version 0.2.1 of PolyVox. This is a bug fix release to PolyVox 0.2.0.

This release includes the following bug fixes:

  • A compilation error on VS2008 (commit)
  • One of the sampler peek functions would check in the wrong direction before moving (commit)
  • SimpleVolume and LargeVolume had a problem with negative positions (commit, commit)
  • The LowPassFilter test was using the wrong kernel size (commit)

Apart from those bug fixes there are no new features and so should be completely safe to upgrade to.

You can get the details for downloading the source from the PolyVox download page or download directly from these links:

If you’re following us on Git, the 0.2.1 is now what is represented on the master branch.

Share

New home for PolyVox git repo

The source code for PolyVox is now located at BitBucket rather than its previous home on Gitorious. There are a few reasons we wanted to move hosting provider. Primarily we wanted an easier way of keeping track of planned features without messy email threads between David and myself and better bug tracking than our current forum-based method.

BitBucket offered everything we needed and since we were already using it for its unlimited private repos, it made sense to move PolyVox there too.

While we will be using the issue tracker to keep track of features and bugs, we will keep using the forum for most discussions. Feel free so submit any simple/small bugs to the tracker directly e.g. for compile errors etc.

To switch your local clone to follow the new repo on the command line just do the following:

# First check where you're currently pointing
$ git remote -v
origin  git://gitorious.org/polyvox/polyvox.git (fetch)

# Change the 'origin' remote's URL
$ git remote set-url origin https://bitbucket.org/volumesoffun/polyvox.git

# Now, it should look like
$ git remote -v
origin  https://bitbucket.org/volumesoffun/polyvox.git (fetch)

Otherwise, you can just use your GUI tool to change the repo URL to be https://bitbucket.org/volumesoffun/polyvox.git. You should now be able to carry on doing git pull as if nothing had changed.

Share

Some PolyVox Updates – Git and CMake

We’ve been very busy here over the last few weeks with Voxeliens related things so I though I should send an update on what’s been going on in the area of PolyVox. There’s been two main changes recently which I hope will help make things easier for people as we move forward.

CMake Folders

The first thing we’ve done is to start using a nice little feature of CMake to make working in Visual Studio a little nicer. Before this change, the Solution Explorer looked like:

Obviously, this is a little hard to work with since all the tests, as well as internal targets like ZERO_CHECK and _PolyVoxCore are included in the list. What would be ideal is if it were possible to organise the targets into a hierarchy which matches how the code is logically organised. I found a blog post showing how CMake can do this. First of all, you must enable a global CMake property to turn on this feature.

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Then, for each CMake target, you mush set a property which defines the “folder” in which it will appear. For example, for the PolyVoxCore target, we add the following line to its CMakeLists.txt file:

set_property(TARGET PolyVoxCore PROPERTY FOLDER "library/PolyVoxCore")

Once these are added to all the targets you want to categorise, you will see something more like this in Visual Studio:

Which has put everything in a more logical place. This was added to Git a few weeks ago in this commit.

Git Branching Model

The second “feature” we’ve recently added is a new way of working with our Git repository. Up until now, we’ve simply done all work in the master branch (perhaps with the occasional local topic branch) and so it’s sometimes been the case that the version of the code in the Git repo hasn’t been in a compilable state. As we’re currently working towards making a proper release of PolyVox, we decided that we should be more structured with our usage.

I’d heard good things about Vincent Driessen’s “successful Git branching model” and after reading it through we decided that it would be a good model to follow. Even better, he provides a cross-platform set of Git extensions called git-flow which make the whole process painless.

As of today, we will be using the new branching model. The master branch will now only contain released versions of the code and if you want to get the latest development version, you’ll have to check out the develop branch. When browsing the web interface at Gitorious, you’ll see that you can switch between branches by clicking the name in the grey box at the top or in the right-hand panel when browsing the source tree.

When it comes to release time, it’s simply a few commands to merge the develop branch into the master branch and tag the commit.

What this means for users is that we’ll be making more regular, stable releases and the git repository will be in a much more stable state for you to use.

Share

Voxeliens shortlisted for the Indie Dev Showcase

We’re very happy to announce that our début game Voxeliens has been selected as one of the finalists for the Indie Dev Showcase at the upcoming Develop Conference in Brighton, UK. This means that over two days of the conference we’ll be among the other 9 finalists showing off our game to public, press and industry professionals.

We will be provided with a stand for people to come by and talk to us and play the game on the 11th and 12 of July. So if you’re going to be at the conference please come by and say hello – we’re a friendly bunch 🙂

Out of all the games that have been shortlisted, one will be selected as the overall Showcase Winner and one will be chosen as the People’s Choice via a ballot during the conference.

The Develop conference is one of the largest European game developer and publisher conferences and runs for three days from the 10th to the 12th of July. As well as providing talks and an expo floor for the professionals in the industry there is also a day and a half of talks aimed solely at the indie game developer community.

Share