• Advertisement
Sign in to follow this  

Cracks between patches with same the LOD level.

This topic is 698 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 fellow programmers,

 

This morning i decided to write a simple quadtree based terrain renderer (no frustum culling or any kind of optimization).

Since it was done it just a couple of hours, it's a little messy so maybe some sharp eyes can

figure out what's wrong here.

 

To explain everything, i'm using a quadtree to render my terrain. When the camera gets close enough to a patch, the patch splits

into for baby patches, so on and so forth. The vertex buffer is contant and so is the index buffer.

(for now i only have one IBO, i'm planning to create 16 in order to prevent cracks between different LOD patches).

 

The vbo has 65 * 65 vertices, 64 x 64 units. When i split a patch, i'm rendering the VBO 4 times, scale and translate everything

in order to fit within the parent patch.

I'm generating the height data using libnoise. The generated heightmaps are the four tiles of the tile that belonged to the parent patch.

I'm applying the elevation inside the vertex shader by lighting the Y value according to the r channel.

 

It could be libnoise, generating heightmap tiles that are not perfectly seamless, or it could be something else that

i missed.

 

I know it's a primitive way of rendering terrain, however i'm trying to get this right and then try a more modern approach.

 

There's several pictures attached here to better understand the problem.

 

[attachment=31996:err1.png]

[attachment=31997:err2.png]

[attachment=31998:err3.png]

[attachment=31999:err4.png]

[attachment=32003:err5.png]

 

 

Thank you!

Edited by Cristian D.

Share this post


Link to post
Share on other sites
Advertisement

An indexing bug? Instead of using the same hight twice for both borders, you use hight(n) for one and height(n+1) for the other?

Share this post


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

  • Advertisement