Optimizing Vegetation Assets

Overview

These techniques were developed for PC game production, but have been optimized for use with console games as well.

Best Practices

  • Merge non-square textures for assets that belong to the same group into one square texture; adjust the UV sets for these assets.
  • Use Merged Textures - it is a feature in the Vegetation Shader that reduces texture lookups.

The shader looks for the specular and opacity channels in specific files and is supposed to be used for two specific cases: transparent parts (leaves) and opaque parts (trunks).

  • Transparent: Diffuse + Opacity channel in Diffuse Texture Map slot; SSS + Specular channel in the Specular Texture Map slot.
  • Opaque: Diffuse + Specular channel in Diffuse Texture Map slot.

  • Remove the detail bump map from wherever it is not needed (remove it for foliage and keep it for large trunks).
  • Disable vegetation bending where not needed.
  • Remove interactive leaves (or turn off with console command).
  • Use LOD's aggressively.
  • Create X-trees as lowest LOD if necessary.
  • Create planes for faking complexity in the distance and to break the silhouette of the terrain.
  • Recommended material ID budgets:
    • 2 IDs for trees (trunk, foliage).
    • 1 ID for plants without trunks (foliage).
  • Recommended texture budget: 512x512.

For small vegetation objects (less than 300-400 polys), LOD's may look bad. It can be better for them to have a single LOD and tweak carefully the sprite distance ratio in Sandbox to get a good quality/performance trade-off.

When creating vegetation assets, it is recommended to check regularly how they look when placed as a vegetation object in Sandbox. Popping may be minimized by tweaking the distance ratio parameters.