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

Save this PDF as:

Size: px
Start display at page:

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

## Transcription

1 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

2 Announcements Homework project #3 due this Friday, October 14 th To be presented starting 1:30pm in lab 260 Late submissions for project #2 accepted until this Friday Ted problem Resource Unavailable solved 2

3 Lecture Overview Color Color reproduction on computer monitors Perceptually uniform color spaces Shading Introduction Local shading models 3

4 Summary CIE color spaces are defined by matching curves At each wavelength, matching curves give weights of primaries needed to produce color perception of that wavelength CIE RGB matching curves determined using trisimulus experiment Each distinct color perception has unique coordinates CIE RGB values may be negative CIE XYZ values are always positive 4

5 CIE XYZ Color Space Visualization Interpret XYZ as 3D coordinates Plot corresponding color at each point Many XYZ values do not correspond to visible colors 5

6 Chromaticity Diagram Project from XYZ coordinates to 2D for more convenient visualization Drop z-coordinate 6

7 Chromaticity Diagram Factor out luminance (perceived brightness) and chromaticity (hue) x,y represent chromaticity of a color Y is luminance CIE xyy color space Reconstruct XYZ values from xyy 7

8 Chromaticity Diagram Visualizes x,y plane (chromaticities) Pure spectral colors on boundary Colors shown do not correspond to colors represented by (x,y) coordinates! 8

9 Chromaticity Diagram Visualizes x,y plane (chromaticities) Pure spectral colors on boundary Weighted sum of any two colors lies on line connecting colors Colors shown do not correspond to colors represented by (x,y) coordinates! 9

10 Chromaticity Diagram Visualizes x,y plane (chromaticities) Pure spectral colors on boundary Weighted sum of any two colors lies on line connecting colors Weighted sum of any number of colors lies in convex hull of colors (gamut) Colors shown do not correspond to colors represented by (x,y) coordinates! 10

11 Gamut Any device based on three primaries can only produce colors within the triangle spanned by the primaries Points outside gamut correspond to negative weights of primaries Gamut of CIE RGB primaries 11 Gamut of typical CRT monitor

12 RGB Monitors Given red, green, blue (RBG) values, what color will your monitor produce? I.e., what are the CIE XYZ or CIE RGB coordinates of the displayed color? How are OpenGL RGB values related to CIE XYZ, CIE RGB? Often you don t know! OpenGL RGB CIE XYZ, CIE RGB Gamut of CIE RGB primaries 12 Gamut of typical CRT monitor

13 RGB Monitors Ideally: We know XYZ values for RGB primaries Monitor is linear RGB signal corresponds to weighted sum of primaries: 13

14 RGB Monitors Given desired XYZ values, find rgb values by inverting matrix Similar to change of coordinate systems for 3D points 14

15 RGB Monitors In reality XYZ values for monitor primaries are usually not directly specified Monitor brightness is adjustable Monitors are not linear Need gamma correction For typical CRT monitors 15

16 srgb Standard color space, with standard conversion to CIE XYZ Designed to match RGB values of typical monitor under typical viewing conditions If no calibration information available, it is best to interpret RGB values as srgb srgb is supported by OpenGL 2.0 with the ARB_framebuffer_sRGB extension For more details and transformation from CIE XYZ to srgb: 16

17 Conclusions Color reproduction on consumer monitors is less than perfect The same RGB values on one monitor look different than on another Given a color in CIE XYZ coordinates, consumer systems do not reliably produce that color Display calibration Need color calibration Consumers do not seem to care Standard for digital publishing, printing, photography 17

18 Lecture Overview Color Color reproduction on computer monitors Perceptually uniform color spaces Shading Introduction Local shading models 18

19 Perceptually Uniform Color Spaces Definition: Euclidean distance between color coordinates corresponds to perceived difference. CIE RGB, XYZ are not perceptually uniform: Euclidean distance between RGB, XYZ coordinates does not correspond to perceived difference 19

20 MacAdam Ellipses Experiment (1942) to identify regions in CIE xy color space that are perceived as the same color Found elliptical areas, MacAdam ellipses In perceptually uniform color space, each point on an ellipse should have the same distance to the center Ellipses become circles 20 MacAdam ellipses

21 CIE L*,a*,b* (CIELAB) Most common perceptually uniform color space L* encodes lightness a* encodes position between magenta and green b* encodes position between yellow and blue Uses asterisk (*) to distinguish from Hunter's Lab color space Conversion between CIE XYZ and CIELAB is non-linear 21 CIELAB color space

