JP2001052198A - Device and method for generating image and recording medium - Google Patents

Device and method for generating image and recording medium

Info

Publication number
JP2001052198A
JP2001052198A JP11222048A JP22204899A JP2001052198A JP 2001052198 A JP2001052198 A JP 2001052198A JP 11222048 A JP11222048 A JP 11222048A JP 22204899 A JP22204899 A JP 22204899A JP 2001052198 A JP2001052198 A JP 2001052198A
Authority
JP
Japan
Prior art keywords
polygon
pixel
drawn
flag
buffer
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.)
Pending
Application number
JP11222048A
Other languages
Japanese (ja)
Inventor
Hiroyuki Murata
弘幸 村田
Katsuhiro Miura
克宏 三浦
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.)
Namco Ltd
Original Assignee
Namco 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 Namco Ltd filed Critical Namco Ltd
Priority to JP11222048A priority Critical patent/JP2001052198A/en
Publication of JP2001052198A publication Critical patent/JP2001052198A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a device and a method for generating image with which plotting processing of the next polygon can be immediately started when a polygon to be plotted does not include a non-plotting pixel and to provide a recording medium. SOLUTION: A non-plotting pixel-including flag is provided for showing whether the pixel of non-plotting is included or not for the unit of a polygon or the like and in the beginning of plotting processing, it is judged whether the non-plotting pixel-including flag is 'non-including' or not. When the non- plotting pixel-including flag is 'non-including', since it is not necessary to wait the judgement of whether a certain pixel is non-plotting or not, processing such as reference of a Z buffer and processing such as reference of a texture memory can be parallel executed and three-dimensional plotting processing can be executed at high speed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像生成装置、方
法および記録媒体に関し、特にポリゴンが非描画ピクセ
ルを含む場合の画像生成装置、方法および記録媒体に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image generating apparatus, method, and recording medium, and more particularly, to an image generating apparatus, method, and recording medium in a case where a polygon includes non-rendered pixels.

【0002】[0002]

【従来の技術】3次元画像を生成する、例えば3次元ゲ
ーム装置等では、仮想的な3次元空間において所定の視
点から見える3次元画像を形成するために座標変換処理
等の各種の演算処理を行なっている。仮想的な3次元空
間を構成する物体は複数のポリゴンによって表現されて
おり、これら複数のポリゴン間で重なりが生じた場合
は、視点からみて奥にある隠面部分を消去し、手前にあ
る部分を表示させるという描画上のプライオリティを用
いている。この隠面部分の消去には、従来、Zバッファ
を使用する方法が用いられている。
2. Description of the Related Art For example, in a three-dimensional game device or the like that generates a three-dimensional image, various arithmetic processes such as a coordinate conversion process are performed in order to form a three-dimensional image that can be viewed from a predetermined viewpoint in a virtual three-dimensional space. I do. The object constituting the virtual three-dimensional space is represented by a plurality of polygons, and when there is an overlap between the plurality of polygons, a hidden surface portion in the back from the viewpoint is deleted, and a portion in the foreground is deleted. Is used in the drawing. Conventionally, a method using a Z buffer has been used for erasing the hidden surface portion.

【0003】3次元描画処理における従来のZバッファ
を使用する方法として、Zバッファを使用して隠面消去
を行なう方法がある。ここでZバッファは表示画面上の
各ピクセルに対応した格納エリアを有する記憶装置であ
り、各格納エリアには視点からの距離を示す奥行き情報
(Z値)が格納されている。一般的には、Zバッファに
はZ値の最大値が初期値として書き込まれ、あるポリゴ
ンのピクセルに対応するZ値は対応するZバッファ上の
格納エリアに書き込まれており、視点に近いポリゴンほ
ど、そのピクセルに対応するZ値が小さくなるように設
定されている。逆に、視点に近いポリゴンほど、そのピ
クセルに対応するZ値が大きくなるように設定すること
もある。あるピクセルを更新処理する場合には、このピ
クセルに対応したZ値(旧Z値)を参照して、このピク
セルについて新たに描画しようとするZ値(新Z値)と
比較し、視点からみて新Z値が旧Z値よりも手前にある
場合、旧Z値を新Z値で更新することにより、プライオ
リティを正しく描画に反映させていた。
As a method of using a conventional Z-buffer in a three-dimensional drawing process, there is a method of erasing a hidden surface using a Z-buffer. Here, the Z buffer is a storage device having a storage area corresponding to each pixel on the display screen, and each storage area stores depth information (Z value) indicating a distance from a viewpoint. Generally, the maximum value of the Z value is written in the Z buffer as an initial value, and the Z value corresponding to a pixel of a certain polygon is written in a storage area on the corresponding Z buffer. , The Z value corresponding to the pixel is set to be small. Conversely, a polygon closer to the viewpoint may be set to have a larger Z value corresponding to the pixel. When a certain pixel is updated, the Z value (old Z value) corresponding to this pixel is referred to, compared with the Z value (new Z value) to be newly drawn for this pixel, and viewed from the viewpoint. When the new Z value is before the old Z value, the priorities are correctly reflected in the drawing by updating the old Z value with the new Z value.

