Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One.

Slides:



Advertisements
Similar presentations
Physically Based Shading
Advertisements

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model.
Exploration of advanced lighting and shading techniques
William A.P. Smith and Edwin R. Hancock Department of Computer Science, University of York, UK CVPR 2009 Reporter: Annie Lin.
Exploration of bump, parallax, relief and displacement mapping
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
ADVANCED SKIN SHADING WITH FACEWORKS Nathan Reed — NVIDIA March 24, 2014.
Computer graphics & visualization Global Illumination Effects.
Environment Mapping CSE 781 – Roger Crawfis
Week 9 - Monday.  What did we talk about last time?  BRDFs  Texture mapping and bump mapping in shaders.
Local Reflection Model Jian Huang, CS 594, Fall 2002.
Advanced Rendering MATERIALS, POSTEFFECTS AND SCENE COMPOSITION GDC
Image Based Lighting (IBL)
Physically Based Illumination Models
Light Issues in Computer Graphics Presented by Saleema Amershi.
Torrance Sparrow Model of Reflectance + Oren Nayar Model of Reflectance.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Based on slides created by Edward Angel
Computer Graphics - Class 10
1Notes  Assignment 1 is out, due October 12  Inverse Kinematics  Evaluating Catmull-Rom splines for motion curves  Wednesday: may be late (will get.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.
Rendering (彩現 渲染).
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Part I: Basics of Computer Graphics
(conventional Cartesian reference system)
6.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
Object recognition under varying illumination. Lighting changes objects appearance.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
LIGHTING Part One - Theory based on Chapter 6. Lights in the real world Lights bounce off surfaces and reflect colors, scattering light in many directions.
Specular Reflections from Rough Surfaces Lecture #4 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
SET09115 Intro Graphics Programming
CS 445 / 645: Introductory Computer Graphics
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
Advanced Illumination Models Chapter 7 of “Real-Time Rendering, 3 rd Edition”
Diffuse Reflections from Rough Surfaces Lecture #5
SIGGRAPH 2010 Course: Physically Based Shading Models in Film and Game Production SIGGRAPH 2010 Physically Based Shading Models in Film and Game Production.
Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
BRDF models and their use in Global Illumination Algorithms László Szirmay-Kalos.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Computer Graphics (Spring 2003) COMS 4160, Lecture 18: Shading 2 Ravi Ramamoorthi Guest Lecturer: Aner Benartzi.
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
02/2/05© 2005 University of Wisconsin Last Time Reflectance part 1 –Radiometry –Lambertian –Specular.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
Physically-based Illumination Models (2) CPSC 591/691.
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Reflectance Models CS 319 Advanced Topics in Computer Graphics John C. Hart.
Computer Graphics: Illumination
Basic Ray Tracing CMSC 435/634.
CHAPTER 9 Lighting © 2008 Cengage Learning EMEA.
Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular model
Physically-Based Rendering
Exploring Shaders in Unity
Presentation transcript:

Definition Platforms for this talk –Windows / DirectX11 –OpenGL 4 / OpenGL ES 3.0 –PlayStation 4 –Xbox One

ALU Budgets What do you use higher ALU performance for? –Full HD resolution(1920x1080) 2.25 times larger than half HD resolution(1280x720) –Post-processing High quality post-processing with existing algorithms –High resolution post-processing –Glare, de-focus blur, motion blur –Screen-space anti-aliasing New post-processing –Screen-space lighting (reflections), ambient obscurance, sub- surface scattering, volume rendering

Recent GPU Trend ALU free –Current GPU performance doesn’t depend on the number of ALU cycles B/W of cache / texture / render targets Register / multi-threading Limitations of render backend resources –Increasing the number of ALU instructions doesn’t tend to decrease performance ALU is typically used to save B/W by encoding and decoding It depends on the design of rendering passes

How About Shading? Many texture samples –For both forward and deferred techniques The only difference is the rendering pass –Albedo, Reflectance –Normal / Height, Roughness, AO –G-Buffer –Light source (IBL / SSL) / accumulation, GI info. –Do we have a budget to use more ALU?

More ALU? Can we use more ALU instructions for shading? –Old normalized Blinn-Phong model uses 20 to 30 instructions –100 instructions / light are affordable for new generation consoles –Using more instructions for shading is a good candidate to use ALU efficiently

The Current Popular Model A physically based model for specular –Microfacet model GGX (Trowbridge-Reitz) (D) Schlick approximation (F) Smith (G)

Better Model for Fresnel? Spherical Gaussian Approximation –This model approximates the Schlick approximation –Should we approximate the Fresnel equation? –Should we use more a accurate approximation?

Evaluation Yellow : Fresnel equation (IOR = aluminum at 610nm) Green : Schlick approximation (IOR = aluminum at 610nm) Blue : Fresnel equation (IOR = 1.5) Purple : Schlick approximation (IOR = 1.5) F(  ) 

Need Approximation? Do we have to approximate Fresnel for new generation consoles? –Fresnel equation w.r.t. reflectance ( f 0 ) It is easier to handle than refractive index

(IOR = i ) Blue : Fresnel equation with the refractive index Purple : Fresnel equation with the real reflectance Fresnel with Reflectance This Fresnel equation is inaccurate for large f 0 –A large real f 0 is calculated from a complex refractive index –The Fresnel equation should take complex numbers –The complex version is more complicated F(  ) 

Improved Spherical Gaussian Fresnel behavior is complicated –Need a complex approximation to represent the behavior –Try to improve accuracy with most useful value IOR = 1.5

Improved Spherical Gaussian (IOR = 1.5) Blue : Schlick approximation Purple : Fresnel equation Yellow : Improved Spherical Gaussian Schlick Improved Spherical Gaussian F(  ) 

Conclusion for F Term Schlick is a good enough approximation –It still has a problem with complex refractive indices with a large imaginary part It can be improved with Fresnel Term Approximations for Metals [WSCG 2005] –It requires a complex refractive index as a parameter –This difference is difficult to distinguish with punctual lights, but is more visible with image based lighting We use the Schlick approximation in this talk, though you can choose better approximations (including improved Spherical Gaussian) as you like

How about Diffuse? Lambert? –It is not realistic –We use microfacet models for specular, so why not for diffuse?

Oren-Nayar? Use Oren-Nayar [SIGGRAPH 1994] –Diffuse model taking into account the microfacet model and roughness View dependent component Matte-look depending on roughness Retro-reflective effect

NDF is not GGX –NDF of Oren-Nayar is G term is not Smith –Torrance-Sparrow V-cavity model Oren-Nayar doesn’t conserve energy with specular on each facet –Not a physically based model Problems with Oren-Nayar

Our Goal Better diffuse model –Using the same microfacet model as specular –Physically based diffuse model

Microfacet Model for Specular A reflectance model for specular can be simple –You only take reflection in view direction into account

Microfacet Model for Diffuse Since diffuse reflects incident light in all directions, a reflectance model is complex –If we assume all facets are Lambertian –All facets reflect toward view direction  : Hemisphere around the geometry normal(n) m : Microfacet normal

Try to Improve Oren-Nayar The first problem is that Oren-Nayar doesn’t take Fresnel into account –See “Improved Diffuse Reflection Models for Computer Vision” [WOLFF et al. 1998]

Starting Point if otherwise Blue : Original Oren-Nayar Purple : Improved one (SIGGRAPH 2012) LrLr ee

Intuition When surface gets rougher –Microfacet model behaves like a blur filter –When roughness = 0 Fresnel effect with Lambertian –When roughness increases Fresnel effect gets blurrier

Oren-Nayar analysis Lambertian View-dependent factor (microfacet effect) Blending factor (with roughness)

Diffuse Fresnel Term Using “A Practitioners’ Assesment of Light Reflection Models” [PG 1997]

Add Fresnel Term

Result Lambert Improved Oren-Nayar [SIGGRAPH 2012] Oren-Nayar with Fresnel roughness = 0.7

Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e 1 (0  ) cos  1 (0  ) f0f LrLr

Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e (45  ) cos  1 (0  ) f0f LrLr

Analysis Blue : Oren-Nayar, roughness = 0.0 Purple: Oren-Nayar w/ Fresnel, roughness = 0.0 Yellow: Oren-Nayar, roughness = 1.0 Green : Oren-Nayar w/ Fresnel, roughness = 1.0 ll n·e 0.174(80  ) cos  1 (0  ) f0f LrLr

Is This Physically Based Diffuse? This is still a compromise –F term In reality, each facet must follow Fresnel Integrate Fresnel (with other terms) over facets –D and G terms Still not GGX and Smith

Try to Derive a New Diffuse Model Simply, integrating the diffuse microfacet model with given D, F and G functions –Not modifying Oren-Nayar

Deriving a New Model The model doesn’t have a closed form –It is numerically integrated

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.0 f0f ll LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.5 f0f ll LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 1.0 (0  ) cos  1.0 (0  ) roughness 1.0 f0f ll LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e 0.5 (60  ) cos  1.0 (0  ) roughness 0.8 f0f ll LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·e (70  ) cos  0.5 (60  ) roughness 0.6 f0f ll LrLr

Analysis Blue : Oren-Nayar Puprle: Oren-Nayar w/ Fresnel Green : New model n·l (30  ) cos  1.0 (0  ) roughness 0.0 f0f ee LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l (30  ) cos  1.0 (0  ) roughness 0.3 f0f ee LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l (30  ) cos  1.0 (0  ) roughness 0.7 f0f ee LrLr

Analysis Blue : Oren-Nayar Purple: Oren-Nayar w/ Fresnel Green : New model n·l (75  ) cos  (10  ) roughness 0.8 f0f ee LrLr

Implementation of the New Model Baking the model to a texture is the simplest way –3 vectors and 2 scalars f 0 can be factored out of texture –It is difficult to bake the model directly

ALU implementation When your shader is texture-bound –Typically, it is texture-bound –Complex fitted model is better than texture reads

Fitted Shading Model

Complexity The model is very complicated –Only a slight performance difference between our new model and Oren-Nayar in typical scenes –ALU is free!

Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.0 f0f Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 0.5 f0f Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

Fitted Model Analysis n·e 1.0 (0  ) cos  1.0 (0  ) roughness 1.0 f0f Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

Fitted Model Analysis n·e 0.5 (60  ) cos  1.0 (0  ) roughness 0.8 f0f Blue : Fitted model Orange Dash : Numerically integrated n·l LrLr

Fitted Model Analysis n·e (70  ) cos  0.5 (60  ) roughness 0.6 f0f Blue : Fitted model Orange Dash : Numerically integrated ll LrLr

Fitted Model Analysis n·l (30  ) cos  1.0 (0  ) roughness 0.0 f0f Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

Fitted Model Analysis n·l (30  ) cos  1.0 (0  ) roughness 0.3 f0f Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

Fitted Model Analysis n·l (30  ) cos  1.0 (0  ) roughness 0.7 f0f Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

Fitted Model Analysis n·l 0.259(75  ) cos  (10  ) roughness 0.8 f0f Blue : Fitted model Orange Dash : Numerically integrated ee LrLr

Limitation Accuracy at grazing angles for both view and light vectors is not enough with this model –It may be noticeable on the edges Roughness is assumed to be from 0 to 1 The fitting model shouldn’t be used to compute AmbientBRDF texture

Results LambertOren-Nayar w/FresnelNew model Roughness 0.0

Results LambertOren-Nayar w/FresnelNew model Roughness 0.05

Results LambertOren-Nayar w/FresnelNew model Roughness 0.1

Results LambertOren-Nayar w/FresnelNew model Roughness 0.3

Results LambertOren-Nayar w/FresnelNew model Roughness 1.0

Results LambertOren-Nayar w/FresnelNew model Roughness 1.0 (diffuse only)

LambertOren-Nayar w/FresnelNew model

LambertOren-Nayar w/FresnelNew model

LambertOren-Nayar w/FresnelNew model

Conclusion From a physically based perspective, the same microfacet model should be used for both diffuse and specular –It makes more persuasive visuals –New consoles have enough computational power to implement such complex models

Acknowledgements

Questions? You can find these slides, including past presentations, at