Simple LOD (more like hide and reveal) for small detail objects in a game

I know there is the new occlusion rendering thing coming out, where it will not render instances that are hidden by other instances. However I feel a simple system to hide extra detail instances that are not really close to the player would help out a lot.

So, for instance if I have several houses in a city, and only when you are close to a house, you might have a newspaper in the front lawn, or milk bottles by the door, a few flowers in a window sill, but when the player is not very near the house, these items will be removed, somehow from the map.

Does anyone know of any simple solution for this? Or even just any ideas on how I would go about this?

I would think the extra details would need to be client side only.
Also, I would think the server would need to hold the mesh initially, considering what if there is a gem mine in a cave and it has all sorts of little details like, gems, insects, old lanterns, rocks, etcā€¦ If a player never goes into the cave, I wouldnā€™t want to burden their client with those meshes.

Unless, the meshes are not actually loaded into memory unless they are placed in the world, then maybe replicated storage would word, if its just like a placeholder, until the instance is used.

Any info helps, thanks.

I think a better question to ask yourself is if this is even necessary. ROBLOX already handles culling and LOD for meshes to begin with, so why reinvent the wheel?

Premature optimization can be a huge time sink and introduce readability problems into your codebase. Before you deem this necessary, try running just with the engineā€™s culling/LOD capabilities and see if thereā€™s even a point in writing your own LOD system.

1 Like

Not really trying to do a LOD system, in the sense that Roblox will auto generate LOD for objects farther away, I was more wanting to remove objects that are at a certain distance.

I donā€™t really have a ā€˜needā€™ to do this other than, I am just wanting to see ā€˜whatā€™ I can do in this regard.

More like an experiment that anything practical.

I would just like to devise a system and play with it, and just see how far I can go with it.

MrChickenRocket mentions this in his post about optimization (chapter 4):

(itā€™s probably the best post about optimization on the forums so I recommend reading all of it)

1 Like

Thanks so much. I am terrible about finding resources online about things. Thanks again.

1 Like