【0004】図3は、描画しようとするポリゴンが完全
に透明である非描画なピクセルを含む場合を説明するた
めの仮想的な3次元空間を示す。図3において、符号3
00は仮想的な3次元空間における木等の一部をあらわ
すポリゴンA、303はポリゴンA300に含まれる完
全に透明である非描画の部分、305はポリゴンA30
0に含まれる非描画ではない木の葉等の部分、307、
308および309はポリゴンA300の非描画ではな
い部分305に散在する木の葉の隙間等の完全に透明で
ある非描画の部分、310は仮想的な3次元空間におけ
るポリゴンA300の背後にある木等の一部をあらわす
ポリゴンB、313はポリゴンB310に含まれる完全
に透明である非描画の部分、315はポリゴンB310
に含まれる非描画ではない木の葉等の部分、340は仮
想的な3次元空間を2次元に表示したスクリーン、32
0はスクリーン340上に表示されたポリゴンA30
0、330はスクリーン340上に表示されたポリゴン
B、XYZ座標は仮想的な3次元空間の座標、ZAはポ
リゴンA300のスクリーン340からの奥行きを示す
Z軸上の値、ZBはポリゴンB310のスクリーン34
0からの奥行きを示すZ軸上の値である。
FIG. 3 shows a virtual three-dimensional space for explaining a case where a polygon to be drawn includes non-drawn pixels which are completely transparent. In FIG.
00 is a polygon A representing a part of a tree or the like in a virtual three-dimensional space, 303 is a completely transparent non-drawing part included in the polygon A300, and 305 is a polygon A30
307, a part of a leaf or the like which is not a non-drawing included in 0
Reference numerals 308 and 309 denote completely transparent non-drawing portions such as gaps between trees scattered in the non-drawing portion 305 of the polygon A300, and reference numeral 310 denotes a tree or the like behind the polygon A300 in the virtual three-dimensional space. Polygons B and 313 representing a part are completely transparent non-drawing parts included in the polygon B310, and 315 is a polygon B310
340 is a screen that displays a virtual three-dimensional space in two dimensions, 32
0 is the polygon A30 displayed on the screen 340
0 and 330 are polygons B displayed on the screen 340, XYZ coordinates are coordinates in a virtual three-dimensional space, ZA is a value on the Z axis indicating the depth of the polygon A300 from the screen 340, and ZB is a screen of the polygon B310. 34
This is a value on the Z axis indicating the depth from 0.

【0005】図4は、図3のポリゴンA300等を含む
仮想的な3次元空間におけるZバッファ400を示す。
図4において、Zバッファ400には奥行きを示すZ
値、例えばZ軸上の値が格納されており、初期値として
Z値の最大値Mが書き込まれている。座標XYは、図3
の座標XYZのうち、スクリーン340の2次元座標X
Yと対応している。図4において、符号410は図3の
ポリゴンA300に対応したZ値が格納されている領域
であって点線で囲まれて示されており、420は図3の
ポリゴンB310に対応したZ値が格納されている領域
であって点線で囲まれて示されている。A1、A2等はポ
リゴンA300の奥行きを示すZ値、B1、B2等はポリ
ゴンB310の奥行きを示すZ値である。図3に示され
るポリゴンA300の非描画の部分303は、図4では
Z値がMまたはB1等に設定されており、スクリーン3
40側から見ると背景または後ろに重なったポリゴンB
310の描画部分が見えることが示されている。図3に
示されるポリゴンA300の木の葉の隙間等の非描画部
分307、308または309に対応するZ値は、図4
では407(Z値がB9)、408(Z値がB10)また
は409(Z値がB1 1)等で示されており、スクリーン
340側から見ると、木の葉の隙間等の非描画部分30
7、308または309の背後にあるポリゴンB310
の描画部分が見えることが示されている。
FIG. 4 shows a Z buffer 400 in a virtual three-dimensional space including the polygon A300 shown in FIG.
In FIG. 4, Z buffer 400 has a Z
A value, for example, a value on the Z axis is stored, and a maximum value M of the Z value is written as an initial value. The coordinates XY are shown in FIG.
Of the coordinates XYZ of the two-dimensional coordinates X of the screen 340
Corresponds to Y. In FIG. 4, reference numeral 410 denotes an area in which the Z value corresponding to the polygon A300 in FIG. 3 is stored and is surrounded by a dotted line, and reference numeral 420 denotes the Z value corresponding to the polygon B310 in FIG. The area is indicated by a dotted line. A 1 , A 2, etc. are Z values indicating the depth of the polygon A 300, and B 1 , B 2, etc. are Z values indicating the depth of the polygon B 310. The non-drawing portion 303 of the polygon A300 shown in FIG. 3 has the Z value set to M or B1 in FIG.
Viewed from the 40 side, polygon B overlapping background or back
It is shown that the drawing portion of 310 is visible. The Z value corresponding to the non-rendered portion 307, 308 or 309 such as the gap between the leaves of the tree of the polygon A300 shown in FIG.
In 407 (Z value B 9), 408 (Z value B 10) or 409 (Z value B 1 1) are indicated by like, when viewed from the screen 340 side, the non-imaging portion such as a gap between the leaves 30
Polygon B310 behind 7, 308 or 309
It is shown that the drawing portion of can be seen.

