Download

Auto generated LODs doubling draw calls compared to imported LOD meshes.

Hello,

I’m currently working on foliage models and whilst making some performance tests I’ve noticed that if I use the automatic LoD generation I’m getting around double the draw calls compared to using imported LOD meshes.

I set up two versions of my model, one using my custom LOD models and the other using generated LODs. I set them up identically otherwise (same LOD distances, materials etc.) and tuned the generation settings of the LODs to have a similar tri / vertex count as the custom made LODs. In a simple test map, I swapped between the meshes in the foliage settings I could see the auto generated version was doubling the draw calls and saw a drop in the frame rate.

Has anyone else experienced this issue?

Thanks

What about material slots? Like does your LOD0 have several and then the lower LODs only have one? Each material slot is an extra draw call on a mesh. Auto generating LODs would likely keep the same slot count for the ones it generates.

Okay, I did some more testing this morning and it seems the culprit was a slight difference in vertex count on the generated LODs. I’d matched the triangle count but the vertex count was a bit higher. When I matched the vertex count the draw calls were identical.

So my guess is that the foliage instances are divided into batches with a fixed memory size, so the increased vertex count meant there were less instances per batch leading to more batches and the extra draw calls.