JP3735535B2 - Texture mapping method, recording medium, program, and program execution device - Google Patents

Texture mapping method, recording medium, program, and program execution device Download PDF

Info

Publication number
JP3735535B2
JP3735535B2 JP2001062195A JP2001062195A JP3735535B2 JP 3735535 B2 JP3735535 B2 JP 3735535B2 JP 2001062195 A JP2001062195 A JP 2001062195A JP 2001062195 A JP2001062195 A JP 2001062195A JP 3735535 B2 JP3735535 B2 JP 3735535B2
Authority
JP
Japan
Prior art keywords
texture
light spot
model
dimensional model
program
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
Application number
JP2001062195A
Other languages
Japanese (ja)
Other versions
JP2001325604A (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.)
Sony Interactive Entertainment Inc
Original Assignee
Sony Computer Entertainment 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 Sony Computer Entertainment Inc filed Critical Sony Computer Entertainment Inc
Priority to JP2001062195A priority Critical patent/JP3735535B2/en
Publication of JP2001325604A publication Critical patent/JP2001325604A/en
Application granted granted Critical
Publication of JP3735535B2 publication Critical patent/JP3735535B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、たとえば3次元コンピュータグラフィックスにより生成される画像(映像)上に、ライト等の光点等を表すテクスチャを簡易に付けることを可能とするテクスチャマッピング方法、記録媒体、プログラム、およびプログラム実行装置に関する。
【0002】
【従来の技術】
3次元コンピュータグラフィックスにより生成される画像(映像)中に光点等のテクスチャをマッピングする従来技術を、図12に示すフローチャートを用いて説明する。
【0003】
なお、このフローチャートによる処理は、3次元(3D)モデリングツールがインストールされたパーソナルコンピュータ(以下、PCともいう。)を使用して行われる。
【0004】
まず、ステップS1では、PCを使用して所望の3Dモデルを生成する。
【0005】
次に、ステップS2では、同様に、PCにより複数種類の光点テクスチャを生成する。
【0006】
次いで、ステップS3を構成するステップS3a〜S3dでは、ステップS1で生成した3Dモデルに対する光点のテクスチャマッピング処理およびその確認処理を行う。
【0007】
この場合、まず、ステップS3aにおいて、上述の3Dモデルと複数の光点テクスチャとをモニタ上で見ながら、上記複数種類の光点テクスチャ中、所望の光点テクスチャを選択するとともに、選択した光点テクスチャをマッピングしたい箇所の3Dモデル上の位置座標をキーボード等により入力するとともに、光点テクスチャの色(RGBの各値)をキーボード等により数値入力する。
【0008】
次に、ステップS3bでは、ステップS2で選択された光点テクスチャを、前記位置座標と前記色とを参照し、前記3Dモデルにマッピングする(貼り付ける)レンダリング処理を行う。
【0009】
次いで、ステップS3cでは、レンダリング処理後の映像をモニタディスプレイ上に表示させ、ステップS3dにおいて目視確認を行う。
【0010】
ステップS3dの目視確認処理において、マッピング位置(貼付位置)あるいは色が気に入らない場合には、再度ステップS3aにもどり、キーボード等を利用して、位置座標および色を調整するための数値入力作業(数値修正作業)を行う。
【0011】
このようにして、ステップS3dの目視確認の結果が肯定的になるまで、ステップS3の光点マッピング・確認処理を繰り返す。
【0012】
【発明が解決しようとする課題】
しかしながら、上記従来の光点テクスチャマッピング方法では、ステップS3bにおけるレンダリング処理後の画面上に表示される実際の画像で光点を確認するまで、視覚的に光点の位置を確認することができないという問題がある。
【0013】
また、光点の位置座標は、その都度、3Dモデル上の所望の位置に対するキーボード等による数値入力作業および再入力作業が必要となり、光点の数が多い場合には、入力作業に莫大な時間を要するという問題もある。
【0014】
しかも、たとえば星空、あるいは都市の夜景等を光点テクスチャ処理により、よりリアルに表そうとした場合、光点の数は、数百個から数万個まで必要とされるが、このような数のテクスチャをフレーム時間(たとえば、1/60秒)で描画する処理は、従来、ハードウエアの制約上からも不可能であった。
【0015】
このように、上記従来の光点テクスチャマッピング方法では、3Dモデル上に多数の光点を指定するのに、多大な労力と時間を必要とし、また、ハードウエアの制約から貼付可能なテクスチャの数も制限されている。
【0016】
この発明は、このような課題を考慮してなされたものであり、3Dモデル上に簡易に光点等のテクスチャをマッピングすることを可能とするテクスチャマッピング方法、記録媒体、プログラム、およびプログラム実行装置を提供することを目的とする。
【0017】
【課題を解決するための手段】
この発明のテクスチャマッピング方法は、CPUによりプログラムを実行することでモニタ上に光点付きの3次元画像を表示する画像処理装置におけるテクスチャマッピング方法であって、ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをそれぞれマッピングするステップとを備えることを特徴とする(請求項1記載の発明)。
【0018】
この発明の記録媒体は、モニタ上に光点付きの3次元画像を表示する画像処理装置のCPUにより実行されるプログラムが記録された記録媒体であって、前記CPUに、ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをそれぞれマッピングするステップとを実行させるためのプログラムを記録している(請求項3記載の発明)。
【0019】
この発明のプログラムは、モニタ上に光点付きの3次元画像を表示する画像処理装置のCPUにより実行されるプログラムであって、前記CPUに、ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをマッピングするステップとを実行させる(請求項5記載の発明)。
【0020】
この発明の画像処理装置は、CPUによりプログラムを実行することでモニタ上に光点付きの3次元画像を表示する画像処理装置であって、ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別する手段と、光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをマッピングする手段とを備えることを特徴とする(請求項7記載の発明)。
【0021】
この発明によれば、3Dモデルを構成する各ポリゴンの各頂点にテクスチャを配置(描画)することを指定できるので、3Dモデル上に自動的にテクスチャをマッピングすることができる。
【0022】
なお、この発明において、3次元モデル指定ステップ(手段)とテクスチャ指定ステップ(手段)とは、たとえば、テクスチャが1種類であるとき、あるいは画面上の全ての3次元モデルに対してテクスチャマッピングを指定するとき等には、順序を入れ替えることができる。
【0023】
また、この発明において、各頂点に配置するテクスチャの色の属性を指定することにより、テクスチャの色、透明度等を自動的に指定することができる。
【0024】
色を指定することにより、テクスチャとしては、光点に限らず、雲塊、木の葉、タンポポの綿毛等、様々なテクスチャをマッピングすることが可能である。
【0025】
【発明の実施の形態】
以下、この発明の実施の形態について添付の図面を参照して説明する。
【0026】
図1は、この発明の一実施の形態が適用されたプログラム実行・開発システム10の模式的な外観を示している。
【0027】
このプログラム実行・開発システム10は、各種プログラムを実行させる等の機能を有するエンタテインメント装置としても使用可能な本体部であるプログラム実行・開発装置(プログラム実行装置とプログラム開発装置の両機能を含む。)12と、このプログラム実行・開発装置12に対して着脱自在とされるカード型外部記憶装置(外部メモリ)であるメモリカード14と、プログラム実行・開発装置12に対してコネクタ15により着脱自在とされる操作装置(コントローラ)16と、それぞれデータ入力、指定入力、指令入力等の入力装置であるキーボード52およびマウス56と、画像出力装置であるカラープリンタ54と、プログラム実行・開発装置12から出力される映像・音声信号が供給されるカラーディスプレイであるモニタ18とから基本的に構成される。
【0028】
図1に示すように、このプログラム実行・開発装置12は、扁平な直方体を重ねた形状を有しており、その前面パネルには、プログラム・データの記録媒体である光ディスク20が装着されるディスク装着部としての前後に移動可能なディスクトレイ22と、現在実行中のプログラム等を任意にリセット等するためのリセットスイッチ24と、ディスクトレイ22を引き出すためのオープンボタン26と、メモリカード14の2つの差込口30と、コントローラ16のコネクタ15が差し込まれる2つのコントローラ端子32と、キーボード52、カラープリンタ54が差し込まれるUSBコネクタ等とが配置される。
【0029】
背面パネル側には、電源スイッチ28と、映像と音声の出力端子であり、AV(audio visual)ケーブルを介してモニタ18と接続される図示していないAVマルチ出力端子等が配置されている。なお、キーボード52には、マウス56接続用のUSBコネクタが設けられている。
【0030】
プログラム実行・開発装置12は、エンタテインメント装置として使用する場合、コンピュータゲーム(ビデオゲーム)のプログラムやデータが記録されたCDROM、DVDROM等の記録媒体である光ディスク20から当該プログラムを読み取り、それを実行することによりモニタ18にキャラクタやシーンを表示させる制御機能のほか、他の光ディスク20であるDVD(digital video disk)による映画の再生およびCDDA(compact disk digital audio)による音楽の再生等の各種制御機能が内蔵されている。また、通信ネットワーク等を介して通信により得られるプログラムを実行する機能も有する。プログラムの実行中には、表示装置としてのモニタ18上にプログラム実行・開発装置12が順次生成する3次元コンピュータグラフィックス映像が表示される。
【0031】
この場合、各種操作ボタンおよび操作キーを有するコントローラ16からの信号も、プログラム実行・開発装置12の上記制御機能の一つによって処理され、その内容がモニタ18の画面上の、たとえばキャラクタの動き、シーンの切り替えなどに反映されるようになっている。
【0032】
次に、図2のブロック図を参照して、図1に示したプログラム実行・開発システム10の内部構成とその一般的な動作について説明する。
【0033】
コアとなるCPU401に対して、半導体メモリとしてのRAM402およびバス403がそれぞれ接続される。このバス403に対して、グラフィックシンセサイザー(GS)404、インプットアウトプットプロセッサ(IOP)409がそれぞれ接続される。GS404には、フレームバッファ、Zバッファおよびテクスチャメモリ等を含むRAM405と、このRAM405中のフレームバッファへの描画機能を含むレンダリング機能を有するレンダリングエンジン406とが含まれる。
【0034】
このように構成されるGS404には、例えばデジタルRGB信号等をNTSC標準テレビジョン方式等に変換するためのエンコーダ407を介して、外部機器としてのモニタ18が接続される。なお、モニタ18は、プログラム実行・開発装置12として使用するとき、デジタルRGB信号を直接映像信号に変換するモニタが使用される。
【0035】
IOP409には、光ディスク20に記録されているデータを再生し、デコードするためのドライバ(DRV)410、サウンドプロセッサ(SP)412、フラッシュメモリからなる外部メモリとしてのメモリカード14、コントローラ16、キーボード52、カラープリンタ54、マウス56、3次元モデリングツールがインストールされたハードディスク58およびオペレーティング・システム等の記録されたROM416がそれぞれ接続される。SP412は、増幅器413を介して、外部機器としてのスピーカ414およびモニタ18に接続され、音声信号を供給する。
【0036】
ここで、メモリカード14は、たとえばCPUもしくはゲートアレイおよびフラッシュメモリからなるカード型の外部記憶装置であって、図1に示されたプログラム実行・開発装置12に対し、その差込口30を介して着脱自在となっている。ゲームの途中状態を記憶したり、DVD再生用のプログラム等が記憶されている。
【0037】
コントローラ16は、搭載された複数のボタンの押圧により、指令(2値指令または多値指令)入力をプログラム実行・開発装置12に与えるためのものである。また、ドライバ410は、MPEG(moving picture experts group)標準に基づいてエンコードされた画像をデコードするためのデコーダを備えている。
【0038】
なお、上述したCPU401は、クロック周波数が300MHzで、6,600万ポリゴン/秒の3次元コンピュータグラフィックス座標演算性能を有している。
【0039】
また、GS404は、RAM(DRAM)405内蔵の並列描画プロセッサであり、クロック周波数150MHz、最大表示色数32ビット(RGBおよびA(半透明加算時の加算率)各8ビット)、隠面処理等を自動的に行うためのZバッファ32ビット、その他画像処理機能としてテクスチャマッピング、アルファブレンディング(半透明加算)機能、バイ・トライリニアフィルタリング機能、ポリゴン描画性能7,500万個/秒等を備えている。
【0040】
次に、コントローラ16の操作により、どのようにして3D画像がモニタ18に表示されるのかについて説明する。前提として、光ディスク20に記録されているポリゴン頂点データ、テクスチャデータ等からなるオブジェクトのデータが、ドライバ410を介して読み込まれ、CPU401のRAM402に保持されているものとする。
【0041】
コントローラ16を介して使用者であるプレイヤからの指示がプログラム実行・開発装置12に入力されると、CPU401は、その指示に基づいて3次元(3D)上におけるオブジェクト(3次元オブジェクト)の位置、視点に対する向きを演算する。これにより、直交3軸X,Y,Zの座標値で規定されるオブジェクトのポリゴン頂点データがそれぞれ変更される。変更後のポリゴン頂点データは、透視変換処理により2次元の座標データに変換される。
【0042】
2次元座標によって指定される領域がいわゆるポリゴンである。変換後の2次元の座標データ、Zデータおよびテクスチャデータは、GS404に供給される。GS404は、変換後の2次元座標データ、Zデータに基づいて、レンダリングを行い、順次テクスチャデータをメモリとしてのRAM405(この場合、フレームバッファ)上に書き込む(描画する)ことで描画処理を行う。なお、描画されるテクスチャデータは、この描画処理により完成された1フレーム分の画像がエンコーダ407によってエンコードされた後に、モニタ18に供給され、その画面上に画像として表示される。
【0043】
次に、図3は、3Dモデリングツールがインストールされたパーソナルコンピュータ(PC)900を示している。
【0044】
このPC900は、制御手段としてのCPU902、メモリとしてのROM904、メモリとしてのRAM906、メモリとしてのハードディスクドライブ908(繁雑となるのでハードディスク908ともいう。)、CDROM等を読みとるためのCDドライブ(CDD)910、DVDROM等を読みとるためのDVDドライブ(DVDD)912を有する本体部914と、この本体部914に接続されるモニタ916、キーボード918、マウス920、カラープリンタ922から構成されている。
【0045】
ここで、ハードディスク908にインストールされている3Dモデリングツールとしては、一般に普及している Wavefront (ウエイブフロント)社製の商品名「MAYA」等のソフトウエアを使用することができる。
【0046】
すなわち、3Dモデリングツールは、マウス920、キーボード918等を使用して立体図形を生成する機能、ワイヤフレーム表示機能、カメラ設定機能、レンダリング機能等を有し、オブジェクトとしての3Dモデルを容易に生成することができる。
【0047】
なお、一般的には、キャラクタオブジェクト、建物オブジェクト等の3次元モデル(3次元モデルデータ)が、このPC900を利用してデザイナーにより作成され、作成された3次元モデル(3次元モデルデータ)等を用いてプログラマーが上記のプログラム実行・開発システム10および必要に応じてPC900を利用してゲームプログラム等を完成させる。なお、PC900で作成された3次元モデルデータは、PC900上でプログラム実行・開発システム10上のデータにコンバートされ、プログラム実行・開発装置12に記録媒体(光ディスク20である、たとえば、CDR、DVDRAM)を介して、あるいはネットワークを介して取り込まれる。なお、PC900とプログラム実行・開発システム10は、LANによりネットワーク接続することが可能となっている。
【0048】
この実施の形態のプログラム実行・開発システム10およびPC900は、基本的には、以上のように構成され、かつ動作するものであり、次に、テクスチャマッピング機能について、図4のフローチャートを参照して説明する。この実施の形態では、光点テクスチャマッピング機能について説明するが、テクスチャとしては、色(RGB値)、透明度等を適当に設定することにより光点テクスチャに限らず、雲塊テクスチャ、木の葉テクスチャ、およびタンポポの綿毛テクスチャ等、どのような種類のテクスチャマッピングにも適用することができる。
【0049】
なお、以下に説明するテクスチャマッピング機能中、ステップS12、S13、S14、S15、S21は、汎用性のあるプログラムであるライブラリとしてハードディスク58に格納することができる。
【0050】
まず、ステップS11では、PC900を使用して所望の3Dモデル(3Dモデルデータ)を生成する。図5は、作成された3Dモデル(ワイヤフレームモデル)100を模式的に示している。
【0051】
この3Dモデル100には、柱体モデル102の先端にパラソル状モデル104が付いた建物モデル106、下側柱体モデル108と上側柱体モデル110とからなる建物モデル112、道路モデル114、テールランプモデル116が付いた車モデル118、ポールモデル120とライトモデル122とからなる道路照明ランプモデル124、3角柱体状の建物モデル126が含まれている。この3Dモデル100におけるワイヤフレームにより構成される各ポリゴンの頂点座標(x、y、z)は3Dモデリングツールにより自動的に生成される。
【0052】
次に、ステップS12では、PC900またはプログラム実行・開発装置12により複数種類の光点テクスチャを生成する。ここでは、プログラム実行・開発装置12により光点テクスチャを生成するものとする。
【0053】
図6は、生成された各種の光点テクスチャの模式図を示している。図6から理解されるように、ここでは、それぞれ、大きさが4段階(大きさb1、b2、b3、b4)、形状が円形、菱形、星形の3形状(形状a1、a2、a3)の光点テクスチャ131〜142が生成されて、図7に示すように、ハードディスク58の所定領域に、光点テクスチャテーブル(テクスチャ記憶手段)144として格納されるものとする。
【0054】
次に、ステップS13では、光点テクスチャマッピング(設定)用3Dモデルを生成しあるいは指定する。すなわち、このステップS13では、各ポリゴンの頂点にテクスチャを配置したい(描画したいあるいはマッピングしたい)3Dモデルを指定する。
【0055】
この場合、図5に示した3Dモデル100と図6に示した光点テクスチャテーブル144の模式図が、モニタ18の画面上に表示される。そして、このステップS13では、3Dモデル100を構成する各モデルである柱体モデル102、パラソル状モデル104、建物モデル106、下側柱体モデル108、上側柱体モデル110、建物モデル112、道路モデル114、テールランプモデル116、車モデル118、ポールモデル120、ライトモデル122、道路照明ランプモデル124、建物モデル126の中、各モデルを構成するポリゴンの各頂点に光点テクスチャを付けたい3Dモデル(符号をMAとする。)をマウス56のクリック操作等により指定する。すなわち、図示していないマウスカーソルを所望の3DモデルMAに合わせてマウス56を左クリックすると、その3DモデルMAのみ色が、たとえば黒色から緑色に変わる。
【0056】
緑色とされた3DモデルMAが、構成される各ポリゴンの頂点に光点テクスチャを付けたい3Dモデルであるので、画面上で一瞥して認識することができる。
【0057】
もちろん、メニューの選択により、3Dモデル100を構成する全ての3Dモデルを構成する全てのポリゴンの頂点に光点テクスチャを付けるという一括指定を行うこともできる。
【0058】
図8は、各ポリゴンの頂点にテクスチャを配置したい3Dモデルを指定後のモニタ18上の画像153を示している。
【0059】
この実施の形態では、図8上、点線で示すモデル、すなわち、3Dモデル100を構成する上記の各モデル中、パラソル状モデル104、上側柱体モデル110、テールランプモデル116、ライトモデル122、建物モデル126は、マウス56によりクリックされて指定された光点テクスチャマッピング用3DモデルMAを示している。この3DモデルMAは、緑色で表示されている。
【0060】
その一方、残された実線で示すモデル、すなわち、柱体モデル102、下側柱体モデル108、道路モデル114、車モデル118、ポールモデル120は、光点テクスチャマッピング用3DモデルMAに指定されなかったモデル(符号をMBとすれば、100=MA+MBと模式的に表すことができる。)である。この3DモデルMBは、黒色で表示されている。
【0061】
すなわち、モニタ18の画面上の画像153では、頂点に光点テクスチャ131〜142が配される(マッピングされる)点線で示した3DモデルMAが緑色、実線で示す光点テクスチャがマッピングされない3DモデルMBが黒色等に分けて表示される。なお、この表示は、PC900中のモニタ916上でも、同様に行うことができる。
【0062】
さらに、図8において、2つの建物モデル126、128中、左側の4角錐台状の建物モデル128は、このステップS13で新たにに生成し、かつ光点テクスチャマッピングを指定した光点テクスチャマッピング用3DモデルMAを示している。なお、3Dモデルのコピー等の機能は、プログラム実行・開発装置12のハードディスク58にインストールされ、該プログラム実行・開発装置12で行うことができるようになっている。
【0063】
このように、ステップS13では、光点テクスチャマッピング用3DモデルMAを新たに生成すること、あるいは既に生成してある3Dモデル100に対して光点テクスチャマッピング用3DモデルMAへの指定を行うことが可能である。
【0064】
指定された光点テクスチャマッピング用3DモデルMAは、図7に示すように、ハードディスク58の所定領域中に、3Dモデル指定テーブル146として記録される。すなわち、この3Dモデル指定テーブル146は、3Dモデル100を構成するどのポリゴンの頂点にテクスチャをマッピングするかどうかを指示するデータである。なお、ハードディスク58中の各種データは、ゲームの進行に応じて必要なデータがRAM402、RAM405に転送される。
【0065】
次に、ステップS14では、3Dモデル指定テーブル146に記録されている光点テクスチャマッピング用3DモデルMA(パラソル状モデル104、上側柱体モデル110、テールランプモデル116、ライトモデル122、建物モデル126、128)を構成する各ポリゴンの各頂点に付けようとする光点テクスチャ131〜142の色(RGB値)および透明度等の属性を、各3DモデルMA(パラソル状モデル104、上側柱体モデル110、テールランプモデル116、ライトモデル122、建物モデル126、128)毎に指定する。もちろん、3Dモデル指定テーブル146に記録されている光点テクスチャマッピング用3DモデルMAに対して一括して、同一の属性(色、透明度等)を指定することもできる。
【0066】
このようにして指定した属性と光点テクスチャマッピング用3DモデルMAの対応関係は、ハードディスク58の所定領域中、属性テーブル148に記録される。すなわち、この属性テーブル148は、指定した3DモデルMAを構成する各ポリゴンの各頂点に配置したいテクスチャの色、透明度を指定するデータとしてのテーブルである。
【0067】
次にステップS15では、前記光点テクスチャテーブル144を参照し、3Dモデル指定テーブル146に記録されている光点テクスチャマッピング用3DモデルMA(パラソル状モデル104、上側柱体モデル110、テールランプモデル116、ライトモデル122、建物モデル126、128)を構成する各ポリゴンの各頂点に付けようとする光点テクスチャ131〜142の種類STを指定する。光点テクスチャ131〜142の種類STの指定は、図6に示した形状ai=a1〜a3と大きさbj=b1〜b4を指定することにより行えるが、実際上、この指定は、図6に示した光点テクスチャテーブル144に基づき画面上に表示される光点テクスチャ131〜142中、所望の光点テクスチャをクリックすることにより行うことができる。なお、種類STは、ST(ai,bj)で表すことができる。
【0068】
この場合においても、光点テクスチャ131〜142のうち、所望の1つの光点テクスチャをデフォルトで選択しておくことにより、このデフォルトの光点テクスチャを利用することで、各光点テクスチャマッピング用3Dモデルに対して、一括して、光点テクスチャ131〜142のうち、所望の1つの光点テクスチャを指定することができる。換言すれば、各光点テクスチャマッピング用3Dモデルに対して、個別に光点テクスチャを指定する必要がなくなる。
【0069】
指定した光点テクスチャマッピング用3DモデルMAと、付けるべき光点テクスチャ131〜141の種類STとの対応関係は、ハードディスク58の所定領域中、テクスチャ指定テーブル150に記録される(図7参照)。
【0070】
以上説明したステップS11〜S14の準備処理の次に、3Dモデルを透視投影変換した後のDモデルを構成する各ポリゴンの各頂点に指定のテクスチャをマッピングする処理、すなわち、図9に示すステップS21の「指定3Dモデルを構成する各ポリゴンの頂点座標と属性を参照して指定のテクスチャを貼り付ける。」というテクスチャマッピングプログラムをCPU401およびGS404に実行させる。このステップS21のテクスチャマッピングプログラムは、プログラム実行・開発装置12でライブラリとして利用することが可能である。
【0071】
このプログラムの実行により、エンタテインメント装置としても機能するプログラム実行・開発装置12のCPU401およびGS404は、ハードディスク58(この時点では、ハードディスク58から読み出されて書き込まれたRAM402およびRAM405)中の光点テクスチャテーブル144、3Dモデル指定テーブル146、属性テーブル148、テクスチャ指定テーブル150を参照して、レンダリングエンジン406によりレンダリング処理を行い、図10に示すような光点付きの3Dソリッドモデルである3次元画像154をRAM405中のフレームバッファに描画する。
【0072】
フレームバッファに描画された3次元画像154は、エンコーダ407を通じて映像信号に変換され、モニタ18上に画像(符号は同じ154とする。)として表示される。
【0073】
図10に示す3次元画像154上では、ステップS13〜S15で指定された3Dモデル{光点テクスチャマッピング用3DモデルMA(パラソル状モデル104、上側柱体モデル110、テールランプモデル116、ライトモデル122、建物モデル126、128)}を構成する各ポリゴンの頂点位置に指定のテクスチャが指定の色、透明度で表示されている。
【0074】
なお、図10に示す3次元画像154、および図5に示す3次元画像、図8に示す3次元画像153は、静止画キャプチャーによりカラープリンタ54からカラーハードコピーとして出力して確認することもできる。
【0075】
また、光ディスク20から読み込まれる実際のゲームプログラム上では、次のフレームでモニタ18上に表示すべき画面の指示リスト、いわゆるディスプレイリストがCPU401により次々に生成されて、GS404に供給される。
【0076】
ここで、CPU401は、図11のフローチャートに示すように、まず、ステップS31では、上記のディスプレイリスト中に、上記のステップS21の指示が含まれているかどうかを判別し、含まれている場合には、GS404に対してステップS32の処理でテクスチャ指定テーブル150(指定した光点テクスチャマッピング用3DモデルMAと、付けるべき光点テクスチャSTとの対応関係が指定されたテーブル)を参照する指示を行う。
【0077】
なお、このとき、図5に示した透視投影変換後の3Dモデル100は、RAM405(図7参照)にデータとして記憶されている。
【0078】
次に、ステップS33において、GS404は、光点テクスチャ131〜142の種類STに対応する光点テクスチャ131〜142を描画するために、光点テクスチャテーブル144を参照する。この時点で、この光点テクスチャテーブル144の光点テクスチャ131〜142は、RAM405中に展開されている。同時に、GS404は、色、透明度を知るために属性テーブル148を参照する。
【0079】
そして、ステップS34において、RAM405中に描画されている3Dモデル100を参照し、ステップS35において、該3Dモデル100中、3Dモデル指定テーブル146で指定されている光点テクスチャマッピング用3DモデルMAの各ポリゴンの各頂点に、指定された光点テクスチャ131〜142を指定の色、透明度でマッピングする、この実施の形態に係るテクスチャマッピング処理を自動的に行い、レンダリング処理を完了する。
【0080】
図10は、このようなレンダリング処理後のモニタ18上の画面表示を示している。
【0081】
以上説明したように、この実施の形態によれば、PC900にインストールされている3Dモデリングツール上で3Dモデル100を作成し、プログラム実行・開発装置12により、3Dモデル100中、所望のテクスチャを、構成する各ポリゴンの頂点にマッピングしたいテクスチャマッピング用のテーブルを生成することで、視覚的にかつ容易に光点の座標および属性を設定することができる。
【0082】
すなわち、プログラム実行・開発装置12により、ポリゴンの頂点にテクスチャマッピングを行いたい所望の3Dモデルを選択し指定することで、その3DモデルMAを構成する各ポリゴンの各頂点へのテクスチャマッピングが自動的に可能となるので、1フレームの画面上で、たとえば数万個単位での光点の座標と属性を指定することも可能であり、都市の夜景、宇宙船からみた地球とその他の星、都市の夜景と花火との組み合わせ、アミューズパークの夜景等に適用してきわめて好適である。
【0083】
また、上述した実施の形態によれば、3次元モデル指定ステップ(3次元モデル指定手段)S13により、各ポリゴンの頂点にテクスチャを配置したい3DモデルMAを指定した後、テクスチャ指定ステップ(テクスチャ指定手段)S15により、指定された各頂点に配置したいテクスチャを指定する。さらに、テクスチャマッピングステップ(テクスチャマッピング手段)S21により、指定された3DモデルMAを透視投影変換後の各ポリゴンの各頂点に指定のテクスチャをマッピングする。また、テクスチャ指定ステップ(テクスチャ指定手段)S15では、テクスチャの色の属性を指定することができる(ステップS14)。
【0084】
このように処理することにより、3DモデルMAを構成する各ポリゴンの各頂点にテクスチャを配置する(描画する)ことを指定できるので、3Dモデル100上に莫大な数のテクスチャをきわめて簡単にマッピングすることができる。
【0085】
さらに、上述した実施の形態によれば、3次元モデル100を構成する各ポリゴンの各頂点にテクスチャをマッピングするかどうかを指示するデータである3Dモデル指定テーブル146が含まれているかどうかを確認するステップ(ステップS31、S32)と、この確認の後、指示するデータが含まれていると判断した場合には、対応する3DモデルMAを透視投影変換後の各ポリゴンの各頂点に前記テクスチャをマッピングするステップ(S32〜S35)とを有している。このようなプログラムを記録媒体である光ディスク20に記録しておくことにより、3Dモデル100上に、莫大な数のテクスチャをきわめて簡単にマッピングすることができる。
【0086】
なお、この発明は、上述の実施の形態に限らず、この発明の要旨を逸脱することなく、種々の構成を採りうることはもちろんである。
【0087】
【発明の効果】
以上説明したように、この発明によれば、3Dモデルを構成する各ポリゴンの各頂点にテクスチャをマッピングすることを指定できる。この指定により、3Dモデル上に簡易にテクスチャをマッピングすることができる。
【0088】
すなわち、この発明によれば、3Dモデル上にきわめて簡易に光点等のテクスチャをマッピングすることができる。
【図面の簡単な説明】
【図1】この発明の一実施の形態が適用されたプログラム実行・開発システムの構成図である。
【図2】プログラム実行・開発システムのブロック図である。
【図3】3Dモデリングツールがインストールされたパーソナルコンピュータの構成図である。
【図4】テクスチャマッピングの動作説明に供されるフローチャートである。
【図5】3Dワイヤフレームモデルの模式図である。
【図6】光点テクスチャテーブルの説明図である。
【図7】ハードディスクに記録される各種テーブルの説明図である。
【図8】テクスチャマッピング用の指定がなされた3Dモデルの説明図である。
【図9】テクスチャマッピングのプログラムの内容を示す説明図である。
【図10】テクスチャマッピング済みのソリッド3Dモデルの模式図である。
【図11】指定3Dモデルの各ポリゴンの各頂点にテクスチャマッピングする動作説明に供されるフローチャートである。
【図12】従来の技術の説明に供されるフローチャートである。
【符号の説明】
10…プログラム実行・開発システム 12…プログラム実行・開発装置
16…操作装置(コントローラ) 18…モニタ
20…光ディスク 52…キーボード
54…カラープリンタ 56…マウス
58…ハードディスク
100…3Dモデル(ワイヤフレームモデル)
102…柱体モデル 104…パラソル状モデル
106、112、126、128…建物モデル
108…下側柱体モデル 110…上側柱体モデル
114…道路モデル 116…テールランプモデル
120…ポールモデル 122…ライトモデル
124…道路照明ランプモデル 131〜142…光点テクスチャ
144…光点テクスチャテーブル 146…3Dモデル指定テーブル
148…属性テーブル 150…テクスチャ指定テーブル
401…CPU 402、405…RAM
404…GS 406…レンダリングエンジン
409…IOP 900…パーソナルコンピュータ
908…ハードディスク
[0001]
BACKGROUND OF THE INVENTION
The present invention provides a texture mapping method, a recording medium, a program, and a program capable of easily attaching a texture representing a light spot such as a light onto an image (video) generated by, for example, three-dimensional computer graphics It relates to an execution device.
[0002]
[Prior art]
A conventional technique for mapping a texture such as a light spot in an image (video) generated by three-dimensional computer graphics will be described with reference to a flowchart shown in FIG.
[0003]
Note that the processing according to this flowchart is performed using a personal computer (hereinafter also referred to as a PC) in which a three-dimensional (3D) modeling tool is installed.
[0004]
First, in step S1, a desired 3D model is generated using a PC.
[0005]
Next, in step S2, similarly, a plurality of types of light spot textures are generated by the PC.
[0006]
Next, in steps S3a to S3d constituting step S3, a light spot texture mapping process and its confirmation process are performed on the 3D model generated in step S1.
[0007]
In this case, first, in step S3a, while viewing the above-mentioned 3D model and a plurality of light spot textures on the monitor, a desired light spot texture is selected from the plurality of types of light spot textures, and the selected light spot is selected. The position coordinates on the 3D model where the texture is to be mapped are input with a keyboard or the like, and the light spot texture color (RGB values) is input with the keyboard or the like.
[0008]
Next, in step S3b, a rendering process is performed in which the light spot texture selected in step S2 is mapped (pasted) to the 3D model with reference to the position coordinates and the color.
[0009]
Next, in step S3c, the rendered video is displayed on the monitor display, and visual confirmation is performed in step S3d.
[0010]
In the visual confirmation processing in step S3d, if the mapping position (applied position) or color does not like, return to step S3a again and use the keyboard or the like to input numerical values for adjusting the position coordinates and color (numerical values). Corrective action).
[0011]
In this way, the light spot mapping / confirmation process in step S3 is repeated until the result of the visual confirmation in step S3d becomes affirmative.
[0012]
[Problems to be solved by the invention]
However, the conventional light spot texture mapping method cannot visually confirm the position of the light spot until the light spot is confirmed with the actual image displayed on the screen after the rendering process in step S3b. There's a problem.
[0013]
In addition, the position coordinates of the light spot each time require numerical input work and re-input work with a keyboard or the like for a desired position on the 3D model, and if the number of light spots is large, the input work takes an enormous amount of time. There is also a problem of requiring.
[0014]
Moreover, for example, when trying to express a starry sky or a night view of a city more realistically by light spot texture processing, the number of light spots is required from several hundred to tens of thousands. In the past, it was impossible to render the texture of 1 texture in a frame time (for example, 1/60 seconds) due to hardware limitations.
[0015]
As described above, in the conventional light spot texture mapping method, it takes a lot of labor and time to specify a large number of light spots on the 3D model, and the number of textures that can be pasted due to hardware restrictions. There are also restrictions.
[0016]
The present invention has been made in consideration of such problems, and a texture mapping method, a recording medium, a program, and a program execution device capable of easily mapping a texture such as a light spot on a 3D model. The purpose is to provide.
[0017]
[Means for Solving the Problems]
The texture mapping method of the present invention is a texture mapping method in an image processing apparatus for displaying a three-dimensional image with a light spot on a monitor by executing a program by a CPU, wherein a three-dimensional model comprising polygons is the polygon If it is determined that it is a three-dimensional model that maps a light spot texture to the vertex position of The three-dimensional model After the perspective transformation, After perspective transformation Mapping a predetermined light spot texture to all the vertices of the polygon constituting the three-dimensional model, respectively (invention according to claim 1).
[0018]
The recording medium of the present invention is a recording medium on which a program executed by the CPU of an image processing apparatus that displays a three-dimensional image with a light spot on a monitor is recorded. Are determined to be a three-dimensional model for mapping a light spot texture to the vertex position of the polygon, and if it is determined to be a three-dimensional model for mapping a light spot texture, The three-dimensional model After the perspective transformation, After perspective transformation A program for executing a step of mapping a predetermined light spot texture to all vertices of a polygon constituting the three-dimensional model is recorded (the invention according to claim 3).
[0019]
The program according to the present invention is a program executed by a CPU of an image processing apparatus that displays a three-dimensional image with a light spot on a monitor, wherein a three-dimensional model composed of polygons is displayed on the CPU by the vertex positions of the polygons. If it is determined that it is a three-dimensional model for mapping a light spot texture, and if it is determined to be a three-dimensional model for mapping a light spot texture, The three-dimensional model After the perspective transformation, After perspective transformation And a step of mapping a predetermined light spot texture to all the vertices of the polygon constituting the three-dimensional model (the invention according to claim 5).
[0020]
The image processing apparatus according to the present invention is an image processing apparatus for displaying a three-dimensional image with a light spot on a monitor by executing a program by a CPU, wherein a three-dimensional model composed of polygons is positioned at the vertex positions of the polygons. When it is determined that it is a three-dimensional model for mapping the light spot texture, and when it is determined that it is a three-dimensional model for mapping the light spot texture, The three-dimensional model After the perspective transformation, After perspective transformation And a means for mapping a predetermined light spot texture to all vertices of the polygon constituting the three-dimensional model (the invention according to claim 7).
[0021]
According to the present invention, it is possible to specify that the texture is arranged (drawn) at each vertex of each polygon constituting the 3D model, so that the texture can be automatically mapped on the 3D model.
[0022]
In the present invention, the three-dimensional model designation step (means) and the texture designation step (means) specify, for example, a texture mapping for one type of texture or for all three-dimensional models on the screen. When doing so, the order can be changed.
[0023]
In the present invention, the texture color, transparency, etc. can be automatically designated by designating the attribute of the texture color to be arranged at each vertex.
[0024]
By designating the color, the texture is not limited to the light spot, and it is possible to map various textures such as cloud clouds, leaves of trees, fluff of dandelions, and the like.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the accompanying drawings.
[0026]
FIG. 1 shows a schematic appearance of a program execution / development system 10 to which an embodiment of the present invention is applied.
[0027]
The program execution / development system 10 is a program execution / development apparatus (including both functions of a program execution apparatus and a program development apparatus) that is a main body that can also be used as an entertainment apparatus having a function of executing various programs. 12, a memory card 14 that is a card-type external storage device (external memory) that is detachable from the program execution / development apparatus 12, and a connector 15 that is detachable from the program execution / development apparatus 12. Output from the operation device (controller) 16, the keyboard 52 and mouse 56 that are input devices for data input, designation input, command input, etc., the color printer 54 that is an image output device, and the program execution / development device 12. This is a color display that is supplied with video and audio signals. Consisting essentially of from 18 other Metropolitan.
[0028]
As shown in FIG. 1, the program execution / development apparatus 12 has a shape in which flat rectangular parallelepipeds are stacked, and a disc on which an optical disc 20 as a program / data recording medium is mounted on the front panel. A disc tray 22 that can be moved back and forth as a mounting unit, a reset switch 24 for arbitrarily resetting a program currently being executed, an open button 26 for pulling out the disc tray 22, and two memory cards 14 There are disposed one insertion port 30, two controller terminals 32 into which the connector 15 of the controller 16 is inserted, a USB connector into which the keyboard 52 and the color printer 54 are inserted, and the like.
[0029]
On the rear panel side, there are disposed a power switch 28 and an AV multi-output terminal (not shown) which is an output terminal for video and audio, and is connected to the monitor 18 via an AV (audio visual) cable. The keyboard 52 is provided with a USB connector for connecting a mouse 56.
[0030]
When used as an entertainment device, the program execution / development device 12 reads the program from the optical disc 20 that is a recording medium such as a CDROM or DVDROM in which a program or data of a computer game (video game) is recorded, and executes it. In addition to the control function for displaying characters and scenes on the monitor 18, various control functions such as movie playback using a DVD (digital video disk) which is another optical disk 20 and music playback using a CDDA (compact disk digital audio) are provided. Built in. It also has a function of executing a program obtained by communication via a communication network or the like. During the execution of the program, a three-dimensional computer graphics image sequentially generated by the program execution / development device 12 is displayed on the monitor 18 as a display device.
[0031]
In this case, a signal from the controller 16 having various operation buttons and operation keys is also processed by one of the control functions of the program execution / development apparatus 12, and the content thereof is, for example, the movement of the character on the screen of the monitor 18. This is reflected in scene switching.
[0032]
Next, the internal configuration and general operation of the program execution / development system 10 shown in FIG. 1 will be described with reference to the block diagram of FIG.
[0033]
A RAM 402 and a bus 403 as semiconductor memories are connected to the CPU 401 serving as a core. A graphic synthesizer (GS) 404 and an input / output processor (IOP) 409 are connected to the bus 403, respectively. The GS 404 includes a RAM 405 including a frame buffer, a Z buffer, a texture memory, and the like, and a rendering engine 406 having a rendering function including a drawing function for the frame buffer in the RAM 405.
[0034]
A monitor 18 as an external device is connected to the GS 404 configured as described above via an encoder 407 for converting, for example, a digital RGB signal or the like into an NTSC standard television system or the like. The monitor 18 is a monitor that directly converts a digital RGB signal into a video signal when used as the program execution / development apparatus 12.
[0035]
The IOP 409 includes a driver (DRV) 410 for reproducing and decoding data recorded on the optical disc 20, a sound processor (SP) 412, a memory card 14 as an external memory including a flash memory, a controller 16, and a keyboard 52. A color printer 54, a mouse 56, a hard disk 58 on which a three-dimensional modeling tool is installed, and a ROM 416 on which an operating system or the like is recorded are connected to each other. The SP 412 is connected to a speaker 414 and a monitor 18 as external devices via an amplifier 413, and supplies an audio signal.
[0036]
Here, the memory card 14 is a card type external storage device composed of, for example, a CPU or a gate array and a flash memory, and is connected to the program execution / development device 12 shown in FIG. It is detachable. A state of the game is memorized, and a DVD playback program or the like is memorized.
[0037]
The controller 16 is for giving a command (binary command or multi-value command) input to the program execution / development apparatus 12 by pressing a plurality of buttons. The driver 410 includes a decoder for decoding an image encoded based on the MPEG (moving picture experts group) standard.
[0038]
The CPU 401 described above has a three-dimensional computer graphics coordinate calculation performance of 66 million polygons / second with a clock frequency of 300 MHz.
[0039]
The GS 404 is a parallel drawing processor with a built-in RAM (DRAM) 405, which has a clock frequency of 150 MHz, a maximum number of display colors of 32 bits (RGB and A (addition rate during semi-transparent addition) each 8 bits), hidden surface processing, and the like. Z-buffer 32 bits for automatically performing, other image processing functions such as texture mapping, alpha blending (translucent addition) function, bi-trilinear filtering function, polygon rendering performance of 75 million per second, etc. Yes.
[0040]
Next, how the 3D image is displayed on the monitor 18 by the operation of the controller 16 will be described. It is assumed that object data including polygon vertex data, texture data, and the like recorded on the optical disc 20 is read via the driver 410 and held in the RAM 402 of the CPU 401.
[0041]
When an instruction from the player who is a user is input to the program execution / development apparatus 12 via the controller 16, the CPU 401 determines the position of the object (three-dimensional object) on the three-dimensional (3D) based on the instruction, Calculate the orientation with respect to the viewpoint. As a result, the polygon vertex data of the object defined by the coordinate values of the three orthogonal axes X, Y, and Z are changed. The polygon vertex data after the change is converted into two-dimensional coordinate data by a perspective conversion process.
[0042]
A region designated by two-dimensional coordinates is a so-called polygon. The converted two-dimensional coordinate data, Z data, and texture data are supplied to the GS 404. The GS 404 performs rendering based on the converted two-dimensional coordinate data and Z data, and performs rendering processing by sequentially writing (drawing) texture data on a RAM 405 (in this case, a frame buffer) as a memory. The texture data to be drawn is supplied to the monitor 18 after the image for one frame completed by the drawing process is encoded by the encoder 407, and is displayed as an image on the screen.
[0043]
Next, FIG. 3 shows a personal computer (PC) 900 installed with a 3D modeling tool.
[0044]
The PC 900 includes a CPU 902 as a control unit, a ROM 904 as a memory, a RAM 906 as a memory, a hard disk drive 908 as a memory (also referred to as a hard disk 908 because it becomes complicated), a CD drive (CDD) 910 for reading a CDROM and the like. , A main body 914 having a DVD drive (DVDD) 912 for reading a DVDROM and the like, a monitor 916 connected to the main body 914, a keyboard 918, a mouse 920, and a color printer 922.
[0045]
Here, as the 3D modeling tool installed in the hard disk 908, software such as the product name “MAYA” manufactured by Wavefront (Wavefront), which is widely used, can be used.
[0046]
That is, the 3D modeling tool has a function of generating a solid figure using a mouse 920, a keyboard 918, and the like, a wire frame display function, a camera setting function, a rendering function, and the like, and easily generates a 3D model as an object. be able to.
[0047]
In general, a 3D model (3D model data) such as a character object or a building object is created by a designer using the PC 900, and the created 3D model (3D model data) or the like is used. The programmer uses the program execution / development system 10 and, if necessary, the PC 900 to complete the game program and the like. The three-dimensional model data created by the PC 900 is converted into data on the program execution / development system 10 on the PC 900, and is recorded on the program execution / development apparatus 12 by a recording medium (such as the optical disk 20, eg, CDR, DVDRAM). Or via a network. The PC 900 and the program execution / development system 10 can be connected to a network via a LAN.
[0048]
The program execution / development system 10 and the PC 900 according to this embodiment are basically configured and operate as described above. Next, the texture mapping function will be described with reference to the flowchart of FIG. explain. In this embodiment, the light spot texture mapping function will be described. However, the texture is not limited to the light spot texture by appropriately setting the color (RGB value), transparency, etc., but the cloud lump texture, the leaf texture, and It can be applied to any kind of texture mapping, such as dandelion fluff texture.
[0049]
In the texture mapping function described below, steps S12, S13, S14, S15, and S21 can be stored in the hard disk 58 as a library that is a versatile program.
[0050]
First, in step S11, a desired 3D model (3D model data) is generated using the PC 900. FIG. 5 schematically shows the created 3D model (wireframe model) 100.
[0051]
The 3D model 100 includes a building model 106 with a parasol model 104 attached to the tip of a columnar model 102, a building model 112 composed of a lower columnar model 108 and an upper columnar model 110, a road model 114, a tail lamp model. A vehicle model 118 with 116, a road illumination lamp model 124 including a pole model 120 and a light model 122, and a triangular pillar-shaped building model 126 are included. The vertex coordinates (x, y, z) of each polygon constituted by the wire frame in the 3D model 100 are automatically generated by the 3D modeling tool.
[0052]
Next, in step S12, a plurality of types of light spot textures are generated by the PC 900 or the program execution / development apparatus 12. Here, it is assumed that the light spot texture is generated by the program execution / development apparatus 12.
[0053]
FIG. 6 is a schematic diagram of various generated light spot textures. As can be understood from FIG. 6, here, each of the four sizes (sizes b1, b2, b3, b4) and the shapes are circular, diamond, and star (shapes a1, a2, a3). The light spot textures 131 to 142 are generated and stored as a light spot texture table (texture storage means) 144 in a predetermined area of the hard disk 58 as shown in FIG.
[0054]
Next, in step S13, a 3D model for light spot texture mapping (setting) is generated or designated. That is, in this step S13, a 3D model for which a texture is to be arranged (drawn or mapped) at the vertex of each polygon is designated.
[0055]
In this case, a schematic diagram of the 3D model 100 shown in FIG. 5 and the light spot texture table 144 shown in FIG. 6 is displayed on the screen of the monitor 18. In step S13, the columnar model 102, the parasol model 104, the building model 106, the lower columnar model 108, the upper columnar model 110, the building model 112, and the road model, which are models constituting the 3D model 100, are used. 114, tail lamp model 116, car model 118, pole model 120, light model 122, road illumination lamp model 124, and building model 126, a 3D model (reference numeral) for which a light spot texture is to be added to each vertex of a polygon constituting each model Is designated as MA) by a click operation of the mouse 56 or the like. That is, when a mouse cursor (not shown) is placed on the desired 3D model MA and the mouse 56 is left-clicked, the color of only the 3D model MA changes from black to green, for example.
[0056]
Since the 3D model MA set to green is a 3D model for which a light spot texture is to be added to the vertices of each configured polygon, it can be recognized at a glance on the screen.
[0057]
Of course, by selecting a menu, it is also possible to perform batch designation of attaching light spot textures to the vertices of all polygons constituting all 3D models constituting the 3D model 100.
[0058]
FIG. 8 shows an image 153 on the monitor 18 after designating a 3D model in which a texture is to be arranged at the vertex of each polygon.
[0059]
In this embodiment, a model indicated by a dotted line in FIG. 8, that is, among the above-described models constituting the 3D model 100, the parasol model 104, the upper columnar model 110, the tail lamp model 116, the light model 122, and the building model. Reference numeral 126 denotes a 3D model MA for light spot texture mapping designated by clicking with the mouse 56. This 3D model MA is displayed in green.
[0060]
On the other hand, the models indicated by the remaining solid lines, that is, the columnar model 102, the lower columnar model 108, the road model 114, the car model 118, and the pole model 120 are not designated as the 3D model MA for light spot texture mapping. Model (if the code is MB, it can be schematically represented as 100 = MA + MB). The 3D model MB is displayed in black.
[0061]
That is, in the image 153 on the screen of the monitor 18, the 3D model MA indicated by the dotted line in which the light spot textures 131 to 142 are arranged (mapped) at the vertex is green, and the light spot texture indicated by the solid line is not mapped. MB is displayed in black or the like. This display can be similarly performed on the monitor 916 in the PC 900.
[0062]
Further, in FIG. 8, the left pyramid-shaped building model 128 of the two building models 126 and 128 is newly generated in step S13, and the light spot texture mapping for which the light spot texture mapping is designated. 3D model MA is shown. Note that functions such as copying of the 3D model are installed in the hard disk 58 of the program execution / development apparatus 12 and can be performed by the program execution / development apparatus 12.
[0063]
As described above, in step S13, the light spot texture mapping 3D model MA is newly generated, or the light spot texture mapping 3D model MA is designated for the already generated 3D model 100. Is possible.
[0064]
The designated light spot texture mapping 3D model MA is recorded as a 3D model designation table 146 in a predetermined area of the hard disk 58, as shown in FIG. That is, the 3D model designation table 146 is data that indicates which polygon vertices constituting the 3D model 100 are to be mapped with the texture. Note that various data in the hard disk 58 are transferred to the RAM 402 and RAM 405 according to the progress of the game.
[0065]
Next, in step S14, the light spot texture mapping 3D model MA (the parasol model 104, the upper columnar model 110, the tail lamp model 116, the light model 122, the building models 126, 128 recorded in the 3D model designation table 146 is displayed. ), Attributes such as color (RGB value) and transparency of the light spot textures 131 to 142 to be attached to the vertices of the polygons constituting the 3D model MA (the parasol model 104, the upper columnar model 110, the tail lamp). The model 116, the light model 122, and the building models 126 and 128) are designated. Of course, the same attributes (color, transparency, etc.) can be specified collectively for the light spot texture mapping 3D model MA recorded in the 3D model specification table 146.
[0066]
The correspondence between the attribute specified in this way and the 3D model MA for light spot texture mapping is recorded in the attribute table 148 in a predetermined area of the hard disk 58. That is, the attribute table 148 is a table as data for designating the color and transparency of the texture to be placed at each vertex of each polygon constituting the designated 3D model MA.
[0067]
Next, in step S15, with reference to the light spot texture table 144, the light spot texture mapping 3D model MA (the parasol model 104, the upper columnar model 110, the tail lamp model 116, recorded in the 3D model designation table 146, The type ST of the light spot textures 131 to 142 to be attached to each vertex of each polygon constituting the light model 122 and the building models 126 and 128) is designated. Designation of the type ST of the light spot textures 131 to 142 can be performed by designating the shapes ai = a1 to a3 and the sizes bj = b1 to b4 shown in FIG. 6, but in practice this designation is shown in FIG. It can be performed by clicking a desired light spot texture among the light spot textures 131 to 142 displayed on the screen based on the light spot texture table 144 shown. The type ST can be represented by ST (ai, bj).
[0068]
Also in this case, by selecting a desired one light spot texture by default from the light spot textures 131 to 142, by using this default light spot texture, each 3D for light spot texture mapping is used. One desired light spot texture among the light spot textures 131 to 142 can be designated collectively for the model. In other words, it is not necessary to individually specify the light spot texture for each 3D model for light spot texture mapping.
[0069]
The correspondence relationship between the designated light spot texture mapping 3D model MA and the types ST of the light spot textures 131 to 141 to be added is recorded in the texture designation table 150 in a predetermined area of the hard disk 58 (see FIG. 7).
[0070]
After the preparatory process in steps S11 to S14 described above, the 3D model is subjected to perspective projection conversion. 3 The process of mapping the designated texture to each vertex of each polygon constituting the D model, that is, “designating the specified texture with reference to the vertex coordinates and attributes of each polygon constituting the designated 3D model” in step S21 shown in FIG. The CPU 401 and the GS 404 execute the texture mapping program “Paste”. The texture mapping program in step S21 can be used as a library by the program execution / development apparatus 12.
[0071]
By executing this program, the CPU 401 and the GS 404 of the program execution / development apparatus 12 that also functions as an entertainment apparatus allow the light spot texture in the hard disk 58 (the RAM 402 and the RAM 405 read and written from the hard disk 58 at this time). A rendering process is performed by the rendering engine 406 with reference to the table 144, the 3D model designation table 146, the attribute table 148, and the texture designation table 150, and a 3D image 154 that is a 3D solid model with a light spot as shown in FIG. Are drawn in the frame buffer in the RAM 405.
[0072]
The three-dimensional image 154 drawn in the frame buffer is converted into a video signal through the encoder 407 and displayed on the monitor 18 as an image (the code is the same 154).
[0073]
On the three-dimensional image 154 shown in FIG. 10, the 3D model specified in steps S13 to S15 {light spot texture mapping 3D model MA (parasol model 104, upper column model 110, tail lamp model 116, light model 122, The designated texture is displayed in the designated color and transparency at the vertex position of each polygon constituting the building model 126, 128)}.
[0074]
The three-dimensional image 154 shown in FIG. 10, the three-dimensional image shown in FIG. 5, and the three-dimensional image 153 shown in FIG. 8 can also be confirmed by outputting them as a color hard copy from the color printer 54 by still image capture. .
[0075]
In the actual game program read from the optical disc 20, an instruction list of screens to be displayed on the monitor 18 in the next frame, a so-called display list, is generated one after another by the CPU 401 and supplied to the GS 404.
[0076]
Here, as shown in the flowchart of FIG. 11, first, in step S31, the CPU 401 determines whether or not the instruction in step S21 is included in the display list. Instructs the GS 404 to refer to the texture designation table 150 (the table in which the correspondence between the designated light spot texture mapping 3D model MA and the light spot texture ST to be added is designated) in the process of step S32. .
[0077]
At this time, the 3D model 100 after perspective projection conversion shown in FIG. 5 is stored as data in the RAM 405 (see FIG. 7).
[0078]
Next, in step S33, the GS 404 refers to the light spot texture table 144 in order to draw the light spot textures 131 to 142 corresponding to the types ST of the light spot textures 131 to 142. At this time, the light spot textures 131 to 142 of the light spot texture table 144 are expanded in the RAM 405. At the same time, the GS 404 refers to the attribute table 148 to know the color and transparency.
[0079]
In step S34, the 3D model 100 drawn in the RAM 405 is referred to. In step S35, each of the 3D models MA for light spot texture mapping specified in the 3D model specification table 146 in the 3D model 100 is displayed. The texture mapping process according to this embodiment, in which the designated light spot textures 131 to 142 are mapped to each vertex of the polygon with the designated color and transparency, is automatically performed, and the rendering process is completed.
[0080]
FIG. 10 shows a screen display on the monitor 18 after such rendering processing.
[0081]
As described above, according to this embodiment, the 3D model 100 is created on the 3D modeling tool installed in the PC 900, and a desired texture in the 3D model 100 is created by the program execution / development apparatus 12. By generating a texture mapping table that is to be mapped to the vertices of each of the polygons that are formed, the coordinates and attributes of the light spot can be set visually and easily.
[0082]
That is, the program execution / development apparatus 12 automatically selects and designates a desired 3D model for which texture mapping is to be performed on the vertex of the polygon, so that the texture mapping to each vertex of each polygon constituting the 3D model MA is automatically performed. For example, it is possible to specify the coordinates and attributes of light spots in units of tens of thousands on a single frame screen, such as the night view of the city, the earth and other stars, and the city as seen from the spaceship. It is extremely suitable when applied to a night view of amusement park, a combination of night view and fireworks.
[0083]
Further, according to the embodiment described above, after the 3D model specifying step (3D model specifying means) S13 specifies the 3D model MA for which the texture is to be arranged at the vertex of each polygon, the texture specifying step (texture specifying means) ) In S15, the texture to be arranged at each designated vertex is designated. Further, in the texture mapping step (texture mapping means) S21, the designated texture is mapped to each vertex of each polygon after the designated 3D model MA is subjected to perspective projection conversion. In the texture designation step (texture designation means) S15, the texture color attribute can be designated (step S14).
[0084]
By processing in this way, it is possible to specify that a texture is arranged (drawn) at each vertex of each polygon constituting the 3D model MA, so that a huge number of textures can be mapped on the 3D model 100 very easily. be able to.
[0085]
Furthermore, according to the above-described embodiment, it is confirmed whether or not the 3D model designation table 146 that is data instructing whether or not the texture is mapped to each vertex of each polygon constituting the three-dimensional model 100 is included. If it is determined in step (steps S31, S32) and after this confirmation that the data to be instructed is included, the texture is mapped to each vertex of each polygon after the perspective projection conversion of the corresponding 3D model MA Steps (S32 to S35). By recording such a program on the optical disk 20 as a recording medium, a huge number of textures can be mapped on the 3D model 100 very easily.
[0086]
In addition, this invention is not restricted to the above-mentioned embodiment, Of course, it can take various structures, without deviating from the summary of this invention.
[0087]
【The invention's effect】
As described above, according to the present invention, it is possible to specify that a texture is mapped to each vertex of each polygon constituting the 3D model. By this designation, the texture can be easily mapped on the 3D model.
[0088]
That is, according to the present invention, a texture such as a light spot can be mapped on the 3D model very easily.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a program execution / development system to which an embodiment of the present invention is applied.
FIG. 2 is a block diagram of a program execution / development system.
FIG. 3 is a configuration diagram of a personal computer on which a 3D modeling tool is installed.
FIG. 4 is a flowchart for explaining the texture mapping operation;
FIG. 5 is a schematic diagram of a 3D wire frame model.
FIG. 6 is an explanatory diagram of a light spot texture table.
FIG. 7 is an explanatory diagram of various tables recorded on the hard disk.
FIG. 8 is an explanatory diagram of a 3D model for which texture mapping is designated.
FIG. 9 is an explanatory diagram showing the contents of a texture mapping program.
FIG. 10 is a schematic diagram of a solid 3D model subjected to texture mapping.
FIG. 11 is a flowchart for explaining an operation of texture mapping to each vertex of each polygon of a designated 3D model.
FIG. 12 is a flowchart for explaining a conventional technique.
[Explanation of symbols]
10 ... Program execution / development system 12 ... Program execution / development device
16 ... Operating device (controller) 18 ... Monitor
20 ... Optical disc 52 ... Keyboard
54 ... Color printer 56 ... Mouse
58 ... Hard disk
100 ... 3D model (wireframe model)
102 ... Columnar model 104 ... Parasol model
106, 112, 126, 128 ... building model
108 ... Lower column model 110 ... Upper column model
114 ... Road model 116 ... Tail lamp model
120 ... Pole model 122 ... Light model
124 ... Road lighting lamp model 131-142 ... Light spot texture
144 ... Light spot texture table 146 ... 3D model designation table
148 ... attribute table 150 ... texture designation table
401 ... CPU 402, 405 ... RAM
404 ... GS 406 ... Rendering engine
409 ... IOP 900 ... Personal computer
908: Hard disk