【0006】図5は、従来の画像生成方法において、ポ
リゴンが非描画のピクセルを含む場合の処理をフローチ
ャートで示す。図5において、まず初期設定として、ポ
リゴン描画開始処理を行なう(ステップS100)。次
に点線で囲まれたZバッファ参照処理を行なう(ステッ
プS160)。すなわち、ポリゴン中の描画しようとす
るピクセルに対するスクリーン340上のXY座標を計
算し(ステップS105)、計算されたXY座標を用い
て対応するZバッファ400上のZ値(旧Z値)を参照
する(ステップS110)。旧Z値と描画しようとする
新しいZ値(新Z値)とを比較して、いずれのZ値が手
前であるか、例えばいずれのZ値が小さいかを判断する
(ステップS115)。新Z値が手前である場合は、点
線で囲まれたテクスチャ・メモリ参照処理を行なう(ス
テップS170)。すなわち、描画しようとするピクセ
ルに対応するテクスチャ座標を計算し(ステップS12
0)、計算されたテクスチャ座標を用いて対応するテク
スチャ・メモリを参照する(ステップS125)。この
テクスチャ・メモリの参照により、ピクセル毎のオパシ
ティが判明する。ここでオパシティとはピクセルの不透
明度を示す0から1の値をとるパラメータの一種であっ
て、ピクセルが完全に透明である場合は0の値をとり完
全に不透明である場合は1の値をとる。その他のパラメ
ータ、例えばポリゴン単位のオパシティと全体のオパシ
ティとを考慮して、ピクセル毎のオパシティを決めるこ
ともできる。ピクセルが最終的に完全に透明であれば、
すなわちオパシティが0であれば、そのピクセルは非描
画のピクセルであることがわかる。そこで非描画である
か否かの判断を行って(ステップS135)、非描画で
ない場合は、Z値以外の主として色情報を格納している
フレーム・バッファへの描画を行なう(ステップS14
0)。この場合、例えばシェーディング等の色演算、半
透明処理等を行なうこともできる。Zバッファの旧Z値
を新Z値により更新する(ステップS145)。ポリゴ
ンの描画がすべて終了したか否かを判断し(ステップS
150)、まだ終了していない場合はステップS105
へ戻って繰り返す。終了した場合は他のポリゴンを描画
するか否かを判断し(ステップS155)、まだ描画す
る場合はステップS100へ戻って繰り返す。ステップ
S115において、描画する部分が手前ではない場合、
すなわち奥に隠れる場合は描画する必要はなく、ステッ
プS150へ分岐する。ステップS135において、ピ
クセルが非描画である場合は描画する必要がないためス
テップS150へ分岐する。他のポリゴンの描画もない
場合は、処理を終了する。
FIG. 5 is a flowchart showing a process in the case where a polygon includes non-drawn pixels in the conventional image generation method. In FIG. 5, a polygon drawing start process is performed as an initial setting (step S100). Next, a Z buffer reference process surrounded by a dotted line is performed (step S160). That is, the XY coordinates on the screen 340 for the pixel to be drawn in the polygon are calculated (step S105), and the corresponding Z value (old Z value) on the Z buffer 400 is referred to using the calculated XY coordinates. (Step S110). The old Z value and the new Z value to be drawn (new Z value) are compared to determine which Z value is closer, for example, which Z value is smaller (step S115). If the new Z value is nearer, texture memory reference processing surrounded by a dotted line is performed (step S170). That is, texture coordinates corresponding to the pixel to be drawn are calculated (step S12).
0), and refer to the corresponding texture memory using the calculated texture coordinates (step S125). By referring to this texture memory, the opacity for each pixel is determined. Here, the opacity is a kind of parameter that takes a value from 0 to 1 indicating the opacity of the pixel. The opacity takes a value of 0 when the pixel is completely transparent and a value of 1 when the pixel is completely opaque. Take. The opacity for each pixel can be determined in consideration of other parameters, for example, the opacity in units of polygons and the opacity of the whole. If the pixel is ultimately completely transparent,
That is, if the opacity is 0, it is understood that the pixel is a non-drawing pixel. Then, it is determined whether or not the drawing is non-drawing (step S135). If the drawing is not non-drawing, drawing is performed on a frame buffer mainly storing color information other than the Z value (step S14).
0). In this case, for example, color calculation such as shading, translucent processing, and the like can be performed. The old Z value in the Z buffer is updated with the new Z value (step S145). It is determined whether all the polygons have been drawn (step S).
150), if not over yet, step S105
Return to and repeat. When the drawing is completed, it is determined whether or not to draw another polygon (step S155). When drawing is still to be performed, the process returns to step S100 and repeats. In step S115, if the part to be drawn is not the near side,
In other words, if it is hidden behind, there is no need to draw, and the process branches to step S150. If it is determined in step S135 that the pixel is not drawn, the flow branches to step S150 because drawing is not necessary. If there is no other polygon to be drawn, the process ends.

