Graphics Reference
In-Depth Information
with position. Such cases often require a very fine subdivision of the rays to pro-
duce sufficiently accurate results, but this is only necessary where the scattering
(or the illumination, or the emission) is large or rapidly changing. Elsewhere
a coarse subdivision of the ray suffices. Refining the subdivision uniformly to
capture detail along a few small sections of the ray is very inefficient. One im-
provement is to start with a coarse uniform subdivision, then recursively subdivide
segments on which a finer approximation is necessary. This technique is called
adaptive ray marching .
In the basic adaptive ray marching method, the radiance is computed at both
ends of each segment ( Figure 3.13 ) . When the difference of two values exceeds
a certain threshold, the segment is divided in half and the same test is performed
on each new segment. This segmenting process is repeated until the difference
is below the threshold. However, subdividing according to the magnitude of the
radiance alone can be prone to error if, for example, there is a significant change
in the color of participating media. Similarly, an abrupt change in the scatter-
ing coefficient might also warrant further subdivision. Any number of different
subdivision criteria might be applied; there is no particular “best” way to do it.
Sampling the segment only at the endpoints can be problematic if there is signifi-
cant high frequency (quickly changing) variation in the medium over the segment,
N + 1
N
N - 1
W N
W N - 1
x n + 1
x n
x n −1
x end
x st
Ye s
L end L st
Proceed to
segment N + 1
<
δ?
No
W N
W N/2
-
Subdivide segment N
W N −1
x n
x n −1
N
N - 1
x st
x end
Figure 3.13 Adaptive ray marching splits a segment if the radiance changes more than a threshold δ .
 
Search WWH ::




Custom Search