WO2006028093A1 - 画像生成装置および画像生成方法 - Google Patents

画像生成装置および画像生成方法 Download PDF

Info

Publication number
WO2006028093A1
WO2006028093A1 PCT/JP2005/016334 JP2005016334W WO2006028093A1 WO 2006028093 A1 WO2006028093 A1 WO 2006028093A1 JP 2005016334 W JP2005016334 W JP 2005016334W WO 2006028093 A1 WO2006028093 A1 WO 2006028093A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
polygon
value
buffer
image
Prior art date
Application number
PCT/JP2005/016334
Other languages
English (en)
French (fr)
Inventor
Yudai Ishibashi
Tadashi Kobayashi
Makoto Yamakura
Original Assignee
Matsushita Electric Industrial Co., Ltd.
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 Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Priority to JP2006535763A priority Critical patent/JP4704348B2/ja
Priority to US11/630,102 priority patent/US7649531B2/en
Publication of WO2006028093A1 publication Critical patent/WO2006028093A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Definitions

  • the present invention relates to three-dimensional computer graphics technology, and more particularly to hidden surface elimination technology for objects in three-dimensional space.
  • FIG. 1 (a) is a diagram for explaining the Z buffer method.
  • a point corresponding to a pixel (for example, a polygon representing an object in a three-dimensional space), which corresponds to each pixel of the view screen 900, and which connects a pixel on the view screen 900 with the viewpoint V
  • Z buffer a buffer for storing the Z coordinate of (hereinafter referred to as “Z value”).
  • Z value is a value that increases with distance from the viewpoint.
  • frame buffer a buffer for storing the pixel value (for example, color value or luminance value) of each pixel is prepared.
  • FIG. 1 (a) shows a case where these polygons are projected onto the view screen 900 when there are two polygons 910 and polygons 920 which intersect each other in a three-dimensional space.
  • the portion projected onto the pixel 930 of the view screen 900 is the portion A of the polygon 910, and the point B of the polygon 920 is hidden by the point A of the polygon 910.
  • the viewpoint V force also extends the straight line up to the pixel 930, and the distance ZA between the viewpoint V and the point A is shorter than the distance ZB between the viewpoint V and the point B.
  • the point A of certain polygon 910 is also the force projected onto the view screen 900 only.
  • FIG. 1 (b) is a display example of an image in the case where hidden surface elimination is performed using the Z buffer method (ie, the polygon 910 and the polygon 920 are projected on the view screen 900).
  • the Z value of each polygon is small, the darker the part, and the more black!
  • the procedure for performing hidden surface elimination using the Z buffer method is as follows.
  • FIG. 2 (a) shows an example of an image composed of 8 ⁇ 8 pixels, which has already been drawn for polygon 901! (Note that the memory address in FIG. 2 (a) Is indicated by [N-M]).
  • FIG. 2 (b) is an image drawn by adding a new polygon 902 to FIG. 2 (a).
  • the squares in FIGS. 2 (a) and 2 (b) show the Z values corresponding to the respective pixels.
  • Fig. 2 (c) is an example of the pixel values stored in the frame buffer corresponding to the above Fig. 2 (a) and the Z value stored in the Z buffer.
  • each pixel corresponding to polygon 901 is already corresponding to polygon 901 among the pixels corresponding to polygon 902. Only pixels with a z-value less than the z-value of the pixel are taken and drawn on the view screen.
  • FIG. 2 (d) The pixel values stored in the frame buffer and the Z values stored in the Z buffer after completion of the above processing are shown in FIG. 2 (d). As shown in FIG. 2D, only when the Z value of the pixel corresponding to polygon 902 is smaller than the Z value of the pixel corresponding to polygon 901, Each pixel value and z value is updated.
  • the frame buffer stores the image data of the image subjected to hidden surface elimination to be displayed on the actual display equivalent to the view screen.
  • the Z-buffer method is a simple power algorithm that requires a large-capacity buffer (memory) to store pixel values and Z values for all pixels on the view screen. It is used in devices that perform many real-time renderings that are easy to convert to hardware.
  • Non Patent Literature 1 Shinya Araya “Clear 3D Computer Graphics” Kyoritsu Publication 2003
  • the data length of the minimum processing unit of read Z writing (hereinafter, “burst length”) is equivalent to one pixel. It is preferable that the length of the data (including pixel values and Z values) be as long as possible, and it is necessary to use a memory having a short latency time for reading Z writing (hereinafter referred to as "latency").
  • a memory suitable for graphics processing is often installed (for example, when the burst length during read Z writing is much longer than one pixel's worth of data). If the burst length at read Z write is much longer than the data for one pixel as in the above system LSI, the pixel data of the pixel unrelated to the polygon being drawn is also accessed at the same time. Processing efficiency at the time of memory access is reduced. Furthermore, if the latency at the time of memory access is long, the waiting time can hardly be devoted to the drawing process, and it just has to wait. Therefore, there is a problem that the processing efficiency in the drawing processing is lowered, and an image with smooth motion can not be obtained, resulting in deterioration of the image quality and the like.
  • the present invention has been made in view of the above problems, and an image generation apparatus and the like that can avoid a decrease in processing efficiency in drawing processing even when the hidden surface elimination is performed by applying the Z buffer method. Intended to be provided.
  • the following measures are taken to solve the above problems. That is, polygon drawing processing is performed for each block composed of a plurality of pixel powers, and a memory storage image composed of effective pixel data force which is data of pixels on which polygons of the block are drawn is created. Furthermore, the effective pixel data is stored in a continuous address area of the rendering buffer according to the memory storage image, the memory storage image is encoded into rendering information data, and the rendering information data is stored in the rendering information buffer. Furthermore, memory access to the rendering buffer is minimized based on the memory storage image which is the result of decoding of the drawing information data referenced beforehand.
  • an image generation device is an image generation device that generates an image by projecting an object in a virtually defined space onto a view screen,
  • the object is represented by a plurality of polygons, and for each and every pixel of the view screen, the value of an effective pixel flag indicating whether or not at least one polygon is present at the position projected onto the view screen is determined.
  • Flag value determination means pixel value storage means for storing pixel values of pixels corresponding to a polygon in a continuous address area of the rendering buffer in correspondence with the determined effective pixel flag, and the determined effective pixels
  • the image generation device further includes: a division unit that divides the view screen into a plurality of blocks, and the flag value determination unit is configured to calculate the value of the effective pixel flag for each of the divided blocks.
  • the pixel value storage unit performs the storage in the rendering buffer for each block, and the expansion unit expands the pixel values stored in the rendering for all the blocks in the frame buffer. You may decide to
  • the pixel value storing means further includes, for the one block, a data length calculating unit for calculating a data length of the pixel value in the rendering buffer in the block, and the calculated data.
  • the data may be provided with a data-lengthed carot which adds a length to the rendering buffer.
  • the pixel value storing means further generates the pixel value using information that can specify the form of the polygon when one polygon is drawn in the one block, and the pixel value is generated.
  • the pixel value may be stored in the rendering buffer.
  • the pixel value storage unit includes an interpolation calculation unit that performs interpolation calculation of the pixel value using information that can specify the form of the polygon, and the rendering buffer may include the interpolated pixel value. It may be stored in the
  • a data recording medium is a data recording medium used for an image generation apparatus that generates an image by projecting an object in a virtually defined space onto a view screen.
  • the object is represented by a plurality of polygons, and the image generating device may determine whether or not at least one polygon is projected to the view screen for every pixel of the view screen.
  • a pixel value determining means for determining a pixel value of a pixel corresponding to the polygon in correspondence with the determined effective pixel flag, and a determined pixel value determining means.
  • Developing means for expanding the determined pixel value into a frame buffer in accordance with the value of the effective pixel flag and the data recording medium is configured to determine the determined effective pixel At least one lug and the pixel values, and storing, in the address area contiguous.
  • the characteristic constituent means in the above-mentioned image generation device is taken as a step.
  • the present invention can be realized as an image generation method, or as a program or an integrated circuit which causes those steps to be executed by a personal computer or the like. It goes without saying that the program can be widely distributed via recording media such as DVD and transmission media such as the Internet.
  • the image generation apparatus stores pixels (hereinafter referred to as “effective pixels”) on which polygons are drawn in block units of a plurality of pixel powers, in the continuous address area of the rendering buffer,
  • effective pixels pixels on which polygons are drawn in block units of a plurality of pixel powers
  • data of effective pixels necessary for drawing may be reduced by reducing useless data when performing burst read only by accessing the continuous address area of the rendering buffer according to drawing information data. Memory access can be significantly reduced.
  • FIG. 1 (a) is a diagram for explaining the Z buffer method.
  • (b) is a display example of an image subjected to hidden surface elimination using the Z buffer method.
  • Fig. 2 is an example of an image composed of 8 x 8 pixels, which has been drawn for a certain polygon.
  • (B) is an example of an image drawn by adding a new polygon to the above-mentioned FIG. 2 (a).
  • (C) is an example of the pixel value stored in the frame buffer corresponding to the polygon in FIG. 2 (a) and the Z value stored in the Z buffer.
  • (D) is an example of the pixel value stored in the frame buffer corresponding to the polygon in FIG. 2 (b) and the Z value stored in the Z buffer.
  • (E) is an example of a pixel value updated by the Z buffer method, stored in the frame buffer, and a pixel value stored in the Z buffer.
  • FIG. 3 is a block diagram showing the hardware configuration of the image generation apparatus according to Embodiment 1. It is.
  • FIG. 4 is a block diagram showing a functional configuration of a graphics engine according to the first embodiment.
  • FIG. 5 shows a drawing image of polygons on the rendering buffer in the first embodiment.
  • B is a figure which shows an example of the color value and Z value at the time of drawing a certain polygon.
  • C is a figure which shows an example of the color value and Z value at the time of drawing another polygon.
  • D is a figure which shows an example of the color value and Z value at the time of combining and drawing the polygon of said (b), and the polygon of said (c).
  • FIG. 6 is a diagram showing an example of a table of initialized effective pixel flags.
  • (b) is a figure which shows an example of the table of the effective pixel flag corresponding to said FIG. 5 (b).
  • (c) It is a figure which shows an example of the table of the effective pixel flag corresponding to said FIG.5 (c).
  • (d) is a figure showing an example of a table of an effective pixel flag corresponding to the above-mentioned figure 5 (d).
  • FIG. 7 is a flow chart showing the flow of processing of the image generation device in Embodiment 1.
  • FIG. 8 is a view for explaining an effect in the first embodiment.
  • FIG. 9 is a diagram showing an example of a polygon drawing image on a rendering buffer in Embodiment 2.
  • B is a figure which shows the other example of the drawn image of the polygon on the rendering buffer in Embodiment 2.
  • FIG. ( c )-( e ) is a figure which shows a mode that the polygon of said FIG.9 (b) was decomposed
  • F is a diagram showing an example of data stored in a rendering buffer according to Embodiment 2.
  • FIG. 10 is a block diagram showing a functional configuration of a graphics engine according to a second embodiment.
  • FIG. 11 is a diagram showing an example of a drawing image of polygons on the rendering buffer in the third embodiment.
  • (B) is a figure which shows an example of the image of the polygon which is additionally drawn in Embodiment 3.
  • FIG. (C) is a diagram showing an example of a setup coefficient in Embodiment 3.
  • (D) is a figure which shows an example of the data stored in the rendering buffer in Embodiment 3.
  • FIG. 3 is a block diagram showing the hardware configuration of the image generation apparatus 300 according to the present embodiment.
  • An image generation apparatus 300 shown in FIG. 3 is an image generation apparatus capable of significantly reducing the amount of memory access involved in the process of deleting a hidden surface of three-dimensional computer graphics, and includes a CPU 301, a graphics engine 302, a block buffer 303, and a memory controller 304. , Memory 305, display controller 309 and display 310.
  • the memory 305 further includes a rendering buffer 306, a drawing information buffer 307 and a frame buffer 308.
  • the CPU 301 includes a ROM that stores a control program, a RAM, and the like, and issues a drawing instruction to the graphics engine 302 via the CPU bus 311.
  • the graphics engine 302 performs drawing processing with hidden surface elimination in accordance with a drawing command that has also received CPU power, and also makes an interrupt request related to drawing processing and the like to the CPU 301 via the CPU nose 311.
  • the CPU 301, the graphics engine 302 and the display controller 309 are connected to the memory controller 304 via the memory bus 312, and each accesses the memory 305 to read and write necessary data.
  • the block buffer 303 is a working buffer for expanding a drawing image for each block obtained by dividing the drawing area, and is directly connected to the graphics engine 302.
  • "rendered image” is non-compressed data that can be used directly in the drawing process (pixel process) in the rasterizing unit of the graphics engine, and is one including pixel values and Z values.
  • As the block buffer 303 it is desirable to use a register or SRAM (Static Random Access Memory) that performs high-speed reading and writing.
  • SRAM Static Random Access Memory
  • Each buffer in the memory 305 preferably uses a large capacity memory such as a dynamic random access memory (DRAM). Note that, in the present embodiment, these buffers may be distributed to separate memories integrated into one memory.
  • DRAM dynamic random access memory
  • the rendering buffer 306 is a work buffer for drawing (that is, generating image data) in the graphics engine 302, and stores data necessary for hidden surface elimination including pixel values and Z values. .
  • the drawing information buffer 307 is a work buffer for storing a memory storage image on the rendering buffer for the block, and stores drawing information data of each block. Note that part or all of the rendering information buffer 307 may be included in the rendering buffer 306. Further, the drawing information buffer 307 may be configured by a register or SRAM capable of high-speed read / write, as the block buffer 303.
  • the frame buffer 308 is a buffer for storing image data of an image to be finally displayed on the display 310, and stores the image data generated by the graphics engine 302.
  • the image data stored in the frame buffer 308 is read by the display controller 309 and output to the display 310.
  • FIG. 4 is a block diagram showing a functional configuration of the graphics engine 302 in FIG.
  • the graphics engine 302 includes a host interface 401, a control unit 402, a vertex processing unit 403, a setup unit 404, a rasterization unit 405, a data conversion unit 406, and a memory bus interface 407.
  • the host interface 401 receives a drawing control signal such as a drawing command from the CPU 301 via the CPU bus 311, or outputs a graphic score interrupt signal or the like to the CPU 301.
  • a drawing control signal such as a drawing command from the CPU 301 via the CPU bus 311, or outputs a graphic score interrupt signal or the like to the CPU 301.
  • the control unit 402 outputs polygon data attached to the drawing command received from the CPU 301 to the vertex processing unit 403.
  • the vertex processing unit 403 uses the polygon data input from the control unit 402 to perform light source calculation, coordinate conversion processing, etc. on the vertices of each polygon (three vertices if the polygon is a triangle). Is output to the setup unit 404.
  • the setup unit 404 determines the slope of the straight line surrounding the polygon, and the other corresponding to the polygon.
  • Interpolated values of pixel values of pixels and coefficients such as Z values are calculated and output to the rasterize unit 405.
  • various methods such as interpolation using functional expressions such as linear interpolation and spline function can be considered, but are not particularly limited.
  • the rasterization unit 405 performs polygon drawing processing using the coefficients input by the setup unit 404 and the interpolated values of the coefficients calculated by the setup unit 404 (hereinafter referred to as “setup coefficients” and “.”). .
  • the data conversion unit 406 decodes and encodes data stored in the rendering buffer 306 and the drawing information buffer 307 present in the memory 305.
  • the rasterization unit 405 scans the internal coordinates of the polygon for each pattern to determine a block for drawing the polygon.
  • the data conversion unit 406 accesses the drawing information buffer 307 via the memory bus interface 407, and reads the drawing information data of the determined block. Furthermore, the data conversion unit 406 performs the minimum necessary read access to the rendering buffer 306 via the memory bus interface 407 in accordance with the contents of the effective pixel flag of the drawing information data. Furthermore, the data conversion unit 406 expands the read effective pixel data in the block buffer 303 to restore the drawn image.
  • the rasterization unit 405 calculates pixel values and Z values for pixels inside the polygon, and performs blending with the drawn image developed in the block buffer 303.
  • the “blending process” refers to a polygon that has already been processed and is currently being processed, such as a hidden surface erasing process using Z values or a semitransparent process using ⁇ components (mixing ratios) included in pixel values.
  • the data conversion unit 406 takes out the drawing image power valid pixel data on the block buffer 303 and stores it in the continuous address area of the rendering buffer 306, updates the valid pixel flag, and draws the drawing information data as drawing information Store in buffer 307.
  • the data conversion unit 406 converts the contents of the rendering buffer 306 into a format that can be displayed on the display 310 and stores the converted data in the frame buffer 308.
  • the processing of the vertex processing unit 403 and the setup unit 404 can also be performed by the CPU 301. In this case, the control unit 402 directly outputs setup data to the rasterization unit 405.
  • FIG. 5 is a diagram showing an outline of a polygon drawing method in the present embodiment.
  • FIG. 5 (a) is a drawn image of a polygon on the rendering buffer 306.
  • FIG. 5 (a) a block 102 (in the present embodiment) formed by dividing the drawing area 101 of the view screen (in the present embodiment, by 48) is formed. Although 8 ⁇ 8 pixels are used, other pixels may be used to form a block.
  • Pixel values inside the polygon in FIG. 5 (a) indicate color values.
  • the pixels inside the polygon 901 are drawn.
  • a corresponding pixel when drawing a polygon is referred to as an “effective pixel”.
  • the rendering buffer 306 only the data of the effective pixel (including the pixel value and the Z value) is stored in the rendering buffer 306. At this time, each effective pixel data is stored in the continuous address area of the rendering buffer 306, as shown in FIG. 5 (b).
  • the drawing information data of the block 102 is a flag (hereinafter referred to as "effective pixel flag") indicating whether or not a polygon has been drawn at each pixel of the block, and is stored in a table format as shown in FIG. Ru.
  • the value of the effective pixel flag is initialized to a value “0” indicating that the polygon is not drawn.
  • the value corresponding to the flag corresponding to the pixel representing that drawing is “1”. Is set, updated as shown in FIG. 6 (b), and stored in the drawing information buffer 307.
  • the effective pixel data can be referenced by decoding the memory storage image of FIG. 5 (b) with reference to the table of FIG. 6 (b). Ru.
  • the drawing information data of the block to draw the polygon is read out.
  • the position of the effective pixel data stored in the rendering buffer 306 can be determined from the value of the effective pixel flag of the drawing information data. For example, when the rendering image of block 102 in FIG. 5 (a) is restored from the storage state of rendering buffer 306 in FIG. 5 (b), the value “1” of the effective pixel flag in FIG. 6 (b) is set.
  • the valid pixel data read out from the rendering buffer 306 is assigned in the address order to the current pixel, and the value “0” is set.
  • the pixel value and the Z value are It can be restored by assigning an initial value. Also, since the number of pixels for which the value “1” of the effective pixel flag is set represents the number of effective pixels, reading of effective pixel data is performed from the start address of the corresponding block in the rendering buffer 306 Memory access should be performed as many as X) (data amount for one pixel).
  • an area where effective pixel data is stored from “memory address 0” to “memory address 10” in rendering buffer 306 in FIG. 5 (b) (hereinafter referred to as “effective pixel data area”). It is possible to read out all effective pixel data by performing read access only to this part.
  • the corresponding pixel and effective pixel data area of effective pixel data to be read out are determined, effective pixel data area power of rendering buffer is read, effective pixel data is read, and a drawing image in block units is restored.
  • block hidden surface removal processing is performed using the polygon to be drawn anew and the pixel value and the Z value of the drawn image of the restored block.
  • data of effective pixels is again stored in the order of the head address power of the corresponding block in the rendering buffer 306, and the effective pixel flag of the drawing information data is newly changed to effective pixels.
  • the flag value of the pixel is updated to “1” and stored in the drawing information buffer 307.
  • the display 310 is also configured with multiple polygon forces according to the above procedure
  • the effective pixel data of the block stored in the rendering buffer 306 is read out as in the case of drawing the block, and the drawing image of the block is an address corresponding to the block position on the frame buffer 308 It should be expanded in the area
  • FIG. 7 is a flowchart showing the process flow of the image generation apparatus 300.
  • control unit 402 acquires polygon data of an object to be drawn via the host interface 401 (S 702), and stores the acquired polygon data in the rendering buffer 306. Further, the control unit 400 performs initialization processing on each buffer in the memory 305 (S704). Next, the control unit 400 divides the view screen into N (48 in this embodiment) blocks composed of 8 ⁇ 8 pixels (S706).
  • control unit 402 controls each unit so as to perform the following processing for all blocks (S 708 to 720).
  • the rasterization unit 405 determines whether or not there is a polygon in the block (S710), and if there is a polygon (S710: Yes), the following processing is performed for all the pixels in the block. A process is performed (S712-S718).
  • the rasterization unit 405 compares the Z values of the pixels corresponding to the respective polygons, and updates the pixel values (for example, color values) and the Z values of the pixels on which the polygons are projected, in the case where the Z values are small. (S714). Further, the rasterization unit 405 sets an effective pixel flag corresponding to the pixel on which the polygon is projected (S716).
  • the read burst length of the memory is a data length of 4 ⁇ 4 pixels, and the block is 8 ⁇ 8 pixels.
  • drawing is performed in units of 4 ⁇ 4 pixels in accordance with the burst length
  • drawing is performed in units of 8 ⁇ 8 pixels.
  • Data is collected and stored in the continuous address area of rendering buffer 306, so that one memory access Just do it.
  • the memory corresponding to the polygon 502 drawn across blocks is read three times in the conventional image generation apparatus, but the image generation apparatus 300 according to the present embodiment uses two memory accesses. It can be reduced. Since the position information of the effective pixel is managed by the drawing information buffer 307, the Runnings method and the Fuman method are applied to the data stored in the rendering buffer 308 in order to further improve the memory access efficiency.
  • the compression can also be performed in a manner that is generally well known.
  • 9 (a) to 9 (f) are diagrams showing an outline of a polygon drawing method according to the second embodiment.
  • FIG. 9 (a) shows a drawing image of a block on which a polygon has already been drawn.
  • FIG. 9B is a drawing showing a drawing image of the polygon strip 602 additionally drawn in the block 601 of FIG. 9A.
  • the rendering buffer 306 is accessed each time a new polygon is drawn, and the effective pixel data is read / written in block units to update the drawing image.
  • a method is employed in which a drawing image of a polygon to be newly drawn is created without performing read access to the rendering buffer 306, and drawing data is added to the end of the data area of the corresponding block of the rendering buffer 306.
  • the data length of the corresponding block on the rendering buffer 306 (hereinafter referred to as “block data length”) in addition to the effective pixel flag used in the first embodiment !, Uh.) Is included.
  • block data length the data length of the corresponding block on the rendering buffer 306
  • the block data length is updated to the size including the added drawing data
  • the drawing information data of the block to draw the polygon is read out.
  • a drawing image of only the polygon to be drawn in the corresponding block is created, and the drawing data is added to the rear address of the drawing data area of the corresponding block in the rendering buffer 306,
  • the block data length of the data is increased by the drawing data of the polygon and stored in the drawing information buffer 307.
  • the drawing data of the polygon to be added is created as in the case of the drawing image of the corresponding block, and the effective pixel data is generated, and the effective pixel flag of the polygon is stored in the rendering buffer 306 together with the effective pixel data.
  • the effective pixel data of the updated drawing image is again stored in the continuous address area of the rendering buffer 306, and the effective pixel data of the block is set according to the updated drawing image, and the block data length is the size of the effective pixel data of the block Set to and store in the drawing information browser. Repeat this for all blocks and all input polygons Thereafter, by outputting the data to the frame buffer 308 in the same manner as in the first embodiment, the display 910 can be displayed.
  • An image generation apparatus for drawing polygons in the above-described procedure has a force graphics engine 1302 that has substantially the same configuration as the image generation apparatus of the first embodiment described above has a configuration shown in FIG.
  • the difference from the first embodiment is that a condition judgment unit 701 is added.
  • the condition determination unit 701 receives the block data length of the drawing information data decoded by the data conversion unit 406, and
  • Rasterization unit 405 and data conversion unit 406 perform the processing of (1) or (2) according to the judgment of condition judgment unit 701.
  • the rasterizing unit 405 scans the internal coordinates of the polygon for each block to determine the block for drawing the polygon.
  • the data conversion unit 406 accesses the drawing information buffer 307, reads out the drawing information data of the corresponding block, performs decoding, and outputs the block data length of the drawing information data to the condition judgment unit 701.
  • the condition determination unit 701 makes the above determination from the block data length, and determines whether the process (1) or (2) is to be performed.
  • the rasterizing unit 405 first creates a drawing image of the input polygon in the block buffer 303.
  • the data conversion unit 406 creates an effective pixel flag and effective pixel data of the drawing image power of the block buffer 303, and adds the data to the corresponding block data of the rendering buffer 306. Do.
  • the data conversion unit 406 issues a read access request to the address in which the data of the corresponding block is stored in the rendering buffer 306 for the block data length.
  • the data conversion unit 406 When data reading is started, the data conversion unit 406 displays an effective image of the drawing information data. Element flag force The drawing image of the corresponding block is restored to the block buffer 303, and the subsequent read data is sequentially restored to the effective pixel flag and effective pixel data force polygon drawing image and output to the rasterizing unit 405.
  • the rasterizing unit 405 blends the drawn image of the polygon input from the data conversion unit 406 and the drawn image of the polygon input from the setup unit 404 with the block on the block buffer 303.
  • the data conversion unit 406 extracts effective pixel data from the drawn image on the block buffer 303 and stores it in the continuous address area of the rendering buffer 306, updates the effective pixel flag of the drawing information data, and Is set to the size of effective pixel data and stored in the drawing information buffer 307. After drawing all polygons, the process (2) is performed on all blocks and the result is stored in the frame buffer 308.
  • the number of memory accesses can be reduced by devising the method of storing the pixels in which the polygon is drawn in the rendering buffer 306.
  • the problem of memory read latency still remains, since each time a polygon is drawn, read access to the memory is performed.
  • polygon drawing data is temporarily written to the rendering buffer 306.
  • the time required to issue a memory request is the time required to issue a write request.
  • the memory reading request for the effective pixel of the block and the polygon drawing data added can be made continuously at one time. It can be reduced.
  • the memory read latency when processing N polygons at a time is the memory read latency when the memory read latency is sufficiently long with respect to the time for issuing a write request or read request. It becomes about 1ZN of the image generation device of form 1. As a result, the time required for memory access is reduced and the drawing speed is significantly increased.
  • the creation of drawing data of polygons to be added to the block data of the rendering buffer 306 is not limited to the compression method described in the present embodiment, and the run length method and the Hough method may be used. It is also possible to use a lossless compression method using a well-known lossless compression method such as the Man's method or a DCT (discrete cosine transform) for pixel values. Since one polygon drawing data is highly local, a higher compression rate can be achieved than a normal drawing image in which a plurality of polygons are drawn.
  • a lossless compression method such as the Man's method or a DCT (discrete cosine transform) for pixel values. Since one polygon drawing data is highly local, a higher compression rate can be achieved than a normal drawing image in which a plurality of polygons are drawn.
  • FIGS. 11 (a) to 11 (d) are diagrams showing an outline of a polygon drawing method in the present embodiment.
  • FIG. 11 (a) shows a drawing image of a block in which a plurality of polygons have already been drawn.
  • FIG. 11 (b) shows a polygon 802 to be additionally drawn in block 801 of FIG. 11 (a).
  • the drawing image of the polygon is added to the rendering buffer 306.
  • FIG. 11 (a) shows a drawing image of a block in which a plurality of polygons have already been drawn.
  • FIG. 11 (b) shows a polygon 802 to be additionally drawn in block 801 of FIG. 11 (a).
  • the drawing image of the polygon is added to the rendering buffer 306.
  • FIG. 11 (a) shows a drawing image of a block in which a plurality of polygons have already been drawn.
  • FIG. 11 (b) shows a polygon 802 to be additionally drawn in block 801 of FIG. 11 (a).
  • the setup coefficients of polygon 802 shown in c) (here, XY coordinates of vertex s, pixel values, Z values, XY coordinates of vertex c and vertex e, slope of sides sc and sides se and sides ce, pixel values and The Z value is added to the rendering buffer 306).
  • the setup coefficient is added, the data of the block on the rendering buffer 306 is as shown in FIG.
  • the procedure for drawing a polygon in the present embodiment is substantially the same as that in the second embodiment, but the data to be added to the rendering buffer 306 is a polygon when the block data length does not reach the specified size. It differs in that it is the setup coefficient of the polygon which is not in the drawing image of.
  • the block drawing image is restored, and then the pixel value and Z value inside each polygon are calculated for the first time, and blending with the block drawing image is performed.
  • the image generation apparatus for drawing polygons in the above procedure basically has the same configuration as the image generation apparatus shown in the second embodiment, but the operation for drawing polygons in each block is the same. It's a little different.
  • the rasterization unit 405 When the condition determination unit 701 determines that the polygon data is to be added, the rasterization unit 405 outputs the setup coefficient input from the setup unit 404 to the data conversion unit 406, and the data conversion unit 406 renders the setup coefficient. Store in the buffer 306, add the block data length of the drawing information data by the data length of the setup coefficient, and write information buffer Store in If the condition determination unit 701 determines that the polygon data and the drawing image of the block are to be combined, the data conversion unit 406 blocks the drawing image of the block from the effective pixel data on the rendering buffer 306 as in the second embodiment. Restore on the 306. The subsequent read data is output to the rasterization unit 405 as a setup coefficient. The rasterization unit 405 calculates the pixel values and Z values inside the respective polygons of the data conversion unit 406 and the setup unit 404, and the blend processing with the block drawing image on the block buffer 303 is performed. Do.
  • Anti-aliasing is a process that improves image quality by reducing jaggedness (aliasing) that appears at the boundaries of polygons when the polygons are displayed on the display.
  • drawing is performed at a resolution larger than the resolution of the display, and when writing to the frame buffer 308, the pixel values of a plurality of pixels of the rendering buffer 306 are averaged.
  • the method is well known.
  • the amount of data read from and written to the rendering buffer 306 is also N times. Therefore, in the image generation apparatus that updates the rendering buffer 306 each time a polygon is drawn, memory access must be performed N times each time, resulting in a long time for drawing processing. Also in the image generation apparatus of the second embodiment, both the effective pixel data of the block and the drawing data of the polygon become N times the amount of data, and the block data length can easily reach the specified size. Since the drawing image of the block is frequently synthesized, the amount of memory access increases and the drawing process takes a long time.
  • the image generation apparatus since the polygon setup coefficients are stored in the rendering buffer 306 independently of the processing resolution, an increase in block data length can be suppressed. It is possible to increase the interval for combining multiple drawn images with multiple polygons, and also to read / write N-fold effective pixel data and setup coefficients independent of resolution from the rendering buffer 306 even during combining. Because the amount of memory access is reduced, the drawing speed is significantly increased. For the same reason as the above-mentioned anti-aliasing processing, it goes without saying that the image generation apparatus according to the present embodiment has a great advantage even if it simply generates a frame of high resolution.
  • setup coefficient used in the description of the present embodiment is an example, and other setup coefficients such as texture and footer may be included, and if not used for drawing, the present embodiment It is not necessary to include the setup factor used in.
  • the setup coefficients stored in the rendering buffer 306 may be compressed using a generally known method such as run length method or Huffman method.
  • Embodiments 1 to 3 above not only the force memory described in the embodiment for storing pixel values and Z values in a memory such as a rendering buffer, but also magnetic recording media such as hard disks, DVDs, etc. It may be stored in an optical disc type recording medium such as a CD, or other recording medium.
  • the image generation apparatus of the present invention is used for various electronic devices equipped with a graphics drawing function, for example, mobile phones, PDAs, digital televisions, car navigation systems, home game machines, personal computers, etc. Is possible.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

 読み出し/書き込みの最小処理単位であるバースト長が大きなメモリを搭載した画像生成装置において、ポリゴンを描画するためレンダリングバッファにアクセスする場合であっても、メモリアクセス時の処理効率が低下しない画像生成装置等を提供する。  複数の画素からなるブロック単位でレンダリングバッファに画像データを格納する。このとき、ポリゴンに対応する画素の画像データをレンダリングバッファの連続する領域へ格納する。この際、ブロックに有効な画素が存在する旨を示す有効画素フラグを描画情報バッファに格納する。前記レンダリングバッファへのアクセスを、当該ブロックにおける有効画素フラグの配置に基づいて、必要最小限に行う。                                                                         

