Jump to content
  • Advertisement
Sign in to follow this  
Triad_prague

OpenGL basic voxel terrain rendering

This topic is 2605 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!