Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Terrain LOD question.

This topic is 6144 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 writing a landscape/terrain engine/demo. It's already looking really nice (screenshot here - http://www.sbdev.pwp.blueyonder.co.uk/Terrain2.jpg ) but of course it's too slow. Has anyone got any recommendations for a way of implementing LOD/distrance abstraction? Currently the 'map' is made up of 10*10 sectors of 30*30 nodes. I could have a sector based LOD value based on distance from player, and update only when the player leaves a sector. The problem with this is that building the new sectors is too slow because I need to work out face normals, and then average the face normals to get vertex normals. Averaging face normals to get vertex normals is very time consuming, but without vertex normals, D3D is using the face normal for all three vertices, and we got no shading. I've been looking at one of the best terrain engines, Project IGI, and I can't figure out how they can keep the frame rates up when they are rebuilding a section of their map every frame. Can anyone enlighten me? TIA, Simon. Edited by - simon_brown75 on July 19, 2001 7:18:29 PM

Share this post


Link to post
Share on other sites
Advertisement
Make sure that you cull any un-necessary triangles from the terrain mesh, and also make sure that you aren''t populating flat areas with more triangles that barely needed...

www.vterrain.org

That may help you out a little, if you haven''t been there already.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials

Share this post


Link to post
Share on other sites
Well, at the moment, the triangle distribution is the same everywhere, on flat and hilly bits, 2 triangles per node.

I''ve managed to speed it up by implmenting a crude form of level-of-detail, where each sector has an LOD value, which determins how many nodes to skip for each pair of triangles. Either it skips 0, 1, 2, 4 or 5 nodes at a time. This means each sector can have 1800, 450, 200, 72, or 50 triangles. This has brought the number of drawn triangles down from 180,000 to about 25,000 per frame.

However it''s left gaps where distant sectors join each other (as I knew it would).

I think I should be trying to do something like the ROAM algorithm instead.

Share this post


Link to post
Share on other sites
Hey, Recently I have been reading up on quite a few interesting algorithms such as, LOD using ROAM && binary triangle trees, QuadTrees, and a few other things. There is tons of information covering these topics if you do a search on gamasutra or google. And find yourself a nice texturing algorithm. Heres a pic of my terrain demo/thingy from last week http://www.geocities.com/tryforfulluse/water_lil_jpg.jpg
Read up on frustrum culling too. good luck.

Share this post


Link to post
Share on other sites
Thanks for the info Just been reading the ROAM white paper last night, interesting stuff, although hard to follow at times.

That''s looking really nice. Are you making a demo or are you hoping to make a game with it?

Share this post


Link to post
Share on other sites
Im currently rewriting my entire demo to support ROAM with frustrum culling. A paper that provides source code located at http://www.gamasutra.com/features/20000403/turner_pfv.htm provides a nice read with source code.

Share this post


Link to post
Share on other sites
Now that I''ve spend the day reading and such about ROAM, LOD, and quadtrees, I have to say quadtrees seem a bit better than ROAM (in my own opinion), because ROAM constantly has popping meshes, which become''s very irritating. I read through a great article on quad trees, which dont seem to hard to implement, located at www.gamasutra.com/features/20000228/ulrich_pfv.htm

the author of that article presents some great idea''s for LOD calcuation''s. try out both ROAM & QuadTrees to see which algorithm you''d rather work with. good luck

Share this post


Link to post
Share on other sites
Simon_Brown,

You seem to have a good idea on this terrain stuff I''ve seen you post some sample code on another forum which is rare these days. Is there anyway you could tell me or post some code on how the Vertex buffer part of the ROAM terrain works. Like where to lock and unlock the buffer and how to code in the triangle list ? Thanks for any and everything.

Scoot

Share this post


Link to post
Share on other sites
Scooter/

I think you''ve over-estimated my talents with terrain engines I only started writing my first ever terrain demo two days ago, and only started implementing LOD yesterday. The version of LOD i''ve implemented is very amateurish as well, which is why i''ve been reading about ROAM and other LOD techniques.

masterg/
I also read Thatcher Ulrich''s piece yesterday, and I also find qudtrees more appealing than bintrees. It seems a cleaner solution to me, and easier to get up and running.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!