Cubemap reflection probe

A six-sided snapshot of the nearby scene that gives shiny objects reflections matching the room they occupy.

reflections that match the roomfake mirror camerawhy does my chrome object reflect the wrong roomlocal room reflectionsix-sided reflection imageroom capture for shiny objectscubmap probereflection probe

See it

Live demo coming soon

What it is

A cubemap reflection probe captures the scene in six directions from one point, producing the faces of a cube. Shiny materials then sample that capture using their reflection direction. Unlike one global environment map, local probes let a metal object reflect the room it is actually standing in.

Reach for probes in interiors, game levels, and product spaces where nearby walls and furniture should appear in reflections but full ray-traced reflections cost too much. Unity and Unreal both ship this as a Reflection Probe you drop into a level; on the web you place a CubeCamera yourself. Large scenes use several probes with box-shaped influence regions, choosing or blending the nearest capture.

Gotcha: a basic cubemap acts as if everything it captured were infinitely far away. Reflections slide incorrectly when the object moves away from the probe center; box projection can reduce that error in rooms. Baked probes also miss moving objects, so do not expect a character to appear in a static capture.

Ask AI for it

Capture a local reflection probe for this three.js room. Create a WebGLCubeRenderTarget at 256px and a THREE.CubeCamera positioned at the center of the room, hide the reflective object with layers, then call cubeCamera.update(renderer, scene) once after the static furniture is placed. Assign cubeRenderTarget.texture as the envMap on the metal object's MeshStandardMaterial, re-capture only when the room changes, and fall back to scene.environment for objects outside the room.

You might have meant

environment mapmaterialpbrshadertexture