Hi,
i am in the early stages of making a game which is supposed to have a lot of machinery/robotic dynamic objects/characters.
Every machine has around 10 segments, which i animate with FK. Traditionally there is no need to skin those and use a rig of joints to animate. Animate the transforms would be just fine.
But than i remembered that this results in several dynamic gameobjects, lets say also 10, and each would have one drawcall.
So i made a test yesterday and after optimizing the meshes some more i had a result of 1 drawcall (10 batched). Great. Sort of. Because this only works under the following conditions:
- Use a simple shader (Using any Shader with normalmaps will break the batching, resulting in 10 Drawcalls). Which is too bad, would like to use normalmaps.
- Don´t scale anything (ok, don´t want to do that)
- Lights affect the batching process severly. Especially having a Pixel Light will tripple the drawcalls it seems. So instead of 1 i have 30.
- Meshes need to have less than 300 verts (In Unity, not what your modelling app shows(ok, got that done)). But this point is unclear to me. It could mean, that batching potentially would work with lights or bump shaders, but than the max verts count could be half or just a quarter. Anybody knows something about this?
- a little weird: I duplicated the model 20 times, expecting still 1 drawcall. But now it became 3. So, after a certain vertscount Unity seems to break objects into several draws.
The alternativ would be to skin everything. Than i would definatly have 1 drawcall and could use bump shaders. But are skinned meshes than batched together? I mean, if i would place 20 Machineobjects in the scene would that result in 1 or in 20 drawcalls? In my case i would expect 20 drawcalls, because the skinned mesh will have much more vertices than 300. This would compare then to 3 calls with not skinned characters but 20 calls with skinned characters. On the other hand, as soon as a pixel light is there it could potentially break batching and rise calls per object which would lead to this scenario: 600 drawcalls not skinned vs 60 skinned. :shock:
And of course a skinned mesh should need more computations then a not skinned one.
Anyways, if anybody has deeper insights or experiences i am eager to read!