Game Development Reference
In-Depth Information
N
ω i u i
ω r
d ω i
x
Figure 15.5 Geometry associated with the directional formula of the rendering equation
This residual function then can be effectively modelled by comparing with the
Blinn specular component.
δ ( x , ω r , ω i )
=
s ( x )
·
H
(15.6)
Here, H represents the bisector between ω r and ω i and s represents the term we want
to approximate. This residual function has several advantages. On one hand, its cal-
culation is very quick as a single scalar product is required and on the other hand the
term s that we want to approximate is a three-component vector and thus requires
only one 2D texture for storing it.
Modelling of the BRDF thus corresponds to the calculation, based on measured
samples, of a set of 2D textures encoding different parameters of the model. Thanks
to this formulation, this method can be integrated very easily in a method for real time
rendering.
15.2.2 Modelling the lighting
The final rendering of a scene in virtual reality consists of formally solving the rendering
equation (Kajiya, 1986):
L r ( x , ω r , λ )
=
L e ( x , ω r , λ )
+
f r ( x , ω i , ω r , λ ) L i ( ω i , λ ) cos θ i i
(15.7)
i
The equation of the rendering defines the luminance at a point as the sum of the actual
emission on this point and the reflection as per the BRDF of the incident luminance
on the upper hemisphere i =
H 2
+
. This expression considers that the surfaces are
opaque, but the same formula can be obtained with transparent surfaces by replacing
the BRDF with the BTDF and the upper hemisphere of integration with the lower
hemisphere. In addition, this is not the most general equation possible. It assumes
the light reflected by the surfaces at a point in time. Theoretically, it would have to
use the BSSRDF to be more general (internal scattering) and integrate on the sphere
(Veach, 1997).