Save this PDF as:

Size: px
Start display at page:

Transcription

1 () Illumination and Shading Dr. Ayman Eldeib

2 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 image, we need to simulate the lighting of the surfaces in the scene Fundamentally simulation of physics and optics As you ll see, we use a lot of approximations (a.k.a hacks) to do this simulation fast enough

4 What is the problem? Illumination and Shading Mesh Surfaces Must determine the color of each vertex.

5 Definitions Illumination: the transport of energy (in particular, the luminous flux of visible light) from light sources to surfaces & points Note: includes direct and indirect illumination Lighting: the process of computing the luminous intensity (i.e., outgoing light) at a particular 3-D point, usually on a surface Shading: the process of assigning colors to pixels

6 Definitions Cont. Illumination models fall into two categories: Empirical: simple formulations that approximate observed phenomenon Physically-based: models based on the actual physics of light interacting with matter We mostly use empirical models in interactive graphics for simplicity Increasingly, realistic graphics are using physically-based models

7 Components of Illumination Two components of illumination: light sources and surface properties Light sources (or emitters) Spectrum of emittance (i.e, color of the light) Geometric attributes o Position o Direction o Shape Directional attenuation

8 Components of Illumination Cont. Surface properties Reflectance spectrum (i.e., color of the surface) Geometric attributes o Position o Orientation o Micro-structure Common simplifications in interactive graphics Only direct illumination from emitters to surfaces Simplify geometry of emitters to trivial cases

9 Ambient Light Source Objects not directly lit are typically still visible E.g., the ceiling in this room, undersides of desks This is the result of indirect illumination from emitters, bouncing off intermediate surfaces Images without ambient light have too much contrast Very rough approximation of global illumination Too expensive to calculate (in real time), so we use a hack called an ambient light source No directional characteristics; illuminates all surfaces equally Amount reflected depends on surface properties Independent of object, light and viewer position

10 Directional Light Source For a directional light source we make the simplifying assumption that all rays of light from the source are parallel As if the source is infinitely far away from the surfaces in the scene A good approximation to sunlight The direction from a surface to the light source is important in lighting the surface With a directional light source, this direction is constant for all surfaces in the scene

11 Point Light Source A point light source emits light equally in all directions from a single point The direction to the light from a point on a surface thus differs for different points: So we need to calculate a normalized vector to the light source for every point we light.

12 Other Light Sources Spotlights are point sources whose intensity falls off directionally. Supported by OpenGL Area light sources define a 2-D emissive surface (usually a disc or polygon) Good example: fluorescent light panels

13 Physics of Reflection Ideal diffuse reflection An ideal diffuse reflector, at the microscopic level, is a very rough surface (real-world example: chalk) Because of these microscopic variations, an incoming ray of light is equally likely to be reflected in any direction over the hemisphere What does the reflected intensity depend on?

14 Lambert s Cosine Law Ideal diffuse surfaces reflect according to Lambert s cosine law: The energy reflected by a small portion of a surface from a light source in a given direction is proportional to the cosine of the angle between that direction and the surface normal These are often called Lambertian surfaces Note that the reflected intensity is independent of the viewing direction, but does depend on the surface orientation with regard to the light source

15 The amount of light falling on a surface is proportional to the angle between the surface normal and the light source direction n=surface normal s=direction of illumination Ө= angle between s and n Computing Diffuse Reflection n s I I = = ρ cosθ ρ ( n s) The amount of light that is reflected I = I cosθ max(cosθ,0) Can not have negative light A Lambertian sphere. NOTE: independent of location of camera

16 Specular Reflection Shiny surfaces exhibit specular reflection Polished metal Glossy car finish A light shining on a specular surface causes a bright spot known as a specular highlight Where these highlights appear is a function of the viewer s position, so specular reflectance is view-dependent

17 Physics of Reflection At the microscopic level a specular reflecting surface is very smooth Thus rays of light are likely to bounce off the microgeometry in a mirror-like fashion The smoother the surface, the closer it becomes to a perfect mirror

18 Optics of Reflection Reflection follows Snell s Laws: The incoming ray and reflected ray lie in a plane with the surface normal The angle that the reflected ray forms with the surface normal equals the angle formed by the incoming ray and the surface normal: θ l = θ r

19 Non-Ideal Specular Reflection An Empirical Approximation In general, we expect most reflected light to travel in direction predicted by Snell s Law But because of microscopic surface variations, some light may be reflected in a direction slightly off the ideal reflected ray As the angle from the ideal reflected ray increases, we expect less light to be reflected

20 Illumination and Shading Models How do we model light sources? Point Area How do we model the reflectance of light off a surface? Direct illumination Global illumination How do we model of the material properties of a surface? Plastic, metallic, shiny, etc

