Yes, I'd have to agree with Matty, my terrain system is already functional save for the edges with the LOD mesh switching. Your system is definitively interesting but I cannot undertake a complete rewrite at this moment; the system I have, blocky as it may be, should be enough for the game I'm planning anyway. Also I will have to have a somewhat functional demo done in a couple of weeks, so time is a bit tight. Thanks though, I'll definitively keep it in mind for later
@Matty H: at the moment I'm simply using Ian M's
create object plane from Matrix1Utils 19. It lays the vertices out from top-left to lower right, row by row and I would guess (although I haven't had the chance to look it up yet) that the index data is also left to right, row by row in such a way:
a----b
|\ |
| \ |
| \ |
d----c
where the first triangle is made up of a-b-c and the second a-c-d. So the rows are of two triangles / a quad at a time I suspect.
I have been doing some sketches on paper on the bus and have an idea of how it might be possible to achieve what I believe you mean.
Basically I would create the object as usual and read all the vertexdata to a buffer, I would then proceed to edit the index data like so (for a level 1 LOD mesh, the level 2 simply requires further stretching and the removal of more triangles in-between):
1) Find all triangles that contain the vertex "to be removed".
2) One of these triangles are "inverted" (replacing it's reference to the undesired vertex to the other "remaining" vertex on it's quad)
3) The second triangle also replaces its reference to the undesired vertex, this time to the one to the right (if we're assuming horizontal application on the topmost edge).
4) The third triangle is removed alltogether.
A new object is then created with the appropriate amount of vertices and indices and it's vertexdata will be set according to the old vertexdata and this modified index buffer.
As said, I haven't tried this yet, but I think I should be on the right track?
Still so, would be great to see your algorithm if you already have one
Finally, sorry if this doesn't make much sense, it's in the middle of the night here..
"Why do programmers get Halloween and Christmas mixed up?" Because Oct(31) = Dec(25)