Graphics The Rasterization Pipeline Projection, Visibility, & Shading

Size: px
Start display at page:

Download "Graphics The Rasterization Pipeline Projection, Visibility, & Shading"

Transcription

1 Graphics 2014 The Rasterization Pipeline Projection, Visibility, & Shading

2 Practicals this week Tuesday (today) Announcements Tue 9-11 (was held) Tue canceled (programming contest) Wednesday (tomorrow) Wed 15-17: additional practical slot We 17-19: additional practical slot Thursday: no practicals

3 Addendum: Matrix Algebra CORE core topics important

4 Transposition T = Matrix Transposition Swap rows and columns In other words: Flip around diagonal Formally: a i,j T = a j,i

5 Othogonal Matrices Orthogonal Matrices (i.e., column vectors orthonormal) M T = M 1 Proof: next three slides

6 Matrix Multiplication General matrix products: k B A: possible if #Row(A) = #Columns(B) B m A m n n k R = B A A = B = R = a 1,1 a 1,n a m,1 a m,n b 1,1 b 1,m b k,1 b k,m r 1,1 r 1,n r k,1 r k,n r i,j = m q=1 a q,j b i,q

7 Matrix Multiplication Matrix Multiplication = a 1 a d = A B a i, b j b 1 b d Scalar products of rows and columns

8 Othogonal matrices: = = Matrix Multiplication a 1 a d a i, a j A T A = a 1 a d a 1 = I a 2

9 Transposition Rules Transposition Multiplication: Inversion: A B T = B T A T A B 1 = B 1 A 1 Inverse-transp.: A T 1 = A 1 T Othogonality: A T = A 1 A is orthogonal

10 Homogeneous Coordinates (short version) CORE core topics important

11 Problem Translations are not linear x Mx cannot encode translations Proof: Origin cannot be moved: m 11 m 12 m 13 0 M 0 = m 21 m 22 m 23 0 m 31 m 32 m 33 0 = 0 0 0

12 Homogeneous Coordinates Solution: Just add a constant one Increase dimension R d R d+1 Last entry = 1 in vectors Cheap Trick, Evil Hack M x = = m 11 m 12 m 13 t 1 m 21 m 22 m 23 t 2 m 31 m 32 m 33 t M t x 1 = x y z 1 Mx + t 1

13 Homogeneous Coordinates General case M x = m 11 m 12 m 13 m 14 m 21 m 22 m 23 m 24 m 31 m 32 m 33 m 34 m 41 m 42 m 43 m 44 x y z 1 = x y z w w might be different from 1 Convention: Divide by w-coord. before using Result: x /w y /w z /w 1

14 Homogeneous Coordinates General case M x = m 11 m 12 m 13 m 14 m 21 m 22 m 23 m 24 m 31 m 32 m 33 m 34 m 41 m 42 m 43 m 44 x 1 x 2 x 3 1 = y 1 y 2 y 3 y 4 y 1 /y 4 y 2 /y 4 y 3 /y 4 1 Can express divisions by common denominator Rules: y 4 = m 41 x 1 + m 42 x 2 + m 43 x 3 + m 44 x 4 Before using as 3D point, divide by last (4th) entry No normalization required during subsequent transformations (matrix-mult.)

15 Projective Geometry The Full Story? Not just an evil hack Deep & interesting theoretical background More on this later For simplicity We ll treat it as a computational trick for now Focus on the graphics application Remember for now: We can build 4D Translation matrices for 3D+1 points We can divide by a common linear factor

16 Now for 3D Rendering

17 3D Rendering Overview BASIC basic topics study completely

18 3D Computer Graphics Three main aspects Modeling Describe 3D geometry mathematically From machine parts (e.g., CAD) To natural phenomena (e.g., fractals) Animation Set scenes into motion Simple: Camera fly-through Complex: Fluid simulation, human motion Rendering Convert geometry into images Our Focus right now

19 3D Rendering Assumption 3D Model is given Triangle mesh (for simplicity) How do we get it to the screen?

20 Upcoming Topics Agenda Modeling: mesh representation Physics: Perspective projection Rendering: Two main rendering methods Rasterization Perspective projection Rasterization Visibility Shading Programmable shaders / GPUs Raytracing

