- Home /
Is there a way that I can control the maximum number of Visable Skinned Mesh?
Our team is planning to develop a MMORPG with unity3d.
What is my goal is to limit the number of Visable Skinned Mesh inside the view frustum for performance reason.
Here are my ideas:
Collect visible skinnded meshes with using OnBecameInvisible() / OnBecameVisible() ( it works perfectly as expected )
Using OnPreRender(), I can sort that list by distance. If this list exceeds the maximum limit, I will trun off "renderer.enabled" to hide it.
Using OnPostRender(), I trun on "renderer.enabled" to restore it.
I applied my ideas to the unity.
However, the result was quite stange to me.
If you take a closer look at the Statics, the "Visable Skinned Meshes" is 13 but the rendered result has 80 prefabs on that plane.
I am aware that I can use extra camera distance layers to cull them, but it's not I want. ( Imagine that you are playing a MMORPG which has a same respawn position.)
Last but not least, I try to reuse unity's culling system to save per frame performance and also hope to reuse occlusion results if possible.
Could you tell me any good ideas?
Your answer
Follow this Question
Related Questions
OnBecameInvisible() Error 1 Answer
How do I use OnBecameVisible and OnBecameInvisible? 2 Answers
How to use isVisible or OnBecameInvisible() to detect player offscreen 1 Answer
Onbecomevisable, straight up dosnt work. activates but gameobject is not in camera view? 0 Answers
Rendering beyond solid surface 1 Answer