23 Lecture Overview Color Color reproduction on computer monitors Perceptually uniform color spaces Shading Introduction Local shading models 23

24 Shading Compute interaction of light with surfaces Requires simulation of physics Global illumination Multiple bounces of light Computationally expensive, minutes per image Used in movies, architectural design, etc. 24

25 Global Illumination Covered by CSE (All non-teapot images courtesy of Prof. Wann Jensen)

26 Interactive Applications No physics-based simulation Simplified models Reproduce perceptually most important effects Local illumination Only one bounce of light between light source and viewer 26 One bounce of light Surface

27 Rendering Pipeline Scene data Modeling and viewing transformation Shading Projection Scan conversion, visibility Position object in 3D Determine colors of vertices Per vertex shading Map triangles to 2D Draw triangles Per pixel shading 27 Image

28 Lecture Overview Color Color reproduction on computer monitors Perceptually uniform color spaces Shading Introduction Local shading models 28

29 Local Illumination What gives a material its color? How is light reflected by a Mirror White sheet of paper Blue sheet of paper Glossy metal 29

30 Local Illumination Model reflection of light at surfaces Assumption: no subsurface scattering Bidirectional reflectance distribution function (BRDF) Given light direction, viewing direction, how much light is reflected towards the viewer For any pair of light/viewing directions! 30

31 Local Illumination Simplified model Sum of 3 components Covers a large class of real surfaces diffuse specular ambient 31

32 Local Illumination Simplified model Sum of 3 components Covers a large class of real surfaces diffuse specular ambient 32

33 Diffuse Reflection Ideal diffuse material reflects light equally in all directions View-independent Matte, not shiny materials Paper Unfinished wood Unpolished stone 33

34 Diffuse Reflection Beam of parallel rays shining on a surface Area covered by beam varies with the angle between the beam and the normal The larger the area, the less incident light per area Incident light per unit area is proportional to the cosine of the angle between the normal and the light rays Object darkens as normal turns away from light Lambert s cosine law (Johann Heinrich Lambert, 1760) Diffuse surfaces are also called Lambertian surfaces n n n 34

35 Diffuse Reflection Given Unit surface normal n Unit light direction L Material diffuse reflectance (material color) k d Light color (intensity) c l Diffuse color c d is: 35 Proportional to cosine between normal and light

36 Diffuse Reflection Notes Parameters k d, c l are r,g,b vectors Need to compute r,g,b values of diffuse color c d separately Parameters in this model have no precise physical meaning c l : strength, color of light source k d : fraction of reflected light, material color 36

37 Diffuse Reflection Provides visual cues Surface curvature Depth variation Lambertian (diffuse) sphere under different lighting directions 37

38 OpenGL Lights (gllight*) Values for light: Definition: (0,0,0) is black, (1,1,1) is white OpenGL Values for diffuse reflection Fraction of reflected light: Consult OpenGL Programming Guide (Red Book) See course web site 38

39 Local Illumination Simplified model Sum of 3 components Covers a large class of real surfaces diffuse specular ambient 39

40 Specular Reflection Shiny surfaces Polished metal Glossy car finish Plastics Specular highlight Blurred reflection of the light source Position of highlight depends on viewing direction Specular highlight 40

41 Specular Reflection Ideal specular reflection is mirror reflection Perfectly smooth surface Incoming light ray is bounced in single direction Angle of incidence equals angle of reflection 41

42 Law of Reflection Angle of incidence equals angle of reflection 42

43 Specular Reflection Many materials are not perfect mirrors Glossy materials 43 Glossy teapot

44 Glossy Materials Assume surface composed of small mirrors with random orientation (micro-facets) Smooth surfaces Micro-facet normals close to surface normal Sharp highlights Rough surfaces Micro-facet normals vary strongly Blurry highlight 44 Polished Smooth Rough Very rough

45 Glossy Surfaces Expect most light to be reflected in mirror direction Because of micro-facets, some light is reflected slightly off ideal reflection direction Reflection Brightest when view vector is aligned with reflection Decreases as angle between view vector and reflection direction increases 45

46 Phong Model (Bui Tuong Phong,1973 ) Specular reflectance coefficient k s Phong exponent p Greater p means smaller (sharper) highlight 46

47 Phong Model 47

