well said. This is exactly how i feel.
Practice makes perfect, when I started, which was in the 3G days, I noticed certain limitations… I still set limitations based on that experience to other artists.
We work to a budget of 15,000 triangles total for a scene, aim for 10 drawcalls maximum, work to 4 large (compressed) textures each, one uncompressed but small and managable one for interface… Keep ram clean, keep assets as small as possible, avoid dynamic allocation… Just good habits and sticking to them.
And you can’t have 15,000 animated triangles… And you can’t show them all at once, maybe only 3000 onscreen at once, and the less animated the better… With the right art, you can make very few triangles look very good
Oh, and Retina… That was a nice kick in the teeth. More CPU but GPU unchanged? Overdraw became a bit of death
I’ve found the character controller to be a bit expensive for the Iphone4G. I prefer to use it for the main character, as it’s a very solid solution. Usually I avoid having more of two of them active at the same time, so I go for other solutions like kinematic rigidbodies for enemies. If you don’t care about colliding with enemies you could skip physics on them altogether and just do a raycast to lock them to the ground.
I’d suggest you do a test where you remove the charactercontroller from your characters, comment out references to it, and let them otherwise do what they usually do only now they’re just floating along vectors. That might give you a huge boost on the Iphone4 and 3GS.
If that’s the main bottleneck of course. If it is, try adding it back to the player, check framerate, and see if you can do something simpler for the enemies.
I haven’t tried running a ragdoll on the iphone, but I’d assume it’s something to watch out for too. Maybe skip a lot of joints in the body, limit amounts of simultaneous ragdolls, have backupanimations for the rest.
You are CPU bound, the CPU on the 3GS is a lot weaker than the iPad one, so you can break the framerate easily if you do some heavy stuff. Character controllers are pretty CPU intensive and look out for the number of bones in the animated models. Ragdoll can be pretty intensive too.
Your bottlenecks are not related to the number of vertices on screen or the graphic complexity of the scene, you can probably throw a lot more on screen, but watch out the physics, animation and scripts. Optimize everything.
samshosho, with Unity Pro and its new Umbra Occlusion Culling + Dynamic and Static Batching, correct use of FOV and so the regular FRUSTUM CULLING proficiently set up make seem many games incredible on the mobile.
That said, I’m now testing our apps on iPad2 and HTC desire HD and I must say I never seen 3rd generation graphics and these number of tris (30k-100k) going so good !
I remember when we first designed Mad O Ball 3D targeting for the iPod2G and iPhone3G, was a bit of a nightmare.
The maxium poly count to run smooth was 7k-10k triangles at that time and the CPU got easily stucked.
Imagine to make a lot of work in making colliders not as mesh colliders (one click in the editor) but with many box colliders, just in the right place for instance. This will be requiring a lot of resources (human) in level building and testing, but will give you the best performance results!
For not to mention the texture atlas to reduce the draw calls and so forth.
Nowaday I won’t even target for these devices, so I’m happier, because, even taking care of those 1001 little things, that will make my scene lighter, I still can now use 3rd gen shaders, and much more triangles !
For sure, when our app will be ready, the iPhone3GS will be the lower device around (at least in USA/EU).
This 800k polies city(building have sidewalks, doors, windows) would kill my Android Dual Core phone if taken from this angulation.
EG: I could compile and ran smoothly over 20 frame per second because I had a 50 FOV fps camera going around seeing from the floor.
Another consideration is exactly how hard you’re trying to get a good look and decent frame rate. I push for 60fps, and will cull, optimize or cut until I can get pretty close to it I find aiming for 60 on the gen 4 ipod is a pretty good benchmark. Even if you fall slighly short, you’ll get 60 on a 3GS (quarter of the pixels to draw) and 60 on a 4S/iPad2
That’s right.
That’s exactly what we are doing as benchmarks.
But we are good with 30fps if stable.
We are not able to go over 20-15fps on ipod4 at the moment, 30 stable on the iPad2, we will probably tweak the rendering accordingly. Less Frustum and less stuff for the iPod.