Study the nature of f things
to to imaging
- An overvie
iew of
- f physics-based renderin
ing
Wu u Min Minjie ie Art Art Technic ical l Di Director, Ubi bisoft ft Mo Montreal l Stud Studio io
Study the nature of f things to imaging to -An overvie iew of of - - PowerPoint PPT Presentation
Study the nature of f things to imaging to -An overvie iew of of physics-based renderin ing Wu u Min Minjie ie Art Art Technic ical l Di Director, Ubi bisoft ft Mo Montreal l Stud Studio io The origin of PBR In the game
to to imaging
iew of
ing
Wu u Min Minjie ie Art Art Technic ical l Di Director, Ubi bisoft ft Mo Montreal l Stud Studio io
1.What t is P PBR 2.The influenc nce of P PBR
Seeing is believing?
Seeing is believing? Visible light
Visible light range: 400 nm range: 400 nm –700 nm
Differen ences es between en PBR and t traditi tion
l renderin ing
Essence
ce: subject ctiv ive and objecti tive
PBR: Based on the physical properties of the things in the objective world Traditional rendering: Based on the viewer's subjective image
PBR Albedo : 0.04 IOR : 1.635 …… 传统的渲染 Diffuse:黑色 闪亮高光 ……
Style: "process-oriented" vs "result-oriented"
PBR: Decompose a complex phenomenon into a series of formulas and parameters associated Traditional rendering: focus on final result
PBR PBR (Domino effect) Traditional renderin ing (Ic (Iceberg Theory ry)
Function: Function: “all all-weather" weather" vs vs "single "single angle" angle"
PBR: it can always adapt to the environment. Traditional rendering: from a certain perspective, unable to take the overall situation into account
PBR PBR Traditional renderin ing
1.
lly Base ased Lig Lightin ing 2. . Physic icall lly Bas ased Shadin ing 3. . Physic icall lly Base ased Sensit itisin ing
Physicall lly Base ased Lig Lightin ing
Three elements of lighting
Three elements of lighting (to discuss PBL from (to discuss PBL from the perspective of artist): the perspective of artist):
Lightin ing g intensit ity
Three common physical units 1.Candela 2.Lumen 3.Lux
Steradian, symbol: Steradian, symbol: sr sr
1. . Unit of solid angle 2.
Candela, symbol: Candela, symbol: cd cd
2.
Lumen, symbol: Lumen, symbol: lm lm
Lux, symbol: Lux, symbol: lx lx
Attenua uati tion
Inverse-square law: Light intensity is inversely proportional to the square of distance and attenuates (energy conservation)
Scatter erin ing
Light is forced to deviate from a straight trajectory by one or more paths due to localized non-uniformities in the medium through which it passes.
Mie scatteri ring
Condition o: particle radius >= wavelength of the incident light
Mie scatteri ring g is a as f follows ws:
Particle ticle radius ius is close close to the wavelen elength gth of
the incident ident light ht
Particle
ticle radius ius increas reases es
Impact on outdoor natural light intensity
weather Transmissivity Sky light Sunny About 0.85 10000 lux Cloudy About 0.55 1000 lux
IES LIGHT
Photometr
hotometric ic profile profile IES :illuminating engineering society
IES Light = Maximum intensity (candela) X IES Photometric profile
Lightin ing g color
color temperature symbol:K
Rayleig igh h scatteri ring
Condition: Particle radius <= One tenth of the wavelength of incident light
Rayleig igh h scatteri ring
Scattering
cattering intensity: ensity: inversely ersely proportional portional to the fourth rth power er of the wavelength elength
Lightin ing g type
1.directional light 2.Punctual light 3.area light
Punctua ual l light VS Area light
Specular shadow instance
Punctual ctual light ht Area a light ht
brie rief summary ry of
BL
physically measured value
physical unit
mathematical models and methods
physical laws
Lighting
sun light,sky light,cloud, dust。。。。。。
Physicall lly Base ased Sh Shadin ing
Shading
Shading:material
material response response to to lighting lighting Function
Function:BRDF
BRDF
BRDF BRDF 是什么
Bidirectiona idirectional l Reflectance eflectance Distribution istribution Function unction 1.
tgoing radiance (to lens or eye)
Bidirectional
idirectional 向
tgoing radiance (to lens or eye)
Reflectance
eflectance 射率
Reflectance = Radiance / irradiance
Irradiance (power/area) :the power of the light received by current point
Radiance (power/(area x solid angle)) :the power of the light emitted by current point
tgoing radiance (to lens or eye)
Distribution istribution Function unction
tgoing radiance (to lens or eye)
Picture from :Naty Hoffman,Background: Physics and Math of Shading
Three different Three different types of BRDF types of BRDF
tgoing radiance (to lens or eye)
Empirical model Physically based model Data-driven mode
Basic principles of physics-based model
Generic Shader Generic Shader
Ci = Ka*ambient() Ci = Ka*ambient() + Kd*diffusion() + Kd*diffusion() + Ks*specular() + Ks*specular()
1.
mbient 2.
iffusion 3.
pecular
SURFACE PRO 3 SURFACE PRO 3
Picture from :Naty Hoffman,Background: Physics and Math of Shading
Diffusion iffusion Th
The pr process of
diffusio ion: 1.
Picture from :Naty Hoffman,Background: Physics and Math of Shading
Dif Diffusion model
Based on
mooth ma materia ial l sur urface. Lambert Lambert model model characterist characteristics ics: : :
SURFACE PRO 3 SURFACE PRO 3 Isotropic (camera view) Light intensity distribution is in line with the cosine law (light angle)
lambert
F
i
E F cos
derived rived from m Lambert bert model el extended tended to the rough gh surface face controlled ntrolled by roughness ghness(0
(0-1.0)
光滑表面 粗燥表面
Theoret etic ical l basis of O Oren-Na Naya yar model
Based on microfacet model theory Composed of many microfacets Every facet can be seen as a Lambertreflection plane
Oren-Nayar formula 当 σ = 0: A =1,B=0,粗燥因子 = 1
σ :roughness
what is ρ
ρ = Albedo = Albedo
Two kinds of Albedo texture acquisition
SURFACE PRO 3 SURFACE PRO 3 color checker Cross -polarized lighting with spectralon
Specular Specular:
Cook Cook–Tor
ranc nce reflect ctio ion model:
microfac acet t theory: y:
1 . The surface face is composed posed microfacet rofacets, , every ry facet et only y does s specular cular reflection lection 2 . 2 2 . Based ed on microfacetnormal rofacetnormal M, every ry facet et only y reflects lects the light ht of single gle direction ection
数学公式:
SURFACE PRO 3 SURFACE PRO 3
) 4(l·n)(v·n () () () F G D F
Torrance Cook
Denominator: Denominator: 4n.l n.lv.n v.n: Correction factor for conversion Correction factor for conversion between micro between micro mirror surface and mirror surface and the overall surface the overall surface Molecule: Molecule: D :Distribution Distribution function function G :Geometr Geometry attenuation attenuation function function F :Fresnel Fresnel function function
Influen ence ces from microst stru ructu ture re of t the material al surface ce:
Roughness:
Value range between 0-1
Square root of slope of facet Half Vector: The
he angle le between ween the hvector ctor bisecting ecting the incident ident light ht I and observation ervation direction ection v. Only when h coincides with the facet’s normal M, the microfacetwill be "activated." Picture from :Naty Hoffman,Background: Physics and Math of Shading
Distrib ibut ution
ionD nD:
Normal distribution probability of activated facets
The performance of distribution function with different roughness (GGX)
Geometr try attenuat ation
ion n G:
Distribution probability of facet blocking incident light and reflected light
The performance of geometry attenuation function with different roughness (GGX)
Incident light blocked Reflected light blocked Multiple bounce not be considered
Physical Physical meaning meaning
Picture from :Naty Hoffman,Background: Physics and Math of Shading
Distribution function(D) Geometry attenuation function(G) Blinn-Phong Beckmann GGX GGXAnisotropic Implicit Neumann Cook-Torrance Kelemen Smith Beckmann GGX Schlick- Beckmann Schlick-GGX
Intuiti
tive ve perform rmanc nce e of p probabil ility ty distrib ibut ution
Integration Integration of distribution
function and geometry attenuation attenuation function: function:
D ×
G
Obtain roughness Obtain roughness measured data measured data
Gloss meterunit:GU
roughness meterunit:μm microfacet microfacet
Anisotropic Anisotropic
Anisotropic Isotropic
Real World: The Microstructure of material surface shows a directional arrangement, more common in artifacts Mathematical model: The distribution of microfacet normal is regular Appearance: The performance of specular is different at different directions, spot shape is stretched Real World: The Microstructure of material surface is irregular, more common in natural things Mathematical model: The distribution of microfacet normal is random Appearance: The performance of specular is same at different directions, spot shape is circular
Specular pecular Occlusion cclusion & Cavity Cavity
Specular pecular Occlusion cclusion
1.
1.To To solve ve the "leakage" akage" problem blem 2. 2.Non Non-PBR PBR "leakage" akage" specular cular occlusion lusion (off) f) specular cular occlusion lusion (on)
Specula lar r Occlusio ion realiza zati tion
1. 1.realization
realization with h AO map 2.Camera, Camera, normal mal direction ection associated
3.Controlled Controlled by Roughness ghness Picture and code from "Moving Frostbite to PBR"
When the roughness is minimum, the intensity is 50% of AO intensity When the roughness is maximum and the viewing angle coincides with the normal, the intensity is 100% of AO intensity When the viewing angle is at 90 degrees to the normal, the intensity is zero
Cavity Cavity
Cavity’s role
Simulation of recessed hole formed by microstructure Non-PBR Differences between CavityandSpecular Occlusion:
Small range, only affects the recessed hole formed by microfacetstructure. The intensity is between 0-0.5, irrelevant with roughness Big range, relevant with the object shape and structure. The intensity is between 0-1, controlled by roughness Affects both direct specular and indirect specular Only affect indirect specular
Influen ence ces from the materi rial al :
Metallicity Metallicity:
nonconductor = 0 ,conductor= 1:
When n Metallicity allicity = 1 : 1.
No Diffusion fusion,Only Only Specular cular
edo = specular cular color
Reflect ctan ance e and Fresnel el:
F0 F
2 2) 1 ( ) 1 ( F
Reflectance: Reflectance: what is F0: the percentage
centage of specular cular from m the incident ident light ht
the viewing
wing direction(V) ection(V) coincides ncides with h the normal mal(N) (N) and incident ident light(L) ht(L)
How to g get F0 F0:
Non conduction:
based on IOR range:0.02-0.06
F0 F 2 2
OR) (1 ) 1 ( I IOR F
2 2) 1 ( ) 1 ( F
conduction: index of refraction is variation specular color = = index of refraction range:0.65-0.95
Schlick lick function ction
Fresnel el:
the observation
ervation that t things ngs get more e reflective lective at grazing zing angles. les. F0 F
2 2) 1 ( ) 1 ( F
Fresnel Fresnel function function F:
Variable iable:the the angle( le(R) ) Initial itial value ue :F0 F0 Description scription reflectance lectance
Fresnel el Reflect ctan ance e Table Table: X
X :Angle Angle R Y: Reflectance Reflectance
F0 F
2 2) 1 ( ) 1 ( F
F0 :start point Fresnel Fresnel :trend trend
Picture from :Naty Hoffman,Background: Physics and Math of Shading
Porosit ity:
The ratio of the pore's volume to the total volume 范围在0到1之间,即为0到100%
100%之间。 F0 F
2 2) 1 ( ) 1 ( F
Porosity Porosity 's role:
to to descript the influrence from the water
1.
ken Albedo edo
nge Glossiness ssiness 3.
st reflectence lectence
Physically Ba Based Sen ensit itising ing Two types of sensor
Two types of sensor :
CCD 2.
Eye
F0 F
2 2) 1 ( ) 1 ( F
Differe renc nce:
1.
2.
Dynamic range range 3.
Resolution
F0 F
2 2) 1 ( ) 1 ( F
Angle of view Angle of view
F0 F
2 2) 1 ( ) 1 ( F
CMOS/CCD EYE the focal length of the lens
Multiple factors:
1.a focal length of approximately 22 mm 2.The overlapping region of both eyes is around 130° 3.central angle of view 双 around 40-60° 4.close to a 50 mm focal length lens
Dynamic ic range :
the ratio between the largest to smallest possible values of a changeable quantity.
Eye Eye 》CMOS/CCD CMOS/CCD
F0 F
RESOLUT UTIO ION & D DETAIL
CCD/CMOS CCD/CMOS:Symmetrical Eye Eye:Prioritize rioritized d based based on
interest,and asymmetrical symmetrical
F F
Gradations
CCD/CMOS Eye - interest
interest
Eye - asymmetrical symmetrical
Symmetrical Symmetrical contrast, sharpness, uniqueness, motion......(red part) the central part of eyes’resolution is much higher than at the edges
Physica call lly Based Sensiti ensitising ng
F F
Gradations
S/CCD CD
F
Gradations
Two procedur ures s to s simulat ate the i imaging ng 1.
ure
NG
Picture From "Moving Frostbite to PBR"
F
Gradations
Exposur ure
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
Exposure Exposure value valueunit
nit :EV EV camera era settings tings
Exposure Exposure value valueunit unit :EV EV
the photometric tometric quantity ntity of luminous inous exposure
F
Gradations
The conversi sion n between en luminan ance/ill llum umina nance ce
EV EV --
luminance EV EV --
illuminance
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
EV
E 2 * 5 . 2
3
2
EV
L
F
Gradations
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
EV as an indicator of camera settings
F
ient,in intuit itiv ive
eady for
the po post t pr proc
ing(i. i.e. DOF DOF,motio ion bl blur。。。。。。) )
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
The benefit
F
Gradations
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
EV & post proces essi sing ng
Aperture --> Vignetting
speed--> motion blur
Aperture --> DOF
F
Gradations
快 门门速 光圈 值 Log EV
2 2) ( 快 门门速 (光圈 值光 EV
2 2log
HDR Tone Mapping
Gradations
Two Tone Mapping Curves
Reinhard
Filmic
1
Re x x L
inhardReinhard VS Filmic
Reinhard VS Filmic
F
Gradations
快 门门速 光圈 值 Log EV
2 2) (
Different method: Tri-ace's film simulation:
Film simulation Color Enhancement and Rendering in Film and Game Production: Film Simulation for Video Games Yoshiharu Gotanda tri-Ace, Inc.
The influenc nce of P PBR: 1.
nce e of
PBR
Purpos
e of
PBR 3.
ific ican ance e of
PBR
Essence ssence of
PBR
Purpose Purpose of
PBR
Purpose Purpose of
PBR
Significance ignificance of
PBR
Mass Mass production, production, reduce costs, improve reduce costs, improve efficiency, quality assurance efficiency, quality assurance
References References
Laurence MEYLAN,tone mapping for high dynamic range images,2006 Chris Wynn,An Introduction to BRDF-Based Lighting,nvidia,2006 Bruce Walter, Stephen R. Marschner, Hongsong Li,Kenneth E. Torrance, Microfacet Models for Refraction through Rough Surfaces Eurographics Symposium on Rendering (2007) Naty Hoffman,Yoshiharu Gotanda,Adam Martinez,Ben Snow,Physically-Based Shading Models in Film and Game Production,SIGGRAPH 2010 joshua pines,color enhancement and rendering in film and game production,SIGGRAPH 2010 sebastien lagarde,Adopting a physically based shading model,2011 Dimitar Lazarov. Physically based lighting in call of duty: Black ops. SIGGRAPH 2011 Course: Advances in Real-Time Rendering in 3D Graphics and Games, 2011. Stephen McAuley. Calibrating lighting and materials in far cry 3. SIGGRAPH 2012 Course: Practical Physically Based Shading in Film and Game Production, 2012. Dan Baker and Stephen Hill. Rock-solid shading - image stability without sacricing detail. SIGGRAPH 2012 Course: Practical Physically Based Shading in Film and Game Production, 2012. Brent Burley. Physically-based shading at disney. part of Practical Physically-Based Shading in Film and Game Production, SIGGRAPH, 2012. sebastien lagarde,laurent harduin,The art and rendering of remember Me GDC2013 David Neubelt and Matt Pettineo,Crafting a Next-Gen Material Pipeline for The Order: 1886 GDC2013 Brian Karis,Specular BRDF Reference,EPIC 2013
References References
Marco Alamia ,Physically Based Rendering - Cook–Torrance Lazanyi, Szirmay-Kalos, Fresnel term approximations for Metals Eric Heitz,Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs,SIG2014 Naty Hoffman,Background: Physics and Math of Shading,SIG2014 Danny Chan,Real-World Measurements for Call of Duty: Advanced Warfare,SIG2015