- Home /
Low FPS any ideas ?
Hey i have very low fps in my game, it's quite big !! but i did LOD's for all objects and also occlusion culling and visualization !
I think its the terrain causing that, or maybe it's just my Pc ?
So what do you think ?
see this photo of the game stats
http://cdn.top4top.co/i_4419566d4d1.jpg
Thanks,
You need to provide more information than you have. Have you tried using the profiler?
Here you go : @Zionmoose http://cdn.top4top.co/i_28ac6155541.jpg
You should Click on "Deep Profile", it will give you a deeper insight as to where your problem exists, from Scripts to $$anonymous$$aterials to Sprites and everything in between.
2,700 shadow casters?! You might want to consider baking your lights...
Well i'm using a day/night cycle ! is that possible ? to bake ?
You can clearly see from your profiler that your biggest lag is in rendering your scene. I'd normally put no more than a handful of realtime shadows in a scene; 2,700 is insane. For day/night, bake the scene lights twice and then blend between the two lightmaps in a shader.
Do you have marked all objects that will not change as Static?
Answer by Whiteleaf · Oct 26, 2015 at 06:26 PM
As Tanoshimi said, it's probably the shadow casting. 2.7k is insane and overkill! 1 thing you could try to do is disable shadow casting on less important objects, such as small props, medium props, etc. You could also disable shadow casting on certain objects when the player is a certain distance away. Another thing is that if you have image effects that might be another major part in it. Your cpu/gpu is completely overwhelmed by the things that the camera has to render.
How can i disable shadow casting for certain objects ? By script ??
each object should have a "$$anonymous$$esh Renderer" component, and a little dropdown menu for casting shadows. If you put it to "Off" then it won't cast shadows.
Oh ok thanks man, Another question how many shadow cast i should have to make my game run at 50-60fps ? @whiteleaf
It depends on several factors. For example, one cluster of factors is your hardware. It'll vary depending on the system. In your current case, your CPU can't handle rendering. So getting a better graphics card wouldn't help (unless your CPU is waiting for the GPU). If the issue is memory heavy, perhaps getting faster memory sticks, faster bus, faster CPU or bigger cache can help.
Now of course I am not telling you the solution is to upgrade your PC. But you can't expect anyone to be able to give an answer how many shadow casters are needed for 50-60 fps because there isn't any target system to compare it with! 60 fps on a old $$anonymous$$$$anonymous$$X? 60 fps on the latest monster machine? The number of shadow casters will vary :)
But looking at your profiling graph, even if you nuked rendering completely (just rendering a skybox), your "scripts", "physics" and "other" already add up to > 16 ms which is the 60 fps benchmark. There isn't much wiggle room on your system for any kind of graphics at all to maintain 50-60 fps.
Your answer
Follow this Question
Related Questions
Parts of terrain going invisible after building the game and changing ingame resolution 0 Answers
Unity terrain trees dispear in front of me way to fast 1 Answer
Unity terrain grass extremely weird 0 Answers
Custom terrain mesh - loss of LOD worth it if trees are occluded with occlusion culling? 0 Answers