About David Williams

David is a post-doctorate researcher at the University of Groningen, The Netherlands, where he is investigating GPU computing. Prior to this he worked in the games industry and wrote graphics/engine code for a number of PC/PS3/XBox titles. As well as making games he occasionally enjoys playing them, and also sometimes gets outside to do some photography.

Where’s the next PolyVox release?

PolyVox users are no doubt aware that it’s been a while (10 months actually) since the last release so I thought it would be worth taking a moment to provide an update to what’s going on. Obviously the main distraction has been Voxeliens (which filled the first 6-8 months and is still in the background), but we’ve also been working on gameplay integration and having a busy couple of months at work. Still, there has been a steady stream of commits to PolyVox so progress is being made.

In a previous post we identified the main areas we wanted to work on before doing another release. I’ve listed these below and colour coded them according to how complete the work is. Green is finished, red is not done yet, and yellow is somewhere in between:

  • Finish voxel refactoring
  • Surface extraction callbacks
  • Unclassing work
  • SWIG bindings
  • Fix A* test
  • Fix warnings
  • Remove redundant code
  • Documentation
  • Release script
  • Switch to Git flow
  • Improved CMake consistency

Note that’s we’ve decided not to pursue the SWIG bindings for the next release. They might still get some improvements but they won’t be in a finished state. Future versions of PolyVox are likely to bring more changes (particularly more unclassing) which might break any bindings we write now but which should also make them easier to implement later.

So when is the next release coming? Well so far we’ve been pretty bad at predicting dates so I’ll just say I hope it’s done by the the end of the year. The plan is still to do smaller and more frequent updates in the future, now that we have the Git flow model and release script.

Share

Smooth terrain in gameplay3d

Over the last couple of weeks I’ve been doing some work to integrate PolyVox’s smooth terrain into RIM’s gameplay3d engine. This follows on from our previous work on cubic terrain. The smooth terrain is no more difficult than cubic terrain, and the main challenge has been designing the code in such a way that the integration elegantly supports both (as internally they have different voxel and vertex types).

The images below are again based on one of the data sets from Voxeliens, but this time we’ve run the data through the LowPassFilter to perform smoothing and basic triplanar texturing is also applied:

These screenshots are taken on PC but the test application does run on my mobile phone as well. It’s a bit slow though (20-30fps) which is probably because there’s no LOD present at the moment. It’s nice to be back to tech development are spending so long working on Voxeliens and we have some big ideas for the next engine ๐Ÿ™‚

Share

Unclassing some PolyVox code

I visited Munich a couple of weeks ago and traveling by train was the cheapest and easiest option when coming from the Netherlands. It was still a lot further than I initially expected (at over 10 hours each way) but I was pleasantly suprised to find the trains had power sockets for each seat. This meant I was able to keep my laptop running and crack on with the ‘unclassing’ work which has been mentioned a couple of times in the forums.

So what does this involve? Well, most of the algorithms in PolyVox are used by declaring a class and then calling the ‘execute()’ method, but in many cases it seems that a single function call would provide a better interface. For example, the Raycast class was typically used as follows:

RaycastResult result;
Raycast<SimpleVolume<int8_t>> raycast(
    &volData, start, direction, result, isPassableByRay);
raycast.execute();

if(result.foundIntersection)
{
...
}

It seems like overkill to have to declare a class (two if you include the RaycastResult) for something as simple as performing a raycast. So I’ve modified the code such that you can now do the following instead:

RaycastResult result = raycastWithDirection(
    &volData, start, direction, raycastTestFunctor);

if(result == RaycastResults::Interupted)
{
...
}

As well as being conceptually cleaner, note that you no longer have to specify the volume/voxel type as it can be deduced from the first parameter which you pass. The old version of the code also needed to store the callback so that it could later be called by execute(). This required the use of std::function, but now that there is no need to store it we can use the regular STL callback approach instead.

I made some other improvements besides simply unclassing this functionality. There’s been confusion in the past over whether the two vectors passed to the raycast should represent a start point and a direction or a start point and an end point. Both are useful, and the naming of ‘raycastWithDirection()’ and ‘raycastWithEndpoints()’ should make it clear which one is being used.

