Graphics Reference
In-Depth Information
2. Ray grid construction: Given a list of rays, we march along every ray to
construct the ray grid . For every traversed grid cell, we first check if this
cell is occupied by geometry by looking up the corresponding voxel in our
voxel representation. A ray link is enqueued if the grid cell is occupied;
empty cells are ignored.
3. Intersection testing: Using the ray grid, we perform precise intersection
testing with the actual scene geometry. Again, we voxelize all scene geom-
etry conservatively. For every voxel affected by a primitive, we look up all
the rays that were enqueued in the corresponding ray grid cell during ray
grid construction. We test the primitive for intersection only with these
rays.
Note that in none of the steps are there any global dependencies on the prim-
itives in the scene. Each batch of triangles can be rendered independently just
as with rasterization.
2.3.1 Intersect Early: Multi-pass Scheme
Ray marching and intersection testing are repeated alternately to allow for front-
to-back expansion of rays. Figure 2.5 illustrates this multi-pass scheme. Clearly,
the right-hand ray (marked red) is obstructed by the second triangle it encounters.
As we are only interested in the closest hit, intersection tests and ray links behind
that triangle would be wasted.
Therefore, in the first pass, we start by expanding all rays into only the
first few occupied cells of the ray grid each. Then, we immediately perform
intersection testing using the resulting (incomplete) ray grid. A lot of rays will
already intersect primitives in these first few occupied cells and are terminated.
These rays can be ignored in subsequent passes, as we are progressing front to
back. The remaining rays are expanded further in the next pass. Since the red
ray in Figure 2.5 is terminated in the first pass, we only consider the yellow ray
in the subsequent passes.
Bounded memory. We repeat intersection testing and ray grid construction alter-
nately until all rays have either hit some geometry or have traversed the entire
grid. The number of layers expanded in each pass can be increased as the number
of active rays decreases. The fewer active rays that remain, the more ray links
can be stored per ray without increasing the overall memory consumption of the
ray grid. In the last pass, all remaining rays are fully expanded. Thus, we achieve
both bounded time (typically three passes) and bounded memory (typically four
links per ray).
Search WWH ::




Custom Search