21 Light Sources Distant light source Local light source Distant light source No attenuation Described by a direction Local light source Attenuation with distance Point light sourced described by a position (x,y,z) Area light sources more complicated

22 Local Light Source Attenuation Radial intensity attenuation function for a point light source for distance d 1 d 2 Radial intensity attenuation function used in practice 1 a + a d a 2 d 2

23 OpenGL Lighting gllight* (name, property, value) Name specifies which light multiple lights, starting with GL_LIGHT0 glgetintegerv( GL_MAX_LIGHTS, &n ); Properties Position and type Ambient (GL_AMBIENT), diffuse, (GL_DIFFUSE) and specular (GL_SPECULAR) colors Attenuation coefficients

24 Types of Lights OpenGL Lighting Cont. OpenGL supports two types of Lights Local (Point) light sources Infinite (Directional) light sources Type of light controlled by w coordinate w = 0 Infinite Light directed along (x y z) w 0 Local Light positioned at (x/w y/w z/w)

25 OpenGL Lighting void InitLights (void) { glenable(gl_lighting); glenable(gl_light0); glenable(gl_light1); Cont. // Turn on the power // Flip each light s switch GLfloat lightpos0[] = {.5, 1,.5, 0}; gllightfv(gl_light0, GL_POSITION, lightpos0); } GLfloat lightpos1[] = {4,4,4,0}; gllightfv(gl_light1, GL_POSITION, lightpos1);

26 OpenGL Moving Light Source Light sources transform like geometry Only modelview transform is applied Stationary light Set transform to identity before specifying location Moving light push matrix, move light, pop matrix to uniquely control a light s position Light source attached to camera

27 Lambertian (diffuse) Simple Models in CG Irradiance from any direction is equally scattered in all directions Specular (Perfect) reflection Irradiance from a direction is reflected in only a single direction A Lambertian surface scatters light equally in all directions Diffuse surface Phong Combines Lambertian with specular n Glossy surface Perfect reflector

28 Find a simple way to create highlights that are viewdependent and happen at about the right place Not physically based Use dot product (cosine) of eye and reflection of light direction about surface normal (n) Raise cosine lobe to some power (n) to control roughness Note: vectors should be normalized to unit length r : direction of specula reflection Phong Reflectance Model s I θ n θ α r = s + 2( s n- )n- = a cos θ + b cos diffuse specular r n e ( ) α Roughness

29 Phong Reflectance Model Cont. I = a cos θ + bcos n ( ) α a=0.3, b=0.7, n=2 a=0.7, b=0.3, n=0.5 diffuse specular A Lambertian sphere.

30 Light sources have color Color Objects have color Typically each color component (R,G,B) is treated separately For plastics the color of the specular highlight is the color of the light. For metals the color of the highlight is the color of the metal. Typically a separate color is assigned for the diffuse and specular components

31 Applying Illumination We now have an illumination model for a point on a surface Assuming that our surface is defined as a mesh of polygonal facets, which points should we use? Keep in mind: It s a fairly expensive calculation Several possible answers, each with different implications for the visual quality of the result

32 Flat Shading The simplest approach, flat shading, calculates illumination at a single point for each polygon: If an object really is faceted, is this accurate? No: o For point sources, the direction to light varies across the facet o For specular reflectance, direction to eye varies across the facet

33 Flat Shading Cont. We can refine it a bit by evaluating the Phong lighting model at each pixel of each polygon, but the result is still clearly faceted: To get smoother-looking surfaces we introduce vertex normals at each vertex Usually different from facet normal

34 Vertex Normal Vertex normal may be Provided with the model Computed from first principles Approximated by averaging the normals of the facets that share the vertex

35 Goaraud Shading This is the most common approach Perform Phong lighting at the vertices Linearly interpolate the resulting colors over faces This is what OpenGL does Does this eliminate the facets? No

37 Phong Shading Phong shading is not the same as Phong lighting, though they are sometimes mixed up Phong lighting: the empirical model we ve been discussing to calculate illumination at a point on a surface Phong shading: linearly interpolating the surface normal across the facet, applying the Phong lighting model at every pixel o Same input as Gouraud shading o Usually very smooth-looking results o But, considerably more expensive

38 Transforming Normals Irritatingly, the matrix for transforming a normal vector is not the same as the matrix for the corresponding transformation on points In other words, don t just treat normals as points: Some not-too-complicated affine analysis shows: If A is a matrix for transforming points, then (A T ) -1 is the matrix for transforming normals When is this the same matrix?

39 Shading Polygons Flat shading Use one surface normal for each polygon Calculate one color for each polygon glshademodel(gl_flat) Gouraud shading Calculate a surface normal at each vertex Calculate color at each vertex Interpolate color inside polygon glshademodel(gl_smooth) Phong normal interpolation Calculate a surface normal at each vertex Interpolate surface normals across polygon Use interpolated normals to calculate color at each pixel OpenGL doesn t do this, but you can with programmable shaders

40 OpenGL Specifying Material Properties glmaterialfv (face, property, value) Separate materials for front and back Properties

41 OpenGL Specifying Normal Use the function glnormal3f( x, y, z) Normals define how a surface reflects light Specifying a normal sets the current normal Remains unchanged until user alters it Usual sequence: glnormal, glvertex., glnormal, glvertex.., glnormal, glvertex Usually, we want unit normals for shading glenable( GL_NORMALIZE ) This is slow either normalize them yourself or don t use glscale scaling affects a normal s length You should generate normals for curved surfaces GLUT does it automatically for teapot, cylinder,

42 Questions?

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

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

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

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

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

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ω

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

Overview Shading Shading Light-material interactions Phong model Shading polygons Shading in OpenGL Why we need shading Suppose we build a model of a sphere using many polygons and color it with glcolor.

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

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

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

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

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

CSE 167: Introduction to Computer Graphics Lecture #8: Lighting Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #4 due Friday, October 28 Introduction:

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

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

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

Introduction to Computer Graphics 3. Shading

Introduction to Computer Graphics 3. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 5 th Ed., Addison Wesley Ref: Hearn and

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

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

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

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

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

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,

CS 4600 Fall Utah School of Computing

Lighting CS 4600 Fall 2015 Utah School of Computing Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection

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

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

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

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

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

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

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

Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or

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

Objectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out

Objectives Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out 1 Steps in OpenGL shading Enable shading and select

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

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

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

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

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

Lights, Colour and Materials In OpenGL

Illumination Models Lights, Colour and Materials In OpenGL Illumination models are used to generate the colour of an object s surface at a given point on that surface. The factors that govern the illumination

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

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

Lighting affects appearance

Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed

Classic Rendering Pipeline

CS580: Classic Rendering Pipeline Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/ Course Objectives Understand classic rendering pipeline Just high-level concepts, not all the

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:

Fall 2017 CSCI 420: Computer Graphics 5.2 Shading in OpenGL Hao Li http://cs420.hao-li.com 1 Outline Normal Vectors in OpenGL Polygonal Shading Light Sources in OpenGL Material Properties in OpenGL Example:

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

walters@buffalo.edu CSE 480/580 Lecture 18 Slide 1 Illumination and Shading Light reflected from nonluminous objects depends on: surface: reflectance transparency, opacity, translucency orientation illumination:

Lighting affects appearance

Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed

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

CS Illumination and Shading. Slide 1

CS 112 - Illumination and Shading Slide 1 Illumination/Lighting Interaction between light and surfaces Physics of optics and thermal radiation Very complex: Light bounces off several surface before reaching

Phong Lighting & Materials. Some slides modified from: David Kabala Others from: Andries Van Damm, Brown Univ.

Phong Lighting & Materials Some slides modified from: David Kabala Others from: Andries Van Damm, Brown Univ. Lighting and Shading Lighting, or illumination, is the process of computing the intensity and

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

Lighting and Shading II. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Lighting and Shading II 1 Objectives Continue discussion of shading Introduce modified Phong model Consider computation of required vectors 2 Ambient Light Ambient light is the result of multiple interactions

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

OpenGL Lighting Computer Graphics Spring Frank Palermo

OpenGL Lighting 15-462 Computer Graphics Spring 2009 Frank Palermo OpenGL is just a bunch of hacks. -Adrien Treuille What Adrien Means... What Adrien means is that OpenGL was designed to produce reasonable-looking

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

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?

The Rasterization Pipeline

Lecture 5: The Rasterization Pipeline Computer Graphics and Imaging UC Berkeley What We ve Covered So Far z x y z x y (0, 0) (w, h) Position objects and the camera in the world Compute position of objects

CGT520 Lighting. Lighting. T-vertices. Normal vector. Color of an object can be specified 1) Explicitly as a color buffer