Claims (8)

CPUによりプログラムを実行することでモニタ上に光点付きの3次元画像を表示する画像処理装置におけるテクスチャマッピング方法であって、
ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、
光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをそれぞれマッピングするステップと
を備えることを特徴とするテクスチャマッピング方法。
A texture mapping method in an image processing apparatus for displaying a three-dimensional image with a light spot on a monitor by executing a program by a CPU,
Determining whether the three-dimensional model composed of polygons is a three-dimensional model that maps light spot textures to the vertex positions of the polygons;
If it is determined that it is the three-dimensional model that maps a point texture, after perspective transformation of the three-dimensional model, a predetermined spot texture to all vertices of the polygons constituting the three-dimensional model after perspective transformation A texture mapping method comprising: mapping each of the steps.
請求項1記載のテクスチャマッピング方法において、
前記判別するステップでは、予め準備された複数の光点テクスチャ中、どの光点テクスチャを選択してマッピングするのかが更に判別され、
前記マッピングするステップでは、選択された光点テクスチャを前記所定の光点テクスチャとしてマッピングする
ことを特徴とするテクスチャマッピング方法。
The texture mapping method according to claim 1,
In the determining step, it is further determined which light spot texture is selected and mapped among the plurality of light spot textures prepared in advance,
In the mapping step, the selected light spot texture is mapped as the predetermined light spot texture.
モニタ上に光点付きの3次元画像を表示する画像処理装置のCPUにより実行されるプログラムが記録された記録媒体であって、
前記CPUに、
ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、
光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをそれぞれマッピングするステップと
を実行させるためのプログラムを記録したCPU読み取り可能な記録媒体。
A recording medium on which a program executed by a CPU of an image processing apparatus that displays a three-dimensional image with a light spot on a monitor is recorded,
In the CPU,
Determining whether the three-dimensional model composed of polygons is a three-dimensional model that maps light spot textures to the vertex positions of the polygons;
If it is determined that it is the three-dimensional model that maps a point texture, after perspective transformation of the three-dimensional model, a predetermined spot texture to all vertices of the polygons constituting the three-dimensional model after perspective transformation A CPU-readable recording medium having recorded thereon a program for executing the mapping step.
請求項3記載の記録媒体において、
前記判別するステップでは、予め準備された複数の光点テクスチャ中、どの光点テクスチャを選択してマッピングするのかが更に判別され、
前記マッピングするステップでは、選択された光点テクスチャを前記所定の光点テクスチャとしてマッピングする
ことを特徴とする記録媒体。
The recording medium according to claim 3,
In the determining step, it is further determined which light spot texture is selected and mapped among the plurality of light spot textures prepared in advance,
In the mapping step, the selected light spot texture is mapped as the predetermined light spot texture.
モニタ上に光点付きの3次元画像を表示する画像処理装置のCPUにより実行されるプログラムであって、
前記CPUに、
ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別するステップと、
光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをマッピングするステップと
を実行させるためのプログラム。
A program executed by a CPU of an image processing apparatus that displays a three-dimensional image with a light spot on a monitor,
In the CPU,
Determining whether the three-dimensional model composed of polygons is a three-dimensional model that maps light spot textures to the vertex positions of the polygons;
If it is determined that it is the three-dimensional model that maps a point texture, after perspective transformation of the three-dimensional model, a predetermined spot texture to all vertices of the polygons constituting the three-dimensional model after perspective transformation A program for executing the mapping step.
請求項5記載のプログラムにおいて、
前記判別するステップでは、予め準備された複数の光点テクスチャ中、どの光点テクスチャを選択してマッピングするのかが更に判別され、
前記マッピングするステップでは、選択された光点テクスチャを前記所定の光点テクスチャとしてマッピングする
ことを特徴とするプログラム。
The program according to claim 5,
In the determining step, it is further determined which light spot texture is selected and mapped among the plurality of light spot textures prepared in advance,
In the mapping step, the selected light spot texture is mapped as the predetermined light spot texture.
CPUによりプログラムを実行することでモニタ上に光点付きの3次元画像を表示する画像処理装置であって、
ポリゴンからなる3次元モデルが、前記ポリゴンの頂点位置に光点テクスチャをマッピングする3次元モデルであるかどうかを判別する手段と、
光点テクスチャをマッピングする3次元モデルであると判別した場合には、該3次元モデルを透視変換した後、透視変換後の3次元モデルを構成するポリゴンの全ての頂点に所定の光点テクスチャをマッピングする手段と
を備えることを特徴とする画像処理装置。
An image processing apparatus that displays a three-dimensional image with a light spot on a monitor by executing a program by a CPU,
Means for determining whether or not the three-dimensional model made of polygons is a three-dimensional model that maps light spot textures to vertex positions of the polygons;
If it is determined that it is the three-dimensional model that maps a point texture, after perspective transformation of the three-dimensional model, a predetermined spot texture to all vertices of the polygons constituting the three-dimensional model after perspective transformation An image processing apparatus comprising: a mapping unit.
請求項7記載の画像処理装置において、
前記判別する手段では、予め準備された複数の光点テクスチャ中、どの光点テクスチャを選択してマッピングするのかが更に判別され、
前記マッピングする手段では、選択された光点テクスチャを前記所定の光点テクスチャとしてマッピングする
ことを特徴とする画像処理装置。
The image processing apparatus according to claim 7.
The discriminating means further discriminates which light spot texture to select and map among a plurality of light spot textures prepared in advance,
The image processing apparatus, wherein the mapping means maps the selected light spot texture as the predetermined light spot texture.
JP2001062195A 2000-03-08 2001-03-06 Texture mapping method, recording medium, program, and program execution device Expired - Fee Related JP3735535B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001062195A JP3735535B2 (en) 2000-03-08 2001-03-06 Texture mapping method, recording medium, program, and program execution device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2000-64226 2000-03-08
JP2000064226 2000-03-08
JP2001062195A JP3735535B2 (en) 2000-03-08 2001-03-06 Texture mapping method, recording medium, program, and program execution device

