- Home /
getting back my fps
hi there!
so i am fighting with iphone framerate, which is going down to 4fps. i have reduced the set to 5 draw calls, but i have about 40 gameobjects floating around, with five different materials. most of the objects are capsules (which is the bottleneck, i think).
how could I get back more fps?
thx!
Answer by Jessy · Jan 24, 2011 at 07:30 PM
Model a lower-poly capsule. The stock one in Unity is not suitable for that number of capsules on an iPhone.
yea, thats what I thought, too. hm.. lets see if this will change the situation... thx!
Answer by Wolfram · Jan 24, 2011 at 08:16 PM
It's not just the draw calls that one has to take care of. If your objects are small enough, you can have smooth graphics performance, even with more than 100 draw calls (tested on iPad). Light sources are extremely slow, especially non-directional ones. But I guess you already got rid of them, since you have 5 materials and 5 draw calls.
More importantly, the iPad graphics appears to be severely fill-limited (so iPhone probably has a similar problem, although the resolution is much smaller). This means, rendering many layers of large or even fullscreen objects will slow down things considerably. For debugging, you can switch from "RGB" to "Overdraw" in the Scene tab. This shows how many layers of polygons you are rendering on top of each other in vain (since only the ones in the foreground are actually visible (unless you use transparency)). If you see many bright areas, you are wasting rendering performance (although depending on your scene, sometimes this can't be helped). Use Occlusion Culling.
thanx, but the objects does not cover each other a lot...
hm, unfort. the statistics window tells me some different number off drwa calls as my script (I found online)... seems like every new gamobject added adds a new draw call allthough the all use the same material (when I change a color in the scene view of the running game every object with the same material is changing color, too) and all capsules have the same parent empty game object. seems that i misunderstood how to use the batching...
Answer by DaveA · Jan 24, 2011 at 07:34 PM
I've found this to be very helpful My mobile game has many more objects than that and runs very smooth, thanks to tips here:
http://unity3d.com/support/documentation/Manual/iphone-performance.html
hey, thanx! unfort. I knew this page and checked it before...