Fast Rendering of Irregular Grids

Fast Rendering of Irregular Grids

Fast Rendering of Irregular Grids Cl´audio T. Silva Joseph S. B. Mitchell Arie E. Kaufman State University of New York at Stony Brook Stony Brook, NY 11794 Abstract Definitions and Terminology 3 A polyhedron is a closed subset of < whose boundary consists We propose a fast algorithm for rendering general irregular grids. of a finite collection of convex polygons (2-faces,orfacets) whose Our method uses a sweep-plane approach to accelerate ray casting, union is a connected 2-manifold. The edges (1-faces)andvertices and can handle disconnected and nonconvex (even with holes) un- (0-faces) of a polyhedron are simply the edges and vertices of the structured irregular grids with a rendering cost that decreases as the polygonal facets. A convex polyhedron is called a polytope.A “disconnectedness” decreases. The algorithm is carefully tailored polytope having exactly four vertices (and four triangular facets) is to exploit spatial coherence even if the image resolution differs sub- called a simplex (tetrahedron). A finite set S of polyhedra forms a stantially from the object space resolution. mesh (or an unstructured, irregular grid) if the intersection of any In this paper, we establish the practicality of our method through two polyhedra from S is either empty, a single common edge, a sin- experimental results based on our implementation, and we also pro- gle common vertex, or a single common facet of the two polyhedra; vide theoretical results, both lower and upper bounds, on the com- such a set S is said to form a cell complex. The polyhedra of a mesh plexity of ray casting of irregular grids. are referred to as the cells (or 3-faces). If the boundary of a mesh S S S is also the boundary of the convex hull of ,then is called a convex mesh; otherwise, it is called a nonconvex mesh. If the cells are all simplices, then we say that the mesh is simplicial. c We are given a mesh S .Welet denote the number of connected c =1 1 Introduction components of S .If , we say that the mesh is connected;oth- erwise, the mesh is disconnected.Welet n denote the total number n of edges of all polyhedral cells in the mesh. Then, there are O Volume rendering methods are used to visualize scalar and vector vertices, edges, facets, and cells. fields by modeling volume as “cloud-like” cells composed of semi- N The image space consists of a screen of N -by- pixels. We let transparent material that emits its own light, partially transmits light i;j denote the ray from the eye of the camera through the center from other cells, and absorbs some incoming light [31, 17]. The i; j k of the pixel indexed by .Welet i;j denote the number of most common input data type is a regular (Cartesian) grid of vox- S facets of that are intersected by i;j . (Then, the number of cells 3 els. Given a general scalar field in < , one can use a regular grid k =2 k k = i;j i;j intersected by i;j is between and .) Finally, we let P of voxels to represent the field by regularly sampling the function k i;j be the total complexity of all ray casts for the image. We i;j i; j; k i; j; k at grid points , for integers , and some scale fac- refer to k as the output complexity. 2< tor , thereby creating a regular grid of voxels. However, a serious drawback of this approach arises when the scalar field is disparate, having nonuniform resolution with some large regions Related Work of space having very little field variation, and other very small re- gions of space having very high field variation. In such cases, which A simple approach for handling irregular grids is to resample them, often arise in computational fluid dynamics and partial differential thereby creating a regular grid approximation that can be rendered equation solvers, the use of a regular grid is infeasible since the by conventional methods [30]. In order to achieve high accuracy it voxel size must be small enough to model the smallest “features” in may be necessary to sample at a very high rate, which not only re- the field. Instead, irregular grids (or meshes), having cells that are quires substantial computation time, but may well make the result- not necessarily uniform cubes, have been proposed as an effective ing grid far too large for storage and visualization purposes. Several means of representing disparate field data. rendering methods have been optimized for the case of curvilinear grids; in particular, Fr¨uhauf [11] has developed a method in which Irregular grid data comes in several different formats [26]. One rays are “bent” to match the grid deformation. Also, by exploit- very common format has been curvilinear grids, which are struc- ing the simple structure of curvilinear grids, Mao et al. [16] have tured grids in computational space that have been “warped” in phys- shown that these grids can be efficiently resampled with spheres ical space, while preserving the same topological structure (con- and ellipsoids that can be presorted along the three major directions nectivity) of a regular grid. However, with the introduction of new and used for splatting. methods for generating higher quality adaptive meshes, it is becom- A direct approach to rendering irregular grids is to compute the ing increasingly common to consider more general unstructured depth sorting of cells of the mesh along each ray emanating from (non-curvilinear) irregular grids, in which there is no implicit con- a screen pixel. For irregular grids, and especially for disconnected nectivity information. Furthermore, in some applications discon- grids, this is a nontrivial computation to do efficiently. One can nected grids arise. 2 always take a naive approach, and for each of the N rays, compute n O n In this paper, we present and analyze a new method for rendering the O intersections with cell boundary facets in time ,and n log n general meshes, which include unstructured, possibly disconnected, then sort these crossing points (in O time). However, this 2 N n log n irregular grids. Our method is based on ray casting and employs a results in overall time O , and does not take advantage sweep-plane approach, as proposed by Giertsen [14], but introduces of coherence in the data: The sorted order of cells crossed by one several new ideas that permit a faster execution, both in theory and ray is not used in any way to assist in the processing of nearby rays. in practice. Garrity [13] has proposed a preprocessing step that identifies the B is an important problem to find a small number of “cuts” that break the objects in such a way that a depth ordering does exist; see [7, 5]. BSP trees have been used to obtain such a decomposition, but can result in a quadratic number of pieces [12, 19]. However, for some C important classes of meshes (e.g., rectilinear meshes and Delaunay meshes [10]), it is known that a depth ordering always exists, with A respect to any viewpoint. This structure has been exploited by Max et al. [17]. Williams [32] has obtained a linear-time algorithm for Figure 1: 3 triangles that have no depth ordering. visibility ordering convex (connected) acyclic meshes whose union of (convex) cells is itself convex, assuming a visibility ordering ex- ists. Williams also suggests heuristics that can be applied in case boundary facets of the mesh. When processing a ray as it passes there is no visibility ordering or in the case of nonconvex meshes, through interior cells of the mesh, connectivity information is used (e.g., by tetrahedralizing the nonconvexities which, unfortunately, to move from cell to cell in constant time (assuming that cells are may result in a quadratic number of cells). In [29], techniques are convex and of constant complexity). But every time that a ray ex- presented where no depth ordering is strictly necessary,and in some its the mesh through a boundary facet, it is necessary to perform a cases calculated approximately. Very fast rendering is achieved by “FirstCell” operation to identify the point at which the ray first reen- using graphics hardware to project the partially sorted faces. ters the mesh. Garrity does this by using a simple spatial indexing Two important references on rendering irregular grids have not scheme based on laying down a regular grid of voxels (cubes) on yet been discussed here — Giertsen [14] and Yagel et al. [33]. We top of the space, and recording each facet with each of the vox- discuss Giertsen’s method in the next section. For details on [33], els that it intersects. By casting a ray in the regular grid, one can we refer to their paper in these proceedings. search for intersections only among those facets stored with each In summary, projection methods are potentially faster than ray voxel that is stabbed by the ray. casting methods, since they exploit spatial coherence. However, projection methods give inaccurate renderings if there is no visi- The FirstCell operation is in fact a “ray shooting query”, for bility ordering, and methods to break cycles are either heuristic in which the field of computational geometry provides some data nature or potentially costly in terms of space and time. log n structures: One can either answer queries in time O ,ata 4+ n cost of O preprocessing and storage [2, 4, 8, 20], or answer 3=4 n queries in worst-case time O , using a data structure that is Our Contribution essentially linear in n [3, 24].

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us