View Full Version : iphone game question
sephirothsav
04-14-2010, 11:41 PM
Hi gameartisians
I have a doubt that i would like you to help me to understand
I have to deliver a portfolio for a company that make iphone games, and i don`t really know the spec (poly count, texture sizes) of the characters, enviroments, props and all that stuff, as far as i know they work with Unity engine, ad i would really like to know that info to build my portfolio for that company.
If you can help me i really apreciate.
Tnx a lot for the help.
auctane
04-15-2010, 08:52 PM
With Shiva (http://stonetrip.com/) you can push just above 4k tris on screen before you start to see frame rate loss.
24 mb is the texture limit per scene.
Device Limitations
Textures
aspect ratio 1:1, textures have to be square and a power of two (e.g. 8x8, 16x16, 64x64; 64x128 f.i. is bad)
min size 8x8
max size 1024x1024
amount 1 texture plus shadow map or 2 textures, blended by "modulate" and "saturate" only
alpha channel alpha is allowed, but not recommended due to performance reasons, better use masks
normal mapping no
specular mapping no
environment/sphere mapping no
texture clips yes
texture scrolling/scaling modifier accepted
texture filtering mode GPU "default mode" is used (bilinear mipmaped)
material settings ambient-diffuse-emissive-specular-shinyness, and emissive will only act as a constant color not depending on the scene and lights
Shaders
normal mapping no
specular mapping no
environment/sphere mapping no
shadow mapping yes
texture blending "modulate" and "saturate" only, but only if no shadow map is used (2 texture slot limitation)
reflection no, but can be simulated by inverting/mirroring the geometry
refraction no
Dynamic Shadows
no dynamic shadows allowed. fake dynamic shadows with a flat black (transparent) sprite that lies flat on the ground, if needed.
Dynamic Lights
The hardware supports up to 8 dynamic lights, 1-2 per oject is the recommended amount. "receive per vertex" is the only accepted setting.
Environment
fog yes, no restrictions
camera view distance unlimited, but relies on a 16bit z-buffer, so be careful: keep the range as small as possible to avoid Z-fighting
Particle systems
max particle count per scene depends on the screen size of the particles (alpha blending limitations)
max particle count per emitter no more than 256 if you want good performances, but again it depends on the screen size of the particles
Sounds and Music
music length is unlimited, but slow, as it's going to be streamed, better use short sounds (<10s)
sounds per sound bank unlimited
format 16bits, mono, 44100 Hz or less (lesser will be faster)
In Game Video
the current firmware dows not allow to play custom videos inside a game application.
> NEW: S3DAuthoringTool for iPhone version 1.9 allow you to add a startup fullscreen movie (still in a "beta" state).
Number of Polygons and Animation
max polys visible at the same time 7.000 for a gool frame rate, but tested with lot more, and it "works" (don't crash)
max polys per scene limited to 24Mb Texture + Vertex Buffers memory
max poly per object depends on the number of visible objects, but again, "lesser is better"
animation limit per anim bank none
bones count limit "lesser is better" but no limitations (from 0 to 16 is a good value)
bones per vertex limit really try to use 1 or 2, but limited to 4.
Keys and Input
available controls accelerometer, mouse and touch handlers
system reserved home button, side/volume buttons
Misc
Application Size Limit none, applications can be fairly big, >100MiB
Framerate monitor is limited to 60Hz, any fps value >15 is good.
Hope that helps.
sephirothsav
04-15-2010, 11:29 PM
dude I really apreciate your help, tnx a lot :):):)
Still have some questions around but so many tnx :):):)
characters Ive done are like 400 tris for 3G, 800 for 3GS for the first LOD,
a bit less for secondary characters, like 300 and 650 maybe,
and 512 diffuse :lucky:
Lamont
04-16-2010, 01:21 AM
But how many bones in the rig? Was it smooth binded? How many influences per vert?
kageko
04-16-2010, 04:39 AM
according to the research i did just before we started, 7k vertices for static scenes, if you have animated objects, the scene should be below 3.5k verts.
Stick to 128 and 256 textures :)
But how many bones in the rig? Was it smooth binded? How many influences per vert?
I've had good results with averaged 20 bones in a mesh and 2 bones per vertex influence in Unity.
Theoretically, you can have unlimited bones in your mesh, but for every frame, and every bone, the entire vertex list of the skinned mesh gets re-evaluted.
Thus, using a lot of bones is bad for performance.
Unity iPhone is limted to 4 bones per vertex if I recall correctly, but I can't see why anyone would need more then 2 on the iPhone. It's highly unlikely you'll be dealing with a character of over 2k triangles. At that point more bones per vertex becomes interesting.
512² is pushing it on the device though, and I'd recommend 512 only if you really need the detail. Ideally, you should aim for 256² or 128².
Avoid 1k at all cost! Even on a 3GS, a 1k tex is a massive hit to performance.
auctane
04-20-2010, 11:19 AM
512² is pushing it on the device though, and I'd recommend 512 only if you really need the detail. Ideally, you should aim for 256² or 128².
Avoid 1k at all cost! Even on a 3GS, a 1k tex is a massive hit to performance.
The iPhone will load a 1k texture, I personally haven't done it yet, but it is going to be something brought up in some stress tests we will be doing over the next couple months. I am guessing the suggestion to not use them is directed at characters? I think if you can get all of your props in a scene on to a 1k sheet you would have quicker loading than with 4 512 sheets.
For characters - 256 is where you want to be depending on the importance of the character, and how close the player will get to them.
Then there is the iPad...
Sandbag
04-20-2010, 05:53 PM
Someone correct me if I'm wrong, but I think it's actually much worse for streaming to have one large texture, as then you cant do any mip mapping or lod when everything is on one texture.
I'm also curious, does the avoid 1024s statement apply to something like a skybox or large ground plane as well?
I'm curious to see what all of these texture resolutions look like at iPhone screen resolution/ppi, to see how large of a texture is actually "useful" as well.
I've used 1k's on several occasions. Heck, most of the characters for Infest Station have sprite sheets at 1k.
1k's take quite a bit to load, since they're heavy resource-wise. Memory-wise, I can't tell if they're more efficient then 4 512's as I've never done a stress test like that.
Let me know the results for that test! :)
Mapping everything on a 1k is a fairly solid idea if all those elements are on screen as well. If you've got only one asset displayed that's using a fraction of that 1k, that 1k gets uploaded and streamed entirely for just that asset. And that's just plain resource-hoggin' madness.
Needless to say, 1k is the hardware limit from the iPhone. If you really, really, really need the detail or desperately need to save space, use them, otherwise don't.
robinb
04-21-2010, 07:02 AM
We found we got far better performance by atlasing all the environment textures onto a few 1024s.
The textures themselves were still low res (64x64 on average) but they were tiled a few times in the atlas. This was way better in performance terms than having hundreds of 64s streaming in and out. I believe the same was true of other objects and vehicles.
We had atlases for a few blocks worth of buildings and it streamed those in as you got to places. We tried to avoid situations where four atlases needed to be read at once (four blocks coming together at one corner). I believe we did manage to arrange them so that never happened.
Sadly that did mean I and a couple of other guys had to go over a whole city's worth of buildings and make sure the UVs were within range and cut them up if they weren't. Sob.
The screen is only little and fairly low res, so there's no point using high res textures. I don't think any of ours were above 128 but then it was a high camera looking down.
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.