【0007】上述のように、描画しようとするポリゴン
が完全に透明である非描画のピクセルを含む場合、手前
のピクセルを描画するというプラオリティを正しく反映
させるためには、非描画のピクセルの部分に対応するZ
バッファの更新はできない。一方、描画しようとするポ
リゴンが完全に透明である非描画なピクセルを含まない
場合は、対応するZバッファを更新することができる。
したがって、いずれの場合についても、描画しようとす
るピクセルが非描画であるか否かは、続くテクスチャの
参照によってオパシティが得られてから判定を行なう必
要があり、この判定を待ってからZバッファの更新を行
なう必要があった。
As described above, when the polygon to be drawn includes non-drawn pixels that are completely transparent, in order to correctly reflect the priority of drawing the pixel in front, the non-drawn pixel portion must be Corresponding Z
The buffer cannot be updated. On the other hand, if the polygon to be drawn does not include a completely transparent, non-drawn pixel, the corresponding Z buffer can be updated.
Therefore, in either case, it is necessary to determine whether or not the pixel to be rendered is non-rendered after the opacity is obtained by referring to the subsequent texture. An update had to be made.

【0008】[0008]

【発明が解決しようとする課題】上述のように、従来の
3次元描画処理においては、描画しようとするピクセル
が非描画であるか否かは、続くテクスチャの参照によっ
てオパシティが得られてから判定を行なう必要があっ
た。この判定を待たないとZバッファの更新を行なうか
否かを決定できないため、描画しようとするポリゴンが
非描画のピクセルを含まない場合であっても直ちに次の
ポリゴンの描画処理へ移ることができないという問題が
あった。そこで、本発明の目的は、上記問題を解決する
ためになされたものであり、少なくともポリゴン単位の
大きさで非描画のピクセルを含むか否かを示す情報を設
定しておくことにより、描画しようとするポリゴンが非
描画のピクセルを含まない場合は直ちに次のポリゴンの
描画処理へ移ることができる画像生成装置、方法および
記録媒体を提供することにある。
As described above, in the conventional three-dimensional drawing processing, it is determined whether or not a pixel to be drawn is non-drawn after the opacity is obtained by referring to the subsequent texture. Had to be done. Until this determination is made, it cannot be determined whether or not to update the Z buffer. Therefore, even if the polygon to be drawn does not include a non-drawing pixel, it is not possible to immediately proceed to the next polygon drawing processing. There was a problem. Accordingly, an object of the present invention is to solve the above-described problem, and it is desirable to set at least information indicating whether or not a non-drawing pixel is included in a size in a polygon unit so that drawing is performed. An object of the present invention is to provide an image generating apparatus, method and recording medium which can immediately proceed to the next polygon drawing process when the polygon does not include a non-drawn pixel.

【0009】[0009]

【課題を解決するための手段】請求項1記載の発明の画
像生成装置は、3次元画像を描画する画像生成装置であ
って、描画するポリゴンの視点からの奥行きを示す情報
を格納したZバッファと、描画するポリゴンが描画され
ないピクセルを含むか否かを示すフラグ手段と、前記フ
ラグ手段が、描画するポリゴンは描画されないピクセル
を含まないことを示す場合、描画するポリゴンのピクセ
ルに対応する前記Zバッファ上の領域の参照と描画する
ポリゴンのピクセルに対応するテクスチャの参照とを並
行的に実行する並行処理手段とを備えたものである。
According to a first aspect of the present invention, there is provided an image generating apparatus for rendering a three-dimensional image, wherein the Z buffer stores information indicating the depth of the polygon to be rendered from the viewpoint. And flag means for indicating whether or not the polygon to be drawn includes a pixel which is not drawn; and when the flag means indicates that the polygon to be drawn does not include a pixel which is not drawn, the Z corresponding to the pixel of the polygon to be drawn. And a parallel processing means for concurrently executing reference to an area on the buffer and reference to a texture corresponding to a pixel of a polygon to be drawn.

【0010】請求項2記載の発明の画像生成装置は、請
求項1において、前記フラグ手段は、複数のポリゴンか
ら構成されるオブジェクト単位に描画されないピクセル
を含むか否かを示すこととすることができる。
According to a second aspect of the present invention, in the first aspect of the present invention, the flag means indicates whether or not a pixel which is not drawn in an object unit composed of a plurality of polygons is included. it can.

【0011】請求項3記載の発明の画像生成方法は、3
次元画像を描画する画像生成方法であって、描画するポ
リゴンの視点からの奥行きを示す情報をZバッファに格
納するステップと、描画するポリゴンが描画されないピ
クセルを含むか否かをフラグに設定するフラグステップ
と、前記フラグステップにより、描画するポリゴンは描
画されないピクセルを含まないことがフラグに設定され
た場合、描画するポリゴンのピクセルに対応するZバッ
ファ上の領域の参照と描画するポリゴンのピクセルに対
応するテクスチャの参照とを並行的に実行する並行処理
ステップとを備えたものである。
According to a third aspect of the present invention, there is provided an image generating method comprising:
An image generation method for drawing a two-dimensional image, comprising: a step of storing information indicating a depth of a polygon to be drawn from a viewpoint in a Z buffer; and a flag for setting a flag as to whether or not the polygon to be drawn includes a pixel which is not drawn. In the step, if the flag indicates that the polygon to be drawn does not include a pixel to be drawn in the flag step, the reference to the area on the Z buffer corresponding to the pixel of the polygon to be drawn and the pixel of the polygon to be drawn And a parallel processing step of executing the reference of the texture to be performed in parallel.

