Manage many objects on screen

I’m working on a game where i have a randomally generated galaxy in my scene. The amount of objects in the scene varies between 10000-20000. What i what is a way to more increase my overall fps in this scene. I’ve tried different LOD managers to get the farthest objects lowered in quality. But all of the managers only works with pre-made scenes (i think) and since my scenes are generated randomally they dont work.

The objects are currently being represented by a Sphere(the builtin kind) and i’m wondering if there is some way to optimize my scene in some way to increase the overall fps.
I made a unsuccessful attempt to use Sprite Manager, but my fps remained the same.

Do you have any suggestions?

Have a look at the documentation of Camera.layerCullDistances. This does exactly what you want. However, you have to be friendly with the layers.

Edit: Hum… Forget about this if you want all the objects to appear on the screen. Sorry, I didn’t catch the point :-/.

Do you really need 10,000 - 20,000 objects in the scene? I’d say that’s the place to start optimizing.

Jeff

QFT

Yes i really need that many objects, since it’s a galaxy we are talking about here. And for being a galaxy 10000-20000 is actually a pretty small one.

You could use a particle system. You’d be limited to about 16000 particles in one emitter, but you could just use two.

–Eric

You could try to implement imposters for far objects… simple textures of the object always facing camera. Update these textures only if defined amout of view angle change.
That is a trade of a hole object render to a simple texture quad.