- Home /
Is it possible to get above 30 FPS on an iOS device?
The title pretty much explains it all. I am using a little framerate GUI counter on-screen to get a basic idea of the framerate and it seems to be capped at 30 FPS even when there's nothing really happening. My game is still in a very early prototype, so there isn't much that should be affecting performance.
I seem to recall reading somewhere on the site that frametime on iOS devices is locked to multiples of 60Hz (.0166 sec), so does that mean the framerate is locked to either 60, 30, or 20 FPS?
Thanks! I'm not nearly far enough along to start tuning everything, but I appreciate the details on what kFPS does.
24 FPS is terrible. To say you won't notice 24 FPS vs 60 is ludicrous.
Answer by runonthespot · Nov 04, 2010 at 03:13 PM
Yes- when you compile to xcode, look in the AppController.mm- there's a variable kFPS.
Set this to, say 60.
It's good practice I think to set it as high, so you have room to lower the cap.
Thereafter, be aware that 60fps games eat batteries for breakfast :)
thanks for the Info, did not know about that and was assu$$anonymous$$g that the drop of fps was due to hardware limitations! silly, it should be in bold in the doc, cause this is a source of frustration to try getting higher framerate in that situation...
Awesome! I was wondering why my game couldn't run at a higher frame rate when it clearly shouldn't be taxing the system that much. Thanks so much for the info!
Now, why isn't this something that can be configured in the build settings in the editor? :-/
This is working fine for iPad but in iPod it is not working.... Can anyone tell why it is not working for iPod.
Answer by numberkruncher · Feb 25, 2012 at 03:51 AM
The latest version of Unity allows this to be configured more easily using [Application.targetFrameRate][1]
from a script.
[1]: http://unity3d.com/support/documentation/ScriptReference/Application-targetFrameRate.html
Answer by franky303 · Sep 18, 2012 at 06:24 PM
Yes, i can confirm this. Application.targetFrameRate = 60; worked for me on iOS (iPad 3) to raise the default limit of 30 FPS to 60 FPS ....
Where exactly does one set Application.targetFrameRate = 60;? I'm now running 3.5.3 and its not clear where to set this ... :-/
I assume in a script but does it matter which one or where in Unity?
@jococo This can be set using a script. Simply save the following into the script Assets/SceneController.cs
and then attach it to an empty game object in your scene (name it "Scene Controller"). You could save this game object as a prefab for easy inclusion into each of your scenes. http://pastebin.com/HNJ4Y3LG
Answer by Rafes · Dec 05, 2012 at 05:23 PM
This isn't a direct answer, but I hope it helps to put frame rate in perspective:
Film has been 24 frames per second for a long time. US TV broadcasts 29.98, PAL, used outside the US is usually 25. Digital (generally 720p or 1080p) can be either 24 or 25 FPS, though I find 24 is becoming the standard since it matches film.
The human eye is fooled by as little as 12 frames per-second, which is what the old cartoons would use for just this reason. They could draw less frames and still achieve smooth motion.
When dealing in 3D (stereoscopic), generally the frame rate is doubled to get alternating frames for each eye (depends on the viewing system).
As long as you are over 24 FPS you shouldn't have anything to worry about. Anything over 30 is arguably a waste of processing power. A lot of people find super high frame rates creepy in live action. It can be nice for games but again, this is of diminishing value to quality when compared to processing (and I hear battery) power.
12 fps isn't nearly enough to achieve smooth motion, and the only reason 24 fps is barely adequate for films is because of motion blur, which you're almost certainly not going to have in mobile games (too intensive). 30 is not really good enough, depending on the game...60 is the $$anonymous$$imum for action games, and 120 is better (but impossible on iOS devices since the screen is vsynced to 60Hz, so your choices are 60/30/20/etc.). The only reason people find high frame rates "creepy" for live action is because of decades of seeing standard film frame rates; once you get used to better, 24fps looks slow and stuttery.
@Eric5h5 HFR live-action films look creepy because shooting at 48 FPS in bright studio lighting yields less motion blur than what our eyes would see if we were in the perceiving lighting (e.g. a dim living room). A great example of this is The Hobbit: The Battle of the Five Armies— the nighttime scenes look surreal as hell, but the daytime scenes look smooth and wonderful. The creepiness exists because most studios have decided not to add the proper amount of motion blur back in in post-processing. The best explanation I have for why film studios are cutting corners here is that HFR currently sells tickets as a gimmick; if it looked completely natural, moviegoers would start complaining that they paid for HFR but it looks like a normal 24 FPS film.
You're forgetting about motion blur. The human eye is fooled at 24 FPS and even down to 12 FPS when there's motion blur present that matches what our eyes would see in the perceived lighting of the on-screen environment (little blur for broad-daylight scenes; lots for indoor/night).
Adding motion blur to games, however, is prohibitively expensive. Upping the framerate to a point where our eyes don't need motion blur to fool them (generally considered to be around 60 FPS) is a much-less CPU-expensive solution.
$$anonymous$$otion blur only helps for some things. For example, watch a s$$anonymous$$dy camera pan that was shot at 24fps; it's stuttery as hell.
60 FPS is a good target for most applications on the iPhone, things will not look smooth otherwise and hitches should also be avoided. (the iPhone screen is vSync-ed, which means that if a frame time goes even a bit over 16 ms a frame is dropped and the user will perceive a hitch) The human eye does not view with a shutter sort of mechanism like a camera, but is more a continuous stream of information so without motion blur stuttering will be perceived.