Description

明 細 書
画像生成装置および画像生成方法
技術分野
[0001] 本発明は、 3次元コンピュータグラフィックス技術に関し、特に 3次元空間内の物体 を対象とした陰面消去技術に関するものである。
背景技術
[0002] コンピュータの内部で表現された 3次元空間内の物体をディスプレイに表示するた めには、その物体を投影する 2次元平面(以下「ビュースクリーン」という。)上に投影 する必要がある。このとき、視線上に複数の物体が重なる場合は、手前の物体によつ て奥の物体の隠れる部分を消去してディスプレイに表示する必要がある。 3次元コン ピュータグラフィックス(以下「3DCG」ともいう。)の描画では、このような陰面消去手 法が不可欠となっている。
[0003] 一般によく用いられる陰面消去手法として、 Zバッファ法がある(例えば、非特許文 献 1参照)。図 1 (a)は、 Zバッファ法を説明するための図である。
[0004] Zバッファ法では、ビュースクリーン 900の各画素に対応する、視点 Vとビュースクリ ーン 900上の画素を結ぶ直線が面 (例えば、 3次元空間内の物体を表すポリゴン)と 交わる点の Z座標(以下「Z値」と 、う。)を格納するためのバッファ(以下「Zバッファ」と いう。)を用意する。 Z値は、視点から遠ざかるほど大きくなる値である。また、各画素 の画素値 (例えば、カラー値や輝度値)を格納するためのバッファ(以下「フレームバ ッファ」という。)を用意する。
[0005] 図 1 (a)では、 3次元空間内の互いに交差する 2つのポリゴン 910とポリゴン 920が ある場合に、これらのポリゴンをビュースクリーン 900に投影させた場合の様子を示し ている。この場合、ビュースクリーン 900の画素 930に投影される部分は、ポリゴン 91 0の点 Aの部分であり、ポリゴン 920の点 Bは、ポリゴン 910の点 Aによって隠されてし まう。これは、視点 V力も画素 930までの直線を延長して、視点 V—点 B間の距離 ZB より視点 V—点 A間の距離 ZAの方が短いため、視点 Vから見て、より手前にあるポリ ゴン 910の点 Aのみがビュースクリーン 900に投影される力もである。 [0006] 図 1 (b)は、 Zバッファ法を用いて陰面消去を行った (即ち、ビュースクリーン 900上 にポリゴン 910およびポリゴン 920を投影した)場合の画像の表示例である。図 1 (b) では、各ポリゴンの Z値が小さ 、部分ほど濃 、黒で表されて!/、る。
[0007] Zバッファ法を用いて陰面消去を行う場合の手順は、以下の通りである。
(1)ビュースクリーン上のすべての画素について、 Zバッファ内の Z値を「 +∞」に、フ レームバッファ内の画素値を「背景色」にそれぞれ初期化する。
(2) 3次元空間(「ビューボリューム」とも 、う。)内の全ての投影対象のポリゴンを順次 ビュースクリーンに投影させ、各ポリゴンに対応する全ての画素について、以下に示 す処理を行う。
(2— 1)処理対象のポリゴンに対応する画素毎に Z値を計算する。
(2— 2)上記(2—1)で計算した Z値が、 Zバッファに格納されている、対応する画素 の Z値よりも小さいときのみ、その画素について画素値を計算し、 Zバッファ内の Z値 およびフレームバッファ内の画素値を更新する。
[0008] 次に、 Zバッファ法を用いて陰面消去を行う場合の手順について、図 2 (a)〜(d)を 参照しながら、さらに具体的に説明する。
[0009] 図 2 (a)は、ポリゴン 901につ!/、て既に描画を終えた、 8 X 8画素から構成される画 像の一例である(なお、図 2 (a)では、メモリアドレスを [N— M]で示している)。また、 図 2 (b)は、図 2 (a)に新たなポリゴン 902をカ卩えて描画した画像である。図 2 (a)およ び (b)の各升目には、それぞれの画素に対応する Z値を示している。図 2 (c)は、上 記図 2 (a)に対応するフレームバッファに格納されている画素値および Zバッファに格 納されて!/、る Z値の一例である。
[0010] 図 2 (b)に示されるように、ポリゴン 901を描画した画像にポリゴン 902を追加して描 画する場合は、ポリゴン 902に対応する各画素のうち、既にポリゴン 901に対応する 各画素の Z値よりも小さい Z値を持つ画素のみが採用され、ビュースクリーンに描画さ れる。
[0011] 以上の処理を終了した後のフレームバッファに格納されている画素値および Zバッ ファに格納されている Z値を図 2 (d)に示す。図 2 (d)に示されるように、ポリゴン 902 に対応する画素の Z値がポリゴン 901に対応する画素の Z値より小さい場合のみ、そ れぞれの画素値および z値が更新されて 、る。
[0012] 以上の手順により、最終的にフレームバッファには、ビュースクリーンに相当する実 際のディスプレイに表示すべき陰面消去が施された画像の画像データが格納される
[0013] 上記のように、 Zバッファ法は、ビュースクリーン上の全ての画素に対する画素値と Z 値とを格納するための大容量のバッファ (メモリ)を必要とする力 アルゴリズムが単純 であるため、ハードウェア化し易ぐ多くのリアルタイムレンダリングを行う装置に用い られている。
非特許文献 1 :荒屋真ニ著「明解 3次元コンピュータグラフィックス」共立出版 2003 年
発明の開示
発明が解決しょうとする課題
[0014] し力しながら、上記 Zバッファ法を用いた従来の画像生成装置では、各ポリゴンに対 応する各画素について、フレームバッファおよび Zバッファに対して頻繁に読み書き を行う必要があるため、膨大なメモリアクセスが発生する。そのため、フレームバッファ および Zバッファへのアクセスにつ!/、ては、高速なアクセスが要求される。
[0015] また、 3次元コンピュータグラフィックスにおいて、描画処理効率を最大限に発揮さ せるためには、読み出し Z書き込みの最小処理単位のデータ長(以下「バースト長」 、う。 )を 1画素分のデータ (画素値および Z値を含む)長程度とするのが好ましく、 また、読み出し Z書き込みの待ち時間(以下「レイテンシ」という。)が短いメモリを用 いる必要がある。
[0016] ところ力 1チップで様々な機能を搭載する、 3次元コンピュータグラフィックス処理 につ 、て特に考慮をして!/ヽな 、システム LSIにお!/、ては、必ずしも 3次元コンビユー タグラフィックス処理に最適なメモリが搭載されて 、な 、場合 (例えば、読み出し Z書 き込みの際のバースト長が 1画素分のデータよりもはるかに長い場合)が多い。上記 のシステム LSIのように、読み出し Z書き込みの際のバースト長が 1画素分のデータ よりもはるかに長い場合は、描画処理中のポリゴンに関係のない画素の画素データも 一緒にアクセスされてしま 、、メモリアクセス時の処理効率が低下する。 [0017] さらに、メモリアクセス時のレイテンシが長い場合は、その待ち時間をほとんど描画 処理に充てることができず、ただ無為に待っていなければならない。そのため、描画 処理における処理効率が低下し、滑らかな動きの画像が得られないなど、画質の低 下等を招くという課題がある。
[0018] そこで、本発明は、上記課題に鑑みてなされたものであり、 Zバッファ法を適用して 陰面消去を行う場合でも、描画処理における処理効率の低下を回避し得る画像生成 装置等を提供することを目的とする。
課題を解決するための手段
[0019] 本発明では、上記課題を解決するために以下の手段を講じた。すなわち、ポリゴン の描画処理を複数の画素力 構成されるブロック毎に行い、前記ブロックのポリゴン が描画された画素のデータである有効画素データ力 構成されるメモリ格納イメージ を作成する。さらに、前記有効画素データを前記メモリ格納イメージに従ってレンダリ ングバッファの連続アドレス領域に格納し、前記メモリ格納イメージを描画情報データ にエンコードし、前記描画情報データを描画情報バッファに格納する。さらにまた、前 記レンダリングバッファへのメモリアクセスは、あら力じめ参照された前記描画情報デ ータがデコードされた結果であるメモリ格納イメージに基づいて必要最小限に行う。
[0020] 上記の課題を解決するために、本発明に係る画像生成装置は、仮想的に定義され た空間内の物体をビュースクリーンに投影することによって画像を生成する画像生成 装置であって、前記物体は複数のポリゴンによって表現され、ビュースクリーンの全て の各画素に対して、少なくとも一のポリゴンが前記ビュースクリーンに投影される位置 に存在するか否かを示す有効画素フラグの値を決定するフラグ値決定手段と、決定 された前記有効画素フラグに対応させて、ポリゴンに対応する画素の画素値をレンダ リングバッファの連続アドレス領域に格納する画素値格納手段と、決定された前記有 効画素フラグの値に従って、前記レンダリングバッファに格納されている前記画素値 をフレームバッファに展開する展開手段とを備えることを特徴とする。
[0021] これにより、陰面消去を伴うポリゴンの描画においては、描画に必要な有効画素の データは描画情報データに従って前記レンダリングバッファの連続アドレス領域に格 納するため、メモリアクセスを簡素に実現し、メモリアクセス量を大幅に低減することが できる。
[0022] また、前記画像生成装置は、さらに、前記ビュースクリーンを複数のブロックに分割 する分割手段とを備え、前記フラグ値決定手段は、分割された一のブロック毎に前記 有効画素フラグの値を決定し、前記画素値格納手段は、前記ブロック毎に前記レン ダリングバッファへの前記格納を行い、前記展開手段は、すべてのブロックについて 前記レンダリングに格納された前記画素値を前記フレームバッファに展開することとし てもよい。
[0023] また、前記画素値格納手段は、さらに、前記一のブロックについて、当該ブロックに おける前記レンダリングバッファ上の前記画素値のデータ長を算出するデータ長算 出部と、算出された前記データ長を前記レンダリングバッファに付加するデータ長付 カロ咅とを備えることとしてもよ 、。
[0024] また、前記画素値格納手段は、さらに、前記一のブロックに一のポリゴンが描画され たとき、前記ポリゴンの形態を特定し得る情報を用いて前記画素値を生成し、生成さ れた当該画素値を前記レンダリングバッファに格納することとしてもよい。
[0025] また、前記画素値格納手段は、前記ポリゴンの形態を特定し得る情報を用いて前 記画素値の補間計算を行う補間計算部を備え、前記補間された画素値を前記レンダ リングバッファに格納することとしてもよい。
[0026] さらに、本発明に係るデータ記録媒体は、仮想的に定義された空間内の物体をビ ユースクリーンに投影することによって画像を生成する画像生成装置に用いられるデ ータ記録媒体であって、前記物体は複数のポリゴンによって表現され、前記画像生 成装置は、ビュースクリーンの全ての各画素に対して、少なくとも一のポリゴンが前記 ビュースクリーンに投影される位置に存在するカゝ否かを示す有効画素フラグの値を決 定するフラグ値決定手段と、決定された前記有効画素フラグに対応させて、ポリゴン に対応する画素の画素値を決定する画素値決定手段と、決定された前記有効画素 フラグの値に従って、決定された前記画素値をフレームバッファに展開する展開手段 とを備え、前記データ記録媒体は、決定された前記有効画素フラグおよび前記画素 値の少なくとも一方を、連続するアドレス領域に格納することを特徴とする。
[0027] なお、本発明は、上記画像生成装置における特徴的な構成手段をステップとする 画像生成方法として実現したり、それらステップをパーソナルコンピュータ等に実行さ せるプログラムや集積回路として実現したりすることもできる。そして、そのプログラム を DVD等の記録媒体やインターネット等の伝送媒体を介して広く流通させることがで きるのは云うまでもない。
発明の効果
[0028] 本発明に係る画像生成装置は、複数の画素力 なるブロック単位で、かつポリゴン が描画された画素(以下「有効画素」という。 )をレンダリングバッファの連続アドレス領 域に格納するので、後のポリゴンの描画においては、描画に必要な有効画素のデー タは描画情報データに従って前記レンダリングバッファの連続アドレス領域にのみァ クセスすればよぐバースト読み出しを行った際の無駄なデータを減らすことができ、 メモリアクセス量を大幅に低減することができる。
[0029] したがって、 3次元コンピュータグラフィックス処理を特に考慮して!/ヽな 、、アクセス 時のバースト長が大きなメモリを搭載したシステム LSIにおいても、描画処理を高速 に行うことができると 、う効果がある。
[0030] また、 3次元コンピュータグラフィックス処理におけるメモリアクセス量を減らすことで 、上記システム LSIに含まれる 3DCG処理以外の機能モジュールによるメモリァクセ スに悪影響を与えな ヽと ヽぅ効果もある。
図面の簡単な説明
[0031] [図 1]図 1 (a)は、 Zバッファ法を説明するための図である。 (b)は、 Zバッファ法を用い て陰面消去を行った画像の表示例である。
[図 2]図 2 (a)は、あるポリゴンについて描画を終えた 8 X 8画素力も構成される画像の 一例である。 (b)は、上記図 2 (a)に新たなポリゴンを加えて描画した画像の一例であ る。(c)は、上記図 2 (a)のポリゴンに対応するフレームバッファに格納されている画素 値および Zバッファに格納されている Z値の一例である。(d)は、上記図 2 (b)のポリゴ ンに対応するフレームバッファに格納されている画素値および Zバッファに格納され ている Z値の一例である。(e)は、 Zバッファ法によって更新された、フレームバッファ に格納されて 、る画素値および Zバッファに格納されて 、る Z値の一例である。
[図 3]図 3は、実施の形態 1に係る画像生成装置のハードウェア構成を示すブロック図 である。
[図 4]図 4は、実施の形態 1に係るグラフィックスエンジンの機能構成を示すブロック図 である。
[図 5]図 5 (a)は、実施の形態 1におけるレンダリングバッファ上のポリゴンの描画ィメ ージを示す図である。(b)は、あるポリゴンを描画する際のカラー値と Z値の一例を示 す図である。 (c)は、他のポリゴンを描画する際のカラー値と Z値の一例を示す図であ る。 (d)は、上記 (b)のポリゴンと上記 (c)のポリゴンとを合成して描画する際のカラー 値と Z値の一例を示す図である。
[図 6]図 6 (a)は、初期化された有効画素フラグのテーブルの一例を示す図である。 ( b)は、上記図 5 (b)に対応する有効画素フラグのテーブルの一例を示す図である。 ( c)上記図 5 (c)に対応する有効画素フラグのテーブルの一例を示す図である。 (d)は 、上記図 5 (d)に対応する有効画素フラグのテーブルの一例を示す図である。
[図 7]図 7は、実施の形態 1における画像生成装置の処理の流れを示すフローチヤ一 トである。
[図 8]図 8は、実施の形態 1における効果を説明するための図である。
[図 9]図 9 (a)は、実施の形態 2におけるレンダリングバッファ上のポリゴンの描画ィメ ージの一例を示す図である。(b)は、実施の形態 2におけるレンダリングバッファ上の ポリゴンの描画イメージの他の例を示す図である。 (c)〜(e)は、上記図 9 (b)のポリゴ ンを分解した様子を示す図である。(f)は、実施の形態 2におけるレンダリングバッフ ァに格納されるデータの一例を示す図である。
[図 10]図 10は、実施の形態 2に係るグラフィックスエンジンの機能構成を示すブロック 図である。
[図 11]図 11 (a)は、実施の形態 3におけるレンダリングバッファ上のポリゴンの描画ィ メージの一例を示す図である。 (b)は、実施の形態 3において追加して描画するポリ ゴンのイメージの一例を示す図である。(c)は、実施の形態 3におけるセットアップ係 数の一例を示す図である。(d)は、実施の形態 3におけるレンダリングバッファに格納 されるデータの一例を示す図である。
符号の説明 101 描画領域
102 ブロック
300 画像生成装置
301 CPU (中央演算装置)
302、 1302 グラフィックスエンジン
303 ブロックノ ッファ
304 メモリコントローラ
305 メモリ
306 レンダリングバッファ
307 描画情報バッファ
308 フレームノ ッファ
309 ディスプレイコントローラ
310 ディスプレイ
311 CPUバス
312 メモリノくス
401 ホストインターフェース
402 制御部
403 頂点処理部
404 セットアップ部
405 ラスタライズ咅
406 データ変換部
407 メモリバスインターフェース
501 ブロック内部に描画されたポリゴン
502 ブロックに跨って描画されたポリゴン
601 ポリゴンが描画されたブロック
602 ブロックに追加描画するポリゴンストリップ
603- -605 ポリゴンストリップを構成するポリゴン
701 条件判断部 801 ポリゴンが描画されたブロック
802 ブロックに追加描画するポリゴン
900 ビュースクリーン
901 先に描画されたポリゴン
902 後から描画されたポリゴン
910 ポリゴン
920 ポリゴン
発明を実施するための最良の形態
[0033] 以下、本発明に係る実施の形態について、図面を参照しながら説明する。なお、以 下の実施の形態において、本発明について図面を用いて説明する力 本発明をこれ らに限定することを意図するものではない。
[0034] (実施の形態 1)
図 3は、本実施の形態に係る画像生成装置 300のハードウェア構成を示すブロック 図である。図 3に示す画像生成装置 300は、 3次元コンピュータグラフィックスの陰面 消去処理に伴うメモリアクセス量を大幅に低減し得る画像生成装置であり、 CPU301 、グラフィックスエンジン 302、ブロックバッファ 303、メモリコントローラ 304、メモリ 305 、ディスプレイコントローラ 309およびディスプレイ 310を備える。さらに、メモリ 305は 、レンダリングバッファ 306、描画情報バッファ 307およびフレームバッファ 308を備え る。
[0035] CPU301は、制御プログラムを格納する ROM、および RAM等を備え、 CPUバス 311を介してグラフィックスエンジン 302に描画命令を発行する。
[0036] グラフィックスエンジン 302は、 CPU力も受け付けた描画命令に従って陰面消去を 伴う描画処理を行うと共に、 CPUノ ス 311を介して CPU301に描画処理に関する割 り込み要求などを行う。なお、 CPU301、グラフィックスエンジン 302およびディスプレ イコントローラ 309は、メモリバス 312を介してメモリコントローラ 304に接続されており 、それぞれメモリ 305にアクセスして必要なデータの読み書きを行う。
[0037] ブロックバッファ 303は、描画領域を分割したブロック毎に描画イメージを展開する ための作業用バッファであり、グラフィックスエンジン 302に直接接続されている。ここ で、「描画イメージ」とは、グラフィックスエンジンのラスタライズ部における描画処理( 画素処理)で直接用いることのできる非圧縮のデータであり、画素値と Z値とを含むも のをいう。なお、ブロックバッファ 303には、読み書きを高速に行うレジスタもしくは SR AM (Static Random Access Memory)を用いるのが望ましい。
[0038] メモリ 305における各バッファは、 DRAM (Dynamic Random Access Memory)など の大容量メモリを用いるのが望ましい。なお、本実施の形態では、これらのバッファは 1つのメモリに集約させた力 別々のメモリに分散させてもよい。
[0039] レンダリングバッファ 306は、グラフィックスエンジン 302における描画(即ち、画像 データを生成)を行う際の作業用のバッファであり、画素値や Z値を含む陰面消去に 必要なデータなどを格納する。
[0040] 描画情報バッファ 307は、前記ブロック用のレンダリングバッファ上のメモリ格納ィメ ージを格納する作業用のバッファであり、各ブロックの描画情報データを格納する。 なお、描画情報バッファ 307は、その一部または全部がレンダリングバッファ 306に含 まれてもよい。また、描画情報バッファ 307は、ブロックバッファ 303と同様に、高速な 読み書きが可能なレジスタまたは SRAMによって構成することとしてもよい。
[0041] フレームバッファ 308は、最終的にディスプレイ 310に表示される画像の画像デー タを格納するバッファであり、グラフィックスエンジン 302によって生成された画像デー タが格納される。なお、フレームバッファ 308に格納された画像データは、ディスプレ イコントローラ 309によって読み出され、ディスプレイ 310に出力される。
[0042] 図 4は、上記図 3におけるグラフィックスエンジン 302の機能構成を示すブロック図 である。図 4に示されるように、グラフィックスエンジン 302は、ホストインターフェース 4 01、制御部 402、頂点処理部 403、セットアップ部 404、ラスタライズ部 405、データ 変換部 406およびメモリバスインターフェース 407を備える。
[0043] ホストインターフェース 401は、 CPUバス 311を介して、 CPU301から描画命令等 の描画制御信号を受け付け、又は、 CPU301へグラフィックスコアの割り込み信号等 を出力する。
[0044] 制御部 402は、 CPU301から受け付けた描画命令に付随するポリゴンデータを頂 点処理部 403に出力する。 [0045] 頂点処理部 403は、制御部 402から入力したポリゴンデータを用いて、各ポリゴン の頂点 (ポリゴンが三角形の場合は 3頂点)に対して光源計算や座標変換処理等を 行い、その結果をセットアップ部 404に出力する。
[0046] セットアップ部 404は、各ポリゴンにおける頂点の座標、これらの頂点に対応する画 素の画素値および Z値などの係数から、当該ポリゴンを囲む直線の傾き、当該ポリゴ ンに対応する他の画素の画素値および Z値などの係数の補間値を計算して、ラスタラ ィズ部 405に出力する。なお、この際の補間計算のための方式は、線形補間ゃスプ ライン関数等の関数式を用いた補間など、いろいろな方式が考えられるが、特に限 定はしない。
[0047] ラスタライズ部 405は、セットアップ部 404が入力した係数やセットアップ部 404で計 算された係数の補間値 (以下「セットアップ係数」と!、う。)を用いてポリゴンの描画処 理を行う。
[0048] データ変換部 406は、メモリ 305に存在するレンダリングバッファ 306および描画情 報バッファ 307に格納されているデータのデコードおよびエンコードを行う。
[0049] 次に、本実施の形態に係るラスタライズ部 405においてポリゴンを描画する際の処 理の流れについて説明する。まず、ラスタライズ部 405は、ポリゴンの内部座標をプロ ック毎に走査して、ポリゴンを描画するブロックを決定する。
[0050] 次に、データ変換部 406は、メモリバスインターフェース 407を介して、描画情報バ ッファ 307にアクセスし、決定された前記ブロックの描画情報データを読み出す。さら に、データ変換部 406は、描画情報データの有効画素フラグの内容に従ってメモリ バスインターフェース 407を介してレンダリングバッファ 306に必要最小限の読み出し アクセスを行う。さらに、データ変換部 406は、読み出された有効画素データをブロッ クバッファ 303に展開して描画イメージを復元する。
[0051] その後、ラスタライズ部 405は、上記ポリゴンの内部の画素について、画素値および Z値を算出して、ブロックバッファ 303に展開した描画イメージとのブレンド処理を行う 。ここで、「ブレンド処理」とは、 Z値を用いた陰面消去処理や画素値に含まれる α成 分 (混合率)を用いた半透明処理など、処理済みの描画されたポリゴンと現在処理中 のポリゴンとを合わせ込む処理の総称を 、う。 [0052] 最後に、データ変換部 406は、ブロックバッファ 303上の描画イメージ力 有効画素 データを取り出してレンダリングバッファ 306の連続アドレス領域に格納し、有効画素 フラグを更新して描画情報データを描画情報バッファ 307に格納する。
[0053] 全てのポリゴンの描画が終わった後、データ変換部 406は、レンダリングバッファ 30 6の内容を、ディスプレイ 310に表示可能な形式に変換してフレームバッファ 308に 格納する。なお、頂点処理部 403とセットアップ部 404の処理は CPU301で行うこと も可能である力 その場合は、制御部 402から直接ラスタライズ部 405にセットアップ データが出力される。
[0054] 図 5は、本実施の形態におけるポリゴンの描画方法の概要を示す図である。
図 5 (a)は、レンダリングバッファ 306上のポリゴンの描画イメージである。図 5 (a)で は、ビュースクリーンの描画領域 101を分割 (本実施例では、 48分割)することによつ て生成された、複数の画素から構成されるブロック 102 (本実施例では、 8 X 8画素と したが、これ以外の画素でブロックを構成してもよい。 )にポリゴン 103を描画する様 子を示している。
[0055] 図 5 (a)のポリゴンの内部の画素値は、カラー値を示している。ブロック 102にポリゴ ン 901を描画すると、ポリゴン 901の内部の画素が描画される。本実施の形態では、 ポリゴンを描画した際の対応する画素を「有効画素」という。ポリゴン 901を描画した 後のブロック 102については、有効画素のデータ(画素値および Z値を含む)のみレ ンダリングバッファ 306に格納する。このとき、各有効画素データは、図 5 (b)に示すよ うに、レンダリングバッファ 306の連続したアドレス領域に格納する。ブロック 102の描 画情報データは、ブロックの各画素にポリゴンが描画されたかどうかを示すフラグ (以 下「有効画素フラグ」という。)であり、図 6 (a)のようなテーブル形式で格納される。最 初、有効画素フラグの値は、ポリゴンが描画されていないことを表す値「0」に初期化 される力 そのうちポリゴンが描画されると、その描画を表す画素に対応するフラグに 値「1」が設定されて、図 6 (b)のように更新され、描画情報バッファ 307に格納される
[0056] ブロック 102に、さらにポリゴンを描画するときは、図 6 (b)のテーブルを参照して図 5 (b)のメモリ格納イメージをデコードすることで有効画素データを参照することができ る。
[0057] 以下に、本実施の形態におけるポリゴンを描画する際に行う陰面消去の詳細な手 順について説明する。まず、ポリゴンを描画するブロックの描画情報データを読み出 す。描画情報データの有効画素フラグの値から、レンダリングバッファ 306に格納さ れた有効画素データの位置が判別できる。例えば、図 5 (b)のレンダリングバッファ 3 06の格納状態から、図 5 (a)のブロック 102の描画イメージを復元するとき、図 6 (b) の有効画素フラグの値「1」が設定されている画素に対しては、レンダリングバッファ 3 06から読み出した有効画素データをアドレス順に割り当て、値「0」が設定されている 有効画素フラグに対応する画素に対しては、画素値および Z値の初期値を割り当て ることで復元できる。また、有効画素フラグの値「1」が設定されている画素の数は有 効画素の数を表すので、有効画素データの読み出しはレンダリングバッファ 306の該 当するブロックの先頭アドレスから「(有効画素数) X (1画素分のデータ量)」分だけメ モリアクセスを行えばよい。
[0058] 上記の例では、図 5 (b)のレンダリングバッファ 306における「メモリアドレス 0」から「 メモリアドレス 10」までが有効画素データが格納された領域 (以下「有効画素データ 領域」という。)であり、この部分に対してのみ読み出しアクセスを行えば、すべての有 効画素データを読み出すことができる。
[0059] 以上のような手順で、読み出す有効画素データの対応する画素と有効画素データ 領域を決定して、レンダリングバッファの有効画素データ領域力 有効画素データを 読み出し、ブロック単位の描画イメージを復元する。
[0060] 次に、新たに描画するポリゴン、復元されたブロックの描画イメージの画素値および Z値を用いてブロックの陰面消去処理を行う。こうして作成された新たなブロック描画 イメージのうち、有効画素のデータを再びレンダリングバッファ 306の該当するブロッ クの先頭アドレス力 順に格納し、さらに描画情報データの有効画素フラグを新たに 有効画素となった画素のフラグの値を「1」に更新して描画情報バッファ 307に格納 する。
[0061] これを全てのブロックおよび全ての入力ポリゴンにつ!/、て繰り返し行う。
上記の手順に従って、最終的にディスプレイ 310に複数のポリゴン力も構成される 物体の画像を生成するには、レンダリングバッファ 306に格納されたブロックの有効 画素データを前記ブロックの描画のときと同様に読み出してブロックの描画イメージを フレームバッファ 308上のブロックの位置に相当するアドレス領域に展開すればよい
[0062] 次に、以上のように構成される画像生成装置 300の動作について説明する。図 7は 、画像生成装置 300の処理の流れを示すフローチャートである。
[0063] 最初に、制御部 402は、ホストインターフェース 401を介して描画対象の物体のポリ ゴンデータを取得し (S702)、レンダリングバッファ 306に格納する。さらに、制御部 4 02は、メモリ 305内の各バッファに対して初期化処理を行う(S704)。次に、制御部 4 02は、ビュースクリーンを 8 X 8画素から構成される N個(本実施例では 48個)のブロ ックに分割する(S706)。
[0064] この後、制御部 402は、全てのブロックについて以下の処理を行うように、各部を制 御する(S708〜720)。
[0065] まず、ラスタライズ部 405は、当該ブロックにポリゴンが存在する力否かを判定し(S7 10)、ポリゴンがある場合は(S710 : Yes)、当該ブロックの全ての画素について、以 下の処理を行う(S712〜S718)。
[0066] ラスタライズ部 405は、各ポリゴンに対応する画素の Z値を比較し、 Z値が小さ 、場 合にそのポリゴンが投影された画素の画素値 (例えば、カラー値)および Z値を更新 する(S714)。さらに、ラスタライズ部 405は、そのポリゴンが投影された画素に対応 する有効画素フラグを設定する(S716)。
[0067] 次に、図 8を用いて、本実施の形態に係る画像生成装置 300の効果について説明 する。ここでは、メモリの読み出しバースト長を 4 X 4画素分のデータ長とし、ブロック は 8 X 8画素力 構成されるものとする。従来の画像生成装置では、バースト長に合 わせて 4 X 4画素単位で描画を行い、本実施の形態の画像生成装置 300では、 8 X 8画素単位で描画を行うこととする。このとき、ポリゴン 501が描画された画素のデータ をメモリから読み出す場合、従来の画像生成装置では 4回のメモリアクセスを行う必 要があるが、本実施の形態の画像生成装置 300では、有効画素データをレンダリン グバッファ 306の連続アドレス領域に集めて格納して!/、るので、 1回のメモリアクセス を行うだけでよい。また、ブロックに跨って描画されたポリゴン 502に対応するメモリの 読み出しについても、従来の画像生成装置では 3回であるが、本実施の形態の画像 生成装置 300では 2回と、メモリアクセス回数を低減させることができる。なお、有効画 素の位置情報は、描画情報バッファ 307で管理されているため、メモリアクセスの効 率をさらに高めるために、レンダリングバッファ 308に格納するデータに対してランレ ングス法ゃノ、フマン法などの一般に良く知られている方法で圧縮を行うこともできる。
[0068] 本実施の形態においては、レンダリングバッファ 308に格納する前記有効画素デー タとして、画素値と Z値とを例示した力 Z値を用いない陰面消去法を行う場合は、も ちろん Z値がなくてもよい。
[0069] (実施の形態 2)
図 9 (a)〜 (f)は、実施の形態 2におけるポリゴンの描画方法の概要を示す図である
[0070] 図 9 (a)は、既にポリゴンが描画されたブロックの描画イメージを示す図である。図 9
(b)は、上記図 9 (a)のブロック 601に追加で描画するポリゴンストリップ 602の描画ィ メージを示す図である。上記実施の形態 1では、新たなポリゴンを描画する度にレン ダリングバッファ 306にアクセスしてブロック単位で有効画素データの読み書きを行つ て描画イメージの更新を行ったが、本実施の形態では、ひとまずレンダリングバッファ 306への読み出しアクセスは行わずに、新たに描画するポリゴンの描画イメージを作 成し、描画データをレンダリングバッファ 306の該当ブロックのデータ領域の末尾に 追記する方法を採用する。追記するポリゴンの描画データを管理するために、描画 情報データに上記実施の形態 1で用いた有効画素フラグに加えて、レンダリングバッ ファ 306上の該当ブロックのデータ長(以下「ブロックデータ長」と!、う。 )を含めること とする。例えば、図 9 (a)のブロック 601に、図 9 (b)のポリゴンストリップ 602を描画す る場合、ポリゴンストリップ 602を構成するポリゴン 603、ポリゴン 604およびポリゴン 6 05については、それぞれポリゴン内部の画素値および Z値を計算して描画イメージを 作成し、描画データをレンダリングバッファ 306のブロック 601の有効画素データが格 納されたメモリ領域の後方アドレスに追記する。レンダリングバッファ 306上のブロック 601のデータは、図 9 (f)に示すように、ブロック 601の有効画素データの後に格納さ れる。このとき、ブロックデータ長を、追記した描画データを含めたサイズで更新する
。ブロックデータ長があるサイズに達したところで、レンダリングバッファ 308の有効画 素データおよびポリゴンの描画データを格納した該当ブロックのデータ領域へ読み 出しアクセスを行い、 1つの描画イメージに合成する。
[0071] 以下、本実施の形態におけるブロックの描画の詳細な手順について説明する。ま ず、ポリゴンを描画するブロックの描画情報データを読み出す。ここで、該当ブロック の描画情報データのブロックデータ長が指定された大きさに達している力否かにつ いて判定する。この場合、当該ブロックのブロックデータ長が指定された大きさに達し て ヽる場合は「真」、指定された大きさに達して ヽな ヽ場合は「偽」と判定する。
[0072] 前記判定で「偽」の場合は、該当ブロックに描画するポリゴンのみの描画イメージを 作成して、描画データをレンダリングバッファ 306の該当ブロックの描画データ領域の 後方アドレスに追記し、描画情報データのブロックデータ長をポリゴンの描画データ 分だけ増やして、描画情報バッファ 307に格納する。ここで、追記するポリゴンの描画 データは、該当ブロックの描画イメージと同様に、有効画素データ力 作成して、ポリ ゴンの有効画素フラグは有効画素データとともにレンダリングバッファ 306に格納する 。前記判定で「真」の場合、もしくは最終結果の画像を出力する場合は、まず、描画 情報データのブロックデータ長からブロックデータ長分だけレンダリングバッファ 306 に読み出しアクセスを行う。レンダリングバッファ 306からのデータ読み出しが開始さ れると、はじめに描画情報データの有効画素フラグから上記実施の形態 1と同様の手 順でそのブロックの描画イメージを復元する。
[0073] その後、これまで合成していなかったポリゴンの描画イメージをレンダリングバッファ 306から読み出されたポリゴンの有効画素フラグと有効画素データ力も描画イメージ を復元し、順次ブロックの描画イメージとのブレンド処理を行う。
[0074] 最後に、今回入力されたポリゴンとブロックの描画イメージとのブレンド処理を行う。
更新された描画イメージの有効画素データを再度レンダリングバッファ 306の連続ァ ドレス領域に格納し、ブロックの有効画素データを更新した描画イメージに合わせて 設定し、ブロックデータ長はブロックの有効画素データのサイズに設定して描画情報 ノ ッファに格納する。これを全てのブロックおよび全ての入力ポリゴンについて繰り返 した後に、上記実施の形態 1と同様の手順でフレームバッファ 308に出力することで ディスプレイ 910に表示が可能となる。
[0075] 上記手順で、ポリゴン描画を行う画像生成装置は、上記実施の形態 1の画像生成 装置とほぼ同様の構成である力 グラフィックスエンジン 1302は、図 10に示す構成と なる。上記実施の形態 1と異なるところは、条件判断部 701が追加された点である。 条件判断部 701は、データ変換部 406がデコードした描画情報データのうちブロック データ長を受け取って、
(1)レンダリングバッファ 306に読み出しアクセスしないで、ラスタライズ部 405に入力 されたポリゴンのみの描画データをレンダリングバッファ 306に追記する、若しくは、
(2)レンダリングバッファ 306に読み出しアクセスを行い、ブロックの描画イメージとこ れまで追記されたポリゴンの描画イメージおよびラスタライズ部 405に入力されたポリ ゴンのブレンド処理を行う、のどちらを行うかを判断する。
[0076] ラスタライズ部 405およびデータ変換部 406は、条件判断部 701の判断に従って上 記(1)または(2)の処理を行う。
[0077] 本実施の形態における描画処理は、上記実施の形態 1と同様に、ラスタライズ部 40 5がポリゴンの内部座標をブロック毎に走査して、ポリゴンを描画するブロックを決定 する。次に、データ変換部 406は、描画情報バッファ 307にアクセスして該当ブロック の描画情報データを読み出してデコードを行 、、描画情報データのうちブロックデー タ長を条件判断部 701に出力する。
[0078] 条件判断部 701は、ブロックデータ長から上記判断を行い、上記(1)または(2)の 処理を行うかを決定する。(1)の処理を行う場合、まず、ラスタライズ部 405は入力さ れたポリゴンの描画イメージをブロックバッファ 303に作成する。次に、データ変換部 406は、上記実施の形態 1と同様に、ブロックバッファ 303のポリゴンの描画イメージ 力も有効画素フラグと有効画素データを作成し、レンダリングバッファ 306の該当ブロ ックのデータに追記する。(2)の処理を行う場合、データ変換部 406はブロックデータ 長の分だけレンダリングバッファ 306の該当ブロックのデータが格納されているァドレ スに読み出しアクセス要求を発行する。
[0079] データ読み出しが開始されると、データ変換部 406は、描画情報データの有効画 素フラグ力 該当ブロックの描画イメージをブロックバッファ 303に復元し、後の読み 出しデータを順次有効画素フラグと有効画素データ力 ポリゴンの描画イメージに復 元してラスタライズ部 405に出力する。ラスタライズ部 405は、データ変換部 406から 入力されたポリゴンの描画イメージおよびセットアップ部 404から入力されたポリゴン とブロックバッファ 303上のブロックの描画イメージとブレンド処理を行う。
[0080] 最後に、データ変換部 406はブロックバッファ 303上の描画イメージから有効画素 データを取り出してレンダリングバッファ 306の連続アドレス領域に格納し、描画情報 データの有効画素フラグを更新し、ブロックデータ長を有効画素データのサイズに設 定して描画情報バッファ 307に格納する。全てのポリゴンの描画が終わった後は、全 てのブロックに対して(2)の処理を行って結果をフレームバッファ 308に格納する。
[0081] 次に、本実施の形態に係る画像生成装置の効果について説明する。上記実施の 形態 1の画像生成装置 300では、ポリゴンを描画した画素のレンダリングバッファ 306 への格納方法を工夫することでメモリアクセス回数を低減することができた。しかし、 ポリゴンの描画の度にメモリへの読み出しアクセスを行うため、メモリ読み出しレイテン シの問題は依然として残る。この問題に対して、本実施の形態の画像生成装置では 、ポリゴン描画データをひとまずレンダリングバッファ 306に書き込む。メモリへの書き 込みについては、一般的なメモリバスの場合は実際にメモリに書き終わるまで待つ必 要はな!/、ので、書き込み要求を発行する時間だけメモリアクセスに必要な時間となる 。また、ブロックの描画イメージとポリゴンの描画イメージの合成を行う際、ブロックの 有効画素と追記したポリゴン描画データのメモリ読み出し要求は一度に連続して行う ことができるため、メモリ読み出しレイテンシによる待ち時間を減らすことができる。本 実施の形態の画像生成装置において、一度に N個のポリゴンを処理するときのメモリ 読み出しレイテンシは、書き込み要求や読み出し要求を発行する時間に対してメモリ 読み出しレイテンシが十分長い場合は、上記実施の形態 1の画像生成装置の 1ZN 程度になる。この結果、メモリアクセスに必要な時間が低減され、描画速度が大幅に 高速化される。
[0082] なお、レンダリングバッファ 306のブロックデータに追記するポリゴンの描画データ の作成については、本実施の形態で示した圧縮法に限らず、ランレングス法やハフ マン法などの一般に良く知られている可逆圧縮法や画素値については DCT (離散コ サイン変換)などを用いた非可逆圧縮法を用いることもできる。 1つのポリゴン描画デ ータは局所性が高いため、複数のポリゴンが描画された通常の描画イメージよりも高 い圧縮率が達成できる。
[0083] (実施の形態 3)
図 11 (a)〜(d)は、本実施の形態におけるポリゴンの描画方法の概要を示す図で ある。図 11 (a)は、すでに複数のポリゴンが描画されたブロックの描画イメージを示す 。また、図 11 (b)は、図 11 (a)のブロック 801に追加描画するポリゴン 802を示したも のである。図 11 (a)のブロック 801に、図 11 (b)のポリゴン 802を描画する場合、上記 実施の形態 2では、ポリゴンの描画イメージをレンダリングバッファ 306に追記した力 本実施の形態では図 11 (c)に示したポリゴン 802のセットアップ係数 (ここでは、頂点 sの XY座標、画素値、 Z値、頂点 cと頂点 eの XY座標、辺 scと辺 seと辺 ceの傾き、画 素値と Z値の XY方向差分カゝら構成される)をレンダリングバッファ 306に追記する。セ ットアップ係数を追記した場合、レンダリングバッファ 306上のブロックのデータは、図 11 (このようになる。
[0084] 本実施の形態においてポリゴンを描画する手順は、上記実施の形態 2とほぼ同じで あるが、ブロックデータ長が指定したサイズに達しない場合に、レンダリングバッファ 3 06に追記するデータがポリゴンの描画イメージではなぐポリゴンのセットアップ係数 である点が異なる。ブロックデータ長が指定したサイズに達した場合、ブロックの描画 イメージを復元し、このとき初めて各ポリゴン内部の画素値および Z値を計算して、ブ ロックの描画イメージとのブレンド処理を行う。
[0085] 上記の手順でポリゴンの描画を行う画像生成装置は、基本的に上記実施の形態 2 で示した画像生成装置と同じ構成であるが、各ブロックにポリゴンを描画するときの動 作が少し異なっている。
[0086] 条件判断部 701がポリゴンデータの追記を判断した場合、ラスタライズ部 405はセ ットアップ部 404から入力されたセットアップ係数をデータ変換部 406へ出力し、デー タ変換部 406はセットアップ係数をレンダリングバッファ 306に格納し、描画情報デー タのブロックデータ長をセットアップ係数のデータ長分だけ加算して描画情報バッフ ァへ格納する。条件判断部 701がポリゴンデータとブロックの描画イメージの合成を 判断した場合、データ変換部 406は、上記実施の形態 2と同様にレンダリングバッフ ァ 306上の有効画素データからブロックの描画イメージをブロックバッファ 306上に復 元する。後の読み出しデータをセットアップ係数としてラスタライズ部 405に出力する 。ラスタライズ部 405は、データ変換部 406とセットアップ部 404力 入力されたセット アップ係数力もそれぞれのポリゴン内部の画素値と Z値とを算出し、ブロックバッファ 3 03上のブロック描画イメージとのブレンド処理を行う。
[0087] 本実施の形態に係る画像生成装置の効果につ!、て説明するために、本画像生成 装置を用いてアンチエイリアシングを行う場合を考える。「アンチエイリアシング」とは、 ポリゴンをディスプレイに表示したときに、ポリゴンの境界に現れるギザギザ模様 (エイ リアシング)を低減して画質を向上させる処理である。
[0088] 一般的なアンチエイリアシングの方法としては、ー且ディスプレイの解像度よりも大 きい解像度で描画を行い、フレームバッファ 308に書き込むとき、レンダリングバッフ ァ 306の複数の画素の画素値を平均化して、対応するフレームバッファ 308の 1画素 の画素値を求めると 、う方法がよく知られて 、る。
[0089] し力し、フレームバッファの N倍の解像度でアンチエイリアシングを行った場合は、 レンダリングバッファ 306に読み書きするデータ量も N倍になる。従って、ポリゴンを描 画する度にレンダリングバッファ 306を更新する画像生成装置では、毎回 N倍のメモ リアクセスを行わなければならないため、描画処理に長時間を要する結果となる。ま た、上記実施の形態 2の画像生成装置においても、ブロックの有効画素データとポリ ゴンの描画データの双方が N倍のデータ量になり、ブロックデータ長が指定されたサ ィズに達しやすくなり、ブロックの描画イメージの合成を頻繁に行うことになるので、メ モリアクセス量が増大し、描画処理に長時間を要する結果となる。
[0090] 一方、本実施の形態における画像生成装置では、ー且処理解像度に依存しな 、 ポリゴンのセットアップ係数をレンダリングバッファ 306に格納するので、ブロックデー タ長の増加を抑えることができ、ブロックの描画イメージと複数のポリゴンを合成する 間隔を大きくすることができ、さらに合成時においても、 N倍の有効画素データと解像 度に依存しないセットアップ係数をレンダリングバッファ 306から読み書きすればよい ので、メモリアクセス量が低減され、描画速度が大幅に高速化される。上記のアンチ エイリアス処理と同様の理由で、本実施の形態に係る画像生成装置は、単純に高解 像度のフレームを生成する場合にぉ 、ても大きなメリットがあることは言うまでもな 、。
[0091] なお、本実施の形態の説明で用いたセットアップ係数は一例であり、テクスチャゃフ オダなど、その他のセットアップ係数を含めてもよいし、描画に使用しないのであれば 、本実施の形態で用いたセットアップ係数を含めなくともよい。また、レンダリングバッ ファ 306に格納するセットアップ係数に対して、ランレングス法やハフマン法などの一 般に良く知られて 、る方法で圧縮を行ってもょ 、。
[0092] また、上記の実施の形態 1〜3では、画素値や Z値をレンダリングバッファ等のメモリ に格納する実施例について説明した力 メモリに限らず、ハードディスク等の磁気記 録媒体や DVDや CD等の光ディスク型の記録媒体、その他の記録媒体に格納する こととしてちよい。
産業上の利用可能性
[0093] 本発明の画像生成装置は、グラフィックス描画機能を搭載するさまざまな電子機器 、例えば、携帯電話、 PDA,デジタルテレビ、カーナビゲーシヨンシステム、家庭用ゲ ーム機およびパーソナルコンピュータ等に利用が可能である。

Claims

請求の範囲
[1] 仮想的に定義された空間内の物体をビュースクリーンに投影することによって画像 を生成する画像生成装置であって、前記物体は複数のポリゴンによって表現され、 ビュースクリーンの全ての各画素に対して、少なくとも一のポリゴンが前記ビュースク リーンに投影される位置に存在するか否かを示す有効画素フラグの値を決定するフ ラグ値決定手段と、
決定された前記有効画素フラグに対応させて、ポリゴンに対応する画素の画素値を レンダリングバッファの連続アドレス領域に格納する画素値格納手段と、
決定された前記有効画素フラグの値に従って、前記レンダリングバッファに格納さ れている前記画素値をフレームバッファに展開する展開手段と
を備えることを特徴とする画像生成装置。
[2] 前記画像生成装置は、さらに、
前記ビュースクリーンを複数のブロックに分割する分割手段とを備え、
前記フラグ値決定手段は、分割された一のブロック毎に前記有効画素フラグの値を 決定し、
前記画素値格納手段は、前記ブロック毎に前記レンダリングバッファへの前記格納 を行い、
前記展開手段は、すべてのブロックについて前記レンダリングに格納された前記画 素値を前記フレームバッファに展開する
ことを特徴とする請求項 1記載の画像生成装置。
[3] 前記画素値格納手段は、さらに、
前記一のブロックについて、当該ブロックにおける前記レンダリングバッファ上の前 記画素値のデータ長を算出するデータ長算出部と
算出された前記データ長を前記レンダリングバッファに付加するデータ長付加部と を備える
ことを特徴とする請求項 2記載の画像生成装置。
[4] 前記画素値格納手段は、さらに、
前記一のブロックに一のポリゴンが描画されたとき、前記ポリゴンの形態を特定し得 る情報を用いて前記画素値を生成し、生成された当該画素値を前記レンダリングバ ッファに格納する
ことを特徴とする請求項 1記載の画像生成装置。
[5] 前記画素値格納手段は、前記ポリゴンの形態を特定し得る情報を用いて前記画素 値の補間計算を行う補間計算部を備え、
前記補間された画素値を前記レンダリングバッファに格納する
ことを特徴とする請求項 4記載の画像生成装置。
[6] 仮想的に定義された空間内の物体をビュースクリーンに投影することによって画像 を生成する画像生成方法であって、前記物体は複数のポリゴンによって表現され、 ビュースクリーンの全ての各画素に対して、少なくとも一のポリゴンが前記ビュースク リーンに投影される位置に存在するか否かを示す有効画素フラグの値を決定するフ ラグ値決定ステップと、
決定された前記有効画素フラグに対応させて、ポリゴンに対応する画素の画素値を レンダリングバッファの連続アドレス領域に格納する画素値格納ステップと、
決定された前記有効画素フラグの値に従って、前記レンダリングバッファに格納さ れている前記画素値をフレームバッファに展開する展開ステップと
を有することを特徴とする画像生成方法。
[7] 仮想的に定義された空間内の物体をビュースクリーンに投影することによって画像 を生成する画像生成装置に用いられる、コンピュータに実行させるためのプログラム であって、前記物体は複数のポリゴンによって表現され、
ビュースクリーンの全ての各画素に対して、少なくとも一のポリゴンが前記ビュースク リーンに投影される位置に存在するか否かを示す有効画素フラグの値を決定するフ ラグ値決定ステップと、
決定された前記有効画素フラグに対応させて、ポリゴンに対応する画素の画素値を レンダリングバッファの連続アドレス領域に格納する画素値格納ステップと、
決定された前記有効画素フラグの値に従って、前記レンダリングバッファに格納さ れている前記画素値をフレームバッファに展開する展開ステップと
を含むプログラム。
[8] 請求項 6記載の画像生成方法を実現する集積回路。
[9] 仮想的に定義された空間内の物体をビュースクリーンに投影することによって画像 を生成する画像生成装置に用いられるデータ記録媒体であって、前記物体は複数 のポリゴンによって表現され、
前記画像生成装置は、
ビュースクリーンの全ての各画素に対して、少なくとも一のポリゴンが前記ビュースク リーンに投影される位置に存在するか否かを示す有効画素フラグの値を決定するフ ラグ値決定手段と、
決定された前記有効画素フラグに対応させて、ポリゴンに対応する画素の画素値を 決定する画素値決定手段と、
決定された前記有効画素フラグの値に従って、決定された前記画素値をフレーム バッファに展開する展開手段とを備え、
前記データ記録媒体は、
決定された前記有効画素フラグおよび前記画素値の少なくとも一方を、連続するァ ドレス領域に格納する
ことを特徴とするデータ記録媒体。
PCT/JP2005/016334 2004-09-06 2005-09-06 画像生成装置および画像生成方法 WO2006028093A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006535763A JP4704348B2 (ja) 2004-09-06 2005-09-06 画像生成装置および画像生成方法
US11/630,102 US7649531B2 (en) 2004-09-06 2005-09-06 Image generation device and image generation method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004257914 2004-09-06
JP2004-257914 2004-09-06

Publications (1)

Publication Number Publication Date
WO2006028093A1 true WO2006028093A1 (ja) 2006-03-16

Family

ID=36036374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/016334 WO2006028093A1 (ja) 2004-09-06 2005-09-06 画像生成装置および画像生成方法

Country Status (4)

Country Link
US (1) US7649531B2 (ja)
JP (1) JP4704348B2 (ja)
CN (1) CN1969299A (ja)
WO (1) WO2006028093A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013025376A (ja) * 2011-07-15 2013-02-04 Fujitsu Semiconductor Ltd 画像描画装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4260734B2 (ja) * 2004-12-21 2009-04-30 株式会社ソニー・コンピュータエンタテインメント 描画処理装置、ラスタライザ、および描画処理方法
JP4931240B2 (ja) * 2007-09-13 2012-05-16 インターナショナル・ビジネス・マシーンズ・コーポレーション 画像の認識を支援するシステム
CN102099834A (zh) * 2009-05-21 2011-06-15 松下电器产业株式会社 图形描绘装置、图形描绘方法、图形描绘程序、记录了图形描绘程序的记录介质、图形描绘用集成电路
CN101901590B (zh) * 2009-05-25 2013-01-16 富士通株式会社 用于抗锯齿的多边形栅格化的方法和系统
US20110043518A1 (en) * 2009-08-21 2011-02-24 Nicolas Galoppo Von Borries Techniques to store and retrieve image data
CN102652321B (zh) * 2009-12-11 2014-06-04 三菱电机株式会社 图像合成装置以及图像合成方法
CN101778226B (zh) * 2010-01-25 2012-05-23 深圳市同洲电子股份有限公司 一种高清图像防锯齿方法、装置及数字电视接收终端
JP5861113B2 (ja) * 2011-08-08 2016-02-16 パナソニックIpマネジメント株式会社 データ処理装置
KR20130126195A (ko) * 2012-05-11 2013-11-20 삼성전자주식회사 계단 현상을 제거하기 위한 영상 처리 방법 및 이를 적용한 영상 처리 장치
CN111145074B (zh) * 2019-11-30 2023-11-28 航天科技控股集团股份有限公司 全液晶仪表图像渲染方法
CN114598902B (zh) * 2022-03-09 2023-12-22 安徽文香科技股份有限公司 一种视频帧处理方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040412A (ja) * 1996-07-26 1998-02-13 Toshiba Corp 三次元図形描画方法及びその装置
JPH10214353A (ja) * 1997-01-28 1998-08-11 Namco Ltd 画像生成装置及び画像生成方法
JP2003281564A (ja) * 2002-03-20 2003-10-03 Victor Co Of Japan Ltd 画像生成装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0859524B1 (en) * 1996-08-29 2007-06-27 Matsushita Electric Industrial Co., Ltd. Image decoder and image memory overcoming various kinds of delaying factors caused by hardware specifications specific to image memory by improving storing system and reading-out system
JP3886184B2 (ja) * 1996-09-20 2007-02-28 株式会社ソニー・コンピュータエンタテインメント 画像データの処理方法および画像処理装置
JPH10334269A (ja) * 1997-06-03 1998-12-18 Sega Enterp Ltd 画像処理装置、画像処理方法、及び画像処理プログラムを記録した記録媒体
US5933156A (en) * 1997-12-03 1999-08-03 Margolin; Jed Z-Buffer for row addressable graphics memory with flash fill
US6091428A (en) * 1998-04-01 2000-07-18 Real 3D, Inc. Frame buffer memory system for reducing page misses when rendering with color and Z buffers
AU5686299A (en) * 1998-08-20 2000-03-14 Raycer, Inc. Method and apparatus for generating texture
JP2000132433A (ja) 1998-10-23 2000-05-12 Matsushita Electric Ind Co Ltd 可変長の電子データを管理する方法及び装置
JP4596678B2 (ja) * 2001-05-15 2010-12-08 パナソニック株式会社 線分描画装置
JP4622165B2 (ja) * 2001-06-15 2011-02-02 ソニー株式会社 画像メモリ制御装置、グラフィック演算装置およびレンダリング処理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1040412A (ja) * 1996-07-26 1998-02-13 Toshiba Corp 三次元図形描画方法及びその装置
JPH10214353A (ja) * 1997-01-28 1998-08-11 Namco Ltd 画像生成装置及び画像生成方法
JP2003281564A (ja) * 2002-03-20 2003-10-03 Victor Co Of Japan Ltd 画像生成装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013025376A (ja) * 2011-07-15 2013-02-04 Fujitsu Semiconductor Ltd 画像描画装置

Also Published As

Publication number Publication date
JPWO2006028093A1 (ja) 2008-05-08
CN1969299A (zh) 2007-05-23
US7649531B2 (en) 2010-01-19
US20080055309A1 (en) 2008-03-06
JP4704348B2 (ja) 2011-06-15

Similar Documents

Publication Publication Date Title
JP4704348B2 (ja) 画像生成装置および画像生成方法
JP6968803B2 (ja) 複数の詳細レベルをレンダリングするためのシステムおよび方法
Torborg et al. Talisman: Commodity realtime 3D graphics for the PC
US8068119B2 (en) System and method for multi-sampling primitives to reduce aliasing
EP2780891B1 (en) Tessellation in tile-based rendering
JP3635051B2 (ja) 画像生成方法及び装置、画像処理プログラムを記録した記録媒体、画像処理プログラム
CN1251155C (zh) 用于实现全景图形保真过采样的方法和装置
US6961065B2 (en) Image processor, components thereof, and rendering method
US20110310102A1 (en) Systems and methods for subdividing and storing vertex data
JP3645024B2 (ja) 描画装置及び描画方法
KR102651126B1 (ko) 그래픽 프로세싱 장치 및 그래픽스 파이프라인에서 텍스처를 처리하는 방법
US6661424B1 (en) Anti-aliasing in a computer graphics system using a texture mapping subsystem to down-sample super-sampled images
US20100265254A1 (en) Graphics filled shape drawing
EP3580726A1 (en) Buffer index format and compression
CN111127299A (zh) 一种加速光栅化遍历的方法、装置及计算机存储介质
JP3029878B2 (ja) 画像を表す複数の多角形を処理する装置及び方法
JP2005332195A (ja) テクスチャユニット、画像描画装置、テクセル転送方法
US20100302259A1 (en) Drawing data processing method, graphics drawing system and graphics drawing data generation program
JP3979162B2 (ja) 画像処理装置およびその方法
JP3971448B2 (ja) 描画装置及び描画方法
US8576219B2 (en) Linear interpolation of triangles using digital differential analysis
WO2023241210A1 (zh) 虚拟场景的渲染方法、装置、设备及存储介质
JP2003263650A (ja) 画像処理装置およびその方法
US7382377B1 (en) Render to texture cull
US6982713B2 (en) System and method for clearing depth and color buffers in a real-time graphics rendering system

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

WWE Wipo information: entry into national phase

Ref document number: 2006535763

Country of ref document: JP

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 200580019820.4

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 11630102

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase
WWP Wipo information: published in national office

Ref document number: 11630102

Country of ref document: US