Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Realistic Image Synthesis
- BRDFs and Direct Lighting -
Realistic Image Synthesis - BRDFs and Direct Lighting - Philipp - - PowerPoint PPT Presentation
Realistic Image Synthesis - BRDFs and Direct Lighting - Philipp Slusallek Karol Myszkowski Gurprit Singh Realistic Image Synthesis SS18 BRDFs and Direct Lighting Importance Sampling Example Example: Generate Cosine weighted distribution
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– Generate ray according to cosine distribution with respect to normal – Need only average of the incident radiance
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– Goal: density function 𝑞(𝑦, 𝑧) with 𝑦 ∈ 𝑏, 𝑐 , 𝑧 ∈ [𝑑, 𝑒] – Compute cumulative distribution function 𝑄 𝑦, 𝑧 = න
𝑑 𝑧
න
𝑏 𝑦
𝑞 𝑦′, 𝑧′ 𝑒𝑦′𝑒𝑧′ – Random variables along x are generated by integrating 𝑄 over entire y-range (marginal density) 𝜊1 = 𝑄 𝜊1
′, 𝑧 ቚ 𝑧=𝑒 =
𝑄 𝜊1
′
⇒ 𝜊1
′ =
𝑄−1(𝜊1) – Now, given 𝑦 = 𝜊′1 we have a one-dimensional problem but we still need to normalize 𝜊2 ~ 𝑄 𝑦, 𝜊2
′ ቚ 𝑦=𝜊1
′ = ෨
𝑄 𝜊2
′
⇒ 𝜊2
′ ~ ෨
𝑄−1 𝜊2 ⇒ 𝜊2
′ =
෨ 𝑄−1(𝜊2) ෨ 𝑄(𝑒)
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
න
Ω+
p 𝜕 𝑒𝜕 = 1 ⇒ 𝑑 න
Ω+
𝑒𝜕 = 1 ⇒ 𝑑 = 1 2𝜌 𝑞 𝜕 = 1 2𝜌 ⇒ 𝑞 𝜄, 𝜒 = sin(𝜄) 2𝜌 with 𝑒𝜕 = 𝑡𝑗𝑜𝜄 𝑒𝜄d𝜒
𝑞 𝜄 = න
2𝜌 𝑡𝑗𝑜𝜄
2𝜌 𝑒𝜒 = 𝑡𝑗𝑜𝜄 ⇒ 𝜊1 = 𝑄 𝜄 = න
𝜄
𝑡𝑗𝑜𝜄′𝑒𝜄′ = 1 − 𝑑𝑝𝑡𝜄
𝑞 𝜒 𝜄 = 𝑞(𝜄, 𝜒) 𝑞(𝜄) = 1 2𝜌 ⇒ 𝜊2 = 𝑄 𝜒 𝜄 = න
𝜒
1 2𝜌 𝑒𝜒′ = 𝜒 2𝜌
𝜄 = 𝑑𝑝𝑡−1 1 − 𝜊1 = 𝑑𝑝𝑡−1𝜊1 𝜒 = 2𝜌𝜊2
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
2 2 2 1 2 2 1 2 1
2 2 1 2 1 2 1
) 1 ( ) 2 sin( ) 1 ( ) 2 cos( ) acos( 2 = − = − = = = z y x
1 1 2 2 1 2 1 1 1 2 1
) 1 ( ) 2 sin( ) 1 ( ) 2 cos( ) acos( 2
1 2 1 2
+ +
= − = − = = =
+ +
n n
z y x
n n
Also see Global Illumination Compentium by Philip Dutre (U. Leuven): http://www.cs.kuleuven.ac.be/~phil/GI/
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– Uniform on the hemisphere – Better: Cosine distributed
– Uniform on the hemisphere – Better: Cosine distributed – Cosine-power distributed
positive hemisphere (see GI-Compendium)
n i s i d i
r
+ + +
= =
N k k k d k N k k k d
1 1 1 1
k N k k k s k n N k k k s k k n N k k k s
1 digon 2 1 2 1 2
= = =
θ' θ
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– Shirley et al.: MC-Techniques for Direct Lighting Calculations
– Small:
– Planar:
– Sampling directions could have high variance
– For curved light sources
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Sampling projected solid angle 4 eye rays per pixel 100 shadow rays Sampling light source area 4 eye rays per pixel 100 shadow rays
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Fixed sample location 4 eye rays per pixel 1 shadow ray each Random sample location 4 eye rays per pixel 1 shadow ray each
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Sample locations on 2D grid 4 eye rays per pixel 64 shadow ray Stratified random sample locations 4 eye rays per pixel 64 shadow ray
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
Stratified random sample locations 4 eye rays per pixel 16 shadow ray Stratified random sample locations 64 eye rays per pixel 1 shadow ray
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– Ray tracing cost grows with number of lights
– Equal probability (1/NL) – Fixed weights according to total power of light
– Must use conservative approximation
– Stratification through spatial subdivision
– Dynamic and adaptive importance sampling
=
i i i
p
Realistic Image Synthesis SS18 – BRDFs and Direct Lighting
– At each pixel send random path into the scene & towards some light
– Gives a rough estimate of light contribution to the entire image
– Use this estimate for importance sampling
– Trace samples ONLY from the eye
– Published as [Wald et al., Interactive Global Illumination in Complex and Highly Occluded Environments, EGSR’03]