Log in

View Full Version : Level of Detail Calculation



technomage
09-12-2005, 11:54 AM
Does anyone have any tips or links on how to go about Level of Detail calculation.

I have a bunch of triangles that I need to split into a number of smaller triangles as the camera gets closer, and unsplit as it gets further away.

I know I have do calculate something to do with the camera distance but I'm not sure what...triangle size? Max length of the sides?

Anyone got any tips?

Cheers

Dean

Anonymous
09-12-2005, 07:00 PM
Actually you can base your triangle split/collapse on any of these parameters. But think first: do you really need real-time simplification process? Current GPU's can process really big amount of triangles (you will not be able to update each of these triangles every frame on CPU) so if you really need to do some LOD think about some set of fixed precalculated LOD's and switching between them when needed.

MS currently switching away from fine grained LOD modifications. Original ideas of refining / collapsing can be found here:
Hugues Hoppe hope page - http://research.microsoft.com/~hoppe/

Clootie
09-12-2005, 07:04 PM
Previous e-mail was mine.

PS. It's really not obvious to determine - am I logged in at this moment or not? The only definite indications is "Logout" button...

technomage
09-12-2005, 08:01 PM
I forgot to mention this is spherical terrain rendering, I'm trying to get my project running on the lowest spec possible, so I'm trying to stick with non vendor specific opengl calls such as glDrawElements etc, and possible vertex buffer objects.

So as you get closer to the terrain triangles off the screen will be moved toward a lower level of detail but triangles within the view move towards a higher LOD.

JSoftware
09-12-2005, 09:13 PM
maybe nurbs or splines would help in this case? calculating triangle splitting or collapsing in realtime would be inefficient.

i would certainly advice you to utilize vbo's if you are even considering that your terrain should contain lod.

doing a planet renderer? :wink:

Paulius
09-12-2005, 10:04 PM
maybe nurbs or splines would help in this case? calculating triangle splitting or collapsing in realtime would be inefficient.
Building triangles from splines is still plenty of work.
What?¢_Ts the difference if it?¢_Ts for terrain? You?¢_Tre terrain should be partitioned anyway for frustum culling, so you might as well have multiple lod versions of those partitions and when rendering select the appropriate versions according to distance to camera.
Building triangles from splines is still plenty of work

technomage
09-12-2005, 10:14 PM
This guy enspired me http://sponeil.org. :D Yes it is a planet render, I've had some good results from the perlin noise generator for my Alert fighter project http://www.cerebral-bicycle.co.uk/viewdoc.asp?doc=319.

The planet here has been generated at run time from a single random seed. The problem is that it's a fixed size sphere, which doesn't get an more detailed as you get closer. I have a LOD sphere written to support the merge and split based on a Diamond Algorithm published at http://www.binstar.com but I've hit a snag on actually when to perform the merge or split. :?

technomage
12-12-2005, 06:22 PM
I've decided to try this approach. When a new triangle is created I work our the average height of all 3 points, then i work out the height of the midpoint or center of the triangle, the difference between the midpoitn height and the average is the amount of error in that triangle. Now based on this difference and some calculation of the distance from the midpoint to the camera I can decide if I need to split the triangle.

I'm not sure what "calculation" to use for the error and camera distance to decide if I should split. Any ideas :?:

XProger
12-01-2006, 07:30 AM
http://xproger.mirgames.ru/?id=2#Land
http://xproger.mirgames.ru/tmp/lod2.jpg

technomage
12-01-2006, 10:22 AM
Thanks for the link, but it's all in a language I can't read....sorry.. I did download the Landscape demoand it's great, nice work :D

BTW Savage found this the other day http://www.fl-tw.com/Infinity/infinity_media.php

This guy has done some amazing work, which is kind of what i'm after with the terain sphere. I'm still stuck on the LOD calculation so if anyone else has any ideas I would be greatful

Cheers

Dean

WILL
12-01-2006, 10:40 AM
Really? I --> *ahem* (http://babelfish.altavista.com/) <-- read it just fine. ;)

XProger
12-01-2006, 12:01 PM
technomage,
http://xproger.mirgames.ru/files/src/Land_src.rar - Source Code
http://xproger.mirgames.ru/files/bin/Land.rar - Binary & resources

This example demonstrate how to use VBO, LOD and QuadTree's on rendering landscapes.

technomage
12-01-2006, 03:55 PM
Really? I --> *ahem* (http://babelfish.altavista.com/) <-- read it just fine. ;)

I keep forgetting about bablefish :oops:

Thanks for the source, I'll check it out and see if it helps.

You really must check out that link I posted though, it's trully amazing :D