Hello fellow game programmers,
After finally reading most of the forums and articles related to terrain rendering, i think i reached a conclusion.
I just wanted to share with you my ideas and leave this thread behind any other people looking for such a subject.
The first problem that i came into was, obviously, solving the cracks between different LODs. Not a trivial thing
to do, however, after proper documentation and experimentation i reached a final conclusion.
I will use a quadtree to split my terrain into multiple patches. I will have only 1 VBO containing 33 x 33 vertices,
and multiple IBOs(16 i think). Each IBO has one or more edges altered so that it fits the neighbouring patches.
Now i need to make sure that the LOD level difference is not higher than 1, but that shouldn't be a problem.
Now, why one single VBO?
Well, i see no reason to use multiple VBO since i can scale down my patch.
For instance, a level 0 patch of 33x33 vertices splits into 4 33x33 patches having 0.25 the size of the parent patch.
(33 x 33 vertices means a width and height of 32, i love numbers that are a power of 2, probably an OCD or something.)
One single VBO for the whole terrain, multiple IBO for solving the cracks.
The downside is that i will need multiple draw calls, but i don't see that being too big of an issue.
If it misbehaves, then i could probably optimize this a little bit by merging some of the patches into a bigger VBO, thus reducing
the number of draw calls. Moreover, frustum culling and horizon culling are going to significantly cut down the number of draw calls per frame.
One thing i can't get straight however is how can i implement geomorphing with this technique. I'm thinking i could use an attribute that would slowly
interpolate the position of my vertex, but that means that for a while, i will need to update the attribute buffer every frame, not sure my GPU is going to like it.
What do you people think?
Is it ok? Can i do it better?