Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Lets consider a large voxelized volume stored in an oct-tree or any other convenient structure. This volume represents, for instance, a landscape, where each block is either empty (air), or it has an specific material that will be later used to apply a texture. Voxels that are next to each other represent connected sections of the surface.

What I need is an algorithm to generate a mesh from this voxels that represents the volume, with the following caracteristics:

  • All the "holes" in the voxelized volume are correct.
  • All the connections are correct, i.e. seamless.
  • The surface appears smooth.

In a broad sense, I want to somehow preserve the surface topology, meaning that connected sections remain connected in the resulting mesh and that the surface has a curvature that responds to the voxels topology. Imagine trying to render the Minecraft world but getting the mountain ladders to be smooth instead of blocky.

share|improve this question
add comment

1 Answer 1

To generate your basic external, orthogonally-planed mesh: Do a slice-by-slice evaluation of the volumes involved, constructing a submesh from each. Each slice is exactly one voxel in thickness. By basic I mean to suggest starting without smoothing, in order to get a clear understand of the problem. The sliced approach is common in medical imaging, one of the industry birthplaces of volume rendering technology. Where seams are created between individual slices, you can then do post processing to remove those redundant edges (and thus vertices). Let me know if this needs clarification and I'll draw you a simple picture.

For smoothing with effective surface topology preservation, look into marching cubes (note that the algorithm was patented for many years, but that expired in 2005).

Aaron Bishop's latest game Lords of Uberdark does just what you are describing, AFAICT.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.