CGT520 Lighting Lighting Color of an object can be specified 1) Explicitly as a color buffer Bedrich Benes, Ph.D. Purdue University Department of Computer Graphics 2) Implicitly from the illumination model.

Ø 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

Summary. What is Computer Graphics? IRISA 2. Coordinate systems. 4. Geometric transformations for display

Summary Basic Computer Graphics Kadi Bouatouch IRISA Email: kadi@irisa.fr 1. Introduction 2. Coordinate systems 3. Geometric transformations 4. Geometric transformations for display 5. Choosing the camera

Deferred Rendering Due: Wednesday November 15 at 10pm

CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

Turn on the Lights: Reflectance

Turn on the Lights: Reflectance Part 2: Shading Tuesday, October 15 2012 Lecture #14 Goal of Shading Model simple light sources Point light sources Extended light sources Ambient lighting Model lighting

Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 http://www.cs.columbia.edu/~cs4160 Radiance Power per unit projected area perpendicular to the ray per unit solid angle in

Shaders Oscar 1/43 Apodaca and Gritz, Advanced RenderMan Pixel Color Irradiance measures the power per unit area hitting a pixel E = න L i cos θ i dω i (obtained by integrating an equation form last class)

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Computergrafik Matthias Zwicker Universität Bern Herbst 2016 Today More shading Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection and refraction Toon shading

