Definition
Ray tracing is a graphics technique that follows the path of light you see on screen backward, starting from the eye, to calculate reflections, refractions, and shadows as they work in real life. It simulates, one by one, how virtual particles of light hit objects and bounce, building extremely realistic 3D scenes.
A camera that follows light backward
In real life, countless rays pour out of a light source like the sun or a lamp, hit objects, and then reach our eyes. But if a computer tried to calculate every ray from a light source, the workload would be far too huge to handle.
So ray tracing cleverly flips the direction. It sends virtual rays out from our eyes, not from the light source.
When a ray from the eye hits an object in the virtual space, the computer checks the object's color. Then it checks again whether that object is receiving light from a lamp. Only the paths of light that actually reach our eyes get calculated, which cuts wasted work dramatically.
How is it different from the old way?
For a long time, 3D games used a method called rasterization. It flattens 3D shapes onto a 2D screen, then paints on color and shadow effects.
Rasterization is very fast, so it suited real-time games. But it had clear limits. Complex light behavior, like the back of a room reflected in a mirror or light bending through a glass, had to be imitated with tricks prepared in advance.
Ray tracing, by contrast, calculates the physics of light directly. It handles your reflection in a window, bright neon signs mirrored in a puddle, and soft shadows that blur naturally behind objects, far more naturally. In real-time games, though, most titles cut the number of rays, then mix in noise-removal techniques and rasterization.
A bit more precisely: why is it only being used now?
Ray tracing is an old technology. The idea first appeared in the late 1960s. But in the past it was used only for work prepared with plenty of time, like 3D animated films and movie special effects. Calculating a single frame of a film could take dozens of hours on average. A 2013 Pixar film is said to have averaged about 29 hours per frame.
Real-time video games, which must draw 60 or more images per second, couldn't even attempt it. Instantly calculating the many rays bouncing around for millions of pixels was just too much for computers.
Recently, powerful graphics processing units (GPUs) with dedicated light-tracing hardware have arrived, along with AI image-restoration technology. Thanks to them, we can now enjoy realistic light in real time even on a home computer.
Common misconceptions
Ray tracing sends out all the light from a light source, just like real life.
Calculating all the light spreading in every direction from a light source would take far too much computing. In practice, rays are shot backward from the eye (camera), so only the paths of light visible on screen are selected and traced.
Where you meet it
After rain, neon signs and passing cars reflect in an asphalt puddle like a mirror, with no distortion.
When sunlight passes through the leaves of a tree, the shadows it casts blur naturally depending on distance from the object.
In one sentence
It's a graphics technique that shoots virtual rays backward from the camera (the eye) to precisely calculate reflections and shadows according to the laws of physics.