JP4313892B2 - Drawing apparatus, drawing method, and recording medium - Google Patents

Drawing apparatus, drawing method, and recording medium Download PDF

Info

Publication number
JP4313892B2
JP4313892B2 JP12773199A JP12773199A JP4313892B2 JP 4313892 B2 JP4313892 B2 JP 4313892B2 JP 12773199 A JP12773199 A JP 12773199A JP 12773199 A JP12773199 A JP 12773199A JP 4313892 B2 JP4313892 B2 JP 4313892B2
Authority
JP
Japan
Prior art keywords
value
data
pixel
offset
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.)
Expired - Lifetime
Application number
JP12773199A
Other languages
Japanese (ja)
Other versions
JP2000322595A (en
Inventor
一史 小池
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
Bandai Namco Entertainment Inc
Original Assignee
Namco Ltd
Namco Bandai Games Inc
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, Namco Bandai Games Inc filed Critical Namco Ltd
Priority to JP12773199A priority Critical patent/JP4313892B2/en
Publication of JP2000322595A publication Critical patent/JP2000322595A/en
Application granted granted Critical
Publication of JP4313892B2 publication Critical patent/JP4313892B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、爆発や煙などのように立体であるが、見る方向の決まっているエフェクトや柱など見る向きに関係なく一定の形状の物体を少ないポリゴン数で表示できるようにした描画装置および描画方法、記録媒体に関する。
【0002】
【従来の技術】
図5は3D空間内でテクスチャを貼り付けたポリゴン若しくはスプライトを表示する従来の表示例を示したものである。かかる表示例で3D物体と交差する場合に、立体感を表現できないという技術的課題がある。
【0003】
かかる技術的課題を解決した従来の走査型表示装置の描画装置として、例えば、特開平8−315178号公報に開示されたものがある。
【0004】
この描画装置は、スプライトと背景データを含むCGパターンとの3次元的な交差、あるいはスプライトと他のスプライトとの3次元情報を元に生成されたポリゴン等とスプライトとの交差の状態をリアルに表示することが考慮されている。
【0005】
この描画装置は、スプライト及び他の画像パターンの各ピクセル座標のZ値を格納するZバッファと、スプライト及び他の画像パターンの各ピクセルデータを格納するフレームバッファと、スプライトのZ値と他の画像パターンのZ値とを各ピクセル毎に比較し、より手前にあるZ値をZバッファに格納するともに、そのZ値に対応するピクセルデータをフレームバッファに格納するメモリ制御部とから構成したものである。
【0006】
上記構成を備えることにより、スプライト画像に1個又は各ピクセル毎に所定のZ値が与えられ、一方他の画像パターンを構成する各ピクセルのアドレスに対応するZ値がより手前にある場合にはそのZ値に対応するピクセルデータをフレームバッファに格納すると共にそのZ値の方がより手前である場合にはそのZ値に対応するピクセルデータをフレームバッファに格納し、これらのフレームバッファおよびZバッファのデータに基づいて各ピクセル毎にスプライト又は他の画像パターンの表示を行なうことにより、互いに交差した2以上のパターンにおいてより手前のパターンが表示される。一方その裏側のパターンは手前のパターンに隠れて表示されないようにするものである。
【0007】
【発明が解決しようとする課題】
しかしながら、従来の描画装置は、スプライトコントローラを個別に設けることにより、奥行き情報を持ったスプライトをポリゴンで作られる3次元空間に合成する。従って。従来の描画装置は、スプライトと他の3次元物体と幾何演算部を共通化していないために座標計算が複雑になるという技術的課題があった。
【0008】
本発明は、このような背景のもとになされたものであり、幾何演算処理を簡略化して立体感を表現できる描画装置および描画方法、記録媒体を提供することを目的とする。
【0009】
【課題を解決するための手段】
上記の目的を達成するために、本発明は、ポリゴンデータからジオメトリ演算により生成されるピクセルデータのZ値とZバッファから読み出したZ値との大小比較による隠面処理を含むレンダリング処理を行なう描画装置において、前記ピクセルデータのZ値に対応するオフセットZ値を奥行き情報メモリから読み出し、そのオフセットZ値を前記ピクセルデータのZ値に加算するオフセット加算手段と、前記比較手段での比較結果に応じて、前記ピクセルのZ値をZバッファに書き込み、かつ、前記ピクセルデータをテクスチャメモリから読み出してフレームバッファに書き込む手段とを備えることを特徴とする。
【0010】
上記目的を達成するため、本発明は、前述の構成に加えて、前記ポリゴンデータに付されたフラグ値に応じてオフセットZ値を加えるか否かを判断するオフセット判断手段を備えることを特徴とする。
【0011】
上記目的を達成するために、本発明は、前記テクスチャメモリに格納した元絵データを構成するピクセル毎に対応した奥行きデータをオフセットZ値とすることを特徴とする。
【0012】
上記目的を達成するため、本発明は、前記元絵データは指向性のない元絵データを含むことを特徴とする。
【0013】
上記目的を達成するため、本発明は、ポリゴンデータを構成するピクセルのX,Y座標データをもとにZバッファからZ値を読み出す読み出しステップと、前記Zバッファから読み出したZ値と前記ピクセルのZ値との大小比較する比較ステップと、当該比較ステップの結果に応じて前記ZバッファにZ値を書き込むステップとを有する描画方法において、前記ピクセルのZ値に対応するオフセットZ値を奥行き情報メモリから読み出し、そのオフセットZ値を前記ピクセルのZ値に加算するオフセット加算ステップと、前記ピクセルのZ値をZバッファに書き込み、かつ、前記ピクセルに対応する元絵データを構成するピクセルデータをテクスチャメモリから読み出してフレームバッファに書き込むステップと、を備えることを特徴とする。
【0014】
上記目的を達成するために、本発明は、前述の構成に加えて、前記ポリゴンに付されたフラグ値に応じてオフセットZ値を加えるか否かを判断するオフセット判断ステップを有することを特徴とする。
【0015】
本発明の装置で行なっている方法や本発明の装置を構築することができるプログラムを格納した記録媒体も本発明に含まれる。
【0016】
【発明の実施の形態】
以下に図面を参照して、本発明の描画装置及び描画方法を詳細に説明する。
【0017】
図1は本発明の描画装置の一実施の形態を示すブロック図であり、図3(a)は爆発パターンを表した元絵を示す模式図であり、図3(b)は図3(a)に示す元絵を構成するピクセルに対応した奥行きデータを示す模式図である。
【0018】
本実施の形態における描画装置は、ポリゴンデータからジオメトリ演算により生成されるピクセルデータのZ値とZバッファから読み出したZ値との大小比較による隠面処理を含むレンダリング処理を行なうものである。
【0019】
本実施の形態における描画装置は、図1に示すように幾何演算部1と、テクスチャメモリ2と、奥行き情報メモリ3と、描画処理部4と、Zバッファ5と、フレームバッファ6と、表示部7とからなる。以下に各部材を説明する。
【0020】
幾何処理部1は、ジオメトリ演算部に相当しており、ポリゴンの頂点座標データなどからなるポリゴンデータを描画処理回路4に送出する。本実施の形態において、幾何演算部1から出力されるポリゴンデータは、ポリゴン単位でフラグ値を設定してある。かかるフラグ値は奥行き情報メモリ3のデータを使うか否かを指示するものである。
【0021】
ここで、フラグ値がポリゴン単位で設定される理由は、プログラムを作成する段階で指向性のない元絵データを貼るポリゴンが予め決まっている。従って、ポリゴン単位でフラグ値を設定することにより、物体の質感等を表現するための通常の元絵データと指向性のない元絵データとを区別してレンダリング処理を統一するためである。
【0022】
テクスチャメモリ2は、物体表面に図柄を貼り付けて、例えば質感や模様を表現するためにテクスチャマッピングを行なう際の元絵データを格納するものである。テクスチャメモリ2に格納してある元絵データは明度、色相等を含んでいる。
【0023】
本実施の形態におけるテクスチャメモリ2は、前述の物体の質感や模様を表現するための元絵データの他に指向性のない元絵データも格納してある。
【0024】
ここで、指向性のない元絵データとは、立体であるが、見る方向の決まってるエフェクトや柱や、見る向きに関係なく一定の形状の爆発パターンや煙などの元絵データを意味する。
【0025】
図3に示す元絵データは、指向性のない元絵の代表例として爆発パターンを示したものである。
【0026】
図3(a)はテクスチャメモリ2に格納してあるピクセルデータを模式的に示したものである。かかるピクセルデータはポリゴンにマッピングするために明度、色相に関するデータも含んでいるので、爆発パターンをリアルに見せるための色彩を表現できるようになっている。
【0027】
爆発パターンを構成するピクセルに対応した奥行きデータが図3(b)に示すように奥行きデータメモリ3に格納してある。図3(b)において、点線で区切られた四角はピクセルを概念的に示したものである。かかるピクセルに対応したZ値は爆発パターンをリアルに表現するように個別の値を設定してある。
【0028】
爆発パターンは、図3に示すように完全に透明として表示するためのデータを含むものである。本実施の形態では、完全な透明を示すためにスクリーンの無限遠にあることを意味するZ値を設定してある。かかる完全な透明処理により複雑な元絵を一枚で表現できている。又、図3(b)に示す爆発パターンの4つの頂点座標データはポリゴンの4つの頂点座標データと対応している。
【0029】
奥行き情報メモリ3は、テクスチャメモリ2に格納してある指向性のない元絵データを構成するピクセル毎に対応した奥行きデータを格納したメモリである。かかる奥行きデータは、スクリーンを0とし、スクリーンの奥側を正の値とし、スクリーンの手前を負の値として記述する。
【0030】
例えば図3に示す爆発パターンを構成するピクセルのうちスクリーン手前にあるピクセルが正の小さな値となり、図3に示す爆発パターンを構成するピクセルのうちスクリーン奥側にあるピクセルほど正の大きな値となる。
【0031】
かかる奥行きデータはレンダリング処理における隠面消去する際にオフセットZ値として用いることになる。このように指向性のない元絵データを構成するピクセル毎に対応した奥行きデータを使用して隠面処理するので、図2及び図4を参照して説明するように指向性のない元絵とポリゴンとの境界面をリアルに表現することになる。
【0032】
一方、奥行きデータからスクリーンの手前にあるテクスチャを構成するピクセルはクリッピング処理により、表示部7で表示されないことになる。
【0033】
描画処理部4は、幾何演算部1で座標変換されたポリゴンの幾何形状データを入力としてレンダリング処理を行なった画像データを出力する回路である。
【0034】
描画処理部4は、幾何演算部1から入力されるポリゴンデータのうちの頂点座標データからポリゴンの輪郭を構成するピクセルデータ及びポリゴン内部を構成するピクセルデータを生成し、テクスチャマッピング、色演算を行ない、半透明処理、更にZバッファ法による隠面処理を施したピクセルデータをフレームバッファ6に出力する。
【0035】
描画処理部4は、明確に図示していないが、テクスチャメモリ2、奥行き情報メモリ3、Zバッファ5、フレームバッファ6とデータの書き込み、読み出し処理を行なうメモリ制御機能を含んでいる。具体的には、ポリゴンデータを構成するピクセルデータのうちX,Y座標データをもとにZバッファ5からZ値を読み出すZバッファ5の制御手段を具備する。フレームバッファ6の書き込みを制御するフレームバッファ6の書き込み制御手段等を具備する。
【0036】
Zバッファ5は、Zバッファ法による隠面処理を行なうために、ピクセル毎にZ座標を保持するためのメモリである。
【0037】
フレームバッファ6は、表示部7に表示するピクセルデータを格納するものである。
【0038】
表示部7は、フレームバッファ6から画像信号を入力して所定の画像を表示する例えばCRT装置である。
【0039】
次に本実施の形態におけるレンダリング処理を図2を参照して説明する。
図2は本実施の形態に係る描画装置におけるレンダリング処理をソフトウエア的に示したフローチャートである。
【0040】
このレンダリング処理ルーチンは、図示しないメインルーチンに起動されるものであり、幾何演算部1から入力されるポリゴン単位で実行することになるので、次に処理すべきポリゴンが残っていれば、再び起動することになる。
【0041】
先ず、幾何演算部1から入力されるポリゴンデータとテクスチャメモリ2から入力される元絵データ(指向性のない元絵データを含む)との合成処理を伴うレンダリング処理を説明する。
【0042】
描画処理部4は、図2に示すレンダリング処理ルーチンを起動すれば、幾何演算部1から一枚のポリゴンデータに相当する頂点座標データを読み出す(ステップ1)。描画処理部4はポリゴン内にあるピクセルのX,Y座標値をもとにZバッファ5からZ値を読み出す(ステップ2)。
【0043】
描画処理部4は、奥行き情報を使用するか否かを判断するためにポリゴンデータのフラグ値を参照する(ステップ3)。描画処理部4は、ステップ3でフラグ値を1であると判断すれば、幾何演算部1から入力されたポリゴンデータと指向性のない元絵データとでZバッファ法によるレンダリング処理を行なうことになる。描画処理部4は、ピクセルのZ値に対応する奥行き情報メモリ3のオフセットZ値を加える(ステップ4)。ステップ3及びステップ4で示す処理は指向性のない元絵データを含むポリゴンの隠面処理を正確に行なうための前提となる処理である。
【0044】
描画処理部4は、ステップ4でピクセルZ値にこれに対応する奥行き情報メモリ3のオフセットZ値を加えたピクセルのZ値とZバッファ5の値と比較する(ステップ5)。描画処理部4は、ステップ5でピクセルのZ値<Zバッファ5の値と判断すれば、ステップ6の処理を実行することになる。つまり、描画処理部4は、そのピクセルのZ値をZバッファ5に書き込む。描画処理部4は、そのピクセルに対応する指向性のない元絵データを構成するピクセルデータをテクスチャメモリ2から読み出し、フレームバッファ6に書き込む(ステップ6)。
【0045】
一方、描画処理部4は、ステップ5でピクセルのZ値>=Zバッファ5の値と判断すれば、ステップ6の処理を行なわずにステップ7に進むことになる。つまり、描画処理部4は、ポリゴンの全てのピクセルを処理したか否かを判断する(ステップ7)。描画処理部4は、ステップ7で全てのピクセルを処理しきってないと判断すれば、ステップ2に戻り、前述してあるステップ2以降の処理を実行することになる。描画処理部4は、ステップ7で全てのピクセルを処理しきったと判断すれば、本ルーチンを終了することになる。
【0046】
一方、描画処理部4は、ステップ3でフラグ値を0であると判断すれば、ステップ4の処理を実行せずに、つまり奥行き情報メモリ3のオフセットZ値を加えないピクセルのZ値とZバッファ5の値を比較する(ステップ5)。これは物体の質感等を表現するための一般的なテクスチャマッピングに相当する。
なお、ステップ5以降の処理は前述してあるので、説明を省略する。
【0047】
前述の本実施の形態ではステップ4における演算処理は、奥行き情報メモリ3に格納してあるオフセットZ値をピクセルのZ値に単純に加算するものとして説明した。これに限定されるものでなく、所定の定数を乗算した後でピクセルデータを構成するZ値に加算するようにしてもよい。これにより、メモリ容量を削減して複数の指向性のない元絵データを格納したと同様の結果が得られる。
【0048】
上述した図2に示すステップ3からステップ4に示した処理を独立のルーチンとして、他の処理に先行して行なってもよい。これは、プログラムを作成する段階で指向性のない元絵データを貼るポリゴンが決まっており、しかもポリゴン単位で判断すれば、ピクセル単位で判断することに比べて、判断処理を減らすことができるからである。
【0049】
なお、図2を参照して説明したレンダリング処理を集積回路で実現してもよい。その場合、図2に示したステップ4の処理を行なうポリゴンデータとステップ4の処理を行なわないポリゴンデータに振り分けて図2に示すステップ1ステップ2、ステップ5からステップ7に処理を並列的に実行する回路構成となる。これにより、図2を参照して説明したソフトウエアによる処理よりも高速に実行することができる。
【0050】
前述の実施の形態では、ステップ6における処理は、テクスチャメモリ2から読み出した元絵データをそのままフレームメモリ6に書き込むものとして説明してある。これに限定されるものでなく、テクスチャメモリ2から読み出した元絵データにバイリニア補間やトライリニア補間を行なった後でフレームメモリ6に書き込むようにしてもよい。
【0051】
図4は本実施の形態における画像合成装置によって合成された画像の表示状態を示す模式図である。具体的には、本実施の形態における画像合成装置を用いて、指向性のない元絵とポリゴンの一例であるビルの壁面とを合成して表示した例を示したものである。図5で示した従来の表示例に比較して、図4に示した表示例は、爆発パターンとビルの壁面との3次元的な交差状態をリアルに表示してある。
【0052】
しかも、前述のようにして、本実施の形態における描画装置は、図5を参照して説明した従来例に比較して、立体ではあるが、見る方向の決まっているエフェクトや柱、若しくは爆発パターンや煙など立体であるが、見る向きに関係なく一定の物体を少ないポリゴン数で表示でき、かつ、指向性のない元絵データとポリゴンとの3次元的な交差面をリアルに表示することができた。
【0053】
更に、本発明は、上記の実施の形態の機能を実現するプログラムを記憶媒体に格納し、コンピュータを用いて、その記録媒体に格納されたプログラムを読み出して実行するようにしても良い。記録媒体としては、フロッピーディスク、ハードディスク、光磁気ディスク、CD−ROMを用いることができる。
【0054】
【発明の効果】
以上説明したように、本発明は、爆発や煙など立体であるが、見る方向の決まっているエフェクトや柱など見る向きに関係なく一定の形状の物体を通常のポリゴンと合成するに際して、座標演算処理が複雑にならないので、幾何演算コストを低減させた描画装置および描画方法、記録媒体を提供することができる。
【図面の簡単な説明】
【図1】 本発明の画像合成装置の一実施の形態を示すブロック図
【図2】 本実施の形態に係る描画装置におけるレンダリング処理をソフトウエア的に示したフローチャート
【図3】 図3(a)は爆発パターンを表した元絵を示す模式図、図3(b)は図3(a)に示す元絵を構成するピクセルデータに対応した奥行きデータを示し模式図
【図4】 本実施の形態における画像合成装置によって合成された画像の表示状態を示す模式図
【図5】 3D空間内でテクスチャを貼り付けたポリゴン若しくはスプライトを表示する従来の表示例
【符号の説明】
1 幾何演算部
2 描画処理部
3 テクスチャメモリ
4 奥行き情報メモリ
5 Zバッファ
6 フレームバッファ
7 表示部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a drawing apparatus and a drawing capable of displaying an object having a fixed shape with a small number of polygons regardless of the viewing direction, such as an effect or a pillar, which is stereoscopic, such as explosion or smoke The present invention relates to a method and a recording medium.
[0002]
[Prior art]
FIG. 5 shows a conventional display example for displaying a polygon or sprite with a texture pasted in a 3D space. In such a display example, there is a technical problem that a stereoscopic effect cannot be expressed when intersecting with a 3D object.
[0003]
As a drawing apparatus of a conventional scanning display device that solves this technical problem, for example, there is one disclosed in JP-A-8-315178.
[0004]
This drawing apparatus realistically shows the state of intersection between a sprite and a CG pattern including background data, or the intersection between a sprite and a sprite that is generated based on three-dimensional information between the sprite and another sprite. Display is considered.
[0005]
This drawing apparatus includes a Z buffer for storing Z values of pixel coordinates of sprites and other image patterns, a frame buffer for storing pixel data of sprites and other image patterns, Z values of sprites and other images. Compared with the Z value of the pattern for each pixel, the Z value in the foreground is stored in the Z buffer, and the pixel data corresponding to the Z value is stored in the frame buffer. is there.
[0006]
By providing the above configuration, when a predetermined Z value is given to the sprite image for each pixel or for each pixel, while the Z value corresponding to the address of each pixel constituting the other image pattern is closer to the front Pixel data corresponding to the Z value is stored in the frame buffer, and if the Z value is in front, the pixel data corresponding to the Z value is stored in the frame buffer, and these frame buffer and Z buffer By displaying sprites or other image patterns for each pixel based on the data, the previous pattern is displayed in two or more patterns intersecting each other. On the other hand, the pattern on the back side is hidden behind the previous pattern so as not to be displayed.
[0007]
[Problems to be solved by the invention]
However, the conventional drawing apparatus synthesizes sprites having depth information into a three-dimensional space made of polygons by providing sprite controllers individually. Therefore. The conventional drawing apparatus has a technical problem that the coordinate calculation is complicated because the sprite, the other three-dimensional object, and the geometric operation unit are not shared.
[0008]
The present invention has been made based on such a background, and an object of the present invention is to provide a drawing apparatus, a drawing method, and a recording medium capable of expressing a stereoscopic effect by simplifying geometric calculation processing.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a rendering process including a rendering process including a hidden surface process based on a size comparison between a Z value of pixel data generated by polygon calculation from polygon data and a Z value read from a Z buffer. In the apparatus, offset Z value corresponding to the Z value of the pixel data is read out from the depth information memory, and the offset Z value is added to the Z value of the pixel data, according to the comparison result of the comparison unit. And a means for writing the Z value of the pixel into a Z buffer, and reading out the pixel data from a texture memory and writing it into a frame buffer.
[0010]
In order to achieve the above object, the present invention is characterized by comprising offset determining means for determining whether or not to add an offset Z value according to a flag value attached to the polygon data, in addition to the above-described configuration. To do.
[0011]
In order to achieve the above object, the present invention is characterized in that depth data corresponding to each pixel constituting original picture data stored in the texture memory is used as an offset Z value.
[0012]
In order to achieve the above object, the present invention is characterized in that the original picture data includes original picture data having no directivity.
[0013]
In order to achieve the above object, the present invention provides a reading step of reading a Z value from a Z buffer based on X and Y coordinate data of pixels constituting polygon data, and the Z value read from the Z buffer and the pixel In a drawing method comprising a comparison step for comparing the size with a Z value and a step of writing the Z value in the Z buffer according to the result of the comparison step, an offset Z value corresponding to the Z value of the pixel is stored in a depth information memory. The offset addition step of adding the offset Z value to the Z value of the pixel, writing the Z value of the pixel into the Z buffer, and writing the pixel data constituting the original picture data corresponding to the pixel into the texture memory Reading from and writing to a frame buffer.
[0014]
In order to achieve the above object, the present invention has an offset determination step for determining whether or not to add an offset Z value according to a flag value attached to the polygon, in addition to the above-described configuration. To do.
[0015]
The present invention also includes a recording medium storing a method performed by the apparatus of the present invention and a program capable of constructing the apparatus of the present invention.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a drawing apparatus and a drawing method of the present invention will be described in detail with reference to the drawings.
[0017]
FIG. 1 is a block diagram showing an embodiment of a drawing apparatus according to the present invention, FIG. 3A is a schematic diagram showing an original picture showing an explosion pattern, and FIG. 3B is a diagram showing FIG. It is a schematic diagram which shows the depth data corresponding to the pixel which comprises the original picture shown in FIG.
[0018]
The rendering apparatus according to the present embodiment performs rendering processing including hidden surface processing by comparing the Z value of pixel data generated by polygon calculation from polygon data with the Z value read from the Z buffer.
[0019]
As shown in FIG. 1, the drawing apparatus according to the present embodiment includes a geometric operation unit 1, a texture memory 2, a depth information memory 3, a drawing processing unit 4, a Z buffer 5, a frame buffer 6, and a display unit. 7 Each member will be described below.
[0020]
The geometric processing unit 1 corresponds to a geometry calculation unit and sends polygon data including polygon vertex coordinate data to the drawing processing circuit 4. In the present embodiment, the polygon data output from the geometric calculation unit 1 has a flag value set for each polygon. Such a flag value indicates whether or not to use the data in the depth information memory 3.
[0021]
Here, the reason why the flag value is set in units of polygons is that a polygon on which original picture data having no directivity is pasted is determined in advance at the stage of creating a program. Therefore, by setting a flag value in units of polygons, rendering processing is unified by distinguishing normal original picture data for expressing the texture of an object and the like from original picture data having no directivity.
[0022]
The texture memory 2 stores original picture data when a pattern is pasted on an object surface and texture mapping is performed to express, for example, a texture or a pattern. The original picture data stored in the texture memory 2 includes brightness, hue, and the like.
[0023]
The texture memory 2 in the present embodiment stores original picture data having no directivity in addition to the original picture data for expressing the texture and pattern of the object.
[0024]
Here, the original picture data having no directivity means three-dimensional original picture data such as effects and pillars whose viewing direction is determined and explosion patterns and smoke having a fixed shape regardless of the viewing direction.
[0025]
The original picture data shown in FIG. 3 shows an explosion pattern as a representative example of the original picture having no directivity.
[0026]
FIG. 3A schematically shows pixel data stored in the texture memory 2. Since such pixel data includes data relating to brightness and hue for mapping to polygons, it is possible to express colors for making the explosion pattern look realistic.
[0027]
Depth data corresponding to the pixels constituting the explosion pattern is stored in the depth data memory 3 as shown in FIG. In FIG. 3B, the squares delimited by dotted lines conceptually indicate pixels. The Z value corresponding to such a pixel is set to an individual value so as to realistically represent the explosion pattern.
[0028]
The explosion pattern includes data for displaying as completely transparent as shown in FIG. In this embodiment, in order to show complete transparency, a Z value indicating that the screen is at infinity is set. A complicated original picture can be expressed by a single piece by such complete transparency processing. Also, the four vertex coordinate data of the explosion pattern shown in FIG. 3B correspond to the four vertex coordinate data of the polygon.
[0029]
The depth information memory 3 is a memory that stores depth data corresponding to each pixel constituting original picture data having no directivity stored in the texture memory 2. The depth data describes the screen as 0, the back side of the screen as a positive value, and the front side of the screen as a negative value.
[0030]
For example, among the pixels constituting the explosion pattern shown in FIG. 3, the pixel in front of the screen has a small positive value, and among the pixels constituting the explosion pattern shown in FIG. 3, the pixel on the far side of the screen has a large positive value. .
[0031]
Such depth data is used as an offset Z value when removing hidden surfaces in rendering processing. Since the hidden surface processing is performed using the depth data corresponding to each pixel constituting the original picture data having no directivity as described above, the original picture having no directivity and the non-directional original picture are described as described with reference to FIGS. The boundary surface with the polygon is expressed realistically.
[0032]
On the other hand, the pixels constituting the texture in front of the screen from the depth data are not displayed on the display unit 7 by the clipping process.
[0033]
The drawing processing unit 4 is a circuit that outputs image data that has been subjected to rendering processing using polygon geometric shape data that has undergone coordinate conversion by the geometric operation unit 1 as an input.
[0034]
The drawing processing unit 4 generates pixel data constituting the outline of the polygon and pixel data constituting the inside of the polygon from the vertex coordinate data of the polygon data input from the geometric operation unit 1, and performs texture mapping and color calculation. The pixel data subjected to the translucent process and the hidden surface process by the Z buffer method is output to the frame buffer 6.
[0035]
Although not clearly illustrated, the drawing processing unit 4 includes a texture memory 2, a depth information memory 3, a Z buffer 5, and a frame buffer 6 and a memory control function for performing data writing and reading processing. More specifically, a control unit for the Z buffer 5 is provided which reads a Z value from the Z buffer 5 based on X and Y coordinate data of pixel data constituting the polygon data. A writing control means for the frame buffer 6 for controlling writing in the frame buffer 6 is provided.
[0036]
The Z buffer 5 is a memory for holding a Z coordinate for each pixel in order to perform hidden surface processing by the Z buffer method.
[0037]
The frame buffer 6 stores pixel data to be displayed on the display unit 7.
[0038]
The display unit 7 is, for example, a CRT device that receives a video signal from the frame buffer 6 and displays a predetermined image.
[0039]
Next, rendering processing in the present embodiment will be described with reference to FIG.
FIG. 2 is a flowchart showing a rendering process in software in the drawing apparatus according to the present embodiment.
[0040]
This rendering processing routine is started by a main routine (not shown), and is executed in units of polygons input from the geometric operation unit 1. Therefore, if there are polygons to be processed next, start again. Will do.
[0041]
First, a rendering process that includes a synthesis process of polygon data input from the geometric operation unit 1 and original picture data (including original picture data having no directivity) input from the texture memory 2 will be described.
[0042]
When the rendering processing routine shown in FIG. 2 is started, the drawing processing unit 4 reads vertex coordinate data corresponding to one piece of polygon data from the geometric operation unit 1 (step 1). The drawing processor 4 reads the Z value from the Z buffer 5 based on the X and Y coordinate values of the pixels in the polygon (step 2).
[0043]
The drawing processing unit 4 refers to the flag value of the polygon data to determine whether or not to use depth information (step 3). If the drawing processing unit 4 determines that the flag value is 1 in step 3, the rendering processing unit 4 performs rendering processing by the Z buffer method with the polygon data input from the geometric operation unit 1 and the original picture data having no directivity. Become. The drawing processing unit 4 adds the offset Z value of the depth information memory 3 corresponding to the Z value of the pixel (step 4). The processing shown in Step 3 and Step 4 is a precondition for accurately performing the hidden surface processing of the polygon including the original picture data having no directivity.
[0044]
The drawing processing unit 4 compares the Z value of the pixel obtained by adding the offset Z value of the depth information memory 3 corresponding to the pixel Z value in step 4 with the value of the Z buffer 5 (step 5). If the drawing processing unit 4 determines in step 5 that the Z value of the pixel <the value of the Z buffer 5, the drawing processing unit 4 executes the processing of step 6. That is, the drawing processing unit 4 writes the Z value of the pixel in the Z buffer 5. The drawing processing unit 4 reads out pixel data constituting original picture data having no directivity corresponding to the pixel from the texture memory 2 and writes it into the frame buffer 6 (step 6).
[0045]
On the other hand, if the drawing processing unit 4 determines in step 5 that the pixel Z value> = the value of the Z buffer 5, the drawing processing unit 4 proceeds to step 7 without performing the processing in step 6. That is, the drawing processing unit 4 determines whether or not all the pixels of the polygon have been processed (step 7). If the drawing processing unit 4 determines in step 7 that all the pixels have not been processed, the drawing processing unit 4 returns to step 2 and executes the processing from step 2 described above. If the drawing processing unit 4 determines that all the pixels have been processed in step 7, the routine ends.
[0046]
On the other hand, if it is determined in step 3 that the flag value is 0, the rendering processing unit 4 does not execute the process of step 4, that is, the Z value and Z of the pixel to which the offset Z value of the depth information memory 3 is not added. The values in the buffer 5 are compared (step 5). This corresponds to general texture mapping for expressing the texture of an object.
In addition, since the process after step 5 is mentioned above, description is abbreviate | omitted.
[0047]
In the above-described embodiment, the calculation process in step 4 has been described as simply adding the offset Z value stored in the depth information memory 3 to the Z value of the pixel. However, the present invention is not limited to this, and a predetermined constant may be multiplied and added to the Z value constituting the pixel data. As a result, the same result can be obtained as when a plurality of original picture data having no directivity are stored by reducing the memory capacity.
[0048]
The above-described processing shown in Step 3 to Step 4 shown in FIG. 2 may be performed prior to other processing as an independent routine. This is because at the stage of creating a program, the polygons to which non-directive original picture data is pasted are determined, and if judged on a polygon basis, the judgment process can be reduced compared to judging on a pixel basis. It is.
[0049]
Note that the rendering processing described with reference to FIG. 2 may be realized by an integrated circuit. In that case, the processing is performed in parallel from Step 1 to Step 2 and Step 5 to Step 7 shown in FIG. 2 by dividing the polygon data to be processed in Step 4 shown in FIG. 2 and the polygon data not to be processed in Step 4. Circuit configuration. As a result, it can be executed at a higher speed than the processing by the software described with reference to FIG.
[0050]
In the above-described embodiment, the processing in step 6 has been described as writing the original picture data read from the texture memory 2 into the frame memory 6 as it is. However, the present invention is not limited to this, and the original picture data read from the texture memory 2 may be subjected to bilinear interpolation or trilinear interpolation and then written to the frame memory 6.
[0051]
FIG. 4 is a schematic diagram showing a display state of an image synthesized by the image synthesizing apparatus according to the present embodiment. Specifically, an example in which an image composition apparatus according to the present embodiment is used to synthesize and display an original picture having no directivity and a wall surface of a building, which is an example of a polygon, is shown. Compared with the conventional display example shown in FIG. 5, the display example shown in FIG. 4 realistically displays the three-dimensional intersection state between the explosion pattern and the wall surface of the building.
[0052]
In addition, as described above, the drawing apparatus according to the present embodiment is a three-dimensional effect, column, or explosion pattern that is three-dimensional compared to the conventional example described with reference to FIG. A solid object such as smoke or smoke, but it is possible to display a certain object with a small number of polygons regardless of the viewing direction, and to realistically display a three-dimensional intersection of the original picture data and polygons with no directivity did it.
[0053]
Furthermore, the present invention may store a program for realizing the functions of the above-described embodiments in a storage medium, and read and execute the program stored in the recording medium using a computer. As the recording medium, a floppy disk, a hard disk, a magneto-optical disk, or a CD-ROM can be used.
[0054]
【The invention's effect】
As described above, the present invention is a three-dimensional object such as an explosion or smoke. However, when combining an object of a fixed shape with a normal polygon regardless of the viewing direction, such as an effect or a pillar in which the viewing direction is determined, coordinate calculation is performed. Since the processing is not complicated, it is possible to provide a drawing apparatus, a drawing method, and a recording medium with reduced geometric calculation costs.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of an image composition apparatus of the present invention. FIG. 2 is a flowchart showing a rendering process in software in the rendering apparatus according to the embodiment. ) Is a schematic diagram showing an original picture representing an explosion pattern, and FIG. 3B is a schematic diagram showing depth data corresponding to pixel data constituting the original picture shown in FIG. 3A. FIG. 5 is a schematic diagram showing a display state of an image synthesized by an image synthesizing apparatus in a form. FIG. 5 is a conventional display example of displaying a polygon or sprite with a texture pasted in a 3D space.
DESCRIPTION OF SYMBOLS 1 Geometric operation part 2 Drawing process part 3 Texture memory 4 Depth information memory 5 Z buffer 6 Frame buffer 7 Display part

