Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material...

43
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology

Transcript of Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material...

Page 1: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

Photo-realistic Rendering and Global Illumination in Computer Graphics

Spring 2012

Material Representation

K. H. Ko

School of MechatronicsGwangju Institute of Science and Technology

Page 2: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

2

Interaction of Light with Surfaces Materials interact with light in different

ways. The appearance of materials differs given the

same lighting conditions. The reflectance properties of a surface

affect the appearance of the object. The interaction of light with surfaces can

be represented as a function of diverse quantities such as the incident light, exitant light, surface conditions, etc.

Page 3: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

3

Illustration

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 4: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

4

Generalization – 12D

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 5: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

5

Page 6: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

6

Generalization – 11D

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 7: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

7

Generalization – 10D

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 8: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

8

Generalization – 9D

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 9: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

9

Generalization – 8D

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 10: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

10

Generalization – 6D (Spatially Varying BRDF – 6D)

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

fr(x;(wiwo))

Page 11: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

11

Generalization – 6D (Homogeneous Material BSSRDF – 6D)

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

fr(Δx;(wiwo))

Page 12: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

12

Generalization – 4D (BRDF – 4D)

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 13: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

13

Reflection of an Opaque Surface

Interaction of Light with Surfaces

Images obtained from SIGGRAPH 2005 Course Notes

Page 14: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

14

Materials interact with light in different ways. The appearance of materials differs given the

same lighting conditions. Some materials appear as mirrors. Others appear as diffuse surfaces.

The reflectance properties of a surface affect the appearance of the object.

BRDF Assume that light incident at a surface exits at

the same wavelength and same time. Ignore effects such as fluorescence and

phosphorescence.

BRDF

Page 15: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

15

In the most general case, light can enter some surface at a point p and incident direction Ψ and can leave the surface at some other point q and exitant direction Θ.The function defining this relation between

the incident and reflected radiance is called the bidirectional surface scattering reflectance distribution function.

BRDF

Page 16: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

16

Additional assumptionThe light incident at some point exits at

the same point. Do not discuss subsurface scattering. BRDF (bidirectional reflectance distribution

function)

BRDF

Page 17: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

17

BRDF

Page 18: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

18

The BRDF is defined over the entire sphere of directions (4π steradians) around a surface point.This is important for transparent

surfaces, since these surfaces can reflect light over the entire sphere.

BRDF

Page 19: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

19

Properties of BRDF Range: The BRDF can take any positive value

and can vary with wavelength. Dimension: The BRDF is a four-dimensional

function defined at each point on a surface. Two dimensions correspond to the incoming

direction, and two dimensions correspond to the outgoing directions.

Generally, the BRDF is anisotropic. If the surface is rotated about the surface normal, the

value of BRDF will change. But In general isotropic materials are considered.

BRDF

Page 20: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

20

BRDF

Properties of BRDF Helmholtz Reciprocity

