color week 5 fri feb 4
play

Color Week 5, Fri Feb 4 http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005 - PowerPoint PPT Presentation

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Color Week 5, Fri Feb 4 http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005 Review: Shading Models flat shading compute Phong lighting once for entire


  1. University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Color Week 5, Fri Feb 4 http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005

  2. Review: Shading Models  flat shading  compute Phong lighting once for entire polygon  Gouraud shading  compute Phong lighting at the vertices and interpolate lighting values across polygon  Phong shading  compute averaged vertex normals  interpolate normals across polygon and perform Phong lighting across polygon 2

  3. Correction: Phong Shading  linearly interpolating surface normal across the facet, applying Phong lighting model at every pixel  same input as Gouraud shading  pro: much smoother results  con: considerably more expensive  not the same as Phong lighting  common confusion  Phong lighting: empirical model to calculate illumination at a point on a surface 3

  4. Review/Correction: Non-Photorealism  draw silhouettes and creases ( n 0 ⋅ n 1 ) ≤ threshold  cool-to-warm shading http://www.cs.utah.edu/~gooch/SIG98/paper/drawing.html 4

  5. Computing Normals  per-vertex normals by interpolating per-facet normals  OpenGL supports both  computing normal for a polygon b c a 5

  6. Computing Normals  per-vertex normals by interpolating per-facet normals  OpenGL supports both  computing normal for a polygon  three points form two vectors b b-c c a-b a 6

  7. Computing Normals  per-vertex normals by interpolating per-facet normals  OpenGL supports both  computing normal for a polygon  three points form two vectors b (a-b) x (b-c)  cross: normal of plane b-c c a-b a 7

  8. Computing Normals  per-vertex normals by interpolating per-facet normals  OpenGL supports both  computing normal for a polygon  three points form two vectors b (a-b) x (b-c)  cross: normal of plane  which side of plane is up? b-c c  counterclockwise a-b point order convention a 8

  9. University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Color

  10. Basics Of Color  elements of color: 10

  11. Basics of Color  Physics:  Illumination  Electromagnetic spectra  Reflection  Material properties  Surface geometry and microgeometry (i.e., polished versus matte versus brushed)  Perception  Physiology and neurophysiology  Perceptual psychology 11

  12. Electromagnetic Spectrum 12

  13. White Light  Sun or light bulbs emit all frequencies within the visible range to produce what we perceive as the "white light" 13

  14. Sunlight Spectrum 14

  15. White Light and Color  when white light is incident upon an object, some frequencies are reflected and some are absorbed by the object  combination of frequencies present in the reflected light that determinses what we perceive as the color of the object 15

  16. Hue  hue (or simply, "color") is dominant wavelength  integration of energy for all visible wavelengths is proportional to intensity of color 16

  17. Saturation or Purity of Light  how washed out or how pure the color of the light appears  contribution of dominant light vs. other frequencies producing white light 17

  18. Intensity vs. Brightness  intensity : radiant energy emitted per unit of time, per unit solid angle, and per unit projected area of the source (related to the luminance of the source)  brightness : perceived intensity of light 18

  19. Humans and Light  when we view a source of light, our eyes respond respond to  hue: the color we see (red, green, purple)  dominant frequency  saturation: how far is color from grey  (pink is less saturated than red, sky blue is less saturated than royal blue)  brightness: how bright is the color  how close is the color to white or black  how bright are the lights illuminating the object? 19

  20. Physiology of Vision  the eye:  the retina  rods  cones  color! 20

  21. Physiology of Vision  center of retina is densely packed region called the fovea .  cones much denser here than the periphery 21

  22. Trichromacy  three types of cones  L or R, most sensitive to red light (610 nm)  M or G, most sensitive to green light (560 nm)  S or B, most sensitive to blue light (430 nm)  color blindness results from missing cone type(s) 22

  23. Metamers  a given perceptual sensation of color derives from the stimulus of all three cone types  identical perceptions of color can thus be caused by very different spectra 23

  24. Metamer Demo http://www.cs.brown.edu/exploratories/freeSoftware/catalogs/color_theory.html  24

  25. Adaptation, Surrounding Color  color perception is also affected by  adaptation (move from sunlight to dark room)  surrounding color/intensity:  simultaneous contrast effect 25

  26. Bezold Effect  impact of outlines 26

  27. Color Constancy 27

  28. Color Constancy 28

  29. Color Constancy 29

  30. Color Constancy 30

  31. Color Constancy 31

  32. Color Constancy 32

  33. Color Constancy  automatic “white balance” from change in illumination  vast amount of processing behind the scenes!  colorimetry vs. perception 33

  34. Color Spaces  three types of cones suggests color is a 3D quantity. how to define 3D color space?  idea: perceptually based measurement  shine given wavelength ( λ ) on a screen  user must control three pure lights producing three other wavelengths (say R=700nm, G=546nm, and B=436nm) ν adjust intensity of RGB until colors are identical  this works because of metamers! 34

  35. Negative Lobes  exact target match with phosphors not possible  some red had to be added to target color to permit exact match using “knobs” on RGB intensity output of CRT  equivalently (theoretically), some red could have been removed from CRT output  figure shows that red phosphor must remove some cyan for perfect match  CRT phosphors cannot remove cyan, so 500 nm cannot be generated 35

  36. Negative Lobes  can’t generate all other wavelenths with any set of three positive monochromatic lights!  solution: convert to new synthetic coordinate system to make the job easy 36

  37. CIE Color Space  CIE defined three “imaginary” lights X, Y, and Z, any wavelength λ can be matched perceptually by positive combinations Note that: X ~ R Y ~ G Z ~ B 37

  38. Measured vs. CIE Color Spaces measured basis  transformed basis  monochromatic lights   “imaginary” lights physical observations   all positive, unit area negative lobes   Y is luminance 38

  39. CIE Color Space Gamut  the gamut of all colors perceivable is thus a three- dimensional shape in X,Y,Z  color = X’ X + Y’ Y + Z’ Z 39

  40. RGB Color Space (Color Cube)  define colors with (r, g, b) amounts of red, green, and blue  used by OpenGL  RGB color cube sits within CIE color space something like this  subset of perceivable colors 40

  41. CIE Chromaticity Diagram (1931) For simplicity, we often project to the 2D plane X’+Y’+Z’=1 X’ = X’ / (X’+Y’+Z’) Y’ = Y’ / (X’+Y’+Z’) Z’ = 1 – X’ – Y’ 41

  42. Device Color Gamuts  use CIE chromaticity diagram to compare the gamuts of various devices 42

  43. Device Color Gamuts  Since X, Y, and Z are hypothetical light sources, no real device can produce the entire gamut of perceivable color  Example: CRT monitor 43

  44. Gamut Mapping 44

  45. YIQ Color Space  YIQ is the color model used for color TV in America. Y is brightness, I & Q are color  note: Y is the same as CIE’s Y  result: use the Y alone and backwards compatibility with B/W TV! 45

  46. Converting Color Spaces  converting between color models can also be expressed as a matrix transform Y 0 . 30 0 . 59 0 . 11 R             I 0 . 60 0 . 28 0 . 32 G = − −       Q 0 . 21 0 . 52 0 . 31 B       −        note the relative unimportance of blue in computing the Y 46

  47. HSV Color Space  a more intuitive color space  H = Hue Saturation Value  S = Saturation  V = Value (or brightness) Hue 47

  48. Simple Model of Color  based on RGB triples  surface interactions also simplified 48

  49. 49

  50. The Gamma Problem  device gamma  monitor: I = A(k 1 D+k 2 V) γ  typical monitor γ =2.5  LCD: nearly linear  OS gamma  defined by operating system  inverse gamma curve I 1/ γ  “gamma correction” 50

  51. Display System Gamma  product of device and OS curves  divide device by OS gamma PC Mac SGI  γ DS = γ D (1/ γ OS ) 1.0 1.4 1.7 Default OS Gamma  display system gamma varies PC Mac SGI  different devices, different OS 2.2 1.6 1.3  nonlinear Default DS Gamma  viewing conditions also affect perception of “gamma” 51

  52. Intensity Mapping 52

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend