You are on page 1of 69

Advanced Computer Graphics

Materials 1
Matthias Teschner
Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 2

Context

 
specular diffuse

Light is emitted Light is absorbed and Cameras


at light sources scattered at surfaces capture light

 Light absorption and scattering at surfaces


is governed by material properties
 How to represent material properties?
University of Freiburg – Computer Science Department – 3
Surface Reflection Properties
 How much incident light from a particular direction
is reflected into a particular direction?
 Bidirectional Reflectance Distribution Function BRDF

Incoming light
from direction Outgoing light into direction

Position

University of Freiburg – Computer Science Department – 4



Surface Reflection Models
 Surfaces have reflection properties
 How much flux is absorbed?
 Which part of the flux is reflected?
 How is it reflected?
 E.g., empirical Phong model
 Efficient to compute it considers the illumination of light , material properties and the pattern in which the light is reflected

 Physically motivated considers diffuse and specular materials

 Does not capture all aspects of real materials


(too few degrees of freedom)
University of Freiburg – Computer Science Department – 5
Surface Reflection Models
 Theoretical reflectance models brdf properties

 Have more degrees of freedom


 Theoretical models can consider
 Incoming and outgoing angle of flux
 Incoming and outgoing wavelength of flux (fluorescence)
 Incoming and outgoing polarization (linear and circular)
 Incoming and outgoing position (subsurface scattering)
 Time delay between incoming and outgoing flux
(phosphorescence)
University of Freiburg – Computer Science Department – 6
Surface Reflection Models
 Incident light is partially reflected or absorbed
depending on the absorbance spectrum of the
surface (surface color)
 Reflected light is scattered by the surface
depending on the surface roughness
 Smooth surface (small patches with uniform orientation)
 Specular or glossy reflection
 Light is reflected into dominant reflection directions
 Rough surface (small patches with varying orientation)
 Diffuse (Lambertian) reflection
 Light is reflected into many directions
University of Freiburg – Computer Science Department – 7

Materials
 Can be described by relating incident and exitant flux

light is partially reflected here

glossy diffuse

transparent subsurface
scattering

dark bright

University of Freiburg – Computer Science Department – 8



Materials

diffuse glossy transparent subsurface scattering