48 Blinn Model (Jim Blinn, 1977) Define unit halfway vector Halfway vector represents normal of micro-facet that would lead to mirror reflection to the eye 48

49 Blinn Model The larger the angle between micro-facet orientation and normal, the less likely Use cosine of angle between them Shininess parameter Very similar to Phong 49

50 Local Illumination Simplified model Sum of 3 components Covers a large class of real surfaces diffuse specular ambient 50

51 Ambient Light In real world, light is bounced all around scene Could use global illumination techniques to simulate Simple approximation Add constant ambient light at each point: k a c a Ambient light color: c a Ambient reflection coefficient: k a Areas with no direct illumination are not completely dark 51

52 Complete Blinn Model Blinn model with several light sources I All colors and reflection coefficients have separate values for red, green, blue diffuse specular ambient 52

53 BRDFs Diffuse, Phong, Blinn models are instances of bidirectional reflectance distribution functions (BRDFs) For each pair of light directions L, viewing direction e, return fraction of reflected light Shading with general BRDF f Many forms of BRDFs in graphics, often named after inventors Cook-Torrance Ward 53

### CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

### 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

### CSE 681 Illumination and Phong Shading

CSE 681 Illumination and Phong Shading Physics tells us What is Light? We don t see objects, we see light reflected off of objects Light is a particle and a wave The frequency of light What is Color? Our

### 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

### 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

Illumination and Shading Light sources emit intensity: assigns intensity to each wavelength of light Humans perceive as a colour - navy blue, light green, etc. Exeriments show that there are distinct I

### 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

### CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #8: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #4 due Friday, November 2 nd Introduction:

### 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?

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

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

### 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

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

### Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Lighting and Shading Slides: Tamar Shinar, Victor Zordon Why we need shading Suppose we build a model of a sphere using many polygons and color each the same color. We get something like But we want 2

### Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Color and Light CSCI 4229/5229 Computer Graphics Summer 2008 Solar Spectrum Human Trichromatic Color Perception Are A and B the same? Color perception is relative Transmission,Absorption&Reflection Light

### 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

### Introduction to Computer Graphics. Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces

Introduction to Computer Graphics Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces Outline Computational tools Reflection models Polygon shading Computation tools Surface normals Vector

### 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

Why we need shading? Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like But we want Light-material interactions cause each point to have a different

### Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

Color and Shading Color Shapiro and Stockman, Chapter 6 Color is an important factor for for human perception for object and material identification, even time of day. Color perception depends upon both

### 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

### Three-Dimensional Graphics V. Guoying Zhao 1 / 55

Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 55 Shading Guoying Zhao 2 / 55 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material

Lessons Learned from HW Shading CS Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Only have an idle() function if something is animated Set idle function to NULL, when

### Light Sources. Spotlight model

lecture 12 Light Sources sunlight (parallel) Sunny day model : "point source at infinity" - lighting - materials: diffuse, specular, ambient spotlight - shading: Flat vs. Gouraud vs Phong light bulb ambient

CS 543: Computer Graphics Illumination & Shading I Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu

### Methodology for Lecture. Importance of Lighting. Outline. Shading Models. Brief primer on Color. Foundations of Computer Graphics (Spring 2010)

Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 11: OpenGL 3 http://inst.eecs.berkeley.edu/~cs184 Methodology for Lecture Lecture deals with lighting (teapot shaded as in HW1) Some Nate

### Surface Reflection Models

Surface Reflection Models Frank Losasso (flosasso@nvidia.com) Introduction One of the fundamental topics in lighting is how the light interacts with the environment. The academic community has researched

### 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

Shading and Illumination OpenGL Shading Without Shading With Shading Physics Bidirectional Reflectance Distribution Function (BRDF) f r (ω i,ω ) = dl(ω ) L(ω i )cosθ i dω i = dl(ω ) L(ω i )( ω i n)dω

### CEng 477 Introduction to Computer Graphics Fall

Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics Fall 2007 2008 Illumination Models and Surface Rendering Methods In order to achieve realism in computer generated

### Objectives. Continue discussion of shading Introduce modified Phong model Consider computation of required vectors

Objectives Continue discussion of shading Introduce modified Phong model Consider computation of required vectors 1 Lambertian Surface Perfectly diffuse reflector Light scattered equally in all directions

### Lecture 4: Reflection Models

Lecture 4: Reflection Models CS 660, Spring 009 Kavita Bala Computer Science Cornell University Outline Light sources Light source characteristics Types of sources Light reflection Physics-based models