Claims (5)

ポリゴンデータからジオメトリ演算により生成されるピクセルデータのZ値とZバッファから読み出したZ値との大小比較による隠面処理を含むレンダリング処理を行なう描画装置において、前記ポリゴンデータに付されたフラグ値に応じてオフセットZ値を加えるか否かを判断するオフセット判断手段と、前記ピクセルデータのZ値に対応するオフセットZ値を奥行き情報メモリから読み出し、そのオフセットZ値を前記ピクセルデータのZ値に演算するオフセット演算手段と、前記大小比較の結果に応じて、前記ピクセルデータのZ値をZバッファに書き込み、かつ、前記ピクセルデータをテクスチャメモリから読み出してフレームバッファに書き込む手段とを備えることを特徴とする描画装置。In a drawing apparatus that performs rendering processing including hidden surface processing by comparing the Z value of pixel data generated by polygon calculation from polygon data and the Z value read from the Z buffer, the flag value attached to the polygon data And an offset determining means for determining whether or not to add an offset Z value, and reading the offset Z value corresponding to the Z value of the pixel data from the depth information memory, and calculating the offset Z value to the Z value of the pixel data And an offset calculating means that writes the Z value of the pixel data into a Z buffer and reads the pixel data from a texture memory and writes it into a frame buffer according to the result of the size comparison. Drawing device to do. 前記テクスチャメモリに格納した元絵データを構成するピクセル毎に対応した奥行きデータをオフセットZ値とすることを特徴とする請求項1に記載の描画装置。   2. The drawing apparatus according to claim 1, wherein depth data corresponding to each pixel constituting the original picture data stored in the texture memory is set as an offset Z value. 前記元絵データは指向性のない元絵データを含むことを特徴とする請求項1又は請求項に記載の描画装置。The original picture data drawing apparatus according to claim 1 or claim 2, characterized in that it comprises a source picture data with no directivity. ポリゴンデータを構成するピクセルのX,Y座標データをもとにZバッファからZ値を読み出す読み出しステップと、前記Zバッファから読み出したZ値と前記ピクセルのZ値との大小比較する比較ステップと、当該比較ステップの結果に応じて前記ZバッファにZ値を書き込むステップとを有する描画方法において、前記ポリゴンデータに付されたフラグ値に応じてオフセットZ値を加えるか否かを判断するオフセット判断ステップと、前記ピクセルのZ値に対応するオフセットZ値を奥行き情報メモリから読み出し、そのオフセットZ値を前記ピクセルのZ値に演算するオフセット演算ステップと、前記ピクセルのZ値をZバッファに書き込み、かつ、前記ピクセルに対応する元絵データを構成するピクセルデータをテクスチャメモリから読み出してフレームバッファに書き込むステップと、を備えることを特徴とする描画方法。A reading step of reading a Z value from a Z buffer based on X and Y coordinate data of pixels constituting polygon data, and a comparing step of comparing the Z value read from the Z buffer with the Z value of the pixel; An offset determination step for determining whether to add an offset Z value according to a flag value attached to the polygon data in a drawing method including a step of writing a Z value to the Z buffer according to a result of the comparison step If, reads the offset Z value corresponding to the Z value of the pixel from the depth information memory, writing the offset calculating step of calculating the offset Z value to the Z value of the pixel, the Z value of the pixel in the Z buffer, and The pixel data constituting the original picture data corresponding to the pixel is stored in the texture memory. Drawing method characterized by comprising the steps of: writing into the frame buffer is read out. 請求項記載の描画方法をコンピュータシステムに構築することができるプログラムを格納した記録媒体。A recording medium storing a program capable of constructing the drawing method according to claim 4 in a computer system.
JP12773199A 1999-05-07 1999-05-07 Drawing apparatus, drawing method, and recording medium Expired - Lifetime JP4313892B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12773199A JP4313892B2 (en) 1999-05-07 1999-05-07 Drawing apparatus, drawing method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12773199A JP4313892B2 (en) 1999-05-07 1999-05-07 Drawing apparatus, drawing method, and recording medium

