# Instanced static mesh rendering vs static batching ? How do the engine handle it?

**URL:** <https://forums.unrealengine.com/t/instanced-static-mesh-rendering-vs-static-batching-how-do-the-engine-handle-it/409722>\
**Category:** Asset Creation\
**Tags:** rendering-system, gpu, unreal-engine, Instanced-Mesh, question\
**Created:** [November 15, 2017, 9:00pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-rendering-vs-static-batching-how-do-the-engine-handle-it/409722 "2017-11-15T21:00:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ffa16c13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ffa16c13](https://forums.unrealengine.com/u/anonymous_user_ffa16c13)\
**Post date:** [November 15, 2017, 9:00pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-rendering-vs-static-batching-how-do-the-engine-handle-it/409722/1 "2017-11-15T21:00:57Z")

</div>

Hi !

I’d be curious to know more about how the engine handle and render instanced static meshes (e.g. for foliage, maybe particles ?). If anyone has knowledge about it, I think it could improve assets and material setup.

Here is what I assume so far:

- let’s say I have a static mesh of a tree, composed of a trunk and branches (one material), and leaves (another material). So adding a tree to my scene would add two draw calls to the rendering loop (one per material).

- If I add other trees to the scene using a simple drag&drop, it should still be two draw calls as the engine will most likely build a static batch with all trunks, and another one containing all leaves as they all share the same material.

- If I set a foliage type using my tree mesh, and use the foliage brush to “paint” trees in my scene, what I assume is that it would use GPU instancing instead of static batching, and this would still be two draw calls (?)

- Now let’s say I have another variation of the same tree, i.e. different mesh but sharing same trunk and leaves materials with the original tree. How does the engine render both different species ? I guess it renders all instances of tree #1 using GPU instancing, then same for tree #2 which make 4 draw calls.

- Or does it try to combine trunk #1 and trunk #2, leaves #1 and leaves #2 in some way ?

TLDR my questions are:

- Are my assumptions close to what the engine do, i.e. using static batching for normal static meshes sharing same materials, and GPU instancing for foliage ?  
**- Is it worth trying to reduce number of different materials for foliage meshes ?**

Thanks for insights!
