Shading Models. Simulate physical phenomena

Similar documents
Illumination Models & Shading

CS5620 Intro to Computer Graphics

Computer Graphics. Shading. Page. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science, Technion. The Physics

Illumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.

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

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

CS Illumination and Shading. Slide 1

Shading I Computer Graphics I, Fall 2008

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

w Foley, Section16.1 Reading

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CPSC 314 LIGHTING AND SHADING

Illumination & Shading

CEng 477 Introduction to Computer Graphics Fall

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Illumination and Shading

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

Comp 410/510 Computer Graphics. Spring Shading

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

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

Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.

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

Illumination and Shading

Illumination & Shading: Part 1

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

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

521493S Computer Graphics Exercise 3 (Chapters 6-8)

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

University of Victoria CSC 305 Shading. Brian Wyvill 2016

Visualisatie BMT. Rendering. Arjan Kok

Computer Graphics. Illumination and Shading

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Introduction to Computer Graphics 7. Shading

Lighting and Shading

CPSC / Illumination and Shading

Computer Graphics. Illumination and Shading

Reflection and Shading

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

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

Illumination in Computer Graphics

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

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Turn on the Lights: Reflectance

Overview. Shading. Shading. Why we need shading. Shading Light-material interactions Phong model Shading polygons Shading in OpenGL

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

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Three-Dimensional Graphics V. Guoying Zhao 1 / 55

Simple Lighting/Illumination Models

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

CS230 : Computer Graphics Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Virtual Reality for Human Computer Interaction

Shading and Illumination

Illumination Models and Shading

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

Illumination. Illumination CMSC 435/634

Shading. Why we need shading. Scattering. Shading. Objectives

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Computer Graphics: 3-Local Illumination Models

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

Illumination and Shading

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

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

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics V. Guoying Zhao 1 / 65

Shading , Fall 2004 Nancy Pollard Mark Tomczak

Interactive Real-Time Raycasting

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

Raytracing CS148 AS3. Due :59pm PDT

From Graphics to Visualization

Illumination and Shading

9. Illumination and Shading

Lighting/Shading III. Week 7, Wed Mar 3

CS 4600 Fall Utah School of Computing

Sung-Eui Yoon ( 윤성의 )

Global Illumination with Photon Map Compensation

CS770/870 Spring 2017 Color and Shading

2001, Denis Zorin. Subdivision Surfaces

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

Lighting. Figure 10.1

Illumination Models and Surface-Rendering Methods. Chapter 10

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Pipeline Operations. CS 4620 Lecture 10

Illumination & Shading I

CS 5625 Lec 2: Shading Models

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

Shading. Brian Curless CSE 457 Spring 2017

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

Illumination and Shading

-=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

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

Ray-Tracing. Misha Kazhdan

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

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

How do we draw a picture?

Light Transport Baoquan Chen 2017

Illumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.

Pipeline Operations. CS 4620 Lecture 14

Transcription:

Illumination Models & Shading

Shading Models Simulate hysical henomena Real illumination simulation is comlicated & exensive Use aroximation and heuristics with little hysical basis that looks surrisingly good: Lighting - Center for Grahics and Geometric Comuting, Technion 2

Local vs. Global Illumination Models Local model direct and local interaction of each object location with the light. Global model: interactions and exchange of light energy between different objects. Lighting - Center for Grahics and Geometric Comuting, Technion 3

Light Sources Point source (A): All light originates at a oint Rays hit a lanar surface at different incidence angles Parallel source (B): All light rays are arallel Rays hit a lanar surface at identical incidence angles May be modeled as a oint source at infinity Also denoted Directional light source Area source (C): Light originates at finite area in sace. An object of finite area that emits light Also denoted Distributed source Question: One of these lights Sources is far more difficult to Handle. Which one and why? Lighting - Center for Grahics and Geometric Comuting, Technion 4 A B C

Assume non-directional light in the environment Object illuminated with same light everywhere Looks like silhouette Ambient Light The Illumination equation I = I a k a I a - ambient light intensity k a - fraction of ambient light reflected from surface As a vector, also defines object color Lighting - Center for Grahics and Geometric Comuting, Technion 5

