Shading I June 22, 1999 Motivational Film Graphic Violence - - PowerPoint PPT Presentation
Shading I June 22, 1999 Motivational Film Graphic Violence - - PowerPoint PPT Presentation
Shading I June 22, 1999 Motivational Film Graphic Violence Gritz, Bergen, Darken (1991) first use of BMRT Mr Will Goes Sailing June 22, 1999 Logistics Projects Returned proposals Proposal comments Accept /
June 22, 1999
Motivational Film
✔Graphic Violence
– Gritz, Bergen, Darken (1991) – first use of BMRT
✔Mr Will Goes Sailing
June 22, 1999
Logistics
✔Projects
– Returned proposals – Proposal comments
- Accept / Please Resubmit
- Recall: Projects will be judged on what is in the
proposal
– Reminder: Report is bulk of project – Resubmitted proposals due next class
June 22, 1999
Logistics
✔Projects
– Using Java3d/VRML/directX/….
- These are tools (much like “C”)
- Need specifics of what you want to do with it.
- Best way to learn is to implement
something…be clear on what that something is.
- I need to know what to expect from your project
and presentation.
June 22, 1999
Logistics
✔Paper summaries on Shading I
– Any takers?
✔Slides on Web
– Now in B&W and Color
June 22, 1999
Photography and Light
pho•tog•ra•phy, n., the process or art of producing images of objects by the action of light on a sensitized surface, esp, a film in a camera.
Yeah, we get it…photography, light…whatever..
June 22, 1999
Computer Graphics as Virtual Photography
camera (captures light) synthetic image camera model (focuses simulated lighting)
processing
photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print
June 22, 1999
Today’s Class
✔Shading
– Bidirectional reflectance distribution functions (BRDFs) – Shading Models – Using Empirical Data
June 22, 1999
Shading
✔Computing the light that leaves a point ✔Shading point - point under investigation ✔Shading model - function or algorithm
used in determining the shading.
✔For efficiency’s sake, most shading
models are approximations.
June 22, 1999
BDRF
✔Bidirectional Reflectance Function
) , , , (
r r i i r
f BDRF θ φ θ φ =
✔At a given point, gives relative reflected
illumination in any direction with respect to incoming illumination coming from any direction
June 22, 1999
BDRF
✔BDRF Geometry
June 22, 1999
BDRF
✔Can return any positive value. ✔Generally wavelength specific.
) , , , , ( λ θ φ θ φ
r r i i r
f BDRF =
June 22, 1999
Shading Models
✔Shading model - function or algorithm
used in determining the shading.
✔Revise to…
– function or algorithm used in approximating the BDRF.
June 22, 1999
Shading Models
✔Shading Models and Viewing Direction
– Generally, BRDFs are independent of viewing direction – Most shading models take viewing direction into consideration
June 22, 1999
Shading Models
✔Geometry
June 22, 1999
Shading Models
✔Geometry
– N - normal vector – S - direction of incoming light – R - direction of perfect mirror reflection – H - halfway between light direction and viewing direction. – V - viewing direction.
June 22, 1999
Shading Models
✔Recall from Linear Algebra
θ u v
θ cos v u v u =
June 22, 1999
Shading Models
✔Lambertian ✔Phong ✔Cook-Torrance ✔Strauss ✔Ward
June 22, 1999
Shading Models
✔Lambert Model
– Perfectly diffuse surface – reflection is constant in all directions (kd)
June 22, 1999
Shading Models
✔Lambert Model
θ cos ) (
d Sk
L V L = ) ( ) ( S N k L V L
d S
- =
June 22, 1999
Shading Model
✔ Lambert Model
– why cos θ? – Surface has differential area dA – Intensity varies with projected area on surface – Projected area = cos θ
June 22, 1999
Shading Models
✔Phong Model
– introduces specular (mirror like) reflections – three components
- ambient - background light (ka)
- diffuse - lamberian reflection (kd)
- specular - mirror like reflection(ks)
June 22, 1999
Shading Models
✔Phong Model
- specular
diffuse ambient
V) R ( N) S ( ) (
∑ ∑
- +
- +
=
i k i i s i i i d a a
e
L k L k L k V L
June 22, 1999
Shading Models
✔Phong - Blinn
– Uses halfway angle rather than reflected
- specular
diffuse ambient
V) H ( N) S ( ) (
∑ ∑
- +
- +
=
i k i i s i i i d a a
e
L k L k L k V L
June 22, 1999
Shading Models
✔Any questions
– diffuse vs specular reflections
✔Move on to Cook - Torrance model.
June 22, 1999
Shading Models
✔Cook-Torrance Model
– based on physics of a surface – components
- microfacet model - describes geometry of
surface
- Fresnel term - describes reflectance
- Roughness - describes microfacet distribution.
June 22, 1999
Shading Models
✔Cook-Torrance / Microfacets
– surface is composed of V shaped grooves (microfacets) – Light interactions with microfacets
- Reflect - causes specular reflections
- Scatter - causes diffuse reflections
June 22, 1999
Shading Models
✔Cook-Torrance / Microfacets
June 22, 1999
Shading Models
✔ Cook-Torrance / Microfacets - GeometryTerm
- =
H) (V S) H)(N N ( 2 , H) (V V) H)(N N ( 2 , 1 min G
June 22, 1999
Shading Model
✔Cook-Torrance / Fresnel Equation
– Describes reflectance – Function of:
- Wavelength of incident light (λ)
- index of refraction (η(λ))
- extinction coefficient (ease at which wave can
penetrate a surface) (κ(λ))
- angle of incidence (θ)
June 22, 1999
Shading Models
✔Fresnel Equations
θ θ θ θ
2 2 2 2 2 2
cos cos 2 cos cos 2 + + + + − + = a b a a b a Fs
θ θ θ θ θ θ θ θ
2 2 2 2 2 2 2 2
tan sin tan sin 2 tan sin tan sin 2 + + + + − + = a b a a b a F F
s p
a, b are functions
- f η, κ, and θ
p s
F F F 2 1 2 1 + =
For unpolarized light
June 22, 1999
Shading Models
✔Cook-Torrance / Fresnel
– If all quantities known, use Fresnel equations – If not, approximate using reflectance off normal
- See [Glassner] or [Cook/Torrance81] for details
June 22, 1999
Shading Model
✔Cook-Torrance / Roughness
– Characterizes the distribution of the slopes
- f the microfacets
– Roughness parameter, m
- m between 0 -1
- small m - smooth surface, specular reflectance
- large m - rough surface, diffuse reflectance
June 22, 1999
Shading Model
✔Cook-Torrance / Roughness
2
) / ( m
ce D
γ −
=
γ
γ 4 2 ) / ) ((tan
cos
2
m e D
m −
=
Gaussian Model Beekman Model
June 22, 1999
Shading Models
✔Cook-Torrance / Roughness
June 22, 1999
Shading Models
✔Cook-Torrance/putting it all together
- diffuse
specular d s r
df sf f + =
π 1 =
d
f
V) S)(N N ( 1
- ×
× = G D F fs π
June 22, 1999
Shading Models
✔Complete Cook-Torrance Model
∑
- +
=
i i r i a a r
d f L R L L ϖ ) S)( N (
June 22, 1999
Shading Models
✔Cook-Torrance -- examples
June 22, 1999
Shading Models
✔Cook-Torrance summary
– Complicated model based on physics – Components
- Microfacets
- Fresnel equation
- Roughness
June 22, 1999
Shading Models
✔Strauss Model [Strauss90]
– Designed for ease of use and efficiency – Intuitive parameter set – Takes some liberty with physics.
June 22, 1999
Shading Models
✔Strauss Model - parameter set
– Color – Smoothness - 0 = perfectly diffuse, 1 = perfectly specular – Metalness - 0 = dielectric, 1 = metal – Transparency – Index of Refraction.
June 22, 1999
Shading Models
✔Anisotropy
– Isotropic - surfaces reflect equally from any direction of view – Ansiotropic - reflection varies not only with angle of incidence, but also with the angle
- f the incident light w.r.t some viewing
angle
June 22, 1999
Shading Models
✔Ansiotropic reflection -- example
June 22, 1999
Shading Models
✔Ward Model [Ward92]
– Designed for both accuracy and ease of use – Includes model for ansiotropic reflection
June 22, 1999
Shading Models
✔Ward Model
- specular
2 / ) (tan diffuse
) 2 cos cos 1 (
2 2
πα δ θ ρ π ρ ρ
α γ −
- +
= e
s d
June 22, 1999
Shading Model
✔Ward Model
– ρd - Diffuse reflectance coefficient (can vary with wavelength) – ρs - Speculat reflectance coefficient (can vary with wavelength) – α - Standard deviation of surface slope
June 22, 1999
Shading Models
✔Ward Model -- w/ansiotropy
- specular
)) / sin / (cos (tan diffuse
) 2 cos cos 1 (
2 2 2 2 2
y x s d
y x
e α πα δ θ ρ π ρ ρ
α φ α φ γ + −
- +
=
June 22, 1999
Shading Models
✔Ward Model w/ ansiotropy
– αx - Standard deviation of surface slope in x-direction – αy - Standard deviation of surface slope in y-direction
June 22, 1999
Shading Models
✔Ward Model - example
June 22, 1999
Shading Models
✔Other ansiotropic models (all based on
physics)
– [Kajia85] – [Poulin90] – [He91]
June 22, 1999
Measuring BDRFs
✔Can use empirical data ✔BDRFs measured using a goniometer ✔See [Ward92]
June 22, 1999
Measuring BDRFs
June 22, 1999
Measuring BDRFs
✔Storage using spherical sampling
June 22, 1999
Measuring BDRFs
✔BDRF Database
– http://www.cs.columbia.edu/CAVE/curet
June 22, 1999
Summary
✔BDRFs - defines reflection off surface in
each direction as result from light arriving at each direction.
✔Shading models - approximations to
BDRF
✔Can use measured BDRFs
June 22, 1999
Summary -- Shading Models
✔Lambert Model ✔Phong Model ✔Cook-Torrance (heavy on the physics) ✔Strauss ✔Ward Model (ansiotropic)
June 22, 1999
Further Reading
✔Glassner, Principles of Digital Image
Synthesis, Chapter 15.
✔See paper list (on Web) for papers on
individual models
– [Cook81] – [Ward92] [Kajiya85] [Poulin90][He91] – [Strauss90]
June 22, 1999
Next Class
✔Functional Shading
– Texture Mapping – Procedural Textures – Shading Languages
June 22, 1999
Remember
✔Resubmitted proposals due next class.
June 22, 1999
Remember
✔Class Web Site:
– http://www.cs.rit.edu/~jmg/virtualPhoto
✔Any questions?