# LIGHTING AND SHADING

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 DH2323 DGI15 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION LIGHTING AND SHADING Christopher Peters HPCViz, KTH Royal Institute of Technology, Sweden Based on DGI12 notes by Carl Henrik Ek

2 Image Synthesis In computer graphics, create images based on a model Recall: An underlying process generates observations Can control generation through parameters

3 Nice Results "Distant Shores" by Christoph Gerber "Christmas Baubles" by Jaime Vives Piqueres "Still with Bolts" by Jaime Vives Piqueres

4 Some Constituents I Light Geometry Surface properties Anything else?

5 Some Constituents II Camera Model (pinhole)

6 Row Vs. Column Format Remember this?

7 Row Vs. Column Format

8 Homogeneous Coordinates Allow common operations to be represented as matrices Translation, rotation, projection For positions and vectors, in 3D: (x,y,z,w) T => (x/w, y/w, z/w) T for w!= 0 w = 1.0: position w = 0.0: vector

9 Lighting and Shading In this lecture, you will apply knowledge about: Some applied math, especially vector algebra What is shading? Why is it good? Determining the colour of a pixel Usually determined by a lighting model Provides depth to perception of images Adds a sense of realism

10 Applications Photorealistic

11 Applications Non-photorealistic

12 Lighting Vs. Shading Lighting Interaction between materials and light sources Shading Deciding the colour of a pixel Based usually on a lighting model Other methods possible too though

13 How To Implement? Theory Practice General classifications Lighting fundamentals Lambertian illumination Some shading models Extensions Flat, Gouraud, Phong Maths programming (vector operations, normals, plane, angles, intersections)

14 Some Classifications View Dependent Determine an image by solving the illumination that arrives through the view-port only View Independent Determine the lighting distribution in an entire scene regardless of viewing position. Views are taken after lighting simulation by sampling the full solution to determine the view through the viewport

15 Some Classifications Local Illumination Consider lighting effects only directly from the light sources and ignore effects of other objects in the scene (e.g. reflection off other objects) Global Illumination Account for all modes of light transport

16 Why Go Local? Usually easy to control and express Director's chair: important when you want a scene to look a certain way Fast Easier to obtain real-time performance (or just tractable calculations) Do not require knowledge of the entire scene But Not as accurate or compelling as global models Harder to control than global models

17 How Can It Be Modelled? Use a lighting model as inspiration But real light extremely complicated to simulate Light bounces around the environment Heavy processing required even for coarse approximations Simplifications allow real-time performance Lighting models: Lambertian we will consider this first Phong not to be confused with Phong shading Blinn-Phong and others...

18 Simplifications Simplification #1: use isotropic point light sources Isotropic means that the light source radiates energy equally in all directions Simplifies our light source energy equations that we ll look at When we mention light, we are really talking about energy Simplification #2: simulate only specific surface types Makes it easier to specify materials and calculate reflections But visually limited

19 Radiant Intensity Light is defined by its Radiant Intensity, I Radiant Intensity is measured in Watts/sr sr is the solid angle (in steradians) is the energy leaving the surface per unit time Known as power or flux and measured in Watts But: it s a point light source, so it radiates light equally in all directions So r 2 = 1 (unit sphere) Now know energy leaving light source in any direction

20 Inverse Square Law But we want to know the energy arriving at a surface This irradiance, E, may now be determined: Irradiance is the flux per unit area at a point x, a distance r from the point light source We know the source radiates I Watts in all directions So the power is radiated through a sphere centred at the lightsource At a distance r from the source, the surface area of this sphere is => the power per unit area at x is: This assumes the surface at x is perpendicular to the direction to the light source To handle all angles, we must apply the cosine rule

21 The Cosine Law A surface orientated perpendicular to a light source will receive more energy than a surface orientated at an angle to the light source More energy = brighter appearance The irradiance E is proportional to 1/area As the area increases, the irradiance decreases As increases, the irradiance (thus surface brightness) decreases: 2015

22 Lambertian Illumination Model Cosine rule is used to implement Lambertian surfaces Also known as diffuse surfaces Diffuse surfaces reflect light equally in all directions The surface is characterised by a reflectance parameter is the incident power is the reflected power So the reflectance is the ratio of the total incident power to the total reflected power

23 Lambertian Illumination Model To shade a diffuse surface, we need to know The normal to the surface at the point to be shaded The diffuse reflectance of the surface The positions and powers of the light sources in the scene Assuming contribution is from a single isotropic light source: accounts for the reflectance attribute of the surface accounts for the orientation of the surface with respect to the light source