21 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

22 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

23 Modeling Mesh Representation BASIC basic topics study completely

24 Modeling Shapes Primitives Elementary geometric building blocks Easy to handle directly Complex models Sets of primitives Approximate shapes with primitives yep, triangles! Most-frequently-used Triangles!

25 Simple Triangle List Vertex list Vector3D vertices[n]; (1) p 1 = (x 1, y 1, z 1 ) (2) p 2 = (x 2, y 2, z 2 ) (3) p 3 = (x 3, y 3, z 3 ) (4) p 4 = (x 4, y 4, z 4 ) Triangle list (int[3]) triangles[m]; (1) t 1 = (i 1, j 1, k 1 ) (2) t 2 = (i 2, j 2, k 2 ) (3) t 3 = (i 3, j 3, k 3 ) (m) t m = (i m, j m, k m ) (n) p n = (x n, y n, z n )

26 Modeling a Triangle Triangle p 2 p 1 t 1 t 2 p 3 Parametric Plane Equation (with constraints) 0 Triangles: x λ, μ = p 1 + λt 1 + μt 2 = p 1 + λ p 2 p 1 + μ p 3 p 1 0 λ 1, 0 μ 1, μ + λ 1

27 Attributes How to define a triangle? We need three points in R 3 But we can have more: per-vertex normal per-vertex color texture per-vertex texture coordinates (etc...)

28 Complete Data Structures Multiple Arrays: Vertices, Triangles, Edges v 1 : (posx posy posz), attrib 1,..., attrib n... v N : (posx posy posz), attrib 1,..., attrib n e 1 : (index 1 index 2 ), attrib 1,..., attrib k... e K : (index 1 index 2 ), attrib 1,..., attrib k edges: optional t 1 : (idx 1 idx 2 idx 3 ), attrib 1,..., attrib m... t M : (idx 1 idx 2 idx 3 ), attrib 1,..., attrib m

29 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

30 Physics Ray Optics & Color CORE core topics important

31 Ray Optics Geometric ray model Light travels along rays

32 Ray Optics Geometric ray model Rays have intensity and color

33 Ray Optics reddish gray with a tint of green bluish 700nm 390nm wavelength λ Color spectrum Continuous spectrum Intensity for each wavelength

34 Human Vision greenish reddish low light (monochrome) bluish Color spectrum 700nm 390nm wavelength λ (curves: schematic, not accurate) Two types of receptive cells (color/low-light) Three types of color cells

35 y-coord. Bitmap (Pixel Display) RGB Model Screen: w h discrete pixels Origin: usually upper left Varying color per pixel RGB Model Every pixel can emit red, green, blue light Intensity range: Usually: bytes = dark 255 = maximum brightness h 1 0 x-coord. w 1 h w

36 Human Vision (ideal) monitor: emitted spectra Response curves: human eye 700nm 390nm wavelength λ Create color impressions Basis for three-dimensional color space Wide spacing, narrow bands: purer colors Otherwise: washed out colors (curves: schematic, not accurate)

37 Physics Perspective Projection BASIC basic topics study completely

38 Pinhole Camera Pinhole camera Create image by selecting rays of specific angles Low efficiency (small holes for sharp images)

39 Pinhole Camera Pinhole camera Create image by selecting rays of specific angles Low efficiency (small holes for sharp images)

40 Central Projection Pinhole Camera

41 Pinhole Camera y y f z Central projection x = f x z Proof: Intercept theorem! y = f y z

42 (Actual Camera) Camera with Lens Higher efficiency (bundles many rays) Finite Depth of field We will consider pinhole cameras only.

43 Pinhole Camera y y x = f x z f z y = f y z Undetermined degree of freedom Focal length vs. image size Source of a lot of confusion!

44 Pinhole Camera α f h Parameters h - size of the screen (pixels, cm, ±1.0,...) f focal length (classical photography) Meaningful parameter: α viewing angle

45 Pinhole Camera α f h Relation: tan α 2 = h 2f

46 Pinhole Camera α h h h f f f Invariance tan α 2 = h 2f = h 2f = h 2f Scaling h and f by a common factor: no change

