CA2055057A1 - Fast z buffer initialize and update method - Google Patents

Fast z buffer initialize and update method

Info

Publication number
CA2055057A1
CA2055057A1 CA002055057A CA2055057A CA2055057A1 CA 2055057 A1 CA2055057 A1 CA 2055057A1 CA 002055057 A CA002055057 A CA 002055057A CA 2055057 A CA2055057 A CA 2055057A CA 2055057 A1 CA2055057 A1 CA 2055057A1
Authority
CA
Canada
Prior art keywords
block
pixels
value
displayed
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
CA002055057A
Other languages
French (fr)
Inventor
Virgil A. Albaugh
Robert J. Urquhart
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Publication of CA2055057A1 publication Critical patent/CA2055057A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/40Hidden part removal
    • G06T15/405Hidden part removal using Z-buffer

Abstract

FAST Z BUFFER INITIALIZE AND UPDATE METHOD

ABSTRACT

A method is provided for initializing and updating a group of pixels contained on a display in blocks. A
group of pixels is considered as a block and has a status word associated therewith. This status word maintains a running total of the maximum z value of any pixel contained within a group, or block of pixels. In this manner, once a block of pixels is rendered on to the display screen a comparison can be made between the current pixels being displayed and a group of pixels which are to be displayed. The minimum z value of the group of pixels to be displayed is compared with the maximum z value for the group of pixels currently being displayed. If the current maximum z value, as stored in the status word, is less than the minimum z value for the pixels to be displayed, then the group of pixels currently being displayed will all "win" when compared to the pixels in the group to be displayed. Thus, a full block bypass of the group of pixels to be displayed is implemented, thereby saving considerable time and overhead when compared to conventional z buffer systems that compare z values for each individual pixel.

Description

AT9-90--029 1 2a5~7 Desc~E~_n FAST Z BUFFER INITIALIZE AND UPDATE METHOD