### Announcement. Lighting and Photometric Stereo. Computer Vision I. Surface Reflectance Models. Lambertian (Diffuse) Surface.

Lighting and Photometric Stereo CSE252A Lecture 7 Announcement Read Chapter 2 of Forsyth & Ponce Might find section 12.1.3 of Forsyth & Ponce useful. HW Problem Emitted radiance in direction f r for incident

Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics

### 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

### CS201 Computer Vision Lect 4 - Image Formation

CS201 Computer Vision Lect 4 - Image Formation John Magee 9 September, 2014 Slides courtesy of Diane H. Theriault Question of the Day: Why is Computer Vision hard? Something to think about from our view

### Lighting/Shading II. Week 7, Mon Mar 1

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Lighting/Shading II Week 7, Mon Mar 1 http://www.ugrad.cs.ubc.ca/~cs314/vjan2010 News Homework 3 out today Homework

### Interpolation using scanline algorithm

Interpolation using scanline algorithm Idea: Exploit knowledge about already computed color values. Traverse projected triangle top-down using scanline. Compute start and end color value of each pixel

### Property of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment

Property of: Entrada Interactive PBR Workflow Working within a PBR-based environment Ryan Manning 8/24/2014 MISCREATED PBR WORKFLOW CryDocs on Physically Based Shading/Rendering: http://docs.cryengine.com/display/sdkdoc4/physically+based+rendering

### Ambient reflection. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 407

Ambient reflection Phong reflection is a local illumination model. It only considers the reflection of light that directly comes from the light source. It does not compute secondary reflection of light

### Ø 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

### Lecture 22: Basic Image Formation CAP 5415

Lecture 22: Basic Image Formation CAP 5415 Today We've talked about the geometry of scenes and how that affects the image We haven't talked about light yet Today, we will talk about image formation and

### Shading , Fall 2004 Nancy Pollard Mark Tomczak

15-462, Fall 2004 Nancy Pollard Mark Tomczak Shading Shading Concepts Shading Equations Lambertian, Gouraud shading Phong Illumination Model Non-photorealistic rendering [Shirly, Ch. 8] Announcements Written

Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

### Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

CSCI 480 Computer Graphics Lecture 18 Global Illumination BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] March 28, 2012 Jernej Barbic University of Southern California

### The Elements of Colour

Color science 1 The Elements of Colour Perceived light of different wavelengths is in approximately equal weights achromatic.

### Lecture Notes (Reflection & Mirrors)

Lecture Notes (Reflection & Mirrors) Intro: - plane mirrors are flat, smooth surfaces from which light is reflected by regular reflection - light rays are reflected with equal angles of incidence and reflection

### Ray Optics. Lecture 23. Chapter 34. Physics II. Course website:

Lecture 23 Chapter 34 Physics II Ray Optics Course website: http://faculty.uml.edu/andriy_danylov/teaching/physicsii Today we are going to discuss: Chapter 34: Section 34.1-3 Ray Optics Ray Optics Wave

DH2323 DGI15 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION LIGHTING AND SHADING Christopher Peters HPCViz, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

### Objectives. Shading II. Distance Terms. The Phong Reflection Model

Shading II Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also known as the modified Phong

### rendering equation computer graphics rendering equation 2009 fabio pellacini 1

rendering equation computer graphics rendering equation 2009 fabio pellacini 1 physically-based rendering synthesis algorithms that compute images by simulation the physical behavior of light computer

### Light and Sound. Wave Behavior and Interactions

Light and Sound Wave Behavior and Interactions How do light/sound waves interact with matter? WORD Definition Example Picture REFLECTED REFRACTED is the change in direction of a wave when it changes speed

### A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

A Brief Overview of Global Illumination Thomas Larsson, Afshin Ameri Mälardalen University 1 What is Global illumination? Global illumination is a general name for realistic rendering algorithms Global

### A Data Flow Approach to Color Gamut Visualization

A Data Flow Approach to Color Gamut Visualization Gary W. Meyer and Chad A. Robertson Department of Computer and Information Science University of Oregon, Eugene, Oregon 97403 Abstract Software has been

### What is it? How does it work? How do we use it?

What is it? How does it work? How do we use it? Dual Nature http://www.youtube.com/watch?v=dfpeprq7ogc o Electromagnetic Waves display wave behavior o Created by oscillating electric and magnetic fields

