If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:3:28

1. What is ray tracing?

Video transcript

hi my name is Susan Fong and I'm a rendering technical director here at Pixar Animation Studios my job is to make sure that the images you see in the theater are created as quickly and efficiently as possible now that's a big job because as Christoph described in the previous video rendering is an extremely complicated process requiring thousands of computers all working together to render our films the render farm is where we keep all of these computers what are these computers doing exactly that's the topic of this lesson in the first part we'll take a geometric look at how a renderer works in the second part of the lesson we'll look at some of the equations and algebra that are needed to write a renderer as a computer program so let's get started let's start with a drastically simplified scene from up this object lives in three dimensions as we can see as we navigate around it just like live-action filmmaking we need to place a camera inside the scene in computer graphics we call this a virtual camera we first pick a location for our virtual camera that will be used to create the image it's shown here in white we also need to decide which direction our cameras pointed that's shown here in red next we erect a plane upon which will form the image it's called the image plane and represents what the virtual camera will see notice it is perpendicular to the viewing direction the image plane is broken up into a grid of pixels that will make up the image in this interactive the first two sliders allow you to rotate your camera around the scene the job of the renderer sounds simple it must determine a color for each of these pixels this is kind of like paint-by-numbers where the image plane is serving as the canvas on which the renderer is painting now I'm only showing you a few pixels in this example our real images are made up of more than two million pixels over the years a number of different rendering algorithms have been developed one of the most elegant and versatile algorithms is called retracing here's how it works to determine a color for save this pixel a ray tracer constructs a mathematical ray that starts at the camera pierces the center of the pixel and then extends off into the scene kind of like a laser beam pointed at the pixel but from the camera the ray tracer computes the closest intersection point between the scene objects and this ray it then determines the color of the intersected object at that point and paints the pixel that color so this pixel would be colored brown this one yellow and so forth for the other pixels this process is done for all of the pixels in the image fancier versions of ray tracing can create more subtle effects like soft shadows and variations in lighting that help to create different moods the ray tracing process leads to a bunch of other questions like how our intersection points determine and once that intersection point is determined how do we figure out what color it is these mysteries and more will be revealed in the remainder of the tutorial in this first exercise you can practice some ray tracing yourself