Dynamic Batching not working while mixing objects under 300 and over verts with the same material.

I was wondering anyone could help me understand what’s happening.

I’ve got a scene with objects (cubes) under 300 verts. They all dynamically batch fine.

The scene also has objects (spheres) with a vert count over 300 and a different material, as expected they don’t dynamic batch. However the cubes still remain as one batch.

However when I assign the cubes and the objects the same material, the batching breaks down. The spheres are still individual (as expected) but there are now several occurrences of “Draw Dynamic” each containing several groups of cubes.

Any ideas how I can get all the cubes batching?

Sorry for the bump but wondering if anyone has any ideas. Could it be a bug?

Just guessing, maybe its related to drawing order of objects in the same material pass? Seems like it doesn’t analyze the entire scene before batching, but simply draws objects one by one. And if the object can be batched, it is added to the batch, and if not, then the batch breaks. Boxes and spheres in your scene have about the same depth, so probably they drawn in somewhat random order. Try to move spheres behind the boxes, a few units away from camera, and see what happens.

Thanks for the reply. It must be that as you were right, it depends on the distance to camera.
I’m going to go ahead and assign a different material to the objects <300 verts to help.