basic voxel terrain rendering

Started by
2 comments, last by Triad_prague 12 years, 6 months ago
Hi, I recently watched a demo of a video game (Lord of uberdark) and it said that the game used voxel terrain. I wonder what a voxel is and quick search told me that it's basically 3D "pixel". I started to google "basic voxel terrain rendering" but it seems that those articles are for people who already understood the basic stuffs. Basically I'm still confused of how the basic things work.

1. how do you render the voxel terrain? do we use triangles/polygons or what?
2. what to store? in my simple terrain engine I store vertices, triangle indices. what about voxel terrain?
3. can I use OpenGL to draw it?
4. is it memory hungry?
5. how do you texture the terrain?
6. do I have to use shaders to render it?

I'd like to learn it because I saw in the video that you can "sculpt" the terrain like a piece of cake :D
the hardest part is the beginning...
Advertisement
1) Some implementations render voxels as geometry, generated by various means. The mesh is constructed by approximating the surface of the volume described by the voxels. For this, you can look at the various implicit surface algorithms such as Marching Cubes, Marching Tetrahedrons, etc... Other implementations render the voxels using ray-casting, tracing screen-pixel rays and calculating intersections with the voxel data.

2) In voxel terrain, you need to store the various data points that comprise your voxel volume. Material, density/translucency, etc... The smaller and leaner you can make your voxel representation, the better.Many representations will go with a single byte material ID that allows, of course, 256 different types of materials.

3) Yep.

4) Yep. Although you can mitigate the memory usage by using data constructs such as Sparse Voxel Octree (SVO), data storage and access remains very much a limiting factor for large-scale usage of voxels.

5) This one can be a toughie. You can look into techniques such as tri-planar mapping to texture it.

6) Depends on how you decide to render it. Ken Silverman's Voxlap system doesn't use shaders, but the texturing isn't very high-def. For higher definition texturing, I suspect you probably will want to use shaders. A technique such as tri-planar mapping will require them.
I wrote a book article about voxel terrain which you can read on Google Books here: http://books.google....epage&q&f=false

I also have an open source voxel terrain library which you can take a look at: http://www.volumesof...ress/?page_id=8
FleBlanc, PolyVox, +1 for y'all. I'd start getting those resources to read, and I hope I can come up with something...once again thanks :D
the hardest part is the beginning...

This topic is closed to new replies.

Advertisement