Computer Graphics & Geometry
Sergei I. Vyatkin
e-mail: sivser@mail.ru
Boris. S. Dolgovesov
e-mail: bsd@iae.nsk.su
Alexander V. Yesin
e-mail: esin@iae.nsk.su
Ruslan A. Scherbakov
e-mail: ruslan@woland.it.nsc.ru
Sergei E. Chizhik
e-mail: cse@sx-lab311.iae.nsk.su


Fig. 1.
Surfaces produced by composition of base and deviation function are smooth. Often only few such compositions are needed to construct complex surfaces (Fig. 1. Scene defined by 45 quadrics). 4.2. Scalar shape driving functions The most novel real-time visual systems have terrain-skinning processors, which guarantee continuous level of detail (LOD), change with respect to surface roughness and viewpoint distance. Many terrain-skinning systems use regular terrain elevation grid with square cells. It leads to algorithmic simplicity of computations, database uniformity, and strict definition of relationship between adjacent LOD, which results in database generation simplification. Terrain skins constructed from regular grids are efficient to generate, prioritize, query (for culture conforming) and store. However, features with high spatial frequency context (ridgelines and canyons) require large numbers of polygons to meet a specified level of terrain accuracy. Non-regular terrain algorithms are more complex but have the potential to reduce the number of polygons that the system must process. However, for many terrains with limited elevation gradient, the average expected reduction in the image generator load is small for irregular grid as compared to regular grid. Each irregular grid node consumes much more computational time and memory than that of regular. Systems, which employ irregular grids, are very limited in the number of LODs that can be handled. And it is very difficult to solve problems concerned with terrain deformation when using irregular grid (explosions, pits in the ground).
Fig. 2.
The dream of every simulator designer is to render a terrain as easily as a texture. The algorithm considered below does this (Fig. 2. Mountain landscape without feature texture generated for altitude/height map 64x64). A terrain model is coded as differential height map, i.e. the carrier surface is defined by algebraic means and only deviation from this basic surface is stored in the each node. Such a modeling method simplifies creation of smooth detail levels and shading. The data of height grid is not subject to geometry transformations as the triangle vertices do. The geometry transformations are only required for the carrier surface. During the recursive voxel subdivision on each level, we project the centers of the voxels onto some plane. The computed coordinates, as well as in the case of ordinary RGB texture map, will define address in the so-called “altitude map” or “shape texture” [19]. We calculate the altitude corresponding to this address and a level of details, and use it to modify coefficients of the plane or quadric equation. As a result we will obtain a smooth surface of arbitrary shape modulated with the values from the altitude map. But the problems solved by this algorithm require much more complicated methods within the traditional approach. Indeed, the common way to present terrain with polygons requires an abundance of polygons. Besides, the number of additional problems arises such as high depth complexity, hidden polygons removal, priorities, switching between levels of detail, clipping polygons by the pyramid of vision, etc. Such problems do not appear in the proposed method. The Geometry Processor works with the single plane. The corresponding traversing of the tree and the set of masks provide the right priority order. The backside of a terrain is rejected automatically. The clipping terrain by the pyramid of vision becomes unnecessary since sampling of just required altitudes from the altitude map is provided automatically by the rendering algorithm. To switch between levels of detail the same procedure is used as for the ordinary texture. 5. Definition of volume areas by scalar arrays To visualize semi-transparent structures with internal density distribution, 3D textures, boundary and internal voxels are used during rendering. It is possible to render such structures when they are bounded by non-trivial surfaces. Light penetration through materials and semi-transparency is modeled using color blending. 5.1. Computation of pixel color. In ray casting approach secondary (scattered and refracted) rays are not traced to increase computation speed. In this aspect ray casting differs from ray tracing. We also do not trace secondary rays when modeling light penetration through semi-transparent environments. Reflected rays and attenuation is taken into account in our lighting model. Computation of pixel color is done by formula [20]:
,
is final pixel color,
is either r, g or b (i.e. red, green or blue),
is intensity computed in n-th voxel by Phong model,
is the transparence (opacity) of n-th voxel.
is reflected light at the first point on a ray,
is the background color and
. Accumulation threshold test: if on k-th step summed transparency
is less than
, then all voxels after k can be discarded.
5.2. CSG set operations for volumes
In case when there are several semi-transparent objects composed as union an object priority for overlapping is introduced. Union of several objects when at least one of them is semi-transparent differs from union of opaque objects (Fig. 3. The objects with different priorities overlapping). If the first object of two has greater priority then for union operation it is drawn over the second object. When more than one object is found in voxel then voxel is assigned attributes (color, transparency) of the object with higher priority.