47 Pinhole Camera α f h Typical choices (vertical angles) Normal perspective: α 30 ( 50mm lens: 27 ) Tele photography: Wide angle lens: α 5 20 (275 70mm) α (28 12mm)

48 General Camera y y x = f x z f z y = f y z Our camera so far: Focus point: origin View direction: z-axis General position/orientation?

49 Homogeneous Coordinates x y z w = f f Projection Matrix P x y z 1 x = f x z y = f y z z = z 1 z w = z Write in homogeneous coordinates Third row is arbitrary (for now), not used.

50 View transform α h h f Reminder: tan α 2 = h 2f

51 To Screen Coordinates 1 tan α tan α Scale to unit screen coordinates We set f to 1 in previous matrix Third row is arbitrary (for now), not used normalized screen coordinates

52 Aspect Ratio 1 w h tan α tan α Non-square screens? Screen: w h pixels Aspect ratio w h Different horizontal angle! h 1 1 w 1 non-square screen normalized screen coordinates

53 y-coord. To Screen Coordinates w/2 0 0 w/2 0 h/2 0 h/ x-coord. w Scale to pixels Third row is arbitrary (for now), not used. h 1 0 h 1 w 1

54 To Screen Coordinates h/2 w/2 tan α 0 0 tan α h/2 h/2 tan α 0 tan α a 1 b Overall Multiple both a = z far + z near z near z far b = 2 z near z far z near z far Additionally: Also scale + shift such that z = z 1 z are in value [0..1] for inputs z [z near, z far ]

55 Summary Projection matrix P = f f Projection & conversion to screen coords P s = w/2 0 0 w/2 0 h/2 0 h/ w h tan α tan α (f = 1) scaling to pixels, upper left origin normalized screen coord s projection matrix

56 Alternative (1) Alternative formulation: Only two steps P s = w/2 0 0 w/2 0 h/2 0 h/ w h tan α tan α scaling to pixels, upper left origin normalized screen coord s & projection matrix Different scale factors (not a focal length) Use two different scale factors f x = 1 w h tan α 2, f y = 1 tan α 2

57 Alternative (2) Another Alternative Formulation w h P s = + w h h/2 0 0 w/2 0 h/2 0 h/ scaling to pixels, upper left origin 1 tan α tan α vertically normalized screen coord s Constant focal length f = 1 tan α 2 Intermediate result not normalized to 1,1 2 & projection matrix

58 Alternatives All three derivations lead to the same result Intermediate results not used all equivalent Product of the 2/3 matrices is the same Intermediate results being used: Some graphics APIs (e.g., OpenGL) do use normalized device coordinates as intermediate OpenGL for pixels to appear on screen: x [ 1,1] y [ 1,1] z [0,1) w z near, z far coupled, so this is the same criterion

59 general camera General Camera object of interest y x z camera in origin, view in z-direction

60 general camera v General Camera c u w object of interest y x z camera in origin, view in z-direction

61 general camera v General Camera Camera coordinate system u, v, w u Origin: c w c y x z Standard coordinates x, y, z = 1 0 0, 0 1 0, camera in origin, view: z-direction

62 c v u w Derivation y x z

63 Derivation y x Same effect: Transform the world with inverse camera transform z c v u w u v w = u v w 1

64 Derivation y x Transform: p u v w 1 p c z c v u w u v w = u v w 1

65 Derivation y x Transform: u p v w u, v, w orthogonal! p c z c v u w u v w = u v w 1

66 General Camera general camera u y c x r z v Camera coordinate system u, r, v Origin: c Transform: u p v w (p c) Standard coordinates x, y, z = 1 0 0, 0 1 0, camera in origin, view: z-direction

67 general camera y c x u r z General Camera v Camera coordinate system u, r, v Origin: c Homogeneous: p u v c w c = p u v w c

68 Summary Projection (screen coord s) P s = h/2 0 0 w/2 0 h/2 0 h/ Add View Matrix 1 tan α tan α (f = 1) Benefit: Still only one overall 4 4 matrix to multiply with! P s u v c w

69 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

70 Visibility Algorithms BASIC CORE basic topics study completely core topics important

