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

4. Rendering Mike Wazowski

Video transcript

in the first few videos we discussed the basic job of a ray tracer determine the final pixel color for each pixel in an image let's look at a real world example from monsters University first for each pixel we need to find an intersection point between array starting at the camera shooting through a pixel and shooting into the scene the next step is to ask what color is each of these surfaces it turns out that color alone isn't very interesting to look at right next we need to determine how the surface will respond to light as we discussed earlier the two basic components of surface response are called diffuse and specular this is a picture of how diffuse or dull each object is where this image is bright white is going to be where the dullest surface in the scene is for example the Hat is really dull and this is a picture of how specular or shine each object is now from this image can you tell where the main light sources pause the video now if you need some more time the light source is off to the left side of the screen you can actually see it reflected in Mike's eye here now each object in the scene receives direct lighting which we see here in these images of diffuse and specular but they also received indirect lighting which is light bouncing off of other objects in the scene so what happens when we put all these calculations together it's kind of magical right that's what we do it's math but used to create magic