Images obtained from SIGGRAPH 2005 Course Notes

)( oirf =

Page 21: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

21

Properties of BRDF Relation between incident and reflected

radiance The value of the BRDF for a specific incident direction

is not dependent on the possible presence of irradiance along other incident angles.

The BRDF behaves as a linear function with respect to all incident directions.

BRDF

Page 22: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

22

BRDF

Energy Conservation The sum of energy reflected into all directions

has to be smaller or equal than the incident energy.

Images obtained from SIGGRAPH 2005 Course Notes

Page 23: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

23

BRDF

Global illumination algorithms often use empirical models to characterize the BRDF. Great care must be taken to make certain

that these empirical models are a good and acceptable BRDF.

Energy conservation Helmholtz reciprocity: A particularly important

constraint for bidirectional global illumination algorithms.

Page 24: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

24

BRDF

Diffuse Surfaces Some materials reflect light uniformly over the

entire reflecting hemisphere. Given an irradiance distribution, the reflected

radiance is independent of the exitant direction.

The value of the BRDF is constant for all values of Θ and Ψ.

To an observer, a diffuse surface point looks the same from all possible directions.

Page 25: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

25

BRDF

Diffuse Surfaces The reflectance ρd represents the fraction of

incident energy that is reflected at a surface. ρd varies from 0 to 1.

Page 26: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

26

BRDF

Specular Surfaces Perfect specular surfaces only reflect or refract light in

one specific direction. Specular Reflection

The direction of reflection can be found using the law of reflection.

The incident and exitant light direction make equal angles to the surface’s normal, and lie in the same plane as the normal.

Given that light is incident to the specular surface along direction vector Ψ, and the normal to the surface is N, the incident light is reflected along the direction R

R = 2(N ·Ψ)N – Ψ.

Page 27: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

27

BRDF

Specular Reflection A perfect specular reflector has only one exitant

direction for which the BRDF is different from 0. The value of the BRDF along that direction is infinite.

It can be described with the proper use of delta functions. There exists no ideal reflectors.

Specular Refraction The direction of specular refraction is computed

using Snell’s law.

Page 28: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

28

BRDF

Specular Refraction Consider the direction T along

which light that is incident from a medium with refractive index η1 to a medium with refractive index η2 is refracted.

Snell’s law specifies the invariant between the angle of incidence and refraction and the refractive indices of the media.

η1sinθ1 = η2sinθ2

Page 29: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

29

BRDF

Specular Refraction The transmitted ray T is

given as

Page 30: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

30

BRDF

Total Internal Reflection When light travels from a dense medium to a

rare medium, it could get refracted back into the dense medium.

The critical angle θc can be computed by Snell’s law:

Page 31: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

31

BRDF

Reciprocity for Transparent Surfaces One has to be careful when assuming

properties about the transparent side of the BSDF.

Some characteristics such as reciprocity, may not be true with transparent surfaces.

When computing radiance in scenes with transparent surfaces, a weighting factor (η2/η1)2 should be considered.

When a pencil of light enters a dense medium from a less dense medium, it gets compressed. Therefore, the light energy per unit area perpendicular to the pencil direction becomes higher; i.e. the radiance is higher.

Page 32: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

32

BRDF

Fresnel Equations It specify the amount of light energy that is reflected

and refracted from a perfectly smooth surface. When light hits a perfectly smooth surface, the light

energy that is reflected depends on the wavelength of light, the geometry at the surface, and the incident direction of the light.

Fresnel equations specify the fraction of light energy that is reflected.

These equations take the polarization of light into consideration.

Page 33: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

33

BRDF

Fresnel Equations Two components of the polarized light, rp and

rs, referring to the parallel and perpendicular components are given as:

Page 34: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

34

BRDF

Fresnel Equations For unpolarized light,

The Fresnel equations assume that light is either reflected or refracted at a purely specular surface.

Since there is no absorption of light energy, the reflection and refraction coefficients sum to 1.

Page 35: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

35

BRDF

Glossy Surfaces Most surfaces are neither ideally diffuse nor

ideally specular but exhibit a combination of both reflectance behaviors.

The BRDF is often difficult to model with analytical formulae.

Page 36: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

36

BRDF

Shading Models Real materials can have fairly

complex BRDFs. Various models have been

suggested in computer graphics to capture the complexity of BRDFs.

Notations Ψ: the direction of the light (the

input direction) Θ: the direction of the viewer (the

outgoing direction)

Page 37: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

37

BRDF

Lambert’s model For idealized diffuse materials. The BRDF is a constant in all direction. ρd : diffuse reflectance

Page 38: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

38

BRDF

Phong model The most popular model. The BRDF for the Phong model is

Page 39: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

39

BRDF

Blinn-Phong model It uses the half-vector H.

Page 40: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

40

BRDF

Modified Blinn-Phong model The simplicity of the Phong model is

appealing. But it has some serious limitations:

It is not energy conserving. It does not satisfy Helmholtz’s reciprocity. It does not capture the behavior of most real

materials. The modified Blinn-Phong model addresses

some of these problems.

Page 41: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

41

BRDF

Cook-Torrance Model One of the physically based shading models It includes a microfacet model that assumes that a

surface is made of a random collection of small smooth planar facets.

The assumption is that an incoming ray randomly hits one of these smooth facets.

Given a specification of the distribution of microfacets for a material, this model captures the shadowing effects of these microfacets.

It also includes the Fresnel reflection and refraction terms.

Page 42: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

42

BRDF

Cook-Torrance Model

Page 43: Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.

43

BRDF

Empirical Models Ward model