Light and Color (Part 1 of 2)
CS-116A: Introduction to Computer Graphics
Instructor: Rob Bruce
Fall 2015

SLIDE 1: Diffuse Reflection

Illustration of diffuse reflection of light rays

Image source: http://twistedphysics.typepad.com/.a/6a00d8341c9c1053ef0115707a8bf0970b-pi

SLIDE 2: Specular Reflection

Illustration of specular reflection of light rays.

Image source: https://emmybella.files.wordpress.com/2009/12/specular-reflection.gif

SLIDE 3: Teapot: Ambient Reflection

Silhouette of a teapot illuminated by ambient reflected light.

Image source: https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting-ambient.png

SLIDE 4: Teapot: Diffuse Reflection

Teapot illuminated by diffuse reflected light.

Image source: https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting-diffuse.png

SLIDE 5: Teapot: Specular Reflection

Teapot illuminated by specular reflected light.

Image source: https://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting-specular.png

SLIDE 6: Combining Ambient, Diffuse, and Specular reflection

Four blue spheres illustrating different reflective properties of light: ambient, diffuse, specular, and combination of all three reflections.

Image sources:
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/sphereemis.gif
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/sphere.gif
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/spherespec2.gif
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/spherespec.gif

SLIDE 7: Flat shading vs. Smooth shading

Objects with flat and smooth shading

Image sources:
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/sceneflat.gif
https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/diagrams/scenesmooth.gif

SLIDE 8: Flat shading vs. Phong shading

Blue sphere with flat shading adjacent to blue sphere with Phong shading

Image source: https://upload.wikimedia.org/wikipedia/commons/8/84/Phong-shading-sample.jpg

  • Also known as a Phong interpolation.
  • Notice the smooth lighting surface this shader achieves (right).

SLIDE 9: Gouraud shading

Gouraud shading with specular highlight on two red spheres: one sphere with low polygon count versus the other sphere with high polygon count

Image sources:
https://upload.wikimedia.org/wikipedia/commons/a/af/Gouraud_low_anim.gif
https://upload.wikimedia.org/wikipedia/commons/6/69/Gouraud_high.gif

  • Similar to Phong shading with interpolated lighting across surface.
  • Weakness is in the interpolation method as seen here on the specular highlight.
  • Image on left is low polygon count while image on right has high polygon count.
  • The specular highlight looks more realistic on high polygon count model (right).

SLIDE 10: Sources of light

  • Ambient light
    no identifiable light source or direction
  • Point light
  • Distance light
    light source from a single direction
  • Spotlight

SLIDE 11: Point light

Two images combined. Left image is an illustration of a point light. Right image is an example of a point light source: a lit candle.

Image source: http://www.tomdalling.com/images/posts/modern-opengl-06/point-light.jpg

SLIDE 12: Spotlight

Illustration of a spotlight with cut-off angle and radial attenuation.

Image source: http://www.web3d.org/documents/specifications/19775-1/V3.2/Images/spotlight.gif

  • Spotlight: A cone of light defined by a cut-off angle and radial attenuation.

SLIDE 13: Spotlight example

Computer graphic rendering of a teapot and a toroid with a spotlight as a light source

Image source: https://www.packtpub.com/graphics/9781849514767/graphics/4767_03_10.jpg

SLIDE 14: Distant light

Illustration of light rays all traveling in parallel from a distant light source

Image source: http://www.cs.kent.edu/~farrell/cg02/lectures/color/an06f12.gif

  • If the light source is far from the surface, the direction of light is uniform across the entire surface.
  • Example: The sun

SLIDE 15: Color models and Color encoding schemes

  • Color models:
    • RGB: Red, Green, Blue (an additive model)
    • CMY or CMYK: Cyan, Magenta, Yellow (a subtractive model). The K denotes black.
    • HSV: Hue, Saturation, Value
  • Encoding schemes (broadcast video and television):
    • YIQ (used in NTSC broadcasting)
    • YUV (used in PAL broadcasting)

CMYK is used in printing industry.
YIQ is denoted as a color model in our book.
NTSC = National Television System Committee
PAL = Phase Alternating Line

SLIDE 16: Additive colors: RGB

Venn Diagram of red, green, and blue as an additive color model

Image source: https://upload.wikimedia.org/wikipedia/commons/c/c2/AdditiveColor.svg

  • Venn Diagram of red (R), green (G), and blue (B).
  • This is an additive color space.
  • Note the colors created in the overlap of red, green, and blue.

SLIDE 17: Subtractive colors: CMY

Venn Diagram of cyan, magenta, and yellow as a subtractive color model

Image source: https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/SubtractiveColor.svg/400px-SubtractiveColor.svg.png

  • Venn Diagram of cyan (C), magenta (M), and yellow (Y)
  • This is a subtractive color space.
  • Note the colors created in the overlap of cyan, magenta, and yellow.

SLIDE 18: HSV colorspace

Illustration of a hue, saturation, value color model

Image source: https://upload.wikimedia.org/wikipedia/commons/0/0d/HSV_color_solid_cylinder_alpha_lowgamma.png

SLIDE 19: Next lecture...

  • Surface opacity
    • Refraction in transparent materials
    • Light emission from materials (e.g. "glow")
  • Lighting effects
    • Bump maps
  • Material properties
    • Texture maps
  • Rendering
    • Ray tracing
    • Global illumination

SLIDE 20: Interesting link

Robert Bruce

Contact and Office hours

Education

Research interests


Research

Publications

Graduate supervision

Undergraduate supervision


Courses

Fall 2015, CS-116A:

Greensheet

Lectures

  • Light and Color (part 1 of 2)
  • Light and Color (part 2 of 2)
  • Introduction to OpenGL and GLUT
  • Dissection of OpenGL/GLUT programming examples in C
  • Dissection of OpenGL/GLUT programming examples in Java
  • Splines
  • Meshes: Vertices, Edges, and Faces
  • Camera and clipping plane
  • Linear transformations
  • Interactive program to adjust frustum, near, and far clipping planes
  • Metaballs and Blobbies
  • Graphics File Formats
  • Accelerated Graphics Hardware (GPU)
  • GLSL: OpenGL Shading Language (part 1 of 2)
  • GLSL: OpenGL Shading Language (part 2 of 2)
  • Squash, Stretch, and Bounce: The twelve principles of animation
  • Introduction to Blender
  • Character Rigging for animation
  • Algorithmic animation and modelling (part 1 of 2)
  • Algorithmic animation and modelling (part 2 of 2)
  • Introduction to Computer Vision
  • Introduction to WebGL

Assignments:


Other

Valid XHTML 1.0 Strict Valid CSS!