71 Rasterization Two Rendering Pipelines Project all triangles to the screen Rasterize them (convert to pixels) Determine visibility Apply shading (compute color) Raytracing Iterate over all pixels Determine visible triangle Compute shading, color pixel

72 Triangle / Polygon Rasterization Observations Straight lines remain straight! Triangles mapped to triangles After Perspective Projection Polygons to polyogns

73 3D Scene Rasterization Visiblity preprocessing or during rasterization Projection Visibility Rasterization

74 Raytracing 3D Scene

75 Comparison Rasterization FOR (each triangle) { } compute pixels covered ( fragments ) FOR (all fragments) { } fragment visible? IF (visible) { } shade fragment write color Raytracing FOR (each pixel) { compute visible triangle IF (found) { shade fragment write color } }

76 Focus for now: Rasterization Rasterization (Raytracing covered later) Two main algorithms Painter s algorithm (old) Simple version Correct version z-buffer algorithm Dominant real-time method today

77 Painter s Algorithm CORE core topics important

78 Painters Algorithm Painter s Algorithm Sort primitives back-to-front Draw with overwrite Drawbacks Slowish O(n log n) for n primitives Millions per second Wrong Not guaranteed to always work

79 Counter Example Correct Algorithm Need to cut primitives Several strategies Notable: BSP Algorithm in Quake Old graphics textbooks list many variants No need for us to go deeper

80 z-buffer Algorithm BASIC basic topics study completely

81 Algorithm Store depth value for each pixel z-buffer Algorithm Initialize to MAX_FLOAT Rasterize all primitives Compute fragment depth & color Do not overwrite if fragment is farer away than the one stored the one in the buffer color depth

82 Advantages Extremely simple Discussion: z-buffer Versatile only primitive rasterization required Very fast GeForce 2 Ultra: 2GPixel /sec (release year: 2000) GeForce 700 GTX Titan: 35 GPixel / sec (release year: 2013)

83 Disadvantages Discussion: z-buffer Extra memory required This was a serious in obstacle back then... Invented 39 years ago (1974; Catmull / Straßer) Only pixel resolution Need painter s algorithm for certain vector graphics computations No transparency This is a real problem for 3D games / interactive media Often fall-back to sorting Solution: A-Buffer, but no hardware support

84 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

85 Shading Models CORE core topics important

86 Reflectance Models mirror glossy surface diffuse surface

87 Interaction with Surfaces Viewer v n Light l object surface Local Shading Model Single point light source Shading model / material model Formalization: BRDF Input: light vector l = pos light pos object Input: view vector v = pos camera pos object Input: surface normal n (orthogonal to surface) Output: color (RGB)

88 Interaction with Surfaces Viewer v n Light l object surface General scenario Multiple light sources? Light is linear Multiple light sources: add up contributions Double light strength double light output Formalization: BRDF

89 Simplify notation Remark Define component-wise vector product x 1 y 1 x 1 y 1 x y = x 2 x 3 y 2 y 3 x 2 y 2 x 3 y 3 No fixed convention in literature The symbol only used in these lecture slides!

90 Lighting Calculations Remark Need to perform calculations for r, g, b-channels Often: output r = light r material r function v, l, n output g = light g material g function(v, l, n) output b = light b material b function(v, l, n) Shorter output = light_strength material function v, l, n

91 Area Light Sources Area Light Sources Integrate over area In practice often: Sample with many point-light sources Add-up contributions n light sources 1 n intensity v n l

92 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

93 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

94 Diffuse ( Lambertian ) Surfaces n surface normal n θ n θ Equation (set to zero if negative) c ~ cos θ Less light received at flat angles c = c r c l cos θ light color surface color c intensity (scalar) c color (RGB, R 3 ) c r surface color (RGB) c l light color (RGB)

95 Diffuse ( Lambertian ) Surfaces n surface normal n θ n θ Equation c ~ cos θ Less light received at flat angles Attenuation: (point lights) 1 dist 2 c = c r c l cos θ 1 dist 2 light color surface color c intensity (scalar) c color (RGB, R 3 ) c r surface color (RGB) c l light color (RGB) 1 dist 2

96 Diffuse Reflection Diffuse Reflection Very rough surface microstructure Incoming light is scattered in all directions uniformly Diffuse surface (material) Lambertian surface (material)

