Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Similar documents
CSE 681 Illumination and Phong Shading

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

Illumination. Illumination CMSC 435/634

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

Shading. Brian Curless CSE 557 Autumn 2017

Global Illumination. COMP 575/770 Spring 2013

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

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

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

Timothy Walsh. Reflection Models

w Foley, Section16.1 Reading

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

Background: Physics and Math of Shading

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Illumination and Shading

COMP371 COMPUTER GRAPHICS

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

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

Complex Shading Algorithms

The Rendering Equation. Computer Graphics CMU /15-662

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

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Local Reflection Models

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

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

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

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

CS 5625 Lec 2: Shading Models

CPSC 314 LIGHTING AND SHADING

Virtual Reality for Human Computer Interaction

Illumination & Shading: Part 1

BRDF Computer Graphics (Spring 2008)

Simple Lighting/Illumination Models

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

03 RENDERING PART TWO

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

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

Lighting and Shading

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

Comp 410/510 Computer Graphics. Spring Shading

Image Synthesis. Global Illumination. Why Global Illumination? Achieve more photorealistic images

CS6670: Computer Vision

Sung-Eui Yoon ( 윤성의 )

Shading. Brian Curless CSE 457 Spring 2017

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

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

Lecture 4: Reflection Models

Lighting and Materials

Shading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012)

Reflection models and radiometry Advanced Graphics

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

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

CPSC / Illumination and Shading

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

CPSC GLOBAL ILLUMINATION

Lighting affects appearance

Computer Graphics. Illumination and Shading

Shading I Computer Graphics I, Fall 2008

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

CS6670: Computer Vision

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

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

Rendering Light Reflection Models

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Introduction to Computer Graphics 7. Shading

Computer Graphics. Illumination and Shading

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

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

CS5620 Intro to Computer Graphics

Game Technology. Lecture Physically Based Rendering. Dipl-Inform. Robert Konrad Polona Caserman, M.Sc.

Shading 1: basics Christian Miller CS Fall 2011

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

Light Reflection Models

Photorealism: Ray Tracing

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

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Final Project: Real-Time Global Illumination with Radiance Regression Functions

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Shading & Material Appearance

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Rendering Light Reflection Models

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

Introduction to Visualization and Computer Graphics

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Lab 9 - Metal and Glass

Ray Tracing: shading

Illumination Algorithms

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Computer Graphics (CS 543) Lecture 8 (Part 1): Physically-Based Lighting Models

Transcription:

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 Phong = Amb + Diff + Spec Don t Confuse Phong Shading

Refresher on lighting Diffuse component : idiff i=iamb+idiff+ispec Diffuse is Lambert s law: i diff nl Photons are scattered equally in all directions i diff ( nl) m diff s diff cos

Lighting Specular component : ispec Diffuse is dull (left) Specular: simulates a highlight

Specular component: Phong Phong specular highlight model Reflect l around n: r l 2(n l)n m shi m i ( r v) (cos ) shi spec ( n l) n r -l n l nl i spec mshi max(0,( r v) ) m spec s spec Read about Blinns highlight formula: (n. h) m

Ambient component: iamb Ad-hoc tries to account for light coming from other surfaces Just add a constant color: i amb m amb s amb

Lighting i=iamb+idiff+ispec + + = This is just a hack! Has little to do with how reality works!

What s lighting and what s shading? Lighting: the interaction between light and matter Shading: do lighting (at vertices) and determine pixel s colors from these Three types of shading: Flat, Goraud, and Phong

Now Some Info About Lights

Additions to the lighting equation Depends on distance: 1/(a+bt+ct ) Can have more lights: just sum their respective contributions Different light types: 2

Omni r l E L Lights pl pl I r r L 2 ps ps Directional Omni with falloff Spotlight

Falloff OpenGL way f dist s c s l 1 r s q r 2 Typical for Games f dist r r end end 1, r r 0 start,

Spotlights I L ( l) I L *( s 0 l) s exp S- angle P-penumbra U - cutoff

BRDF Theory Ratio between incoming and outgoing light Outgoing Incoming f ( l, v) Lo ( v) E( l)cos( ) i Think of f(l,v) as a function l v

BRDFs Better Modeling Better Modeling: Diffuse define better diffuse Specular different types of specular Ambient beyond just simple Phong ambient

