Abstract:
Method and apparatus for rendering data for display. The data represents a model space and the method includes the following steps. A first step associates individual points in the model space with individual vertices (V) of an irregular grid cell enclosed by faces. Each of the points has an associated luminosity value and an associated opacity value. A next step orders the faces of the grid cells. The faces are preferably ordered by depth referenced to a view plane. A further step processes individual faces for determining, for all viewing rays that project from pixels on the view plane and that intersect the face being processed, an amount of light arriving at the pixel. The amount of light arriving at the pixel is a function of both the luminosity and the opacity of a grid cell that lies adjacent to the face and through which the viewing ray passes.

Description:
CROSS-REFERENCE TO A RELATED PATENT APPLICATION 
     This patent application is a continuation-in-part of U.S. patent application Ser. No. 08/156,873, filed Nov. 23, 1993, which is a continuation of U.S. patent application Ser. No. 07/690,034, filed Apr. 23, 1991 (abandoned). 
    
    
     FIELD OF THE INVENTION 
     This invention relates generally to image display apparatus and method and, in particular, to an object-based method and apparatus for rendering volumetric data that is represented within an irregular grid. 
     BACKGROUND OF THE INVENTION 
     Volume rendering is a known technique for visualizing three-dimensional space-filling, or volumetric, data. In general, volume rendering assigns to each point within the volume of data an opacity and a luminosity. The opacity and luminosity are assigned as some function of the data value at that point. Subsequently, there is produced an image of the resulting imaginary solid translucent object. By proper choices of colors, opacities, and viewing directions a visualization and, hence, an understanding of the data may be obtained. 
     Traditionally, most applications have operated with data sampled onto a uniform or regular grid, such as medical computerized tomography images. Volume rendering of regular grids is readily accomplished by compositing successive layers of volume elements, or voxels, to obtain an image. However, many scientific simulations are accomplished with irregular grids, in which the volume of interest is divided into a space-filling mesh of cells where the data values are computed only at the vertices where the cells meet. Data values within a cell are interpolated from the data values at the vertices of the cell. As one example, and as illustrated in FIG. 9, an irregular grid comprised of cells 1 may be employed for modelling airflow over a curved surface of an aircraft wing 2. The grid is made irregular by conforming the grid to the surface under study. Of course, this is but one example of an irregular grid structure. 
     The relatively simple compositing method does not apply to rendering such irregular grid data because the thickness of each cell, as viewed from each pixel at the image plane, must be taken into account in forming the image. Rendering such irregular-grid volume data currently requires either resampling the data on a regular grid or using a ray tracing technique. 
     Unfortunately, neither of these conventional approaches provides an optimum rendering solution. Resampling and rendering the data onto a regular grid typically greatly increases the number of data points to be processed. Ray tracing is also a computationally expensive technique in which imaginary viewing rays are projected out from the image plane. The luminosity and opacity are computed at each cell, taking cell thickness into account, and are then integrated along each ray. 
     The following U.S. patents are cited for showing conventional regular grid volume rendering systems. 
     U.S. Pat. No. 4,866,612, issued Sep. 12, 1989, entitled &#34;Imaging System Including Means to Provide A Display Image with Shadows and Three Dimensional Perspectives by a Combination of Voxel and Surface Method&#34; to Takagi et al. relates to displaying surfaces derived from a volumetric regular grid. 
     U.S. Pat. No. 4,827,413, issued May 2, 1989, entitled &#34;Modified Back-To-Front Three Dimensional Reconstruction Algorithm&#34; to Baldwin et al. describes a method for displaying opaque solids defined by a volumetric regular grid. 
     U.S. Pat. No. 4,719,585, issued Jan. 12, 1988, entitled &#34;Dividing Cubes System and Method for the Display of Surface Structures Contained within the Interior Region of a Solid Body&#34; to Cline et al. renders a surface defined by a threshold value on a regular volumetric (parellelopiped) grid. 
     U.S. Pat. No. 4,835,688, issued May 30, 1989, entitled &#34;Three-Dimensional Image Processing Apparatus&#34; to Kimura renders a surface defined by a threshold value on a regular volumetric grid. 
     U.S. Pat. No. 4,821,210 issued Apr. 11, 1989, entitled &#34;Fast Display of Three-Dimensional Images&#34; to Rumbaugh extracts a surface in the form of a set of triangles directly from volume elements. Specific mention is made of extracting polygonal surfaces from cubes. 
     U.S. Pat. No. 4,729,098, issued Mar. 1, 1988, entitled &#34;System and Method Employing Nonlinear Interpolation for the Display of Surface Structures Contained Within the Interior Region of a Solid Body&#34; to Cline et al. extracts a surface in the form of a set of triangles directly from the volume elements. This patent also considers only regular grids and has disclosure directed to extracting polygonal surfaces. 
     An article entitled &#34;Chem-Ray: A Molecular Graphics Program Featuring an Umbra and Penumbra shadowing Routine&#34; by J. W. Lauher, J. Mol. Graphics, 1990, Vol. 8, March pp. 34-38 uses a ray tracing technique to render shadowed molecular graphics models. 
     Also of interest in this area is U.S. Pat. No. 4,835,712, issued May 30, 1989, entitled &#34;Methods and Apparatus for Imaging Volume Data with Shading&#34; to Drebin et al. This patent describes a method of assigning material opacities to volume elements so as to make boundaries within volumetric data visible. Drebin&#39;s teaching makes mention of storing data in arrays of voxels, implying regular grids. Drebin et al. describe a method for computing opacities and luminosities at each point in the volumetric data, but do not specify how the resulting opacities and luminosities are to be rendered for display. 
     What is not taught by this prior art, and what is thus an object of the invention to provide, is method and apparatus for rendering volumetric data defined at sample points on an irregular grid, such as a mesh of tetrahedra, deformed rectangles, or other non-rectangular volume elements. 
     It is a further object of the invention to provide an object-based, as opposed to a ray-based, method and apparatus for rendering volumetric data defined at sample points on an irregular grid. 
     A further object of the invention is to provide an efficient method and apparatus for rendering volumetric data as if the data represented a solid in space having a specific opacity and luminosity at each point, as opposed to only rendering surfaces derived from volumetric data or to rendering the volumetric data as if it were an opaque solid. 
     SUMMARY OF THE INVENTION 
     The foregoing and other problems are overcome and the objects of the invention are realized by an object-based method and apparatus for volume rendering three-dimensional data defined on an irregular grid, such as scientific or engineering simulation results. In accordance with the invention there is provided a rendering technique in which each face, or border between grid cells, is considered in turn. The visual effect of a cell that lies in front of or in back of the considered face is added to the image. This technique provides a significant speed advantage over the conventional techniques of resampling and ray tracing. 
     In accordance with a method of the invention, and apparatus for accomplishing the method, there is described a method of rendering data, representing a model space, for display. The method includes the following steps. A first step associates individual points in the model space with individual vertices of an irregular grid cell enclosed by faces. Each of the points has an associated luminosity value and an associated opacity value. A next step orders the faces of the grid cells. The faces are preferably ordered by depth referenced to a view plane. A further step processes individual faces for determining, for all viewing rays that project from pixels on the view plane and that intersect the face being processed, an amount of light arriving at the pixel. The amount of light arriving at the pixel is a function of both the luminosity and the opacity of a grid cell that lies adjacent to the face and through which the viewing ray passes. 
     The step of associating includes a step of determining an x, y and z coordinate of the point relative to the view plane and also includes a step of expressing the luminosity in terms of a plurality of colors. 
     The step of processing may be accomplished by processing the ordered faces in order of increasing depth from the view plane or in order of decreasing depth from the view plane. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     The above set forth and other features of the invention are made more apparent in the ensuing Detailed Description of the Invention when read in conjunction with the attached Drawing, wherein: 
     FIG. 1 is a simplified block diagram of a graphics rendering system constructed and operated in accordance with the invention; 
     FIG. 2 shows in greater detail the relationship of a point list and a vertex list that are maintained in the memory of the system of FIG. 1; 
     FIG. 3 shows in greater detail the organization of a face list that is also maintained in the memory of the system of FIG. 1; 
     FIG. 4 depicts a viewing ray, a viewing plane, and their relationship to volumetric data to be rendered; 
     FIG. 5 depicts a face of a tetrahedral grid cell having vertices V1, V2, and V3; 
     FIGS. 6 and 7 depict a ray tracing technique of the prior art; 
     FIG. 8 depicts a viewing ray (r) passing through a plurality of irregular, non-rectangular, grid cells; and 
     FIG. 9 is a diagram that illustrates an irregular grid, of the type processed by the invention, that is applied to a surface of a wing for modelling an airflow pattern. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring first to FIG. 1 there is depicted a rendering system 10 that is constructed and operated in accordance with the invention. System 10 includes a digital bus 12 that couples together a data processor 14, a memory 16, a frame buffer 18 that is coupled to a display means 20, and a display controller 22 having a user entry device, such as a keyboard 24. Preferably the display 20 is a high resolution color graphics display. The processor 14 processes volumetric data that is proved thereto to create a displayable image in an image buffer (IB). The contents of IB are moved across the bus 12 to the frame buffer 18 for display. In accordance with the invention the volumetric data provided to the processor 14 is referenced to an array of irregular, non-rectangular grid cells. By example, the grid cells may be tetrahedral, rectangular, or of any three dimensional polyhedral shape selected for representing the underlying volumetric data to be rendered and visualized. To this end the processor 14 employs a first input list (L1) of points or vertices of the grid cells, a second input list (L2) of elements that specify the vertices of the grid cells, and a third internally generated list (L3) of ordered faces of the irregular grid cells. 
     As employed herein it is assumed that a solid to be rendered has defined at each point a luminosity, expressed as quantity of light emitted per unit of material, and an opacity (or optical density), expressed as a proportion of light absorbed per distance travelled. The opacity is generally an intrinsic property of the material, related in some way to the volumetric data. The luminosity may be intrinsic, that is derived from the volumetric data; or extrinsic, that is due to external lighting or internal shadows or scattering. 
     Before continuing a further discussion of the system shown in FIG. 1 a description will first be provided of the underlying mathematical relationships implemented by the system in rendering volumetric data. 
     Referring briefly to FIG. 4 an amount of light arriving at any point in a viewing plane is determined by integrating the contributions from each point along a viewing ray between a near point z N  and a far point z F . If L(z) and D(z) represent the luminosity and opacity, respectively, at a point z along the ray; the light emitted from each point z on the ray toward the viewing plane is attenuated by passage through the material from the point z on the ray to the point z N . The amount of this attenuation is given by the transparency T: ##EQU1## It should be noted that while D(z) indicates the proportion of light absorbed per distance travelled at the point z; T(z N ,z) indicates the proportion of light transmitted in travelling from z to z N . To a first approximation, 
     
         T(z,z+Δz)≈1-D(z)Δz.                    (2) 
    
     The total amount of light arriving at the viewing plane is given by integrating the light L(z)dz emitted at each point z, attenuated by the transparency T(z N , z) from z to z N . In general, the amount of light emitted toward the viewing plane by a segment of a viewing ray from z N  to z F , or the brightness of that segment, is given by the integral ##EQU2## 
     T and B can be shown to exhibit simple but useful properties. A first property is that the total transparency of two adjacent segments is the product of their transparencies: 
     
         T(a,c)=T(a,b)T(b,c), where a≦b≦c.            (4) 
    
     A second useful property is that the brightness of a segment may be computed from the brightness of two sub-segments according to: 
     
         B(a,c)=B(a,b)+T(a,b)B(a,c),                                (5) 
    
     where a≦b≦c. 
     By applying the properties of T and B from equations 4 and 5 the brightness (B) can be rewritten in terms of the transparencies and brightnesses of each of the segments (z i , z i+l ) as: ##EQU3## Computing B is accomplished by: enumerating the intersections between the viewing rays, originating at each viewing plane pixel, and the faces; at each intersection interpolating to obtain the luminosity and opacity; for each segment, approximating B i  and T i  ; and accumulating the light for each viewing ray according to the sum in equation (6). 
     In accordance with an aspect of the invention this calculation of B is carried out most efficiently by an object-based technique that enumerates faces in front-to-back or back-to-front order, and for each face enumerating that face&#39;s intersection with viewing rays. 
     Let λ denote the accumulated light for any given pixel. For front-to-back order, it is also necessary to accumulate τ, the total transparency of the segments processed thus far. These variables are initialized as: 
     
         λ←0, and 
    
     
         τ←1. 
    
     It should be noted that in the case of a color display there is provided a separate λ, and a separate τ if the material absorbs colors selectively, for each of primary display colors red, green, and blue (RGB). 
     For each segment (z i , z i+1 ) there is computed an estimate B i  for B i  and an estimate t i  for t i  in accordance with: 
     Δz i  ←z i  +1-z i  ; 
     D i  ←linear interpolation between vertices (D i  is D of Z i ); and 
     L i  ←linear interpolation between vertices (L i  is L of Z i ); 
     d i  ←1/2×(D i+1  +D i )×Δz i  ; 
     l i  ←1/2×(L i+1  +L i )×Δz i  ; 
     where d i  and l i  are approximations to the L and D contributions for the i th  cell and are computed by averaging the opacity and luminosity, respectively, that a face supplies, with the opacity and luminosity, respectively, that the last processed face supplies. Also, 
     
         Δd←(D.sub.i+1 -D.sub.i)×Δz.sub.i ; and 
    
     
         Δl.sub.i ←(L.sub.i+1 -L.sub.i)×Δz.sub.i. 
    
     The total transparency of a cell is given by: ##EQU4## where the latter approximation is derived from a truncated Taylor series. 
     The total brightness, taking into account opacity, is given by: ##EQU5## where the latter approximation is also derived from a truncated Taylor series. 
     As was stated, the computation of the brightness may proceed from front to back, in which case for each segment λ and τ are updated by 
     
         λ←λ+τ×B.sub.i 
    
     
         τ←τ×t.sub.i, 
    
     or the computation may proceed from back to front, in which case only λ is needed: 
     
         λ←λ×t.sub.i +B.sub.i. 
    
     While the front-to-back computation may appear to require more processing time, it has the advantage that the processing can be stopped when the accumulated transparency reaches a small enough value that further contributions are inconsequential. 
     As indicated in FIGS. 6 and 7, in relation to the regular grid compositing method of the prior art, a volume rendering computation requires accumulating, along the viewing ray that corresponds to each pixel, the light scattered from each piece of the volume that is attenuated by passage through the volume between the light emitting portion and the viewer. Regular grid volume rendering is easily accomplished by &#34;compositing&#34; successive layers of the volume. 
     By example, let L r  be the amount of light arriving at pixel r along the viewing ray associated with that pixel, and let l r ,i and o r ,i represent, respectively, the luminosity and the opacity of the voxel where ray r intersects slice i. 
     The well-known compositing algorithm for regular-grid volume rendering can be summarized as computing all the L r  by: 
     for each viewing ray r 
     L r  ←0 
     for each slice i of volume 
     for each voxel v in the slice 
     compute viewing ray r that intersects v 
     compute l r ,i and o r ,i 
     L r  ←L r  ×(1-o r ,i)+l r ,i 
     However, as illustrated in FIG. 8 irregular grid volumetric data is typically represented as a three-dimensional mesh of space-filling polyhedra, or cells. Data values are known at the vertices of each cell, and can be interpolated from these vertex values to give data values throughout the volume of the cell. In the ray-tracing approach, volume rendering is accomplished by stepping along each ray from cell to cell, accumulating the light emitted by the volume as the ray passes through the cell, and attenuating the already accumulated light. 
     By example, let L r  be the amount of light arriving at pixel r along the viewing ray associated with that pixel, and let l r ,i and o r ,i represent respectively the luminosity and the opacity of the ith cell of the mesh that ray r intersects. 
     The known ray-tracing algorithm for irregular-grid volume rendering considers each ray r in turn and computes L r  for that ray by: 
     For each viewing ray r 
     L r ←0 
     sort cells that ray r intersects 
     for each cell i that ray r intersects 
     compute o r ,i and L r ,i of cell i 
     L r  ←L r  ×(1-O r ,i)+l r ,i. 
     In contradistinction, the object-based approach that is a feature of the invention proceeds by computing L r  by rearranging the above computation so that the outermost loops consider each object in turn (hence object-based) in accordance with: 
     sort cell faces 
     for each viewing ray r 
     L r  ←0 
     for each cell face i 
     for each viewing ray r that intersects 
     face i 
     compute o r ,i and l r ,i of the cell 
     behind face i 
     L r  ←L r  ×(1-o r ,i)+l r ,i. 
     One significant advantage of the object-based technique over the ray-tracing technique is that the computation of the intersection between the rays and the cell faces may be rapidly accomplished. This is because each cell face is examined in turn and all ray intersections with the face are computed together, allowing for some portion of the intersection computation, such as a set up portion, to be shared between rays intersecting the same cell. A second advantage is that the general object-based approach is similar in some respects to the approach used in modern high-performance graphics systems for drawing conventional surface-based models, allowing this volume rendering approach to be more easily and completely integrated into such systems. For example, the ray-cell intersection computation may be accomplished in the same manner as that used for traditional surface rendering. The face-based orientation of the algorithm allows opaque and translucent surfaces, as well as volumes, all to be rendered together in the same image. 
     Referring to FIG. 5 there is illustrated a face (F) of a tetrahedral cell having vertices V 1 , V 2 , and V 3 . Associated with each vertex are a number of parameters including a depth (z) from the viewplane, RGB color information corresponding to the luminosity, and a value corresponding to the opacity (Op). Between vertices the data values are determined through a linear interpolation technique. 
     Referring to FIGS. 2 and 3 there is illustrated in greater detail the organization of the data structures, or lists L1, L2, and L3. In FIG. 2 it is seen that the list L1 stores a plurality (1-n) of points corresponding to vertices of the faces of the grid cells. Each entry includes x, y, z positional data, relative to the viewplane, RGB color information (luminosity) and the associated opacity (Op). L2 is a list of elements that specify the four vertices (V 1  -V 4 ) for each tetrahedral cell (1-m). It should be realized that for other cell geometries more than four vertices may be required. Each of the four vertex entries for a given cell stores a vertex identifier and a pointer to one of the entries of L1. These pointers are indicated schematically by the arrows designated P in FIG. 2. As can be seen, some of the points in L1 may be referenced by more than one vertex in L2, that is, certain of the vertices may have identical positional, luminosity and opacity values. By this technique, the position, luminosity (RGB), and opacity of each cell vertex is defined and represented. It is noted that in a conventional regular grid-based system, wherein all cell axes are orthogonally disposed relative to one another, that the list L2 is not required in that the vertices are implicitly defined. 
     Referring to FIG. 3 there is shown a portion of the list L3 that is constructed by the algorithm during the process of rendering. By example, for a tetrahedral grid cell having vertices identified by (5, 8, 13, 22) the faces are defined by vertex identifier triplets (5, 8, 13), (5, 13, 22) etc. The faces are ordered in the list L3 by depth (z) from the viewplane. For the front-to-back method of processing the faces, the faces are ordered in L3 from closest to to farthest from the viewplane. For the back-to-front method of processing the faces, the faces are ordered in L3 from farthest from to closest to the viewplane. 
     Sorting of the faces along the z-dimension may be accomplished by several techniques. For example, sorting of the faces along the z-dimension may be accomplished in accordance with a known technique that uses a simple ordering by the centroid of each polygon, as described by F. C. Crow at page 12 of &#34;A More Flexible Image Generation Environment&#34;, Computer Graphics, Vol. 16, No. 3, pps. 9-18 (July 1982). 
     Also by example, the faces may be sorted according to z-value based on the average of the z-values of the vertices of the face. 
     Further by example, the faces may be sorted according to z-value based on the z-value of an arbitrary one of the vertices of the face. This may result in an inaccuracy because occasionally faces can be mis-sorted by these methods. However, this inaccuracy has generally been found to be negligible because it is infrequent, and because mathematical analysis of the methods shows that the mis-sorting approximately cancels out. In other words, the effect of mis-sorting is negligible. 
     For example, let A, B, C, and D be the intersections of four successive sorted faces with a viewing ray. The correct opacity calculation for this pixel effectively adds the contribution of segment AB, the segment BC, then segment CD, because the faces are processed in the order A, B, C, and then D. However, if faces B and C are sorted in the wrong order then the opacity calculation for this pixel effectively processes segment AC, then segment CB (with a negative delta z), and then segment BD. But the negative delta z for segment CB causes the calculation to approximately &#34;undo&#34; the BC portion of segment AC, making the calculation effectively approximately equal to processing segment AB followed by segment segment BD. This is approximately equal to processing segment AB followed by segments BC and CD. 
     During operation, the processor 14 accesses the faces in L3 and processes them sequentially in accordance with the method described above to treat all rays that intersect the face. While processing the faces the processor 14 constructs a displayable image in the image buffer IB, the displayable image eventually being provided to the frame buffer 18 for display upon the display 20. 
     Although described in the context of a color display system it should be realized that the teaching of the invention also relates to black and white display systems. Also, it is within the scope of the invention to associate a separate opacity with each color for simulating the effect of preferentially attenuated light. Furthermore, the system embodiment disclosed in FIG. 1 is but one suitable embodiment for practicing the method of the invention. 
     Thus, while the invention has been particularly shown and described with respect to a preferred embodiment thereof, it will be understood by those skilled in the art that changes in form and details may be made therein without departing from the scope and spirit of the invention.