97 Surface Normal? What is a surface normal? Tangent space: Plane approximation at a point x S Normal vector: Perpendicular to that plane Oriented surfaces: Pointing outwards (by convention) Orientation defined only for closed solids S tangent space surface normal n x R 3 point x

98 Triangles p 2 n p 3 Single Triangle Parametric equation p 1 p 1 + λ p 2 p 1 + μ p 3 p 1 λ, μ R Tangent space: the plane itself Normal vector p 2 p 1 p 3 p 1 Orientation convention: p 1, p 2, p 3 oriented counter-clockwise Length: Any positive multiple works (often n = 1)

99 Triangle Meshes Smooth Triangle Meshes Store three different vertex normals E.g., from original surface (if known) Heuristic: Average neighboring triangle normals

100 Lambertian Surfaces n surface normal n θ n θ Equation c = c r c l cos θ = c r c l n, l n light direction normal vector (assuming: n = l = 1) l

101 Lambertian Bunny Face Normals Interpolated Normals

102 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

103 Problem Ambient Reflection Shadows are pure black Realistically, they should be gray Some light should bounce around... Solution: Add constant c = c a c a Not very realistic Need global light transport simulation for realistic results ambient light color surface color

104 Ambient Bunny Pure Lambertian Mixed with Ambient Light

105 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

106 Perfect Reflection Perfect Reflection Rays are perfectly reflected on surface Reflection about surface normal r = 2 n, l n l + l, n = 1 r n l l arbitrary

107 Perfect Reflection Difficult to compute Need to match camera and light emitter More later: Recursive raytracing Right image: Environment mapping Silver Bunny Reflective Bunny (Interpolated Normals)

108 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

109 Glossy Reflection Glossy Reflection Imperfect mirror Semi-rough surface Various models

110 Phong Illumination Model Traditional Model: Phong Model Physically incorrect (e.g.: energy conservation not guaranteed) But looks ok Always looks like plastic On the other hand, our world is full of plastic...

111 How does it work? Phong Model: Specular (glossy) part: (high-) light color c = c p c l r r, v v cos r,v Ambient part: c = c r c a Diffuse part: c = c r c l n, l Add all terms together p 1,2 1 0,8 0,6 0,4 0,2 0 Phong Exponents p=1 p=2 p=5 p=10 p=50 p=100 v r n l

112 Blinn-Phong Blinn-Phong Model: Specular (glossy) part: c = c p c l h h, n n p v h n l cos h,n Half-angle direction h = 1 l + v 2 l v In the plane: h, n h Approximation in 3D n = 1 2 r r, v v

113 Phong+Diffuse+Ambient Bunny Blinn-Phong Bunny Interpolated Normals

114 Phong+Diffuse+Ambient Bunny Blinn-Phong Bunny Interpolated Normals

115 Cook-Torrance Model Physically-Motivated Model D Infinitesimal micro-facets Characterize by distribution Expected reflection (density) Gaussian, Beckmann, Approximate occlusion term (G) F Fresnel term Model: wave-optics c spec = D G F 4 v, n n, l Interaction of wave with surface under different angles Percentage reflection/refraction F θ = R R 0 1 cos θ 5 cos θ = h, v R 0 ="ratio of refractive indices"

116 Artistic Fresnel Reflection Exponent 4 Approx. Fresnel-Reflection F θ 1 cos θ p unweighted reflection Exponent 5

117 Better Models Phong Bunny Cook-Torrance Model

118 Shading effects Diffuse reflection Ambient reflection Perfect mirrors Glossy reflection Phong / Blinn-Phong (Cook Torrance) Shading Effects Transparency & refraction

119 Transparency Transparency Alpha-blending α = opacity Color + opacity: RGBα Blending Mix in α of front color, keep 1 α of back color % red, 50% green front back c = α c front + 1 α c back Not commutative! (order matters) unless monochrome

120 Refraction Refraction: Snell s Law Materials of different index of refraction Light rays change direction at interfaces Snell s Law sin θ 1 sin θ 2 = n 2 n 1 n 1, n 2 : indices of refraction vacuum: 1.0, air: water: 1.33, glass: θ 2 n θ 1 n n 1 n 2

