Graphics Reference
In-Depth Information
D
j
=
Q
∈
R
j
−
v
i
)
V
(
P
,
Q
)
(
v
i
·
n
P
)(
v
i
·
n
Q
)
f
s
(
P
,
v
i
,
)
E
j
(
Q
,
dQ
(32.13)
v
Q
−
P
2
−
v
i
)
V
(
P
,
Q
j
)
(
v
i
·
n
P
)(
v
i
·
n
(
Q
j
))
≈
Area
(
R
j
)
f
s
(
P
,
v
i
,
)
E
j
(
Q
j
,
E
,
,
(32.14)
v
Q
j
−
P
2
where
Q
j
is a single point chosen uniformly with respect to area on the region
R
j
that constitutes the
j
th source.
The second integral, representing the scattering of indirect light, can also be
split into two parts, by decomposing the function
v
i
→
f
s
(
P
,
v
i
,
)
in the inte-
v
grand into a sum,
)=
f
s
(
P
,
)+
f
s
(
P
,
f
s
(
P
,
)
,
v
i
,
v
v
i
,
v
v
i
,
v
(32.15)
where
f
s
represents the impulses like mirror reflection (and later, Snell's law
transmission), and
f
s
is the nonimpulse part of the scattering distribution (i.e.,
f
s
is
a real-valued function rather than a distribution). Each impulse can be represented
by (1) a direction (the direction
v
i
such that
−
v
i
either reflects or transmits to
v
at
P
), and (2) an impulse magnitude 0
≤
k
≤
1, by which the incoming radiance
in direction
.We'll
index these by the letter
m
(where
m
=
1 is reflection and
m
=
2 is transmission).
Thus, we can write
refl. indir. light
=
−
v
i
is multiplied to get the outgoing radiance in direction
v
)
L
r
(
P
,
f
s
(
P
,
v
i
,
−
v
i
)
v
i
·
n
P
d
v
i
,
(32.16)
v
v
i
∈
S
+
(
n
P
)
=
m
−
v
m
)
+
k
m
L
r
(
P
,
(32.17)
f
s
(
P
,
)
L
r
(
P
,
v
i
,
−
v
i
)
v
i
·
n
P
d
.
(32.18)
v
v
i
v
i
∈
S
+
(
n
P
)
diffusely reflected indirect light
Finally, we can again estimate that last integral—the diffusely reflected indi-
rect light—by a single-sample Monte Carlo estimate: We pick a direction
v
i
according to some probability density on the hemisphere (or the whole sphere,
when we're considering refraction as well as reflection), and estimate the integral
with
1
density
(
v
i
)
f
s
(
P
,
)
L
r
(
P
,
diff. refl. indir. light
=
v
i
,
−
v
i
)
v
i
·
n
P
.
(32.19)
v
Note that while the BRDF doesn't literally make sense for an impulse-
like mirror reflection, the computation we perform to compute mirror-reflected
radiance has a form remarkably similar to that of Equation 32.19. We wrote it
(Equation 32.17) in the form
k
1
L
(
P
,
−
v
1
)
,
(32.20)
where
v
2
was the
transmitted
direction). The coeffi-
cient
k
1
plays the same role as the coefficient
1
density
(
v
1
was the reflection of
v
i
(
v
i
)
f
s
(
P
,
v
i
,
v
)
|
v
i
·
n
P
|
(32.21)