Skip to content

Impostors ​

An impostor is a small card that shows pictures of the tree taken from many directions. As the camera moves, the card shows the pictures taken closest to the camera's direction. Far away, a few triangles and one texture replace thousands of triangles. AskrGarden bakes an octahedral impostor as the last LOD of the same export.

The mesh (left) and its impostor (right) in the editor

How the bake works ​

  1. Views. The tree is rendered from directions on a grid folded over a half sphere (hemi, the default: trees are rarely seen from below) or a full sphere. An 8 × 8 grid gives 64 views.
  2. Atlases. Each view is one cell of two textures:
    • <name>_Impostor_BaseColor.png: colour (sRGB) and coverage in alpha;
    • <name>_Impostor_NormalDepth.png: object-space normal in RGB and depth in alpha (half the colour size by default);
    • <name>_Impostor_Strips.png: data for engine shaders, one line per view and one texel per strip: the left and right edge of the tree in that strip (R, G) and the radius of its silhouette (B). It must be read with a point filter, no mip maps and no compression (the engine packages set this).
  3. Card. A card sized to the tree, cut into horizontal strips (8 strips = 16 triangles) that follow the outline, so fewer transparent pixels are drawn. The card always keeps all its strips, so an engine shader can re-cut them for each view. Its UV0 points into the first atlas cell, with v moved slightly towards the inside of each strip: from UV0 alone a shader knows which strip edge a vertex belongs to, since UV0 is the one attribute every format and importer keeps.
  4. Metadata in the export manifest: grid, frame size, the sphere around the tree, the pivot, the strip edges of every view and the suggested switch size.

Colour atlas: 8 × 8 views of the broadleaf_textured sample

Normal (RGB) atlas of the same bake

The bake runs on the CPU, in AskrGarden's own renderer: no GPU and no extra program. It takes about 10 to 25 s for an 8 × 8 grid at 256 px per view, and the same tree always gives the same atlas bytes.

Settings ​

In Tree output → Impostor:

FieldKeyDefaultWhat it does
Export the impostorenabledoffadds the impostor as the last LOD of every export
Views per sidegrid86 (mobile), 8, or 12 (hero trees); more views = smoother change as the camera moves
Directions coveredlayouthemihemi (upper half) or full (whole sphere)
Pixels per viewframe_px256128 to 1024; the atlas is grid × this size
Normal + depth sizenormal_scale0.50.25, 0.5 or 1: size of the normal/depth atlas relative to the colour one
Card stripsstrips88, 4, 2 or 1 strips on the card
LOD photographedsource_lod0which LOD is photographed
Mask atlasextra_mapsoffalso writes a mask atlas (AO, roughness, translucency)

The labels above are those of the Properties panel; each field has its own explanation there.

When the impostor is exported ​

Only when one of these is true:

  • Export the impostor is on in the Tree output node;
  • Include impostor is on in the export dialog;
  • --impostor on the command line.

Include impostor off (or --no-textures, or a cards-only export) leaves it out even when the node has it on. The export warns you when the impostor was left out only because the node has it off.

What each format gets ​

FormatAtlasesCard
GLB / glTFyes<name>_LOD<n>_Impostor
FBXyesmodel <name>_LOD<n>, so Unity puts it in the LOD Group as the last level
OBJyes<name>_LOD<n>_Impostor.obj
USDyes<name>_LOD<n>_Impostor.usda

The card in FBX has been checked in Unity (it imports as the last LOD and renders with the Unity package). The card in OBJ and USD is not checked in an engine yet (roadmap impostor-other-formats, in validation). With --fbx-via blender the FBX gets the atlases but no card.

A plain viewer shows only one view

A GLB opened in any viewer shows the card with view 0 through a normal material. The blending of views needs an engine shader: the Unity package has one, and Unreal and Godot versions are written but not yet run (Engine shaders).

In the preview ​

Pick Impostor, the last button of a preview's LOD row. The editor bakes it (the status bar says Baking impostor…) and draws it with a shader that does what an engine shader would: it blends the 3 nearest views, adds one parallax step from the depth and lights the result from the baked normals.

ToggleWhat it shows
Blend 3 viewsoff = the nearest view only, which shows the popping between views
Parallaxthe depth-based shift of each view
Show viewstints each pixel by the view that won
Side by sidethe mesh and the impostor next to each other
Debugthe debug panels below

Bake cache ​

A bake is kept on disk (<library>/.cache/impostors/, the newest 24). After you edit the tree, the old impostor stays on screen and Bake impostor again lights up; click it when you want a new bake. Impostor up to date means nothing needs baking. The preview can bake and show the impostor even when Export the impostor is off.

Debug panels ​

Debug adds five small panels that follow the camera live, computed with the same maths as the shader from the baked atlases (nothing is baked again). It also draws the card of the nearest view as a cyan wireframe in the 3D view.

The impostor preview with Debug on: the debug panels at the bottom

PanelShows
domethe impostor's views in 3D, the camera (yellow) and the three views around it
atlasthe atlas cells in use, with the weight of each; the yellow dot is the camera
framethe nearest view, the angle to it and the parallax shift of each point (arrows)
overlapthe blended views over each other: white where all cover the point, colour where only one does
cardthe card's strips: how much of the view it takes and how much of that is tree

Limits ​

  • An impostor does not sway: the wind should fade out before the switch to it.
  • The lighting in the preview is fitted to look like the mesh preview, without shadows, so it reads a little flatter.
  • The bake is CPU-only; a GPU path would be an optional extra.