¡ F Js'3f£Q ¡7ô ²'3f£Q ¡+·'3f£Q ¡]-+·'3f£Q · ¡ F Js'3f£Q ¡7ô ²'3f£Q ¡+·'3f£Q ¡]-+·'3f£Q ... +b)
Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray,...
Transcript of Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray,...
![Page 1: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/1.jpg)
Lighting and Reflectance
COS 426, Spring 2020
Felix Heide
Princeton University
![Page 2: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/2.jpg)
R2Image *RayCast(R3Scene *scene, int width, int height)
{
R2Image *image = new R2Image(width, height);
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
R3Ray ray = ConstructRayThroughPixel(scene->camera, i, j);
R3Rgb radiance = ComputeRadiance(scene, &ray);
image->SetPixel(i, j, radiance);
}
}
return image;
}
Ray Casting
Without Illumination
![Page 3: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/3.jpg)
Ray Casting
R3Rgb ComputeRadiance(R3Scene *scene, R3Ray *ray)
{
R3Intersection intersection = ComputeIntersection(scene, ray);
return ComputeRadiance(scene, ray, intersection);
}
With Illumination
![Page 4: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/4.jpg)
Illumination
• How do we compute radiance for a sample ray
once we know what it hits?
Angel Figure 6.2
ComputeRadiance(scene, ray, intersection)
![Page 5: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/5.jpg)
Goal
• Must derive computer models for ... Emission at light sources
Scattering at surfaces
Reception at the camera
• Desirable features … Concise
Efficient to compute
“Accurate”
![Page 6: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/6.jpg)
Overview
• Direct Illumination Emission at light sources
Scattering at surfaces
• Global illumination Shadows
Refractions
Inter-object reflections
Direct Illumination
![Page 7: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/7.jpg)
Emission at Light Sources
• IL(x,y,z,q,f,l) ... describes the intensity of energy,
leaving a light source, …
arriving at location(x,y,z), ...
from direction (q,f), ...
with wavelength l (x,y,z)
Light
![Page 8: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/8.jpg)
Empirical Models
• Ideally measure irradiant energy for “all” situations Too much storage
Difficult in practice
x,y,z,q,f,l
![Page 9: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/9.jpg)
OpenGL Light Source Models
• Simple mathematical models: Point light
Directional light
Spot light
![Page 10: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/10.jpg)
Point Light Source
• Models omni-directional point source intensity (I0),
position (px, py, pz),
coefficients (ca, la, qa) for attenuation with distance (d)
2
0I
dqdlcI
aaa
L++
=
d
Light
(px, py, pz)
![Page 11: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/11.jpg)
Point Light Source
• Physically-based: “inverse square law” ca = la = 0
• Use ca and la 0 for non-physical effects Better control of the look (artistic)
2
0I
dqdlcI
aaa
L++
=
![Page 12: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/12.jpg)
Directional Light Source
• Models point light source at infinity intensity (I0),
direction (dx,dy,dz)
0IIL =
(dx, dy, dz)
No attenuation
with distance
![Page 13: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/13.jpg)
Spot Light Source
• Models point light source with direction intensity (I0),
position (px, py, pz),
direction (dx, dy, dz)
attenuation with distance
falloff (sd), and cutoff (sc)
++
=
otherwise0
,if)(cosI
2
0 scdqdlcI
aaa
sd
L
d
(px, py, pz) D
L Θ = cos-1(L D)
sc
![Page 14: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/14.jpg)
Overview
• Direct Illumination Emission at light sources
Scattering at surfaces
• Global illumination Shadows
Refractions
Inter-object reflections
Direct Illumination
![Page 15: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/15.jpg)
Scattering at Surfaces
Bidirectional Reflectance Distribution Function
fr(qi,fi,qo,fo,l) ... describes the aggregate fraction of incident energy,
arriving from direction (qi,fi), ...
leaving in direction (qo,fo), …
with wavelength l
Surface
(qi,fi)
l
(qo,fo)
![Page 16: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/16.jpg)
Empirical Models
Ideally measure BRDF for “all” combinations of
angles: qi,fi,qo,fo
Difficult in practice
Too much storage
![Page 17: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/17.jpg)
Parametric Models
Approximate BRDF with simple parametric function
that is fast to compute. Phong [75]
Blinn-Phong [77]
Cook-Torrance [81]
He et al. [91]
Ward [92]
Lafortune et al. [97]
Ashikhmin et al. [00]
etc.
Lafortune [97]
Cook-Torrance [81]
![Page 18: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/18.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
Based on model
proposed by Phong
![Page 19: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/19.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
Based on Phong
illumination model
Based on model
proposed by Phong
![Page 20: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/20.jpg)
Diffuse Reflection
• Assume surface reflects equally in all directions Examples: chalk, clay
Surface
![Page 21: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/21.jpg)
Diffuse Reflection
• What is brightness of surface? Depends on angle of incident light
Surface
q
![Page 22: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/22.jpg)
Diffuse Reflection
• What is brightness of surface? Depends on angle of incident light
Surface
dL
= cosdAdL
dA
q
![Page 23: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/23.jpg)
Diffuse Reflection
• Lambertian model cosine law (dot product)
LDD ILNKI )( =
Surface
N
Lq
![Page 24: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/24.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
![Page 25: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/25.jpg)
Specular Reflection
• Reflection is strongest near mirror angle Examples: mirrors, metals
N
LR qq
![Page 26: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/26.jpg)
Specular Reflection
How much light is seen?
Depends on: angle of incident light
angle to viewerN
LR
V
Viewer
a
![Page 27: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/27.jpg)
Specular Reflection
• Phong Model (cos a)n
L
n
SS IRVKI )( =
N
LR
V
Viewer
a
This is a (vaguely physically-motivated) hack!
![Page 28: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/28.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
![Page 29: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/29.jpg)
Emission
Represents light emanating directly from surface Note: does not automatically act as light source!
Does not affect other surfaces in scene!
Emission 0
![Page 30: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/30.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
![Page 31: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/31.jpg)
Ambient Term
This is a hack (avoids complexity of global illumination)!
Represents reflection of all indirect illumination
![Page 32: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/32.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
![Page 33: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/33.jpg)
OpenGL Reflectance Model
• Simple analytic model: diffuse reflection +
specular reflection +
emission +
“ambient”
Surface
![Page 34: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/34.jpg)
OpenGL Reflectance Model
Sum diffuse, specular, emission, and ambient
Leonard McMillan, MIT
![Page 35: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/35.jpg)
OpenGL Reflectance Model
Good model for plastic surfaces, …
![Page 36: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/36.jpg)
Direct Illumination Calculation
Single light source:
L
n
SLDALAE IRVKILNKIKII )()( +++=
N
LR
V
Viewer
a
![Page 37: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/37.jpg)
Direct Illumination Calculation
Multiple light sources:
( ) L
L
n
iSiDALAE IRVKLNKIKII +++= )()(
N
L2
V
Viewer L1 Note:
all of the
K and I
are RGB
colors
![Page 38: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/38.jpg)
Example from production
This scene had 400 virtual lights (~100 params)
Pixar
![Page 39: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/39.jpg)
Overview
• Direct Illumination Emission at light sources
Scattering at surfaces
• Global illumination Shadows
Transmissions
Inter-object reflections
Global Illumination
![Page 40: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/40.jpg)
Global Illumination
Greg Ward
![Page 41: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/41.jpg)
Ray Casting (last lecture)
Trace primary rays from camera Direct illumination from unblocked lights only
( ) L
L
n
iSiDALAE IRVKLNKIKII +++= )()(
![Page 42: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/42.jpg)
Shadows
Shadow term tells if light sources are blocked Cast ray towards each light source
SL = 0 if ray is blocked, SL = 1 otherwise
Shadow
Term
( ) LL
L
n
iSiDALAE ISRVKLNKIKII +++= )()(
![Page 43: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/43.jpg)
Recursive Ray Tracing
Also trace secondary rays from hit surfaces Mirror reflection and transparency
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
![Page 44: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/44.jpg)
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
Mirror reflections
Trace secondary ray in mirror direction Evaluate radiance along secondary ray and
include it into illumination model
Radiance for mirror
reflection ray
![Page 45: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/45.jpg)
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
Transparency
Trace secondary ray in direction of refraction Evaluate radiance along secondary ray and
include it into illumination model
Radiance for refraction ray
![Page 46: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/46.jpg)
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
Transparency
Transparency coefficient is fraction transmitted KT = 1 for translucent object, KT = 0 for opaque
0 < KT < 1 for object that is semi-translucent
Transparency
Coefficient
![Page 47: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/47.jpg)
Refractive Transparency
For thin surfaces, can ignore change in direction Assume light travels straight through surface
N
L
i
Tr
hr
hi
i
T LT −
![Page 48: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/48.jpg)
Refractive Transparency
N
L
i
Tr
hr
hi
LNTr
iri
r
i
h
h
h
h−−= )coscos(
For solid objects, apply Snell’s law:
iirr = sinsin hh
![Page 49: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/49.jpg)
Recursive Ray Tracing
Ray tree represents illumination computation
Ray traced through scene Ray tree
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
![Page 50: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/50.jpg)
Recursive Ray Tracing
Ray tree represents illumination computation
Ray traced through scene Ray tree
( ) TTRSLL
L
n
iSiDALAE IKIKISRVKLNKIKII +++++= )()(
![Page 51: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/51.jpg)
Recursive Ray Tracing
ComputeRadiance is called recursively
R3Rgb ComputeRadiance(R3Scene *scene, R3Ray *ray, R3Intersection& hit)
{
R3Ray specular_ray = SpecularRay(ray, hit);
R3Ray refractive_ray = RefractiveRay(ray, hit);
R3Rgb radiance = Phong(scene, ray, hit) +
Ks * ComputeRadiance(scene, specular_ray) +
Kt * ComputeRadiance(scene, refractive_ray);
return radiance;
}
![Page 52: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/52.jpg)
Example
Turner Whitted, 1980
![Page 53: Lighting and Reflectance › ... › Lecture-12.pdfAngel Figure 6.2 ComputeRadiance(scene, ray, intersection) Goal ... angles: q i,f i,q o,f o Difficult in practice Too much storage.](https://reader030.fdocuments.in/reader030/viewer/2022040412/5f04caf97e708231d40fbb98/html5/thumbnails/53.jpg)
Summary
• Ray casting (direct Illumination) Usually use simple analytic approximations for
light source emission and surface reflectance
• Recursive ray tracing (global illumination) Incorporate shadows, mirror reflections,
and pure refractions
More on global illumination after next week!
All of this is an approximation
so that it is practical to compute