Octahedral impostors
Replace distant, complex meshes with a quad that samples a pre-baked atlas of views taken from directions on an octahedron, blending the nearest frames for smooth viewpoint changes.
Also known as octahedral imposter, hemi-octahedral impostor, parallax impostor
In the family Performance, LOD & compression, impostors
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | No built-in octahedral impostor baker or renderer. |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Bake: render the object from a grid of camera directions covering the sphere (or upper hemisphere for plants and props that sit on the ground). Directions are mapped to a square atlas through octahedral encoding, which spreads samples evenly and avoids pole singularities. Each frame stores albedo, normals and often depth, so the impostor can be relit at runtime.
Runtime: a camera-facing quad computes the view direction in object space, finds the three nearest baked frames, and blends them using barycentric weights. With the stored depth, a parallax step offsets each frame's lookup so the silhouette and internal parallax stay plausible; this is the 'parallax' variant. Output goes into the G-buffer, so lighting and shadows treat it like geometry.
When to choose it
Reach for it when
- thousands of trees too heavy to render as meshes
- distant props look flat when camera moves around
- need cheap far lods for foliage with lighting
- billboards look wrong from different angles
Choose it for dense vegetation, rocks and props at far LOD where triangle count or overdraw dominates. Prefer Nanite virtualized geometry or Meshlets (cluster rendering) with continuous simplification when the engine supports it and you want no baked data. Prefer plain mesh LOD from meshoptimizer mesh optimization when objects stay within moderate distance, since impostors cannot be seen up close.
Field marks
- Visible popping or ghosting when blending between frames, since neighbouring views disagree on silhouettes
- Parallax distortion at grazing angles because stored depth is a single layer
- Baked lighting or shadows leak if the atlas contains shading rather than material data
- Wrong results for animated or deformed meshes, such as wind-bent trees, without a separate vertex animation path
- Atlas memory cost grows quickly with frame resolution and channel count
Presets
Octahedral impostor atlas of baked box views, 8x8 directions
{
"GRID": 8
}Show GLSL (36 lines)
// Octahedral impostor atlas: each cell is a baked orthographic view of a box from the direction that cell encodes via octahedral mapping.
const float GRID = 8.0;
vec3 octDecode(vec2 e) {
vec2 f = e * 2.0 - 1.0;
vec3 n = vec3(f.x, 1.0 - abs(f.x) - abs(f.y), f.y);
if (n.y < 0.0) n.xz = (1.0 - abs(n.zx)) * sign(n.xz);
return normalize(n);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy * GRID;
vec2 cell = floor(uv), f = fract(uv) * 2.0 - 1.0;
vec3 dir = octDecode((cell + 0.5) / GRID); // camera direction for this cell
vec3 fw = -dir;
vec3 up = abs(dir.y) > 0.95 ? vec3(0, 0, 1) : vec3(0, 1, 0);
vec3 rt = normalize(cross(fw, up)); up = cross(rt, fw);
vec3 ro = dir * 4.0 + (rt * f.x + up * f.y) * 1.25;
vec3 inv = 1.0 / fw;
vec3 h = vec3(0.55, 0.9, 0.55);
vec3 ta = (-h - ro) * inv, tb = (h - ro) * inv;
vec3 tn = min(ta, tb), tf = max(ta, tb);
float t0 = max(max(tn.x, tn.y), tn.z), t1 = min(min(tf.x, tf.y), tf.z);
vec3 col = vec3(0.07, 0.08, 0.11) + 0.5 * vec3(0.1, 0.15, 0.3) * (0.5 + 0.5 * dir.y) * 0.4;
// hit a lower smaller box on top to give the silhouette shape
if (t1 > max(t0, 0.0)) {
vec3 p = ro + fw * t0;
vec3 n = -sign(fw) * step(tn.yzx, tn.xyz) * step(tn.zxy, tn.xyz);
float dif = max(dot(n, normalize(vec3(0.5, 0.8, 0.4))), 0.0);
vec3 alb = abs(n.y) > 0.5 ? vec3(0.9, 0.75, 0.45) : (abs(n.x) > 0.5 ? vec3(0.4, 0.65, 0.9) : vec3(0.9, 0.45, 0.4));
float stripe = 0.85 + 0.15 * sin(p.y * 14.0);
col = alb * (0.25 + 0.8 * dif) * stripe;
}
vec2 g = abs(f);
col = mix(col, vec3(0.0), smoothstep(0.03, 0.0, 1.0 - max(g.x, g.y)));
fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| octahedral-impostors-specimen | Tesla T4 1920x1080 | 2.81× baseline (light) · 0.092 ms / 0.093 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| octahedral-impostors-specimen | NVIDIA L4 1920x1080 | 2.16× baseline (light) · 0.034 ms / 0.035 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| octahedral-impostors-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 1.56× baseline (feather) · 0.045 ms / 0.045 ms · 2.1× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- Dithered impostor forests, temporally rebuilt: Huge forests drawn as octahedral impostors at low internal resolution and rebuilt by a temporal upscaler. Instead of cross-fading three baked views per pixel, each pixel picks one view stochastically and the upscaler's history does the blending.
- Far LOD for captured splat objects: Captured objects such as trees, rocks or statues instanced by the thousand: near copies render as splats, far ones as octahedral impostors baked from those splats, giving splat scenes the LOD tail that meshes have long had.
- GPU-driven rendering: Culling produces a per-instance LOD choice that switches far instances to impostor quads in the same indirect draw.
Sources
- implementationagargaro (2025). agargaro/octahedral-impostor. wipGitHub API · license MIT · 2026-11-29
- implementationwojtekpil (2020). wojtekpil/Godot-Octahedral-Impostors. Octahedral Impostors implementation for Godot Game EngineGitHub API · license MIT · 2026-11-29
- tutorialVlad Krutenyuk (2026). Octahedral Tree Impostors with Depth Parallax and Silhouette Strips. kvyverse.Verified via live page · 2026-11-30
- implementationVlad Krutenyuk (2026). Octahedral Tree Impostors Live Source (Three.js). kvyverse Editor.Verified via live page · 2026-11-30