[Oliver Wetter]
[David Turesson]
[https://cgiknowledge.wordpress.com/]
University of Freiburg – Computer Science Department – 9
Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 10

Introduction dL/dB/dE - all are propotional

 Incident radiance
at position from direction
induces irradiance at :
irradiance

 Flux is partially absorbed: 0≤≤1 is a


which is encoded by color/albedo/reflectance
reflectance
coefficient.
radiosity

 Reflected flux into direction i represents the direction of the incident


radiance. Per definition, all directions point
away from the surface. I.e., incident radiance
radiance travels along -i.
Reflection pattern Reflectance
University of Freiburg – Computer Science Department – 11
Definition
 For all pairs of directions and ,
the ratio of outgoing radiance towards and
irradiance due to incoming radiance from is
referred to as BRDF:
 BRDF typically depends on a position and two directions
 Directions form a solid angle of 2 for opaque surfaces
and 4 for transparent surfaces
 Various variants. E.g., BRDF can depend on two positions for
subsurface scattering

University of Freiburg – Computer Science Department – 12



Application
 Relation between irradiance and exitant radiance

 Irradiance is induced by radiance

 Integration over the hemisphere  reflectance equation


for opaque surfaces consider the reflection of light in the hemisphere only

 Reflectance equation establishes a relation


between incident and exitant radiance
University of Freiburg – Computer Science Department – 13

Reflectance Equation

Constant
radiance
within 

stochastic ray tracing integral replaced by sum

solid angle

this solid
solid angle
depends on
number of
samples and
distribution of
samples
University of Freiburg – Computer Science Department – 14
Reflectance Equation these are the 2 methods to approximate the integral in reflectance eqn

nP is the surface
normal at p.
nAi is the surface
normal at Ai.

University of Freiburg – Computer Science Department – 15


Example - Diffuse Reflection
 Lambertian model
 Def: Reflected flux is proportional to the cosine of
the angle between flux direction and surface normal


 Outgoing radiance is
equal in all directions
d1 = d2 denote
two solid angles
of the same size
with different
directions.
University of Freiburg – Computer Science Department – 16

Example - Diffuse Reflection
to prove that the reflected radiance is same in all directions

Viewer
 From a viewer’s perspective 1

 More flux per surface area  Viewer


2
is sent towards viewer 1 
 Viewer 2 receives flux from i denotes
an arbitrary
(sees) a larger surface area direction
Again, d1 = d2
denote two solid
angles of the same
 Both effects cancel which size with different
directions
results in the same flux and
radiance towards both viewers
University of Freiburg – Computer Science Department – 17
BRDF for Diffuse Reflecting Material
 Illumination
 Induced surface irradiance
 Overall irradiance
 Partially absorbed. Resulting radiosity
 - reflectance

see next slide

BRDF is constant for diffuse reflecting material

University of Freiburg – Computer Science Department – 18


Integrating Over Solid Angles
 Directions can be represented with two angles
 Differential area spanning from
 to +d and from  to +d
see next slide

 Differential solid angle

 E.g., integral over the hemisphere [Suffern]

2 indicates the hemisphere


above an opaque surface
solid angle equation
University of Freiburg – Computer Science Department – 19

Integrating Over Solid Angles
this slide is to prove how we get da = r dtheta r sin theta d phy, eqn at end of this slide.

University of Freiburg – Computer Science Department – 20



Exemplary Integrals
 Solid angle of a hemisphere
solving the solid angle eqn by taking f as 1 , for hemisphere we
get 2 phi
and for full sphere we get 4 phi as the solid angle

 Solid angle of a sphere


in full sphere theta ranges from 0 to phi

University of Freiburg – Computer Science Department – 21



Integrating a Cosine Lobe
 E.g., to determine the irradiance at a point

 General form

 E.g., constant radiance from / into all directions

 Diffuse reflection
University of Freiburg – Computer Science Department – 22

Advanced Computer Graphics
Materials 2
Matthias Teschner
Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 24

Example – Mirror Reflection
 Each ray of incident flux
produces one ray of
outgoing flux into a
mirrored direction
 Reflectance [Suffern]

 BRDF

University of Freiburg – Computer Science Department – 25


[Suffern]
Example – Mirror Reflection
 Delta function
used to derive the brdf of a perfect mirror function

 Mirrored radiance

University of Freiburg – Computer Science Department – 26


BRDF Properties
 Values are positive
 Incident flux cannot induce negative exitant flux
 Helmholtz reciprocity:
 If incident and exitant flux are reversed,
the BRDF value remains the same
the incident and exitant flux can be reversed and we get the same BRDF value

University of Freiburg – Computer Science Department – 27


BRDF Properties
 Values can be arbitrarily large
 E.g., mirror reflection
 Ratio of exitant flux to the illumination effect of incident flux
Graphs are shown for
one specific, fixed i

Diffuse reflection Mirror reflection

University of Freiburg – Computer Science Department – 28


BRDF Properties
 Diffuse reflection Graphs are shown for
one specific, fixed i

reflection in the entire hemisphere

reflection only in a particular direction where angle is less than 2 pi .brdf is 0 for all directions
where flux is not reflected and others where flux is reflected brdf is

Diffuse reflection Diffuse reflection


into the hemisphere into a solid angle  < 2

 If the solid angle of reflected flux gets smaller,


the respective BRDF values get larger
University of Freiburg – Computer Science Department – 29
Example - Glossy / Specular Reflection
 Incoming flux from direction
is scattered, but concentrated
around the reflection direction
 Reflectance glossy
specular
 BRDF
e is scalar
vslue that max at the reflection direction
encloses the
glossiness
more specular
for larger Graph is shown for
values of e
less specular
one specific, fixed i
In this term, n, i, o for smaller
values.
are represented with
3D normalized vectors

University of Freiburg – Computer Science Department – 30



Example - Glossy / Specular Reflection
n, i, o are represented
 BRDF with 3D normalized vectors

 is the reflection direction of


 is the angle between and
 rho describes how much of
flux is reflected or absorbed
cosine describes

distribution of flux in the


hemisphere

[Schroecker, Grabner] e governs the size of the highlight and not the maximum flux in reflection
direction
[Suffern]
University of Freiburg – Computer Science Department – 31

BRDF Properties
 Linearity
 If a material is defined as a combination of BRDFs,
the contributions of the BRDFs are added for the
total outgoing radiance

Exitant radiance for


incident radiance from i
for a combined material
( diffuse + specular, fr,d + fr,s )

[Suffern]

University of Freiburg – Computer Science Department – 32



Example – Mixed Diffuse / Specular Reflection
colored

 Weighted average of diffuse and specular reflection

 Relation to Phong illumination model


achromatic

 Normalized light source direction , viewer , normal

 Reflection equation

University of Freiburg – Computer Science Department – 33



BRDF Properties - Energy Conservation
Eric Veach: Robust Monte Carlo Methods for Light Transport Simulation, Ph.D. dissertation, Stanford University, 1997.

 Incident radiance / illumination from direction

 Irradiance

 Exitant radiance in direction

 Radiosity

radiosity should not be larger than irradiance

University of Freiburg – Computer Science Department – 34


BRDF Summary - Properties
 Definition:
 Positive:
 Helmholtz reciprocity:
 Incident and exitant radiance can be reversed
 Energy conservation:
 Linearity
 If a material is defined as a sum of BRDFs, the contributions
of the BRDFs are added for the total outgoing radiance

University of Freiburg – Computer Science Department – 35


BRDF Summary – Exemplary Materials
 Diffuse

 Mirror

 Specular
n, i, o are represented
with 3D normalized vectors

University of Freiburg – Computer Science Department – 36



Advanced Computer Graphics
Materials 3
Matthias Teschner
Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 38

Reflectance
 Ratio of outgoing flux to incident flux
 Surface property, used in BRDFs
 Incident flux
 Outgoing flux

 Reflectance

 Various parameterizations of the reflectance can be


considered for various configurations of
 University of Freiburg – Computer Science Department – 39
Bihemispherical Reflectance
 Diffuse material

Exitant radiance is equal in all direction

BRDF definition

 The reflectance in the BRDF for diffuse material is


a bihemispherical reflectance
 The ratio of exitant and incident flux is independent
from the directions of incident and exitant flux
University of Freiburg – Computer Science Department – 40
Spectral Bihemispherical Reflectance
 Spectral reflectance is wavelength dependent

 Diffuse spectral reflectance


(spectrum represented with RGB values)
RGB surface color

 Diffuse spectral BRDF

University of Freiburg – Computer Science Department – 41


Bidirectional Reflectance
 How much of the flux from an incident direction is
reflected into an exitant direction

 Dependent on incident and exitant flux directions


University of Freiburg – Computer Science Department – 42

Directional-Hemispherical Reflectance

 The term represents the


ratio of exitant flux into the hemisphere and incident
flux from direction
 Another intuition for the energy conservation
constraint of a BRDF

University of Freiburg – Computer Science Department – 43


Material Reflectances
 Diffuse, mirror, specular

n, i, o are represented


with 3D normalized vectors

 In a diffuse BRDF, accounts for diffuse reflectance,


i.e. the surface color. In glossy, specular, mirror BRDFs,
is typically (1,1,1), i.e. white. The color of specular
highlights converges towards the color of the light source.

University of Freiburg – Computer Science Department – 44



Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 45

Microfacet Model determine light scattering at the surface

 Light scattering at a surface is determined


by the distribution of microfacets
 Facets reflect perfectly specular or perfectly diffuse
 Distribution of microfacet normals governs material

diffuse with large variations of surface normal specular surface with small variation of surface normal

[Pharr, Humphreys]

Rough surface Smooth surface


Large variation of facet normals Small variation of facet normals

University of Freiburg – Computer Science Department – 46


Diffuse Reflecting Material
 Facets are perfectly diffuse
 Flux into a detector element
is an aggregate value over
many facets
 Due to local facet effects,
the radiance is not perfectly
Lambertian, but potentially
view-dependent
[Wikipedia: Oren-Nayar
reflectance model]

University of Freiburg – Computer Science Department – 47


Local Facet Effects
 Masking
 Microfacet is not
visible to the viewer
 Shadowing
 Microfacet is not
illuminated
 Interreflection masking shadowing interreflection
 Microfacets illuminate
each other (additional
illumination) [Pharr, Humphreys]

University of Freiburg – Computer Science Department – 48


Oren-Nayar Diffuse Material
brdf relation with the facets effects

 Models rough opaque diffuse surfaces


 Facets are Lambertian, symmetric V-shaped grooves
because here we discuss abt diffuse material

 Gaussian distribution models the facet normals


 Parameter 0  2  1 gives the variance of the angle
between surface normal and facet normal
 viewer direction , light direction models the micro facets and

 BRDF converges to 1 , if variance


of surface normal approches
0

 University of Freiburg – Computer Science Department – 49


Oren-Nayar Diffuse Reflectance
 Results
variance 0
std lambertian
brdf

[Wikipedia: Oren-Nayar reflectance model]

 Comparisons [Oren,Nayar, ACM SIGGRAPH 1994]

University of Freiburg – Computer Science Department – 50


Oren-Nayar vs. Lambertian
 Is brighter for large angles between viewer and
surface normal compared to a Lambertian surface
 Gets brighter if the angle between
viewer and light gets smaller
 Converges to a Lambertian surface

 If all facets have the same normal,


then  = 0, A = 1, B = 0:
University of Freiburg – Computer Science Department – 51
Oren-Nayar - View Dependence
is view dependent

 Different combinations of
projected areas of dark
and bright facets for
different viewer directions
 Maximal brightness,
if viewing direction
corresponds to light
direction
viewer receives the maximum radiance if the viewer and normal coincide
[Srinivasa Narasimhan
http://www.cs.cmu.edu/afs/cs/academic/class/16823-f06/]
University of Freiburg – Computer Science Department – 52
Torrance-Sparrow Specular Material
 Models rough opaque specular surfaces
 Facets are perfect mirrors, symmetric and V-shaped
 Beckmann distribution models the facet normals
 Similar models: Cook-Torrance, Blinn
specular models

 Viewer direction
 Light source
 Halfway direction g and f account for the local micro facet effect

D - Beckmann distribution
 BRDF G - geometric term for shadowing
F - Fresnel term
University of Freiburg – Computer Science Department – 53
Beckmann Distribution
 Describes the roughness of the surface
 m describes the roughness
  is the angle between halfway
vector and surface normal

m = 0.1 m = 0.7

University of Freiburg – Computer Science Department – 54


Geometric Term / Fresnel Term
 Geometric term
 Accounts for self-shadowing effects of microfacets
 Fresnel term direction dependent

 Accounts for a varying absorbance / reflection ratio


depending on the angle of incident flux
(direction dependent reflectance)
 Many surfaces reflect more strongly if illumination
is nearly parallel to the surface

University of Freiburg – Computer Science Department – 55



Outline
 Context
 Bidirectional Reflectance Distribution Function BRDF
 Definition
 Application
 Exemplary materials
 Properties
 Reflectance
 Material modeling
 Transparent materials
University of Freiburg – Computer Science Department – 56

Concept
 Light is reflected and refracted at the interface
between two transparent media
 Incident, reflected, and here w0 is the incident flux

transmitted rays are in


the same plane
 Direction t is determined
by o and by the indices
of refraction out and in
[Suffern]
University of Freiburg – Computer Science Department – 57
Snell's Law
 Materials are characterized by a refractive index
 Ratio of the speed of light in vacuum
and in the considered medium
 Vacuum 1.0, air 1.0003, ice 1.31, water 1.33, glass 1.5
 Snell's law / law of refraction
 Relative refraction index ratio of 2 refractive index is given as relative refractive index

 Transmission direction


 All vectors should be normalized, then t is also normalized
University of Freiburg – Computer Science Department – 58
Snell's Law
smaller refractive index to larger refractive index ,

 For >1, transmitted rays are


transmitted t into larger refractive index

bent towards the normal


here the transmission line is bent towards the normal direction.

 For <1, transmitted rays are


bent away from the normal

[Suffern]

 University of Freiburg – Computer Science Department – 59


Total Internal Reflection if the incident flux is larger than the critical angle then their is total internal reflection
and no transmission.

total internal reflection

 For <1 and i>c (critical angle), total internal


reflection occurs
critical angle depends on relative refraction index.

no transmission

 Transmitted ray is bent


towards the interface
until the incident light ray
reaches the critical angle
 For i=c:
 For i>c:
[Suffern]
University of Freiburg – Computer Science Department – 60
Reflectance Equation
 Incident, BRDF weighted radiance is integrated over
the hemisphere to compute the outgoing radiance

 Can also consider transmitted light


 BTDF - bidirectional transmittance distribution function
 with i and o in opposite hemispheres
 BRDF and BTDF can be combined to a BSDF -
bidirectional scattering distribution functionincident flux from all direction considered then the brdf eqn for this is BSDF . S is
scattering

University of Freiburg – Computer Science Department – 61



Specular Transmission
 Snell's law gives the direction of a
refracted ray and its radiance change
 Motivation
 Solid angle of a differential cone of
incident radiance changes due to
refraction
 with 0  t  1 being
the transmission coefficient
[Suffern]
 Resulting BTDF:
University of Freiburg – Computer Science Department – 62

Specular Transmission
 Ray and radiance-transfer direction
 At point a, radiance transfer
is from inside to outside

 At point b, radiance transfer


is from outside to inside

 Radiance changes cancel when a [Suffern]


ray enters and leaves a medium
University of Freiburg – Computer Science Department – 63
Reflectance and Transmittance
 Fresnel equations describe which fractions of
incident light are reflected and transmitted
 Fractions depend on the refraction indices
and on the incident light direction
 Fresnel reflectance
 Fresnel transmittance
fresnel eqn ratio of reflectance and transmittance

 University of Freiburg – Computer Science Department – 64


Reflectance and Transmittance
 General form

 Normal incidence

 E.g., at the interface of air and glass with


 Grazing incidence
direction parallel to interface then Fr is equal to 1 which is maximum , so we get maximum value when the direction of incident flux is parallel to the interface.

University of Freiburg – Computer Science Department – 65


Reflectance and Transmittance
 Reflectance and transmittance of glass
for varying incident angles

values are approximately


constant up to 50 degrees

[Suffern]
University of Freiburg – Computer Science Department – 66

Light Attenuation
 Transparent materials attenuate light
 Light is scattered / absorbed along the ray
 Radiance decreases exponentially with distance
 Beer-Lambert law radiance decreases with the growing distance , governed by beer-lamberts law

 Transparent materials are examples


of participating media

University of Freiburg – Computer Science Department – 67


Light Attenuation

 d is the distance inside a medium
 La is exitant radiance, Lb is incident radiance
 c describes the attenuation (wavelength-dependent)
 c = (1,1,1) - no attenuation
 c = (1,1,0.9) - blue is attenuated,
resulting in a yellow appearance

University of Freiburg – Computer Science Department – 68



Light Attenuation
 Examples

[Suffern]

University of Freiburg – Computer Science Department – 69


You might also like