Graphics Reference
In-Depth Information
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/ ** true for physically-correct lights * /
virtual bool createsGlossyReflection() const ;
/ ** true for physically-correct lights * /
virtual bool createsGlobalIllumination() const ;
/ ** true for physically-correct lights * /
virtual bool castsShadows() const ;
//////////////////////////////////////////
// Direct illumination support
/ ** Effective area of this emitter. May be finite,
zero, or infinite. * /
virtual float surfaceArea() = 0;
/ ** Select a point uniformly at random on the surface
of the emitter in homogeneous coordinates. * /
virtual Vector4 randomPoint() const =0;
/ ** Biradiance (solid-angle-weighted radiance) at P due
to point Q on this light, in W / mˆ2. Q must be a value
previously returned by randomPoint(). * /
virtual Biradiance3 biradiance
( const Vector4 &Q, const Point3 &P) const =0;
//////////////////////////////////////////
// Photon emission support
/ ** Total power; may be infinite * /
virtual Power3 totalPower() const =0;
/ ** Returns the position Q, direction of propagation w_o, and
normalized spectrum of an emitted photon chosen with
probability density proportional to the emission density
function for this light. * /
virtual Color3 emitPhoton( Point3 &Q, Vector3 & w_o) const =0;
};
We assign a reference frame ( cframe ) to each light source. For a light at a
finite location, this is the centroid of the emitter and a reference orientation. For
infinitely distant sources (i.e., directional sources), this is a reference frame and a
convenient location within the scene for displaying GUI affordances to manipulate
the source.
14.11.3.1 Nonphysical Tools
It is often useful to manipulate the interaction of lights and the scene in nonphys-
ical ways. These may depart from physics for artistic intent, but they may also
be used to compensate for flaws in the rendering model itself. That is, the right
model with the wrong data (or vice versa) can't produce the correct image, so
sometimes we have to compensate for known limitations and approximations by
intentionally violating physics in order to make the net result appear more realis-
tic. The class shown in Figure 14.10 contains several of these tools, in the form
of light sources that don't cast shadows, or don't participate in the computation
of Lambertian reflection, for instance. Of course, the renderers that use this class
must honor such settings for them to have an effect.
 
 
Search WWH ::




Custom Search