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:2:24

Video transcript

in the previous video we talked about what color a point on a surfaces by considering three factors one how much light falls on the point two how the surface reflects light and three where the cameras for the first factor the ray tracer needs to determine if the point being considered is visible to the light source this is actually pretty easy to answer the ray tracer constructs a ray that starts at the point being shaded and launches off in the direction of the light source these rays two light sources are called naturally enough shadow rays here's an example of a point that is visible to the light source because the shadow ray doesn't hit anything but the light source it's important to notice that only some of the light falling on a point comes directly from the light sources this is called direct illumination in the real world some of the light comes from other objects in the scene as well notice that I can bounce light off this card which you can see adds to the light hitting my face this is an example of indirect illumination as another example of indirect illumination you can see a reflection of the tennis ball in the pool ball a ray tracer can account for such reflections by sending another ray in the reflection direction the direction of this reflected ray is determined by how a light ray would bounce naturally in the same way of pool ball bounces this technique was used for instance in cars - because reflections of shiny cars were super important to the look of the film if the object is partially transparent like this glass Cup the ray tracer can do a similar thing and launch a ray in the refracted Direction refracted Ray's pass through an object while reflected Ray's bounce off of them when the Ray's passed through an object such as this glass the Rays Bend in different directions instead of in straight lines which explains why the image you see of me through this glass looks warped the raytracer can keep doing this casting raise sending out reflected and refracted rays to account for reflections of refractions and so on then it uses all of these rays to determine the final pixel color in this next exercise you can test your understanding of these concepts