~ACKGROUND OF THE INVENTION
This invention relates generally to computer graphics systems and more specifically to initialization and updating of a display z buffer. The z buffer is a depth buffer which holds a value associated with the depth of each pixel on a display screen and is generally used to remove hidden surfaces or lines when rendering 3-D solids on a display. Conventional z buffers include one word associated with each displayed pixel. The present invention is a method of improving both the initialization and updating functions associated with the z buffer. More particularly, pixels are grouped together in blocks and a status word (za~ is associated with each block. This status word contains the maximum value of any pixel within the block. It should be noted that maximum value refers to maximum depth of a pixel within a display screen, i.e. the maximum distance from the eye of a viewer to the pixel.
Conventional z buffers initialize each pixel position individually when clearing the z buffer, and ~pdating the z buffer for new values. That is, at initialization each pixel is set to a z max value such that any new z value will be closer to a viewer of the display than the z max value. Therefore, any subsequent z value will "win" when compared to z max.
To update the z buffer of conventional systems, the existing value in the z buffer for each pixel is compared with the new z value to be written to the same pixel. If the new z value is less than the value currently in the z buffer for that pixel, then the new z value replaces the existing value in the z huffer. In this manner, pixels representing objects closer ~o a viewer of the display are maintained in the z buffer and objects further from the viewer are obscured. If the existing value in the z buffer is less than the new value for the object being displayed then the existing value remains in the z AT9-90-029 2 2 ~ 7 buffer. This procedure is applied to each pixel of each scan converted object until the entire ~cene i5 rendered.

SUMMARY OF THE INVENTION
In contrast to the prior art, the present invention sets the æa word to a maximum z value (z max) such that ~ubsequent z values for each pixel in the block associated with za will win (be displayed) when compared with each pixel in the block under consideration. In other words, instead of setting each pixel to z max only the za word is set to z max and all of the pixels in that block are considered to be initialized to z max. In this manner significant time and overhead is saved when initializing a z buffer. These za words are initially set to a negative value which indicates that the bloc~
has been "logically cleared," which means that actual z values have yet to be determined and written to the z buffer. The present invention utilizes a method which eliminates the need to apply a comparison between a new z value and an existing z value for each individual pixel on a display screen.

BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 shows a display having an associated block of pixels;
Figure 2 is a portion of a display and illustrates three blocks of pixels and a line which intersects a number of the pixels contained within each of these three blocks; and Figure 3 is a flow chart representing the process utilized by the present invention to initialize and update a z buffer;
Figure 4 is a graphical representation of the slope of a line being drawn and its comparison with the status word za;
Figure ~ is a listing of pseudo-code which is an example of one means of implementing the present invention; and 2 0 ~ 7 Figure 6 is a schematic diagram showing a computer graphics system on which the present invention may be implemented.

DETAILED DESCR I PT I ON OF THE PREFERRED EMBODIMENTS
.. ,, _, _ , .,, . . .... , .. _ . . . _ _ _ _ . _ _ _ _ _ _ ~ _ Referring to Figure 1, a display monitor 10, such as a cathode ray tube (CRT), or the like is shown. Display 10 includes a plurality of pixels which when illuminated define an image being displayed. The number of pixels contained on display lO will vary depending on the resolution of the display. With regard to display 10, Yn x Xn pixels are includedS where Yn and Xn are positive numbers which may vary from approximately 400 to 1024. A
block 12 including, for example, 12 pixels (reference numeral 14) is also shown in Figure 1. This group of pixels is representative of a block which will have a status word associated therewith.
Figure 2 illustrates three separate blocks of pixels 14, of display 10, similar to block 12 described with reference to Figure 1. Blocks 1,2,3 each include 32 pixels 14 and are adjacent to one another. For convenience, only the first four pixels and the last pixel (32nd) of each block are shown. Additionally, the frame buffer 22, z buffer 24 and za buffer 26 for each block are schematically illustrated in Figures 2 and 6.
In addition to a z-buffer and frame buffer, the present invention utilizes a za buffer which is a memory capable of storing statu6 information corresponding to each block of pixels. That i5, a memory capable o~ storing a z value for each block of pixels must be provided either by additional memory, or utilization of existing unused memory. It can be seen that the za buffer must be able to store at least one z value for each block of pixels, where the number of bloc~s will be equal to the number of pixels on the display divided by the number of pixels per hlock. The understanding of the present invention, in particular the function of the status word za in maintaining the maximum z value for the blocX, will be facilitated when Figure 2 is taXen in conjunction with the following description.

2~5~0~7 These blocks of pixels will be described as a group of linear pixels along a scan line. However, any block of pixels can be utilized, e.g. if the screen has x rows and y columns then the status word (za) has x/number of pixels per row and y/number of pixels per column. This description will use 32 pixels per block, arranged linearly and parallel to the y axis of a cartesian coordinate system. It should be noted that in practice the number of pixels per block will be selected to maximize performance based on criteria such as cost and hardware utilization. Of course, any number of rows and columns can be used and the pixels do not have to be arranged linearly.
Additionally, in Figure 2, a line 16, (Yl-Y2) is shown which begins within block 1 and ends in block 3.
Thus it can be seen that line 16 includes pixels within each of blocks 1,2,3.
The process of the present invention will now be described with reference to Figures 3a,3b, in conjunction with Figure 2. For the purposes of describing the present in~ention, an example will be used wherein line 16 is to ~e drawn throu~h the pixels 14 of blocks 1,2,3, as shown in Figure 2. It should be noted that the present inv~ntion contemplates other possible configurations of lines and surfaces to be drawn, as well as other configurations of blocks of pixels.
At step 1, the parameters of the block being considered must be initialized. In this example, the Y
values must be extended along the scan line such that all pixels to be ~rawn as line 16 are considered consecutively, independent of the number of blocks 1,2,3, or the like which may contain the line. For example, in blocks 1,2,3 as shown in Figure 2 the Y value is initially set to correspond to the first pixel in the block containing the beginning of the line being drawn, Yl. In t~-is case, Yl corresponds to the third pixel in block 1 and Y2 corresponds to the third pixel in block 3. The line to be drawn between Yl and Y2 includes all o~ the pixels contained in block 2 In order to process this line three bloc~s of pixels need to be considered.

AT9-90-029 ~ 2 0 ~

First, those pixels contained within a first adjacent block (in this case block 1) including those pixels which occur prior to the beginning of the line being drawn, i.e. Y is less than Yl (pixels 1,2 of block 1), and those pixels lying within the line to be drawn, i.e. where Y
is greater than Yl but 12ss than Y2 (pixels 3-32 of block 1). Second, pixels 1 32 of block 2 must be considered when drawing line 16. Third, the pixels of block 3 must also be considered including those pixels associated with line 16 (pixels 1-3), and those pixels not associated with the line, but contained within one of the blocks which has at least one pixel within line 16, i.e. pixels where Y is greater than Y2 must also be considered (in this case pixels 4-32 of block 3).
Additionally at step 1, Ystart is set at the left, or beginning pixel of the block being considered, i.e.
Ystart equals the left most pixel in each block.
Further, Ystop is defined as Ystart plus the number of pixels in the block minus one. In this case, since Ystart is equal to pixel 1, then Ystop equals pixel 32.
Of course, any number of pixels can be used for the blocks, but 32 was chosen to exemplify the present invention an~ should not be considered a limitation. For example, if Ystart equaled one, and 20 pixels were included in the block, then Ystop would be the 20th pixel.
Step 2 considers the pixels belonging to an intersected block being drawn, i.e. all pixels of a block having any pixels which are intersected by line 16. If Y
is not less than or equal to Ystop, then the pixels cannot be included in the block under consideration and the method proceed~ to step 10 and ends. It should be noted that Yætart is defined as being the fir~t pixel in each ~lock of pixels being considered Additionally, Ystop is considered the last pixel in each block. In the example ~tilized with the description of the present invention, pixel 32 of block 1, pixel 32 of hlock 2 and pixel 32 of block 3 are each designated as Ystop (see Figure 2). ~180, as previously noted Yl and Y2 are equal to the end points of the line being drawn, in this case AT9-90-029 6 2035~ 7 the beginning point and end point of line 16 (Yl is pixel 3 of block 1 and Y2 is pixel 3 of block 3). The importance of these definitions, as shown on Figure 2, will become apparent during the following description of the present invention as embodied in the flowcharts of Figure 3a and 3b.
At step 3 it is determined whether the block under consideration is initialized or uninitialized. That is, a determination is made as to whether the pixels contain~d within the block have previously been written to with a z value or are "logically cleared," i.e.
meaning za for the block has a negative value.
Specifically, has the z value for the status words za for each block been set to a negative value thereby indicating the uninitialized nature of the block of pixels? It should be noted that all blocks having at least one pixel contained in the line being drawn are considered by the flowchart of Figures 3a and 3b independently of the remaining blocks (subsequently considered) contained on the display 10 regardless of whether a line or surface to be drawn extends into other blocks.
Again, for the purpose of this discussion blocks 1, 2 and 3 and line 16 of Figure 2 will be considered in conjunction with the flowchart of Figures 3a and 3b.
First it will be assumed the blocks 1, 2 and 3 are uninitialized and during the processing of block 1 the present invention continues to step 4 which de~ermines whether the Y ~alue is less than Yl, which is the starting point of line 16. It can be aeen that pixels 1 and 2 of block 1 satisfy step 4 and the method proceeds to step 5 where the frame buffer for the pixel being considered is written to a background color (since the line has not started) and the z ~uffer and status word ~za~ for the bloc~ are set equal to the z max value.
Thus, the z buffer for the pixel now contains a value such that it is initialized. The status word za is also set to z max such that a "running total" of the maximum z value encountered for the pixels in this block is kept.
It should also be noted that steps 4 and 5 are looped 2~55~

together by incrementing Y at step 5, i.e setting Y equal to Y plus one. In this manner, each pixel is considered successively and steps 4 and 5 are continuously repeated while the requirements of step 4 are met.
When Y corresponds to pixel 3 of block 1 it can be seen that Y is no longer less than Yl and the method proceeds to step 6 where it is determined whether Y is less than or equal to the minimum of Ystop or Y2. Ystop is the last pixel in the block under consideration (block 1), and Y2 is the last pixel in the line being drawn. In this case, Ystop for block 1 is the 32nd pixel of block 1. Therefore, it can be seen that step 6 will be sati~,fied for pixels 3-32 of block 1, i.e. Y will be less than or e~ual to Ystop for these pixels. For each pixel where the requirements of step 6 are satisfied, the present invention proceeds to step 7 where the frame buffer for the first pixel considered is set with a color value (for the line being drawn), the z buffer is set with the z value for the line being drawn and status word za is set to the maximum of the current za value or the current z value such that the running total of the maximum z value for the block is maintained. For each sub~,e~uent pixel considered, the rame bufer is set to the color value of the previous pixel, plus a delta color value, determined through interpolation, or the like.
That is, the frame buffer for each subsequent pixel is set to a color value equal to the previous color value plus the delta color value. Similarly, the z buffer for subsequently considered pixels is set to z (for the previous pixel) plus a delta z value, also determined through interpolation. It can be seen that for the first pixel in each block delta color and delta z will be equal to zero. Therefore, for the first pixel the z buffer is set equal to the z value and the frame buffer for the fir~,t pixel is set equal to the color value. Once again, Y is incremented by setting it equal to Y+l and steps 6 and 7 are repeated for each pixel which satisfies the requirements of step 6 (in this case pixels 3-32 of block 1), i.e. the process loops between steps 6 and 7 during AT9-90-029 8 2 0 ~ 7 the time when Y is less than or equal to the minimum of Ystop, or Y2.
When Y is no longer less than or equal to the minimum of Ystop, or Y2, the method proceeds to step 8 of Figure 3b which determines whether Y is less than or equal to Ystop, which was defined with regard to step 1.
In the current example, the last pixel of block 1 (pixel 32) has been processed, at step 7, and Y has been incremented such that Y=Y+l is not less than Ystop, see step 8 and Fig. 2. Therefore, the method of the present invention continues to step 28 which determines if ~locks are remaining to be proces~ed ~nd if so, the method returns to step 1. It can be ~een that block 1 of Figure 2 has been processed and pixels 1 and 2 have been written with the background color while pixels 3-32 have been written with the line color. Additionally, the status word za for block 1 has been set to the maximum z value which corresponds to any of the pixels 1-32 of block 1.
That is, za is set equal to the maximum z value for any one of the pixels in the block.
Step 1 initializes Ystart for the next block to be considered (block 2) and step 2 determines if Y is less than or equal to Ystop. Step 3 then determines whether the next block to be processed (block 2) i5 initialized or uninitialized. Again, assuming that block 2 is uninitialized for the purposes of this example, the present invention proceeds to step 4 which then determines if Y i6 less than Yl. In this case, for block 2, Y is the first pixel in ~lock 2 and as can be seen from Figure 2, Y is not less than Yl. The method then proceeds to step 6 which determines if Y is less than or equal to the minimum of Ystop, or Y2. Again referring to Figure 2, it can be seen that Y is in fact less than or egual to the minimum of Ystop (pixel 32 of block 2), or Y2. The method then continues to step 7 ~here the status word za for block 2 is set to the maximum value of z, to begin keeping the running total of maximum z value~ for the block. Eor the first pixel in block 2, za will be set to the z value of pixel l and during consideration of subseqllent pixels the status word za will be set with the ATg-9O-029 9 20~50~7 maximum of its current value, or the z value for each pixel satisfying step 6. Additionally, the frame buffer i~ set to the line color determined by the delta color (color = color + delta color), z is set equal to the z value determined by delta z (z = z + delta z) and the z buffer is set equal to z (z buffer is effectively set to z + delta z)~ The pixel being considered is then incremented by Y = Y+l and iterations between steps 6 and 7 will continue so long as the pixels being considered within block 2 satisfy step 6. Therefore, it can be seen that all of the pixels within block 2 are less than or equal to the minimum of Ystop, or Y2 and each pixel within block 2 will undergo the operations set forth in step 7 After pixel 32 of block 2 is processed at step 7 the method returns to step 6 to where it is then deter-mined that Y is no longer less than or equal to the minimum of Ystop, or Y2 since all of the Y values corresponding to the pixels in block 2 have been processed. The method then proceeds to step 8 where it is determined that Y is not less than Ystop and the method continues to ~tep 28 and once again returns to step 1. Thus, after processing of block 2 it can be seen that the status word za for block 2 is set to the maximum z value encountered for any one of the pixels 1-32 contained by block 2, and that each of the pixels 1-32 have been written with the line color for line 16.
Once again steps 1 and 2 initialize and determine if Y is less than Ystop, respectively. Step 3 then determines whether the next block to be processed, in this case block 3, is initialized or uninitialized.
Again, assuming that bloc~ 3 is uninitialized the process continueæ to step 4 where it is determined that Y is not less than Yl, as can be seen in Figure 2. The method then proceeds to step 6 where it is determined if Y is less than or equal to the minimum of Ystop or Y2. It can be seen from Figure 2 that pixels 1, 2 and 3 of block 1 are in fact less than or equal to Y2 and the frame buffer for each of these pixels is written with the line color (color - delta color), the status word za for block 3 is set to the maximum z value correspondiny to any one of AT9-90-029 10 2 0 ~ a ~ ~ 7 pixels 1-3 of block 3, the z buffer is set to the z value of each pixel, as determined by delta z, and the z value is set equal to the z + delta z (the delta z value being the change between the z value for the previous pixel being considered and the current pixel being considered) such that for each subsequent pixel, the z buffer will be set to z + delta z. Again, steps 6 and 7 are looped and incremented by Y = Y+1 for each pixel satisfying the requirements of step 6. When pixel 4 is encountered, it can be seen that Y is no longer less than or equal to the minimum of Ystop, or Y2 since Y2 corresponds to pixel 3 of block 3, i.e. the last pixel corresponding to the line being drawn. Therefore, the present invention continues to step 8 where it is determined if Y is less than or equal to Ystop. The 4th pixel of block 3 is less than Ystop, i.e. 4 is less than 32. Therefore, the process continues to step 9 where the frame buffer for pixel 4 is written to the background color, the z buffer is set to the z max value and za is also set to the maximum z value for any pixel in the block, thereby keeping a running total of the maximum z value for the entire block. Once again, st0ps 8 and 9 are looped and each pixel satisfying the requirements of step ~ is incremented. In this case pixels 4-32 of block 3 are consecutively processed by steps 8 and 9 until step 8 is no longer satisfied. Once pixel 32 of block 3 is processed and incremented by Y =
Y+l, then step 8 is no longer satisfied, since the next pixel is included in a different block, and the process continue~ to step 28 where it is determined if there are any blocks to process. If so, the process returns to step 1 and the next block is initialized. If there are no blocks remaining to process then th~ the method of the present invention proceeds to step 10 and ~nds.
Next, an example of the configuration shown in Figure 2 will be described wherein the blocks have previously been initialized. For example, blocks 1, 2 and 3 are now considered to be initialized since they have been processed as described above~ Assuming that blocks 1, 2, and 3 have heen initialized the present invention must set the parameters of the block (Y to the AT9-90-029 11 2 ~ 7 left of the block at Ystart3 again at step 1. It is then determined whether Y i 5 less than or equal to Ystop at step 2 and if so, the process continues to step 3. If however, Y is not less than or equal to Ystop the present invention continues to step 10 and ends. Next, at step 3 it is determined whether the blocks are initialized. For the purposes of this example, it will be assumed that blocks 1, 2 and 3 of Figure 2 have been initialized, as previously discussed. When considering block 1, it can be seen that the method of the present invention will proceed to step 11 where it is determined if delta z is greater than 0, i.e. if the z slope of the line is away from the front of the screen ~line 1, Figure 4). A
positive slope (delta z greater than zero) will indicate that the line to be drawn is getting deeper into the screen when considered from left to right (line 2, Figure 4). A negative slope (delta z is less than zero) means that the line being drawn is becoming shallower as considered f~om left to right (line 2, Figure 4). An estlmate of the minimum z value in the block for the line to be drawn is then calculated at steps 12, ]3. If delta z is positive then the present invention proceeds to step 13 and the minimum estimated value of z for the line is merely the initial z value (e.g. zminl, Figure 4), since the z value of successive pixels will increase, i.e. be farther from the front of the screen. If delta z is negative, an estimate is made of the minimum z value for any pixel in the block. Since, in this case, a block contains 32 pixels, the minimum possible z value for any pixel in the block is the initial z value (zmax2, Figure 4) of the first pixel in the block (that is contained within the line) plus the delta z value, multiplied by 32 ~number of pixels in a block3 which yields zmin2 Thus, it can be seen that for lines to be drawn having a positive slope (line 1, Figure 43 the left most pixel, (zminl) will be the minimum z value of the line. But, for lines with a negative slope, the minimum z value ~zmin2, ]ine 2, Flgure 4) must be calculated.
Subsequellt to steps 12 and 13 the process continues to step 1~ where it is determined if the estimated z AT9--90--029 12 20~ 7 value is greater than the z value within the status word za for the block being considered. It should be recalled that za is a representation of the maximum z value for any pixel within the block and z estimate is a representation of the minimum possible z value of any pixel in the line being drawn. Comparing these values determines if there is a possibility that part of the line is visible within the block, or if all of the line is "hidden" by the block. Step 14 addresses the hidden line/ hidden surface aspect of the present invention. It can be seen that if the estimated minimum z value for the block of pixels including the line to be drawn, which was determined at steps 12 and 13, is greater than the status word za (maximum z value) for the block of pixels which have been previously initialized (written to), then all of the pixels in the line currently being drawn have a z value greater when compared to the value of the status word za of the previously initialized block of pixels.
Therefore, the pixels representing the line to be drawn, and contained within the block currently being considered, are obscured from view by the pixels already contained in the previously initialized block (see Figure 4). For example, zminl and zmin2 of Figure 4 are maximum when compared to za. Thus, a full block bypass would be implemented during processing of lines l and 2, given the value of za as shown in Figure 4. In this case, a full block bypass is implemented at step 15. That is, all of the pixels in the block associated with the status word za are considered to be closer to a viewer than the pixels in the block having the line currently being drawn and corresponding to the previously determined estimated z value. Therefore the previously initialized block of pixels are considered to "win" and be visible to a viewer of display 10. In a full block bypass it is necessary to advance the color and z value of the line to their initial value~ at the beginning of the next block It can be seen that implementation of a full block bypass will increase the processing speed, as well as reduce overhead associated with a pixel by pixel comparison of z values. That is, a single comparison, at step 14, (z 2 ~ 7 estimate greater th~n za?) may allow a total of 32 pixels (in this example) to be processed. If a full block bypass is implemented the method then proceeds to step 27 where it is determined if there are blocks remaining to process and if so the method returns to step l. If there are no blocks remaining to process at step 27 then the method ends at step 10.
If at step 14 the estimated minimum z value is not greater than the status word za for the previously initialized block, then a comparison of the z values at each pixel location must ~e implemented and is addressed by steps 14A-24 of the flowchart of Figure 3b. Referring to Figure 4, za2 is not less than zmin2 and it can be seen how a full block bypass cannot be implemented with respect to line 2. In this case a pixel by pixel comparison must be undertaken.
In step 14A, the status word is set equal to zero because a new maximum value will have to determined for this block, which will occur during subsequent processing of the pixels at steps 16-24.
It can be seen that step 16 is analogous to step 4 and considers those pixels of the block being processed where Y is less than Y1, see ~igure 2. For example, pixels 1 and 2 of block 1 satisfy step 16, since Y is in fact less than Y1. While y is less than Yl, the method proceeds to step 17 where the status word za is set equal to the maximum of the current value of za, or the z value within the z buffer corresponding to that pixel. It should be noted that for the initial pixel being processed at step 17, za will equal zero and be ~et to the z buffer value. For subse~uent pixels a comparison between za and the z buffer will occur. Again, steps 16 and 17 are looped such that each of the pixels satisfying the requirements of step 16 are incremented by Y = Y+1 and consecutively processed. Once pixel 3 of block 1 is encountered then step 16 is no longer satisfied and the process continues to step 18 which is analogous to the previously described step 6, i.e. is Y less than or equal to the minimum of Ystop or Y2 Step 18 will be satisfied for pixels 3-32 of block 1 and the present invention then 2 ~ 7 continues to step 19 where a comparison for each pixel is made. That is, a determination is made of whether the z value currently stored in the z buffer, for each pixel, i.3 greater than the new z value ~or the line being drawn.
If step 19 is satisfied, i.e. z is less than the value in the z buffer, the pixel is visible and frame buffer and z buffer must be written with the new z value at step 20.
At step 21 it is determined whether za needs to be updated because of the new value in the z buffer. If the value in the z buffer is greater than za, then za is set equal to the new maximum value in the z buffer at step 22. At step 22A the color and z value of the next pixel is computed based on the interpolated value given by the delta color and delta z, as previously discussed.
Subsequent to step 22A the process returns to step 18 which determines whether the next pixel in the block is less than or equal to Ystop, in a manner as previously discussed.
It can be seen that step 18 will address pixels 3-32 of block 1 until all of the pixels in bloc~ l have been processed. At that time, the method will proceed to step 23 and since all the pixels in block l have been processed, i.e. pixel 32 is not less than Ystop, then step 27 determines whether there are blocks remaining to process and if so returns to step 1, or ends at step 10.
Since, for thi 8 example, there are blocks remaining to process (blocks 2 and 3 of Figure 2), the method returns to step l and initializes block 2, step 2 determines whether Y is less than or equal to Ystop an~ step 3 determines that block 2 has in fac-t been initialized.
Steps ll-13 then determine an estimated z value for the pixels in block 2, as previously discussed. Step 14 then compares the determined z estimate with the status word za for block 2, which has been previously set to a maximum value in step 7 If a full bloc~ bypass is possible then the method continues to step 27 to determine if there are blocks remaining to process. If a full block bypass is not possible then step 16 determines if Y is less than Yl which will not be the case for block 2, since all the pixels contained therein are associated AT9-90-029 15 20~5V~7 with line 16. Therefore, the process continues to step 18 which addresses those pixels with Y values that are less than or equal to the minimum of Y~top or Y2, which will include all of the pixels of block 2. Steps 18, 19, 20, 21, 22 and 22A are looped (incremented by Y = Y+]) and each pixel in block 2 will be consecutively addressed by steps 18-22A in a manner as previously described.
Once, pixel 32 of block 2 is processed the method proceeds back to step 18 and on to step 23 since Y has ~een incremented by Y+Y=l, therefore Y is not less than Ystop. Again, step 27 then determines if any blocks are remaining to process and returns the process to step 1 for initialization of block 3.
Step 1 initializes block 3, step 2 determines if Y
is less than or egual to Ystop and step 3 determines that block 3 has previously been initialized. Again, steps 11-13 calculate an estimated z value and step 14 determines if a full block bypass is possible. Assuming that a full block bypass is not possible for block 3, the method of the present invention continues to step 16 where it is determined that Y is not less than Y1 and proceeds to step 18. It can be seen that for pixels 1-3 of block 32 step 18 will be satisfied and these pixels will be processed by the looped steps 18-22A as previously discussed. Once, pixel 4 is encountered step 18 is no longer s~tisfied and the present invention proceeds to step 23, which is similar to step 8, and determines if Y is less than or equal to Ystop. It can be seen that for pixels 4 32 of block 3, step 23 will be satisfied and the status word for block 3 will be set equal to the maximum of the value contained in the z buffer, or the value currently in the status word za, whichever is greater. Thus, it can be seen that za will contain the maximum value ~running total~ for any z value encountered with regard to any pixel contained in the block. Once again, steps 23 and 24 are looped and each pixel satisfying step 23 contained within ~lock 3 will be consecutively processed at step 24. Once the last pixel in block 3 (pixel 32) has heen processed and incremented by Y = Y+l, t~en Y will no longer be less than or equal ~n J~ 7 to Ystop and the method of the present invention proceeds to step 27 which determines if there are any blocks remaining to process. It can be seen that for the currently described example all of the blocks of Figure 2 have in fact been processed and the present invention will continue to step 10 and end.
Figures 5A and 5B list pseudo-code which exemplifies one means of implementing the present invention. One skilled in the art will appreciate the simplicity of the present invention when the pseudo-code is viewed in conjunction with the flowchart of Figures 3A and 3B.
Figure 6 is a computer graphics system which may utilize the æ buffer initialize and update method of the present invention. A display, or monitor 10, such as a CRT, or the like is shown with digital to analog convertor (DAC) 20 providing a signal to be displayed thereon. Frame buffer 22, z buffer 24 and its associated status word (za) 26 are all shown and may be included on a graphics adapter card 30, or the like, which also includes the rendering hardware 33. A central processing unit (CPU) 31 is provided along with operating sy~tem 32, which will contain the actual lines of programming code to be used by the present invention to more efficiently initialize and update display 10. Finally, an application program 34 is shown that determines the surfaces and the lines to be displayed on monitor 10.
The present invention contains several advantages over conventiona] z buffer display systems. For example, less time and overhead is reguired to initially set the z values since only the status word za for a block of pixels needs to ~e cleared. Conversely, conventional systems must clear each and every pixel individually.
Therefore, rendering an object on the display can begin with less delay, thereby improving the efficiency of z buffer initialization. Additionally, in complex scenes that are often rendered by graphics systems many objects may be hidden by other previously scan converted objects, such as lines and surfaces. The present invention provides a means of comparing, through a status word za, a plurality of pixels which have previously been drawn to ~ ~ ~ 5 ~ ~ s the display with a plurality of pixels that are to be drawn to the display. This comparison matches the maximum z value for the currently drawn pixels with the minimum value for the group of pixel to be displayed and determines whether the currently displayed pixels will win. If so, the currently displayed pixels will remain on the display and another group of pixels to be drawn can then be processed. It can be seen, how comparing two groups of pixels with one another saves a graat deal of time and overhead when compared with conventional processes of which compare each individual pixel contained on a display.
Further, in some cases large portions of the screen may never be used for rendering, i.e. the object may be small and centrally located in the screen. In this case refresh logic can detect the condition where the status word za was set to a negative number tlogically cleared) and insert the background color for those pixels.
Therefore, those areas of the z buffer which are not used and correspond to portions of the screen for which no scene is displayed, are never actually reset or updated, thus saving additional time when rendering objects on a screen.
Although certain preferred embodiments have been shown and described, it should be understood that many changes and modifications may be made therein without departing from the scope of the appended claims.

