Sign in to follow this  

LOD - Still a must-have?

This topic is 3142 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

Hey! I wonder if LODing for terrains is still that usefull today. What I mean is: Wouldn't the computation for real-time LODing in a terrain eat more CPU power than just rendering full detailed visible parts of the terrain on todays GPUs? I render my terrain with VBOs and index arrays using triangle strips; it's divided into patches and those patches are affected by frustum culling and some distance test. It's pretty fast, even when rendering huge terrains. Is LODing worth the pain and worth to throw all that what I've done so far away? If so, which algorithm would fit most into my existing code/concept, so that I don't have to rewrite everything? Thank you :)

Share this post


Link to post
Share on other sites
According to John Carmak you can go with static vertex and index buffers and skip LOD for the terrain.
You should listen to the interviews he gave regarding Tech5 engine and its terrain / mega-texture implementation.

Share this post


Link to post
Share on other sites
Quote:
Original post by doronf
According to John Carmak you can go with static vertex and index buffers and skip LOD for the terrain.
You should listen to the interviews he gave regarding Tech5 engine and its terrain / mega-texture implementation.


Thanks! Found it. If someone is interested too:

Quote:
John Carmack: Level of detail wise, the terrain does not render with any sophisticated geometry morphing situation. That's one of those things that for years I think most of the research that's gone into has been wasted. Geometry level of detail on terrain.. there have been thousands of papers written about it, and I honestly don't think it's all that important. The way the hardware works, you're so much better off setting down a static mesh that's all in vertex and index buffers, and just letting the hardware plow through it, rather than going through and having the CPU attempt to do some really clever cross blended interpolation of vertices.

Share this post


Link to post
Share on other sites
Quote:
Original post by starvinmarvin
Quote:
Original post by doronf
According to John Carmak you can go with static vertex and index buffers and skip LOD for the terrain.
You should listen to the interviews he gave regarding Tech5 engine and its terrain / mega-texture implementation.


Thanks! Found it. If someone is interested too:

Quote:
John Carmack: Level of detail wise, the terrain does not render with any sophisticated geometry morphing situation. That's one of those things that for years I think most of the research that's gone into has been wasted. Geometry level of detail on terrain.. there have been thousands of papers written about it, and I honestly don't think it's all that important. The way the hardware works, you're so much better off setting down a static mesh that's all in vertex and index buffers, and just letting the hardware plow through it, rather than going through and having the CPU attempt to do some really clever cross blended interpolation of vertices.


And the next line says:

Quote:
In and infinite sized world, you would have to include some degree of level of detail. The Quake Wars levels are not infinite size. They're bounded. And it generally turns out to be the best idea to just have the geometry at a reasonable level of detail and very efficiently rendered.