Basic Computer Graphics. Kadi Bouatouch IRISA

Basic Computer Graphics Kadi Bouatouch IRISA Email: kadi@irisa.fr 1 Summary 1. Introduction 2. Coordinate systems 3. Geometric transformations 4. Geometric transformations for display 5. Choosing the camera

CHAPTER5. We have learned to build three-dimensional graphical models and to LIGHTING AND SHADING

LIGHTING AND SHADING CHAPTER5 We have learned to build three-dimensional graphical models and to display them. However, if you render one of our models, you might be disappointed to see images that look

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

Rendering Light Reflection Models

Rendering Light Reflection Models Visual Imaging in the Electronic Age Donald P. Greenberg October 3, 2017 Lecture #13 Program of Computer Graphics, Cornell University General Electric - 167 Cornell in

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

Illumination and Reflection in OpenGL CS 460/560. Computer Graphics. Shadows. Photo-Realism: Ray Tracing. Binghamton University.

Binghamton University EngiNet State University of New York EngiNet Thomas J. Watson School of Engineering and Applied Science WARNING All rights reserved. No Part of this video lecture series may be reproduced

Materials & Shadows. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Winter 2017

Materials & Shadows Steve Rotenberg CSE168: Rendering Algorithms UCSD, Winter 2017 Diffuse Surfaces In an earlier lecture, we discussed diffuse surfaces We looked at the idealized Lambertian diffuse case

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

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

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

Chapter 3. Illumination Models and Surface-Rendering Methods. Department of Computer Science and Engineering

Chapter 3 Illumination Models and Surface-Rendering Methods 3-1 3.1 Overview For a realistic display of a scene the lighting effects should appear naturally. An illumination model, also called a lighting

Lecture outline 433-324 Graphics and Interaction Surface rendering and shading Department of Computer Science and Software Engineering The Introduction Surface rendering and shading Gouraud shading Phong

Illumination Models and Surface-Rendering Methods. Chapter 10

Illumination Models and Surface-Rendering Methods Chapter 10 Illumination and Surface- Rendering Given scene specifications object positions, optical properties of the surface, viewer position, viewing

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

Precomputed Radiance Transfer: Theory and Practice

1 Precomputed Radiance Transfer: Peter-Pike Sloan Microsoft Jaakko Lehtinen Helsinki Univ. of Techn. & Remedy Entertainment Jan Kautz MIT 2 Introduction Jan Kautz MIT 3 Introduction We see here an example

9. Illumination and Shading Approaches for visual realism: - Remove hidden surfaces - Shade visible surfaces and reproduce shadows - Reproduce surface properties Texture Degree of transparency Roughness,

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

Ray-Tracing. Misha Kazhdan

Ray-Tracing Misha Kazhdan Ray-Tracing In graphics, we often represent the surface of a 3D shape by a set of triangles. Goal: Ray-Tracing Take a collection of triangles representing a 3D scene and render

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

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

03 RENDERING PART TWO

03 RENDERING PART TWO WHAT WE HAVE SO FAR: GEOMETRY AFTER TRANSFORMATION AND SOME BASIC CLIPPING / CULLING TEXTURES AND MAPPING MATERIAL VISUALLY DISTINGUISHES 2 OBJECTS WITH IDENTICAL GEOMETRY FOR NOW,

Light Reflection Models

Light Reflection Models Visual Imaging in the Electronic Age Donald P. Greenberg October 21, 2014 Lecture #15 Goal of Realistic Imaging From Strobel, Photographic Materials and Processes Focal Press, 186.

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

Rendering Light Reflection Models

Rendering Light Reflection Models Visual Imaging in the Electronic Age Donald P. Greenberg October 27, 2015 Lecture #18 Goal of Realistic Imaging The resulting images should be physically accurate and

CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein. Lecture 23: Photometric Stereo

CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein Lecture 23: Photometric Stereo Announcements PA3 Artifact due tonight PA3 Demos Thursday Signups close at 4:30 today No lecture on Friday Last Time:

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:

Illumination and Shading Illumination and Shading z Illumination Models y Ambient y Diffuse y Attenuation y Specular Reflection z Interpolated Shading Models y Flat, Gouraud, Phong y Problems CS4451: Fall