Logistics Projects Local Illumination Proposal due on Thursday - - PDF document

logistics
SMART_READER_LITE
LIVE PREVIEW

Logistics Projects Local Illumination Proposal due on Thursday - - PDF document

Logistics Projects Local Illumination Proposal due on Thursday Logistics Computer Graphics as Virtual Photography Paper summaries on Local Illumination real camera photo Photographic Photography: scene (captures processing


slide-1
SLIDE 1

Local Illumination

Logistics

  • Projects

– Proposal due on Thursday

Logistics

  • Paper summaries on Local Illumination

– Any takers? Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

Today’s Class

  • Local illumination
  • Last time we looked at illumination models
  • This time, take a look at:

– Shading models – applying these illumination models

Shading

  • Computing the light that leaves a point
  • Shading point - point under investigation
  • Illumination model - function or algorithm

used to describe the reflective characteristics of a given surface.

  • Shading model – algorithm for using an

illumination model to determine the color of a point on a surface.

slide-2
SLIDE 2

Shading Models

  • Direct Shading Models

– Only considers direct lighting from light sources – Flat (constant) shading – Gouraud Shading – Phong Shading

  • Global Illumination Algorithms

– Considers indirect lighting from interreflections off of

  • ther objects

– Radiosity – Ray Tracing

Shading Models

  • Illumination vs. Shading Models

– Each of the Illumination Models given last class could be applied by either a local or global shading algorithm – The illumination models are not global vs. local, the shading models are.

Shading Models

  • Geometry

Shading Models

  • Flat Shading

– Illumination model applied once per polygon. – Constant color for entire polygon – Assumes normal vector is constant across the entire polygon

Shading Models

  • Gouraud Shading

– Illumination is interpolated across each polygon – Normals required at each polygon vertex – Illumination is calculated for each polygon vertex – Interior points interpolated from endpoint illumination intensities

Shading Models

  • Phong Shading

– Normal vectors are interpolated across each polygon – Normals required at each polygon vertex – Illumination is calculated for each polygon interior point by applying illumination model directly using interpolated normal

slide-3
SLIDE 3

Shading Models

– Go to applet Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

Gouraud Rendering Pipeline

Database traversal Model transform Trivial Accept / Reject Lighting View transform Clipping Projection Rasterization Display

Rasterization

  • Visible Surface Determination

– Determine what is rendered where – Done in 2D camera space – Image precision vs object precision

  • Image Precision – determine for each pixel, what
  • bject is visible at the pixel
  • Object Precision – determine for each object, the

part of the object that is visible.

Image Precision

For each pixel in image { O = object that is closest draw pixel with appropriate color from O }

Object Precision

For each object in scene { determine parts of object non obscured draw these parts }

slide-4
SLIDE 4

Z-buffer

  • Visible surface algorithm to determine what
  • bject appears on a given pixel

– Image Precision Algorithm – Two frame buffers

  • One contains colors
  • One contains depth values (Z-buffer)

– Basic idea

  • Only calculate shading on object if depth is closer to

value at z-buffer

Z-buffer

  • Basic algorithm

Initialize frame buffer (to background) Initialize Z-buffer (to 0) For each polygon P { For each pixel p in polygon’s projection { z = P’s z at pixel p if (z > Zbuffer at that pixel) { zBuffer at pixel = z Frame buffer at pixel = calcColor() } }

Z-buffer

  • Applet

Z-buffer

Interpolation

Scan line p1 p2 p3

Gouraud Rendering Pipeline

Database traversal Model transform Trivial Accept / Reject Lighting View transform Clipping Projection Rasterization Display

Phong Rendering Pipeline

Database traversal Model transform Trivial Accept / Reject View transform Clipping Projection Rasterization and lighting Display

slide-5
SLIDE 5

List Priority Algorithms

  • Object precision and image-precision

– Sort polygons by z – Rasterize each polygon in order – Problems:

  • Polygons must not overlap in z
  • If they do, they must be split

To summarize

  • Local Illumination models

– Only considers first reflection of light with object – No shadows (unless you add them)

  • Shading vs. Illumination Models

– A shading model can use any illumination model – Phong was a busy guy!

  • Rasterization

– Scan conversion / Interpolation in 2D – Z-buffer

Next time

  • Global Illumination

– Rendering in the real world

  • Sampling Theory & Aliasing
  • Proposals due
  • Class Web Site:

– http://www.cs.rit.edu/~jmg/cgII

  • Any questions?