I am looking to reduce FPS for my game. it’s a large building with a lot of rooms on different floors. I noticed that in my stats that the “used texture” count is actually far more that what is in camera view. and far from the player!
and since it’s all in one scene. It seems i have been slowly loosing FPS as I add areas to my building even though the rooms i add are far from what the player sees till a later time. mostly walls and things with no script attached.
I would assume this is a somewhat common problem and was wondering if there was a standard setup for this. obviously i don’t want the game engine considering/rendering textures/lights/objects on a different floor.
is there some kind of setting somewhere for rendering distance?
would it be common practice to turn stuff on and off manually as my player leaves rooms / floors?
such as turn of lights? disable renderers? reduce quality of distant textures? possibly temporarily disable game objects ?
would my efforts even be worth it for FPS?
any advice / comments would be helpful. Thanks.
Try using the Clipping Panes property on your main camera. If you lower the Far clipping pane distance, only things closer will be rendered.
You meant INCREASE the amount of Frames Per Second (Fps) for your game, right? Otherwise you would be contradicting yourself.
Anyway, YES there are A LOT of ways to do this. As @Ganon_Player said, Cameras have something called “Clipping Planes”. To adjust it, just select your Player’s main camera, and on the Inspector, look for “Clipping Planes” on the Camera component of your camera.
If you want to equip your character with guns or anything that will be extremely close to him, and you don’t want said object to be kinda invisible when it gets too near, set NEAR to 0.01.
The FAR variable is how far can your Camera render things. If you are working on a closed environment, such as a building, reducing the FAR variable to the lowest amount possible (Just enough so the camera will render as far as the environment’s limits goes) is the best choice to improve your game’s overall performance. If you are in an open environment, such as a forest, you may look for LOD Group Also make sure the Occlusion Culling checkbox is checked on your Camera to make sure it only renders what is on it’s “line of sight/vision”, not everything around it.
There are several other things you can do, such as something you mentioned yourself, which is disabling objects when you aren’t in a specified room, and enabling them when you are near it.
I hope this helped to clarify everything, Good Luck! =]