Sign in to follow this  

Geometry Clipmaps - sample heightmap?

This topic is 614 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've read the geometry clipmaps, and also researched how it works. There are some parts I still don't understand.

 

If I have a heightmap texture that is bigger than the clipmap how do I sample the right height from it?

I currently have a grid that has as many vertices as the size of the heightmap just to be able to sample correctly. But clipmap has a specific amount of vertices.

 

 

Another part I don't understand is when the clipmap levels are updated. So that they are centered around the viewer. Do I have to update the heightmap texture somehow? Shouldn't it work if I just update the vertex, uv buffers for the clipmaps? And with the new uvs I should be able to sample from the heightmap? The paper mentioned toroidal access to update the texture which is confusing for me but I don't even see the purpose of updating the texture.

Share this post


Link to post
Share on other sites

For my implementation I have a separate texture store that I use as source data for updating the clipmap with.  The clipmap is a texture array with N levels, and the texture store is a 3x3 grid of textures (with N levels of grids).  When I'm updating the clipmap, I check if the necessary texture store entry is present before doing the update.  If it's not, I drop that clipmap level until I can render.  I also pre-emptively load the texture store based on the velocity of the camera.

 

I have a separate thread running that checks for texture requests and loads the data from the disk or generates it with procedural noise, and flags the entry as complete when it finishes a texture.

Share this post


Link to post
Share on other sites

Is the green area the clipmap grid? The outer levels of the grid has a hole in the middle which is filled with a finer grid level. How does that work with the green area? How do I know where in the texture file on the disk to extract the right data? I assume I want the height data that is around the viewer? And I don't see how to extract it from a file on the disk.

 

I think I'll worry about the out of core stuff later. I'll begin with creating the grid levels and be able to update them when the camera moves. If I have a grid structure and it has n x n vertices like the paper mentions,  16x16. And for now I'll load a whole heightmap into the vram, let's say of size 1025x1025. My question is then how do i sample the heightmap when the grid isn't the size of the heightmap? I just want to sample a region of the heightmap I guess? but how do I decide the region?

 

 

 

dRiJCCN.png(source)

 

Share this post


Link to post
Share on other sites

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