JP3722593B2 - Stereoscopic image rendering processing device - Google Patents
Stereoscopic image rendering processing device Download PDFInfo
- Publication number
- JP3722593B2 JP3722593B2 JP16998997A JP16998997A JP3722593B2 JP 3722593 B2 JP3722593 B2 JP 3722593B2 JP 16998997 A JP16998997 A JP 16998997A JP 16998997 A JP16998997 A JP 16998997A JP 3722593 B2 JP3722593 B2 JP 3722593B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- mapping pattern
- polygon
- frame memory
- value
- 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 - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
この発明は、3次元多面体物体を2次元スクリーン上に投影して表示する立体画像描画処理装置に関する。
【0002】
【従来の技術】
3次元立体図形を透視変換処理、遠近処理等によって、CRTディスプレイ等の2次元(平面)スクリーン上に合成して表示する場合、手前に存在する物体がそれより奥にある物体の一部または全てを隠す処理、即ち、隠面消去処理を行う必要がある。隠面消去の方法としては、Zソート法(塗り重ね法)、Zバッファ法、スキャンライン法等がある。
【0003】
マッピング処理が可能な立体画像描画処理装置においては、ポリゴンの隠面消去法として、Zバッファ法を用いた装置が特開平9−16806号公報に開示されている。この立体画像描画処理装置について、図10に従い説明する。図10は上記の立体画像描画処理装置の全体構成を示すブロック図であり、この装置は例えば、レーシングゲームや飛行機の操縦シュミレーション等のゲーム用機器に用いて好適な一例が示されている。
【0004】
画像情報供給装置100の構成について説明すると、この装置には、ワールドメモリ101、幾何変換装置102、操作部103、CPU104を備える。ワールドメモリ101にはあらゆる物体が複数のポリゴンの集合体として表現され、ポリゴンの端点をワールド座標上のX,Y,Z座標として格納している。更に、このワールドメモリ101には、オブジェクトのオブジェクト座標上のポリゴン端点のX,Y,Z座標、及びポリゴンに対応して夫々テクスチャ画像を格納するマッピングパターンメモリの端点情報データが格納されている。操作部103は、ハンドル、アクセル、ブレーキ等で構成され、その操作内容は電気信号に変換され、CPU104へ出力される。
【0005】
CPU104は、ハンドル、アクセル等で構成された操作部103の操作内容に基づいて変換された電気信号に従いこの状況に応じた状況データを演算し、幾何変換装置102へデータを与える。
【0006】
幾何変換装置102は、CPU104からの命令に従いワールドメモリ101から各ポリゴンの端点情報をデータを読み出し、オブジェクトの運動や視野の回転等に必要な行列演算を実行し、ワールド座標の端点をスクリーン座標へ投影変換する等の幾何変換を行い、そのX,Yの2次元のスクリーンデータをスクリーンメモリ105に与える。また、ポリゴンの視野変換された代表値、すなわち、そのポリゴンの視点からの距離の代表値、すなわち、Z値を決定し、そのデータをスクリーンメモリ105に与える。このスクリーンメモリ105は、各ポリゴンの端点につき、X,Yのスクリーン座標値、Z値、マッピングパターンメモリのU,V座標値が格納される。
【0007】
ポリゴン外形処理装置120は、ポリゴン摘出装置121、パラメータ演算装置122、垂直補間演算装置123、ワークメモリインターフェース(I/F)124で構成される。ポリゴン摘出装置121は、スクリーンメモリ105より読み出されたポリゴン端点のXYアドレスに基づいて、ポリゴンを構成する各辺のベクトル方向を判断し、そのベクトルの方向に応じて、ポリゴンの辺を構成する端点が右辺に属するか左辺に属するかを決定する。そして、ポリゴン摘出装置121にてスクリーンメモリ105からポリゴンを構成する各辺の端点、すなわち、Xの始点アドレス(XS)、Xの終点アドレス(XE)、及びYの始点アドレス(YS)、Yの終点アドレス(YE)、並びに、テクスチャを構成するマッピングパターンのU始点アドレス(US)、U終点アドレス(UE)、V始点アドレス(VS)、V終点アドレス(VE)を取り込むと共に、ポリゴンのZ値(ZS,ZE)を取り込み、パラメータ演算装置122に各データを与える。
【0008】
そして、このポリゴン外形処理装置120のパラメータ演算装置122は、ポリゴンの外形端点情報をデジタル微分解析(DDA)で求める際に必要なパラメータを算出し、そのパラメータを垂直補間演算装置123に与える。この垂直補間演算装置123にて、ポリゴンが各スキャンラインと交差する左辺及び右辺のそれぞれの外形端点情報、マッピングパターンのアドレス及びZ値を補間しながら算出する。算出された各データがワークメモリI/F124により、ワークメモリ126に与えられる。
【0009】
そして、ワークメモリ126には、ポリゴン外形処理装置120より与えられた各データ、すなわち、スキャンラインごとにポリゴンの左辺、右辺Xの値(XL,XR)と左辺のマッピングパターンメモリアドレス(UL)、右辺のマッピングパターンメモリアドレス(UR)と左辺のZ値(ZL)、右辺のZ値(ZR)が画面の垂直方向(Yアドレス方向)の解像度だけ夫々格納されている。
【0010】
更に、このワークメモリ126には、1つのYアドレスに格納されているポリゴン数(CNT)が書き込まれる。すなわち、1つのYアドレスに1個のポリゴンを格納する毎にポリゴン数をカウントアップしてゆき、このカウント数(CNT)がワークメモリ126に書き込むまれている。
【0011】
ワークメモリ126に格納されている各データはポリゴン内部処理装置130へ与えられる。ポリゴン内部処理装置130は、パラメータ演算装置131、水平補間装置132、ピクセル(Pixel)描画装置133、隠面処理装置134で構成される。
【0012】
パラメータ演算装置131にて、スキャンライン毎にワークメモリ126よりポリゴンの左辺X、右辺Xの値(XL,XR)と左辺のマッピングパターンメモリアドレス、右辺のマッピングパターンメモリアドレス値(UL,UR)と左辺の及び右辺のZ値(ZL,ZR)を受取り、水平補間演算に必要なパラメータを演算し、水平補間演算装置132及び隠面処理装置134へそれぞれパラメータを転送する。
【0013】
隠面処理装置134はZバッファ法を使用した隠面処理を行うもので、まず、スキャンライン毎にパラメータ演算装置131よりパラメータを受け取り、そのパラメータから連続する複数ドットのZ値を演算で求める。求めた複数ドットのZ値をZラインメモリ125に格納されたZ値と比較する。Z値ラインメモリ125には、1スキャンライン分のZ値データを4ドットづつを1つのアドレスに対応するように区分して格納されている。そして、求めた4ドットのZ値とZ値ラインメモリ125から4ドットのZ値を読み出し、並列に隠面処理を行ってゆき、Pixel描画装置133へ各ドットを並列に描画するか、しないかをコントロールするとともに、Z値ラインメモリ125に格納されたZ値を更新して行く。
【0014】
Z値ラインメモリ125は、1スキャンライン分のZ値の値を複数ドットごと格納する。
【0015】
Pixel描画装置133は、水平補間演算装置132から複数ドットのマッピングアドレス等を受け取り、隠面処理装置134から複数ドットの描画をするか、しないかのコントロール信号を受け取り、描画するドットのみ複数ドットを並列にカラーラインメモリ135へマッピングアドレスを書き込む。
【0016】
このカラーラインメモリ135は、1スキャンライン分のマッピングパターンメモリのアドレスを格納するもので、複数ドットのデータが並列に書き込まれるように構成されており、1アドレスに4つのドットの16ビットのマッピングパターンメモリのアドレスが順次格納される。
【0017】
また、カラーラインメモリ135は2枚あり、1個が書き込みしている間にもう一つのラインメモリ135の内容を読み出して、その値によりマッピングパターンメモリ137を読み出してその値をフレームメモリ8へ書き込む。
【0018】
水平補間演算装置132は、パラメータ演算装置31からパラメータを受け取り、水平補間演算を行ってマッピングパターンメモリアドレス(U,V)を算出する。この算出したマッピングパターンメモリアドレス(U,V)にて、データが格納されたマッピングパターンメモリ137をアクセスすることにより、マッピングパターンメモリ137に格納されたデータに基づき、各ドットのR,G,B値を順次読み出し、フレームメモリ136へ書き込む。
【0019】
ポリゴン内部処理装置130からフレームメモリ136へ与えられたドットのR,G,B値がCRT138に転送され画像として表示される。
【0020】
【発明が解決しようとする課題】
上記した装置によれば、各ポリゴン端点に模様のためのマッピングパターンメモリアドレス(U,V)とポリゴンのZ値を備え、そのマッピングパターンメモリアドレス(U,V)とZ値をポリゴンの外形に対応して変化させて補間し、複数ドットのZ値を演算で算出し、Zバッファ法を使用した隠面処理により、スキャンラインごと順次、複数ドットを並列で隠面処理を行い、マッピングパターンメモリアドレスをカラーラインメモリ135へ書き込み、スキャンラインの処理が終了すると、マッピングパターンメモリ135をアクセスし、R,G,Bデータをフレームメモリ136へ転送することにより、高速に描画することが可能となる。
【0021】
しかしながら、上記した装置は、スキャンラインごとに順次描画処理を行っているため、フレームメモリとは別にカラーラインメモリを必要とする。このため、メモリの個数が多くなり、装置が大型化し、コストが高くなるという問題があった。
【0022】
この発明は、上述した従来の問題点を解消するためになされたものにして、フレームメモリを有効に利用し、高速にマッピング処理が可能な立体画像描画処理装置を提供することを目的とする。
【0023】
【課題を解決するための手段】
この発明の立体画像描画処理装置は、ポリゴンを構成するX,Yの端点情報及びポリゴン面に付与する模様を示すマッピングパターン端点情報とポリゴンのZ値を格納する記憶手段と、上記記憶手段からの各端点情報を幾何変換する幾何変換手段と、上記幾何変換手段からの各端点情報に基づいて、ポリゴンのX,Yアドレス情報、マッピングパターンアドレス情報及びポリゴンのZ値を算出する描画処理手段と、算出されたZ値に基づき隠面処理を行う手段と、を備え、全てのポリゴンに対して描画処理及び隠面処理を行って描画するドットのマッピングパターンアドレスのみをフレームメモリに書き込み、このフレームメモリに書き込まれたマッピングパターンアドレスによりマッピングパターン領域をアクセスし、画像データを読み出し上記マッピングパターンアドレスが書き込まれていた同じフレームメモリの領域に画像データを書き込むことを特徴とする。
【0024】
この発明は、上記したフレームメモリのアドレスとして、ポリゴンのX,Yアドレス、画像データ読み出し用アドレス及びマッピングパターンアドレスの内から1つ選択して与えられ、フレームメモリのデータとして少なくともマッピングパターンアドレス及び画像データの内1つが選択して与えられる。
【0025】
また、この発明のフレームメモリは、Z値が格納されるZバッファ領域、マッピングパターンアドレスまたは画像データが格納されるスクリーン領域及びマッピングパターンが格納されるマッピングパターン領域に領域を区分すればよい。
【0026】
上記したように、この発明によれば、フレームメモリにスはクリーンに表示される領域のみマッピングパターン領域の読み出しとその画像データの書き込みが行われ、無駄なマッピングパターンメモリ領域へのアクセスが無くなり、高速化が図れると共に、フレームメモリを有効に利用することができる。
【0027】
【発明の実施の形態】
以下、この発明の実施の形態につき図面を参照して説明する。
【0028】
図1はこの発明を用いた立体画像描画処理装置の全体構成を示すブロック図であり、この装置は例えば、レーシングゲームや飛行機の操縦シュミレーション等のゲーム用機器に用いて好適な一例が示されている。図1に従いこの発明の全体構成につき説明する。
【0029】
この装置は、メインメモリ1、CPU2、幾何変換処理装置3、描画処理装置4、フレームメモリ5及び表示装置としてのCRT6を備える。メインメモリ1にはあらゆる物体が複数の三角ポリゴンの集合体として表現され、ポリゴンの端点をワールド座標上のX,Y,Z座標として格納している。更に、このメインメモリ1には、オブジェクトのオブジェクト座標上のポリゴン端点のX,Y,Z座標、及びポリゴンに対応して、夫々テクスチャ画像を格納するマッピングパターンメモリ領域の端点情報データ(U,V)が格納されている。CPU2は図示しないハンドル、アクセル、ブレーキ等で構成された操作部からの操作内容が電気信号に変換されて与えられる。
【0030】
CPU2は、ハンドル、アクセル等の操作内容に基づいて変換された電気信号に従いこの状況に応じた状況データを演算し、幾何変換処理装置3へデータを与える。
【0031】
幾何変換処理装置3は、CPU2からの命令に従いメインメモリ1から各ポリゴンの端点情報をデータを読み出し、オブジェクトの運動や視野の回転等に必要な行列演算を実行し、ワールド座標の端点をスクリーン座標へ視野変換、シェーディング、投影処理等の幾何変換を行い、X,Yの2次元のスクリーンデータ、マッピングパターンアドレス値(U,V値)を描画処理装置4に与える。また、ポリゴンの視野変換された代表値、すなわち、そのポリゴンの視点からの距離の代表値であるZ値を決定し、そのデータを描画処理装置4に与える。この幾何変換処理3は、パーソナルコンピュータなどではCPU2の動作により行うこともある。
【0032】
描画処理装置4は幾何変換処理装置3からの各端点情報に基づいて、ポリゴンの画素ごとにマッピングパターンアドレス(U,V)及びZ値を補間して算出するとともに、Zバッファ法による隠面処理により一番手前に存在する画素ドットのマッピングパターンアドレス(U,V)をフレームメモリ5のスクリーン領域に書き込む。そして、全てのポリゴンの描画処理が行われ、隠面処理により一番手前に存在するポリゴンのマッピングパターンアドレス(U,V)のスクリーン領域への書き込み処理が終了後、スクリーンアドレスに従いフレームメモリ5のスクリーン領域をアクセスし、マッピングパターンアドレスを読み出す。そして、このアドレスによりマッピングパターン領域をアクセスし、ビットマップのR,G,B値に変換し、その変換した値をフレームメモリ5の同じスクリーン領域に書き込む。このようにして、フレームメモリ5のには、スクリーンに表示される領域のみマッピングパターン領域の読み出しとそのR,G,B値の書き込みとなり、R,G,B化するときに必要最小限のマッピングパターン領域のアクセスとなり、無駄なマッピングパターンメモリ領域へのアクセスが無くなり、高速化が図れる。しかも、フレームメモリ5の同じスクリーン領域にマッピングパターンアドレスとR,G,B値を格納するので、フレームメモリ5を有効に利用でき、メモリ量を少なくすることができる。
【0033】
フレーメモリ5は、この実施の形態では、図3に示すように、Zバッファ領域、スクリーン領域並びにマッピングパターン領域にメモリ領域が分けられている。Zバッファ領域には、スクリーン領域の各画素に対応するその画素の中で一番手前に存在するZ値が書き込まれる。このZ値は、描画処理装置4にて、算出したポリゴンの画素と書き込まれているZ値を比較し、比較する対象のZ値が常に一番手前に存在するポリゴンのZ値に更新される。
【0034】
また、マッピングパターン領域は、図8(b)に示すように、マッピングパターンアドレス(U,V)に対応して、ビットマップのR,G,B値が格納されている。
【0035】
スクリーン領域は、XYのスクリーンアドレスに従った画素ドット領域に分けられている。まず、各スクリーンアドレス(X,Y)に従ってマッピングパターンアドレス(U,V)が書き込まれ、全てのポリゴンに対してスクリーン全体の書き込みが終わると、スクリーン領域の各アドレスに書き込まれたマッピングパターンアドレス(U,V)に従いマッピングパターン領域から読み出したビットマップのR,G,B値が書き込まれる。
【0036】
上記したように、この発明によれば、1フレームの処理の割り振りは図9に示すようになる。
【0037】
次に、この発明の描画処理装置の具体的構成につき図2に従い説明する。
【0038】
幾何変換処理装置3にて幾何変換された各ポリゴンのX,Yの2次元のスクリーンデータ(X,Y)、マッピングパターンアドレス値(U,V)及びZ値が幾何変換処理装置インターフェース(I/F)41に与えられる。この幾何変換処理装置I/F41からスクリーンデータ(X,Y)、マッピングパターンアドレス値(U,V)及びZ値が三角形セットアップ処理装置42に与えられる。
【0039】
この実施の形態においては、ポリゴンは図4に示すように全て三角形のポリゴンで構成されており、平面方程式により、各ポリゴン端点からポリゴン面のX,Yの傾斜を求め、ディジタル微分解析(DDA)により補間して行く。
【0040】
このため、三角形セットアップ処理装置42は、平面方程式に基づき各種のDDA処理装置に用いるDDAパラメータを下記数式1に従い算出する。
【0041】
【数1】
【0042】
三角形セットアップ処理装置42にて算出された各パラメータは各DDA処理装置に送られる。
【0043】
X−YDDA処理装置43は、スクリーン上の2次元のポリゴンのXYアドレスと辺と辺の水平ラインのアドレスを下記の数式に基づきDDAにより算出する。
【0044】
【数2】
X=X+dX/dY
Y=Y+1
【0045】
X−YDDA処理装置43にて算出したXYアドレスと水平ラインのアドレスはフレームメモリアドレスマルチプレクサ(MUX)46、ZDDA処理装置44及びUVDDA処理装置45に与えられる。
【0046】
ZDDA処理装置44は、X−YDDA処理装置43で示される2次元ポリゴンのXYアドレス値に対応するZ値を下記数式に従いDDAにより算出する。
【0047】
Z=Z+DDZ
ここで、DDZは、対応するドットがX方向のドット(dZX)であるときには、上記のdZ/dXが与えられ、対応するドットがY方向のドット(dZY)であるときには、上記のdZ/dYが与えられる。
【0048】
ZDDA処理装置44で算出されたZ値は陰面処置装置47及びフレームメモリデータマルチプレクサ48に与えられる。隠面処理装置47はZバッファ法を使用した隠面処理を行うもので、X−YDDA処理装置43で算出したXYアドレスに対応してZDDA処理装置44で算出したZ値をフレームメモリ5の対応する領域のZバッファ領域に格納されたZ値と比較する。このZ値を比較し描画すべきドットか否かを判定し、判定結果に応じてZバッファ領域に格納されたZ値を更新して行く。即ち、描画されるドットであればZバッファ領域のZ値を書き換え、後述するUVDDA処理装置45で算出したU,V値をフレームメモリ5のスクリーン領域に書き込むようにコントローラ54がフレームメモリデータマルチプレクサ(MUX)48及びR/Wコントロール信号をフレームメモリに与える。また、描画しないドットであれば、Zバッファ領域のZ値は書き換えず、UVDDA処理装置45で算出したU,V値もフレームメモリ5には与えられない。
【0049】
UVDDA処理装置45は、X−YDDA処理装置43で示される2次元ポリゴンのXYアドレス値に対応するマッピングパターンアドレス値(U,V)を下記数式に従いDDAにより算出する。
【0050】
U=U+DDU
ここで、DDUは、対応するドットがX方向のドット(dUX)であるときには、上記のdU/dXが与えられ、対応するドットがY方向のドット(dUY)であるときには、上記のdU/dYが与えられる。
V=U+DDV
ここで、DDVは、対応するドットがX方向のドット(dVX)であるときには、上記のdV/dXが与えられ、対応するドットがY方向のドット(dVY)であるときには、上記のdV/dYが与えられる。
【0051】
UVDDA処理装置47で算出されたU,V値はフレームメモリデータMUX48に与えられる。隠面処理装置47において、一番手前にあるドットと判断されると、フレームメモリデータMUX48からフレームメモリインターフェース49を介してフレームメモリ5のスクリーン領域にそのマッピングパターンアドレスを書き込む。
【0052】
フレームメモリアドレスマルチプレクサ(MUX)46には、RGB化用アドレス生成装置51とX−YDDA処理装置43とマッピングパターンアドレスラッチ回路52からのアドレスデータが与えられ、コントローラ54の制御に基づきフレームメモリ5のアドレスを選択し、フレームメモリインタフェース(I/F)50に送る。
【0053】
フレームメモリデータMUX48には、ZDDA処理装置44、UVDDA処理装置44およびRGBデータラッチ回路53からのフレームデータが与えられ、コントローラ54の制御に基づきこれらデータのうち1つを選択してフレームメモリデータとしてフレームメモリインターフェース50に送る。
【0054】
フレームメモリI/F50は、フレーメモリ5のタイミングに合わせて、アドレス、データを出力し、また、フレームメモリ5からデータを受け取る。
【0055】
RGB化用アドレス生成処理装置51は、フレームメモリ5のスクリーン領域に書き込まれたマッピングパターンアドレスに従いRGB化するときにスクリーンアドレスを順次生成する。
【0056】
マッピングパターンアドレスラッチ回路52は、RGB化するときにスクリーン上のマッピングパターン領域に格納されたU,Vアドレスを読み出し、その値をフレームメモリ5のアドレスとするためのアドレスラッチとして働く。
【0057】
RGBデータラッチ回路53は、マッピングパターン領域から読み出したRGBちをフレームメモリ5にデータとして与えるためのデータラッチとして働く。
【0058】
次に、この発明の動作を図6、図7のタイミングチャート及び図8の模式図に従い更に説明する。
【0059】
幾何変換処理装置3から幾何変換処理装置I/F41を介して与えられるポリゴンの各端点情報に基づいて、まず三角形セットアップ処理装置42にてDDA処理に必要なパラメータが算出される。そして、X−YDDA処理装置43、ZDDA処理装置44及びUVDDA処理装置45により、ポリゴンのXYアドレス(画素)ごとにマッピングパターンアドレス及びZ値を補間して算出する。算出されたZ値とフレームメモリI/F50を介して与えられるフレームメモリ5のZバッファ領域に格納された対応する画素のZ値とが隠面処理装置47に与えられ、隠面処理装置47にてZバッファ法による隠面処理が行われ、比較したポリゴンの画素が一番手前に存在する画素ドット判断されると、その画素ドットのマッピングパターンアドレスをフレームメモリI/F50を介してフレームメモリ5の対応するスクリーン領域に書き込む。また、Zバッファ領域のZ値も更新される。
【0060】
このようにして、図8(a)に示すように、スクリーン領域にの各アドレスに隠面処理にて描画するポリゴンのマッピングパターンアドレスのみ更新して書き込んで行き、スクリーン全体の書き込み処理が終了すると、スクリーン領域にはマッピングパターン領域のアドレスが書き込まれる。即ち、図6のタイミングチャートに示すように、フレームメモリアドレスとして、X−YDDA処理装置43により算出したXYアドレスが与えられるとともに、フレームメモリデータとしては、フレームメモリ5に書き込むマッピングパターンアドレスが与えられ、このデータがフレームメモリ5のスクリーン領域に書き込まれていく。
【0061】
全てのポリゴンの処理が終わると、図7のタイミングチャートに示すように、RGB化用アドレス生成処理装置51にてスクリーンアドレスを生成し、フレームメモリI/F50を介してフレームメモリ5に与える。フレームメモリ5からはスクリーンメモリ領域に格納されているマッピングパターンアドレスが読み出され、このマッピングパターンアドレスがフレームメモリI/F50を介してマッピングパターンアドレスラッチ回路52に格納される。
【0062】
続いて、マッピングパターンアドレスラッチ回路52に格納されたマッピングパターンアドレスがフレームメモリI/F50を介してフレームメモリ5に与えられる。フレームメモリ5からは、マッピングパターン領域に格納されているRGB値が読み出され、このRGB値がフレームメモリI/F50を介してRGBデータラッチ回路53に格納される。そして、RGB化用アドレス生成処理装置51にて生成されたスクリーンアドレスが再びフレームメモリI/F50を介してフレームメモリ5に与えられ、このアドレスに従いフレームメモリ5のスクリーン領域にはRGBデータラッチ回路53にラッチされたビットマップのRGBが書き込まれる。このようにして、図8(b)に示すマッピングパターン領域をアクセスし、図8(c)に示すように、スクリーン領域にマッピングされ、図5に示すように、CRT6のスクリーン上に表示される。
【0063】
上記したように、この発明は、CRT6のスクリーンに表示される領域のみ、マッピングパターン領域の読み出しとそのR,G,B値の書き込みとなり、無駄なマッピングパターン領域のアクセスが無くなり、高速化が図れる。
【0064】
上記した実施の形態においては、Zバッファ領域、スクリーン領域及びマッピングパターン領域をフレームメモリに構成しているが、それぞれ別のメモリを用いて構成してもよい。
【0065】
また、マッピングパターンメモリをマッピングパターンメモリとマッピングパターンキャッシュメモリに構成してもよい。
【0066】
更に、上記した実施の形態においては、マッピングパターンメモリからビットマップのRGB値を読み出すようにしているが、ルックアップテーブル(LUT)を更に用意し、ルックアップテーブルのテーブル値を読み出すように構成してもよい。この場合には、ルックアップテーブルバッファを用意し、CRTに表示するようにすればよい。
【0067】
【発明の効果】
以上説明したように、この発明によれば、フレームメモリには、スクリーンに表示される領域のみ、マッピングパターン領域の読み出しとその画像データの書き込みとなり、無駄なマッピングパターンメモリ領域へのアクセスが無くなり、高速化が図れると共にフレームメモリを有効に利用することができ、メモリの量を少なくできる。
【図面の簡単な説明】
【図1】この発明を用いた立体画像描画処理装置の全体構成を示すブロック図である。
【図2】この発明の描画処理装置の具体的構成を示すブロック図である。
【図3】この発明のフレームメモリの構成を示す模式図である。
【図4】この発明に適用されるポリゴンを示す模式図である。
【図5】描画処理の状態を示す模式図である。
【図6】この発明のポリゴンの描画タイミングを示すタイミングチャートである。
【図7】この発明のRGB化のタイミングを示すタイミングチャートである。
【図8】この発明の描画処理を示す説明図であり、(a)はスクリーン領域にマッピングパターンアドレスを書き込んだ状態、(b)はマッピングパターン領域の状態、(c)はマッピングを行った状態をそれぞれ示す。
【図9】この発明の1フレームの処理の割り振りを示す説明図である。
【図10】従来の立体画像描画処理装置の全体構成を示すブロック図である。
【符号の説明】
1 メインメモリ
2 CPU
3 幾何変換装置
4 描画処理装置
5 フレームメモリ
6 CRT[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a stereoscopic image drawing processing apparatus that projects and displays a three-dimensional polyhedral object on a two-dimensional screen.
[0002]
[Prior art]
When a 3D figure is synthesized and displayed on a 2D (planar) screen such as a CRT display by perspective transformation processing, perspective processing, etc., part or all of the object in the foreground is present It is necessary to perform a process of hiding, that is, a hidden surface erasing process. The hidden surface removal method includes a Z sort method (coating method), a Z buffer method, a scan line method, and the like.
[0003]
In a stereoscopic image drawing processing apparatus capable of mapping processing, an apparatus using a Z buffer method as a polygon hidden surface removal method is disclosed in Japanese Patent Laid-Open No. 9-16806. This stereoscopic image drawing processing device will be described with reference to FIG. FIG. 10 is a block diagram showing the overall configuration of the above-described stereoscopic image drawing processing apparatus, and an example suitable for use in a gaming device such as a racing game or airplane flight simulation is shown.
[0004]
The configuration of the image information supply device 100 will be described. This device includes a
[0005]
The
[0006]
The
[0007]
The polygon outline processing apparatus 120 includes a
[0008]
The
[0009]
In the
[0010]
Further, the number of polygons (CNT) stored in one Y address is written in the
[0011]
Each data stored in the
[0012]
In the
[0013]
The hidden
[0014]
The Z
[0015]
The
[0016]
The
[0017]
Further, there are two
[0018]
The horizontal
[0019]
The R, G, B values of the dots given from the polygon internal processing unit 130 to the
[0020]
[Problems to be solved by the invention]
According to the above-described apparatus, each polygon end point is provided with a mapping pattern memory address (U, V) for the pattern and a Z value of the polygon, and the mapping pattern memory address (U, V) and the Z value are added to the polygon outline. Interpolate by changing correspondingly, calculate the Z value of multiple dots by calculation, perform hidden surface processing for multiple dots in parallel, sequentially for each scan line by hidden surface processing using Z buffer method, mapping pattern memory When the address is written in the
[0021]
However, since the above-described apparatus sequentially performs drawing processing for each scan line, a color line memory is required in addition to the frame memory. For this reason, there is a problem that the number of memories increases, the size of the apparatus increases, and the cost increases.
[0022]
The present invention has been made to solve the above-described conventional problems, and an object of the present invention is to provide a stereoscopic image drawing processing device that can effectively use a frame memory and perform high-speed mapping processing.
[0023]
[Means for Solving the Problems]
The stereoscopic image drawing processing apparatus according to the present invention has storage means for storing X and Y end point information constituting a polygon, mapping pattern end point information indicating a pattern to be applied to a polygon surface, and a Z value of the polygon; A geometric transformation means for geometrically transforming each end point information; a drawing processing means for calculating X and Y address information of the polygon, mapping pattern address information and a Z value of the polygon based on each end point information from the geometric transformation means; Means for performing hidden surface processing based on the calculated Z value, and writing only the mapping pattern address of the dot to be drawn by performing drawing processing and hidden surface processing on all polygons, and this frame memory Access the mapping pattern area with the mapping pattern address written in And writes the image data in the area of the same frame memory in which the mapping pattern address is written.
[0024]
In the present invention, one of the polygon X and Y addresses, the image data reading address, and the mapping pattern address is selected and given as the frame memory address, and at least the mapping pattern address and the image are used as the frame memory data. One of the data is selected and given.
[0025]
The frame memory of the present invention may be divided into a Z buffer area for storing Z values, a screen area for storing mapping pattern addresses or image data, and a mapping pattern area for storing mapping patterns.
[0026]
As described above, according to the present invention, the mapping pattern area is read out and the image data is written only in the area that is displayed cleanly in the frame memory, and access to the useless mapping pattern memory area is eliminated. The speed can be increased and the frame memory can be used effectively.
[0027]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0028]
FIG. 1 is a block diagram showing the overall configuration of a stereoscopic image rendering processing apparatus using the present invention. This apparatus is shown as an example suitable for use in gaming equipment such as racing games and airplane flight simulations. Yes. The overall configuration of the present invention will be described with reference to FIG.
[0029]
This apparatus includes a
[0030]
The
[0031]
The geometric
[0032]
The
[0033]
In this embodiment, the
[0034]
In the mapping pattern area, as shown in FIG. 8B, R, G, and B values of the bitmap are stored corresponding to the mapping pattern address (U, V).
[0035]
The screen area is divided into pixel dot areas according to XY screen addresses. First, the mapping pattern address (U, V) is written according to each screen address (X, Y). When writing of the entire screen is completed for all polygons, the mapping pattern address written to each address in the screen area ( The R, G, B values of the bitmap read from the mapping pattern area are written according to (U, V).
[0036]
As described above, according to the present invention, the allocation of processing for one frame is as shown in FIG.
[0037]
Next, a specific configuration of the drawing processing apparatus of the present invention will be described with reference to FIG.
[0038]
The X, Y two-dimensional screen data (X, Y), mapping pattern address value (U, V), and Z value of each polygon geometrically transformed by the geometric
[0039]
In this embodiment, the polygons are all composed of triangular polygons as shown in FIG. 4, and the X and Y slopes of the polygon surface are obtained from the end points of each polygon by a plane equation, and digital differential analysis (DDA) is performed. Interpolate by.
[0040]
Therefore, the triangle
[0041]
[Expression 1]
[0042]
Each parameter calculated by the
[0043]
The
[0044]
[Expression 2]
X = X + dX / dY
Y = Y + 1
[0045]
The XY address and horizontal line address calculated by the
[0046]
The
[0047]
Z = Z + DDZ
Here, DDZ is given the above dZ / dX when the corresponding dot is a dot in the X direction (dZX), and the above dZ / dY when the corresponding dot is a dot in the Y direction (dZY). Is given.
[0048]
The Z value calculated by the
[0049]
The
[0050]
U = U + DDU
Here, the DDU is given the above dU / dX when the corresponding dot is a dot in the X direction (dUX), and the dU / dY when the corresponding dot is a dot in the Y direction (dUY). Is given.
V = U + DDV
Here, DDV is given the above dV / dX when the corresponding dot is a dot in the X direction (dVX), and when the corresponding dot is a dot in the Y direction (dVY), the above dV / dY. Is given.
[0051]
The U and V values calculated by the
[0052]
The frame memory address multiplexer (MUX) 46 is provided with address data from the RGB
[0053]
Frame data from the
[0054]
The frame memory I /
[0055]
The RGB address
[0056]
The mapping pattern
[0057]
The RGB
[0058]
Next, the operation of the present invention will be further described with reference to the timing charts of FIGS. 6 and 7 and the schematic diagram of FIG.
[0059]
Based on the polygon end point information given from the geometric
[0060]
In this way, as shown in FIG. 8A, only the mapping pattern address of the polygon to be drawn by the hidden surface process is updated and written to each address in the screen area, and the writing process for the entire screen is completed. The address of the mapping pattern area is written in the screen area. That is, as shown in the timing chart of FIG. 6, the XY address calculated by the
[0061]
When all the polygons have been processed, as shown in the timing chart of FIG. 7, a screen address is generated by the RGB address
[0062]
Subsequently, the mapping pattern address stored in the mapping pattern
[0063]
As described above, according to the present invention, only the area displayed on the screen of the
[0064]
In the above-described embodiment, the Z buffer area, the screen area, and the mapping pattern area are configured in the frame memory, but may be configured using different memories.
[0065]
Further, the mapping pattern memory may be configured as a mapping pattern memory and a mapping pattern cache memory.
[0066]
Further, in the above-described embodiment, the RGB value of the bitmap is read from the mapping pattern memory. However, a lookup table (LUT) is further prepared and the table value of the lookup table is read. May be. In this case, a lookup table buffer may be prepared and displayed on the CRT.
[0067]
【The invention's effect】
As described above, according to the present invention, only the area displayed on the screen, the mapping pattern area is read and the image data is written in the frame memory, and access to the useless mapping pattern memory area is eliminated. The speed can be increased and the frame memory can be used effectively, and the amount of memory can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an overall configuration of a stereoscopic image drawing processing apparatus using the present invention.
FIG. 2 is a block diagram showing a specific configuration of the drawing processing apparatus of the present invention.
FIG. 3 is a schematic diagram showing a configuration of a frame memory according to the present invention.
FIG. 4 is a schematic diagram showing a polygon applied to the present invention.
FIG. 5 is a schematic diagram illustrating a state of a drawing process.
FIG. 6 is a timing chart showing polygon drawing timing according to the present invention.
FIG. 7 is a timing chart showing the timing of RGB conversion according to the present invention.
FIGS. 8A and 8B are explanatory diagrams showing drawing processing according to the present invention, in which FIG. 8A shows a state where a mapping pattern address is written in a screen area, FIG. 8B shows a state of the mapping pattern area, and FIG. 8C shows a state where mapping is performed; Respectively.
FIG. 9 is an explanatory diagram showing allocation of processing of one frame according to the present invention.
FIG. 10 is a block diagram illustrating an overall configuration of a conventional stereoscopic image drawing processing apparatus.
[Explanation of symbols]
1 Main memory
2 CPU
3 Geometric transformation device
4 Drawing processing device
5 frame memory
6 CRT
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP16998997A JP3722593B2 (en) | 1997-06-26 | 1997-06-26 | Stereoscopic image rendering processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP16998997A JP3722593B2 (en) | 1997-06-26 | 1997-06-26 | Stereoscopic image rendering processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH1115997A JPH1115997A (en) | 1999-01-22 |
JP3722593B2 true JP3722593B2 (en) | 2005-11-30 |
Family
ID=15896541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP16998997A Expired - Fee Related JP3722593B2 (en) | 1997-06-26 | 1997-06-26 | Stereoscopic image rendering processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3722593B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3721951B2 (en) * | 2000-06-08 | 2005-11-30 | 日本ビクター株式会社 | Image generation method and apparatus |
JP4133369B2 (en) | 2003-01-27 | 2008-08-13 | 株式会社リコー | Image processing apparatus, method, and program |
-
1997
- 1997-06-26 JP JP16998997A patent/JP3722593B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH1115997A (en) | 1999-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3635051B2 (en) | Image generation method and apparatus, recording medium storing image processing program, and image processing program | |
EP0950988B1 (en) | Three-Dimensional image generating apparatus | |
US6172678B1 (en) | Image processing method and apparatus including hidden surface removal | |
US5877769A (en) | Image processing apparatus and method | |
Roettger et al. | A two-step approach for interactive pre-integrated volume rendering of unstructured grids | |
JP3514947B2 (en) | Three-dimensional image processing apparatus and three-dimensional image processing method | |
JP3527489B2 (en) | Drawing processing method and apparatus, recording medium storing drawing processing program, drawing processing program | |
JP3352982B2 (en) | Rendering method and device, game device, and computer-readable recording medium for storing program for rendering three-dimensional model | |
JPH0927045A (en) | Image processor | |
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 | |
JP3722593B2 (en) | Stereoscopic image rendering processing device | |
JP2003504697A (en) | Anti-aliasing of subsampled texture edges | |
JP2005332195A (en) | Texture unit, image drawing apparatus, and texel transfer method | |
US7372461B2 (en) | Image processing apparatus and method of same | |
EP0642102A1 (en) | Apparatus and method for image processing | |
US6518969B2 (en) | Three dimensional graphics drawing apparatus for drawing polygons by adding an offset value to vertex data and method thereof | |
JP3112790B2 (en) | Virtual reality device | |
US6545675B1 (en) | Three-dimensional graphics system, processor and recording medium | |
JP4069486B2 (en) | Memory circuit control device and graphic operation device | |
JP4754385B2 (en) | Program, information recording medium, and image generation system | |
JPH07105404A (en) | Stereoscopic image processor and its processing method | |
JPH11296696A (en) | Three-dimensional image processor | |
JP3344675B2 (en) | Stereoscopic image processing device | |
JP4408152B2 (en) | Texture mapping method and texture mapping apparatus | |
JP3688765B2 (en) | Drawing method and graphics apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050831 |
|
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: 20050913 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050913 |
|
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: 20080922 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090922 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090922 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100922 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110922 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120922 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130922 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |