0:38

And so here is a typical scene of the real world, and how we would perceive that?

Â We have a light source, an object reflecting light, and a sensor,

Â which is our eye.

Â And light leaves, in this case, the sun and

Â it's the slightest powerful across the spectrum, and so it's essentially white.

Â But then that light goes to the sky, and the sky scatters the light differently

Â based on which region of the spectrum it's dealing with.

Â So light at the red wavelengths will get scattered less, and

Â light at the blue wavelengths will get scattered more, so that light gets

Â scattered to other locations in the sky, which makes the sky blue.

Â And which makes the sun appear yellow,

Â because that light's hitting all the way through.

Â That yellow sunlight hits a tree, or grass, or any other biome.

Â And certain wavelengths of that light are getting absorbed by chlorophyll molecules,

Â and turned into hotosynthate, which feeds the tree.

Â And so the chlorophyll is absorbing light,

Â mostly in the blue regions, in the blue wavelengths, and in the red wavelengths,

Â and reflecting light, not absorbing the light, in the green wavelengths.

Â So the light reflected off of a tree is mostly green.

Â And so then, it hits it in the eye,

Â reaches our sensor in our eye, so that we can perceive it.

Â And there it gets sensed by, essentially, cones, the colors,

Â the wavelengths of light, stimulate three different kinds of cones,

Â a mostly red cone, a mostly green cone, and a mostly blue cone.

Â And these send three different responses to our perceptual system.

Â And so you may have a complex wavelength of light indicating its color.

Â But at some point, when the eye perceives that,

Â that gets turned into three numbers instead of a bunch of numbers, and

Â so we get this tristimulus theory of light perception.

Â And that's why we display things using red, green,

Â blue colors in pixels on graphics displays to directly stimulate the red cones,

Â the green cones, and the blue cones.

Â 2:55

So we can simulate this process, and we can look, for example, at a camera.

Â And a modern camera, in this case, a pin-hole camera that has a very small

Â aperture, is getting light reflected off of an object, in this case,

Â this blue bunny rabbit, that goes through a focal point.

Â And it gets projected onto an image plane that would be sensed then in modern

Â cameras by a CCD array.

Â 3:22

We can take that image plane, and we can just bring that in front of the camera,

Â and we get the exact same image that's not inverted.

Â It's just placed in front.

Â And you can think of this as being a window, and

Â you're looking through a window out into the world, and seeing a blue bunny.

Â You could imagine where that blue bunny would be on the window that you see there.

Â And that's the exact same image inverted that you would get on the film plane,

Â because of the geometry of this camera system.

Â 3:49

Well, we can remove the camera system, and

Â we can put an eye right at that focal point, and this gives us this image plane.

Â And so basically when we're looking out into a three-dimensional scene, what we're

Â seeing is the same thing that would be projected onto a two-dimensional window to

Â the world through those some projectors just a certain fixed distance away.

Â And that's the way we can simulate with a two-dimensional image

Â what the eye would see in a three-dimensional world.

Â 4:20

And in computer graphics, as we discussed before with two-dimensional graphics,

Â we're going to simulate shapes using primitives, in this case,

Â vector primitives.

Â Except these are now three-dimensional vector primitives, and

Â so we have triangles.

Â And the triangles are specified by three vertices.

Â And those three vertices have edges between them and a region,

Â we'll call a polygonal face.

Â And you can create a mesh of these triangles to define a three-dimensional

Â object, in this case, a bunny rabbit.

Â And those triangles are then projected by what's called

Â a three-dimensional graphics pipeline onto a two-dimensional image plane.

Â 5:02

And then the polygons on that two-dimensional

Â image plane are then discretized into pixels.

Â This is a rasterization process and, in fact, the same rasterization process we

Â were discussing in two-dimensional graphics, where regions and

Â edges are discretized into pixels, instead of straight lines and continuous regions.

Â And so the way 3D graphics works is for each one of these triangles,

Â each one of these primitives, we're going to figure out its illumination by

Â simulating the light coming from a light source reflecting off of it.

Â And then we're going to project that triangle and

Â its lumination onto this image plane.

Â And then we're going to rasterize that triangle by filling its region in with

Â pixels.

Â And that's what gets displayed on the pixel display.

Â And so we can speak of these processes as vertex processing.

Â This is also called transform and lighting,

Â where we're taking vertices of triangles, and projecting them on to an image plane.

Â Rasterization, taking those two-dimensional triangles, and

Â converting them into pixels.

Â And then pixel processing which takes those pixel regions,

Â and figures out what color should be on their interior.

Â 6:16

We also will need to view three-dimensional scenes.

Â We need to figure out where is the eye in the scene.

Â And so we'll set up things like world coordinate systems.

Â And this eye and this teapot example will be

Â located at positions in three-dimensional coordinates in the same way that

Â primitives were located in two-dimensional coordinates in the previous example.

Â So we use this world coordinate system, and its origin is off some place, and

Â we can describe everything relative to this coordinate system.

Â 6:48

And we will specify a view, basically, where are we and what are we looking at?

Â Our eye point will be located at a certain set of coordinates in world coordinates.

Â And will be looking at a point also specified as a set of coordinates in world

Â coordinates, three coordinates, x, y, z.

Â 7:06

And then that view is going to be transformed into a new coordinate system

Â that looks very similar to our canvas coordinate system, so

Â that we have an x axis and a y axis.

Â And, in this case, we're extending from (-1,-1) to (1,1).

Â And these coordinates are the coordinates of the window we were looking through

Â that forms the image plane.

Â 7:28

And another thing we want to do is to create a sense of perspective, so

Â that things farther away appear smaller, and things closer to us appear larger.

Â In computer graphics, we do that by processing the primitives themselves.

Â We actually make the things that are farther away smaller, and

Â the things that are closer to us larger.

Â So this may look correct for a perspective scene of a teapot on a table, but

Â if I look at it from the side view, what I've actually done is made the front of

Â the table larger, and the back of the table is smaller.

Â So that when it gets projected onto my 2-D image plane,

Â I get correct proportions for a perspective rendering.

Â 8:10

And from this point, we've processed our primitives, and

Â we would then rasterize them and fill them in, in the same fashions that we did for

Â two-dimensional graphics examples.

Â So we learned that three-dimensional graphics

Â displays objects that are made out of triangle meshes.

Â And that these triangle meshes are projected onto an image plane.

Â And we specify how that projection happens with a view.

Â We specify that view with an eye point, a viewing direction, and in an up direction.

Â And then we use perspective to do that projection,

Â so that things closer to us appear larger than things farther away.

Â Also, the way the computer processes three-dimensional computer graphics is

Â with a pipeline consisting of vertex processing, then rasterization, and

Â then pixel processing.

Â [MUSIC]

Â