Archived

This topic is now archived and is closed to further replies.

Arch@on

Cracks in quadtree(heightmap), how to get rid of?

Recommended Posts

I have horrible cracks in my quadtree and I figured out a sollution which apparently works only with when the patch size is 32 or 64. Anway, I generate offsets for every patch so I can just draw them: The problem is that when I use width(quadtree) * mapSize I don''t get cracks, but I get array overflow, and it sucks, however if I use width -1 *mapSize I don''t get array overflow, but I do get huge cracks. One way to avoid the cracks is to create little bit bigger patches, however to me thats just a dirty hack, and I want a real working solution. Also if I use one smaller patch size I don''t get the overflow, but I do get the cracks as well.

Share this post


Link to post
Share on other sites
i havent gotten to that part of my terrain engine...but im thinking something along the lines of this.

but here is a possible quick and dirty way...
at each vertex that is along the line of the detail transition point (where the lines are occuring), lower the height of those vertices by a certain amount.

Since the side that is of less detail will always be the farthest away from the camera and the more detailed part close to the camera, the lowered heights will be hidden behind the detailed part of the terrain.

this is quick, relatively easy, and probably faster than doing calculations based on the camera''s eye/view and all that.

try it.
im gonna give it a try too when i get there.

Share this post


Link to post
Share on other sites
quote:
Original post by GekkoCube
Since the side that is of less detail will always be the farthest away from the camera and the more detailed part close to the camera, the lowered heights will be hidden behind the detailed part of the terrain.


thats not quite an assumption i would build upon, especially since only using the distance to select the lod wont give great results.

Share this post


Link to post
Share on other sites
i think using the distance from the camera is good enough.
what else could you base the LOD off of?

unless you''ll have cameras setup like in replay mode where the camera will be shot from another location....why else wouldnt this assumption work for all cases?

Share this post


Link to post
Share on other sites
because not every part of your terrain has the same "roughness" and some will require higher lods even further away while others can remain in a low lod until very close. but by just using the distance you treat all of them the same, no matter how big the real "error" of a certain lod really is. the result is either annoying popping all over the place or an absurd amount of triangles to avoid popping (by generally using a much higher lod than most parts would need).

its not about not using distance, its about not using distance alone ,-)

Share this post


Link to post
Share on other sites