121 Refraction Reflection Refraction Implementation (raytraced) Not a local shading model Global algorithms: mostly raytracing Various fake approximations for local shading

122 3D Rendering Steps Geometric Model Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

123 Shading Algorithms CORE core topics important

124 Flat Shading Flat Shading constant color per triangle

125 Flat Shading Gouraud Shading Algorithm compute color at vertices, interpolate color for pixels

126 Flat Shading Phong Shading Algorithm interpolate normals for each pixel

127 3D Rendering Steps Geometric Model Next: Advanced Rasterization Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

128 3D Rendering Steps Geometric Model Global Illum: Keep this for later Perspective Visibility Local Illumination Smooth Shading Simple Shadows Global Illumination

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

Complex Shading Algorithms

Complex Shading Algorithms Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global

More information

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014 ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

More information

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading

More information

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading () Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models Computergrafik Thomas Buchberger, Matthias Zwicker Universität Bern Herbst 2008 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation

More information

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

More information

Lighting and Shading

Lighting and Shading Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,

More information

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture 10 Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

More information

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017 CS354 Computer Graphics Ray Tracing Qixing Huang Januray 24th 2017 Graphics Pipeline Elements of rendering Object Light Material Camera Geometric optics Modern theories of light treat it as both a wave

More information

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

More information

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

More information

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading) Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This

More information

Illumination & Shading: Part 1

Illumination & Shading: Part 1 Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the

More information

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I. CITS3003 Graphics & Animation Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.

More information

Visualisatie BMT. Rendering. Arjan Kok

Visualisatie BMT. Rendering. Arjan Kok Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract

More information

CS 325 Computer Graphics

CS 325 Computer Graphics CS 325 Computer Graphics 04 / 02 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Illumination modelling Ambient, Diffuse, Specular Reflection Surface Rendering / Shading models Flat

More information

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

CPSC 314 LIGHTING AND SHADING

CPSC 314 LIGHTING AND SHADING CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex

More information

Shading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).

Shading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Light Shading Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Same

More information

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 What We ve Covered So Far z x y z x y (0, 0) (w, h) Position objects and the camera in the world

More information

Simple Lighting/Illumination Models

Simple Lighting/Illumination Models Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and

More information

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Programming For this assignment you will write a simple ray tracer. It will be written in C++ without

More information

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Computer Vision Systems Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Viewing Systems Viewing Transformation Projective Transformation 2D Computer Graphics Devices

More information

Shading 1: basics Christian Miller CS Fall 2011

Shading 1: basics Christian Miller CS Fall 2011 Shading 1: basics Christian Miller CS 354 - Fall 2011 Picking colors Shading is finding the right color for a pixel This color depends on several factors: The material of the surface itself The color and

More information

Illumination and Shading

Illumination and Shading Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture

More information

Shading. Brian Curless CSE 557 Autumn 2017

Shading. Brian Curless CSE 557 Autumn 2017 Shading Brian Curless CSE 557 Autumn 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics

More information

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops. OpenGl Pipeline Individual Vertices Transformed Vertices Commands Processor Per-vertex ops Primitive assembly triangles, lines, points, images Primitives Fragments Rasterization Texturing Per-fragment

More information

Introduction to Computer Graphics 7. Shading

Introduction to Computer Graphics 7. Shading Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive

More information

Reflection and Shading

Reflection and Shading Reflection and Shading R. J. Renka Department of Computer Science & Engineering University of North Texas 10/19/2015 Light Sources Realistic rendering requires that we model the interaction between light

More information

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19 CS 498 VR Lecture 19-4/9/18 go.illinois.edu/vrlect19 Review from previous lectures Image-order Rendering and Object-order Rendering Image-order Rendering: - Process: Ray Generation, Ray Intersection, Assign

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

CPSC / Illumination and Shading

CPSC / Illumination and Shading CPSC 599.64 / 601.64 Rendering Pipeline usually in one step modelling of geometry transformation into world coordinate system placement of cameras and light sources transformation into camera coordinate

More information

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism

More information

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic. Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary

More information

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Global Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Foley, van Dam (better): Chapter 16.7-13 Angel: Chapter 5.11, 11.1-11.5 2 Limitation of local illumination A concrete