There’s also no longer a separation between a version which uses a callback and a version which doesn’t. A callback must always be provided, and is responsible for determining whether a ray can continue as well as performing any other logic such as changing the state of voxels along the ray.

It is likely that some other PolyVox algorithms will be unclassed in this manner, but as shown on our mindmap we only wanted to do the Raycast for the next release. Actually I also did the AmbientOcclusionCalculator (now calculateAmbientOcclusion()) as it serves as a good test of the raycasting functionality, but in general we want to see whether this process has any drawbacks. So let us know what you think…does it make sense to unclass more PolyVox algorithms?

Share

Updating the PolyVox documentation

Lack of documentation has long been a thorn in the side of PolyVox users, and it’s something we’ve been promising to improve for a while now. In particular we wanted to make a special effort before the next release of the library. I’ve spent some time on this over the last few weeks because I’ve been traveling quite a lot and my laptop isn’t really powerful enough for any real development. We’ve uploaded a preview so you can see the work-in-progress documentation for the following areas:

The API documentation for the CubicSurfaceExtractor has also been updated to include more details and diagrams about how it behaves.

Hopefully it is already useful although it is a long way from being finished. We don’t expect to get it all done before the release but we do want to show that some progress is being made in this area. Getting proper documentation in place will be important to improving the accessibility of the library and allowing people to decide if it is the right choice for their projects.

The index pages for the manual and API docs are below but be aware that some of the entries are just stubs:

We’re interested in feedback on how it’s shaping up (you can ignore typos for the moment as we’ll come back to those later) so do let us know if it makes sense, if it’s the right technical complexity, and whether it covers relevant material. Suggestions for the FAQ are also welcome.

Share

Desura, IndieCity, Greenlight… Voxeliens is everywhere now!

So we’ve had a pretty busy week! We’d been meaning to add Voxeliens to Desura and IndieCity for a while now and we finally got around to it. But then Valve suddenly launched Steam Greenlight so we had to make a quick dash for that as well. We were very keen to be on Greenlight as soon as it went live because it had an inevitable wave of publicity which we wanted to ride.

So you can now buy Voxeliens through Desura and IndieCity, and these are both very popular indie distribution platforms with a wide range of games. You should probably check them out even if you’re not after Voxeliens. The idea of Greenlight is to eventually get the game on Steam, but there’s still an air of mystery around the process and whether it will achieve this end result. But a vote would certainly be appreciated!

Desura Digital Distribution

I think this more or less wraps up our attempts to push Voxeliens onto distribution platforms. Matt’s had a busy summer between CERN and Fermilab but is hoping to get back to the Linux version soon, and I’ve also got a few loose ends to tie up. One thing we’ve learnt from this process is that making the game is only half the battle… and there’s plenty still to be done after it’s ‘complete’. Still, we do feel that the dust is finally starting to settle ๐Ÿ™‚

Share

Voxeliens is now on Indievania

Just a quick note to say that Voxeliens is now available to buy on Indievania. I don’t think this site is as well known as the likes of Desura, but I must say they were really easy to work with. It only took an hour to set up the account and upload information about the game, without any messing about emailing contracts and that kind of stuff. So if you’ve got a game you want to distribute I’d recommend at least giving them a look.

In related news we were unfortunately rejected by Steam, but this wasn’t a big surprise considering they are in the process of switching to their new Greenlight system (which they suggested we try instead). Greenlight will be going live in the next few weeks, so if you’re a Steam user then do come and vote for us when the chance arises ๐Ÿ™‚

Share

PolyVox on Android

Following a previous post about PolyVox on iOS, I’ve spent some time over the last few weeks experimenting with RIM’s gameplay engine as a basis for future projects. Naturally this has involved integrating it with PolyVox and today I have some initial results to present. The video below shows gameplay and PolyVox working together on my Samsung Galaxy S Plus:

The voxel world is one of the levels from Voxeliens but this doesn’t necessarily mean we are bringing Voxeliens to mobile (we might, but we’re just experimenting for now). It was basically just the data I had closest to hand, and the volume dimensions are 128x128x32.

