# Terrain LOD stitching on the GPU

This topic is 3501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

  0   1   2   3   4
32*---*---*---*---*
| A/| C/| E/| G/|
| / | / | / | / |
|/ B|/ D|/ F|/ H|
31*---*---*---*---*
|  /|  /|  /|  /|

--->    --->
0       2       4
32*-------*-------*
|  A  _/| E   _/|
|  _ // |  _ // |
|_/ B/ D|_/F / H|
31*---*---*---*---*
|  /|  /|  /|  /|


Texture coordinates work as normal as they will be calculated in the shader based on the new position of the vertex - this doesn't have any impact. This will currently only work for cards that support dynamic branching. It could possibly be optimized further to remove some of the branching so it'll also work efficiently on older cards too. Although it does use branching which can be expensive, there are only at most between 1 and 4 branches per vertex and one 1 for the majority of vertices (those not along an edge). I've got a very high-spec GPU and there is barely any difference (if any) using the extra branching with regard to frame rate. I haven't had time to try it on my older card yet. One thing to mention is that if you are geomorphing your terrain patches - you might be restricted slightly in that you won't be able to geomorph the outer edges of a patch if there is a LOD change in that direction. The reason being that the adjoining vertex in the lower LOD neighbouring patch, maybe be partly geomorphed which means it won't match up to the adjoining vertex in the current patch. I don't think this is limited to only this algorithm, but I managed to get around it quite easily with barely any visual change - just don't geomorph any vertices along an edge if it has a lower LOD to its adjoinging neighbour. I'd be really interested to hear if anyone chooses to implement it and if it is of benefit. If you have any questions regarding the algorithm, I'd be more than happy to help.

##### Share on other sites
You should check out Restricted Quadtree Triangulation (http://www.ifi.uzh.ch/vmml/admin/upload/Vis98.pdf). RQT handles stitching of discreet chunks much better than geoclipmapping, and also gives the added benefit that it will give you auto decimation based upon displacement metrics (rather than naively increasing resolution on things closer to the camera that don't need it)

You should also check out the XVOX demo (http://users.belgacom.net/gc610902/)
XVOX does some nifty tricks with morphing patches between tessellation levels over distances, and looks really good (although it suffers from additional vertex load being sent to the shader, as well as 2 stream lookups per 1 vert to do interpolation)

~Main

1. 1
Rutin
44
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633409
• Total Posts
3011702
• ### Who's Online (See full list)

There are no registered users currently online

×