I’ve written a little demo which, in Unity, looks great, and I’m thinking about releasing it on iTunes.
Problem is that even though I’m only using one Texture, and the model(s) that this texture is applied to are only 2 polygons, rendering more than 60 of these items (so 120 polygons) is giving me LOADS of draw calls.
Boo.
Is there anything I can do to improve this, or is it literally all based around objects, and as such there is no way to optimize this?
In order for multiple objects to be drawn together in a single draw call, they need to be all one mesh. Without knowing more about your project its hard to advise a good way to go about it. However, I have to ask - is your games framerate unacceptably low? If your demo is very simple and the performance is okay, I wouldn’t worry about your draw calls just for the sake of gettin them lower. A simple memory game, for instance, can afford to run at 10 fps and its really pretty insignificant, but I don’t know what your demo entails.
If you want to have all 60 objects in one draw call, I find the easiest method is to have all of your dynamic objects merged into a single object in your 3d app, and bind them all to bones, making them a skinned mesh. You can then move arond these bones in unity, and the end result is indistinguishable from having each object be completely seperate from one another, despite the fact that they are, in fact, one mesh. The only added overhead is that you’re now dealing with a skinned mesh (which is relatively cheap, especially for objects thare merely 2 polys a piece.)