EUROGRAPHICS 2000 / M. Gross and F.R.A. Hopgood (Guest Editors) Volume 19 (2000), Number 3 LCTS: Ray Shooting using Longest Common Traversal Sequences V. Havran and J. Bittner Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University, Karlovo nám. 13, 12135 Prague 2, Czech Republic Abstract We describe two new techniques of ray shooting acceleration that exploit the traversal coherence of a spatial hierarchy. The first technique determines a sequence of adjacent leaf–cells of the hierarchy that is pierced by all rays contained within a certain convex shaft. This sequence is used to accelerate ray shooting for all remaining rays within the shaft. The second technique establishes a cut of the hierarchy that contains nodes where the hierarchy traversal can no longer be predetermined for all rays contained within a given shaft. This cut is used to initiate the traversal for all remaining rays contained in the shaft. The description of the methods is followed by results evaluated by their practical implementation. Keywords: ray shooting, ray casting, BSP tree, traversal coherence, hidden surface removal. 1. Introduction Many modern global illumination techniques are based on discrete sampling of lighting within the scene, where the ge- ometrical relationships (visibility) between objects are de- termined using ray shooting. A very large amounts of rays are cast by most of the global illumination methods, hence we are giving the ray shoot- ing algorithm special attention. The portion of the rendering time spent by ray shooting is usually quite significant and it is not rare that it takes more than 50% of the total rendering time. In this paper we present two new methods utilizing spa- tial coherence of visibility that use the concept of longest common traversal sequence (abbreviated to LCTS further in the paper). The presented methods extend the ray shoot- ing acceleration based on a hierarchical spatial subdivision, namely using a rectilinear binary space partitioning tree (BSP) tree. A rectilinear BSP tree (all its splitting planes perpendicular to principal axes) is also sometimes called kd– tree. Let us call a cell of the spatial subdivision elementary (hi- erarchical) if it corresponds to a leaf (interior) node of the spatial hierarchy. Rays laying within a certain convex shaft are likely to pierce the same set of hierarchical and elemen- tary cells of the spatial subdivision. We call this phenomenon a traversal coherence. The basic concept of traversal coher- ence for elementary cells is illustrated in Figure 1. Our first technique determines a LCTS for a given convex region (shaft) R consisting solely of leaf–nodes of the spa- tial hierarchy. We call the resulting LCTS the simple LCTS (SLCTS). The SLCTS (if it exists) can be used for the traver- sal for all rays contained within R. As it will be shown later, if no intersection is found using the current SLCTS the traversal continues using some conventional traversal tech- nique, such as a neighbour–link scheme for BSP trees. The second technique uses more elaborate treatment of the information gained during traversal of the spatial hierar- chy. It determines a hierarchical LCTS (HLCTS), that cor- responds to a sequence S of nodes of the spatial hierarchy. These nodes form a cut of the hierarchy at the level where the traversal can no longer be predetermined for all rays lo- cated within R. For any ray located in R we can avoid traver- sal steps from the root of the hierarchy to the nodes in S. As we show later, this concept can be further extended by pruning adjacent elementary nodes that do not contain any objects. Another extension is to determine a termination object (if it exists) that is hit by all rays located in R. The rest of the paper is organized as follows: In Section 2 c The Eurographics Association and Blackwell Publishers 2000. Published by Blackwell Publishers, 108 Cowley Road, Oxford OX4 1JF, UK and 350 Main Street, Malden, MA 02148, USA.