Fig. 3.
5.3. Considering perspective for transparency computation Described algorithm renders only parts of objects which are inside cube, in [21] an algorithm was implemented, that applies perspective transformation, which generalizes described algorithm for pyramidal volumes. It allows one to synthesize images with perspective. To take into account perspective it is necessary to make correction to algorithm of pixel color computation. Voxel sizes after geometry transformation of primitives depend on Z coordinate. The more Z is the more voxel is, so when color is computed voxel transparency is recomputed taking into account change of voxel depth. 5.4. 3D Texture When surfaces are semi-transparent free-form surfaces are used to bound 3D texture (Fig.4. Semi-transparent lid defined by 4 quadrics and filled by 3D-texure). In general 3D texture in this case can be considered as separate object returning in all space positive result when requested about intersection. Mapping texture to object can be seen as intersection of the object with texture object, color and transparencies are taken not from object attributes but from texture map.
Fig.4.
Texture is generated at visualization time using three-dimensional density map. Transparency of elements is computed depending on density value and normal to iso-surface (Fig.4.Cylinder with 2 oval shells, normal is needed in lighting model) is computed as density gradient [20]. For applications with high frame rate (real-time visualization systems) efficient antialiasing is required. To accomplish this 3D variant of mipmapping technique should be used as well as quadrolinear interpolation for texture filtering. Important property of algorithm should be an ability of fast rendering anisotropic and pseudo-anisotropic objects for which it is not necessary to scan volume down to the last recursion level, but anisotropic areas should be skipped along z-coordinate, colors and transparency are computed immediately - visualization of atmospheric effects – 3D-clouds, smoke, fog (Fig. 5).
Fig. 5.
6. New rasterization technique Along with possibility to rasterize 2D space, the main feature of the Voxel Volumes visualization system is rasterizing made by 3D-space quadtree subdivision of pyramids of different levels, which constitute the whole pyramid of vision. Then a pyramid of the lowest level is binary-tree subdivided into voxels of the lowest level - Recursive Multilevel Ray Casting (RMLRC). In the latter case extent space regions (in depth) can be masked out. The technique of RMLRC allows determining an intersection of a ray (pyramid) of any level with a surface effectively. It is also suitable for fast culling of a spatial region outside an object. The core of this approach is effective search of volume elements (hereinafter voxels), involved in current frame generation, fused with direct projection. In other words, we traverse scene space (unit cube) by quad-tree, leafs of which (slices) is a roots of the binary subtrees. Analyzing mutual location of i-level cell Vi and object, we can differentiate the following cases: Vi is outside the object. All screen space corresponding to Vi is omitted from further consideration. Vi is inside the object, that is, all Vi voxels belong to the object. Vi is called “intersected” and is subdivided into cells of (i+1) level. New cells should be analyzed further. Identification of “inner” cells on the each step of subdivision can be used for masking or filling 3D texture.
Fig. 6.
6.1. Transformation of coefficients to local coordinates of cell Vi during subdivision of Vi-1 Quadric object is base for building all other objects. Its surface is zero level surface of quadric three-dimensional function, i.e. function of its surface is defined in non-explicit form using ten quotients (A, B, C, … K): Q(x,y,z)= Ax2 + By2 + Cz2 + Dxy + Exz + Fyz + Gx + Hy + Iz + K = 0, where x, y è z are spatial variables. It is possible to write this equation in matrix form:
The space in which the algorithm subdivides cubic volume is called further work or model space. M will denote this space further. Now introduce coordinate system immediately related to real space metrics (viewer or camera coordinate system). Four planes and depth of view field define viewing frustum in this space. Frustum volume is called pyramidal volume and denoted by P.
If geometry transform is represented by matrix C then new, transformed, matrix of quotients Q’ = CT * Q * C is applied in space M according to matrix Q in space P.
In particular on each subdivision step along quadtree, when scaling by 2 and shift by ±1 along two coordinate axes is performed, recursive transformation of quadric quotients looks like:
A’=A/4, B’=B/4, C’=C, D’=D/4, E’=E/2, F’=F/2,
,
rewritten equation 1
,where
,
condition:
(1)


and
if
then
,
because F(e =0) = F0 = | f(0,0,0) | > 0 (2)
F(e ) decreases when
, besides Fd > 0. Since F(e ) > 0 for 0 < e < d d , we obtain sufficient condition of not having zeros in V((0,0,0),e ) for f(x,y,z). Since F(e ) > 0 when e = 0 it is sufficient to test sign of F(e ,e =d ). If following condition is true then f(x,y,z) has zeros in V((0,0,0), d ):
Û
(3)
In case of unite area, V((0,0,0), d =1), we obtain condition: “module of free member compares to sum of modules of other coefficients”.
6.3. Determination of Vi cell position
Intersection test for base quadric is performed as follows:If K+R<0 and (|A|+|B|+|C|+|D|+|E|+|F| +|G|+|H|+|I| < -(K+R)) then slab is outside;
or C*M=P, where C is the transformation matrix, (M) are homogenous coordinates of point in M space, and P are corresponding coordinates in P space.
Many military simulator applications require the generated image to be free of distortion regardless of where in some allowable volume the pilot’s eyepoint lies. Since the distortion mapping is in general different for each eyepoint, some means of locating the eyepoint is necessary. A head-tracking device fitted to the pilot’s helmet is the usual solution. A more difficult problem lies in determining what the distortion mapping looks like from each viewpoint and inverse mapping. To perform correction for changing eyepoint in a spherical dome, extra computations are required.
This approach takes into account dynamic correction of projection system distortion.
Viewing frustums, which form distorted spherical object space, intersects orbits around viewer (360 degrees in all directions).
Simulators require efficient processing large databases describing modeled environment in real time. Algorithms that solve correctly tasks in this application area can be defined as algorithms of visualization of open database. Term open database means that whole data base does not fit in view field. New and promising arm systems make principally new requirements to computer image generators (CIGs) used in simulators for environment synthesis [1]. Most complicated tasks are low height flights following terrain, officer staff training, helicopter pilot training etc. Design of new CIGs require solution of such problems as:
11. References
Computer Graphics & Geometry