Foliage - real optimisation, what am I missing ?

The mesh for your grass must be cut tight to the actual texture.

Bad → Good


Masking is a must for foliage. Transparency causes Overdraw. Meaning the render pipeline has to re-render a scene again to get what was behind the transparent mesh. If that mesh used transparency, it does it again, and again for each layer of transparency in view.


Levels of Detail (LoDs)! You have to use LoDs. I typically do 4 for foliage.

  • LoD 0 full clump of grass, highest detail.
  • LoD 1, reduction in number of Blades, Leaves/Branches.. can usually use the same materials.
  • LoD 2, more reduction in Blades, Leaves/Branches. May consider a material/texture res reduction.
  • LoD 3, Billboards. Definitely a custom material and textures.

Foliage is done in layers. Thin base coat, then a medium density, Then detail additions.

Grasstypes in landscape material place the base grass and other foliage, debris etc. small clumps and clusters. Thin sporadic grass, flowers, rocks, small clusters of leaves and tree debris.

Procedural Foliage is used to add density. More grass (larger clumps), bushes, large debris, boulders and Trees.

Foliage Tool (painting) is used to add those final detailed placements and Large (extreme distance visible) assets. You can do some of the heavy in the procedural step, But I prefer to do them with foliage tool.


Culling (Min/Max Draw Distance). You do not need to see every blade of grass from 150m away. The smaller stuff needs to be a 30-50m max. Large clumps/clusters of grass, flowers etc can go out to 100-150m, but you also need to increase their LoD screensize in the mesh editor. Takes a fair amount of tweaking and testing.


Shadows!!!
Small grass, rocks etc… basically all the stuff used in grasstypes shouldn’t have shadows.
Medium to Large assets can have them. If you’re using Lumen you need to note that it doesn’t support baked lighting, so all shadows will be dynamic.


Here’s a shot from a level, all painted (foliage tool). I use this level to test the assets themselves. To fully optimize I have to apply grasstypes, procedural and foliage tool correctly. And adjust LoDs, Culling etc. These steps are done in the main levels.

1 Like