24 Lambertian Illumination Model This is local illumination Only concerned with energy hitting the surface directly from light sources Not concerned with light bouncing off other surfaces and hitting the surface =>Models derived from it are also local

25 Basic Shading Models Flat, gouraud and phong shading Flat shading Per polygon shading Gouraud shading Interpolate (bilinearly) colour values to get tween pixels Per vertex shading Phong shading Interpolate normals Per pixel shading

26 Flat Shading Constant shading Very fast Very simple Does not look very smooth Compute the colour of a polygon Use this as the colour for the whole polygon

27 Gouraud Shading Calculates the light intensity at each vertex in a polygon For each interior point in the polygon, we interpolate the light intensity determined at the vertices Given a starting value, and an end value, interpolation can be used to approximate intermediate values Similar idea to the way in which colours are interpolated across the surface of a polygon We only need to do lighting calculations at the vertices Fast! But lighting is only correct at the vertices Unrealistic

29 Limitations Gouraud only calculates the actual lighting at the vertices of the polygon Wikimedia Commons

30 Phong Shading To improve on Gouraud shading, interpolate normals across a surface Lighting model then applied to each interior point in a polygon Must take care to ensure that all interpolated normals are of unit length This is known as Phong Shading Phong shading produces more accurate results than Gouraud Shading But slower!

31 Phong Shading Phong shading can reproduce highlights in the center of a polygon that Gouraud Shading may miss

32 Phong Illumination Model Lambertian Illumination model: only diffuse surfaces Surfaces reflect light in all directions equally What about modelling shiny surfaces too? Reflected radiance depends heavily on the outgoing direction Phong Illumination model consists of: Lambertian Model for diffuse surfaces A function to handle specular reflection Ambient term to approximate all other light

33 Phong Illumination Model NOT the same as Phong Shading

34 Phong Illumination Model Allows us to model many different types of surfaces Easy to control Not a very realistic model But produces good results Each object has material data associated with it: ambient reflectance diffuse reflectance specular reflectance phong exponent (shininess parameter)

35 Materials Parameters: Interaction with light Reflective properties Components m ambient, m diffuse, m specular Proportion of each colour reflected

36 Lambertian Vs Phong Lambertian Surface Phong Illuminated Specular Surface

37 A little bit of OpenGL (1.2 old) Light sources LIGHT0 to LIGHT7 Each light must be enabled Can specify light parameters using Some parameters glenable(gl_light1); gllightf{iv}(gl_light0, param, value); GL_AMBIENT GL_DIFFUSE GL_SPECULAR GL_POSITION

38 Shading in OpenGL 1.2 To enable lighting use: glenable(gl_lighting); OpenGL does not support true Phong shading; it interpolates the intensities across each polygon Gouraud shading glshademodel(gl_smooth);

39 Material Properties We can assign different properties to each side of a polygon To assign material properties: GL_FRONT GL_BACK GL_FRONT_AND_BACK glmaterial{if}v(face, param, value); GL_AMBIENT GL_DIFFUSE GL_AMBIENT_AND_DIFFUSE GL_SPECULAR GL_EMISSION GL_SHININESS RGB Values Phong Exponent

40 Bump Mapping Lots of cool effects possible Bump mapping: modify surface normals for lighting calcs (not actual geometry) Query a heightmap See also: normal mapping

41 Shaders Modern way of implementing rendering techniques Various types: Pixel Vertex Geometry Tessellation Shader languages HLSL, GLSL, CG

42 Next lecture Global illumination Next week (20 th April) 08:00 10:00 L1 Lab support session Thursday 16th April (tomorrow) 10:00 12:00 VIC Studio

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

### Shading and Illumination

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ω

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

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

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

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

### Why we need shading?

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

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

### Illumination and Shading ECE 567

Illumination and Shading ECE 567 Overview Lighting Models Ambient light Diffuse light Specular light Shading Models Flat shading Gouraud shading Phong shading OpenGL 2 Introduction To add realism to drawings

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

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

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

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

### Illumination & Shading I

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

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

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

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

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

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

### Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

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

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

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

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

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

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

### IMAGE-BASED RENDERING AND ANIMATION

DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION IMAGE-BASED RENDERING AND ANIMATION Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

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

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

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

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

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

### Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading

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

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

### RASTERISED RENDERING

DH2323 DGI17 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION RASTERISED RENDERING Christopher Peters CST, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

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

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

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

### Illumination and Shading

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

### Computer Graphics Lighting

Lighting 1 Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Lighting.pptx Why Do We Care About Lighting?

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

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

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

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

### Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

Image Formation: Light and Shading CSE 152 Lecture 3 Announcements Homework 1 is due Apr 11, 11:59 PM Homework 2 will be assigned on Apr 11 Reading: Chapter 2: Light and Shading Geometric image formation

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

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

### 5.2 Shading in OpenGL

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:

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

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

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

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

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

### Lessons Learned from HW4. Shading. Objectives. Why we need shading. Shading. Scattering

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

### Introduction to Computer Vision. Introduction CMPSCI 591A/691A CMPSCI 570/670. Image Formation

Introduction CMPSCI 591A/691A CMPSCI 570/670 Image Formation Lecture Outline Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic

### Illumination and Shading

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

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

### Lecture outline Graphics and Interaction Surface rendering and shading. Shading techniques. Introduction. Surface rendering and shading

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

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

### Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao Computer Science Department University of California, Irvine CS295, Spring 2017 Shuang Zhao 1 Today s Lecture Radiometry Physics of light BRDFs How materials

### Shaders. Oscar. 1/43 Apodaca and Gritz, Advanced RenderMan

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)

### How do we draw a picture?

1 How do we draw a picture? Define geometry. Now what? We can draw the edges of the faces. Wireframe. We can only draw the edges of faces that are visible. We can fill in the faces. Giving each object

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

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

### Lecture 18: Primer on Ray Tracing Techniques

Lecture 18: Primer on Ray Tracing Techniques 6.172: Performance Engineering of Software Systems Joshua Slocum November 16, 2010 A Little Background Image rendering technique Simulate rays of light - ray

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

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

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

### COMP environment mapping Mar. 12, r = 2n(n v) v

Rendering mirror surfaces The next texture mapping method assumes we have a mirror surface, or at least a reflectance function that contains a mirror component. Examples might be a car window or hood,

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

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

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

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

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

### Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

CSCI 420 Computer Graphics Lecture 15 Ray Tracing Ray Casting Shadow Rays Reflection and Transmission [Ch. 13.2-13.3] Jernej Barbic University of Southern California 1 Local Illumination Object illuminations

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

### Scanline Rendering 1 1/42

Scanline Rendering 1 1/42 Scanline Renderer Think of it as setting up a virtual environment/world that mimics the real world but cheats a bit for efficiency, using what we know about light and our eye

### Shading & Material Appearance

Shading & Material Appearance ACM. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. MIT EECS 6.837 Matusik

### Computer Graphics I. Assignment 3

UNIVERSITÄT DES SAARLANDES Dr.-Ing. Hendrik P.A. Lensch Max Planck Institut Informatik Art Tevs (tevs@mpi-inf.mpg.de) Boris Ajdin (bajdin@mpi-inf.mpg.de) Matthias Hullin (hullin@mpi-inf.mpg.de) 12. November

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

### Assignment 6: Ray Tracing

Assignment 6: Ray Tracing Programming Lab Due: Monday, April 20 (midnight) 1 Introduction Throughout this semester you have written code that manipulated shapes and cameras to prepare a scene for rendering.

Shading Flat shading Gouraud shading Phong shading Flat Shading and Perception Lateral inhibition: exaggerates perceived intensity Mach bands: perceived stripes along edges Icosahedron with Sphere Normals

### The Traditional Graphics Pipeline

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

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

### Illumination and Shading

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

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

### CS 4620 Midterm, March 21, 2017

CS 460 Midterm, March 1, 017 This 90-minute exam has 4 questions worth a total of 100 points. Use the back of the pages if you need more space. Academic Integrity is expected of all students of Cornell

### GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Shader Languages Currently 3 major shader languages Cg (Nvidia) HLSL (Microsoft) Derived from Cg GLSL (OpenGL) Main influences

### Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Computer Graphics Lecture 13 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

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

### OpenGL shaders and programming models that provide object persistence

OpenGL shaders and programming models that provide object persistence COSC342 Lecture 22 19 May 2016 OpenGL shaders We discussed forms of local illumination in the ray tracing lectures. We also saw that

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

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

### SEOUL NATIONAL UNIVERSITY

Fashion Technology 5. 3D Garment CAD-1 Sungmin Kim SEOUL NATIONAL UNIVERSITY Overview Design Process Concept Design Scalable vector graphics Feature-based design Pattern Design 2D Parametric design 3D

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

### GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Programmable Shaders //per vertex inputs from main attribute aposition; attribute anormal; //outputs to frag. program varying

### Shaders. Slide credit to Prof. Zwicker

Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?