Claims (32)

The embodiments of the invention in which an exclusive property or privilege is claimed are defined as follows:
1. A method of displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, said method comprising the steps of:
associating a portion of said plurality of pixels together in a block;
storing a maximum depth value for each block;
determining whether said object to be displayed intersects said block; and drawing all of said pixels within said block to said display.
2. A method according to claim 1 wherein said step of storing comprises the steps of:
providing a memory for each block of pixels; and storing, in said memory, the maximum depth value of any pixel contained within said block.
3. A method according to claim 2 wherein said step of determining comprises the step of determining whether at least one of the pixels contained within said block are intersected by said object.
4. A method according to claim 3 wherein said step of drawing comprises the steps of:
writing the frame buffer with a background color for all non-intersected pixels, and writing the frame buffer with a line color for all intersected pixels.
5. A method of displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, said method comprising the steps of:

associating a portion of said plurality of pixels together in a block;
storing a maximum depth value for each block;
determining whether said object to be displayed intersects said block;
determining an estimated minimum z value for a block of pixels corresponding to the object to be displayed;
comparing said stored maximum depth value for said block of pixels corresponding to the object currently being displayed with said estimated minimum z value; and continuing to display the current block of pixels when said stored maximum z value is less than said estimated minimum z value.
6. A method according to claim 5 wherein said method of displaying further comprises the steps of:
comparing the z values for each pixel in said block corresponding to the object currently being displayed with the z value for each pixel in said block corresponding to the object to be displayed; and drawing the pixel having the minimum z value to said display.
7. A method according to claim 6 wherein said step of storing comprises the steps of:
providing a memory for each block of pixels; and storing, in said memory, the maximum depth value of any pixel contained within said block.
8. A method according to claim 7 wherein said step of determining an estimated minimum z value comprises the steps of:
determining whether the slope of the z values within said block corresponding to the object to be displayed is positive or negative;
for a positive slope, setting the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed; and for a negative slope, setting the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed, plus the number of pixels in said block multiplied by a delta z value.
9. A method according to claim 8 wherein said step of drawing comprises the steps of:
writing the frame buffer with a background color for all non-intersected pixels; and writing the frame buffer with a line color for all intersected pixels having the minimum z value.
10. A method according to claim 9 wherein said step of continuing to display comprises the step of bypassing consideration of the block of pixels corresponding to the object to be displayed.
11. A computer program product for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:
means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;
means for determining whether said object to be displayed intersects said block; and means for drawing said pixels within said block to said display.
12. A program product according to claim 11 wherein said means for storing comprises:
memory means associated with each block of pixels;
and means for storing, in said memory means, the maximum depth value of any pixel contained within said block.
13. A program product according to claim 12 wherein said means for determining comprises means for determining whether at least one of the pixels contained within said block are intersected by said object.
14. A program product according to claim 13 wherein said means for drawing, comprises:
means for writing the frame buffer with a background color for all non-intersected pixels; and means for writing the frame buffer with a line color for all intersected pixels.
15. A program product for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:
means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;
means for determining whether said object to be displayed intersects said block;
means for determining an estimated minimum z value for a block of pixels corresponding to the object to be displayed;
means for comparing said stored maximum depth value for said block of pixels corresponding to the object currently being displayed with said estimated minimum z value; and means for maintaining the display of the current block of pixels when said stored maximum z value is less than said estimated minimum z value
16. A program product according to claim 15 wherein said means for displaying further comprises:
means for comparing the z values for each pixel in said block corresponding to the object currently being displayed with the z value for each pixel in said block corresponding to the object to be displayed; and means for drawing the pixel having the minimum z value to said display.
17. A program product according to claim 16 wherein said means for storing comprises:
memory means for each block of pixels; and means for storing, in said memory, the maximum depth value of any pixel contained within said block.
18. A program product according to claim 17 wherein said means for determining an estimated minimum z value comprises:
means for determining whether the slope of the z values within said block corresponding to the object to be displayed is positive or negative;
means for setting, for a positive slope, the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed; and means for setting, for a negative slope, the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed, plus the number of pixels in said block multiplied by a delta z value.
19. A program product according to claim 18 wherein said means for drawing comprises:
means for writing the frame buffer with a background color for all non-intersected pixels; and means for writing the frame buffer with a line color for all intersected pixels having the minimum z value.
20. A program product according to claim 19 wherein said means for maintaining the display of the current block of pixels comprises means for bypassing consideration of the block of pixels corresponding to the object to be displayed.
21. A system for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:

