I'm wondering what methods people use for Level of Detail, and how they go about it for games.
Information seems really scarce on this subject, but maybe that's because it is straight forward!
I come form a flight sim background, and we have two methods:
Replacment:
where the whole model is replaced each time for a higher resolution version, up to three iterations in a hi res case.
Addative
where the core shape of the model stays in range, but as you get closer, increasingly more bits of detail fade in.
Is this the same for games?
And how does this effect low poly modelling and texturing?
Replies
Depending on the view distance you pick the most appropriate.Things next to you will be in high res and things far away are low res.
So it´s more like the Addative approach you described.
Most engines can do that on the fly(if the model has different lod´s exported)
The same goes for textures as well.
Basically it´s the same as in your flight sims.
I always thought the LODs were set up in the the engine, but from what you said, it sounds like they can be set up (at least partially) in the modelling ap.
Is this correct? if so how would I go about this (I use Max)
The basic methodology is to start with the highest-res mesh, and remove every other edge loop, then fix up stretched UVs. You'll need to keep the edges that are along UV seams, for the most part.
You may also want to balloon the lower LODs so their volume matches the original more closely.
Some more info
http://wiki.polycount.com/LevelOfDetail
Depending on what you do, you should do them by hand.But in most cases you can get of with automatic methods.
Neox once said that the Atangeo Balancer does a rather good job at doing LOD´s while maintaining normals and form.
Eric, somehow I missed both of those threads when I was searching!!
So...
To make a lower LOD, just remove edge loops and keep the UVs lined up as best as possible. Removing even more loops for even lower LODs. Or maybe use a poly reducing bit of software (particularly for organics) to make them.
In most cases you are using the same texture, so no action required here. On very low LODs you can remove all but the colour map.
You can use the 3DS max Level of Detail in the Utilities panel to test your LODs out.
So how do I get the LODs out of Max?
Do I just export them out as normal (a separate model for each LOD)and set the LODs (ranges, and textures etc)up in the engine?
Or do they have to be exported out in some special way? Maybe a format that exports them out in one go (instead of separate models), that the engine then reads as the LODs are set up and ready to go automatically? - I assume this isn't correct, but I need to ask!
Something to note... the fading/morphing kind of LOD switching method is prettier but also more expensive than the "popping" one, because the vertices need to store connectivity info so their shapes can be blended to one another (increasing the memory cost), and the fading in/out requires extra rendering time too (possibly decreasing framerate).
It kind of looks bad on terrain though, since things kind of melt up/down. I remember Battlefield 2 had this, really evident when you fly a jet around.
The problem main in battlefield 2 was that you already had a great distance and that you where flying relatively fast which made it obvious.
For games where you walk on the ground with moderate speed, you can get away with morphing without obvious popping.
And if its best to do it in Max, how do I do that? Is it a case of using the LOD utility and exporting to the FBX 2011 format?
Or is there a better way?
(I´m also not sure if that works with non static meshes)
So then I guess its just a matter of how complicated the model is and how its been built, as to whether you replace the whole model in an LOD or you replace/remove individual parts.
Is this correct?
LOD switching is often done using distance, but there are other metircs too, like how fast the camera is moving (if you're racing in a car, most of the trees can be very simple LODs because you can't tell they're simpler), how fast the object itself is moving, etc.
In flight sim world, we pretty much put everything on LODs. In fact we LOD the Hell out of stuff; a building may have 3 LODs, but then the chimney and windows etc might also have their own LODs too!
So reading between the lines here, does this mean that only some things will be LOD'd? As mentioned above for instance, a particulary heavy object?
But something simpler, like a prop or something will not be LOD'd?
And following on from this train of thought...
If not everything has an LOD, how are objects controlled/removed that can no longer be seen? Is there a top level control that removes these objects in the engine?
it more likely that your game is fill rate bound or has too much over head from too many drawcalls !
profile your game first before jumping to conclusion on how to optimize it !
unless of course this is for an art test and they specifically asked for lods in that case disregard me ^^
warby's right though, profile your game before spending time on it. LODs are mostly about saving transform cost. They can also reduce fillrate though, like if you swap in an LOD with a simpler shader and fewer draw calls, but since the model is usually small on the screen when it gets swapped (and since it incurs additional drawcalls simply to be rendered in the first place!), I think this doesn't really give you much bang for the buck.
Well the way our sims work is to use LODs for everything within the airport, the only thing that is ever culled is the airport as a whole.
So taking things down to a basic, non technical level then, it seems that LODs are not something I necessarily need to be concerned about. They seem to be for certain circumstances (hi poly and or textures/shaders etc) as using LODs has it draw backs too.
In a lot of cases the objects are just culled at a distance or size by the engine.
I am making assumptions here, but is this more or less correct?
http://www.ericchadwick.com/examples/provost/byf1.html
This will clear up why and when lod´s should be used.
This is information you should probably always keep in mind.