Diffuse Light Dull surfaces such as solid matte lastic reflects incoming light uniformly in all directions This is called diffuse or Lambertian reflection For light source in a normalized direction L and a surface with normal N, the illumination of the surface is roortional to <N, L> L θ N Lighting - Center for Grahics and Geometric Comuting, Technion 6

Diffuse Reflection Illumination equation is now: I = I k + I k N + a a, L = Iaka I kd I - oint light source s intensity k d - surface diffuse reflection coefficient d cosθ Question: Can we locate the light source from the shading? Lighting - Center for Grahics and Geometric Comuting, Technion 7

Secular Reflection Shiny objects (e.g. metallic) reflect light in a referred direction R determined by the surface normal N. L N θ θ α R V Most objects are not ideal mirrors also reflect in the immediate vicinity of R Phong Model aroximate attenuation by the form of cos n α (no real hysical basis) Question: What is the color of the reflected comonent? Lighting - Center for Grahics and Geometric Comuting, Technion 8

Secular Reflection (Phong Model) Illumination equation: k s n a a ( n k ( N L) + k( R V ) I = I k + I ) d - Secular reflection coefficient - Secularity exonent s Lighting - Center for Grahics and Geometric Comuting, Technion 9

Secular Reflection (cont d) Exonent n of cosine controls the decay factor the of attenuation function: Again, no hysical basis but it does look good: Lighting - Center for Grahics and Geometric Comuting, Technion 10

More on Illumination Equation For multile light sources: shadingmodel I = I aka+ I ( n k ( N L ) + k ( R V) ) d s I of all light sources are added together Precautions should be taken from overflows Question: How can we achieve atmosheric attenuation effects? Lighting - Center for Grahics and Geometric Comuting, Technion 11

Even More on Illumination Equation For distance/atmosheric attenuation sources: I = I aka+ I d ( n k ( N L ) + k ( R V) ) d d - distance between surface and light source and/or distance between surface and viewer (Heuristic atmosheric attenuation) s Question: why an attenuation of 1/d and not the hysically correct decay (which is!?) Lighting - Center for Grahics and Geometric Comuting, Technion 12

Alied to iecewise linear olygonal models Simle surface lighting aroximated over olygons Illumination value deends only on olygon normal each olygon is colored with a uniform intensity Looks non-smooth (worsened by Mach bands effects) Flat Shading Lighting - Center for Grahics and Geometric Comuting, Technion 13

Flat Shading Lighting - Center for Grahics and Geometric Comuting, Technion 14

Gouraud Shading If a olyhedron is an aroximation of smooth surface: assign to each vertex the normal of original surface at that oint If surface is not available use estimated normal (how?) Comute illumination intensity at vertices using those normals Question: And then what? Lighting - Center for Grahics and Geometric Comuting, Technion 15

Gouraud Shading Linearly interolate lighting intensities at the vertices over interior ixels of the olygon, in the image lane Question: Can Gouraud shading suort secular lighting? Lighting - Center for Grahics and Geometric Comuting, Technion 16

Gouraud Shading Lighting - Center for Grahics and Geometric Comuting, Technion 17

Phong Shading Interolate (at the vertices in image sace) normal vectors instead of illumination intensities Aly the illumination equation for each interior ixel with its own (interolated) normal Lighting - Center for Grahics and Geometric Comuting, Technion 18

Gouraud Shading a Triangle Lighting - Center for Grahics and Geometric Comuting, Technion 19

Comments on Shading Phong shading is clearly more exensive (why?) but well worth the effort (yet, with no Oen GL suort) Can achieve good looking secular highlight effects Both the Gouraud and Phong shading schemes are erformed in the image lane and fit well into our olygonal scan-conversion fill scheme Both the Gouraud and Phong are view deendent Can cause artifacts during animation as they are transformation deendent shadingalgo Lighting - Center for Grahics and Geometric Comuting, Technion 20

More Examles Flat Gouraud Phong Lighting - Center for Grahics and Geometric Comuting, Technion 21