Lumen principle — how light bounces off walls (3D)
About this app
A room with a window, a red and a green wall, rendered by path tracing: with 0 bounces only a hard patch of light, from one bounce the room brightens and the floor takes on the wall colours. Trace rays with a tap, change the sun and wall colours, noise versus averaging over time, proxy scene as a principle picture. Recreated, not Unreal Engine software.
Direct and indirect light
Direct light travels in a straight line from the light source, here from the sun through a window. In a real room, however, every surface scatters it further, so it also reaches places the sun never hits. This indirect light is called global illumination. It brightens shadows and carries colour along: next to a red wall the floor turns reddish (colour bleeding). Real-time engines such as Lumen in Unreal Engine estimate this light with a few rays per frame and average over time; the result is an approximation, not an exact image.
What the app shows
A room modelled on the Cornell box with a red and a green side wall, a box and a window in the back wall, computed with a simple path tracer. With 0 bounces you see only the hard sun patch; from one bounce on the room brightens and the floor takes on the wall colours. For a chosen pixel the app draws the view ray, the bounces and the shadow rays in 3D. One view shows only the indirect light, another a simplified proxy scene as a sketch of the principle. Recreated for illustration, not Unreal Engine software.
Try it yourself
Switch the number of bounces between 0 and 3, move the sun's elevation and direction and recolour the walls. Tap a pixel to see its rays. Turn off averaging over time: with only one ray per pixel the image is very noisy, and after you switch it back on it settles within a few seconds.
Frequently asked questions
- What is global illumination?
- Global illumination takes into account not only the light that falls directly on a surface from a lamp or the sun, but also light that was reflected by other surfaces first. Shadows become brighter, corners look softer, and coloured surfaces tint their surroundings.
- How does Lumen in Unreal Engine work in principle?
- Lumen computes indirect light in real time by tracing rays against simplified representations of the scene, such as distance fields and a cache of surface cards, and by filtering and averaging the results over several frames. This keeps the cost per frame bounded. The app only recreates the principle.
- What is path tracing?
- A technique that sends rays from the camera into the scene and follows their path over several reflections to a light source. Averaging many random paths per pixel brings the image closer to physically correct lighting; with few paths, noise remains.
- Is the Lumen principle app Unreal Engine software?
- No. The app computes a small room with its own simple path tracer in the browser. It illustrates the idea behind real-time global illumination; techniques such as screen-space tracing, distance fields or a radiance cache are not recreated.
Subject: Computer science
More from Computer science
- Ackermann function
- Elevator simulator
- Binary workshop
- Binary versus linear search
- The Collatz problem
- Inside a CPU
- Swap the inside
- One frame in 16 milliseconds — how a game engine renders an image (3D)
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps