Optimizing Leaves Mesh

Hey all,
I’m working on a mobile game where players can grow procedural generated trees, and plant these trees into their forest. I have the procedural tree generation working with no issues, the issue I’m facing is that each procedural tree is ~20K Vertices. Since this is for mobile, 20K vertices per tree is unacceptable, especially when the forest contains hundreds of trees.

About 95% of the vertices comes from the leaves meshes, which consists of hundreds of quads placed randomly on a unit sphere. My question for you all, how can I achieve a similar aesthetic but reduce the amount of vertices? I can always add LOD, but I’d rather try optimizing it first.

Full Tree:

Leaves Mesh, which is about 1000 Vertices:

There are multiple things to look at, especially for tiles GPUs/mobile.
If the performance is fine, you could keep it like this. Even older low end phones should do fine with 20k verts, especially if you use cheap shaders.

You could maybe make the quads larger/longer, so it sticks out on 2 sides instead of being on 1 side, potentially halving the quad count

I’m not an expert for tile-based rendering on mobile GPUs but according to this Unite 2022 presentation, you want to avoid alpha cutout. Read the comments as well, though.

That’s a great suggestion! I changed my code to have the quads stick out all four sides, and I got a 4x vertex improvement. Cheers!

PS, screenshot of the new Leaves mesh:

9199349--1282907--ProceduralLeavesNew.jpg

1 Like