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:54

Video transcript

in the previous video we saw that the basic job of a ray tracer is to determine what color to paint each pixel and it does that by casting a mathematical ray that starts at the camera passes through a pixel and then often to the scene the ray tracer must then compute the closest intersection point between the Ray and the scene geometry and return that geometries color in this video we're going to look at how we determine how much light is traveling along the Ray back towards camera that's what we need to figure out in order to determine each pixels color this is actually a pretty deep and complicated question that is mathematically governed by the rendering equation I know it looks scary I mean believe me this equation still gives me nightmares but it's actually easy if you break it down into a few pieces the amount of light traveling from a point on a surface back to the camera depends on three things one how much light is falling on that point two how does the surface of the object at that point reflect light and three where's the camera let's examine each of these factors in turn using some props my scene consists of a tennis ball and a light source now the first factor is how much light is falling on a spot on that tennis ball is pretty obvious that the farther away the light the lower the intensity of light falling on the ball so we need to know the distance to the light source and we need to know how bright the light is it's less obvious that we need to take into account the orientation of the surface when determining how much light falls on the point grazing angles receive less light or energy so they appear less bright whereas the point will be brighter or hotter if the surface is oriented perpendicular to the direction of the light you feel this every sunny day is why it's hottest at noon and cooler in the morning and evening if there's more than one light source we repeat the process for each one of them the second factor is how does the surface reflect light the color of an object is a big part of how it responds to light but it's not the only factor some objects have a fuzzy or dull appearance like the tennis ball others are shiny and display bright highlights like this pool ball these two objects are receiving the same amount of light but they look very different other surfaces are somewhere in between dull and shiny like human skin wood or even hair dull surfaces are said to be diffuse and shiny surfaces are said to be specular finally the last factor is where is the camera watch the middle of the number three on the pool ball notice that as we move around the brightness of that point changes even though everything else is the same the only thing changing is a location of the camera let's look at a virtual version of this physical situation there are three sliders that you can control spotlight intensity which is like controlling the brightness of the flashlight a diffuse lighter which controls the dullness of the surface or roughness and specular slider which controls the shininess you can also move the spotlight around which is represented by a white dot for every object can a Pixar movie there's a shader packet the shader packet describes in visual detail everything about a surface it'll include photographs of what something looks like in real life drawings describing maybe the way the roughness on a surface looks or how someone's hair should look in this next exercise you can sit in the seat of an artist using tools based on these concepts we just covered your job as a Pixar artist is to match the reference art have fun