Skip to content

Single atlas and vegetation cards ​

Two optional exports, available from the export dialog and the command line. They combine: --atlas --cards 3 writes the merged tree and the cards. Both need textures; with --no-textures they are left out with a warning.

Single atlas ​

What it is for: one material and one draw call per tree. Engines draw a mesh with one material faster than the same mesh with two.

What happens: every material of the tree becomes one material, <name>_atlas, with one texture set (<name>_Atlas_<slot>.png), and the meshes of each LOD become one mesh with the UVs remapped. Every format writes it the normal way, and wind data is copied untouched.

BeforeAfter
bark material + leaf materialone <name>_atlas material
2 texture sets1 texture set, power of two, at most 4096 × 4096
2 mesh parts per LOD1 mesh per LOD

How it fits things in:

  • Bark (a texture that repeats) gets a full-height column, repeated so the bark still tiles along the stem under a repeat sampler.
  • Leaf cards are copied into rectangles.
  • A material with no texture becomes a tiny 8 × 8 px patch of its colour.
  • Each region has 4 px of padding and colour spread under transparent pixels.
  • Material factors are multiplied into the maps; the merged material is a cut-out if any source is, and two-sided if any source is.

Limits:

  • Mipmaps deeper than about level 2 mix neighbouring regions: that is the nature of atlases.
  • When the maps do not fit at full size, the packer scales down a little (with a warning under 90 %); if nothing fits, the export falls back to separate materials with a warning.
  • The impostor keeps its own atlases.

Vegetation cards ​

What they are for: grass, ground plants, far foliage, terrain detail textures and simple billboards. The plant is drawn on a few crossed planes with colour, normal and cut-out.

Colour strip of 3 cards (broadleaf_textured, 384 px frames)

Normal strip of the same cards (OpenGL, +Y up)

PlanesShapeUse
1one planea terrain detail texture or a billboard (frame 0 alone)
2an Xthe classic grass or bush card
3, 4a starrounder from every side

The plant (LOD 0, textures and alpha respected) is rendered with the impostor renderer from that many directions evenly spread over 180°, with a level, orthographic camera; the ground (lowest vertex) sits on the bottom edge.

Files:

FileContent
<name>_Card_BaseColor.pngRGBA, sRGB: one frame per plane side by side, 4 px transparent gutters
<name>_Card_Normal.pngthe normals in each card's own tangent space, OpenGL (+Y up)
<name>_Card.<ext>the planes in each chosen format: 2 triangles per plane, one cut-out material, with wind data (flutter 0 at the ground to 1 at the top)

Back side ​

By default (mirror) a viewer behind a plane sees its front picture mirrored, through a two-sided material. Own back side (--card-back render) renders the plant from the other side for every plane:

mirror (default)render
Frames in the atlasone per planetwo per plane (front frames, then back frames)
Triangles per plane24 (a second quad with reversed winding)
Materialtwo-sidedsingle-sided: keep back-face culling on
Render time, atlas width× 1× 2

Limits ​

  • A frame holds one LOD 0 render, so the light inside the engine is the card's, not the plant's.
  • Frames are as wide as the plant's largest radius, so a tall narrow plant gets a narrow frame.
  • The 8-bit normal map of a leafy plant is noisy by nature.
  • Cards only (--cards-only) builds only LOD 0 and writes no impostor.