Skip to main content
SAGE
Search form
  • 00:00

    JOHN HART: In some cases, we'll needto use three-dimensional computer graphicsfor data visualization.To understand how three-dimensional computergraphics works, you have to understandhow light leaves a light source, reflects off of an object,and then reaches your eye so it can be perceived.So now we'll discuss three-dimensional graphicsfor visualization.

  • 00:21

    JOHN HART [continued]: So what will we learn?We'll learn about the real-world waysthat light leaves a light source and reaches our eye.We'll learn the physics of why is the sky blue, why is the sunyellow, why is grass green, and, in general,how does three-dimensional graphics simulatethese physical processes?And so here's a typical scene of the real world

  • 00:43

    JOHN HART [continued]: and how we would perceive that.We have a light source, an object reflecting light,and then a sensor, which is our eye.And light leaves, in this case, the sun.And it's-- this light is powerful across the spectrum,and so it's essentially white.But then that light goes through the sky,and the sky scatters the light differently based

  • 01:05

    JOHN HART [continued]: 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 wavelengthswill get scattered more.So that light gets scattered to other locations in the sky,which makes the sky blue and whichmakes the sun appear yellow because that light's making itall the way through.

  • 01:25

    JOHN HART [continued]: That yellow sunlight hits a tree or grass or any other biomeand certain wavelengths of that lightare getting absorbed by chlorophyll moleculesand turned into photosynthate, which feeds the tree.And so the chlorophyll is absorbing light mostly

  • 01:46

    JOHN HART [continued]: in the blue regions and the blue wavelengths and thenthe 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 us in the eye,reaches our sensor in our eye so that we can perceive it.

  • 02:07

    JOHN HART [continued]: And there it gets sensed by, essentially, cones.The colors-- the wavelengths of light stimulate three differentkinds of cones--a mostly red cone, a mostly green cone,and a mostly blue cone.And these then three different responsesto our perceptual system.And so you may have a complex wavelength

  • 02:27

    JOHN HART [continued]: of light indicating its color.But at some point when the eye perceives that,that gets turned into three numbersinstead 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 colorsin pixels on graphics displays to directly stimulate

  • 02:51

    JOHN HART [continued]: the red cones, the green cones, and the blue cones.So we can simulate this process, and we can look, for example,at a camera.And a modern camera--in this case, a pinhole camera thathas a very small aperture--is getting light reflected off of an object-- in this case,

  • 03:11

    JOHN HART [continued]: this blue bunny rabbit.That goes through a focal point, and itgets projected onto an image plane thatwould be sensed in modern cameras by a CCD array.We can take that image plane, and we can justbring that in front of the camera,and we get the exact same image.It's not inverted.It's just placed in front.And you can think of this as being a window,

  • 03:33

    JOHN HART [continued]: and you're looking through a window out into the worldand seeing a blue bunny.You could imagine where that blue bunnywould be on the window that you see there.And it's the exact same image invertedthat you would get on the film plane because of the geometryof this camera system.Well, we can remove the camera system,and we can put an eye right at that focal point.

  • 03:55

    JOHN HART [continued]: And this gives us this image plane.And so, basically, when we're looking outinto a three-dimensional scene, what we're seeingis the same thing that would be projectedonto a two-dimensional window to the worldthrough those same projectors, just a certain fixed distanceaway.And that's the way we can simulate,with a two-dimensional image, what the eye would see

  • 04:17

    JOHN HART [continued]: in a three-dimensional world.And in computer graphics, as we discussedbefore with two-dimensional graphics,we're going to simulate shapes using primitives--in this case, vector primitives-- except theseare now three-dimensional vector primitives.And so we have triangles, and the trianglesare specified by three vertices, and those three vertices

  • 04:40

    JOHN HART [continued]: have edges between them and a regionwe'll call a polygonal face.And you can create a mesh of these trianglesto define a three-dimensional object-- in this case, a bunnyrabbit.And those triangles are then projectedby what's called a three-dimensional graphicspipeline onto a two-dimensional image plane.

  • 05:02

    JOHN HART [continued]: And then the polygons on that two-dimensional image planeare then discretized in the pixels.This is a rasterization process and, in fact,the same rasterization process we were discussingin two-dimensional graphics where regions and edges arediscretized into pixels instead of straight linesand continuous regions.

  • 05:24

    JOHN HART [continued]: 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 illuminationby simulating the light coming from a light sourcereflecting off of it.And then we're going to project that triangleand its illumination onto this image plane.And then we're going to rasterize that triangle

  • 05:44

    JOHN HART [continued]: by filling its region in with pixels.And that's what gets displayed on the pixel display.And so we can speak of these processesas vertex processing--this is also called transform and lighting,where we're taking vertices of trianglesand projecting them onto an image plane--rasterization, taking those two-dimensional triangles

  • 06:06

    JOHN HART [continued]: and converting them into pixels, and thenpixel processing, which takes those pixel regionsand figures out what color should be on their interior.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.

  • 06:27

    JOHN HART [continued]: And this eye and this teapot examplewill be located at positions in three-dimensional coordinatesin the same way that primitives werelocated in two-dimensional coordinatesin the previous example.So we use this world coordinate system,and its origin is off someplace, and we can describe everythingrelative to this coordinate system.

  • 06:48

    JOHN HART [continued]: And we will specify a view.Basically, where are we and what are be looking at?Our eye point will be located at a certain set of coordinatesand world coordinates, and we'll be looking at a point,also specified as a set of coordinates in worldcoordinates, three coordinates-- x, y, z.And then that view is going to be transformed

  • 07:10

    JOHN HART [continued]: into a new coordinate system thatlooks very similar to our canvas coordinate system so that wehave an x-axis and a y-axis.And in this case, we're extending from minus 1,minus 1, to 1, 1.And these coordinates are the coordinatesof the window we were looking through thatforms the image plane.And another thing we want to do is

  • 07:31

    JOHN HART [continued]: to create a sense of perspective so that things farther awayappear smaller and things closer to us appear larger.In computer graphics, we do that by processingthe primitives themselves.We actually make the things that are farther away smallerand the things that are closer to us larger.So this may look correct for a perspective scene of a teapot

  • 07:54

    JOHN HART [continued]: on the table.But if I look at it from the side view, what I've actuallydone is made the front of the table largerand the back of the table smaller,so that when it gets projected onto my 2D image plane,I get correct proportions for a perspective rendering.And from this point, we've processed our primitives,

  • 08:15

    JOHN HART [continued]: and we would then rasterize them and fill themin in the same fashions that we didfor our two-dimensional graphics examples.So we learned that three-dimensional graphicsdisplays objects that are made out of triangle meshesand that these triangle meshes areprojected onto an image plane.And we specify how that projection happens with a view.

  • 08:37

    JOHN HART [continued]: We specify that view with an eye point, a viewing direction,and in an up direction.And then we use perspective to do that projectionso that things closer to us appear largerthan things farther away.Also, the way the computer processesthree-dimensional computer graphicsis with a pipeline consisting of vertex processing, then

  • 08:58

    JOHN HART [continued]: rasterization, and then pixel processing.[MUSIC PLAYING]

Video Info

Series Name: Data Visualization

Episode: 7

Publisher: University of Illinois

Publication Year: 2016

Video Type:Tutorial

Methods: Data visualization, Visual representations

Keywords: communication aids; computer graphics and perception; coordinate systems; data visualisation; graphical presentation of data; lighting ... Show More

Segment Info

Segment Num.: 1

Persons Discussed:

Events Discussed:

Keywords:

Abstract

John C. Hart, Professor of Computer Science at the University of Illinois—Urbana-Champaign, explains how three-dimensional graphics simulate physical processes, including the role of lighting.

Looks like you do not have access to this content.

3-D Graphics

John C. Hart, Professor of Computer Science at the University of Illinois—Urbana-Champaign, explains how three-dimensional graphics simulate physical processes, including the role of lighting.

Copy and paste the following HTML into your website