Sign in to follow this  

Is LOD() any good?

This topic is 4667 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 learning the very basics of C++. I am asking something very advanced even though i'm still learning things with the console, this is out of curiosity. I believe there is a function called something like "LOD()" wich lowers the detail of a 3d object, so you can speed up the fps of a game. Is it good? or is it recommendable that i model the lower detail models myself and have a set of HIGH/MEDIUM/LOW for each model?

Share this post


Link to post
Share on other sites
To my reckoning it isnt simply one function call but more a phrase used for what u are describing. Depending on an objects distance from the camera, its detail level can be alter on-the-fly. This is done by simply reducing the amount of polygons that make up the model (or whatever). Since obviously at longer distance a model doesn't need to consist of so many polys, it will look the same with a lower level of detail. This also means that u can fit more into a scene.

I'm sure someone can go further than i have with this?

ace

Share this post


Link to post
Share on other sites
I believe you might be thinking of SetLOD(), a DirectX function which sets the level of detail for textures. LOD is much debated and there are many ways of performing polygon cuts. Here are some ideas to help you on your way.

1) Model switching.
This involves manually checking for distance from camera and changing the model to another (pre-made) model with less or more polygons depending on the difference. The downside with this is the often noticeable 'popping' of objects when the switch is made. With careful use of shading and normals, however, this can be much more manageable.

2) Algorythmic LOD.
Much harder to implement and there are many ways to perform the algorythm. This involves rebuilding the model within your code to give dynamic LOD. It takes more processing and a good knowledge of modelling, but the effects speak for themselves.

If there is in fact a dynamic LOD function (OpenGL or DirectX) I would be very interested in learning of it as it would save my game from the 'popping' curse!

Share this post


Link to post
Share on other sites
As ace said, there is no single LOD() function. There two usual methods of dealing with level of detail are to either provide 2 or 3 versions of the model (low/med/high poly count, as you said) and display the lower polygon versions if the model is far from the viewer, or dynamic LOD, which is far more complicated, but saves you from having to make several different versions of your model, and can help with some visual artifacts.
With dynamic LOD, you determine what polygons aren't important to the overal look of the model, and collapse (remove) them - E.g. if there are several flat-ish triangles making up a surface, you might be able to collapse them into 1 or 2 triangles if the model is far away, without much noticable difference.

Edit: Too late. Exactly what Neo Genesis10 said :P

Share this post


Link to post
Share on other sites
The OP I think has been answered already, but I'm kinda interested in dynamic LOD. Let's say instead of writing a complex algorhythm to change the model vertexs and such based on distance and having maybe 100 possible states or so. That would mean when you're changing the model, you'll need to do alot of decision making, comparing the vertex's in 3D space. If this turns out to be a lot of overhead, could there be a way to proceduralize (is that even a word?) the change between different LOD's without any comparing at runtime, without making 100 different versions of that model?

What I'm thinking is basically make 3 versions of the model (high, medium, and low polycount), and assign each model a model_iteration. 0 being high, 50, medium, and 100 low. Make a very complex but visually appealing algorhythm to make the intermediate models, so there are 50 steps between each starting model. Now do comparisons between each step, to and from (so difference between 0 and 1, 1 and 0). The result should be a list of commands of changes to the vertexs/etc between each model iteration. Ideally, you'd remove the overhead of using a complex algo, replace it with the overhead of doing the command lists, saving the memory of having more then 1 model, but have more code that after generated is non-portable, even to other models.

Any thoughts to this? Would this idea work? Too complex, not fast enough?

Share this post


Link to post
Share on other sites
haha, that sounds way too complex to me. I think i'll aim to a future where i only make a High and Low version of the models at most, And hide as many objects as i can to keep the fps high.

Share this post


Link to post
Share on other sites

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