【0012】請求項4記載の発明の記録媒体は、請求項
3記載の画像生成方法を実行するためのプログラムを記
録したコンピュータ読み取り可能な記録媒体である。
A recording medium according to a fourth aspect of the present invention is a computer-readable recording medium recording a program for executing the image generating method according to the third aspect.

【0013】[0013]

【発明の実施の形態】以下、図面を参照して、本発明の
各実施の形態を詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0014】実施の形態1.図1は、本発明の実施の形
態1における画像生成装置の概略をブロック図で示す。
図1において、符号110は、ポリゴン物体等の画像デ
ータを出力して画像処理を指示するCPU部であり、例
えばゲーム装置等であればゲーム全体の流れを制御しゲ
ーム実行中の画像処理を指示するCPU部、120はC
PU部110から出力された画像データおよび画像処理
の指示に基づいて画像演算を行なう画像演算部、180
は描画制御部140の制御により画像を表示するディス
プレイ等の画像表示部、100はCPU部110から出
力された画像データおよび画像処理の指示に基づいて、
隠面処理、テクスチャ・マッピング等の処理を行なう描
画処理部である。描画処理部100は、図1に示される
ように、画像演算部120から出力された画像データに
より、描画処理全体を制御する描画制御部140、ピク
セル毎に奥行きを示すZ値を格納したZバッファ13
0、画像表示部180上の各ピクセルに対応したZ値以
外の主として色情報を格納したフレーム・バッファ15
0、テクスチャ・マッピングに用いられる元絵であるテ
クスチャをその画素(テクセル)単位で格納したテクス
チャ・メモリ160を有している。
Embodiment 1 FIG. 1 is a block diagram schematically illustrating an image generating apparatus according to Embodiment 1 of the present invention.
In FIG. 1, reference numeral 110 denotes a CPU unit that outputs image data of a polygon object or the like and instructs image processing. For example, in the case of a game device or the like, the CPU unit controls the flow of the entire game and instructs image processing during game execution. CPU unit 120 performs C
An image operation unit 180 that performs an image operation based on the image data output from the PU unit 110 and an image processing instruction, 180
Is an image display unit such as a display for displaying an image under the control of the drawing control unit 140, and 100 is based on the image data output from the CPU unit 110 and an instruction for image processing.
This is a drawing processing unit that performs processes such as hidden surface processing and texture mapping. As shown in FIG. 1, the drawing processing unit 100 includes a drawing control unit 140 that controls the entire drawing process based on the image data output from the image calculation unit 120, and a Z buffer that stores a Z value indicating the depth for each pixel. 13
0, the frame buffer 15 mainly storing color information other than the Z value corresponding to each pixel on the image display unit 180
0, a texture memory 160 which stores a texture which is an original picture used for texture mapping for each pixel (texel).

【0015】図2は、本発明の画像生成方法の処理をフ
ローチャートで示す。図2に基づいて本発明の実施の形
態1の処理の概要を説明すると、まずポリゴン単位に、
非描画、すなわち完全透明となるピクセルを含有してい
るか否かを示す非描画ピクセル含有フラグを設定する。
ポリゴン単位ではなく、複数のポリゴンから構成される
オブジェクト単位に非描画の部分が含有されているか否
かを示すようなフラグを設定することもできる。ポリゴ
ン等の単位で非描画、すなわち完全透明となるピクセル
を含有している場合は非描画ピクセル含有フラグを「含
有」に設定し、含有していない場合は非描画ピクセル含
有フラグを「非含有」に設定する。非描画ピクセル含有
フラグが「含有」の場合は、従来における描画処理と同
様にテクスチャ・メモリ参照を行ない、次に色演算等の
結果、非描画のピクセルであるか否かの判断を待ってか
ら、非描画ではない場合にZバッファの更新を行なう。
その後、1つのポリゴンの処理が終了した場合に次のポ
リゴンの処理に移行する。非描画ピクセル含有フラグが
「非含有」の場合は、非描画とはならないため直ちにZ
バッファの更新処理へ移行する。したがって次のポリゴ
ンの処理に直ちに移行できる。
FIG. 2 is a flowchart showing the processing of the image generation method of the present invention. An outline of the processing according to the first embodiment of the present invention will be described with reference to FIG.
A non-drawing pixel containing flag is set which indicates whether or not the drawing includes a pixel that is completely transparent.
A flag may be set to indicate whether or not a non-rendered portion is contained in an object unit composed of a plurality of polygons instead of a polygon unit. Set the non-drawing pixel containing flag to "contain" if non-drawing, that is, contain pixels that are completely transparent, in units such as polygons, otherwise set the non-drawing pixel containing flag to "non-contained". Set to. If the non-rendered pixel content flag is “contained”, the texture memory is referred to in the same manner as in the conventional rendering process, and then, as a result of a color operation or the like, it is determined whether or not the pixel is a non-rendered pixel. , Update the Z-buffer if it is not non-drawing.
Then, when the processing of one polygon is completed, the processing shifts to the processing of the next polygon. When the non-drawing pixel containing flag is “not including”, Z is immediately determined because Z does not become non-drawing.
Move to buffer update processing. Therefore, it is possible to immediately proceed to the processing of the next polygon.