### Photorealism: Ray Tracing

Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any

### Wednesday, 26 January 2005, 14:OO - 17:OO h.

Delft University of Technology Faculty Electrical Engineering, Mathematics, and Computer Science Mekelweg 4, Delft TU Delft Examination for Course IN41 5 1-3D Computer Graphics and Virtual Reality Please

### CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

49 CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE 3.1 PREAMBLE Software has been developed following the CIE 1931 standard of Chromaticity Coordinates to convert the RGB data into its

### Introduction to 3D Graphics

Introduction to 3D Graphics Using OpenGL 3D 1/46 Classical Polygon Graphics (H/W) Pipeline Mesh objects with 3D polygons (triangles or quads usually) Apply material properties to each object (for reflectance

### EDAN30 Photorealistic Computer Graphics. Seminar 1, Whitted Ray Tracing (And then some!) Magnus Andersson, PhD student

EDAN30 Photorealistic Computer Graphics Seminar, 203 Whitted Ray Tracing (And then some!) Magnus Andersson, PhD student (magnusa@cs.lth.se) Today s Agenda Structure of Assignments Quick prtracer walkthrough

Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading

### 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

### Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 10: Shading Languages Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Review: role of shading languages Renderer handles surface visibility tasks - Examples: clip,

### CSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department

CSE 690: GPGPU Lecture 2: Understanding the Fabric - Intro to Graphics Klaus Mueller Stony Brook University Computer Science Department Klaus Mueller, Stony Brook 2005 1 Surface Graphics Objects are explicitely

### Shading II. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Continue discussion of shading Introduce modified Phong model

### Chapter 4- Blender Render Engines

Chapter 4- Render Engines What is a Render Engine? As you make your 3D models in, your goal will probably be to generate (render) an image or a movie as a final result. The software that determines how

### Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

Surface Graphics Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside) This boundary representation can be given by: - a mesh of polygons: 200 polys 1,000

### CSE Intro to Computer Graphics. ANSWER KEY: Midterm Examination. November 18, Instructor: Sam Buss, UC San Diego

CSE 167 - Intro to Computer Graphics ANSWER KEY: Midterm Examination November 18, 2003 Instructor: Sam Buss, UC San Diego Write your name or initials on every page before beginning the exam. You have 75

### Optics Test Science What are some devices that you use in everyday life that require optics?

Optics Test Science 8 Introduction to Optics 1. What are some devices that you use in everyday life that require optics? Light Energy and Its Sources 308-8 identify and describe properties of visible light

### The Law of Reflection

If the surface off which the light is reflected is smooth, then the light undergoes specular reflection (parallel rays will all be reflected in the same directions). If, on the other hand, the surface

### 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:

### CG Surfaces: Materials, Shading, and Texturing

CG Surfaces: Materials, Shading, and Texturing ART/CSC/FST 220 Spring 2007 From text: 3D for Beginners, Chapter 7 Art of Maya (pages 116-126, 185-194) Shading and texturing involves materials and their

### Imaging Sphere Measurement of Luminous Intensity, View Angle, and Scatter Distribution Functions

Imaging Sphere Measurement of Luminous Intensity, View Angle, and Scatter Distribution Functions Hubert Kostal, Vice President of Sales and Marketing Radiant Imaging, Inc. 22908 NE Alder Crest Drive, Suite

### CS452/552; EE465/505. Lighting & Shading

CS452/552; EE465/505 Lighting & Shading 2-17 15 Outline! More on Lighting and Shading Read: Angel Chapter 6 Lab2: due tonight use ASDW to move a 2D shape around; 1 to center Local Illumination! Approximate

### Working with the BCC Bump Map Generator

Working with the BCC Bump Map Generator Bump mapping is used to create three dimensional detail on an image based on the luminance information in the image. The luminance value of each pixel of the image

### Background: Physics and Math of Shading

Background: Physics and Math of Shading Naty Hoffman 2K Hi. Over the next 25 minutes or so I ll be going from the physics underlying shading, to the math used to describe it in the kind of shading models

### What is Color and How is It Measured?

Insight on Color Vol. 12, No. 5 What is Color and How is It Measured? The most important part of HunterLab s business is helping our customers to measure color. In this Applications Note, you will learn

### CS681 Computational Colorimetry

9/14/17 CS681 Computational Colorimetry Min H. Kim KAIST School of Computing COLOR (3) 2 1 Color matching functions User can indeed succeed in obtaining a match for all visible wavelengths. So color space