Publications (2)

Publication Number Publication Date
JP2000322595A JP2000322595A (en) 2000-11-24
JP4313892B2 true JP4313892B2 (en) 2009-08-12

Family

ID=14967307

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12773199A Expired - Lifetime JP4313892B2 (en) 1999-05-07 1999-05-07 Drawing apparatus, drawing method, and recording medium

Country Status (1)

Country Link
JP (1) JP4313892B2 (en)

Also Published As

Publication number Publication date
JP2000322595A (en) 2000-11-24

Similar Documents

Publication Publication Date Title
JP3725524B2 (en) Method for generating computer display image and computer processing system and graphics processor for generating image data
JP3635051B2 (en) Image generation method and apparatus, recording medium storing image processing program, and image processing program
US8602888B2 (en) Video game device and image processing program
US6411294B1 (en) Image display apparatus and image display method
US5877769A (en) Image processing apparatus and method
JP2763499B2 (en) Image synthesizing apparatus and image synthesizing method
JPH10302079A (en) Solid texture mapping processor and three-dimensional image generating device using the processor
JP2002099927A (en) Method and device for processing three-dimensional image, readable storage medium storing three- dimensional image processing program, and video game device
JP2004005452A (en) Image processor, image processing method, semiconductor device, computer program and record medium
JP3352982B2 (en) Rendering method and device, game device, and computer-readable recording medium for storing program for rendering three-dimensional model
JP2000011204A (en) Image processing method and recording medium with image processing program recorded thereon
US6339430B1 (en) Video game machine and method for changing texture of models
JPH11259671A (en) Image displaying method and image display device executing the same
CA2298081C (en) Image processing apparatus and method of same
US20010017629A1 (en) Methods and apparatus for drawing contours of objects in video games
JP2002133438A (en) Three-dimensional graphic plotting device, three- dimensional graphic plotting method, and recording medium capable of reading with three-dimensional polygon data recorded computer
JP2001275199A (en) Three-dimensional sound reproduction system
JP2003233836A (en) Image processor for conducting rendering shading processing by using distance component in modeling and its method
JP4313892B2 (en) Drawing apparatus, drawing method, and recording medium
JP3052839B2 (en) Image processing apparatus and processing method thereof
JP3490983B2 (en) Image processing method and image processing program
JP3745659B2 (en) Image generating apparatus and image generating program
JP4308367B2 (en) 3D image generation apparatus and environment map generation method
EP1249791B1 (en) 3-D game image processing method and device for drawing border lines
JP2001283254A (en) Three-dimensional graphic plotting device and its method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090325

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090512

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090518

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120522

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120522

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120522

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130522

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130522

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140522

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term