Skip to content

createCornellBox

createCornellBox(): CornellBox

Defined in: addons/src/scenes/CornellBox.ts:40

The Cornell box: two units wide, open at the front (+z), a red wall on the left, a green one on the right, a light just below the ceiling, a mirror sphere and a white one. The camera looks in through the open side.

The lamp is two-sided: it emits the same colour from both faces (design record 0001, Emission). Its front face lights the room. Its back face lights the ceiling directly, so the ceiling is not lit by bounce alone, and the mirror sphere reflects a lit ceiling.

The walls and the light are planes of two triangles each. The two balls are analytic spheres, Sphere(0.4, material), which the path tracer meets by the quadratic with no triangle (design record 0001, “The analytic sphere”). So the outline of the mirror ball is round, and its reflection and the white ball’s shadow have no facets. The scene pack holds 4 triangles and 8 instances. It is the scene CI renders on the GPU and on the CPU oracle (design record 0002).

CornellBox