To be honest I’m pretty amazed at how well it runs! I’m seeing a steady 40-50 frames per second and this seems to depend on how many pixels are being drawn. I need to do more investigation into the performance bottlenecks though. Also, be aware that this is a debug build as I’m new to Android development and I don’t know how to do release builds yet (it requires some kind of signing I believe).

Getting PolyVox to build on Android was not too difficult. The only problems were complaints about std::function and about throwing exceptions. For now I just cut out the offending pieces of code but we’ll have to come up with a proper solution in the future.

I really like RIMs gameplay engine, and if we do decide to use it for future projects then it opens up a lot of platforms for us. And after all the work we did on Voxeliens it’s great to be getting back to playing with technology again ๐Ÿ™‚

Share

PolyVox on iOS

The blog’s pretty lively this week ๐Ÿ™‚ Well there’s one more thing I thought might interest our PolyVox users. We were sent this on Twitter yesterday from someone we met at Develop (it was the first time we heard “Hey, you’re the PolyVox guys!”). It’s a video of PolyVox running on an iPad 2:

You can right click to watch the video on Vimeo, but I’ve reproduced the included information below:

“Met @VolumesOfFun at Develop, discovered they hadn’t tried their voxel meshing library on iOS, decided to spend an hour or two hacking something together to see how fast it ran. And then take a pretty shoddy video cap of it!

Mental note: buy an HDMI capture card.

30x20x30 voxels, constantly regenerating all 18k cells and resulting mesh; ran at 25-30hz on iPad2. (the voxel data generator was multithreaded, but PolyVox isn’t)”

Thanks for showing us this, and let us know if you do more PolyVox work in the future!

Share

A mind map of our thoughts

Despite being brothers, Matt and I actually live in different countries and so most communication is done by email or via the forums. But as we were both in the UK last week we took the chance to discuss the various things which were on our minds regarding our projects. We didn’t get as much time as we would have liked, but none-the-less it was very useful and we produced the lovely mind map below:

Of course, it’s more useful in the context of the discussion which we had but we thought it might be interesting anyway. We’re going to update it from time to time and use it as a method of tracking what we’re currently thinking about. Some of the key points:

  • Work on Voxeliens is mostly focused around distribution at the moment. Matt is talking to Good Old Games and we sent off our Steam application at the weekend. So fingers crossed for that! At some point I’m probably going to investigate the possibility of bringing the game to mobile devices.
  • PolyVox has picked up again with a lot of commits recently. We’re focused on trying to get a release out so we can then think about integrating other peoples contributions. On that note, Matt has pointed out that we are not using Git very effectively (I basically treat it like SVN) so we will investigate something like ‘A successful Git branching model‘. This should keep Git head a bit more stable.
  • We’ve vaguely discussed a future game project but with no details yet. We’ll probably look at integrating PolyVox with a complete game engine (rather than separate graphics, physics, sound, etc libraries) so we may do some investigation into the options here.

We’ve decided we should try and be as transparent as possible so do ask if you have questions about our plans.

Share

Second Day at Develop Conference

Yesterday was the second (and final) day of the Develop Conference in the UK and once again it was great fun. It was a little quieter than the first day, but this was a welcome break as it gave us more time to talk to people in depth.

We’ve had plenty more people come by to play the game, and you can see one session in action in the picture below:

A visitor to the stand plays through Voxeliens while Matt watches.

Some of the players have been really quite good, with one player in particular getting to level 10 and achieving a high-score of 55470. I’ve never got to level 10 myself and it’s a pretty terrifying place to be! By the end of the conference the high score table looked as follows:

'DTGENT' was the only player to break through the 50000 barrier. Well done!

We also got interviewed by Playr but I kept glancing at the camera instead of the interviewer so I’m not sure if they’ll use the footage. There was no preparation time so I was just making up stuff to say on the spot ๐Ÿ™‚ Well, I’ll post here if it does get used.

Although the conference is now over, Matt and I are going to be in the same place until the weekend (we’re usually in different countries) so we hope to sit down and discuss our plans for the future. Stay tuned for more information once we’ve done this.

Share