Weird batching of billboards on unity terrain

Hello,
I have created an scene with unity terrain and 10000 conifer speedtrees on it.

I have change deleted all lods of conifer trees except billboard lod. So only billboards are drawn.
I have disabled terrain drawing to get only clear results of drawing trees.

I get these results if I set lod group so, that only lod0 (billboards) is drawn. And nothing is culled.
Than I get these draw calls:
draw calls 112
saved by batching 4031
That looks nice.

But if I change lod group settings of tree and I set culling for example only to 1%. (so lod0 billboard is 99% and 1% is culled) Than I get this result:
draw calls 3804
saved by batching 339

Simple conclusion is if I set some culling on lod group. Most of batching is gone. And than I get an big performance hit with bigger number of trees.

Is it correct behaviour?

Scene settings:
deffered
linear color space
1 real time directional light
real time sky

Regards
Peter

I have tried an workaround will seting of camera layer culling distance.

But it looks that unity ignores layer of tree set on it. And it works only if I set culling distance for layer that is set on terrain. So it looks like tree is geting an layer from parent terrain.

But than it’s culled of course whole terrain.

Hi camel82106,

I’d guess you enabled LOD fading for the billboards (since it’s on by default). Billboards with different fading value (evaluated mostly from distance to camera) will not batched. I’d suggest in this case tune down the fade “width” value for billboards.

For the tree layer yes currently they are with terrain always. I think it makes sense to just use the layer setting on the tree prefab. Please file a bug to me.

Cheers,
Yao

Hello,
You are complete right. After playing with fading width or just disabling it. Batching was working nicely.
Thanks You very much. I’m new to unity terrain so I wouldn’t have it found for long time :slight_smile:
And it makes sense perfectly.

I have reported a bug with tree layer override. If I get email about bug number I will post it here.
Regards
Peter

Here is link to the bug:
http://fogbugz.unity3d.com/default.asp?647321_meh3t0k6dbs7sn8p

Nice day
Peter