AutosplatRenderer · a New England woods in WebGPU

Four Ways to Draw a Tree

Every tree in this forest exists as several things at once: a mesh of half a million triangles, a ladder of thirteen Gaussian splat sets from 8 splats to 160,000, a ray-marched volume, and, beyond three kilometres, a part of one continuous canopy surface. Each frame, the GPU picks one for every tree it can see, by how many pixels the tree covers, and fades between them so the change doesn't show.

Mesh Splats, fine to coarse Volume Canopy surface
Plate 1 · the overlook

Drag across the view to see how each tree is drawn

The left half is the frame as rendered. The right half is the same frame with each tree tinted by its representation, its shading kept as grey. Here volumes are switched on beyond 900 metres; in the shipped settings they are off, and splats run all the way to the canopy surface.

The overlook: a clearing on a hilltop and wooded hills to the horizon The same view, each tree tinted by how it is drawn RenderedBy representation
1600 × 900, 16 samples. Orange trees at the clearing's edge are meshes; the hillsides are splats, coarser with distance (yellow, white, then cyan); the far ridges are volumes (violet) and, past 3 km, the canopy surface (magenta).
Plate 2 · one tree

One beech, drawn three ways

The same American beech at the clearing's edge with every other tree hidden, rendered as a mesh, as the splats the renderer picks for it at this size, and as a volume. It is lit as if it stood alone.

Plate 3 · the splat ladder

Thirteen splat sets per kind of tree, each made straight from the mesh

The splats are not merged from finer splats. Each level is sampled directly from the mesh at its own scale: surface area, position and normal moments, and material averages are accumulated in an octree, and each splat is built from its cell, widened enough that an opaque surface stays opaque. A level is used where its splats come out about 1.5 to 2 pixels across. Below, the same tree with every tree forced to one level, from fine to coarse. The four finest levels, 20,000 to 160,000 splats, are only ever used for the nearest splat trees; forced on every tree in view they would exceed the frame's budget of 16 million splats.

Plate 4 · level of detail by distance

A tree, a rock and the grass, moving away

Each row is one thing seen from further and further off, every frame zoomed so it stays the same size. What changes is what the renderer draws for it at that distance in a normal view, shown at a scale where you can see it. Every other tree is hidden.

Plate 5 · where each is used

Distance decides, then a dithered mask hides the change

Distances are from the camera to the edge of a tree's crown, on a log scale. Around each hand-over a tree is drawn both ways for a moment, each keeping complementary pixels of a blue-noise mask that turns every frame, and the anti-aliasing averages the two into a blend.

Shipped settings on a desktop. A phone's profile draws meshes to 10 m and trees to 1.2 km.
Inside the woods: trunks on a slope, the leaf litter in sun and shade The same view, each tree tinted by how it is drawn RenderedBy representation
Inside the woods. The near trunks are meshes; past about 25 m the splat levels step down, each step faded over a few metres.
Plate 6 · the specimens

Five kinds of tree, every version of each

Each kind is grown once from a seed, then converted. The numbers are read from the running app.

How the versions are made

From one skeleton to every version

  1. Grow

    A skeleton by space colonization (broadleaves) or by whorls of limbs on a straight stem (conifers), with leaves on sprays.

  2. Mesh

    Bark tubes welded at the junctions, twig ribbons, one quad per leaf cut to its outline in the shader. Never decimated.

  3. Bake the light

    A WebGPU path tracer bakes the indirect light into every vertex, and the sun's visibility inside the crown for eight orientations.

  4. Splats

    Thirteen levels sampled from the mesh, each chosen by its measured error against renders of the mesh, lit with the same baked light.

  5. Volume

    One splat level deposited into a 0.3 m grid: extinction, colour, indirect light and sun visibility per voxel, four mip levels, a distance field for skipping air.

The ground has a ladder too

Litter, grass, rocks and water

AssetNearMiddleFar
Leaf litterIndividual leaf meshesSplats baked from a litter tileA baked texture on the terrain
Meadow grassBlades, to 48 mA ray-marched layer of tussocks, lit by a sward model
Rocks, logs, stumpsA fine meshA coarser mesh, handed over at 25, 12 or 7 mFaded out at the kind's range, 120–300 m
BrookA water surface drawn over the bed: refraction, screen-space reflection, flow around each stone
Walkthrough

Thirty-five seconds in the woods

Rendered offline from the same renderer, each frame 12 samples through its anti-aliasing. The sound is synthesized along the same path: wind in the leaves, the brook, birds, footsteps.