【0016】以下、図2に示されるフローチャートを詳
細に説明する。図2において、従来の処理と異なる第一
の点は、ポリゴン描画開始処理(ステップS100)の
次に、上述の非描画ピクセル含有フラグが「非含有」で
あるか否かの判断(ステップS200)を挿入した点で
ある。非描画ピクセル含有フラグが「含有」である場合
は従来と同様の処理(ステップS105からステップS
155)を行なう。ステップS100、ステップS10
5からステップS155までは図5のフローチャートで
示された従来の処理と同様であるため、説明は省略す
る。
Hereinafter, the flowchart shown in FIG. 2 will be described in detail. In FIG. 2, a first point different from the conventional processing is that, after the polygon drawing start processing (step S100), it is determined whether or not the above-described non-drawing pixel containing flag is “non-containing” (step S200). Is the point where If the non-drawing pixel inclusion flag is “contained”, the same processing as the conventional processing (from step S105 to step S105)
155). Step S100, Step S10
Steps S5 to S155 are the same as the conventional processing shown in the flowchart of FIG.

【0017】従来の処理と異なる第二の点は、非描画ピ
クセル含有フラグが「非含有」である場合に、含有フラ
グが「含有」である場合のステップS160に対応する
Zバッファの参照等の処理(ステップS205、S21
0)と含有フラグが「含有」である場合のステップS1
70に対応するテクスチャ・メモリの参照等の処理(ス
テップS220、S225)とを並行処理(ステップS
203)する点である。ステップS160に対応するZ
バッファの参照等の処理は、ピクセル座標を計算して
(ステップS205)、計算されたピクセル座標に対応
するZバッファを参照する(ステップS210)。一
方、ステップS170に対応するテクスチャ・メモリの
参照等の処理は、テクスチャ座標を計算し(ステップS
220)、計算されたテクスチャ座標に対応するテクス
チャ・メモリを参照する(ステップS225)。並行処
理(ステップS160とステップS170とに対応する
処理)終了後、新Z値と旧Z値とを比較することによ
り、描画するピクセルが手前か否かを判断し(ステップ
S255)、手前である場合はステップS140へ分岐
し、手前ではない場合はステップS150へ分岐する。
The second point different from the conventional processing is that when the non-rendered pixel containing flag is "not included", the Z buffer corresponding to step S160 when the containing flag is "contained" is referred to. Processing (Steps S205, S21)
0) and step S1 when the content flag is “content”
The processing (steps S220 and S225) such as reference to the texture memory corresponding to step S70 is performed in parallel (step S220).
203). Z corresponding to step S160
In processing such as buffer reference, pixel coordinates are calculated (step S205), and a Z buffer corresponding to the calculated pixel coordinates is referred to (step S210). On the other hand, in processing such as reference to the texture memory corresponding to step S170, texture coordinates are calculated (step S170).
220), refer to the texture memory corresponding to the calculated texture coordinates (step S225). After the parallel processing (the processing corresponding to step S160 and step S170) is completed, the new Z value is compared with the old Z value to determine whether or not the pixel to be drawn is on the near side (step S255). If so, the process branches to step S140, and if not, the process branches to step S150.

【0018】以上より、実施の形態1によれば、ポリゴ
ン等の単位で非描画となるピクセルを含有しているか否
かを示す非描画ピクセル含有フラグを設け、描画処理の
始めの方で非描画ピクセル含有フラグが「非含有」であ
るか否かの判断を行なうことができる。非描画ピクセル
含有フラグが「非含有」である場合は、あるピクセルが
非描画であるか否かの判断を待ち合わせる必要がないた
め、Zバッファの参照等の処理とテクスチャ・メモリの
参照等の処理とを並列的に実行することができ、3次元
描画処理を高速に実行することができる。
As described above, according to the first embodiment, a non-drawing pixel containing flag is provided to indicate whether or not a non-drawing pixel is contained in a unit such as a polygon, and the non-drawing pixel flag is provided at the beginning of the drawing process. It can be determined whether or not the pixel inclusion flag is “not included”. When the non-drawing pixel inclusion flag is “not including”, there is no need to wait for the determination of whether or not a certain pixel is non-drawing, so processing such as reference to the Z buffer and processing such as reference to the texture memory Can be executed in parallel, and the three-dimensional drawing processing can be executed at high speed.

【0019】実施の形態2.上述した実施の形態1の機
能を実現するコンピュータ・プログラムを記録した記録
媒体を本発明の画像生成装置に供給し、その画像生成装
置のコンピュータ(図1のCPU部110)が記録媒体
に格納されたコンピュータ・プログラムを読み取り実行
することによっても、本発明の目的が達成されることは
言うまでもない。この場合、記録媒体はCPU部110
と接続された記録媒体入出力部(不図示)から入出力さ
れる。このようにして、記録媒体から読み取られたコン
ピュータ・プログラム自体が本発明の画像生成装置の新
規な機能を実現することになり、そのコンピュータ・プ
ログラムを記録した記録媒体は本発明を構成することに
なる。コンピュータ・プログラムを記録した記録媒体と
しては、例えば、CD−ROM、フロッピーディスク、
ハードディスク、ROM、メモリカード、光ディスク等
を用いることができる。
Embodiment 2 A recording medium storing a computer program for realizing the functions of the first embodiment described above is supplied to the image generating apparatus of the present invention, and the computer (CPU unit 110 in FIG. 1) of the image generating apparatus is stored in the recording medium. Needless to say, the object of the present invention can be achieved by reading and executing the computer program. In this case, the recording medium is the CPU 110
Is input / output from a recording medium input / output unit (not shown) connected to the PC. In this way, the computer program itself read from the recording medium realizes the novel function of the image generating apparatus of the present invention, and the recording medium on which the computer program is recorded constitutes the present invention. Become. Examples of the recording medium on which the computer program is recorded include a CD-ROM, a floppy disk,
A hard disk, a ROM, a memory card, an optical disk, or the like can be used.

