| OCR Text |
Show 43 The second test case was a collection of 30 cylinders distributed within a box (Figure 5.3). The cylinders were subdivided into 3352 triangles. The results of varying the octree parameters are given in Figure 5.4 and Table 5.2. A model of a dart was used as the third test (Figure 5.5). The dart was subdivided into 1504 triangles, and the execution times with ·various octree parameters are given in Figure 5.6 and Table 5.3. 5.4 Octree Performance Analysis The empirical results from the three test cases suggest some observations can be made for octree subdivision criteria. Considering a leaf node of the octree, when is it beneficial to subdivide the node? (Subscripts in this section refer to octant numbers in the order that an arbitrary ray would travel through them.) It is useful to define: • I, the number of octants of the node that the ray searches, between 1 and 4; • n, the number of primitive objects in the undivided leaf node; • ni, the number of primitive objects in each octant of the divided leaf node; • ~i = n - ni, the number of primitive objects in a node minus the number of primitive objects which will remain in the ith octant after subdivision; • R, the average time for testing a primitive object against a ray, either rejecting it as not intersecting the ray or returning the point of intersection; and • T, the average time for traversing from one node of the octree to another. The goal is to minimize the time spent entering and searching the node. The search time for the leaf node when it is not subdivided is t = nR + T. (5.1) |