means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;
means for determining whether said object to be displayed intersects said block; and means for drawing said pixels within said block to said display.
22. A system according to claim 21 wherein said means for storing comprises:
memory means associated with each block of pixels;
and means for storing, in said memory means, the maximum depth value of any pixel contained within said block.
23. A system according to claim 22 wherein said means for determining comprises means for determining whether at least one of the pixels contained within said block are intersected by said object.
24. A system according to claim 23 wherein said means for drawing, comprises:
means for writing the frame buffer with a background color for all non-intersected pixels; and means for writing the frame buffer with a line color for all intersected pixels.
25. A system for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:
means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;
means for determining whether said object to be displayed intersects said block;

means for determining an estimated minimum z value for a block of pixels corresponding to the object to be displayed;
means for comparing said stored maximum depth value for said block of pixels corresponding to the object currently being displayed with said estimated minimum z value; and means for maintaining the display of the current block of pixels when said stored maximum z value is less than said estimated minimum z value.
26. A system according to claim 25 wherein said means for displaying further comprises:
means for comparing the z values for each pixel in said block corresponding to the object currently being displayed with the z value for each pixel in said block corresponding to the object to be displayed; and means for drawing the pixel having the minimum z value to said display.
27. A system according to claim 26 wherein said means for storing comprises:
memory means for each block of pixels; and means for storing, in said memory, the maximum depth value of any pixel contained within said block.
28. A system according to claim 27 wherein said means for determining an estimated minimum z value comprises:
means for determining whether the slope of the z values within said block corresponding to the object to be displayed is positive or negative;
means for setting, for a positive slope, the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed; and means for setting, for a negative slope, the estimated minimum z value equal to the z value of the first encountered pixel, in said block corresponding to said object to be displayed, plus the number of pixels in said block multiplied by a delta z value.
29. A system according to claim 28 wherein said means for drawing comprises:
means for writing the frame buffer with a background color for all non-intersected pixels; and means for writing the frame buffer with a line color for all intersected pixels having the minimum z value.
30. A system according to claim 29 wherein said means for maintaining the display of the current block of pixels comprises means for bypassing consideration of the block of pixels corresponding to the object to be displayed.
31. A system for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:
application program means for defining said object to be displayed;
means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;
means for determining whether said object to be displayed intersects said block;
means for drawing said pixels within said block to said frame buffer; and central processing means for implementing the actual rendering of said object on to said display.
32. A system for displaying at least one object on a computer graphics system having a display with a plurality of pixels thereon and a frame buffer, comprising:
application program means for defining said object to be displayed;
means for associating a portion of said plurality of pixels together in a block;
means for storing a maximum depth value for each block;

