I’m currently building for latest devices, but a broad answer is very welcome.
As an example say I have the below wall built out of loads of little cubes:
If I was to build this wall with cubes, it would not be the best route due to inside unused faces and they’d all need a texture (say 3 different textures for variety).
However, if I was to build this wall as one mesh with a 3d modelling tool, would that be more costly in game? I mean uv mapping would be larger on this object. Though, it would also contain less verts, and ploys. I don’t know what would be cheaper then.
I’m either going to model the entire wall as background geometry, 1 mesh with 1 texture., or I will create 3 maybe 4 different building blocks and build it that way but then they’d have 3 or 4 textures.
I’m concerned about draw calls, as well as vert and poly count, understandably. I’m also unsure on what the best practice is for texture sizes for iOS.
Suggestions welcome,
Thanks, NoviceBobble.
I’ve had luck going with the building block method rather than creating the whole level as a single mesh. In my case, having 18k vertices and 200 draw calls has performed well even on the iPhone 4.
To optimize things…
If you know your building blocks will be seen from one side only then you don’t need to have a complete cube. Model only the sides which will be seen, then place them into your scene and rotate your object for corners. In other words, instead of a cube, use a plane for your walls and as you add more planes rotate them as needed. This way you’ll only have vertices for visible objects and avoid unnecessary geometry.
Combine as much as you can into a single texture. I’ve been using 2048px texture maps where multiple objects can use the same texture.
Avoid lights and bake everything once your scene is set-up. Use unlit shaders that support lightmapping.
What helped me out a great deal in understanding level building was downloading the MadFinger example from ShadowGun. Take a look at how they built their level… it should give you further insight.
http://blogs.unity3d.com/2012/03/23/shadowgun-optimizing-for-mobile-sample-level/