So I'd say it depends on what type of game you're making :) (I'm interpreting "infinite size" as open terrain/morrowind/mmo style)

Share this post


Link to post
Share on other sites
Even in the "infinite" case, you can still make sure your actual geometry is appropriately dense, pick a good far plane, and perhaps use fog to hide the end of the visible terrain. I'd really consider one of these simpler solutions before spending any time on a really complicated feature that only affects things that are -- by definition -- very far from the camera/action.

Share this post


Link to post
Share on other sites
Hm, okay. But does it matter actually? Even if you have an infinite world like a mmo, your range of sight isn't infinite. Turning on fog avoids having an infinite range of sight and avoids the player to notice popping up objects or terrain patches from a positive distance test.

One good example may be terrain patching! Setting the patch size too low may decrease the number of rendered vertices but also increases the frustum and distance tests that have to be performed. The result is a lower frame rate.
But I guess that's where octrees come into play...

...damn, seems as if I'm just looking for bad excuses no to implement LOD :D

Share this post


Link to post
Share on other sites
Quote:
Original post by starvinmarvin
Hm, okay. But does it matter actually? Even if you have an infinite world like a mmo, your range of sight isn't infinite. Turning on fog avoids having an infinite range of sight and avoids the player to notice popping up objects or terrain patches from a positive distance test.

It really does depend. I have a base set of data that if rendered at full detail would be around 20 000 000+ triangles. The type of hardware I am aiming at just dies trying to render that amount of data.
Even if taking into account a lowered fog level we are still talking about 4 000 000 triangles. (This is before any other kind of data, such as objects have been added)

The solution is to not implement LOD, give your game a test, and if it doesn't work at high enough frame rates experiment with adding LOD.

Share this post


Link to post
Share on other sites
By today's standards, fog should be considered an ugly hack. A game that shows distant mountains, even if they're nothing more than opaque outlines against the skyline, gives a much better impression of the 'infinite', or at least immense, size of your world than some arbitrary permanent fog on an otherwise bright and sunny day.

My opinion, a game that implements a good LOD system (and by good I mean keeps pop-in to a minimum, none of the current techniques eliminate it), is more visually impressive than one that depends on fog to limit the player's view of the world.

Carmack has always developed engines that dealt with finite/bounded game environments. If that's the kind of game we're talking about, then yes, with today's hardware LOD is likely a lot of wasted effort. Outside that, all the research and techniques developed for LOD are still very useful and not in the least bit wasted effort. Oblivion, and games like it, wouldn't be nearly as visually impressive otherwise.

Share this post


Link to post
Share on other sites
Well In my case since I'm doing fractal worlds, LOD is an absolute requirement and it's one of the first things I worked on. To me fog should be ... well ... fog and nothing else. If you can see distant mountains in real life why can't you see them in a game? Not only that, why can't you walk over and climb those mountains and expect a decent polygon count? This reminds me of when the guys at FUNCOM decided players didn't need a seamless world anymore for AOC. Even though AOC had a lot of other problem's, the main reason I quit playing is because their world felt claustrophobic. I like to think gaming technology should move forwards not backwards. If there is some replacement for LOD that gives you the same capabilities then I might go for that, but I don't want to lose functionality just to make programming easier. Maybe some games with smaller terrain sizes don't need LOD but I think that is certainly not universally true.

Share this post


Link to post
Share on other sites
Quote:
By today's standards, fog should be considered an ugly hack. A game that shows distant mountains, even if they're nothing more than opaque outlines against the skyline, gives a much better impression of the 'infinite', or at least immense, size of your world than some arbitrary permanent fog on an otherwise bright and sunny day.

Except that wouldn't be realistic at all.
There are things in the air, such as water, that make you see things that are far away quite blurry. Fog is just the name we give to that phenomena when there is a lot of water.

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Except that wouldn't be realistic at all.
There are things in the air, such as water, that make you see things that are far away quite blurry. Fog is just the name we give to that phenomena when there is a lot of water.

I don't think he was refering to atmosphearic effects. Even with those you can still see a lot further and more clearly in real life than you can in many games. He was refering to the use of fog to hide the reletvley close in loading of terrain, close in clip planes or inadiquite LOD. WoW is a prime example. That's not to say WoW is a bad game or has particlay bad graphics. It's just that they fog to hide what would otherwise show up.

[Edited by - polypterus on May 4, 2009 7:59:19 PM]

Share this post


Link to post
Share on other sites
Maybe too much is being read into the statement. With the history of PVS/visibility system use, in Quake engines, I wonder if the terrain is broken into blocks, and only relevant blocks are rendered; this could be handled with a simple quad/octree. And, this would have no "sophisticated geometry morphing".

Share this post


Link to post
Share on other sites
Quote:
Original post by polypterus
Quote:
Original post by loufoque
Except that wouldn't be realistic at all.
There are things in the air, such as water, that make you see things that are far away quite blurry. Fog is just the name we give to that phenomena when there is a lot of water.

I don't think he was refering to atmosphearic effects. Even with those you can still see a lot further and more clearly in real life than you can in many games. He was refering to the use of fog to hide the reletvley close in loading of terrain, close in clip planes or inadiquite LOD. WoW is a prime example. That's not to say WoW is a bad game or has particlay bad graphics. It's just that they fog to hide what would otherwise show up a


Anyhow, I never heard people who play WoW saying "I wish I could see further!". Honestly, which game needs an infinite view of the terrain? Flight simulators maybe or terrains which are quite flat with no objects on it and then in 10km distance there's a huge mountain.

It's not that I don't want to implement LOD techniques, but I can't find any paper or tutorial which doesn't require a Master in Mathematics (a bit overdone). Plus: For now I'm using terrain patches and each patch uses VBOs and index arrays. I don't believe updating those every frame for CLOD can be considered as being FAST.

Share this post


Link to post
Share on other sites
Quote:
Original post by starvinmarvin
Anyhow, I never heard people who play WoW saying "I wish I could see further!". Honestly, which game needs an infinite view of the terrain? Flight simulators maybe or terrains which are quite flat with no objects on it and then in 10km distance there's a huge mountain.

It's not that I don't want to implement LOD techniques, but I can't find any paper or tutorial which doesn't require a Master in Mathematics (a bit overdone). Plus: For now I'm using terrain patches and each patch uses VBOs and index arrays. I don't believe updating those every frame for CLOD can be considered as being FAST.


Again WoW *IS* a very good game. I was just using it as an example of a game that uses fog to hide stuff moving into the foreground. I played Everquest (another good game) for years and I didn't hear complaints about the world being chopped up into zones. Yet now if I have to go back I find it annoying.

If you don't think you want or need CLOD that's up to you. I'm just saying the technique is still valuable. Also it's really not has hard as you might think. I don't have a Masters in Mathematics or any degree at all and I didn't have too much problem with it. Your problem may be you're looking at "papers". In my view books are still often a better resource than the web for a lot of this kind of stuff. "Focus on 3D terrain programming" and "Real-Time 3D Terrain Engines using C++ and DirectX9" are fairly good sources.

But again, if you don't feel you need it for your application then maybe you don't. I was just arguing against any notion that it's never needed. My application could not work without it.

Share this post


Link to post
Share on other sites
My view:

Quote:
Original post by starvinmarvin
What I mean is: Wouldn't the computation for real-time LODing in a terrain eat more CPU power than just rendering full detailed visible parts of the terrain on todays GPUs?


1) You check the object's distance (and there are far fewer models than triangles) and do some kind of table lookup to select a model. That's a tiny amount of processing power. Of course, for terrain we're talking about something much more complicated (because of morphing), so maybe you don't want to bother with that.

