JP3553249B2 - Image generating apparatus and image generating method - Google Patents
Image generating apparatus and image generating method Download PDFInfo
- Publication number
- JP3553249B2 JP3553249B2 JP34809895A JP34809895A JP3553249B2 JP 3553249 B2 JP3553249 B2 JP 3553249B2 JP 34809895 A JP34809895 A JP 34809895A JP 34809895 A JP34809895 A JP 34809895A JP 3553249 B2 JP3553249 B2 JP 3553249B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- data
- texture
- pixel
- output
- 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
- 238000000034 method Methods 0.000 title claims description 34
- 238000013507 mapping Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 11
- 230000010354 integration Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
- Image Generation (AREA)
Description
【0001】
【目次】
以下の順序で本発明を説明する。
発明の属する技術分野
従来の技術(図9〜図12)
発明が解決しようとする課題(図13)
課題を解決するための手段
発明の実施の形態
(1)画像生成装置の構成(図1〜図5)
(2─1)3次元のポリゴンにテクスチヤマツピングをする場合(図6)
(2─2)3次元のポリゴンにフオンシエーデイングをする場合(図7)
(2─3)3次元ポリゴンにテクスチヤマツピングを行ないさらにフオンシエーデイングをする場合(図8)
発明の効果
【0002】
【発明の属する技術分野】
本発明は画像生成装置及び画像生成方法に関し、特にゲーム機、コンピユータなど、画像メモリを有し、計算によつて生成した画像や、記憶装置から読み出した画像を画像メモリ上に描画し、デイスプレイ上に出力するものに適用して好適である。
【0003】
【従来の技術】
従来、画像メモリ上に画像データを描画し、これらをテレビの同期信号に従つて読み出し表示する画像生成装置では、画像メモリ上に表示すべき画素値そのものをならべて置き、読み出し装置は単にそれらをビデオ同期信号に従つて読み出し、D/A(デイジタル/アナログ)変換してデイスプレイ上に表示するものが主であつた。
【0004】
ここで、従来の画像生成装置の構成例を図9に示す。画像生成装置1は、CPU2、メインメモリ3、画像生成プロセツサ4、画像メモリ5、画像出力プロセツサ6でなつており、CPU2、メインメモリ3及び画像生成プロセツサ4は、それぞれメインバス7に接続されておりデータを授受できるようになつている。また、画像生成プロセツサ4と画像メモリ5がデータ授受し得るように接続されている。画像メモリ5からの出力信号は画像出力プロセツサ6を介してモニタ等に送出されるように接続されている。ここでのメインメモリ3は、画像を生成するためのプログラムが格納されている。
【0005】
まず、従来の画像生成装置1における3次元のポリゴンにテクスチヤマツピングをする場合について説明する。ポリゴンとは描画装置が扱う図形の最小単位(三角形や四角形)をいう。
CPU2は、メインメモリ3に格納されているプログラムに従つて描画命令を画像生成プロセツサ4に出力し、画像生成プロセツサ4は描画命令に従つて画像メモリ5からテクスチヤ画像を読み出す。この画像メモリ5から読み出されたテクスチヤ画像に変形を加えた後、再び画像メモリ5内のデイスプレイ領域に書き込む。画像出力プロセツサ6はビデオ同期信号に従つて画像メモリ5内のデイスプレイ領域を読み出し、出力する。
【0006】
図10は上述した3次元のポリゴンにテクスチヤマツピングが行なわれているときの画像メモリ5内のメモリ領域10の内容を示す。メモリ領域10は、表示すべき画像が生成されるデイスプレイ領域11と、テクスチヤ画像の蓄えられているテクスチヤ領域12とで形成されている。デイスプレイ領域11には複数のポリゴンの領域が計算され、対応するテクスチヤ画素が読み出されて変形され書き込まれる。
【0007】
例えば、三角形ABCにテクスチヤ12aの三角形PQRをテクスチヤマツピングするためは、三角形ABC内に含まれる各点Eに対応する三角形PQR内の点Sの画素値をコピーする。これらの処理はすべて画像生成プロセツサ4によつて行なわれ、終了した後に画像メモリ5のデイスプレイ領域11に書き込まれる。
【0008】
次に、従来の画像生成装置1における3次元ポリゴンにフオンシエーデイングをする場合について説明する。
CPU2はプログラムに従つて描画命令を画像生成プロセツサ4に出力し、画像生成プロセツサ4はこの命令に従つてポリゴンの頂点座標とそれに含まれる画素の値を計算し、画像メモリ5内のデイスプレイ領域11に書き込む。画像出力プロセツサ6はビデオ同期信号に従つて画像メモリ5内のデイスプレイ領域11を読み出し出力する。
【0009】
図11(A)及び(B)は、上述した3次元ポリゴンにフオンシエーデイングが行なわれているときの画像メモリ5におけるメモリ領域10の内容を示している。
以下に述べる処理は全て画像生成プロセツサ4によつて行われるものである。メモリ領域10内のデイスプレイ領域11には複数のポリゴンの領域が計算されそれに含まれる画素の値が計算され書き込まれる。例えば、三角形ABCをフオンシエーデイングするためには三頂点A、B、C上の法線から三角形内の点E上の法線を求め、当該法線と光源ベクトルの内積をとつたものをその点の画素値とする。この処理の後、画像メモリ5のデイスプレイ領域11に書き込まれる。
【0010】
さらに、従来の画像生成装置1における3次元のポリゴンにテクスチヤマツピングを行い、さらにフオンシエーデイングをする場合について説明する。
CPU2はプログラムに従つて描画命令を画像生成プロセツサ4に出力し、画像生成プロセツサ4はこの命令に従つて画像メモリ5からテクスチヤ画像を読み出し変形を加えたあとシエーデイングを行ない再び画像メモリ5内のデイスプレイ領域11に書き込む。画像出力プロセツサ6はビデオ同期信号に従つて画像メモリ5内のデイスプレイ領域11を読み出して出力する。
【0011】
図12(A)及び(B)は上述した3次元のポリゴンにテクスチヤマツピングが行われ、この後フオンシエーデイングが行なわれているときの画像メモリ5内のメモリ領域10の内容を示している。以下の処理は全て画像生成プロセツサ4によつて行われるものである。
メモリ領域10内のデイスプレイ領域11には複数のポリゴンの領域が計算され、対応するテクスチヤ画像が読み出されて変形されシエーデイングが行われ書き込まれる。
【0012】
例えば、三角形ABCにテクスチヤ12aの三角形PQRをテクスチヤマツピングするためには三角形ABCに含まれる各点Eに対応する三角形PQR内の点Sの画素値をコピーする。さらに、三頂点A、B、C上の法線から三角形内の点E上の法線を求め、当該法線と光源ベクトルの内積をとり、当該点のテクスチヤ値とかけあわせて画素値とする。この後、画像メモリ5のデイスプレイ領域11に書き込まれる。
【0013】
【発明が解決しようとする課題】
ところが、上述の構成においては、画像データを記憶してある画像メモリ5のメモリ領域10(テクスチヤ領域12)から画素データを画像生成プロセツサ4が一旦読み出し、処理を加えた後、画像メモリ5に書き込む必要がある。つまり、ひとつの画素を処理するためには、画像メモリ5からの読み出しと画像メモリ5への書き込みを最低各1回ずつ必要とする欠点がある。
【0014】
また、画像生成では3次元の物体をリアルに表現するため「隠面消去」という技術が使われる。例えば、図13に示すような上書きによつて隠面消去が行なわれた画像では、実際には画面上に表示されているポリゴンより多くのポリゴンがメモリ内に書き込まれている。この隠面消去により、一旦、画像メモリ5のメモリ領域10上に描かれた画像データでも上書きされ消えることがあるが、この上書きによつて消される画像データの処理が無駄になる問題がある。
【0015】
本発明は以上の点を考慮してなされたもので、不必要なデータ処理を軽減し得る画像生成装置及び画像生成方法を実現しようとするものである。
【0016】
【課題を解決するための手段】
上記課題に対応した本発明の画像生成装置は、画像メモリと、前記画像メモリのディスプレイ領域に各画素に対応するデータおよびそのデータの意味を表す画素モードを書き込む画像生成プロセッサと、前記ディスプレイ領域に記憶された前記データおよび前記画素モードを読み込んで、読み込んだ前記データの画素モードを判定し、判定された画素モードに対応した所定の処理を行ない出力画像を作成する画像出力プロセッサとを備える画像生成装置であって、前記画素モードは、第1、第2、第3、第4画素モードを含み、前記第1画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域に RGB 値を書き込むとともに、前記画像出力プロセッサは前記 RGB 値に基づいて出力画像を作成し、前記第2画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にテクスチャアドレスを書き込むとともに、前記画像出力プロセッサは前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込んで出力画像を作成し、前記第3画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記画像出力プロセッサは前記法線ベクトルと光源ベクトルとの内積値に基づいて出力画像を作成し、前記第4画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にテクスチャアドレスおよびポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記画像出力プロセッサは、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込むとともに、前記法線ベクトルと光源ベクトルとの内積値を算出し、前記テクスチャデータと前記内積値との積算値に基づいて出力画像を作成する、ことを特徴とする。
【0017】
上記画像生成装置において、前記画像出力プロセッサが、前記画像メモリから読み込まれたデータのモードを判定するモード判定回路と、前記テクスチャアドレスを前記画像メモリに出力する回路と、前記法線ベクトルと前記光源ベクトルとの内積値を求めるインナープロダクト回路と、前記インナープロダクト回路の出力と前記RGB値とをかける積算回路と、前記RGB値と、前記テクスチャデータと、前記インナープロダクト回路の出力データと、前記積算回路の出力データとが入力され、前記モード判定回路により判定されたモードに対応するデータを選択的に出力するデータセレクタ回路と、を含むようにすることができる。
さらに、前記テクスチャアドレスを前記画像メモリに出力する回路は、リードアドレスジェネレータを含むようにしてもよい。
【0018】
上記課題に対応した本発明の画像生成方法は、画像メモリのディスプレイ領域に各画素に対応するデータおよびそのデータの意味を表す画素モードを書き込む処理と、前記ディスプレイ領域に記憶された画素モードから前記データの画素モードを判定し、前記判定された画素モードに対応した所定の処理を行ない出力画像を作成する処理とを実行する画像生成方法であって、前記画素モードは、第1乃至第4画素モードを含み、前記第1画素モードでは、前記ディスプレイ領域に RGB 値を書き込むとともに、前記 RGB 値に基づいて出力画像を作成し、前記第2画素モードでは、前記ディスプレイ領域にテクスチャアドレスを書き込むとともに、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込んで出力画像を作成し、前記第3画素モードでは、前記ディスプレイ領域にポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記法線ベクトルと光源ベクトルとの内積値に基づいて出力画像を作成し、前記第4画素モードでは、前記ディスプレイ領域にテクスチャアドレスおよびポリゴンの頂点の法線ベクトルのデータを書き込み、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込み、前記法線ベクトルと光源ベクトルとの内積値を算出し、前記テクスチャデータと前記内積値との積算値に基づいて出力画像を作成する、ことを特徴とする。
【0020】
【発明の実施の形態】
以下図面について、本発明の一実施例を詳述する。
【0021】
(1)画像生成装置の構成
図9との対応部分に同一符号を付した図1は、本発明の画像生成装置20の全体構成を示す。画像生成装置20は、CPU2、メインメモリ3、画像生成プロセツサ21、画像メモリ22、画像出力プロセツサ23でなつており、CPU2、メインメモリ3及び画像生成プロセツサ21は、それぞれメインバス7に接続されておりデータを授受できるようになつている。また、画像生成プロセツサ21はデータの出力先となる画像メモリ22と接続されており、画像メモリ22と画像出力プロセツサ23はデータを相互に授受できるように接続されており、画像出力プロセツサ23からの出力データはモニタ等に送出されるようになされている。ちなみにメインメモリ3には、画像を生成するためのプログラムが格納されている。
【0022】
次に、画像メモリ22内に蓄えられる情報例を図2に示す。画像メモリ22に蓄える情報としては4種類の画素モード(mode=0〜3)がある。これらの各画素モードは、デイスプレイ領域の各画素に格納されるデータの意味を表している。例えば、mode=0は「RGB」のデータを表し、mode=1は「テクスチヤアドレス」、mode=2は「法線ベクトル」、mode=3は「テクスチヤアドレスと法線ベクトル」のデータをそれぞれ表している。
【0023】
また、図3においてはデイスプレイ領域、テクスチヤ領域及び画素モードの対応について表している。画素モードは前述のようにmode=0〜3でなつている。mode=0はデイスプレイ領域内の座標値(R、G、B)を表し、mode=1はテクスチヤアドレスとしてテクスチヤ領域のページ数Tp及び当該テクスチヤ領域内の座標値(U、V)を表す。また、mode=2はデイスプレイ領域における法線ベクトル(Nx、Ny、Nz)を表し、mode=3はmode=1とmode=2の内容すなわちテクスチヤアドレスと法線ベクトルを表している。
【0024】
ここで、図4においては、画像出力プロセツサ23の構成例を示す。
画像出力プロセツサ23は、モード判定回路24、リードアドレスゲン25、インナープロダクト26、データセレクタ27及び積算器28で構成されている。このモード判定回路24は、画像メモリ22から送出されるデータを入力し、当該データのモード判定結果をデータセレクタ27へと出力するようになされている。
【0025】
画像メモリ22からのデータがmode=0の場合、データセレクタ27へと出力され、mode=1の場合、データセレクタ27へと出力されると共にテクスチヤ領域の座標値(U、V)のアドレスをリードアドレスゲン25を介して、当該アドレスを画像メモリ22に出力する。また、画像メモリ22からのデータがmode=2の場合、画像メモリ22からのデータである法線ベクトル(Nx、Ny、Nz)と光源ベクトルをインナープロダクト26で内積を求め、データセレクタ27へと出力される。さらにmode=3の場合、mode=2の場合と同様にして得られた法線ベクトルと光源ベクトルの内積と、mode=1のテクスチヤアドレスを用いて画像メモリ22から読みだしたmode=0のRGB値とを積算器28でかけたものをデータセレクタ27へと出力する。
このデータセレクタ27は、入力される各データのうちモード判定回路24から送出される判定結果で得られたモードに対応するデータを外部へと出力する。
【0026】
この画像出力プロセツサ23でのモード判定回路24によるモード判定の処理手順を表すフローチヤートを図5に示す。まず、ステツプSP1で処理を開始する。ステツプSP2において、モード判定を行い、当該判定結果がmode=0のとき、ステツプSP3へと移る。ステツプSP3では、画像メモリ22にRGB値を書き込み、ステツプSP4で画像メモリ22からRGB値を読みだし、ステツプSP5へと移る。
また、ステツプSP2のモード判定結果がmode=1のとき、ステツプSP6へと移り、画像メモリ22にテクスチヤアドレスを書き込む。この後ステツプSP7へ移り、画像メモリ22から読みだしたテクスチヤアドレスで再度画像メモリ22からRGB値を読みだし、ステツプSP5へと移る。
【0027】
さらに、前述のモード判定結果がmode=2のとき、ステツプSP8へと移り、画像メモリ22に法線ベクトルを書き込む。この後ステツプSP9へ移り、画像メモリ22から読みだした法線ベクトルと光源ベクトルの内積値をRGB値とし、ステツプSP5へ移る。
またさらにモード判定結果がmode=3のとき、ステツプSP10へと移り、画像メモリ22に法線ベクトルとテクスチヤアドレスを書き込む。この後ステツプSP11へ移り、画像メモリ22から読みだした法線ベクトルと光源ベクトルの内積を、画像メモリ22から読みだしたテクスチヤアドレスを用いて読みだしたRGB値にかけて、ステツプSP5へ移る。
ここでステツプSP5ではRGB値を出力し、ステツプSP12で処理終了となる。
【0028】
(2─1)3次元のポリゴンにテクスチヤマツピングをする場合
以上の構成において、まず3次元のポリゴンにテクスチヤマツピングをする場合について述べる。
CPU1はメインメモリ3内に格納されているプログラムに従つて描画命令を画像生成プロセツサ21に出力し、当該画像生成プロセツサ21はこの命令に従つて画像メモリ22のデイスプレイ領域31に表示すべき画素値の格納されているテクスチヤ領域32aのアドレスを書き込む。
画像出力プロセツサ23はビデオ同期信号に従つて画像メモリ22のデイスプレイ領域31を読み出し、読み出したテクスチヤアドレスに従つて画像メモリ22のテクスチヤ領域32aからテクスチヤ画素値を読みだし出力する。
【0029】
図6は画像生成プロセツサ21で行なわれる処理によるメモリ領域30を示す。ここでは、画像生成プロセツサ21が三角形の頂点アドレスとテクスチヤアドレスをうけとり画像メモリ22上に描画する場合を示す。画像生成プロセツサ21は三角形ABCの3頂点と内点Eの位置関係から描画すべき画素値の格納されている位置すなわちテクスチヤアドレスを計算し、三角形ABCの内点Eに当該テクスチヤアドレスを書き込む。
【0030】
(2─2)3次元のポリゴンにフオンシエーデイングをする場合
次に、3次元のポリゴンにフオンシエーデイングをする場合について述べる。メインメモリ3には画像を生成するためのプログラムが格納されている。CPU2はプログラムに従つて描画命令を画像生成プロセツサ21に出力し、画像生成プロセツサ21はそれに従つて画像メモリ22のデイスプレイ領域31にポリゴンのRGB値と各点の法線ベクトルを書き込む。
画像出力プロセツサ23はビデオ同期信号に従つて画像メモリ22のデイスプレイ領域31を読み出し、読み出した法線ベクトルと光源ベクトルの内積をポリゴンのRGB値にかけた画素値として出力する。
【0031】
図7は画像生成プロセツサ21で行なわれる処理によるメモリ領域30を示す。ここでは、画像生成プロセツサ21が三角形の頂点アドレスと法線ベクトルを受け取り画像メモリ22上に描画する場合を示す。画像生成プロセツサ21は三角形ABCの3頂点と内点Eの位置関係から描画すべき画素上の法線ベクトルを計算し、三角形ABCの内点EにポリゴンのRGB値と法線ベクトルを書き込む。
【0032】
(2─3)3次元ポリゴンにテクスチヤマツピングを行ないさらにフオンシエーデイングをする場合
次に、3次元ポリゴンにテクスチヤマツピングを行ないさらにフオンシエーデイングをする場合について述べる。メインメモリ3には画像を生成するためのプログラムが格納されている。CPU2はプログラムに従つて描画命令を画像生成プロセツサ21に出力し、画像生成プロセツサ21はそれに従つて画像メモリ22のデイスプレイ領域に表示すべき画素値の格納されているテクスチヤ領域のアドレスを書き込む。
また、各点の法線ベクトルを書き込む。画像出力プロセツサ23はビデオ同期信号に従つて画像メモリ22のデイスプレイ領域を読み出し、読み出したテクスチヤアドレスに従つて画像メモリ22のテクスチヤ領域からテクスチヤ画素値を読み出し読み出した法線ベクトルと光源ベクトルの内積を、テクスチヤ画素値にかけたものを画素値として出力する。
【0033】
図8は画像生成プロセツサ21で行なわれる処理によるメモリ領域30を示す。ここでは、画像生成プロセツサ21が三角形の頂点アドレス、テクスチヤアドレス、法線ベクトルをうけとり画像メモリ22上に描画する場合を示す。
画像生成プロセツサ21は三角形ABCの3頂点と内点Eの位置関係から描画すべき画素値の格納されている位置すなわちテクスチヤアドレスを計算し、三角形ABCの内点Eに当該テクスチヤアドレスを書き込む。
また、描画すべき画素上の法線ベクトルを計算し、三角形ABCの内点EにポリゴンのRGB値と法線ベクトルを書き込む。
【0034】
以上の構成によれば、従来画面メモリに書き込む前に画像生成プロセツサで行なつていた処理の一部を画像出力プロセツサで読み出したあとに行なうことにより、画像データをテクスチヤ領域32から読み出すことなく画像メモリ22へのアドレスの書き込みだけで行なえるようにし、処理量を軽減する。すなわち、画像生成プロセツサ21はデイスプレイ領域31への書き込みだけで描画が行なえる。また画像出力プロセツサ33はどんな場合でもデイスプレイ領域31に含まれる画素の数だけ処理をすれば良く、ポリゴンが多重に重なつているような画像でも表示する画素分の処理だけで表示が行なえる。以上のことから、最終的に表示される画素分の処理だけですむため、画像データの処理量を軽減することができる。
【0035】
【発明の効果】
以上のように本発明の画像生成装置または画像生成方法によれば、不必要なデータ処理を軽減することができる。
【図面の簡単な説明】
【図1】本発明の画像生成装置の構成を示す略線的ブロツク図である。
【図2】画素モード例を示す図表である。
【図3】画像メモリ内のデイスプレイ領域及びテクスチヤ領域を説明に供する略線図である。
【図4】画像出力プロセツサの構成を示す略線的ブロツク図である。
【図5】画像出力プロセツサのモード判定による処理手順を示すフローチヤートである。
【図6】3次元ポリゴンにテクスチヤマツピングをする際のメモリ領域を示す略線図である。
【図7】3次元ポリゴンにフオンシエーデイングをする際のメモリ領域を示す略線図である。
【図8】3次元ポリゴンにテクスチヤマツピングをした後に、フオンシエーデイングをする際のメモリ領域を示す略線図である。
【図9】従来の画像生成装置の構成を示す略線的ブロツク図である。
【図10】従来の画像生成装置による3次元ポリゴンにテクスチヤマツピングをする際のメモリ領域を示す略線図である。
【図11】従来の画像生成装置による3次元ポリゴンにフオンシエーデイングをする際のメモリ領域を示す略線図である。
【図12】従来の画像生成装置による3次元ポリゴンにテクスチヤマツピングをした後に、フオンシエーデイングをする際のメモリ領域を示す略線図である。
【図13】隠面消去によるポリゴンを示す略線図である。
【符号の説明】
1……画像生成装置、2……CPU、3……メインメモリ、4、21……画像生成プロセツサ、5、22……画像メモリ、6、23……画像出力プロセツサ、7……メインバス、10、30……メモリ領域、11、31……デイスプレイ領域、12、32……テクスチヤ領域。[0001]
【table of contents】
The present invention will be described in the following order.
Technical field to which the invention pertains Conventional technology (FIGS. 9 to 12)
Problems to be solved by the invention (FIG. 13)
Means for Solving the Problems Embodiments of the Invention (1) Configuration of Image Generation Device (FIGS. 1 to 5)
(2-1) When texture mapping is performed on a three-dimensional polygon (Fig. 6)
(2─2) Fon shading on a three-dimensional polygon (Fig. 7)
(2─3) When texture mapping is performed on three-dimensional polygons and further fountaining is performed (Fig. 8)
BACKGROUND OF THE INVENTION
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image generation apparatus and an image generation method, and particularly to an image memory such as a game machine or a computer, in which an image generated by calculation or an image read from a storage device is drawn on the image memory, and is displayed on a display. It is suitable to be applied to those which output to
[0003]
[Prior art]
Conventionally, in an image generating apparatus which draws image data on an image memory and reads and displays the image data in accordance with a synchronization signal of a television, the pixel values to be displayed are arranged in the image memory, and the reading apparatus simply stores them. Most of them are read out according to a video synchronizing signal, D / A (digital / analog) converted and displayed on a display.
[0004]
Here, FIG. 9 shows a configuration example of a conventional image generation device. The
[0005]
First, a case in which texture mapping is performed on a three-dimensional polygon in the conventional
The
[0006]
FIG. 10 shows the contents of the
[0007]
For example, in order to texture-map the triangle PQR of the
[0008]
Next, a case in which three-dimensional polygons are subjected to founseeing in the conventional
The
[0009]
FIGS. 11A and 11B show the contents of the
All the processing described below is performed by the image generation processor 4. In the
[0010]
Further, a case in which texture mapping is performed on a three-dimensional polygon in the conventional
The
[0011]
FIGS. 12A and 12B show the contents of the
In the
[0012]
For example, in order to texture map the triangle PQR of the
[0013]
[Problems to be solved by the invention]
However, in the above-described configuration, the image generation processor 4 once reads out pixel data from the memory area 10 (texture area 12) of the
[0014]
In image generation, a technique called "hidden surface removal" is used to realistically represent a three-dimensional object. For example, in an image in which the hidden surface is erased by overwriting as shown in FIG. 13, more polygons are actually written in the memory than the polygons displayed on the screen. Due to the hidden surface erasure, the image data once drawn on the
[0015]
The present invention has been made in consideration of the above points, and has as its object to realize an image generating apparatus and an image generating method capable of reducing unnecessary data processing.
[0016]
[Means for Solving the Problems]
An image generation apparatus according to the present invention corresponding to the above-described object includes an image memory, an image generation processor that writes data corresponding to each pixel and a pixel mode representing the meaning of the data in a display area of the image memory, An image output processor that reads the stored data and the pixel mode, determines a pixel mode of the read data, and performs a predetermined process corresponding to the determined pixel mode to create an output image. The apparatus , wherein the pixel modes include first, second, third, and fourth pixel modes, wherein in the first pixel mode, the image generation processor writes RGB values to the display area, the output processor creates an output image based on the RGB value, and in the second pixel mode, the image generation flop The processor writes a texture address in the display area, the image output processor reads texture data from the image memory based on the texture address to create an output image, and in the third pixel mode, the image generation processor In the display area, while writing data of a normal vector of a vertex of a polygon, the image output processor creates an output image based on an inner product value of the normal vector and the light source vector, and in the fourth pixel mode, The image generation processor writes a texture address and data of a normal vector of a vertex of a polygon to the display area, and the image output processor reads texture data from the image memory based on the texture address. Calculates the inner product value between the normal vector and the light source vector, to create the output image based on the integrated value of the inner product and the texture data, and wherein the.
[0017]
In the image generation device, the image output processor determines a mode of data read from the image memory, a circuit that outputs the texture address to the image memory, the normal vector and the light source. An inner product circuit for obtaining an inner product value of a vector, an integration circuit for multiplying the output of the inner product circuit and the RGB value, the RGB value, the texture data, the output data of the inner product circuit, and the integration A data selector circuit to which the output data of the circuit is input and selectively outputting data corresponding to the mode determined by the mode determination circuit.
Further, the circuit for outputting the texture address to the image memory may include a read address generator.
[0018]
The image generation method of the present invention corresponding to the above-described problem includes a process of writing data corresponding to each pixel and a pixel mode representing the meaning of the data in a display area of an image memory, and a process of writing the pixel mode stored in the display area. Determining a pixel mode of the data, and performing a predetermined process corresponding to the determined pixel mode to create an output image , wherein the pixel mode includes first to fourth pixel modes. In the first pixel mode, the first pixel mode writes an RGB value in the display area, and creates an output image based on the RGB value.In the second pixel mode, writes a texture address in the display area. Reads texture data from the image memory based on the texture address to create an output image In the third pixel mode, data of a normal vector of a vertex of a polygon is written in the display area, and an output image is created based on an inner product value of the normal vector and the light source vector. Then, a texture address and normal vector data of a polygon vertex are written in the display area, texture data is read from the image memory based on the texture address, and an inner product value of the normal vector and the light source vector is calculated. And generating an output image based on an integrated value of the texture data and the inner product value .
[0020]
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment of the present invention will be described below in detail with reference to the drawings.
[0021]
(1) Configuration of Image Generating Apparatus FIG. 1 in which parts corresponding to those in FIG. 9 are assigned the same reference numerals shows the overall configuration of an
[0022]
Next, an example of information stored in the
[0023]
FIG. 3 shows the correspondence between the display area, the texture area, and the pixel mode. The pixel mode is mode = 0 to 3 as described above. mode = 0 represents the coordinate values (R, G, B) in the display area, and mode = 1 represents the number of pages Tp of the texture area as the texture address and the coordinate values (U, V) in the texture area. Further, mode = 2 represents a normal vector (Nx, Ny, Nz) in the display area, and mode = 3 represents the contents of mode = 1 and mode = 2, that is, the texture address and the normal vector.
[0024]
Here, FIG. 4 shows a configuration example of the
The
[0025]
If the data from the
The
[0026]
FIG. 5 is a flowchart showing the procedure of the mode determination by the
When the mode determination result of step SP2 is mode = 1, the process proceeds to step SP6, and the texture address is written in the
[0027]
Further, when the mode determination result is mode = 2, the process proceeds to step SP8, and the normal vector is written to the
Further, when the mode determination result is mode = 3, the process proceeds to step SP10, and the normal vector and the texture address are written in the
Here, the RGB values are output in step SP5, and the processing ends in step SP12.
[0028]
(2-1) Case in which texture mapping is performed on a three-dimensional polygon In the above configuration, first, a case in which texture mapping is performed on a three-dimensional polygon will be described.
The
The
[0029]
FIG. 6 shows the
[0030]
(2─2) Case where founshading is performed on a three-dimensional polygon Next, a case where founshading is performed on a three-dimensional polygon will be described. The
The
[0031]
FIG. 7 shows the
[0032]
(2─3) A case where texture mapping is performed on a three-dimensional polygon and further shading is performed. Next, a case where texture mapping is performed on a three-dimensional polygon and further shading is described. The
Also, the normal vector of each point is written. The
[0033]
FIG. 8 shows the
The
In addition, a normal vector on a pixel to be drawn is calculated, and the RGB value and the normal vector of the polygon are written at an inner point E of the triangle ABC.
[0034]
According to the above configuration, a part of the processing conventionally performed by the image generation processor before writing to the screen memory is performed after reading by the image output processor, so that the image data can be read from the
[0035]
【The invention's effect】
As described above, according to the image generation device or the image generation method of the present invention, unnecessary data processing can be reduced.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram showing the configuration of an image generating apparatus according to the present invention.
FIG. 2 is a chart showing an example of a pixel mode.
FIG. 3 is a schematic diagram for explaining a display area and a texture area in an image memory;
FIG. 4 is a schematic block diagram showing a configuration of an image output processor.
FIG. 5 is a flowchart illustrating a processing procedure based on mode determination of an image output processor.
FIG. 6 is a schematic diagram illustrating a memory area when texture mapping is performed on a three-dimensional polygon.
FIG. 7 is a schematic diagram showing a memory area when founseeing a three-dimensional polygon.
FIG. 8 is a schematic diagram illustrating a memory area when performing font mapping after texture mapping of a three-dimensional polygon.
FIG. 9 is a schematic block diagram showing a configuration of a conventional image generating apparatus.
FIG. 10 is a schematic diagram illustrating a memory area when texture mapping is performed on a three-dimensional polygon by a conventional image generation device.
FIG. 11 is a schematic diagram illustrating a memory area when performing three-dimensional polygon shading by a conventional image generation device.
FIG. 12 is a schematic diagram illustrating a memory area when performing font mapping after texture mapping of a three-dimensional polygon by a conventional image generation device.
FIG. 13 is a schematic diagram illustrating a polygon obtained by erasing a hidden surface.
[Explanation of symbols]
1 image generating apparatus, 2 CPU, 3 main memory, 4 21
Claims (4)
前記画素モードは、第1、第2、第3、第4画素モードを含み、
前記第1画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域に RGB 値を書き込むとともに、前記画像出力プロセッサは前記 RGB 値に基づいて出力画像を作成し、
前記第2画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にテクスチャアドレスを書き込むとともに、前記画像出力プロセッサは前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込んで出力画像を作成し、
前記第3画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記画像出力プロセッサは前記法線ベクトルと光源ベクトルとの内積値に基づいて出力画像を作成し、
前記第4画素モードでは、前記画像生成プロセッサは前記ディスプレイ領域にテクスチャアドレスおよびポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記画像出力プロセッサは、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込むとともに、前記法線ベクトルと光源ベクトルとの内積値を算出し、前記テクスチャデータと前記内積値との積算値に基づいて出力画像を作成する、画像生成装置。 An image memory, an image generation processor that writes data corresponding to each pixel in the display area of the image memory and a pixel mode representing the meaning of the data, and reads the data and the pixel mode stored in the display area, An image output processor that determines a pixel mode of the read data and performs a predetermined process corresponding to the determined pixel mode to create an output image ;
The pixel modes include first, second, third, and fourth pixel modes,
In the first pixel mode, the image generation processor writes RGB values in the display area, and the image output processor creates an output image based on the RGB values,
In the second pixel mode, the image generation processor writes a texture address in the display area, and the image output processor reads texture data from the image memory based on the texture address to create an output image,
In the third pixel mode, the image generation processor writes data of a normal vector of a vertex of a polygon in the display area, and the image output processor outputs an output image based on an inner product value of the normal vector and the light source vector. To create
In the fourth pixel mode, the image generation processor writes a texture address and data of a normal vector of a vertex of a polygon in the display area, and the image output processor reads texture data from the image memory based on the texture address. An image generating device for calculating an inner product value of the normal vector and the light source vector, and creating an output image based on an integrated value of the texture data and the inner product value.
前記画像メモリから読み込まれたデータのモードを判定するモード判定回路と、
前記テクスチャアドレスを前記画像メモリに出力する回路と、
前記法線ベクトルと前記光源ベクトルとの内積値を求めるインナープロダクト回路と、
前記インナープロダクト回路の出力と前記RGB値とをかける積算回路と、
前記RGB値と、前記テクスチャデータと、前記インナープロダクト回路の出力データと、前記積算回路の出力データとが入力され、前記モード判定回路により判定されたモードに対応するデータを選択的に出力するデータセレクタ回路とを含む、請求項1記載の画像生成装置。The image output processor,
A mode determination circuit for determining a mode of data read from the image memory;
A circuit for outputting the texture address to the image memory;
An inner product circuit for calculating an inner product value of the normal vector and the light source vector,
An integrating circuit that multiplies the output of the inner product circuit by the RGB value;
The RGB value, the texture data, the output data of the inner product circuit, and the output data of the integrating circuit are input, and data for selectively outputting data corresponding to the mode determined by the mode determination circuit. and a selector circuit, the image generating apparatus according to claim 1.
前記画素モードは、第1、第2、第3、第4画素モードを含み、
前記第1画素モードでは、前記ディスプレイ領域に RGB 値を書き込むとともに、前記 RGB 値に基づいて出力画像を作成し、
前記第2画素モードでは、前記ディスプレイ領域にテクスチャアドレスを書き込むとともに、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込んで出力画像を作成し、
前記第3画素モードでは、前記ディスプレイ領域にポリゴンの頂点の法線ベクトルのデータを書き込むとともに、前記法線ベクトルと光源ベクトルとの内積値に基づいて出力画像を作成し、
前記第4画素モードでは、前記ディスプレイ領域にテクスチャアドレスおよびポリゴンの頂点の法線ベクトルのデータを書き込み、前記テクスチャアドレスに基づいて前記画像メモリからテクスチャデータを読み込み、前記法線ベクトルと光源ベクトルとの内積値を算出し、前記テクスチャデータと前記内積値との積算値に基づいて出力画像を作成する画 像生成方法。 A process of writing data corresponding to each pixel and a pixel mode representing the meaning of the data in the display area of the image memory, and determining the pixel mode of the data from the pixel mode stored in the display area; Performing a predetermined process corresponding to the process of creating an output image, and an image generation method ,
The pixel modes include first, second, third, and fourth pixel modes,
In the first pixel mode, write an RGB value to the display area, and create an output image based on the RGB value;
In the second pixel mode, write a texture address in the display area, read texture data from the image memory based on the texture address to create an output image,
In the third pixel mode, while writing the data of the normal vector of the vertex of the polygon in the display area, create an output image based on the inner product value of the normal vector and the light source vector,
In the fourth pixel mode, a texture address and data of a normal vector of a vertex of a polygon are written in the display area, texture data is read from the image memory based on the texture address, and a texture vector and a light source vector are compared. calculating the inner product value, images generating method of creating an output image based on the integrated value of the inner product and the texture data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34809895A JP3553249B2 (en) | 1995-12-15 | 1995-12-15 | Image generating apparatus and image generating method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34809895A JP3553249B2 (en) | 1995-12-15 | 1995-12-15 | Image generating apparatus and image generating method |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003171256A Division JP3776416B2 (en) | 2003-06-16 | 2003-06-16 | Image generating apparatus and image generating method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09166975A JPH09166975A (en) | 1997-06-24 |
| JP3553249B2 true JP3553249B2 (en) | 2004-08-11 |
Family
ID=18394729
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP34809895A Expired - Fee Related JP3553249B2 (en) | 1995-12-15 | 1995-12-15 | Image generating apparatus and image generating method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3553249B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW525078B (en) | 1998-05-20 | 2003-03-21 | Sony Computer Entertainment Inc | Image processing device, method and providing media |
-
1995
- 1995-12-15 JP JP34809895A patent/JP3553249B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH09166975A (en) | 1997-06-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3107452B2 (en) | Texture mapping method and apparatus | |
| EP0620532A2 (en) | Methods and apparatus for synthesizing a three-dimensional image signal and producing a two-dimensional visual display therefrom | |
| JP2001265314A (en) | Display system, data display method, shadowed character font generation method, and recording medium | |
| US6850244B2 (en) | Apparatus and method for gradient mapping in a graphics processing system | |
| JP3035571B2 (en) | Image processing device | |
| JP3553249B2 (en) | Image generating apparatus and image generating method | |
| JP3776416B2 (en) | Image generating apparatus and image generating method | |
| US6646650B2 (en) | Image generating apparatus and image generating program | |
| JP2763481B2 (en) | Image synthesizing apparatus and image synthesizing method | |
| JP3312560B2 (en) | Texture mapping device | |
| JP3202535B2 (en) | Image synthesis device | |
| JP3872056B2 (en) | Drawing method | |
| JPH0544063B2 (en) | ||
| JP2610825B2 (en) | Graphic processing unit | |
| JP3272463B2 (en) | Image forming apparatus and method of using the same | |
| US6377279B1 (en) | Image generation apparatus and image generation method | |
| US7417639B2 (en) | Drawing device and information processing apparatus | |
| JP2822672B2 (en) | Graphic drawing method and apparatus | |
| JP2980079B2 (en) | Three-dimensional image processing apparatus and method | |
| JP4419480B2 (en) | Image processing apparatus and method | |
| JPH04247587A (en) | Graphic display device | |
| JP2761220B2 (en) | 3D graphic display system | |
| JPH023195B2 (en) | ||
| JPH0346826B2 (en) | ||
| WO2021245875A1 (en) | Image compositing device and image compositing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20040106 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040204 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20040311 |
|
| 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: 20040427 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040428 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090514 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090514 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100514 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110514 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110514 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120514 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130514 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140514 Year of fee payment: 10 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |