Static objects with the same material use one drawcall each after Lightmap baking?

Hello everyone!

I am working on a mobile game and ran into a problem when baking the light of the scene.
In my scene I only use one tree GameObject which i placed about 150 times on a (modeled) terrain.

Every instance of the tree is marked as static and (obviously) uses the same material.
When i bake the scene lighting and start the scene, each tree uses 1 draw call (i use just 1 baked directional light).
Aren’t the tree supposed to be batched and only use 1 draw call?

When i deactivate all trees in the scene the the draw calls are reduced for ca. 150 calls.

Here’s a shot with a couple of visible tree objects:

When i deactivate the tree’s the draw calls drop from 23 to 6:

I use quite small atlas sizes (256px) and low quality for the lightmaps.
Maybe Unity creates an atlas for each tree object and therefore uses a separate draw call for each tree?

Is there a way to optimize this without increasing lightmap quality?

Thanks in advance for your help!

Anybody got an idea? This really drives my nuts :slight_smile:

I found the problem - in case somebody is interested.
The lightmap resolution of every tree was set to 1. Therefore it took a lot of lightmaps to render the lighting.
I reduced it to 0.01 (which is enough) and now the draw calls went down.

1 Like