[0001] This application claims the benefit of U.S. Provisional application Ser. No. 60/250,823 filed on Dec. 1, 2000 titled “Multiple Processor Visibility Search System and Method”.
[0002] This application is a continuation-in-part of U.S. Pat. application Ser. No. 09/247,466 filed on Feb. 9, 1999 titled “Visible-Object Determination For Interactive Visualization”, which claims the benefit of U.S. Provisional application Ser. No. 60/074,868 filed on Feb. 17, 1998 titled “Visible-Object Determination for Interactive Visualization”.
[0003] 1. Field of the Invention
[0004] The present invention relates generally to the field of computer graphics, and more particularly, to the problem of determining the set of objects (and portions of objects) visible from a defined viewpoint in a graphics environment.
[0005] 2. Description of the Related Art
[0006] Visualization software has proven to be very useful in evaluating three-dimensional designs long before the physical realization of those designs. In addition, visualization software has shown its cost effectiveness by allowing engineering companies to find design problems early in the design cycle, thus saving them significant amounts of money. Unfortunately, the need to view more and more complex scenes has outpaced the ability of graphics hardware systems to display them at reasonable frame rates. As scene complexity grows, visualization software designers need to carefully use the rendering resource provided by graphic hardware pipelines.
[0007] A hardware pipeline wastes rendering bandwidth when it discards rendered triangle work. Rendering bandwidth waste can be decreased by not asking the pipeline to draw triangles that it will discard. Various software methods for reducing pipeline waste have evolved over time. Each technique reduces waste at a different point within the pipeline. As an example, software culling of objects falling outside the view frustum can significantly reduce discards in a pipeline's clipping computation. Similarly, software culling of backfacing triangles can reduce discards in a pipeline's lighting computation.
[0008] The z-buffer is the final part of the graphics pipeline that discards work. In essence, the z-buffer retains visible surfaces, and discards those not visible because they are behind another surface (i.e. occluded). As scene complexity increases, especially in walk-through and CAD environments, the number of occluded surfaces rises rapidly and as a result the number of surfaces that the z-buffer discards rises as well. A frame's average depth complexity determines roughly how much work (and thus rendering bandwidth) the z-buffer discards. In a frame with a per-pixel depth complexity of d the pipeline's effectiveness is 1/d. As depth complexity rises, the hardware pipeline thus becomes proportionally less and less effective.
[0009] Software occlusion culling has been proposed as an additional tool for improving rendering effectiveness. A visualization program which performs occlusion culling effectively increases the overall rendering bandwidth of the graphics hardware by not asking the hardware pipeline to draw occluded objects. Computing a scene's visible objects is the complementary problem to that of occlusion culling. Rather than removing occluded objects from the set of objects in a scene or frustum-culled scene, a program instead computes which objects are visible and instructs the rendering hardware to draw just those. A simple visualization program can compute the set of visible objects and draw those objects from the current viewpoint, thus allowing the pipeline to focus on removing backfacing polygons and the z-buffer to remove any non-visible surfaces of those objects.
[0010] One technique for computing the visible object set uses ray casting as shown in
[0011] The intuition for the use of rays in determining visibility relies on the properties of light. The first object encountered along a ray is visible since it alone can reflect light into the viewer's eye. Also, that object interposes itself between the viewer and all succeeding objects along the ray making them not visible. In the discrete world of computer graphics, it is difficult to propagate a continuum of rays. So a discrete subset of rays is invariably used. Of course, this implies that visible objects or segments of objects smaller than the resolution of the ray sample may be missed and not discovered. This is because rays guarantee correct determination of visible objects only up to the density of the ray-sample.
[0012] Visible-object determination has its roots in visible-surface determination. Foley et al. [Foley, J., van Dam, A., Feiner, S. and Hughes, J. Computer Graphics: Principles and Practice, 2nd ed., Addison-Wesley, Chapter 15, pp. 649-718, 1996] classify visible-surface determination approaches into two broad groups: image-precision and object-precision algorithms. Image precision algorithms typically operate at the resolution of the display device and tend to have superior performance computationally. Object precision approaches operate in object space—usually performing object to object comparisons.
[0013] A prototypical image-precision visible-surface-determination algorithm casts rays from the viewpoint through the center of each display pixel to determine the nearest visible surface along each ray. The list of applications of visible-surface ray casting (or ray tracing) is long and distinguished. Appel [“Some Techniques for Shading Machine Rendering of Solids”, SJCC'68, pp. 37-45, 1968] uses ray casting for shading. Goldstein and Nagel [Mathematical Applications Group, Inc., “3-D Simulated Graphics Offered by Service Bureau,” Datamation, 13(1), February 1968, p. 69.; see also Goldstein, R. A. and Nagel, R., “3-D Visual Simulation”, Simulation, 16(1), pp. 25-31, 1971] use ray casting for boolean set operations. Kay et al. [Kay, D. S. and Greenberg, D., “Transparency for Computer Synthesized Images,” SIGGRAPH'79, pp. 158-164] and Whitted [“An Improved Illumination Model for Shaded Display”, CACM, 23(6), pp. 343-349, 1980] use ray tracing for refraction and specular reflection computations. Airey et al. [Airey, J. M., Rohlf, J. H. and Brooks, Jr. F. P., “Towards Image Realism with Interactive Update Rates in Complex Virtual Building Environments”, ACM SIGGRAPH Symposium on Interactive 3D Graphics, 24, 2(1990), pp. 41-50] uses ray casting for computing the portion of a model visible from a given cell.
[0014] Another approach to visible-surface determination relies on sending beams or cones into a database of surfaces [see Dadoun et al., “Hierarchical approachs to hidden surface intersection testing”, Proceeedings of Graphics Interface '82, Toronto, May 1982, 49-56; see also Dadoun et al., “The geometry of beam tracing”, In Joseph O'Rourke, ed., Proceeedings of the Symposium on Computational Geometry, pp. 55-61, ACM Press, New York, 1985]. Essentially, beams become a replacement for rays. The approach usually results in compact beams decomposing into a set of possibly non-connected cone(s) after interacting with an object.
[0015] A variety of spatial subdivision schemes have been used to impose a spatial structure on the objects in a scene. The following four references pertain to spatial subdivision schemes: (a) Glassner, “Space subdivision for fast ray tracing,” IEEE CG&A, 4(10):15-22, Oct. 1984; (b) Jevans et al., “Adaptive voxel subdivision for ray tracing,” Proceedings Graphics Interface '89, 164-172, June 1989; (c) Kaplan, M. “The use of spatial coherence in ray tracing,” in Techniques for Computer Graphics . . . , Rogers, D. and Earnshaw, R. A. (eds), Springer-Verlag, New York, 1987; and (d) Rubin, S. M. and Whitted, T. “A 3-dimensional representation for fast rendering of complex scenes,” Computer Graphics, 14(3):110-116, July 1980.
[0016] Kay et al. [Kay, T. L. and Kajiya, J. T., “Ray Tracing Complex Scenes”, SIGGRAPH 1986, pp. 269-278, 1986], concentrating on the computational aspect of ray casting, employed a hierarchy of spatial bounding volumes in conjunction with rays, to determine the visible objects along each ray. Of course, the spatial hierarchy needs to be precomputed. However, once in place, such a hierarchy facilitates a recursive computation for finding objects. If the environment is stationary, the same data-structure facilitates finding the visible object along any ray from any origin.
[0017] Teller et al. [Teller, S. and Sequin, C. H., “Visibility Preprocessing for Interactive Walkthroughs,” SIGGRAPH '91, pp. 61-69] use preprocessing to full advantage in visible-object computation by precomputing cell-to-cell visibility. Their approach is essentially an object precision approach and they report over 6 hours of preprocessing time to calculate 58 Mbytes of visibility information for a 250,000 polygon model on a 50 MIP machine [Teller, S. and Sequin. C. H., “Visibility computations in polyhedral three-dimensional environments,” U. C. Berkeley Report No. UCB/CSD 92/680, April 1992].
[0018] In a different approach to visibility computation, Greene et al. [Greene, N., Kass, M., and Miller, G., “Hierarchical z-Buffer Visibility,” SIGGRAPH '93, pp. 231-238] use a variety of hierarchical data structures to help exploit the spatial structure inherent in object space (an octree of objects), the image structure inherent in pixels (a Z pyramid), and the temporal structure inherent in frame-by-frame rendering (a list of previously visible octree nodes). The Z-pyramid permits the rapid culling of large portions of the model by testing for visibility using a rapid scan conversion of the cubes in the octree.
[0019] As used herein, the term “octree” refers to a data structure derived from a hierarchical subdivision of a three-dimensional space based on octants. The three-dimensional space may be divided into octants based on three mutually perpendicular partitioning planes. Each octant may be further partitioned into eight sub-octants based on three more partitioning planes. Each sub-octant may be partitioned into eight sub sub-octants, and so forth. Each octant, sub-octant, etc., may be assigned a node in the data structure. For more information concerning octrees, see pages 550-555, 559-560 and 695-698 of
[0020] The depth complexity of graphical environments continues to increase in response to consumer demand for realism and performance. Thus, the efficiency of an algorithm for visible object determination has a direct impact on the marketability of a visualization system. The computational bandwidth required by the visible object determination algorithm determines the class of processor required for the visualization system, and thereby affects overall system cost. Thus, a system and method for improving the efficiency of visible object determination is greatly desired.
[0021] Various embodiments of a system and method for performing visible object determination based upon a dual search of a cone hierarchy and a bound hierarchy are herein disclosed. In one embodiment, the system may comprise a plurality of processors, a display device, a shared memory, and optionally a graphics accelerator. The multiple processors execute a parallel visibility algorithm which operates on a collection of graphical objects to determine a visible subset of the objects from a defined viewpoint. The objects may reside in a three-dimensional space and thus admit the possibility of occluding one another.
[0022] The parallel visibility algorithm represents space in terms of a hierarchy of cones emanating from a viewpoint. In one embodiment, the leaf-cones of the cone hierarchy, i.e. the cones at the ultimate level of refinement, subtend an area which corresponds to a fraction of a pixel in screen area. For example, two cones may conveniently fill the area of a pixel. In other embodiments, a leaf-cone may subtend areas which include one or more pixels.
[0023] An initial view frustum or neighborhood of the view frustum may be recursively tessellated (i.e. refined) to generate a cone hierarchy. Alternatively, the entire space around the viewpoint may be recursively tessellated to generate the cone hierarchy. In this embodiment, the cone hierarchy is recomputed for changes in the viewpoint and view-direction.
[0024] The multiple processors or some subset thereof, or another set of one or more processors, may also generate a hierarchy of bounds from the collection of objects. In particular, the bound hierarchy may be generated by: (a) recursively grouping clusters starting with the objects themselves as order-zero clusters, (b) bounding each object and cluster (of all orders) with a corresponding bound, e.g. a polytope hull, (c) allocating a node in the bound hierarchy for each object and cluster, and (d) organizing the nodes in the bound hierarchy to reflect cluster membership. For example if node A is the parent of node B, the cluster corresponding to node A contains a subcluster (or object) corresponding to node B. Each node stores parameters which characterize the bound of the corresponding cluster or object.
[0025] The cone hierarchy and bound hierarchy may be stored in the shared memory. In addition, the shared memory may store a global problem queue. The global problem queue is initially loaded with a collection of bound-cone pairs. Each bound-cone pair points to a bound in the bound hierarchy and a cone in the cone hierarchy.
[0026] The multiple processors may couple to the shared memory, and may perform a search of the cone and bound hierarchies to identify one or more nearest objects for a subset of cones (e.g. the leaf cones) in the cone hierarchy. After the multiple processors complete the search of the cone and bound hierarchies, a transmission agent (e.g. the multiple processors, some subset thereof, or another set of one or more processors) may transmit graphics primitives, e.g. triangles, corresponding to the nearest objects of each cone in the subset, to a rendering agent. The rendering agent (e.g. the graphics accelerator, or a software renderer executing on the multiple processors, some subset thereof, or another set of one or more processors) is operable to receive the graphics primitives, to perform rendering computations on the graphics primitives to generate a stream of pixels, and to transmit the pixel stream to the display device.
[0027] In some embodiments, each leaf-cone may be assigned a visibility distance value which represents the distance to the closest known object as perceived from within the leaf-cone. Each leaf-cone may also be assigned an object pointer which specifies the closest known object within view of the leaf-cone. Similarly, each non-leaf cone may be assigned a visibility distance value. However, the visibility distance value of a non-leaf cone may be set equal to the maximum of the visibility distance values for its subcone children. This implies that the visibility distance value for each non-leaf cone equals the maximum of the visibility distance values of its leaf-cone descendents.
[0028] In one embodiment, each of the plurality of processors is operable to: (a) read a bound-cone pair (H,C) from the global work queue, (b) compute the distance between the bound H and the cone C, (c) to compare the bound-cone distance to a visibility distance associated with the cone C, (d) to write two or more dependent bound-cone pairs to the global problem queue if the bound-cone distance is smaller than the visibility distance of the cone C. The two or more dependent bound-cone pairs may be pairs generated from bound H and the subcones of cone C, or pairs generated from cone C and subbounds of bound H.
[0029] Furthermore, when the processor detects that the hull H is a leaf bound of the bound hierarchy and the cone C is a leaf cone of the cone hierarchy, the processor may update the visibility information for the leaf cone, i.e. may set the visibility distance value for cone C equal to the cone-hull distance computed in (b) above, and may set the nearest object pointer associated with cone C equal to a pointer associated with hull H.
[0030] In one alternative embodiment, each processor may couple to a local memory containing a local problem queue. Each processor may read and write bound-cone pairs from/to its local problem queue, and access the global problem queue to read initial bound-cone pairs.
[0031] In another alternative embodiment, a collection of cones may be selected from the cone hierarchy, i.e. a collection of non-overlapping cones which fill the space of the root cone (i.e. top level cone). The cones of the collection may be distributed among the multiple processors. Each of the multiple processors may perform a search of its assigned cones (i.e. the subtrees of the cone hierarchy defined by these assigned cones) against the hull tree.
[0032] The foregoing, as well as other objects, features, and advantages of this invention may be more completely understood by reference to the following detailed description when read together with the accompanying drawings in which:
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047] FIGS.
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054] While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular forms disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. Please note that the section headings used herein are for organizational purposes only and are not meant to limit the description or claims. The word “may” is used in this application in a permissive sense (i.e., having the potential to, being able to), not a mandatory sense (i.e., must). Similarly, the word include, and derivations thereof, are used herein to mean “including, but not limited to.”
[0055]
[0056]
[0057] Each processor PR
[0058] Graphics primitives (e.g. triangles) corresponding to the visible objects may be transmitted to graphics accelerator
[0059] In one alternative embodiment, processors PR
[0060] In one embodiment, graphics accelerator
[0061] As mentioned above, 3-D graphics accelerator
[0062] Processor devices (e.g. processors PR
[0063]
[0064] In step
[0065] In one embodiment of graphical computing system
[0066] In step
[0067] In step
[0068] In step
[0069] Visible object determination step
[0070] In some embodiments, objects may be modeled as opaque convex polytopes. A three-dimensional solid is said to be convex if any two points in the solid (or on the surface of the solid) may be connected with a line segment which resides entirely within the solid. Thus a solid cube is convex, while a donut (i.e. solid torus) is not. A polytope is an object with planar sides (e.g. cube, tetrahedron, etc.). The methodologies described herein for opaque objects naturally extend to transparent or semi-transparent objects by not allowing such objects to terminate a cone computation. Although not all objects are convex, every object can be approximated as a union of convex polytopes. It is helpful to note that the visible-object-set computation does not require an exact computation, but rather a conservative one. In other words, it is permissible to estimate a superset of the set of visible objects.
[0071] Constructing the Object Hierarchy
[0072] Initially, the objects in a scene may be organized into a hierarchy that groups objects spatially. An octree is one possibility for generating the object hierarchy. However, in the preferred embodiment, a clustering algorithm is used which groups nearby objects then recursively clusters pairs of groups into larger containing spaces. The clustering algorithm employs a simple distance measure and threshold operation to achieve the object clustering. FIGS.
[0073] Each object may be bounded, i.e. enclosed, by a corresponding bounding surface referred to herein as a bound. In the preferred embodiment, the bound for each object is a polytope hull (i.e. a hull having planar faces) as shown in
[0074] Since a hull has a surface which is comprised of a finite number of planar components, the description of a hull is intimately connected to the description of a plane in three-space. In
[0075] The line x•n=c divides the plane into two half-planes. By replacing the equality in the above equation with an inequality, one obtains the description of one of these half-planes. The equality x•n<c defines the half-plane which contains the negative infinity end of line L. [The unit vector n defines the positive direction of line L.] In three dimensions, the plane x•n=c divides the three-dimensional space into two half-spaces. The inequality x•n<c defines the half-space which contains the negative infinity end of line L.
[0076]
[0077] In three-dimensional space, a rectangular box may be analogously defined as the intersection of six half-spaces. Given six normal vectors n
[0078] To construct an object hierarchy, object hulls H
[0079] The containing-hulls H
[0080] In general, a succession of pairing operations is performed. At each stage, a higher-order set of containing-hulls and corresponding nodes for the object hierarchy are generated. Each node contains the describing vector c for the corresponding containing-hull. At the end of the process, the object hierarchy comprises a binary tree with a single root node. The root node corresponds to a total containing-hull which contains all subhulls of all orders including all the original object-hulls. The object hierarchy, because it comprises a hierarchy of bounding hulls, will also be referred to as the hull hierarchy. In the preferred embodiment, the pairing operations are based on proximity, i.e. objects (and hulls of the same order) are paired based on proximity. Proximity based pairing may result in a more efficient visible object determination algorithm. This tree of containing hulls provides a computationally efficient and hierarchical representation of the entire scene. For instance, when a cone completely misses a node's containing-hull, none of the node's descendents need to be examined.
[0081] Bounding hulls (i.e. containing hulls) serve the purpose of simplifying and approximating objects. Any hierarchy of containing hulls works in principle. However, hierarchies of hulls based on a common set of normal vectors are particularly efficient computationally. A collection of hulls based on a common set of normal vectors will be referred to herein as a fixed-direction or commonly-generated collection. As described above, a polytope hull is described by a bounding system of linear inequalities {x: Nx≲c}, where the rows of the matrix N are a set of normal vectors, and the elements of the vector c define the distances to move along each of the normal vectors to obtain a corresponding side of the polytope. In a fixed-direction collection of hulls, the normal matrix N is common to all the hulls in the collection, while the vector c is unique for each hull in the collection. The problem of calculating the coefficient vector c for a containing hull given a collection of subhulls is greatly simplified when a common set of normal vectors is used. In addition, the nodes of the hull hierarchy may advantageously consume less memory space since the normal matrix N need not be stored in the nodes. In some embodiments, the hull hierarchy comprises a fixed-direction collection of hulls.
[0082] In a first embodiment, six normal vectors oriented in the three positive and three negative axial directions are used to generate a fixed-direction hierarchy of hulls shaped like rectangular boxes with sides parallel to the coordinate planes. These axis-aligned bounding hulls provide a simple representation that has excellent local computational properties. It is easy to transform or compare two axis-aligned hulls. However, the approximation provided by axis-aligned hulls tends to be rather coarse, often proving costly at more global levels.
[0083] In a second embodiment, eight normal vectors directed towards the corners of a cube are used to generate a hierarchy of eight-sided hulls. For example, the eight vectors (±1,±1,±1) may be used to generate the eight-sided hulls. The octahedron is a special case of this hull family.
[0084] In a third embodiment, fourteen normal vectors, i.e. the six normals which generate the rectangular boxes plus the eight normals which generate the eight-sided boxes, are used to generate a hull hierarchy with fourteen-sided hulls. These fourteen-sided hulls may be described as rectangular boxes with corners shaved off. It is noted that as the number of normal vectors and therefore side increases, the accuracy of the hull's approximation to the underlying object increases.
[0085] In a fourth embodiment, twelve more normals are added to the fourteen normals just described to obtain a set of twenty-six normal vectors. The twelve additional normals serve to shave off the twelve edges of the rectangular box in addition to the corners which have already been shaved off. This results in twenty-six sided hulls. For example, the twelve normal vectors (±1, ±1, 0), (±1, 0, ±1), and (0, ±1, ±1) may be used as the additional vectors.
[0086] In the examples given above, hulls are recursively grouped in pairs to generate a binary tree. However, in other embodiments, hulls are grouped together in groups of size n
[0087] Although the above discussion has focused on the use of polytope hulls as bounds for object and clusters, it is noted that any type of bounding surfaces may be used, thereby generating a hierarchy of bounds referred to herein as a bounding hierarchy. Each node of the bounding hierarchy corresponds to an object or cluster and stores parameters which characterize the corresponding bound for that object or cluster. For example, polynomial surfaces such as quadratic surfaces may be used to generate bounds for objects and/or clusters. Spheres and ellipsoids are examples of quadratic surfaces.
[0088] cones in visible object determination
[0089] In addition to the bounding hierarchy (e.g. hull hierarchy) discussed above, the visualization software makes use of a hierarchy of spatial cones. An initial cone which may represent the view frustum may be recursively subdivided into a hierarchy of subcones. Then a simultaneous double recursion may be performed through the pair of trees (the object tree and cone tree) to rapidly determine the set of visible objects. This cone-based method provides a substantial computational gain over the prior art method based on ray-casting.
[0090]
[0091] polyhedral cones
[0092] The spatial cones used in the preferred embodiment are polyhedral cones. The generic polyhedral cone has a polygonal cross-section.
[0093] A polyhedral cone is constructed by intersection of multiple half-spaces. For example, solid cone PHC
[0094] Thus, a polyhedral cone emanating from the origin is defined as the set of points satisfying a system of linear inequalities Sx≲0. [There is no loss of generality in assuming the origin to be the viewpoint.] According to this definition, half-spaces, planes, rays, and the origin itself may be considered as polyhedral cones. In addition, the entire space may be considered to be a polyhedral cone, i.e. that cone which is defined by an empty matrix S.
[0095] distance measurement
[0096] The distance of an object, hull, or bound from a particular viewpoint is defined to be the minimum distance to the object, hull, or bound from the viewpoint. So, assuming a viewpoint at the origin, the distance of the object, hull, or bound X from the viewpoint is defined as
[0097] where ∥x∥ is the norm of vector x.
[0098] Any vector norm may be chosen for the measurement of distance. In one embodiment, the Euclidean norm is chosen for distance measurements. The Euclidean norm results in a spherically shaped wavefront. More generally, a distance measurement f(X) may be based on any wavefront as long as the wavefront shape satisfies a mild “star-shape” criterion, i.e. the entire boundary of the wavefront is unobstructed when viewed from the origin. All convex wavefronts satisfy this condition, and many non-convex ones do as well. In general, the level curves of a norm are recommended as the wavefront shapes. From a computational standpoint, the spherical wavefront shape given by the L
[0099] cones and visibility
[0100] Consider an arbitrary cone K emanating from the origin as a viewpoint. Define the distance of an object, hull, or bound X relative to the cone K as
[0101] where the symbol ∈ denotes set intersection. If the distance f
[0102] As discussed above, the ray-based methods of the prior art are able to detect objects only up the resolution of the ray sample. Small visible objects or small portions of larger objects may be missed entirely due to insufficient ray density. In contrast, cones can completely fill space. Thus, the cone-based method disclosed herein may advantageously detect small visible objects or portions of objects that would be missed by a ray-based method with equal angular resolution.
[0103] generalized separation measurement
[0104] For the purposes of performing a visibility search procedure, it is necessary to have a method for measuring the extent of separation (or conversely proximity) of objects, bounds, or hulls with respect to cones. There exists a great variety of such methods in addition to those based on minimizing vector norms defined above.
[0105] In some embodiments, the separation between a set X and a cone K may be computed based on the model of wavefront propagation. A wavefront propagating internal to the cone from the vertex of the cone has a radius of first interaction with the set X. This radius of first interaction may provide a measurement value of the separation between the set X and the cone K. The wavefront may satisfy a mild “star shape” condition, i.e. the entire boundary of the wavefront is visible from the vertex of the cone.
[0106] In one embodiment, the measurement value is obtained by computing a penalty of separation between the set X and the cone K. The penalty of separation may be evaluated by minimizing an increasing function of separation distance between the vertex of the cone K and points in the intersection of the cone K and set X. For example, any positive power of a vector norm gives such an increasing function.
[0107] In another embodiment, the measurement value is obtained by computing a merit of proximity between the set X and the cone K. The merit of proximity may be evaluated by maximizing a decreasing function of separation distance between the vertex of the cone K and points in the intersection of the cone K and set X. For example, any negative power of a vector norm gives such a decreasing function of separation.
[0108] a cone hierarchy
[0109] In the preferred embodiment, visible objects are determined by operating on a hierarchy of cones in addition to the hierarchy of hulls described above. The class of polyhedral cones is especially well suited for generating a cone hierarchy. Polyhedral cones naturally decompose into polyhedral subcones by the insertion of one or more separating planes. The ability to nest cones into a hierarchical structure may allow a rapid examination of object visibility. As an example, consider two neighboring cones that share a common face. By taking the union of these two cones, a new composite cone is generated. The composite cone neatly contains its children, and is thus capable of being used in querying exactly the same space as its two children. In other words, the children cones share no interior points with each other and they completely fill the parent without leaving any empty space.
[0110] A typical display and its associated view frustum has a rectangular cross-section. Various possibilities are contemplated for tessellating this rectangular cross-section to generate a system of sub-cones. For example, the rectangle naturally decomposes into four rectangular cross-sections, or two triangular cross-sections. Although these examples illustrate decompositions using regular components, irregular components may be used as well.
[0111] FIGS.
[0112] The triangular hierarchical decomposition shown in FIGS.
[0113] It is noted that any cone decomposition strategy may be employed to generate a cone hierarchy. In a second embodiment, the view frustum is decomposed into four similar rectangular cones; each of these subcones is decomposed into four more rectangular subcones, and so on. This results in a cone tree with four-fold branches.
[0114] As used herein, a cone K is said to be a descendent of cone C when cone C contains cone K. Thus, all the cones beneath cone C in the cone hierarchy are said to be descendents of cone C.
[0115] discovering the set of visible objects
[0116] Once the hull hierarchy and the cone hierarchy have been constructed, the set of visible objects may be computed with respect to the current viewpoint. In one embodiment, the visible object set is repeatedly recomputed for a succession of viewpoints, viewing directions, video frames, etc. The successive viewpoints and/or viewing directions may be specified by a user through an input device such as a mouse, joystick, keyboard, trackball, head-position sensor, eye-orientation sensor, or any combination thereof. A visible object determination method may be organized as a simultaneous search of the hull tree and the cone tree. The search process may involve recursively performing hull-cone queries. Given a cone node K and a hull node H, a hull-cone query on cone K and hull H investigates the visibility of hull H and its descendent hulls with respect to cone K and its descendent cones. The search process has a computational complexity of order log M, where M equals the number of cone nodes times the number of hull nodes. In addition, many hull-cone queries can occur in parallel allowing aggressive use of multiple processors in constructing the visible-object-set.
[0117] viewing the scene
[0118] The set of visible objects from the current viewpoint may be rendered on one or more displays. Display rendering and visible object determination may be performed independently and concurrently. The display rendering and visible object determination may occur concurrently because the visible-object-set remains fairly constant between frames in a walkthrough environment. Thus, the previous set of visible objects provides an excellent approximation to the current set of visible objects.
[0119] managing the visible-object-set
[0120] The visualization software executing on graphical computing system
[0121] computing visibility using cones
[0122] Substantial computational leverage may be provided by recursively searching the hierarchical tree of cones in conjunction with the hierarchical tree of hulls. Whole groups of cones may be tested against whole groups of hulls in a single query. For example, if a parent cone does not intersect a parent hull, it is obvious that no child of the parent cone can intersect any child of the parent hull. In such a situation, the parent hull and all of its descendants may be removed from further visibility considerations with respect to the parent cone.
[0123] visibility search algorithm
[0124] In one embodiment, processors PR
[0125] The recursive search of the two trees provides a number of opportunities for aggressive pruning of the search space. Central to the search is the object-cone distance measure defined above, i.e. given a cone K and an object (or hull) X, the object-cone distance is defined as
[0126] It is noted that this minimization is in general a nonlinear programming problem since the cones and object hulls are defined by constraint equations, e.g. planes in three-space. If the vector norm ∥x∥ is the L
[0127] The recursive search may explore hull-cone pairs starting with the pair defined by the root hull of the hull tree and the root cone of the cone tree (see
[0128] To facilitate the search process, each leaf-cone, i.e. each terminal node of the cone tree, is assigned an extent value which represents its distance to the closest known object-hull as seen within the cone. [An object-hull is a hull that directly bounds an object. Object-hulls are terminal nodes of the hull tree.] Thus, this extent value may be referred to as the visibility distance. The visibility distance of a leaf-cone is non-increasing, i.e. it decreases as closer objects (i.e. object hulls) are discovered in the search process. Visibility distances for all leaf-cones may be initialized to positive infinity. In addition to a visibility distance value, each leaf-cone node is assigned storage for a pointer which points to a currently visible object. This object pointer may be initialized with a reserved value denoted NO_OBJECT which implies that no object is yet associated with the leaf-cone. In another embodiment, the object pointer may be initialized with a reserved value denoted BACKGROUND which implies that a default scene background is associated with the leaf-cone.
[0129] In addition, each non-leaf cone, i.e. each cone at a non-final refinement level, may be assigned an extent value which equals the maximum of the extent values of its subcones. Or equivalently, the extent value for a non-leaf cone may be set equal to the maximum of the visibility distance values of its leaf-cone descendents. These extent values are also referred to as visibility distance values. The visibility distance values for all non-leaf cones are also initialized to positive infinity (consistent with the initialization of the leaf-cones). Suppose a given non-leaf cone K and a hull X achieve a cone-object distance f
[0130] A global problem queue may be maintained in shared memory
[0131] For example, assuming the cone and hull hierarchies are binary trees, the second level below the root hull contains four hulls, and the third level below the root cone contains eight cones. Thus, the global problem queue may be initially loaded with the 32=4×8 hull-cone pairs generated by these four hulls and eight cones.
[0132] In addition, the hull hierarchy and the cone hierarchy may be stored in shared memory
[0133] Each of processors PR
[0134] In step
[0135] If, in step
[0136] In step
[0137] In step
[0138] If hull H and cone C are not both leaves, the processor may perform step
[0139] In step
[0140] If, in step
[0141] In step
[0142] If, in step
[0143] When the processor terminates processing as indicated in steps
[0144] Thus, each of processors PR
[0145] In one embodiment, each processor PR
[0146] As described above, graphical computing system
[0147] The operation of all processors repeatedly executing program thread
[0148] Local Problem Queue Per Processor
[0149] In some embodiments, graphical computing system
[0150] Each processor PR
[0151] In state
[0152] Because each processor operates from its local problem queue and accesses the main problem queue when its local problem queue is empty, memory access conflicts to the main problem queue may be minimized.
[0153] In one embodiment, if the main problem queue is empty and the local problem queue of a processor PR
[0154] After the main problem queue and all local problem queues are empty, the set of visible objects will have been determined.
[0155] Distributing Cones to Processors
[0156] In some embodiments, a collection of cones from the cone hierarchy may be distributed to processors PR
[0157] Each cone from the cone collection is assigned to one and only one of the processors PR
[0158] Processor PR
[0159] In state
[0160] size conditioned tree search
[0161] As described above in connection with step
[0162] If the hull size Size_H is larger than the cone size Size_C as suggested by
[0163] If the hull size Size_H is smaller than the cone size Size_C as suggested by
[0164] By selecting the larger entity (hull or cone) for refinement, the program thread
[0165] method for constructing a bounding hierarchy
[0166]
[0167] In step
[0168] Although the construction of the cone hierarchy above has been described in terms of recursive clustering, it is noted alternative embodiments are contemplated which use other forms of clustering such as iterative clustering.
[0169] computing the cone restricted distance function
[0170] Recall that evaluation of the hull-cone distance f
[0171] It is also noted that hull-cone separation may be measured by maximizing an decreasing function separation such as ∥x∥
[0172] The use of a hierarchy of cones instead of a collection of rays is motivated by the desire for computational efficiency. Thanks to early candidate pruning that results from the double recursion illustrated earlier, fewer geometric queries are performed. These queries however are more expensive than the queries used in the ray casting method. Therefore, the cone query calculation may be designed meticulously. A sloppy algorithm could end up wasting most of the computational advantage provided by improvements in the dual tree search. For the linear programming case, a method for achieving a computationally tight query will now be outlined.
[0173] A piecewise-linear formulation of distance f
[0174] subject to
[0175] The vector v is some member of the cone that is polar to the cone C. For instance, v=S
[0176] subject to
[0177] The dual objective value, b
[0178] In the preferred embodiment, the bounding hulls have sides normal to a fixed set of normal vectors. Thus, the matrix A
[0179] is associated with the cone. (In one embodiment, this polyhedron has seventeen dimensions. Fourteen of those dimensions come from the type of the fixed-direction bounding hull and an three additional dimensions come from the cone.) Since the polyhedron depends only on the cone matrix S, it is feasible to completely precompute the extremal structure of the polygon for each cone in the cone hierarchy. By complementary slackness, the vertices of the polyhedron will have at most three elements. The edges and extremal rays will have at most four non-zero elements. An abbreviated, simplex-based, hill-climbing technique can be used to quickly solve the query in this setting.
[0180] In one embodiment, the entire space is tessellated with cones, and visible objects are detected within the entire space. After this entire-space visibility computation, the set of visible objects may be culled to conform to the current view frustum, and the visible objects which survive the frustum culling may be rendered and displayed.
[0181] In an alternative embodiment, a less aggressive approach may be pursued. In particular, by determining beforehand a collection of the cones in the cone hierarchy which correspond to the view frustum in its current orientation, only this collection may be included in the visible-object-set computation.
[0182] memory media
[0183] As described above, the visibility software realized by program thread
[0184] In one embodiment, the visibility software may be implemented as part of an operating system. In a second embodiment, the visibility software may be implemented as a dynamic link library. In a third embodiment, the visibility software may be implemented as part of a device driver (e.g. a device driver for graphics accelerator
[0185] In a fourth embodiment, the visibility software may be implemented as part of a JAVA 3D virtual machine which executes on processors PR