### Recent Advances in Monte Carlo Offline Rendering

CS294-13: Special Topics Lecture #6 Advanced Computer Graphics University of California, Berkeley Monday, 21 September 2009 Recent Advances in Monte Carlo Offline Rendering Lecture #6: Monday, 21 September

### CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 4 due tomorrow Project

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

CSE 167: Introduction to Computer Graphics Lecture #13: Curves Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 4 due Monday Nov 27 at 2pm Next Tuesday:

### Ch. 25 The Reflection of Light

Ch. 25 The Reflection of Light 25. Wave fronts and rays We are all familiar with mirrors. We see images because some light is reflected off the surface of the mirror and into our eyes. In order to describe

### Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Rendering Algorithms: Real-time indirect illumination Spring 2010 Matthias Zwicker Today Real-time indirect illumination Ray tracing vs. Rasterization Screen space techniques Visibility & shadows Instant

### 1. Final Projects 2. Radiometry 3. Color. Outline

1. Final Projects 2. Radiometry 3. Color Outline Poster presentations http://16720.courses.cs.cmu.edu/project.html ==== Availability form ==== One person from each team (at least) is required to fill out

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

CSE 167: Introduction to Computer Graphics Lecture #8: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due this Friday Midterm next Tuesday

### Light: Geometric Optics

Light: Geometric Optics Regular and Diffuse Reflection Sections 23-1 to 23-2. How We See Weseebecauselightreachesoureyes. There are two ways, therefore, in which we see: (1) light from a luminous object

### Skylight to enhance outdoor scenes Real-Time Graphics. The atmosphere. Rayleigh scattering. Jeppe Revall Frisvad.

Skylight to enhance outdoor scenes 02564 Real-Time Graphics Skylight and irradiance environment maps Jeppe Revall Frisvad March 2016 Esplanade, Saint Clair, Dunedin, New ealand: -45.9121, 170.4893 The

### Multimedia Technology CHAPTER 4. Video and Animation

CHAPTER 4 Video and Animation - Both video and animation give us a sense of motion. They exploit some properties of human eye s ability of viewing pictures. - Motion video is the element of multimedia

### 3. Confirm Does the law of reflection apply to rough surfaces? Explain. Diffuse Reflection

Light Key Concepts How does light reflect from smooth surfaces and rough surfaces? What happens to light when it strikes a concave mirror? Which types of mirrors can produce a virtual image? Reflection

### HIGHLY PARALLEL COMPUTING IN PHYSICS-BASED RENDERING OpenCL Raytracing Based. Thibaut PRADOS OPTIS Real-Time & Virtual Reality Manager

HIGHLY PARALLEL COMPUTING IN PHYSICS-BASED RENDERING OpenCL Raytracing Based Thibaut PRADOS OPTIS Real-Time & Virtual Reality Manager INTRODUCTION WHO WE ARE 3 Highly Parallel Computing in Physics-based

### Surface Rendering. Surface Rendering

Surface Rendering Surface Rendering Introduce Mapping Methods - Texture Mapping - Environmental Mapping - Bump Mapping Go over strategies for - Forward vs backward mapping 2 1 The Limits of Geometric Modeling

### CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 Announcements Project 2 due Friday at 1pm Homework

### Importance Sampling Spherical Harmonics

Importance Sampling Spherical Harmonics Wojciech Jarosz 1,2 Nathan A. Carr 2 Henrik Wann Jensen 1 1 University of California, San Diego 2 Adobe Systems Incorporated April 2, 2009 Spherical Harmonic Sampling

### Computer Graphics. Lecture 9 Environment mapping, Mirroring

Computer Graphics Lecture 9 Environment mapping, Mirroring Today Environment Mapping Introduction Cubic mapping Sphere mapping refractive mapping Mirroring Introduction reflection first stencil buffer

### Conceptual Physics Fundamentals

Conceptual Physics Fundamentals Chapter 14: PROPERTIES OF LIGHT This lecture will help you understand: Reflection Refraction Dispersion Total Internal Reflection Lenses Polarization Properties of Light

### 3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

3D Programming Concepts Outline 3D Concepts Displaying 3D Models 3D Programming CS 4390 3D Computer 1 2 3D Concepts 3D Model is a 3D simulation of an object. Coordinate Systems 3D Models 3D Shapes 3D Concepts