discreet lod terrain engine

v71 105 Feb 17, 2010 at 15:00


Hi everyone this is a terrain engine i am working on since a month or so, it based on
discreet meshes with different level of detail, actually they are 3 , 100% , 50% ,20%
the color coding is , red, green blue in order of percentage , i still have cracks here and there
and i am thinking to a way to solve this problem.
The algorithm takes a bitmap , chops it by 32x32 patches and for each patch computes the level of detail, then during rendering time the distance from the observer is computed and the corresponding lod is selected for every patch, the patches are rendered using vertex arrays, soon to be converted in vbo.
I get about 800 fps with a 256x256 terrain divided into 64 patches of 32x32 surfaces
All the level of detail is computed off line and is quite intensive it took 3 mins to create the terrain from a 256x256 bitmap

4 Replies

Please log in or register to post a reply.

Sol_HSA 119 Feb 18, 2010 at 19:11

3 minutes to turn 64k samples into a heightfield?
What kind of processing are you doing?

v71 105 Feb 18, 2010 at 20:14

Its not a simple grid division, once the bitmap is acquired , each patch is converted into a polygonal mesh , and for this mesh, 3 different levels of detail are computed, 100%, 50%,20% , red, green and blue , in the screenshot , its not a simple level of detail algorithm, it tries to mantain the shape of the current mesh, lowering the number of surfaces, at a required percentage, after that, a function for refinement of normals at border is executed, in fact without that , patches of terrain would be clearly visible.
I am working of making cracks disappearing.
i just loaded a 512x512 bitmap and it took 12 mins , but it is a big map to wander in it
Obviously, after the bitmap is processed i load the file containing processed meshes, i don’t wait 12 mins to see modificiations
each time i run the program

roel 101 Feb 18, 2010 at 23:07

What is your LOD algorithm? Collapsing edges shared by faces with a similar normal?

v71 105 Feb 18, 2010 at 23:30

It is based on quadric error metric , vertices are collapsed , nod edges.
I am reading that dx11 will support hardware tessellation, my algorithm is already obsolete :-/
that was fast damn it…