Sign in to follow this  

Voxel Coordinate Conversion Issues

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

So I have a Chunked LOD planet rendering system. It is rendered using 6 unit cube faces [-1,1] and then transformed to scale. The heightmaps of the patches on the planet are generated on the GPU using perlin noise. When the camera gets close to the surface, it switches from patch rendering to voxel block rendering(minecraft style). I am having a problem with noise coordinate systems. My planet contains a large cubic voxel volume of 12,000,000^3. Voxels are generated in this coordinate space.

Since the noise is generated using unit cube coordinates[-1,1], and the voxels at the surface are generated in world coordinates (voxels can be within a xyz volume of 12,000,000^3), if I have generated a mountain that I can see from space, and I zoom into that mountain, when I get close enough to the mountain and start generating voxels using noise, the voxels I am generating are at some high integer position (i.e SetVoxel(100000,100000,100000) ). The noise generated at this point is not going to be a mountain like it was for the very small unit cube position.

I hope I have conveyed the problem well enough. Thank you for any ideas/design help.

Share this post


Link to post
Share on other sites
The current solution I have is to convert my world coordinate to unit cube coordinates, then convert the mantisa of my unit cube position to an integer and then render a voxel at that position. So for instance, I generate noise at noise(.0005000,0,1), then I multiple each point by 10,000,000 to get the mantisa of the float, so .0005000*10m=5000,0,1*10m=10m, then say SetVoxel(5000,0,10,000,000). Does this solution make sense/possible?

Share this post


Link to post
Share on other sites

This topic is 2010 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this