Level-of-detail for cubic-style terrain with PolyVox

I just thought I’d post an update about some tests I did which worked out a lot better than I once expected. The idea here is to perform LOD for cubic-style meshes simply by downsampling the volume, such that in the distance a group of eight cubes is replaced by a single cube.

In the past I’ve said this wouldn’t work well as the transition would be too visually jarring, but recently I’ve seen a couple of screenshots from voxel engines which do indeed take this approach. I also talked about it with Matt over Christmas, and hacked together a test implementation last night.

The screenshots below start at full resolution and then gradually bring the LOD cut-off distance forward until all parts of the terrain are at the lower LOD. The transition is much less noticeable than I thought, and it practice it would also be much further from the camera.

This has all been implemented within our new framework built on PolyVox and Gameplay3D. Hopefully we’ll be able to provide a demo of this framework in the near future.

This entry was posted in Uncategorized and tagged , by David Williams. Bookmark the permalink.

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.

2 thoughts on “Level-of-detail for cubic-style terrain with PolyVox

  1. Nice! Are you doing nearest neighbors or morphological downsampling to get the reduced volume?

    Also a suggestion on the colors: Instead of trying to average all of the neighboring colors, why not only average the nearby surface colors? That way you wouldn’t have those weird artefacts near the boundary between the ground and the water. You might be able to get even better results if you took into account per-face colors by only averaging over faces which are oriented similarly.

    • Hello again 🙂

      The colour for each large cube is computed by averaging the colours in the small cubes, with some weighting applied according to how many faces of the small cubes were actually visible. It doesn’t check from which directions they were visible though it might be possible to add this.

      There’s a bit more work needed to handle thin structures effectively and also to reduce the amount of blurring which takes place, but I think these issues won’t be visible in the distance anyway. I need to increase the volume size and do some proper tests here.

Leave a Reply

Your email address will not be published.