1Introduction Blanking (Hidden Surface removal) is the elimination of invisible lines and polygons in a certain direction of observation. Sometimes also known as visibility testing. Although various blanking algorithms have little difference in visibility testing and non-meeting elimination methods. However, these blanking methods can sometimes be collectively referred to as non-meeting elimination. Abbreviation for blanking. In the three-dimensional modeling technology, realistic graphics display, consider the scene of the display, as well as in the terrain. In the drawing of the map. Blanking plays a vital role. Therefore, it is necessary to study and implement the blanking algorithm, and to improve the speed of the blanking algorithm according to the complexity of the scene and the scene of various application fields, it is shown to the whole three-dimensional graph. The display of realistic graphics and the display of various topographic landforms is very meaningful. According to the algorithm of surface blanking, the method of eliminating implicit algorithm can be divided into two kinds: one is to study the method of blanking. (1) The research of the existing blanking algorithm. There are several commonly used surface blanking algorithms: Z-buffer algorithm, scan line algorithm, painter algorithm, BSP tree algorithm, the main difference is that they have different blanking space, meeting test method and invisible elimination method, so they can apply different range. In the third part, we analyze and compare these blanking algorithms from the characteristics of each algorithm, the blanking space, the efficiency of sorting and the limitation of the scene. (2because of the different blanking algorithms, they are applicable to different scene types and complexity, so some are specifically used for terrain, map mapping, convex multi-body blanking, complex body blanking, a form of representation of the scene of the hidden, surface blanking algorithm research. (3the new method of blanking and the improvement of the existing algorithm by different methods are studied to improve the blanking speed. such as tree structure blanking algorithm, improved scanning line algorithm, BSP tree method in the radiation display, the BSP tree method added to the hierarchical Occlusion graph (HOM) algorithm, BSP tree method combined with image cache (Sprite) algorithm. Can improve the efficiency of drawing drawing in different degree. For the BSP tree to be added to other algorithms can improve the efficiency of other algorithms, this article will be compared in the third part. The other is to reduce the number of scenes to be processed in the field of view to achieve the purpose of accelerating the blanking process. The hardware Z-buffer algorithm is the most commonly used real-time graph rendering algorithm, although its linear complexity is O (n) (n is the number of patches), but the algorithm because of the spatial coherence of the scene, it is necessary to draw the scene surface piece regardless of whether it is hidden. Therefore, for highly complex scenes, the hardware Z-buffer algorithm is still difficult to achieve real-time. The key to solve this problem is to reduce the number of scenes in the complex scene to be drawn in real time N. There are currently two ways to reduce the number of patches to be processed in the viewshed: (1) a fast blanking algorithm based on spatial coherence. This algorithm does not simplify the scene geometry, but makes full use of the visibility and invisibility coherence of the scenery space, the image space and the time domain to eliminate the obscured scene patches. Hierarchical occlusion graph algorithm and hierarchical z-buffer algorithm are typical representative of this kind of algorithm. Both algorithms organize the scene space into hierarchical structure, and decompose the visibility of the patches into the depth sorting and the overlap test of the screen bu two processes. The algorithm introduces the deep Z-cone to achieve a fast conservative ordering, and the image cone is used to accelerate the overlap test of the patch, and the introduction of these two hierarchies makes it possible for fast culling to be met. Thus, the drawing complexity of the subsequent hardware Z-buffer algorithm is greatly reduced. Furthermore, the use of visibility coherence in the time-domain ensures that the z-cone and image cone have an excellent initial condition, which provides an important guarantee for fast rendering. This type of algorithm is very effective for scenes with high occlusion rates due to the spatial coherence of the development of invisible landscapes. However, there is no advantage to complex scenarios where occlusion complexity is not high and can not be achieved in real time. (2) based on the level of detail of the graphic rendering technology. This algorithm is based on visual characteristics. The geometric simplification of the scene farther from the viewpoint can be achieved to reduce the complexity of scenes. or using other geometric methods to simplify the whole scene patch to reduce the number of scene patches. This method greatly reduces the complexity of the scene. Improves the speed of the drawing scene, but for highly complex scenes. Scenes that have been geometrically simplified may still not be drawn in real time. Texture simplification techniques developed in the middle of the 90 have solved these problems better. The typical representative is Shade's image cache technology, which combines the advantages of geometric simplification and image-based rendering techniques. The algorithm first organizes the scene into a BSP tree. When roaming, the algorithm automatically determines whether the scene in each node in the BSP tree satisfies the error requirement of texture simplification. The image is taken as a texture in the cache. Map it to a space quadrilateral surface: To replace the geometry in the node to draw the domain polygon: Otherwise, the geometry is used to draw it directly. Obviously, this kind of dynamic image simplification technology greatly reduces the complexity of the scene. Thus, the drawing efficiency is improved. However, since the algorithm adopts the backward-forward rendering method, it cannot accelerate the blanking process by using the non-visibility coherence of the foregoing. Therefore, Cheng, Bao and so on are combined with hierarchical occlusion diagram and image caching algorithm. A fast blanking algorithm for complex scenes based on spatio-temporal coherence and geometric simplification is proposed, which can be suitable for real-time rendering of various complex scenes. The efficiency of drawing drawing is improved and the blanking process is accelerated. 2. A method to study the hidden algorithm2. 1 from the blanking space, the analysis of blanking space is an important aspect of the efficiency analysis of the cancellation algorithm. Because this can be used to classify the hidden algorithm, and to improve the efficiency of the blanking algorithm to lay a good foundation. According to the space of blanking, the algorithm can be divided into three main categories: (a) Object space method (Ray projection Roberts): The object is the user to define three-dimensional space. That is, the world coordinate system space. It is the space in which the three-dimensional form has not been projected into a two-dimensional space. Object Space method is the use of three-dimensional environmental information or three-dimensional view (mainly using three-dimensional observation coordinates, and sometimes use three-dimensional world coordinates) to eliminate hidden polygons. That is to judge which surfaces are visible and which surfaces are not visible, according to the geometric relations of the three-dimensional models of each object in space. (b) Image space method (Z-buffer, scan line, Warnock): Image Space is a two-dimensional projection of three-dimensional graphics to the space, that is, what we call the screen space. Image Space method is a two-dimensional display graph based on three-dimensional model of object (using two-dimensional display coordinates) to determine the distance between an object or a surface and the point of view, thus determining which surfaces cover the other surfaces. (c) Object space and image space blanking algorithm (painter algorithm): In the object space pre-juice to calculate the visibility of the surface priority, and then in the image space to generate a hidden map. In theory, an object space method is an object that must be compared to other objects in space to determine whether it is visible. If there are n objects in the picture, then the calculation of the comparison operation is n times. The image space method is the decomposition of each object's projection into pixels, and the comparison between pixels. If each object is projected with n pixels. Then the comparison calculation amount is n~n times, N is large, but pixels are relatively simple. The practical blanking algorithm usually uses the object space method and the image space method together. First Use the Spatial object method to delete a portion of an object that is not visible, and secondly, to compare the remaining faces with an image empty question method. This can improve the efficiency of the blanking algorithm. 2. 2 to study a blanking algorithm. You need to know the basic elements of each of these algorithms. This can be a more thorough understanding of the algorithm, to study the algorithm. For each blanking algorithm, it can be studied from the five aspects that they share with each other. Because each blanking algorithm can be seen as a collection of five tuples. i.e.: HA=(I,o,d,p,s), wherein: HA is an blanking algorithm I is a collection of three-dimensional objects to be hidden processing: O is a collection of two-dimensional objects that are hidden: D is the data structure used for blanking processing; P is a collection of basic operational procedures required for blanking, mainly including: classification, Sorting, three-dimensional coordinate transformation, perspective projection transformation, the calculation of intersection between basic graphic elements, two area overlapping judgment, point and region inclusion test, face orientation test S is the blanking strategy, that is, the order of the basic operation process in P. Blanking algorithm is different, mainly in D,p,s, for D (the data structure used in the blanking processing), such as AET in the scanning line algorithm, APT can speed up the scanning speed, BSP tree algorithm is the use of two fork tree to divide and display the scene, are to speed up the blanking speed; for P (classification, sorting, inclusion testing, Visibility test), the algorithm is different. The methods are also different, S (the order in which the basic operations are used in P), according to the different application needs, the scene type to design. Therefore, the design of blanking algorithm should consider the above five elements and their relationship, in the improvement of these five basic elements to start to improve the speed of the algorithm. And in the field of application should also consider these five basic elements to proceed. 3. The comparison of several common surface blanking algorithms is that the object of blanking is three-dimensional form, and the result of blanking is not only related to the shape of three-dimensional form, but also to the direction of observation. The efficiency of blanking is determined by many factors. In addition to the algorithm itself, there are: the complexity of the scene, to show the type of object, the available equipment, and to show whether the screen is dynamic or static, and so on. These factors determine the type of blanking algorithm to be chosen, and also determine the efficiency of the blanking algorithm. In the same device, to display the picture is static, the following is a few commonly used blanking algorithms: Z-buffer algorithm, scan line algorithm, painter algorithm, BSP tree algorithm, from the different scene complexity, blanking space, sorting efficiency, the object type of restrictions on the introduction of the court these aspects to compare:3. 1 from the algorithm features to compare: Z-buffer algorithm pixel-level with distance from the observer near the object to replace the distant object, the appearance of the object on the screen is irrelevant, the algorithm is simple. To facilitate hardware implementation. The multiplicity of single initial values, the finite complexity O (n), and N are the number of polygons in the scene. There is no need to sort the polygons in the scene, while the scanline and painter algorithms use a slightly more complex sorting algorithm than ZThe-buffer algorithm is difficult to implement. therefore Z-buffer algorithm hardware is easy to implement, and has been widely used. But the z-buffer algorithm needs a lot of storage space, when the depth of the painting complexity is: s=d,fl=A is a waste of time, the z-precision of the error is high (at this point must be sampled). Its biggest drawback is that two cache arrays consume too many storage units. Therefore, to improve the Z-buffer algorithm, only set a depth cache variable ZB, frame buffer (CB array) to store the color value of each pixel, which can greatly reduce the storage unit. It can also be improved by using scan line correlation and point correlation. In addition, the speed of the Z-buffer algorithm relies on the number of polygon patches in the scene. Instead of the number of polygon patches visible to the observer in the scene. Compared to the z-bufer algorithm. The scan line Z_buffer algorithm made two improvements: (1The blanking problem in the entire drawing window is resolved on a single scan line, so that the required Z-buffers are greatly reduced. (2When calculating the depth value, the polygon coherence is used, with only one addition. But it calculates the depth value at each pixel, making a deep comparison. The scan line algorithm. The pixel area covered by multiple polygons is also calculated several times, and the amount of computation is still very large. The interval scan line algorithm overcomes this flaw, allowing only one depth value to be computed per interval on the strip scan line, and no z-buffers are required. It is after sorting the current scan line with the intersection of each polygon at the projection plane projection. Divides the scan line into several sub-ranges. Therefore, whenever you find a polygon with the largest z-value at any point in the interval, each pixel on the interval is displayed with the color of the face. The disadvantage of the painter algorithm is that it can only handle disjoint faces. Also, the order of polygons in the depth priority table may be faulted. In the case where two faces intersect and more than three polygons overlap, the correct order cannot be discharged by any sort method. At this point only the relevant faces are split and then sorted. Furthermore, in the painter algorithm, the depth sort is computationally large, and after sorting, the adjacent faces need to be checked again to ensure that the former is in the depth priority table and the latter is behind. When polygons intersect, or polygon loops overlap, you must split the polygons, sort them, and then display them. The Z-buffer algorithm and the scanning line algorithm can avoid this problem. However, the disadvantage of the scanning line algorithm and the Z-buffer algorithm is that the invisible polygon patches are also drawn, which results in unnecessary time-consuming in the drawing process. Because the hardware acceleration z-buffer algorithm is too slow, the BSP tree algorithm is proposed. The BSP tree is a data structure that divides the space into smaller parts. Only the relative position of the polygon patches in space is stored, so that after the polygons are sorted in the scene, you will always draw from the back forward, which means the minimum Z-value of the multilateral opening of the final picture. When a polygon is sorted in other ways, the polygon closest to the viewpoint is finally plotted, such as the painter's algorithm. But it will rarely be as frugal and convenient as the BSP tree. Because the polygon sort is pre-processed in the BSP tree method, it does not take a run time. The BSP tree method is an extension of the painter's algorithm. But because of the disadvantage of the painter's algorithm is the case of the cross-polygon, then the polygon will not be correctly plotted. and polygon sorting is computationally time-consuming, and the algorithm is more complex. Therefore, the BSP tree algorithm uses its storage structure to optimize the polygon sorting process, so it is faster than the painter algorithm, especially the high complexity of the scene. In addition, we can place the bounding box data of the scene in each level node of the BSP tree. Thus it can form the hierarchy bounding box structure of the scene, which is advantageous for accelerating intersection (such as ray Tracing algorithm) and the field clipping algorithm. While BSP Tree algorithm also plays an important role in the calculation of the degree of radiation, the application of the BSP tree to the radiometric algorithm or other algorithms can be achieved to accelerate the algorithm itself, the general emissivity algorithm, the worst case is that each ray and the scene of the relevant polygon will be measured O (n). n is the number of patches in the tree. And with BSPWhen the-tree algorithm is optimized for processing, it reduces the amount of elapsed time. As to how much to reduce depends on the structure of the tree. This effect of the Bsp-tree algorithm can also be introduced into the HOM algorithm. In the sprite algorithm, this can reduce the elapsed time for the rendering of scenes with high complexity. Accelerated the blanking process. In this paper, the scene of 157,542 triangular patches with complex degree is tested. On an SGI Octane graphics workstation, the CPU is a MIPS R10000 processor. Memory is 128M. Mixi Graphics board, 4M texture memory, after the BSP division, there are 276,708 patches. Test Result: BSP+h0m 0. 657-second BSP+sprite 0. 642-Second BSP+h0m+sprite 0. 581 seconds, Bsp-tree due to its unique structure, it can play a very good accelerating effect in other algorithms. 3. 2 from the blanking space to compare: The complexity of object space algorithm depends on the number of polygon patches, each polygon has a comparison with other polygons, the complexity of n^2(n is the number of polygon patches). Image Space method: Examine each pixel point of the image to detect which faces are plotted at this point, the complexity depends on the number of polygon patches and the number of pixel points, so the complexity is NN, (n is the number of polygon patches, n is the number of pixel points. The scanning line algorithm, like the Z-buffer algorithm, is also an image space algorithm, it can use z-buffer the same run time to produce a picture, but the scanning line algorithm in the buffer only with a scan line of storage, which is easy to accept one of the reasons. Scanning line algorithm is the use of scan line correlation and point correlation, according to the reference, the scanning line algorithm is more effective, and the z-buffer algorithm is faster, and its sequencing is growing at a linear rate. The Painter algorithm (list first algorithm) is an algorithm between image space and object space. The calculation of the priority of the polygon set is related to the position of the viewpoint relative to the split plane, while the slice priority calculation is independent of the viewpoint, so that the calculation of the priority set of the polygon set and the slice is separate from each other, thus reducing the computational amount. Its sorting can also take advantage of the scan line correlation and point correlation, but it is divided when it encounters cross-intersecting polygons, which is more time-consuming, which is the disadvantage of the scanning line algorithm. Painter algorithm method and Scan line method have better effect than z-buffer algorithm in complex scene, Z-buffer algorithm is not good for high complexity scene. The BSP tree establishes a pre-processing process. Only suitable for special scenes. Its run time is used in order to prioritize polygon traversal in the direction of a given viewpoint. Traversal is time-consuming and requires no recalculation, because its preprocessing is a visual independent structure. The relative position of the storage polygon, such as a polygon. Only record it before or after the other polygons, therefore, the BSP tree and its preprocessing can not be hidden processing, only the traversal to be hidden processing. The characteristics of the scene are a series of polygons to compare, such as Polygon P, from the polygon set, the observer is in front (rear) of p, then the polygon P (front) after the other polygons will not obscure it, the same p will not obscure other in its front (rear) polygon. BSP run time, it is good to store the relative position of the polygon, and then run, so that can save time, for example, a given polygon p, in a tree node, may obscure the tree polygon Q, at this time, whether P occlusion Polygon set other polygon Q, then in its child node. 3. 3 Comparing the efficiency of the sorting algorithm: The Z-buffer algorithm is easy to implement, eliminating the need to sort the polygons in the scene, while the scan line and the painter algorithm use a slightly more complex sorting algorithm. The sorting algorithm is more difficult to implement than the Z-buffer algorithm. Therefore, the hardware of Z-buffer algorithm is easy to realize and has been widely used. It takes about N to sort medium and high complexity scenes according to the reference scan line. Painter algorithm in low complexity scene sequencing time is also n, tree structure for the high complexity of the scene time is n,n for processing of the surface. When a polygon is sorted, it is sorted by the Z-value in the smallest image coordinate system of each polygon vertex, or by a pair of edges, which is the smallest y-coordinate value between two points. Sorting depends on the selected object to sort the series of polygons or edges to be processed, and the sorting efficiency relies on the number of objects to be processed. For the various structures of sorting, you can reduce the find, insert. Time to classify, and thus reduce the elapsed time of the entire blanking algorithm. For the literature to know a sort of tree, for the complexity of the scene sorting time is Logn, for the high complexity of the scene, sorted list of sequencing time is also LOGN, therefore, the painter algorithm for the high complexity of the scene, its sequencing time and the BSP tree for the small complexity of the scene is the same. That is, the BSP tree is faster than the painter algorithm. However, the depth of the painter algorithm is computationally large, and after sorting, it is necessary to check the adjacent faces. To make sure that the former is in the depth priority table and the latter is behind. If you encounter polygon intersection or polygon loop overlap. You must also split the polygon. This problem can be avoided by both the Z-buffer algorithm and the BSP tree algorithm. 3. 4 from the limitations of the scene to compare: in the painter algorithm required in the scene polygon requirements are convex polygons: BSP Although no scene of polygons are convex polygons, but in the segmentation process to select a split polygon, the selected polygon must be convex polygon , in addition to the R0mey algorithm in the stroke algorithm requires all polygons are convex polygons, triangular patches, not allowed holes, and other scanning line algorithms are not limited to the scene.
Summary and prospect of blanking algorithm