What We ve Done Already For Phong Reflectance We calculate L o = f(l,v)*e(l)*cos( i ) Phong = i*mat+i*nl*mat+i*(nr) m *mat E(l) E(l) f(l,v) E(l) f(l,v) f ( l, v) Lo ( v) E( l)cos( ) i

BRDF Theory Generally Parameterized by: i - incoming o outgoing n Normal V View Vector L Light Vector Easy to param based on two quantities

BRDF Characteristics Helmholtz Reciprocity f ( l, v) f ( v, l) Conservation of Energy What comes in, must go? - Out - Absorbed - Scattered

Light Material Interaction When Light Hits Material: Interacts with surface Goes through surface an interacts below surface Independent of color (most of time for us) Sub-Surface Interaction Surface Interaction

Fresnel Reflectance Governs interface between two surfaces r i is the ideal reflection (look familiar?) t is the ideal refraction Snell s Law (n 1 sin( i ) = n 2 sin( t ) ) i = 90, glancing angle produces white color

Fresnel Example

Which Would You Drink?

Subsurface Scattering Very Important for flesh Most organic materials exhibit Lots of other materials too Without With

Micro-Geometry

Micro-geometry A. Self Shadowing B. Masking C. Interreflection (self) A B C

Example: Micro-Geometry Retro-Reflection

Micro-facet Special Case Micro-geometry Facets Assumed to be ideal mirrors Uses Half-vector h (half-way vector) NDF: Normal Distribution Function p(h) Introduces Geometry Factor G(l,v)

Micro-facet Incorporates: NDF distribution of facets on surface Geometry surface geometry Fresnel f ( l, v) p( h) G( l, v) Rf ( h) 4k cos( )cos( ) p i o

Example BRDFs Modified Phong Old Phong Physically Accurate Phong mat f ( l, v) mat f ( l, v) mat *cos( r ) cos( i ) 0 mat *cos( r ) m m,,

Simple Visibility Many BRDFs (especially game ones) have no visibility term at all This means the visibility term = 1 Implies geometry factor = nl * nv.

Torrance Sparrow Geometry invented by Blinn in 1975 as a reformulation of the Torrance- Sparrow based on an micro-geometry model not affected by roughness

More Geometry Factors Kelemen-Szirmay-Kalos Geometry Factor Has cheap and effective approximation

Rougher = Blurrier

Smith Geometry Factor Gsmith cos i cos (1 k) i k cos o cos (1 k) o k Incorporates roughness into Geometry Term k=(2m 2 /) Roughness

Many Different Things To Consider

Samples from real-world materials

Demo

More Geometry Factor Phong Ambient Ambient Occlusion AO + GI Light Instead of general inclusion within the BRDF We can account for geometry for each geometry specifically

Ambient Occlusion At surface points P shoot out rays If we hit something shelf-shadow If not, calculate lighting (NL) or something Incorporate into reflectance function

AO Light = local hemisphere Centered at current surface point Radius = user parameter Can be rendered with ray tracing Gives perceptual clues of depth, curvature and spatial proximity Lots of techniques (For Games: Screen Space, Horizon-Based, Image-Space)

Example

Other Illumination Models Cliff Lindsay

Overview of today s lecture Refresher on simple lighting models Plus some new stuff More Advanced Illumination Models

Additions to the lighting equation Depends on distance: 1/(a+bt+ct ) Can have more lights: just sum their respective contributions Different light types: 2

What s lighting and what s shading? Lighting: the interaction between light and matter Shading: do lighting (at vertices) and determine pixel s colors from these Three types of shading: Flat, Goraud, and Phong

Global Models You have seen: Local illumination model: Phong Ambient Diffuse Specular Point light sources No: shadows, inter-object light reflection. More global illumination model: Ray Tracing Shadows Area light sources (via distributed ray tracing) inter-object light reflection Tradeoffs: Improvements in fidelity come at the expense of computational complexity.

Realistic rendering For each visible point p in the scene How much light is reflected towards the camera

Direct + Indirect p

Local vs. Global

Indirect Light Direct-only 1-bounce indirect 2-bounce indirect

Ray Tracing

Different Ways to Achieve GI Ray Tracing Path Tracing Photon Mapping Radiosity Metropolis Light Transport

Put it all together