2) We're worried here more about taking things off the GPU rather than the CPU, because that frees up GPU resources for other things, while the CPU is probably nowhere near being overloaded yet.

3) The less effort you put into rendering distant models, the more effort you can put into rendering close models - so in a sense, LODing will always be necessary, until we get to the point where we can afford models so detailed that each polygon is subpixel size at point-blank range.

Quote:
It's pretty fast, even when rendering huge terrains. Is LODing worth the pain and worth to throw all that what I've done so far away?


If you've designed things well, LODing shouldn't require you to "throw away" much (perhaps not anything) of your existing work.

If your game performs well enough for you, then it performs well enough for you; optimization is only worthwhile when it's deemed necessary. If you don't have the resources to take advantage of LODing (i.e. don't have the time to make the more detailed models that you'll now be able to draw in the foreground with the same performance), then don't bother, of course. Although it might allow you to increase your draw distance instead :)

Share this post


Link to post
Share on other sites
I think a good terrain system pretty much requires some form of LOD, doesn't need to be anything complicated though, ChunkedLOD is relatively simple and works very well. Lots of games don't need terrain LOD because their game worlds are small and bounded.

Share this post


Link to post
Share on other sites
It also depends on the kind of game. While coding a flight simulator where you see the whole place, you will barely see a piece of it all in a first person game, because of mountains, houses, other people, Pokémon or whatever there might be. In a first person game I would use a view frustrum and only draw what's in it - depending on the size of the seeable landscape. In a flight simulator I would use LOD to it's fullest [like when you fly above cities or waterfalls or some other expensive things].
For me, I'm coding a 3rd person beat'em up. It will have big areas, and LOD will surely do it's job. What is behind let's say 500m will be less detailed with less animation framerates, poorer textures, less effects and less precise collision detections.

Share this post


Link to post
Share on other sites
If you're looking at a house from far away, you don't need detailed tiles which you won't be able to see anyway.
No need for interpolation for that. If the house is far away, just use a lower polygon model and lower resolution textures.

Share this post


Link to post
Share on other sites

This topic is 3142 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this