Jump to content
  • Advertisement
Sign in to follow this  
Methodic

Voxel Data Structure

This topic is 2614 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

Hello,
I've been searching for an efficient way of storing voxels, and how to represent each voxel.
Would a 3D array of bytes be a good way to do it?

Share this post


Link to post
Share on other sites
Advertisement
Thats the most basic way. Sparse voxel octrees seem to be mentioned a lot when talking about voxels

Share this post


Link to post
Share on other sites
Isn't it very inefficient with a 3D array if I'd have, for instance, a sphere represented in voxels?

The reason I'm asking is that the 3D array would be a cube, and the actual voxels of importance would be a sphere.
So wouldn't there be a waste of space storing tons of empty voxels, or am I wrong?

Share this post


Link to post
Share on other sites
If my understanding of sparse octrees is correct, they don't store data for large spaces that contain the same type of data. So all the air around the sphere is stored in much less space then it would on an uncompressed 3d array, as well as the data inside the sphere.

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!