More information

Chapter 7 - Light, Materials, Appearance

Chapter 7 - Light, Materials, Appearance Chapter 7 - Light, Materials, Appearance Types of light in nature and in CG Shadows Using lights in CG Illumination models Textures and maps Procedural surface descriptions Literature: E. Angel/D. Shreiner,

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

Rasterization Overview

Rasterization Overview Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer

More information

Raytracing CS148 AS3. Due :59pm PDT

Raytracing CS148 AS3. Due :59pm PDT Raytracing CS148 AS3 Due 2010-07-25 11:59pm PDT We start our exploration of Rendering - the process of converting a high-level object-based description of scene into an image. We will do this by building

More information

Shading. Brian Curless CSE 457 Spring 2017

Shading. Brian Curless CSE 457 Spring 2017 Shading Brian Curless CSE 457 Spring 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics

More information

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting

More information

Understanding Variability

Understanding Variability Understanding Variability Why so different? Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic aberration, radial distortion

More information

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere

More information

CS 5625 Lec 2: Shading Models

CS 5625 Lec 2: Shading Models CS 5625 Lec 2: Shading Models Kavita Bala Spring 2013 Shading Models Chapter 7 Next few weeks Textures Graphics Pipeline Light Emission To compute images What are the light sources? Light Propagation Fog/Clear?

More information

CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505. Intro to Lighting CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

More information

w Foley, Section16.1 Reading

w Foley, Section16.1 Reading Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels

More information

Models and Architectures

Models and Architectures Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation

More information

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color

More information

Graphics Hardware and Display Devices

Graphics Hardware and Display Devices Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive

More information

Institutionen för systemteknik

Institutionen för systemteknik Code: Day: Lokal: M7002E 19 March E1026 Institutionen för systemteknik Examination in: M7002E, Computer Graphics and Virtual Environments Number of sections: 7 Max. score: 100 (normally 60 is required

More information

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers Question 1. a) (5 marks) Explain the OpenGL synthetic camera model,

More information

Shading, Advanced Rendering. Week 7, Wed Feb 28

Shading, Advanced Rendering. Week 7, Wed Feb 28 University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Shading, Advanced Rendering Week 7, Wed Feb 28 http://www.ugrad.cs.ubc.ca/~cs314/vjan2007 Reading for Today and Tomorrow

More information

Comp 410/510 Computer Graphics. Spring Shading

Comp 410/510 Computer Graphics. Spring Shading Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather

More information

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5. Reading Required: Angel 6.1-6.3, 6.5, 6.7-6.8 Optional: Shading Angel 6.4 OpenGL red book, chapter 5. 1 2 Introduction An abundance of photons So far, we ve talked exclusively about geometry. Properly

More information

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13!

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13! Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13! Student Name:!! Class Account Username:! Instructions: Read them carefully!! The exam begins at 1:10pm and ends at 2:30pm. You must

More information

Illumination Models & Shading

Illumination Models & Shading Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages

More information

CPSC GLOBAL ILLUMINATION

CPSC GLOBAL ILLUMINATION CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of

More information

Lab 9 - Metal and Glass

Lab 9 - Metal and Glass Lab 9 - Metal and Glass Let the form of an object be what it may, light, shade, and perspective will always make it beautiful. -John Constable Prologue Support code: /course/cs1230/src/labs/lab09 This

More information

Virtual Reality for Human Computer Interaction

Virtual Reality for Human Computer Interaction Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color

More information

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD Shading, lighting, & BRDF Theory Cliff Lindsay, PHD Overview of today s lecture BRDF Characteristics Lights in terms of BRDFs Classes of BRDFs Ambient light & Shadows in terms of BRDFs Decomposing Reflection

More information

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. 11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives

More information

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading CENG 477 Introduction to Computer Graphics Ray Tracing: Shading Last Week Until now we learned: How to create the primary rays from the given camera and image plane parameters How to intersect these rays

More information

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render

More information

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third

More information

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Advanced Lighting Techniques Due: Monday November 2 at 10pm CMSC 23700 Autumn 2015 Introduction to Computer Graphics Project 3 October 20, 2015 Advanced Lighting Techniques Due: Monday November 2 at 10pm 1 Introduction This assignment is the third and final part

