Well guys I have a few questions just to confirm what I’ve understood out of this atlas\combine mesh.
1 - As far as I understood, you get a performance gain not by creating one unique texture for multiple objects, but for combining multiple meshes into one… atlas just makes this possible , right ?
2 - If (lastquestion==true) { (heheh) Then atlasing textures is only something to be done for “static” meshes… if you have stuff that moves , you wont be able to combine them with stuff that doesnt, and therefore atlasing serves no purpose, right ?
Right. Though its not 1 texture (atlas are textures) but one material in total as batching is per material, not per texture.
Incorrect, you can use it on moving stuff too, you need to design it just correctly. Dynamic batching is available on Basic and Advanced, with static batching beeing only available on advanced, to keep that in mind.
if you add it, then yes.
Though you must combine the textures at editor time, not at runtime, as compression is an editor only thing, runtime combined textures are always uncompressed
1- there’s some stuff that’s bothering me still. If you have only one material… once you use it on one object it loads all textures to memory right ? so it should be much faster to have a atlas even if you dont combine meshes after … or am I confusing 1 material with 1 texture ?
2 - you can combine objects that move… but not objects that move for example in opposing directions… because it turns them both into one unique model… and therefore translation rotation and scale is the same to all objects that get combined … right ?
on the iphone you commonly only have 1 texture per material as pre 3GS iphones can only render 2 textures per pass, and each pass basically means a dublicate of the objects linked to the material.
Otherwise, yes it makes sense to use one material for many object as that means that they potentially will all run within a single drawcall due to dynamic batching which is an easy and powerfull way to get better performance.
dynamic batching doesn’t care about the direction.
you also don’t need the mesh combiner script or any script at all. just have them on screen, ensure they are 300 vertices or less, that they are not skinned and they will just work like a single object rendering wise thanks to Unity iPHone 1.5s dynamic batching.
That’s amazing, but what will happen to the textures size, will they be downsized? For example, suppose I have two distincts greek column objects in the scene, each under 300 vertices but with a different 512x512 texture. What would dynamic batching do with those textures, make it a single 1024x1024 texture or scale it down to 512x512?
And from what you’re saying, a big question pop up in my mind - is the native unity terrain a good option for the iPhone in terms of performance, considering you can’t precisely control its vertex count (and take advantage of dyn batching), or should we better just stick to polygon-based scenery, splitting it in 300-vert blocks?