How do you make an lod?

Hi, i have noticed that most projects use LOD’s. Is it all vision based or don’t the far parts exist at all?

I do not think that most project use LOD.
It would be good but it is not that easy to implement.
Because…

…you have to do that by yourself. There is no auto-LOD :(.

The 2.49 APIcontains an example of a simple 3-level LOD.
You can search through the Game Engine Resource forum to find better implementations.

BTW: do not confuse LOD with culling :wink: even if culling is a special kind of LOD.

It is widely used for its convenience!

I did a project once that had a LOD script done using python but it can be done using logic bricks though this may be quite taxing on your frame rate. As Monster says there is no easy way. I made 3 different meshes with varying levels of detail for each object and then depending on how far the object is from the camera I would use the change mesh actuator to swap between them. I will be honest with you; for the work it was to implement, I didn’t notice a huge improvement in the frame rate so I haven’t really used it in any games since then.

This have to be done right in the core of scene graph to be as efficient as possible. Like culling the most important part is to automatic detect the objects that have to be checked. Don’t waste any LOD calculating time on objects that are behind the camera or outside of the view frustum. The most boost you will get with a raw c++ implementation and further you can also switch texture size to take down the memory load from GPU.

This is a must have feature IMHO. If this is not done in the near future I will definitive look into it.

Here is a python implementation based on a kd-tree.



But in C++ it would even work hundreds of times faster or you could have more objects closer together or make the radius bigger…

best regards,
moerdn