More information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2016 - Lecture 10: Shading Models Welcome! Today s Agenda: Introduction Light Transport Materials Sensors Shading INFOGR Lecture 10 Shading Models 3 Introduction

More information

Chapter 32 Light: Reflection and Refraction. Copyright 2009 Pearson Education, Inc.

Chapter 32 Light: Reflection and Refraction. Copyright 2009 Pearson Education, Inc. Chapter 32 Light: Reflection and Refraction Units of Chapter 32 The Ray Model of Light Reflection; Image Formation by a Plane Mirror Formation of Images by Spherical Mirrors Index of Refraction Refraction:

More information

Illumination. Illumination CMSC 435/634

Illumination. Illumination CMSC 435/634 Illumination CMSC 435/634 Illumination Interpolation Illumination Illumination Interpolation Illumination Illumination Effect of light on objects Mostly look just at intensity Apply to each color channel

More information

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Ray Tracing Based on slides by Dianna Xu, Bryn Mawr College Ray Tracing Example Created by Anto Matkovic Ray Tracing Example Ray Tracing Example Ray Tracing Most light rays do not reach

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Illumination & Shading

Illumination & Shading Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination

More information

Graphics for VEs. Ruth Aylett

Graphics for VEs. Ruth Aylett Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading Runtime VR systems Two major parts: initialisation and update loop. Initialisation

More information

CS 130 Exam I. Fall 2015

CS 130 Exam I. Fall 2015 S 3 Exam I Fall 25 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project To do Continue to work on ray programming assignment Start thinking about final project Lighting Course Outline 3D Graphics Pipeline Modeling (Creating 3D Geometry) Mesh; modeling; sampling; Interaction

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch 15-462 Computer Graphics I Lecture 7 Lighting and Shading February 12, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Light Sources Phong Illumination Model

More information

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 CSE 167: Introduction to Computer Graphics Lecture #6: Colors Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework project #3 due this Friday, October 18

More information

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading

More information

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information llumination Model Wireframe rendering simple, ambiguous Color filling flat without any 3D information Requires modeling interaction of light with the object/surface to have a different color (shade in

More information

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014 TA: Josh Bradley 1 Linear Algebra Review 1.1 Vector Multiplication Suppose we have a vector a = [ x a y a ] T z a. Then for some

More information

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10 Reading Required: Shirley, Chapter 10 Shading Brian Curless CSE 557 Fall 2014 1 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in their local coordinate systems into

More information

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures

More information

The Rasterizer Stage. Texturing, Lighting, Testing and Blending

The Rasterizer Stage. Texturing, Lighting, Testing and Blending 1 The Rasterizer Stage Texturing, Lighting, Testing and Blending 2 Triangle Setup, Triangle Traversal and Back Face Culling From Primitives To Fragments Post Clipping 3 In the last stages of the geometry

More information

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL International Edition Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL Sixth Edition Edward Angel Dave Shreiner Interactive Computer Graphics: A Top-Down Approach with Shader-Based

More information

CS6670: Computer Vision

CS6670: Computer Vision CS6670: Computer Vision Noah Snavely Lecture 21: Light, reflectance and photometric stereo Announcements Final projects Midterm reports due November 24 (next Tuesday) by 11:59pm (upload to CMS) State the

More information

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11 Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11 Student Name: Class Account Username: Instructions: Read them carefully! The exam begins at 2:40pm and ends at 4:00pm. You must turn your

More information

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

Ø Sampling Theory Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies Ø The Hall illumination model. Ø Original ray tracing paper CS 431/636 Advanced Rendering Techniques Ø Dr. David Breen Ø Korman 105D Ø Wednesday 6PM 8:50PM Presentation 6 5/16/12 Questions from ast Time? Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling

More information

Computer Graphics I Lecture 11

Computer Graphics I Lecture 11 15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

More information

INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry INF3320 Computer Graphics and Discrete Geometry Visual appearance Christopher Dyken and Martin Reimers 23.09.2009 Page 1 Visual appearance Real Time Rendering: Chapter 5 Light Sources and materials Shading

More information