Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics
- BRDFs & Texturing -
Computer Graphics - BRDFs & Texturing - Hendrik Lensch - - PowerPoint PPT Presentation
Computer Graphics - BRDFs & Texturing - Hendrik Lensch Computer Graphics WS07/08 BRDFs and Texturing Overview Last time Radiance Light sources Rendering Equation & Formal Solutions Today Bidirectional
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
– Radiance – Light sources – Rendering Equation & Formal Solutions
– Bidirectional Reflectance Distribution Function (BRDF) – Reflection models – Projection onto spherical basis functions – Shading
– Varying (reflection) properties over object surface: texturing
Computer Graphics WS07/08 – BRDFs and Texturing
– Ratio of reflected radiance to incident irradiance
+
Ω
i i i i
r
i i
Computer Graphics WS07/08 – BRDFs and Texturing
(θi,φi) observed from direction (θο,φο)
– Depends on two directions and position (6-D function)
– Can be infinite
i i i i
i
Computer Graphics WS07/08 – BRDFs and Texturing
– BRDF remains unchanged if incident and reflected directions are interchanged
– reflectivity independent of rotation around surface normal – BRDF has only 3 instead of 4 directional degrees of freedom
) , ( ) , (
r i
f f ω ω ω ω = ) , , , (
i
r x
f ϕ ϕ θ θ −
Computer Graphics WS07/08 – BRDFs and Texturing
– BRDF units [sr--1]
– Range of values:
– Energy conservation law
– Reflection only at the point of entry (xi = xo)
Ω
Computer Graphics WS07/08 – BRDFs and Texturing
– point light source position (θ,ϕ) – light detector position (θo ,ϕo)
– m incident direction samples (θ,ϕ) – n outgoing direction samples (θo ,ϕo) – m*n reflectance values (large!!!)
Stanford light gantry
Computer Graphics WS07/08 – BRDFs and Texturing
– Illumination angle – Viewing angle – Wavelength – (Polarization, ...)
– Absorption – Surface micro-geometry – Index of refraction / dielectric constant – Scattering
Magnesium; λ=0.5μm Aluminum; λ=0.5μm Aluminum; λ=2.0μm
Computer Graphics WS07/08 – BRDFs and Texturing
– Description of visual surface appearance
– Reflection law – Mirror
– Directional diffuse – Shiny surfaces
– Lambert’s law – Matte surfaces
Computer Graphics WS07/08 – BRDFs and Texturing
– N: surface normal – I: vector to the light source – V: viewpoint direction vector – H: halfway vector
H= (I + V) / |I + V|
– R(I): reflection vector
R(I)= I - 2(I•N)N
– Tangential surface: local plane
R(I) R(V) H V I N I I
(I I•
N) )N N
(I I•
N) )N N N R(I) I N R(I) V H R(V)
Top view
Computer Graphics WS07/08 – BRDFs and Texturing
θ θo N R I θ = θo ϕ = ϕo + 180° ϕo ϕ
I
Computer Graphics WS07/08 – BRDFs and Texturing
– δ(x) : zero everywhere except at x=0 – Unit integral iff integration domain contains zero (zero otherwise)
– Ratio of reflected radiance in specular direction and incoming radiance – Dimensionless quantity between 0 and 1
, ,
+
Ω
i s i i i i i i
r
i
i s i
r
L N R
θo θi
i i
s
Computer Graphics WS07/08 – BRDFs and Texturing
– kd: diffuse coefficient, material property [1/sr]
d i i i i d i i i i d
i
r
Ω Ω
,
N I Lo= const
Computer Graphics WS07/08 – BRDFs and Texturing
– Lr,d = kd Li cosθi = kd Li (I•N)
d d
θi N I
L Lr,d
r,d
Ω Ω
i i d d
Computer Graphics WS07/08 – BRDFs and Texturing
Ω ⋅ ∝ Φ d L0
Self-Luminous spherical Lambertian Light Source dΩ
Ω ⋅ ⋅ ∝ Φ d L ϕ cos
1
Eye-light illuminated Spherical Lambertian Reflector dΩ ϕ
Computer Graphics WS07/08 – BRDFs and Texturing
longer from the Sun’s rim
slanted viewing angle The Sun The Moon
Computer Graphics WS07/08 – BRDFs and Texturing
– Multiple scattering
– Pressed magnesium oxide powder – Almost never valid at high angles of incidence
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
– Phong – Blinn-Phong
– Blinn – Cook & Torrance
Computer Graphics WS07/08 – BRDFs and Texturing
– Lr,s = Li ks coske θRV
R(I) R(V) H V I N I N R(I) V H
θ θRV
RV
θ θHN
HN
e
k s i
Computer Graphics WS07/08 – BRDFs and Texturing
e
k s i
Computer Graphics WS07/08 – BRDFs and Texturing
– Lr,s = Li ks coske θHN – θRV ⇒ θHN – Light source, viewer far away – I, R constant: H constant
θHN less expensive to compute R(I) R(V) H V I N I N R(I) V H
θ θRV
RV
θ θHN
HN
e
k s i
Computer Graphics WS07/08 – BRDFs and Texturing
– Contradicts physics – Purely local illumination
, r , r
l k l l l s l l d a i a l k l l l s l l d a i a
e e
Computer Graphics WS07/08 – BRDFs and Texturing
– Distribution of microfacets
– Planar reflection properties – Self-masking, shadowing
Computer Graphics WS07/08 – BRDFs and Texturing
σ standard deviation (RMS) of surface slope – Simple expansion to anisotropic model (σx, σy) – Empirical, not physics-based – Inspired by notion of reflecting microfacets – Convincing results – Good match to measured data
2 2 2
4 ) / ) , ( tan exp( ) )( ( 1 πσ σ N H N V N I ρ π ρ f
s d r
∠ −
=
N I V
viewer
H
microfacet
surface
Computer Graphics WS07/08 – BRDFs and Texturing
– D : statistical microfacet distribution – G : geometric attenuation, self-shadowing – F : Fresnel term, wavelength, angle dependency of reflection along mirror direction – N•V : flaring effect at low angle of incidence
– F : wavelength- and angle-dependent reflection – Metal surfaces
i r
λ
Computer Graphics WS07/08 – BRDFs and Texturing
s d s s d d r
Computer Graphics WS07/08 – BRDFs and Texturing
– represents self-masking and shadowing effects of microfacets
– computed by Fresnel equation – relates incident light to reflected light for each planar microfacet
s
λ
N I V
viewer
H θ microfacet
surface
λ λ
Computer Graphics WS07/08 – BRDFs and Texturing
α : angle to average normal of surface – Characterized by half-angle β
– m : average slope of the microfacets – Used by Cook-Torrance
[ ]2
/ tan 4 2 cos
m
α
−
2
2 ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ −
α β
β cos ln 2 ln
N I V
viewer
H θ microfacet
surface
Computer Graphics WS07/08 – BRDFs and Texturing
m=0.2 m=0.6
Computer Graphics WS07/08 – BRDFs and Texturing
⎭ ⎬ ⎫ ⎩ ⎨ ⎧ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ = ) ( ) )( ( 2 , ) ( ) )( ( 2 , 1 min H V I N H N H V V N H N G 1 = G ) ( ) )( ( 2 H V V N H N G ⋅ ⋅ ⋅ = ) ( ) )( ( 2 H V I N H N G ⋅ ⋅ ⋅ =
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
– Color (RGB), diffuse reflection coefficient kd – Specular reflection coefficient ks
– N(P)= N(P+ t N) or N= N+dN – „Bump mapping“ or „Normal mapping“
– P= P + dP – „Displacement mapping“
– “Environment mapping“, “Reflection mapping“
Computer Graphics WS07/08 – BRDFs and Texturing
Texture-Surface Transformation Viewing/Projection Transformation The texture is mapped onto a surface in 3-D object space, which is then mapped to the screen by the viewing projection. These two mappings are composed to find the overall 2-D texture space to 2-D image space mapping, and the intermediate 3-D space is often
image warping and geometric distortion. Texture space (u,v) Object space (xo,yo,zo) Screen space (x,y)
Computer Graphics WS07/08 – BRDFs and Texturing
Computer Graphics WS07/08 – BRDFs and Texturing
– ray hits surface – surface location corresponds to coordinate inside a texture
Computer Graphics WS07/08 – BRDFs and Texturing
– ray hits surface – surface location corresponds to coordinate inside a texture
Computer Graphics WS07/08 – BRDFs and Texturing
c3 c2 c0 c1
Computer Graphics WS07/08 – BRDFs and Texturing
c3 c2 c0 c1
Computer Graphics WS07/08 – BRDFs and Texturing
c3 c2 c0 c1
Computer Graphics WS07/08 – BRDFs and Texturing
c3 c2 c0 c1