How to make natural looking voxel

I'm developing a voxel game, but I think I use the wrong technique. I currently use flat tiles, to make blocks, and I think theres a better and more efficient way.

I have seen a voxel game, which have naturally looking terrain. By that I mean non blocky. The game have 4*4*4 blocks per cubic meter, and blocks like dirt, sand and stone, have round edges, and kind of melt together (Like in ordinary games). Heres a screenshot

How is this achieved?

• en.wikipedia.org/wiki/Marching_cubes – Raxvan Jan 15 '15 at 12:12
• do you know which game this is? how can you be sure that it's voxels? Ok, found it myself, the game is called Blockscape: indiedb.com/games/blockscape – Babis Jan 15 '15 at 13:11
• There is a blog at procworld.blogspot.com that has all sorts of detailed blog posts about how his voxel engine was created. Posts go back several years from when the engine was in infancy to now when it is currently being licensed for Everquest Next. – stokastic Jan 15 '15 at 17:29

This is achieved by interpolating ramps between cubes of different height.

When you have a scenery like this (seen from the side)

  #
####   ##
############


you would add polygons to make it look like this:

 /#\
/####\ /##\
############


An algorithm to calculate these ramps is the marching cubes algorithm.

When you want it to be even more beautiful, don't just use single polygons to interpolate between cubes, use curves of multiple polygons. But keep in mind that it will add quite a lot of polygons to your scene, so you should only do this for those cubes which are close to the camera.

• Thank you! Do you know a place which explain how to do this in OpenGL, Light Weight Java Game Library? Edit: And if you know a good technique how to add collision detection for the marching terrain, that would be appreciated too. – KaareZ Jan 15 '15 at 12:38
• @KaareZ Sorry, I never worked with LWJGL. – Philipp Jan 15 '15 at 12:41
• @Philipp you might be interested in this answer – Thebluefish Jan 15 '15 at 20:26
• Or you can skip marching cube altogether and go to the much more interesting frankpetterson.com/publications/dualcontour/dualcontour.pdf less complicated you can also simply add the noise fonction as an offset to the final chunk's vertex. You still have block but now they have the property of rolling hills by not being strictly aligned in atrict straightline ... combining dual contouring and this for even more interesting result (with a modifier on the vertex offset to control more or less organic generation). – user29244 Jan 16 '15 at 2:45
• forum.unity3d.com/attachments/captura-jpg.23795 here is a picture of "rolling block" (offset applied as vertical displacement) Here is More picture but with displacement applied on every direction forum.unity3d.com/attachments/t1-jpg.23871 forum.unity3d.com/attachments/t2-jpg.23872 vimeo.com/27976287 – user29244 Jan 16 '15 at 2:57

There are two obstacles you need to deal with in order to achieve similar quality like the one in the image, the first is artistic and the second is technical (memory, processing). First I assume that you already solved your artistic problem, you can make the models, the art and the shaders etc. (Partially because I can't answer art problems)

The major technical problem is that when voxelizing those models you created in a high level of detail you will end up with huge number of tiny voxels. Processing and rendering huge number of voxels is not trivial. The answer to this is called Sparse Voxel Octrees

SVO will give you the ability to render highly detailed models without processing all the voxels, but only the visible ones. Note that in order to render SVO you will need to use ray-casting rather than the usual rasterization technique.

More details on SVO in this paper