Shading I Computer Graphics I, Fall 2008

Similar documents
Illumination & 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.

Comp 410/510 Computer Graphics. Spring Shading

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

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Introduction to Computer Graphics 7. Shading

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

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

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

Why we need shading?

Three-Dimensional Graphics V. Guoying Zhao 1 / 55

CS452/552; EE465/505. Intro to Lighting

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

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

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

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

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

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

Virtual Reality for Human Computer Interaction

CS 4600 Fall Utah School of Computing

Lighting. Figure 10.1

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

Illumination Models & Shading

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

CS5620 Intro to Computer Graphics

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

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

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

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

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

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

Illumination & Shading: Part 1

w Foley, Section16.1 Reading

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

Introduction to Computer Graphics with WebGL

Shading II. CITS3003 Graphics & Animation

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

Today we will start to look at illumination models in computer graphics

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Turn on the Lights: Reflectance

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Illumination in Computer Graphics

Computer Graphics. Illumination and Shading

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

Shading. Brian Curless CSE 557 Autumn 2017

Simple Lighting/Illumination Models

Illumination and Shading

CSE 681 Illumination and Phong Shading

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

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

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

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

Illumination Models and Shading

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

CPSC 314 LIGHTING AND SHADING

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

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

Illumination and Shading

Local Reflection Models

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Lighting affects appearance

Supplement to Lecture 16

1.6 Rough Surface Scattering Applications Computer Graphic Shading and Rendering

Raytracing. COSC 4328/5327 Scott A. King

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

OpenGL Lighting Computer Graphics Spring Frank Palermo

Sung-Eui Yoon ( 윤성의 )

Lighting Models. CS116B Chris Pollett Mar 21, 2004.

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

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

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

CEng 477 Introduction to Computer Graphics Fall

Visualisatie BMT. Rendering. Arjan Kok

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Shading Intro. Shading & Lighting. Light and Matter. Light and Matter

University of Victoria CSC 305 Shading. Brian Wyvill 2016

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

Shading. Brian Curless CSE 457 Spring 2017

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

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

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

Reflection and Shading

Computer Graphics. Illumination and Shading

CS 5625 Lec 2: Shading Models

Lighting and Shading

Display Issues Week 5

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

Graphics and Visualization

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

Ray-Tracing. Misha Kazhdan

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Interactive Real-Time Raycasting

Illumination & Shading I

CPSC / Illumination and Shading

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

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

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Module 5: Video Modeling Lecture 28: Illumination model. The Lecture Contains: Diffuse and Specular Reflection. Objectives_template

Virtual Reality for Human Computer Interaction

Transcription:

Shading I 1

Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics hardware 2

Why we need shading Suppose build model of sphere using many polygons and color it with glcolor ==> get something like But want 3

Shading Why image of real sphere look like Light-material interactions ==> each point different color or shade Need to consider Light sources Material properties Location of viewer Surface orientation 4

Scattering Light strikes A Some scattered Some absorbed Some of scattered light strikes B Some scattered Some absorbed Some of this scattered light strikes A and so on 5

Rendering Equation Infinite scattering and absorption of light can be described by the rendering equation Cannot be solved in general Ray tracing = special case for perfectly reflecting surfaces Rendering equation: global and includes Shadows Multiple scattering from object to object 6

Global Effects shadow translucent surface multiple reflection 7

Local vs Global Rendering Correct shading requires global calculation involving all objects and light sources Incompatible with pipeline model shade each polygon independently local rendering In CG, especially real time CG, happy if things look right Many techniques for approximating global effects 8

Light-Material Interaction Light strikes object ==> partially absorbed and partially scattered (reflected) Amount reflected determines color and brightness of object Surface appears red under white light because red component of light reflected rest absorbed Reflected light scatter depends on surface smoothness orientation 9

Light Sources General light sources difficult must integrate light from all points on source 10

Simple Light Sources Point source Model with position and color Distant source = infinite distance away (parallel) Spotlight Restrict light from ideal point source Ambient light Same amount of light everywhere in scene Can model contribution of many sources and reflecting surfaces 11

Surface Types Smoother surface ==> more reflected light in direction of perfect mirror reflection Very rough surface scatters light in all directions smooth surface rough surface 12

Phong Model Simple model, can be computed rapidly Has three components Diffuse Specular Ambient Uses four vectors l: To source v: To viewer n: Normal r: Perfect reflector 13

Ideal Reflector Normal determined by local orientation Angle of incidence = angle of reflection Three vectors must be coplanar r = 2 (l n ) n - l 14

Lambertian Surface Perfectly diffuse reflector Light scattered equally in all directions Amount of light reflected proportional to vertical component of incoming light reflected light ~cos θ i - cos θ i = l n if vectors normalized Also three coefficients, k r, k b, k g how much of each color component reflected 15

Specular Surfaces Most surfaces neither ideal diffusers nor perfectly specular (ideal reflectors) Smooth surfaces show specular highlights due to incoming light reflected in directions concentrated close to direction of perfect reflection specular highlight 16

Modeling Specular Relections Phong proposed using term that dropped off as angle between viewer and ideal reflection increased I r ~ k s I cos α φ reflected shininess coef intensity incoming intensity absorption coef φ 17

The Shininess Coefficient Values of α between 100 and 200 correspond to metals Values between 5 and 10 give surface that look like plastic cos α φ -90 φ 90 18