Every photorealistic image in a film or video game is a lie — a calculated one. The computer never simulates how light actually travels, flooding out from lamps and bouncing around until some lands in your eye. That would be impossibly slow. Instead it cheats: for each pixel on screen, it shoots a single ray backwards, from the camera into the scene, and asks "what did this pixel see?"
That backwards ray hits something — a sphere, a wall, a mirror. If the surface is shiny, the algorithm spawns a reflected ray and follows it. If the surface is glass, it spawns a refracted ray and bends it. Each bounce can spawn more rays. The algorithm is elegantly recursive: the color of a pixel is the color of the nearest hit, which depends on the color of the reflected ray, which depends on the color of whatever that ray hits, and so on until a ray escapes the scene or hits a light source.
This simple recursive idea, first described by Arthur Appel in 1968 and extended by Turner Whitted in 1980, is the engine behind nearly every photorealistic render you have ever seen. Its computational cost — one recursive ray tree per pixel — is the tradeoff that kept it out of real-time graphics for four decades.
Comments
Loading comments...