In the field of Computer Aided Design (CAD), a three-dimensional object is modeled and represented by a surface and a solid. Forming a realistic object on a screen from image data derived from the model is generally called rendering. The three-dimensional display of objects utilizing computer graphics includes modeling and rendering as main processes.
Generally, this rendering process includes shading to take into account subtle changes in shade and color, the tinge of an object, reflections, brightness, any refractions, shadows projected by light sources, any wraparound of light from the periphery, a picture, any transparency or any opacity of an object, or the like, in order to more realistically reproduce the color of the object, similar to a photograph.
In the rendering process, the model of each three-dimensional object is projected from a three-dimensional object space onto a plane of projection for a two-dimensional image space. That plane of projection for a two-dimensional image space is the computer display screen. The model is projected and displayed on a two-dimensional region, that is the computer display screen by a perspective projection from a view point, a central projection from a center of projection, or by a parallel projection from a parallel line of sight from an infinite point. The projections are made in accordance with information on depth direction, also called the “Z-direction,” in such a manner that the screen is painted over with the model.
The model is projected and displayed on the screen so that the screen is painted over with the model, by either of the following methods. (1): only writing (W) the image data of the object displayed in a storage area prepared as a display buffer; or (2): a repeating RMW (read, modify and write) cycle, i.e., first reading (R) the image data stored in the storage area prepared as the buffer or the like; then modifying (M) the read image data; and then writing (W) the modified image data. This repeating RMW cycle is a typical cycle form for “drawing”.
For such a projection, a hidden surface removal algorithm called a Z-buffer algorithm is well known and widely utilized to remove hidden lines and surfaces. Each individual pixel on a computer screen represents a minimum unit of a display plane, each capable of having a color and brightness allocation. In the Z-buffer algorithm, as its name signifies, each pixel preferably has a memory (depth memory) for storing a Z-value, i.e. a distance from the view point, a distance from the center of projection or the like, or the depth information, of the object. The set of pixel memory is preferably organized as a memory array, having a size corresponding to the number of pixels and referred to as a Z-buffer.
The display is produced by painting over the screen in an opaque color by itself while utilizing the Z-buffer algorithm to remove hidden lines and surfaces. However, it is difficult for a user to check an inner portion of a design which is obscured by an opaque object. The Z-buffer algorithm is utilized to display only the opaque object. However, CAD applications also requires a display method where not only the surface but also an inner portion can be simultaneously viewed by semitransparently displaying the object.
One approach for semitransparently displaying the object is to separately draw the surface and the inner portion using a blending approach. In this approach, coefficients A and B are used for the color (src_color) of the object to be drawn and the color (dest_color) of the object that is already drawn, respectively. A new color (color) is determined by color=A×src_color+B×dest_color. In this case, the color (dest_color) of the object that is already drawn is read (R). Then, the color is modified (M) by the color (src_color) of the object that is already drawn. Then, the new color (color) is written (W). In other words, the read color (dest_color) of the object that is already drawn is replaced by the new color (color), so that the new color (color) is displayed. In this case, the modification of the new color (color) is calculated by multiplying the coefficient A and the coefficient B.
Particularly, equation (1) is generally used as a method, sometimes called an alpha blend method, which uses a semitransparent coefficient, alpha (sometimes called an alpha blending rate).color=alpha×src_color+(1-alpha)×dest_color  (1)
Calculating and drawing the new color by using equation (1) is referred to as “blending” as explained in greater detail below. Blending has the following characteristic: On the same point, the object that is later drawn is seen nearer to the view point than the object that is already drawn.
Consequently, an attempt at an accurate semitransparent display of a plurality of objects should cause those objects to be drawn according to some priority. That is, the objects should be sorted in accordance with their distance from the view point of the user (i.e., in accordance with the depth along the depth direction), whereby the priority of an object to be drawn is determined in accordance with the distance from the view point of the user. The objects then are drawn in accordance with their priority.
If the objects are drawn without determining their priority, the relative near and far positions of the objects may appear to be displayed differently from the actual positions. As mentioned above, this is a result of the phenomenon that the object that is later drawn is seen nearer regardless of the relative positions of the objects. This problem also arises when the object near to the view point is drawn earlier and the object far from the view point is later blended with the earlier drawn object.
Thus, seeking a high quality for ensuring a strict perspective drawing for the user needs the strict sorting for the semitransparent display. However, the larger the number of objects to be sorted is, the more the time required for the sorting is acceleratingly needed. In this situation, a processing speed required for the whole graphic is considerably reduced. This is a serious problem. As can be seen from a rough estimate, the number of processing, n×log(n) is generally needed in order to sort a permutation nPn (n denotes the number of objects to be sorted).
The use of this sorting procedure is disadvantageous to an application such as CAD requiring an interactive (interactive or real-time) data editing. More particularly, the sorting of every pixel is required to edit a plurality of free curved surfaces, when one pixel represents one of facets which the curved surface is divided into. Assuming the general screen having 1280×1024 pixels, the decreased processing speed no longer has practical use.
It may be that alpha blending of the objects without completely sorting objects by their distance from the view point may present no significant visual problem for the user. On the other hand, the ability to omit the sorting and thus realize the high-speed processing would be very preferable, because the processing speed is important for the application for the interactive data editing.
It is desirable then to provide a method of semitransparent display which is executable without sorting by multi-pass alpha blending.
USPTO Backgrounds
USPTO Backgrounds