means for determining whether said object to be displayed intersects said block;
means for determining an estimated minimum z value for a block of pixels corresponding to the object to be displayed;
means for comparing said stored maximum depth value for said block of pixels corresponding to the object currently being displayed with said estimated minimum z value;
means for maintaining the display of the current block of pixels when said stored maximum z value is less than said estimated minimum z value;
means for drawing said pixels within said block to said frame buffer; and central processing means for implementing the actual rendering of said object on to said display.
CA002055057A 1990-12-06 1991-11-06 Fast z buffer initialize and update method Abandoned CA2055057A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US62416390A 1990-12-06 1990-12-06
US07/624,163 1990-12-06

Publications (1)

Publication Number Publication Date
CA2055057A1 true CA2055057A1 (en) 1992-06-07

Family

ID=24500912

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002055057A Abandoned CA2055057A1 (en) 1990-12-06 1991-11-06 Fast z buffer initialize and update method

Country Status (5)

Country Link
US (1) US5870095A (en)
EP (1) EP0489594B1 (en)
JP (1) JPH07120435B2 (en)
CA (1) CA2055057A1 (en)
DE (1) DE69129975T2 (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5596686A (en) * 1994-04-21 1997-01-21 Silicon Engines, Inc. Method and apparatus for simultaneous parallel query graphics rendering Z-coordinate buffer
US5561750A (en) * 1994-09-22 1996-10-01 Seiko Epson Corporation Z-buffer tag memory organization
US5649078A (en) * 1995-03-22 1997-07-15 International Business Machines Corporation Efficient two-pass rasterization scheme utilizing visibility information
FI107196B (en) * 1997-07-09 2001-06-15 Vlsi Solution Oy Method and apparatus for processing pixels
AU5688199A (en) * 1998-08-20 2000-03-14 Raycer, Inc. System, apparatus and method for spatially sorting image data in a three-dimensional graphics pipeline
US6771264B1 (en) * 1998-08-20 2004-08-03 Apple Computer, Inc. Method and apparatus for performing tangent space lighting and bump mapping in a deferred shading graphics processor
US6720964B1 (en) * 1998-08-27 2004-04-13 Ati International Srl Method and apparatus for processing portions of primitives that are being rendered
US6404425B1 (en) * 1999-01-11 2002-06-11 Evans & Sutherland Computer Corporation Span-based multi-sample z-buffer pixel processor
US6473082B1 (en) 1999-05-18 2002-10-29 S3 Graphics Co., Ltd. System and method for implementing a two-layer z-range buffer
US6580427B1 (en) * 2000-06-30 2003-06-17 Intel Corporation Z-compression mechanism
US6557083B1 (en) * 2000-06-30 2003-04-29 Intel Corporation Memory system for multiple data types
US6724391B1 (en) 2000-06-30 2004-04-20 Intel Corporation Mechanism for implementing Z-compression transparently
US7453459B2 (en) * 2001-02-26 2008-11-18 Adobe Systems Incorporated Composite rendering 3-D graphical objects
US7288279B2 (en) * 2001-12-21 2007-10-30 Michael Foods Of Delaware, Inc. Formulated fried egg product
JP4390574B2 (en) * 2003-03-31 2009-12-24 富士通株式会社 Hidden line processing method for eliminating hidden lines when projecting a 3D model composed of a plurality of polygons onto a 2D plane
US7599044B2 (en) 2005-06-23 2009-10-06 Apple Inc. Method and apparatus for remotely detecting presence
US7242169B2 (en) * 2005-03-01 2007-07-10 Apple Inc. Method and apparatus for voltage compensation for parasitic impedance
US9298311B2 (en) * 2005-06-23 2016-03-29 Apple Inc. Trackpad sensitivity compensation
US7577930B2 (en) 2005-06-23 2009-08-18 Apple Inc. Method and apparatus for analyzing integrated circuit operations
US7433191B2 (en) * 2005-09-30 2008-10-07 Apple Inc. Thermal contact arrangement
US7598711B2 (en) * 2005-11-23 2009-10-06 Apple Inc. Power source switchover apparatus and method
US7891818B2 (en) 2006-12-12 2011-02-22 Evans & Sutherland Computer Corporation System and method for aligning RGB light in a single modulator projector
US8358317B2 (en) 2008-05-23 2013-01-22 Evans & Sutherland Computer Corporation System and method for displaying a planar image on a curved surface
US8702248B1 (en) 2008-06-11 2014-04-22 Evans & Sutherland Computer Corporation Projection method for reducing interpixel gaps on a viewing surface
US8077378B1 (en) 2008-11-12 2011-12-13 Evans & Sutherland Computer Corporation Calibration system and method for light modulation device
US9641826B1 (en) 2011-10-06 2017-05-02 Evans & Sutherland Computer Corporation System and method for displaying distant 3-D stereo on a dome surface

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4697178A (en) * 1984-06-29 1987-09-29 Megatek Corporation Computer graphics system for real-time calculation and display of the perspective view of three-dimensional scenes
US4625289A (en) * 1985-01-09 1986-11-25 Evans & Sutherland Computer Corp. Computer graphics system of general surface rendering by exhaustive sampling
US4860248A (en) * 1985-04-30 1989-08-22 Ibm Corporation Pixel slice processor with frame buffers grouped according to pixel bit width
FR2586838B1 (en) * 1985-08-30 1989-07-28 Labo Electronique Physique HIDDEN FACES PROCESSOR FOR SYNTHESIS OF THREE-DIMENSIONAL IMAGES
US4808986A (en) * 1987-02-12 1989-02-28 International Business Machines Corporation Graphics display system with memory array access
US4903217A (en) * 1987-02-12 1990-02-20 International Business Machines Corp. Frame buffer architecture capable of accessing a pixel aligned M by N array of pixels on the screen of an attached monitor
US4825391A (en) * 1987-07-20 1989-04-25 General Electric Company Depth buffer priority processing for real time computer image generating systems
US4961153A (en) * 1987-08-18 1990-10-02 Hewlett Packard Company Graphics frame buffer with strip Z buffering and programmable Z buffer location
US4855938A (en) * 1987-10-30 1989-08-08 International Business Machines Corporation Hidden line removal method with modified depth buffer
US4907174A (en) * 1988-06-02 1990-03-06 Sun Microsystems, Inc. Z-buffer allocated for window identification
US4951232A (en) * 1988-09-12 1990-08-21 Silicon Graphics, Inc. Method for updating pipelined, single port Z-buffer by segments on a scan line

Also Published As

Publication number Publication date
EP0489594A2 (en) 1992-06-10
JPH04302067A (en) 1992-10-26
US5870095A (en) 1999-02-09
EP0489594A3 (en) 1993-10-27
EP0489594B1 (en) 1998-08-12
DE69129975D1 (en) 1998-09-17
DE69129975T2 (en) 1999-04-15
JPH07120435B2 (en) 1995-12-20

Similar Documents

Publication Publication Date Title
US5870095A (en) Z buffer initialize and update method for pixel block
US5734806A (en) Method and apparatus for determining graphical object visibility
US5583974A (en) Computer graphics system having high performance multiple layer Z-buffer
EP0464907B1 (en) Generating an image
US6437788B1 (en) Synchronizing graphics texture management in a computer system using threads
KR100274919B1 (en) System and method for double buffering graphics image data with compressed frame buffers
EP0486239A2 (en) Rasterization processor for a computer graphics system
US5920687A (en) Z-buffer storage based on opacity and depth using pointers
EP0208149A1 (en) Method for hidden line removal
US4970499A (en) Apparatus and method for performing depth buffering in a three dimensional display
US6195098B1 (en) System and method for interactive rendering of three dimensional objects
JPH07104960B2 (en) Graphics display system and hidden surface erasing method
US5761400A (en) Method and system for increasing the speed of a Z-buffer process
US5448264A (en) Method and apparatus for separate window clipping and display mode planes in a graphics frame buffer
JPH07200218A (en) Method and equipment for interlocking of graphical object
KR100233346B1 (en) Method and apparatus for improving graphics picking using auxiliary buffer information
US7233964B2 (en) Method and system for compositing three-dimensional graphics images using associative decision mechanism
CA2267491A1 (en) Frame buffer memory system for reducing page misses when rendering with color and z buffers
US5265198A (en) Method and processor for drawing `polygon with edge`-type primitives in a computer graphics display system
US5206628A (en) Method and apparatus for drawing lines in a graphics system
US6466217B1 (en) Method and apparatus for ensuring backward compatibility in a bucket rendering system
JPH02123422A (en) Computer output apparatus
US5831634A (en) Three-dimensional graphic controller
US6930688B1 (en) Generator of graphics in computer system
JP2000331185A (en) Image processing method and device and program supply medium

Legal Events

Date Code Title Description
EEER Examination request
FZDE Discontinued
FZDE Discontinued

Effective date: 19971106