Skip to main content
The 3D look

The 3D look

· 2 min read
Balaur

Sponza, read by one balaur import and lit by its own sky. Nothing in it was authored by hand except a camera, a sun, an environment and a player.

  • A material arrives whole. Every factor and map, the alpha mode and its cutoff, the index of refraction and the volume. One mesh node per material: Sponza is 25 over 103 primitives.
  • The sampler comes too. A floor whose coordinates run past one, clamped, draws as one stretched texel. The import writes the file's own wrapping beside each image, so the marble arrives tiled.

What a surface now reads

package::mesh binds four things it did not: the sky as an environment map, the occlusion the prepass measured, the reflection probes, and the scene glass refracts. Each has a one-pixel stand-in, so nothing branches on absence.

A chrome ball, a pane of glass and a mirrored floor under a sky

  • Image-based lighting replaces environment.ambient rather than adding to it. Both stand for the same bounced light.
  • Glass is [surface] on the material: transmission, ior, thickness and a volume colour. It draws after the opaque scene resolves and refracts it, keeping its own highlights on top.
  • A mirror renders the scene from its own plane and replaces what the sky would have shown.
  • A reflection_probe is a box a room was captured inside. A surface in it reflects the room, aimed at the box rather than at infinity.

Occlusion, and the pass it needed

Two boxes on a floor, without occlusion and with it

Every 3D material now draws a geometry prepass. Without one a project's material fed nothing to the buffer occlusion reads, so its surfaces were the only ones a crease never darkened.

Four passes to finish on

  • vignette, aberration, grain and pixelate are names on camera.post, drawn where the list puts them. fxaa and sharpen join them from the renderer.
  • The layer stack ships in the editor's library: colour, image, gradient, noise, matcap, fresnel, toon and outline, each a flag with its own knobs.

The Sponza project is its own repository.