So how much texture resolution can you use in an iPad app? Like, can you use ten 2048x2048 texture maps? Or twenty 2048x2048 maps? Or thirty 1024x1024 maps?
Also, I understand that the iPad does support 2048x2048 textures, correct? Would then compacting as much texture data onto fewer 2048x2048 texture maps provide better performance than having 16 or so 512x512 texture maps?
Also, how much poly count can an iPad handle? The unity docs say no more than 10k tris on screen, but is there any limit on an entire level?
Also what is the ideal triangle count, per mesh for the iPad? Unity doc says 1500-4000 for meshes, is this true for iPad as well?
Well textures and vertices aren’t the only things processed and held in memory. What I mean is that if you have a bunch of skinned meshes then your vertices limit is going to be much lower. Also if you have a lot of sound you won’t be able to load as many textures.
I’ve got a lot of small textures, so it is hard to say what the limit is. I can’t really load in more than 15 MB of textures before it becomes unstable though (I have about 6Mb of sound and 5Mb of meshes). I’m not certain how much memory each 1024 X 1024 texture takes. Unity says every 1024 X 1024 compressed texture takes 0.5Mb, but I suspect it takes up at least twice that amount of memory on the device.
My scenes average around 10K tris and I don’t hit any OpenGL bottle necks.
Basically my experience of the iPad was that I had a lot less memory than I thought I had. Although I could stuff a lot more textures and sounds into the scene and it would run fine, when it came to loading another scene the game would crash. (also make sure you have blank scenes in between the scenes with the actual content if you are high on memory)
My advice then is keep every scene well within the limits. I would suggest that you should try to work with 10 or so 1024 X 1024 textures.
This is a tricky question. I notice performance decreases when I start using more than 1024x1024 on the iPad. To be safe, I always use the smallest map I can get away with. If it’s something large then I might have to throw a 1024 map on it. Or if it is something that’s always close to the camera. It really comes down to building it on the device and play testing. I noticed you really can add as many poly’s as you want but the density of the poly’s on camera is really where it starts chugging. To the best of my tests with 256 size texture maps my IPad can only smoothly handle ‘safely’ 5,000 poly’s on camera at a time for the length of the view of the camera, but more than 10,000 and it’s a gauranteed chug fest. Of course with occlusion culling and some fancy level of detail scripting (creating a few lower poly models depending on distance ) you can get away with the illusion of more. So depending on how good at scripting you are and the tools you use the sky really is the limit with the right tricks of giving the illusion of more stuff in the scene. Hope that helps.
You can go with more than 50000 poly, iPad doesn’t slow. The problem is OpenGL 2.0 and realtme lights, and also opacity (trees)
I used big scene on iPad with almost 25fps. If you want to use realtime lights and alpha, use OpenGL 1.0, and lots of poly. For the textures I use 512k and one or two 1024k.
Also you have to consider the lighting and shaders. Unity finally added some unlit shaders to the default selection and they are really fast, especially with transparency. I guess the key takeaway from this topic is that pondering about maximum tri-counts is always a bad approach, because it really depends on how expensive your polys are to draw. Conversely memory limit is just how much stuff other than textures you have in the game and how you go about loading/unloading all of that.
That said, I think the different numbers in this thread give a very nice indication of the scale of performance under different conditions.
I had the question: If my scene is only 3K or less, possibly even only 1K, but I have between 700 and 1500 draw calls, will the iPhone 4 or iPad 1Gen be able to cope? Very few polys, 5 to 10 materials in the entire scene and an insane draw count… will it be able to cope with the draw counts if I keep the geometry to a minimum…
So I tried it. Actually, i didn’t realise I had the phone plugged in and when the build was successful and showed it is playing the game on the iPhone, I followed the cable and noticed my wife was busy charging her iPhone 3G… Yeah, this entire thing was now going to be playing on an iPhone 3G…Yeah, like that is gonna happen!
And believe you me my surprise when it ran smoothly as hell!!! I couldn’t believe it! Until I realised that Unity was batching the 2 poly models. Thus the draw calls are reduced but I no longer have access to the individual grid positions as my game requires… It was still a surprise to see it running on an iPhone 3, though!
So now I’m gonna go remove the static check mark on the model and see what happens then…
I removed the static check box and loaded the game onto the iPad and it stuttered like mad. In the editor, click and drag was smoooooth. On the iPad (I added an onscreen label to show me what the game is busy doing at that moment) I could see that a click took about a second to register and as such a drag was very jerky and would continue even after you had already taken your finger off the screen.
As such, you have no control over the game and it is unplayable. The results were thus: “The iPad won’t bomb out from having 1614 draw calls but it certainly will struggle to keep up”
Just now, though, I made another SHOCKING discovery. Currently I have 4 directional lights in my scene. I do this so that the models will be lit no matter what direction you are inspecting them from. So I turned off 3 of the lights and my draw calls were reduced from 1614 to 40 !!!Funny enough, though, now that I no longer mark the models as static, now I get up to 554 batches in the Statistics while running in the editor… Not entire sure I understand why I get automatic batching when I am not running on iOS and why non-static meshes are batched but hey, 40 draw calls! I’ll forgive any confusion and just be happy.
Abloodymazing!!! So now I have to figure out who to make my models lit using only 1 light… Tricky. So I figure during edit mode I’d create my materials using Self illuminated bumped specular rather than just bumped specular and voila, 1614 draw calls down to 40. Then I can turn off the last light also… Wonder who THAT will perform…
Unfortunately, this little experiment is over for now as I have some actual work that I need to do but this will definitely be revisited later.
So yeah, anyways, to recap: It won’t crash, but it is not a viable option to use 1K ploys with 1600 draw calls. Now we know.