Download presentation
Presentation is loading. Please wait.
Published byDonna French Modified over 9 years ago
1
College of Computer and Information Science, Northeastern UniversityDecember 5, 20151 CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006 Lecture 8 – March 20, 2006
2
College of Computer and Information Science, Northeastern UniversityDecember 5, 20152 Today’s Topics Gouraud and Phong Shading --------------------------- Color Perception mostly ala Shirley et al. Light – Radiometry Color Theory Visual Perception --------------------------- Animation
3
College of Computer and Information Science, Northeastern UniversityDecember 5, 20153 Flat Shading A single normal vector is used for each polygon. The object appears to have facets. http://en.wikipedia.org/wiki/Phong_shading
4
College of Computer and Information Science, Northeastern UniversityDecember 5, 20154 Gouraud Shading Average the normals for all the polygons that meet a vertex to calculate its surface normal. Compute the color intensities at vertices base on the Lambertian diffuse lighting model. Average the color intensities across the faces. This image is licensed under the Creative CommonsCreative Commons Attribution License v. 2.5.Attribution License v. 2.5
5
College of Computer and Information Science, Northeastern UniversityDecember 5, 20155 Phong Shading Gouraud shading lacks specular highlights except near the vertices. Phong shading eliminates these problems. Compute vertex normals as in Gouraud shading. Interpolate vertex normals to compute normals at each point to be rendered. Use these normals to compute the Lambertian diffuse lighting. http://en.wikipedia.org/wiki/Phong_shading
6
College of Computer and Information Science, Northeastern UniversityDecember 5, 20156 Color Systems RGB CMYCMYK HVS YIQ CIE = XYZ for standardized color
7
College of Computer and Information Science, Northeastern UniversityDecember 5, 20157 Light – Radiometry Things You Can Measure Think of light as made up of a large number of photons. A photon has position, direction, and wavelength. is usually measured in nanometers 1 nm = 10 -9 m = 10 angstroms A photon has a speed c that depends only on the refractive index of the medium. The frequency f = c/. The frequency does not change with medium.
8
College of Computer and Information Science, Northeastern UniversityDecember 5, 20158 Spectral Energy The energy q of a photon is given by h = 6.63*10 -34 Js, is Plank’s Constant.
9
College of Computer and Information Science, Northeastern UniversityDecember 5, 20159 Spectral Energy We just use small for computation, but not so that the quantum nature of light interferes. For theory we let 0.
10
College of Computer and Information Science, Northeastern UniversityDecember 5, 201510 Radiance Radiance and spectral radiance describe the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle in a specified direction. Radiance characterizes total emission or reflection, while spectral radiance characterizes the light at a single wavelength or frequency. http://en.wikipedia.org/wiki/Radiance
11
College of Computer and Information Science, Northeastern UniversityDecember 5, 201511 Radiance Definition Radiance is defined by where the approximation holds for small A and Ω, L is the radiance (W·m -2 ·sr -1 ), Φ is the radiant flux or power (W), θ is the angle between the surface normal and the specified direction, A is the area of the source (m 2 ), and Ω is the solid angle (sr). The spectral radiance (radiance per unit wavelength) is written L λ.
12
SISI radiometry units edit QuantitySymbolSI unitAbbr.Notes Radiant energy QjouleJenergy Radiant fluxΦwattWradiant energy per unit time, also called radiant power Radiant intensity Iwattwatt per steradian steradian W·sr −1 power per unit solid angle RadianceLwattwatt per steradian per square metre steradiansquare metre W·sr −1 ·m −2 power per unit solid angle per unit projected source area. Sometimes confusingly called "intensity". Retrieved from "http://en.wikipedia.org/wiki/Radiance"http://en.wikipedia.org/wiki/Radiance
13
IrradianceEwattwatt per square metre square metre W·m −2 power incident on a surface. Sometimes confusingly called "intensity".intensity Radiant emittanceRadiant emittance / Radiant exitance Mwattwatt per square metre square metre W·m −2 power emitted from a surface. Sometimes confusingly called "intensity".intensity Spectral radiance L λ or L ν wattwatt per steradian per metre 3 or steradian metre wattwatt per steradian per square metre per Hertzsteradiansquare metreHertz W·sr −1 ·m −3 or W·sr −1 ·m −2 ·Hz −1 commonly measured in W·sr −1 ·m −2 ·nm −1 Spectral irradiance E λ or E ν wattwatt per metre 3 or watt per square metre per hertz metre watt square metrehertz W·m −3 or W·m −2 ·Hz −1 commonly measured in W·m −2 ·nm −1 http://en.wikipedia.org/wiki/Radiance
14
College of Computer and Information Science, Northeastern UniversityDecember 5, 201514 Photometry Usefulness to the Human Observer Given a spectral radiometric quantity f r ( ) there is a related photometric quantity where y is the luminous efficiency function of the human visual system. y is 0 for < 380 nm, the ultraviolet range. y then increases as increases until = 555 nm, pure green. y then decreases, reaching 0 when = 800 nm, the boundary with the infrared region.
15
College of Computer and Information Science, Northeastern UniversityDecember 5, 201515 1931 CIE Luminous Efficiency Function
16
College of Computer and Information Science, Northeastern UniversityDecember 5, 201516 Luminance Y is luminance when L is spectral radiance. lm is for lumens and W is for watts. Luminance describes the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle.
17
College of Computer and Information Science, Northeastern UniversityDecember 5, 201517 Color Given a detector, e.g. eye or camera, The eye has three type of sensors, cones, for daytime color vision. This was verified in the 1800’s. Wyszecki & Stiles, 1992 show how this was done.
18
College of Computer and Information Science, Northeastern UniversityDecember 5, 201518 Tristimulus Color Theory Assume the eye has three independent sensors. Then the response of the sensors to a spectral radiance A ( ) is If two spectral radiances A 1 and A 2 produce the same ( S, M, L), they are indistinguishable and called metamers. Blue receptors = Short Green receptors = Medium Red Receptors = Long
19
College of Computer and Information Science, Northeastern UniversityDecember 5, 201519 Three Spotlights R( ) G( ) B( ) Similarly for M R, M G, M B, L R, L G, L B.
20
College of Computer and Information Science, Northeastern UniversityDecember 5, 201520 Response to a Mixed Light rR( ) gG( ) bB( ) Scale the lights with control knobs and combine them to form A( ) = rR( ) + gG( ) + bB( ) The S response to A( ) is rS R + gS G + bS B.
21
College of Computer and Information Science, Northeastern UniversityDecember 5, 201521 rR( ) Matching Lights a subject uses control knobs to set the fraction of R( ), G( ), and B( ) to match the given color. Given a light with spectral radiance C( ), gG( ) bB( )
22
College of Computer and Information Science, Northeastern UniversityDecember 5, 201522 Matching Lights Assume the sensor responses to C( ) are (S C, M C, L C ), then S C = rS R + gS G + bS B M C = rM R + gM G + MS B L C = rL R + gL G + bL B Users could make the color matches. So there really are three sensors. But, there is no guarantee in the equations that r, g, and b are positive or less than 1.
23
College of Computer and Information Science, Northeastern UniversityDecember 5, 201523 Matching Lights Not all test lights can be matched with positive r, g, b. Allow the subject to mix combinations of R( ), G( ), and B( ) with the test color. If C( ) + 0.3R( ) matches 0·R( ) + gG( ) + bB( ) then r = -0.3. Two different spectra can have the same r, g, b. Any three independent lights can be used to specify a color. What are the best lights to use for standardizing color matching?
24
College of Computer and Information Science, Northeastern UniversityDecember 5, 201524 The Monochromatic Primaries The three monochromatic primaries are at standardized wavelengths of 700 nm (red) Hard to reproduce as a monchromatic beam, resulting in small errors. Max of human visual range. 546.1 nm (green) 435.8 nm (blue). The last two wavelengths are easily reproducible monochromatic lines of a mercury vapor discharge. –http://en.wikipedia.org/wiki/CIE_1931_color_space
25
College of Computer and Information Science, Northeastern UniversityDecember 5, 201525 CIE 1931 RGB Color Matching Functions How much of r, g, b was needed to match each.
26
College of Computer and Information Science, Northeastern UniversityDecember 5, 201526 CIE Tristimulus Values ala Shirley The CIE defined the XYZ system in the 1930s. The lights are imaginary. One of the lights is grey – no hue information. The other two lights have zero luminance and provide only hue information, chromaticity.
27
College of Computer and Information Science, Northeastern UniversityDecember 5, 201527 Chromaticity and Luminance Luminance Chromaticity
28
College of Computer and Information Science, Northeastern UniversityDecember 5, 201528 CIE 1931 xy Chromaticity Diagram Gamut and Location of the CIE RGB primaries
29
College of Computer and Information Science, Northeastern UniversityDecember 5, 201529 CIE XYZ color space 1.Color matching functions were to be everywhere greater than or equal to zero. 2.The color matching function = the photopic luminous efficiency function. 3.x=y=1/3 is the the white point. 4.Gamut of all colors is inside the triangle [1,0], [0,0], [0,1]. 5. = zero above 650 nm. http://en.wikipedia.org/wiki/CIE_1931_color_space
30
College of Computer and Information Science, Northeastern UniversityDecember 5, 201530 CIE 1931 Standard Colorimetric Observer XYZ Functions between 380 nm and 780 nm
31
College of Computer and Information Science, Northeastern UniversityDecember 5, 201531 XYZ Tristimulus Values for a Color with Spectral Distribution I( )
32
College of Computer and Information Science, Northeastern UniversityDecember 5, 201532
33
College of Computer and Information Science, Northeastern UniversityDecember 5, 201533 Adding R, G, and B Values http://en.wikipedia.org/wiki/RGB
34
College of Computer and Information Science, Northeastern UniversityDecember 5, 201534 RGB Color Cube (1, 1, 1) (1, 1, 0) (0, 0, 1) (0, 1, 1) (0, 1, 0) (1, 0, 1) (1, 0, 0)
35
College of Computer and Information Science, Northeastern UniversityDecember 5, 201535 CMYRGB CMY Complements of RGB CMYKCMYK are commonly used for inks. They are called the subtractive colors. Yellow ink removes blue light.
36
College of Computer and Information Science, Northeastern UniversityDecember 5, 201536 Subtractive Color Mixing
37
College of Computer and Information Science, Northeastern UniversityDecember 5, 201537 CMYKCMYRGB in Theory CMYK CMY RGB in Theory CMYK CMY C CMYK = (C, M, Y, K) CMY C M Y CMY C CMY = (C, M, Y) = (C(1 − K) + K, M(1 − K) + K, Y(1 − K) + K) RGB R G BCMY C RGB = (R, G, B) = (1 - C, 1 - M, 1 - Y) CMY = (1 – (C(1 − K) + K), 1 – (M(1 − K) + K), 1 – (Y(1 − K) + K))
38
College of Computer and Information Science, Northeastern UniversityDecember 5, 201538 RGB CMY CMYK in Theory RGB CMYK is not unique. RGB CMYK is not unique. RGB R G B C RGB = (R, G, B) CMY C M Y RGB C CMY = (C, M, Y) = (1 - R, 1 − G, 1 − B) C M Y == 1 then CMYK = (0, 0, 0, 1) if min(C, M, Y) == 1 then C CMYK = (0, 0, 0, 1) C M Y else K = min(C, M, Y) CMYK CMY C CMYK = ( (C − K)/(1 − K), (M − K) /(1 − K), (Y − K)/(1 − K), K) This uses as much black as possible.
39
College of Computer and Information Science, Northeastern UniversityDecember 5, 201539 CMYKCMYRGB in Practice CMYK CMY RGB in Practice RGBRGB is commonly used for displays. CMYKCMYK is commonly used for 4-color printing. CMYKCMYCMYK or CMY can be used for displays. CMYRGB CMY colours mix more naturally than RGB colors for people who grew up with crayons and paint. RGBPrinting inks do not have the same range as RGB display colors.
40
College of Computer and Information Science, Northeastern UniversityDecember 5, 201540 Time for a Break
41
College of Computer and Information Science, Northeastern UniversityDecember 5, 201541 Color Spaces RGB and CMYK are color models. A mapping between the color model and an absolute reference color space results a gamut, defines a new color space.
42
College of Computer and Information Science, Northeastern UniversityDecember 5, 201542 ADOBE RGB and RGBs
43
College of Computer and Information Science, Northeastern UniversityDecember 5, 201543 RGB vs CMYK Space
44
College of Computer and Information Science, Northeastern UniversityDecember 5, 201544 Blue RGB(0, 0, 255) converted in Photoshop to CMYK becomes CMYK(88, 77, 0, 0) = RGB(57, 83, 164).
45
College of Computer and Information Science, Northeastern UniversityDecember 5, 201545 Color Spaces for Designers Mixing colors in RGB is not natural. Mixing colors in CMY is a bit more natural but still not very intuitive. How do you make a color paler? How do you make a color brighter? How do you make this color? HSV (HSB) and HSL (HSI) are systems for designers.
46
College of Computer and Information Science, Northeastern UniversityDecember 5, 201546 HSV (Hue, Saturation, Value) HSB (Hue, Saturation, Brightness) Hue (e.g. red, blue, or yellow):Hue Ranges from 0-360 Saturation, the "vibrancy" or “purity” of the color:Saturation Ranges from 0-100% The lower the saturation of a color, the more "grayness" is present and the more faded or pale the color will appear. Value, the brightness of the color:Valuebrightness Ranges from 0-100%
47
College of Computer and Information Science, Northeastern UniversityDecember 5, 201547 HSV http://en.wikipedia.org/wiki/HSV_color_space http://en.wikipedia.org/wiki/HSV_color_space Created in the GIMP by Wapcaplet
48
College of Computer and Information Science, Northeastern UniversityDecember 5, 201548 HSV Cylinder
49
College of Computer and Information Science, Northeastern UniversityDecember 5, 201549 HSV Annulus
50
College of Computer and Information Science, Northeastern UniversityDecember 5, 201550 HSL Alexandre Van de Sander
51
College of Computer and Information Science, Northeastern UniversityDecember 5, 201551 RGB HSV Given (R, G, B) 0.0 R, G, B 1.0 MAX = max(R, G, B) MIN = min(R, G, B)
52
College of Computer and Information Science, Northeastern UniversityDecember 5, 201552 HSV RGB Given color (H, S, V) 0.0 H 360.0, 0.0 S, V 1.0 if S == 0.0 then R =G = B =V and H and S don’t matter. else
53
College of Computer and Information Science, Northeastern UniversityDecember 5, 201553 YIQ NTSC Television YIQ is a linear transformation of RGB. exploits characteristics of human visual system maximizes use of fixed bandwidth provides compatibility with B&W receivers Y = 0.299R + 0.587G + 0.11B luminance I = 0.74(R - Y) - 0.27(B - Y) chrominance Q = 0.48(R - Y) + 0.41(B - Y) See http://en.wikipedia.org/wiki/YIQ and discussionhttp://en.wikipedia.org/wiki/YIQ
54
College of Computer and Information Science, Northeastern UniversityDecember 5, 201554 YIQ Y is all that is used for B&W TV B-Y and R-Y small for dark and low saturation colors Y is transmitted at bandwidth 4.2 MHz I at 1.3 MHz Q at.7 MHz.
56
College of Computer and Information Science, Northeastern UniversityDecember 5, 201556 Animation Keyframing Set data at key points and interpolate. Procedural Let mathematics make it happen. Physics-based Solve differential equations Motion Capture Turn real-world motion into animation.
57
College of Computer and Information Science, Northeastern UniversityDecember 5, 201557 Key Principles of Animation John Lasseter 1987 Squash and stretch Timing Anticipation Follow through and overlapping action Slow-in and slow-out Staging Arcs Secondary action Straight ahead and pose-to-pose action Exaggeration Solid drawing skill Appeal »Siggraph web referenceSiggraph web reference
58
College of Computer and Information Science, Northeastern UniversityDecember 5, 201558 PowerPoint Animation
59
College of Computer and Information Science, Northeastern UniversityDecember 5, 201559 Animated gif Johan Ovlinger’s Trip to Earth and Back
60
College of Computer and Information Science, Northeastern UniversityDecember 5, 201560 Pyramid of 35 Spheres Rendered by Blotwell using POV-Ray and converted with Adobe ImageReady.Blotwell
61
College of Computer and Information Science, Northeastern UniversityDecember 5, 201561 Deformation
62
College of Computer and Information Science, Northeastern UniversityDecember 5, 201562 Blender free software, under the terms of the GNU General Public License
63
College of Computer and Information Science, Northeastern UniversityDecember 5, 201563 Character Animation
64
College of Computer and Information Science, Northeastern UniversityDecember 5, 201564 Physics-Based Animation http://www.cs.ubc.ca/labs/imager/imager-web/Research/images/michiel.gif
65
College of Computer and Information Science, Northeastern UniversityDecember 5, 201565 Flash Animation Power of the Geek
66
College of Computer and Information Science, Northeastern UniversityDecember 5, 201566 Keyframing A frame is one of the many still images that make up a moving picture. A key frame is a frame that was drawn or otherwise constructed directly by the user. In hand-drawn animation, the senior artist would draw these frames; an apprentice would draw the "in between" frames. In computer animation, the animator creates only the first and last frames of a simple sequence; the computer fills in the gap. This is called in-betweening or tweening.
67
College of Computer and Information Science, Northeastern UniversityDecember 5, 201567 Flash Basics Media objects graphic, text, sound, video objects The Timeline when specific media objects should appear on the Stage ActionScript code programming code to make for user interactions and to finely control object behavior
68
College of Computer and Information Science, Northeastern UniversityDecember 5, 201568 Lord of the Rings Inside Effects
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.