Jump to content
  • Advertisement
Sign in to follow this  
Butabee

Help with voxel storage ideas

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

I'm trying to think of a very low memory way to store voxels and I was thinking of having something like storage containers that would be an object with an X, Y, or Z position and it would have a number specifying how many voxels that are along that positions plane, for instance an X object would have maybe 50 voxels with how many voxels there are at that X position anywhere along the x and y axis but I'm having trouble determining individual voxel positions with this method. I need to cross reference the X, Y, and Z objects to somehow determine individual voxel positions.

I think there's a way to do this but I'm not sure how to do it.

Share this post


Link to post
Share on other sites
Advertisement

I'm trying to think of a very low memory way to store voxels and I was thinking of having something like storage containers that would be an object with an X, Y, or Z position and it would have a number specifying how many voxels that are along that positions plane, for instance an X object would have maybe 50 voxels with how many voxels there are at that X position anywhere along the x and y axis but I'm having trouble determining individual voxel positions with this method. I need to cross reference the X, Y, and Z objects to somehow determine individual voxel positions.

I think there's a way to do this but I'm not sure how to do it.


If I understand you correctly you are trying to create a system that's similar to the chunks used in minecraft. There a chunk is 16*16*16 blocks. Then you might have 4*4*4 of these chunks. If you have these chunks in worldspace you can just offset your voxels by the amount in the chunks. If your voxel is in chunk 4,0,0 (X,Y,Z) and each chunk is the 16*16*16 size then your world pos would be 3*16+(voxelinchunk.x) for the xpos.










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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!