Jump to content
  • Advertisement
Sign in to follow this  
SiS-Shadowman

Terrain Engine & LOD techniques

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i'm currently working on a terrain engine and i wanted to implement a LOD technique to my renderer, to be able to display larger terrains at less calculation time, but i'm curious what kind of techniques there are, to do this, and how they work. i've seperated the terrain to different patches. ( in my demo, it's 8*8 patches ) each consisting of various vertices. i use one vertex buffer per patch and 2 index buffers. one is for the dull detail version of the terrain, and one is just 1/2 of it ( 1/1 of the vertices, the full detail index has ). it's obvious that this is causing some holes in the terrain ( where there is a border bewteen different LOD steps. i'm interested how this problem is beeing solved :) last but not least: i'm very curious about this geomorphing, explained in an article on this site. i searched for it on the internet, but haven't found anything ( besides your article ) of it. du you know any sites where this is duscussed in more details?

Share this post


Link to post
Share on other sites
Advertisement
www.vterrain.org

Geomorphs were first introduced by H. Hoppe and Progressive Meshes. There is also a pdf by Wagner, and an excerpt from the ShaderX2 book, that covers Geomorphing in DirectX Shaders.

The holes can be oslved with stitching (search for deBoer' paper on Geomipmaps) or skirts (search for Ulrich's Chunked LOD paper).

have fun.

Share this post


Link to post
Share on other sites
On common technique is geoMipMapping, which is close to your scheme: Divide your landscape into a number of patches, precalculate the terrain in each patch in a number of different resolutions (to the heightmap, not screen resolution :) and select a high resultion close to the camera and a coarse further away. You should be able to find tons of info on this technique.

GeoMorphing (I belive) works together with geoMipMapping, so instead of switching directly between resolutions, you morph smoothly between them to reduce visible popping.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiS-Shadowman
hi,
i'm currently working on a terrain engine and i wanted to implement a LOD technique to my renderer, to be able to display larger terrains at less calculation time, but i'm curious what kind of techniques there are, to do this, and how they work.

i've seperated the terrain to different patches. ( in my demo, it's 8*8 patches ) each consisting of various vertices. i use one vertex buffer per patch and 2 index buffers. one is for the dull detail version of the terrain, and one is just 1/2 of it ( 1/1 of the vertices, the full detail index has ).
it's obvious that this is causing some holes in the terrain ( where there is a border bewteen different LOD steps.

i'm interested how this problem is beeing solved :)

last but not least: i'm very curious about this geomorphing, explained in an article on this site. i searched for it on the internet, but haven't found anything ( besides your article ) of it. du you know any sites where this is duscussed in more details?


The "holes" (usually referred to as cracks) you are talking about are a common problem with LOD. There are a couple ways to deal with them.

One way is by skirting. Basically you just add verticle triangles in the gaps to cover them up. It is fairly easy to do, but can look funny up close.

Another way is to just either add or remove triangles from the bordering patches. Here is some crappy adscii art to try and illustrate:


normal becomes
----------- -----------
|\ |\ | | / \ |
| \ | \ | | / \ |
| \ | \ | | / \ |
| \| \| |/ \|
|---------| |---------|
|\ | |\ |
| \ | | \ |
| \ | | \ |
| \ | | \ |
| \ | | \ |
| \ | | \ |
| \ | | \ |
| \ | | \ |
| \| | \|
----------- -----------

Share this post


Link to post
Share on other sites
i'll check the links tomorrow, i'm writing a test and my marks will get bad when i've got my head full of this .p

i've on question on the method to close these holes. do i have to rewrite the index buffer to do that?
haven't done anything so far, does it have a name? i would like to read more of it because i can't decide wether i use geomorphing ( wich seems much more complicated, but it's result can't be ignored ) or the normal lod method...

Share this post


Link to post
Share on other sites
Geomipmapping suffers some setbacks with terrain popping. You can see the LOD change on ocassion. Just about all of the LOD algorithms will suffer from cracks also. Be sure to check out the ROAM algorithm, which is more robust. If you are CPU limited, there's a roughly new algorithm that prevents the CPU from working so hard by just setting LOD based on distance from the camera. i.e. the square 4 patches around your eyepoint are highest LOD, the 2 rows and columns around that one are the next LOD, etc... I can't remember the name of this algorithm, thinking Window or Frames LOD? I'll have to look in my book tonight. There are also several good books available. The two I have are: Terrain Rendering with DirectX 9 and Focus on 3D Terrains. The titles are close to that, *memory is horrible*.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
@Supernat02 The algorithm you mention sounds like Geoclipmaps. ROAM is bad because it is runs immediate mode therefor is CPU-bound (read intensive), but yes it can avoid cracks (actually many hierarchial bintree methods can avoid cracks).

@S-S-Shadowman Yes you will have to update the index buffer if you use stitching as is used in the geomipmaps article. If you use skirts you can set up a few static buffers and then decided on which to display, but beware b/c skirts can present other visible artifacts.

Share this post


Link to post
Share on other sites
Geometry clipmaps doesn't have any "cracks" and there is interpolation (via the vertex shader) between lod, so you don't see any "poping" artefacts.
If you're interested, check this website

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!