【0020】以上より、実施の形態2によれば、実施の
形態1の機能を実現するコンピュータ・プログラムを記
録した記録媒体を本発明の画像生成装置に供給し、その
画像生成装置のコンピュータ(不図示)が記録媒体に格
納されたコンピュータ・プログラムを読み取り実行する
ことによっても、本発明の目的を達成することができ
る。
As described above, according to the second embodiment, a recording medium on which a computer program for realizing the functions of the first embodiment is recorded is supplied to the image generating apparatus of the present invention, and the computer (non- (Illustration) reads and executes a computer program stored in a recording medium, thereby achieving the object of the present invention.

【0021】[0021]

【発明の効果】以上説明したように、本発明の画像生成
装置、方法および記録媒体によれば、少なくともポリゴ
ン単位の大きさで非描画のピクセルを含むか否かを示す
非描画ピクセル含有フラグ等の情報を設定しておくこと
により、描画しようとするポリゴンが非描画のピクセル
を含まない場合は直ちに次のポリゴンの描画処理へ移る
ことができる画像生成装置、方法および記録媒体を提供
することができる。
As described above, according to the image generating apparatus, method, and recording medium of the present invention, a non-drawing pixel containing flag indicating whether or not a non-drawing pixel is included in at least a polygon unit. By setting the above information, it is possible to provide an image generating apparatus, a method and a recording medium that can immediately proceed to the next polygon drawing process when the polygon to be drawn does not include a non-drawn pixel. it can.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の実施の形態1における画像生成装置
の概略を示すブロック図である。
FIG. 1 is a block diagram schematically illustrating an image generation device according to a first embodiment of the present invention.

【図2】 本発明の画像生成方法の処理を示すフローチ
ャートである。
FIG. 2 is a flowchart illustrating a process of an image generation method according to the present invention.

【図3】 描画しようとするポリゴンが完全に透明であ
る非描画なピクセルを含む場合を説明するための仮想的
な3次元空間を示す図である。
FIG. 3 is a diagram illustrating a virtual three-dimensional space for explaining a case where a polygon to be drawn includes a completely transparent non-drawn pixel.

【図4】 図3のポリゴンA300等を含む仮想的な3
次元空間におけるZバッファ400を示す図である。
FIG. 4 is a diagram showing a virtual 3 including the polygon A300 in FIG.
FIG. 3 is a diagram illustrating a Z buffer 400 in a dimensional space.

【図5】 従来の画像生成方法において、ポリゴンが非
描画のピクセルを含む場合の処理を示すフローチャート
である。
FIG. 5 is a flowchart showing a process performed when a polygon includes non-drawn pixels in a conventional image generation method.

【符号の説明】[Explanation of symbols]

100 描画処理部、 110 CPU部、 120
画像演算部、 130、400 Zバッファ、 140
描画制御部、 150 フレーム・バッファ、160
テクスチャ・メモリ、 180 画像表示部、 30
0 ポリゴンA、 303、307、308、309、
313 非描画の部分、 305、315 描画部分、
310 ポリゴンB、 320 スクリーン340上
のポリゴンA、 330 スクリーン340上のポリゴ
ンB、 340 スクリーン、407、408、409
Zバッファ上のポリゴンA非描画の部分、 410Z
バッファ上のポリゴンA領域、 420 Zバッファ上
のポリゴンB領域。
100 drawing processing unit, 110 CPU unit, 120
Image operation unit, 130, 400 Z buffer, 140
Drawing control unit, 150 frame buffer, 160
Texture memory, 180 image display, 30
0 polygon A, 303, 307, 308, 309,
313 non-drawing part, 305, 315 drawing part,
310 polygon B, 320 polygon A on screen 340, 330 polygon B on screen 340, 340 screen, 407, 408, 409
410Z, where the polygon A is not drawn on the Z buffer
Polygon A area on buffer, 420 polygon B area on Z buffer.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 3次元画像を描画する画像生成装置であ
って、 描画するポリゴンの視点からの奥行きを示す情報を格納
したZバッファと、 描画するポリゴンが描画されないピクセルを含むか否か
を示すフラグ手段と、 前記フラグ手段が、描画するポリゴンは描画されないピ
クセルを含まないことを示す場合、描画するポリゴンの
ピクセルに対応する前記Zバッファ上の領域の参照と描
画するポリゴンのピクセルに対応するテクスチャの参照
とを並行的に実行する並行処理手段とを備えたことを特
徴とする画像生成装置。
1. An image generating apparatus for rendering a three-dimensional image, comprising: a Z buffer storing information indicating a depth of a polygon to be rendered from a viewpoint; and indicating whether or not the polygon to be rendered includes pixels which are not rendered. Flag means; and if the flag means indicates that the polygon to be drawn does not include a pixel to be drawn, reference to an area on the Z buffer corresponding to the pixel of the polygon to be drawn and texture corresponding to the pixel of the polygon to be drawn. And a parallel processing means for executing the reference in parallel.
【請求項2】 請求項1記載の画像生成装置において、
前記フラグ手段は、複数のポリゴンから構成されるオブ
ジェクト単位に描画されないピクセルを含むか否かを示
すことを特徴とする画像生成装置。
2. The image generating apparatus according to claim 1, wherein
An image generating apparatus according to claim 1, wherein said flag means indicates whether or not a pixel which is not drawn in an object unit composed of a plurality of polygons is included.
【請求項3】 3次元画像を描画する画像生成方法であ
って、 描画するポリゴンの視点からの奥行きを示す情報をZバ
ッファに格納するステップと、 描画するポリゴンが描画されないピクセルを含むか否か
をフラグに設定するフラグステップと、 前記フラグステップにより、描画するポリゴンは描画さ
れないピクセルを含まないことがフラグに設定された場
合、描画するポリゴンのピクセルに対応するZバッファ
上の領域の参照と描画するポリゴンのピクセルに対応す
るテクスチャの参照とを並行的に実行する並行処理ステ
ップとを備えたことを特徴とする画像生成方法。
3. An image generation method for drawing a three-dimensional image, comprising: storing information indicating a depth of a polygon to be drawn from a viewpoint in a Z buffer; and determining whether the polygon to be drawn includes pixels not drawn. A flag step of setting a flag as a flag, and, in the flag step, when the flag indicates that the polygon to be drawn does not include a pixel that is not drawn, referencing and drawing an area on the Z buffer corresponding to the pixel of the polygon to be drawn A parallel processing step of concurrently executing a reference to a texture corresponding to a pixel of a polygon to be processed.
【請求項4】 請求項3記載の画像生成方法を実行する
ためのプログラムを記録したコンピュータ読み取り可能
な記録媒体。
4. A computer-readable recording medium on which a program for executing the image generating method according to claim 3 is recorded.
JP11222048A 1999-08-05 1999-08-05 Device and method for generating image and recording medium Pending JP2001052198A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11222048A JP2001052198A (en) 1999-08-05 1999-08-05 Device and method for generating image and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11222048A JP2001052198A (en) 1999-08-05 1999-08-05 Device and method for generating image and recording medium

Publications (1)

Publication Number Publication Date
JP2001052198A true JP2001052198A (en) 2001-02-23

Family

ID=16776289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11222048A Pending JP2001052198A (en) 1999-08-05 1999-08-05 Device and method for generating image and recording medium

Country Status (1)

Country Link
JP (1) JP2001052198A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007526585A (en) * 2004-03-03 2007-09-13 クゥアルコム・インコーポレイテッド Graphics pipeline and method with early depth detection
US8081182B2 (en) 2004-03-03 2011-12-20 Qualcomm Incorporated Depth buffer for rasterization pipeline

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007526585A (en) * 2004-03-03 2007-09-13 クゥアルコム・インコーポレイテッド Graphics pipeline and method with early depth detection
US8081182B2 (en) 2004-03-03 2011-12-20 Qualcomm Incorporated Depth buffer for rasterization pipeline

Similar Documents

Publication Publication Date Title
JP3635051B2 (en) Image generation method and apparatus, recording medium storing image processing program, and image processing program
US7042462B2 (en) Pixel cache, 3D graphics accelerator using the same, and method therefor
US6411294B1 (en) Image display apparatus and image display method
US20030117589A1 (en) Image processor, components thereof, and rendering method
JP3557208B2 (en) Computer graphics system with high performance multi-layer z-buffer
KR20060125269A (en) Apparatus and method for processing graphics, and computer readable medium storing the same
US10803547B2 (en) Graphics processing systems using a subset of pipeline stages
KR100277803B1 (en) 3D graphic display
JP3352982B2 (en) Rendering method and device, game device, and computer-readable recording medium for storing program for rendering three-dimensional model
JPH10320573A (en) Picture processor, and method for processing picture
JP4307222B2 (en) Mixed reality presentation method and mixed reality presentation device
JPH0371277A (en) Method and device for plotting surface model
US6712700B1 (en) Stereo model displaying method and apparatus in video game, game apparatus, and computer-readable recording medium stored with stereo model displaying program for video game
JPH09245191A (en) Transparency transformation method, its device and image processor
EP2728551B1 (en) Image rendering method and system
JP2001052198A (en) Device and method for generating image and recording medium
JP3052839B2 (en) Image processing apparatus and processing method thereof
JP3279260B2 (en) 3D graphics drawing device
JP2006293470A (en) Drawing system, method therefor, and drawing program
JP4188463B2 (en) Image generating apparatus, image generating method, and storage medium
US20240169645A1 (en) Graphics processors
US20240169644A1 (en) Graphics processors
US20240169618A1 (en) Graphics processors
JPH10214352A (en) Method and device for picture formation
JPH1131236A (en) Sorting method of polygon data and picture processor using the method