Publications (2)

Publication Number Publication Date
JP2001325604A JP2001325604A (en) 2001-11-22
JP3735535B2 true JP3735535B2 (en) 2006-01-18

Family

ID=26587065

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001062195A Expired - Fee Related JP3735535B2 (en) 2000-03-08 2001-03-06 Texture mapping method, recording medium, program, and program execution device

Country Status (1)

Country Link
JP (1) JP3735535B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5093778B2 (en) * 2008-05-28 2012-12-12 サミー株式会社 Image generating apparatus, game machine, and program

Also Published As

Publication number Publication date
JP2001325604A (en) 2001-11-22

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
JP3668019B2 (en) Recording medium, image processing apparatus, and image processing method
EP1350545B1 (en) Game machine and game program
US6724385B2 (en) Method of replaying game, recording medium, program, and entertainment system
US6778948B1 (en) Method of creating a dynamic image, storage medium and program executing apparatus
JP3433918B2 (en) Game system, display image forming method in game system, and computer-readable recording medium storing game program
US7062157B2 (en) Method and system for modifying a displayed symbolic image based on the accuracy of an input geometric shape
US20010023201A1 (en) Method of replaying game, recording medium, program, and entertainment system
US6646642B1 (en) Method of creating image frames, storage medium and apparatus for executing program
JP2001307126A (en) Method and device for plotting image, recording medium and program
CA2363175A1 (en) System for and method of implementing refraction mapping
JP3369159B2 (en) Image drawing method, image drawing apparatus, recording medium, and program
US6686919B1 (en) Method of creating image frames, storage medium and program executing apparatus
US7053906B2 (en) Texture mapping method, recording medium, program, and program executing apparatus
JP4714763B2 (en) Image processing program, image processing apparatus, and image control method
JP3735535B2 (en) Texture mapping method, recording medium, program, and program execution device
JP3706545B2 (en) Image generation method and program used therefor
JP3494974B2 (en) Computer-readable recording medium recording virtual object display program, and display control apparatus and method
EP1085404A2 (en) Method for selecting a display object, storage medium and program executing apparatus
JP2006289118A (en) Image processing method, image processing system and recording medium
JP2002259959A (en) Image generating method, image generating device, recording medium and program
JP3437166B2 (en) 3D image processing method, apparatus thereof, computer-readable recording medium recording 3D image processing program, and video game apparatus
EP1085471A2 (en) Method of creating a dynamic image, storage medium and program executing apparatus
JP2002074385A (en) Method and device for providing logic coupling for operating n alphas inside graphic system
JP2002245481A (en) Method and device for image drawing, recording medium, and program

Legal Events

Date Code Title Description
A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051024

R150 Certificate of patent or registration of utility model

Ref document number: 3735535

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20091028

Year of fee payment: 4

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: 20101028

Year of fee payment: 5

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: 20111028

Year of fee payment: 6

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: 20121028

Year of fee payment: 7

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: 20131028

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees