Download

Should multiple FoliageTypes of the same static mesh cause additional drawcalls?

Hi,

I am wondering if each unique FoliageType spawned into the world adds an extra layer of drawcalls. For example, you spawn 5 trees from the same FoliageType vs. you spawn 5 trees with 5 duplicated and identical FoliageTypes. Would the latter equal 5 drawcalls or should it be treated as one, batched instance and equal 1 drawcall (given one material)?

From what i have tested it seems to create additional drawcalls, which is surprising considering i thought as long as the static mesh is the same it should be counted as the same in terms of drawcalls.

Thanks

The draw calls still have to happen for each instance. Regardless of that being an instanced instance or a one off mesh.

10,000 trees is still 10,000 draw calls.
It’s why realistic forests are near impossible to render at any decent fps.

What happens (or should happen) under the hood is actor aggregation.

What’s that mean? Well, you take a batch of 1000 trees, and you merge it and render it as 1 block (1 draw call). Now you went from having 10k calls to 10 calls…
Makes sense?

The foliage system (I think both, procedural as well, but test it as it may not be as good as foliage using brush) does this for you, based on some weird system they have set up that maybe makes sense, maybe doesn’t.
Dense groups are combined to reduce the call load. And there’s a debug view that let’s you see how the groups are handled.

As far as instances go.
More different instances = less performance to some extent.
As almost always, it depends on how many tris of how many individual instances are being calculated/shaded by however many lights.
Should note that “batching” is probably also affected by this. The grouping for it doesn’t work like HLOD…

Hope that helps.
The new docs blow, but all that info used to be avaliable with examples and better explanations once upon a time.

Also this