JP4592043B2 - Image generation system, program, and information storage medium - Google Patents

Image generation system, program, and information storage medium Download PDF

Info

Publication number
JP4592043B2
JP4592043B2 JP2001081317A JP2001081317A JP4592043B2 JP 4592043 B2 JP4592043 B2 JP 4592043B2 JP 2001081317 A JP2001081317 A JP 2001081317A JP 2001081317 A JP2001081317 A JP 2001081317A JP 4592043 B2 JP4592043 B2 JP 4592043B2
Authority
JP
Japan
Prior art keywords
particle
primitive
polygons
drawing order
areas
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
JP2001081317A
Other languages
Japanese (ja)
Other versions
JP2002279446A (en
Inventor
繁 橘高
明子 若林
直宏 斎藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Namco Ltd
Bandai Namco Entertainment Inc
Original Assignee
Namco Ltd
Namco Bandai Games Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Ltd, Namco Bandai Games Inc filed Critical Namco Ltd
Priority to JP2001081317A priority Critical patent/JP4592043B2/en
Publication of JP2002279446A publication Critical patent/JP2002279446A/en
Application granted granted Critical
Publication of JP4592043B2 publication Critical patent/JP4592043B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6638Methods for processing data by generating or executing the game program for rendering three dimensional images for simulating particle systems, e.g. explosion, fireworks

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像生成システム、プログラム及び情報記憶媒体に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
従来より、仮想的な3次元空間であるオブジェクト空間内において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。ロールプレイングゲーム(RPG)を楽しむことができる画像生成システムを例にとれば、プレーヤは、自身の分身であるキャラクタ(オブジェクト)を操作してオブジェクト空間内のマップ上で移動させ、敵キャラクタと対戦したり、他のキャラクタと対話したり、様々な町を訪れたりすることでゲームを楽しむ。
【0003】
さて、このような画像生成システムでは、プレーヤの仮想現実感の向上のために、よりリアルな画像を生成することが重要な課題になっている。従って、ゲーム中に発生する炎や煙などの不定形な表示物についても、リアルな画像で表現できることが望まれる。
【0004】
そして、このような炎などの不定形な表示物を表現する手法としては、以下に述べるような手法が考えられる。
【0005】
第1の手法では、炎の絵のテクスチャがマッピングされた炎ポリゴンを用いて、炎を表現する。
【0006】
しかしながら、この第1の手法では、種々の方向から炎ポリゴンを見た場合に、炎ポリゴンの形状が平面的であることがプレーヤに知られてしまい、プレーヤの仮想現実感を減退させてしまう。
【0007】
第2の手法では、いわゆるパーティクルシステムを用いる。即ち、位置や色などの属性情報を持ち所与の規則に従って発生、移動、消滅する炎パーティクルの集合により、不定形な形の炎を表現する。
【0008】
しかしながら、このようなパーティクルシステムには、画像生成システムの処理負荷が非常に重くなるという欠点がある。
【0009】
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、表示物のリアルな画像を少ない処理負荷で生成できる画像生成システム、プログラム及び情報記憶媒体を提供することにある。
【0010】
【課題を解決するための手段】
上記課題を解決するために、本発明は、画像生成を行う画像生成システムであって、第1〜第Nのプリミティブ面を含むオブジェクトを、オブジェクト空間に設定する手段と、前記オブジェクトが含む前記第1〜第Nのプリミティブ面の中の少なくとも1つのプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、前記第1〜第Nのプリミティブ面についての描画順序を決定する手段と、決定された描画順序で前記第1〜第Nのプリミティブ面を描画する手段とを含むことを特徴とする。また本発明に係るプログラムは、コンピュータにより使用可能なプログラム(情報記憶媒体又は搬送波に具現化されるプログラム)であって、上記手段をコンピュータに実現させる(上記手段としてコンピュータを機能させる)ことを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能(使用可能)な情報記憶媒体であって、上記手段をコンピュータに実現させる(上記手段としてコンピュータを機能させる)ためのプログラムを含むことを特徴とする。
【0011】
本発明によれば、第1〜第Nのプリミティブ面を含むオブジェクトがオブジェクト空間に設定(配置)され、このオブジェクト空間において仮想カメラから見える画像が生成される。
【0012】
そして本発明によれば、オブジェクトのプリミティブ面と仮想カメラの向きとの相対的な方向関係(角度又は内積値等)に応じて、第1〜第Nのプリミティブ面についての描画順序(ソート順序)が決定され、決定された描画順序で第1〜第Nのプリミティブ面が描画される。
【0013】
このように本発明では、プリミティブ面と仮想カメラの向きとの相対的な方向関係を判断するだけで、プリミティブ面の描画順序を決定できる。従って、奥行き値等に基づいて描画順序を決定する手法に比べて、格段に少ない処理負荷でプリミティブ面の描画順序を決定できるようになる。
【0014】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記第1〜第Nのプリミティブ面がα合成されながら前記描画順序で描画されることを特徴とする。
【0015】
このようにすれば、プリミティブ面の矛盾の無いα合成処理を実現できる。
【0016】
なお、プリミティブ面に設定するα値についても、プリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて決定してもよい。
【0017】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記オブジェクトが、前記第1〜第Nのプリミティブ面に交差する第Jのプリミティブ面を含み、前記第Jのプリミティブ面が先に描画された後に、前記第1〜第Nのプリミティブ面が描画されることを特徴とする。
【0018】
このようにすれば、第Jのプリミティブ面については描画順序を決定する処理が不要になり、処理負荷を軽減できる。
【0019】
なお、この場合に、複数の第1〜第Nのプリミティブ面が基準線から放射状に配置される構成のオブジェクトを採用してもよい。また、第Jのプリミティブ面は、第1〜第Nのプリミティブ面の端辺に接するように交差してもよいし、第1〜第Nのプリミティブ面の上端辺と下端辺の中間で交差するようにしてもよい。
【0020】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記第1〜第Nのプリミティブ面が基準線から放射状に配置され、前記第1〜第Nのプリミティブ面により区分けされる第1〜第Mのパーティクル・エリアにおいて、所与の寿命で消滅する複数のパーティクル・プリミティブを発生させることを特徴とする。
【0021】
このようにすれば、単にプリミティブ面だけでオブジェクトを構成する場合に比べて、よりボリューム感があり、立体的に見える表示物を表現できるようになる。
【0022】
また本発明は、画像生成を行う画像生成システムであって、第1〜第Mのパーティクル・エリアの各パーティクル・エリアにおいて、所与の寿命で消滅する複数のパーティクル・プリミティブを発生させる処理を行う手段と、前記第1〜第Mのパーティクル・エリアについての描画順序を決定する手段と、描画順序の優先度の高いパーティクル・エリアから順に、該パーティクル・エリアで発生したパーティクル・プリミティブを描画する手段とを含むことを特徴とする。また本発明に係るプログラムは、コンピュータにより使用可能なプログラム(情報記憶媒体又は搬送波に具現化されるプログラム)であって、上記手段をコンピュータに実現させる(上記手段としてコンピュータを機能させる)ことを特徴とする。
また本発明に係る情報記憶媒体は、コンピュータにより読み取り可能(使用可能)な情報記憶媒体であって、上記手段をコンピュータに実現させる(上記手段としてコンピュータを機能させる)ためのプログラムを含むことを特徴とする。
【0023】
本発明によれば、例えば第Iのパーティクル・エリアの描画順序の優先度が最も高い場合には、まず、第Iのパーティクル・エリアで発生したパーティクル・プリミティブについての描画が行われる。そして、その後に、次に描画順序の優先度が高いパーティクル・エリアで発生したパーティクル・プリミティブについての描画が行われるようになる。
【0024】
このようにすれば、全てのパーティクル・プリミティブを一度にソートして描画する手法に比べて、描画順序の決定処理の負荷を格段に軽減できる。
【0025】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記第1〜第Mのパーティクル・エリアを区分けする第1〜第Nのプリミティブ面の中の少なくとも1つのプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、前記第1〜第Mのパーティクル・エリアについての描画順序、或いは前記第1〜第Mのパーティクル・エリア及び前記第1〜第Nのプリミティブ面についての描画順序が決定されることを特徴とする。
【0026】
このようにすれば、プリミティブ面と仮想カメラの向きとの相対的な方向関係を判断するだけで、パーティクル・エリアやプリミティブ面についての描画順序を決定できる。従って、奥行き値等に基づいて描画順序を決定する手法に比べて、格段に少ない処理負荷でパーティクル・エリアやプリミティブ面の描画順序を決定できるようになる。
【0027】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、前記第1〜第Mのパーティクル・エリアの中の第L(1≦L≦M)のパーティクル・エリアで発生したパーティクル・プリミティブが、該第Lのパーティクル・エリア内で移動するように、その移動が制限されることを特徴とする。
【0028】
このようにすれば、第Lのパーティクル・エリアで発生したパーティクル・プリミティブが、他のパーティクル・エリアに進入してしまう事態を防止でき、誤った描画順序でパーティクル・プリミティブが描画されてしまう不具合を防止できる。
【0029】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体は、パーティクル・プリミティブの初期速度及び寿命の少なくとも一方の制御により、パーティクル・プリミティブの移動を制限することを特徴とする。
【0030】
このようにすれば、初期速度や寿命を制限するだけという負荷の少ない処理で、パーティクル・プリミティブの移動を制限できるようになる。
【0031】
なお本発明では、第1〜第Nのプリミティブ面を含むオブジェクトを、オブジェクト空間に設定し、前記オブジェクトが含む前記第1〜第Nのプリミティブ面の中の少なくとも1つのプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、前記第1〜第Nのプリミティブ面の描画順序を決定し、決定された描画順序で前記第1〜第Nのプリミティブ面を描画するようにしてもよい。
【0032】
【発明の実施の形態】
以下、本実施形態について図面を用いて説明する。
【0033】
なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を何ら限定するものではない。また本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。
【0034】
1.構成
図1に、本実施形態の画像生成システム(ゲームシステム)の機能ブロック図の一例を示す。なお同図において本実施形態は、少なくとも処理部100を含めばよく(或いは処理部100と記憶部170を含めばよく)、それ以外のブロックについては任意の構成要素とすることができる。
【0035】
操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、マイク、或いは筺体などのハードウェアにより実現できる。
【0036】
記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどのハードウェアにより実現できる。
【0037】
情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などのハードウェアにより実現できる。処理部100は、この情報記憶媒体180に格納されるプログラム(データ)に基づいて本発明(本実施形態)の種々の処理を行う。即ち情報記憶媒体180には、本発明(本実施形態)の手段(特に処理部100に含まれるブロック)をコンピュータに実現(実行、機能)させるためのプログラムが格納され、このプログラムは、例えば1又は複数のモジュール(オブジェクト指向におけるオブジェクトも含む)を含む。
【0038】
なお、情報記憶媒体180に格納される情報の一部又は全部は、システムへの電源投入時等に記憶部170に転送されることになる。また情報記憶媒体180には、本発明の処理を行うためのプログラム、画像データ、音データ、表示物の形状データ、本発明の処理を指示するための情報、或いはその指示に従って処理を行うための情報などを含ませることができる。
【0039】
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、或いはHMD(ヘッドマウントディスプレイ)などのハードウェアにより実現できる。
【0040】
音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカなどのハードウェアにより実現できる。
【0041】
携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などを考えることができる。
【0042】
通信部196は、外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ、或いは通信用ASICなどのハードウェアや、プログラムなどにより実現できる。
【0043】
なお本発明(本実施形態)の各手段を実現(実行、機能)するためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180に配信するようにしてもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含まれる。
【0044】
処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの各種の処理を行う。この場合、処理部100は、記憶部170内の主記憶部172をワーク領域として使用して、各種の処理を行う。
【0045】
ここで、処理部100が行う処理としては、コイン(代価)の受け付け処理、各種モードの設定処理、ゲームの進行処理、選択画面の設定処理、オブジェクト(1又は複数のプリミティブ)の位置や回転角度(X、Y又はZ軸回り回転角度)を求める処理、オブジェクトを動作させる処理(モーション処理)、視点の位置(仮想カメラの位置)や視線角度(仮想カメラの回転角度)を求める処理、マップオブジェクトなどのオブジェクトをオブジェクト空間へ配置する処理、ヒットチェック処理、ゲーム結果(成果、成績)を演算する処理、複数のプレーヤが共通のゲーム空間でプレイするための処理、或いはゲームオーバー処理などを考えることができる。
【0046】
処理部100は、オブジェクト空間設定部110、α値設定部112、パーティクル処理部114、描画順序決定部116(ソート部)、描画部120を含む。なお、処理部100に、これらの全ての機能ブロック110〜120を含ませる必要はなく、一部の機能ブロックを省略する構成にしてもよい。
【0047】
ここでオブジェクト空間設定部110は、マップなどの各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間内に設定(配置)するための処理を行う。より具体的には、ワールド座標系でのオブジェクトの位置や回転角度(方向)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転)でオブジェクトを配置する。
【0048】
そして本実施形態のオブジェクト空間設定部110は、基準線から放射状に配置された複数のプリミティブ面(ポリゴン、自由曲面又はサブディビジョンサーフェス等)を含むオブジェクト(交差する複数のプリミティブ面で構成されるオブジェクト)をオブジェクト空間に設定配置している。本実施形態では、このような形状のオブジェクトを用いて、例えば炎、煙などの不定形な表示物のリアルな表現に成功している。
【0049】
なお、このオブジェクトに、放射状に配置された複数のプリミティブ面に交差するプリミティブ面(ベース・プリミティブ面。広義には第Jのプリミティブ面。以下の説明でも同様)を含ませてもよい。このようなプリミティブ面を設けることで、オブジェクトを上方向から見た場合にも、一定の面積を占める画像が表示されるようになり、生成される画像のリアル度を増すことができる。
【0050】
α値設定部112は、オブジェクトが含む1又は複数のプリミティブ面と仮想カメラの向き(例えば視線方向)との相対的な方向関係(プリミティブ面の向きと仮想カメラの向きの相対的な関係であり、これらの向きのなす角度や、これらの向きにより得られる内積値や、これらの角度、内積値と数学的に均等なパラメータ等により判断される関係)に応じて、プリミティブ面のα値を設定する。
【0051】
より具体的には、例えば、仮想カメラの向きを表すベクトル(向きを表す3次元ベクトルでもよいし、この3次元ベクトルを所与の平面に投影した2次元ベクトルでもよい)と、プリミティブ面の向きを表すベクトル(プリミティブ面に沿った方向のベクトルでもよいし、プリミティブ面に直交するベクトルでもよい。また3次元ベクトルでもよいし、2次元ベクトルでもよい)とのなす角度(これらのベクトルの内積値)に基づいてα値を求め、このα値を、代表α値としてプリミティブ面自体に与えたり、或いは頂点α値としてプリミティブ面の頂点に与える。
【0052】
この場合に本実施形態では、オブジェクトのプリミティブ面(プリミティブ面に平行なベクトル)と仮想カメラの向き(視線方向)とが平行になるにつれて、そのプリミティブ面がより透明になるようなα値を、そのプリミティブ面に設定する。別の言い方をすれば、オブジェクトのプリミティブ面と仮想カメラの向きとが直交するにつれて、そのプリミティブ面がより不透明になるようなα値を、そのプリミティブ面に設定する。
【0053】
なお、α値(A値)は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。
【0054】
パーティクル処理部114は、その形状が変形する不定形な表示物(例えば炎、煙、水、爆発)を表現するためのパーティクル・プリミティブ(例えば炎パーティクルや煙パーティクルのプリミティブ)を、時間経過に伴い順次発生させたり、移動させたり、消滅させたりする処理を行う。より具体的には、パーティクル・プリミティブの発生量、発生位置、移動状態(速度、加速度等)又は寿命等をランダムに変化させる処理を行う。これにより、炎などの不定形な表示物もリアルに表現できる。
【0055】
そして本実施形態のパーティクル処理部114は、複数のパーティクル・エリア(パーティクル存在エリア)の各パーティクル・エリアにおいて、所与の寿命に消滅する複数のパーティクル・プリミティブを発生させる処理を行う。また、これらのパーティクル・プリミティブが、発生したパーティクル・エリアの外に出ないように、その移動を制限するための処理も行う。
【0056】
なお、基準線から放射状に配置された複数のプリミティブ面でオブジェクトが構成される場合には、これらのプリミティブ面を用いて、パーティクル・エリアを区分けすることができる。
【0057】
また、パーティクル・プリミティブは、炎や煙などの絵のテクスチャがマッピングされたプリミティブ面(スプライトポリゴン)で表現してもよいし、プリミティブ点やプリミティブ線などで表現してもよい。
【0058】
描画順序決定部116は、オブジェクトが含む1又は複数のプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、オブジェクトのプリミティブ面についての描画順序を決定する。そして、決定された描画順序でプリミティブ面をソートする。また描画順序決定部116は、上述のパーティクル・エリアについての描画順序も決定する。
【0059】
この場合に、プリミティブ面と仮想カメラの向きとの相対的な方向関係(内積値)がα値設定部112により求められていている場合には、この求められた相対的な方向関係(内積値)に基づいて、プリミティブ面やパーティクル・エリアについての描画順序を決定することが望ましい。このようにすることで、処理負荷を軽減できる。
【0060】
また、基準線から放射状に配置された複数のプリミティブ面を含むオブジェクトが複数ある場合には、これらの複数のオブジェクトの描画順序についても描画順序決定部116が決定する。より具体的には、例えばZソート法(奥行き値によるソート)により、これらのオブジェクトをソートする。
【0061】
描画部120は、処理部100で行われる種々の処理の結果に基づいて画像の描画処理を行う。例えば、いわゆる3次元画像を生成する場合には、まず、座標変換、クリッピング処理、透視変換、或いは光源計算等のジオメトリ処理が行われ、その処理結果に基づいて、プリミティブ面データ(プリミティブ面の頂点(構成点)の位置座標、テクスチャ座標、色(輝度)データ、法線ベクトル或いはα値等)が作成される。そして、このプリミティブ面データ(ポリゴン、自由曲面又はサブディビジョンサーフェス等のプリミティブ面のデータ。描画データ)に基づいて、ジオメトリ処理後のオブジェクト(1又は複数のプリミティブ面)の画像が、描画バッファ174(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できるバッファ)に描画される。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成されるようになる。
【0062】
そして本実施形態の描画部120は、描画順序決定部116で決定された描画順序で、オブジェクトが含むプリミティブ面(プリミティブ面データ)を描画する。
【0063】
なお、描画部120での描画処理の際には、奥行き情報(例えばZ値)が格納される奥行きバッファ(例えばZバッファ、ステンシルバッファ)を用いて、奥行き比較法(例えばZバッファ法)によりピクセル単位での陰面消去を行うことが望ましい。
【0064】
描画部120は、テクスチャマッピング部122、α合成部124を含む。
【0065】
テクスチャマッピング部122は、テクスチャ記憶部176に記憶されるテクスチャをオブジェクトにマッピングするための処理を行う。
【0066】
ここで本実施形態では、テクスチャ記憶部176が、一連の第1〜第Nの圧縮テクスチャ(第1〜第Nの圧縮フレーム画像)を含む圧縮ムービーテクスチャ(圧縮ムービー)のデータを記憶する。
【0067】
そして、図示しない伸張部が、この圧縮ムービーテクスチャのデータに基づいて伸張処理を行い、テクスチャマッピング部122が、一連の第1〜第Nの圧縮テクスチャを伸張することで得られる一連の第1〜第Nの伸張テクスチャ(第1〜第Nの伸張フレーム画像)をオブジェクトに順次マッピングするための処理を行う。
【0068】
また本実施形態では、基準線から放射状に配置された複数のプリミティブ面でオブジェクトが構成される場合に、これらの複数のプリミティブ面に対して共通のテクスチャを使用するようにしている。例えば、テクスチャ記憶部176に、一連のムービーテクスチャ(例えば炎の絵を表すムービーテクスチャ)のデータが記憶されていた場合には、オブジェクトが含む全てのプリミティブ面に対して、この一連のムービーテクスチャをマッピングするようにする。
【0069】
なお、テクスチャをマッピングする単位は、1枚のプリミティブ面であってもよいし、複数のプリミティブ面であってもよい。或いは、1枚のプリミティブ面を更に分割したプリミティブ面であってもよい。
【0070】
α合成部124は、α値(A値)に基づくα合成処理(αブレンディング、α加算又はα減算等)を行う。例えばα合成がαブレンディングである場合には下式のような合成処理が行われる。
【0071】
Q=(1−α)×R1+α×R2 (1)
Q=(1−α)×G1+α×G2 (2)
Q=(1−α)×B1+α×B2 (3)
ここで、R1、G1、B1は、描画バッファ174に既に描画されている画像(背景画像)の色(輝度)のR、G、B成分であり、R2、G2、B2は、描画バッファに描画するオブジェクト(プリミティブ)の色のR、G、B成分である。また、RQ、GQ、BQは、αブレンディングにより得られる画像の色のR、G、B成分である。
【0072】
そして本実施形態では、α合成部124が、α値設定部112によりプリミティブ面に設定されたα値に基づいてα合成処理を行う。
【0073】
より具体的には、α値設定部112が、プリミティブ面に対して、そのプリミティブ面の代表α値を設定する。そして、この代表α値に基づいて、オブジェクト(プリミティブ面)の頂点(構成点)のα値が求められる。そして、この頂点のα値に基づく補間処理により、オブジェクト(透視変換後のオブジェクト)の各ピクセル(ドット)のα値が求められ、この求められた各ピクセルのα値に基づいてα合成処理が行われる。
【0074】
なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、このようなシングルプレーヤモードのみならず、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。
【0075】
また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて生成してもよい。
【0076】
2.本実施形態の特徴
次に本実施形態の特徴について図面を用いて説明する。
【0077】
なお、以下では、炎の表現に本実施形態を適用した場合を主に例にとり説明するが、本実施形態は、炎以外の他の画像表現にも適用できる。また、本実施形態では、プリミティブ面がポリゴンである場合について主に例にとり説明するが、本実施形態のプリミティブ面はポリゴンに限定されない。
【0078】
2.1 オブジェクトの構成
本実施形態では、炎などの不定形表示物を表現するために、図2に示すような構成のオブジェクトOBを用いている。
【0079】
このオブジェクトOBは、基準線RL(中心線)から放射状に配置されたポリゴンPL1、PL2、PL3、PL4(広義には第1〜第Nのプリミティブ面。以下の説明でも同様)を含む。また、これらのポリゴンPL1〜4の端辺(下端辺)に接するように交差するポリゴンPL0(PL0-1〜PL0-4。広義には第Jのポリゴン。以下の説明でも同様)を含む。
【0080】
図3(A)〜(C)に、このオブジェクトOBのテクスチャマッピングに使用されるテクスチャ(ムービーテクスチャ)の例を示す。これらのテクスチャは炎を表現するテクスチャであり、これらの一連のテクスチャを連続してムービー再生することで、炎がゆらゆらと揺れながら燃えている様子をリアルに表現できる。
【0081】
本実施形態ではポリゴンPL0(PL0-1〜PL0-4)、PL1、PL2、PL3、PL4に対するテクスチャマッピングの際に、図3(A)〜(C)に示す共通のテクスチャを使用している。具体的には、図3(A)〜(C)の一連のテクスチャをポリゴンPL1、PL3のペアに対してマッピングする。同様に、これらの一連のテクスチャを、ポリゴンPL2、PL4のペア、PL0-1、PL0-2のペア、PL0-3、PL0-4のペアに対して、各々、マッピングしている。
【0082】
また、図3(A)〜(C)のB1に示す矢印の方向が、図2のB2〜B9に示す矢印の方向と一致するような方向で、図3(A)〜(C)のテクスチャをマッピングしている。
【0083】
このようにすれば、図2のC1〜C8に示すような種々の位置・方向の仮想カメラVCからオブジェクトOBを見た場合にも、図3(A)〜(C)のような炎の画像が常に見えるようになる。
【0084】
例えばC1の位置の仮想カメラVCからオブジェクトOBを見た場合には、ポリゴンPL2、PL4に図3(A)〜(C)のテクスチャがマッピングされた画像が見えるようになる。またC3の位置の仮想カメラVCからオブジェクトOBを見た場合には、ポリゴンPL1、PL3に図3(A)〜(C)のテクスチャがマッピングされた画像が見えるようになる。またC5の位置(真上)の仮想カメラVCからオブジェクトOBを見た場合には、ポリゴンPL0-1、PL0-2やPL0-3、PL0-4に図3(A)〜(C)のテクスチャがマッピングされた画像が見えるようになる。
【0085】
このようにすれば、いわゆる書き割り形状(十字形状)であるのにもかかわらず、あたかもボリュームを持つ立体形状であるかのようにオブジェクトOBを見せることが可能になる。従って、少ないポリゴン数で、炎のような不定形な表示物をリアルに表現できるようになり、少ない処理負荷でリアルな画像を生成できる。
【0086】
なお、オブジェクトOBの形状は図2に示す形状に限定されない。
【0087】
例えば図4(A)、(B)(オブジェクトOBを上方から見た図)に示すように基準線RLから放射状にポリゴンPL1〜8やPL1〜3を配置してもよい。即ち、放射状に配置するポリゴンの個数や配置の仕方は任意である。
【0088】
また、放射状に配置するポリゴン以外のポリゴンをオブジェクトに設けてもよい。例えば図2では、このようなポリゴンとしてPL0が設けられている。そして、この場合に、図2や図4(C)(側面図)では、ポリゴンPL1〜4の端辺に接するように交差するポリゴンPL0を設けているが、図4(D)(側面図)に示すように、ポリゴンPL1〜4の上端辺と下端辺の間で交差するポリゴンPL0’を設けてもよい。
【0089】
2.2 α値の設定
さて、図2に示すようなオブジェクトOBを用いて炎の画像を生成した場合に、次のような課題があることが判明した。
【0090】
例えば仮想カメラVCが図5(A)に示すような位置にあった場合には、図5(B)に示すような画像が生成されてしまう。即ち、ポリゴンPL2とPL4の画像の間に、ポリゴンPL1の色で描かれた線上の画像が表示されてしまう。
【0091】
また仮想カメラVCが図5(C)に示すような位置にあった場合には、図5(D)に示すような画像が生成されてしまう。即ち、ポリゴンPL1とPL2、及びポリゴンPL3とPL4とが同一のα値で半透明合成された画像が生成されてしまう。従って、ポリゴンPL2の領域と、ポリゴンPL1及びPL2が重なっている領域との間、並びに、ポリゴンPL4の領域と、ポリゴンPL3及びPL4が重なっている領域との間で、色の濃さの違いが目立ってしまう。
【0092】
この結果、図2に示すような形状のオブジェクトOBを用いて、何も工夫せずに画像を生成すると、仮想カメラVCがオブジェクトOBの周囲で移動するにつれて、ポリゴンの線が見えてしまったり、色の濃い部分と薄い部分の差が目立ってしまうなどの問題が生じる。このため、オブジェクトOBが、実際にはボリュームを有する立体形状のオブジェクトではなく、図2に示すような書き割り形状のオブジェクトであることがプレーヤに知られてしまい、プレーヤの仮想現実感を減退させてしまう。
【0093】
そこで本実施形態では、このような課題を解決するために次のような手法を採用している。
【0094】
即ち本実施形態では図6(A)に示すように、オブジェクトOBのポリゴンPL1(PL2〜4)と仮想カメラVCとのなす角度θ(或いはcosθ。広義には相対的な方向関係。以下の説明でも同様)に応じて、ポリゴンPL1〜4のα値を設定している。
【0095】
例えば図6(B)では、仮想カメラVCの向きはポリゴンPL1(PL3)と平行(PL2、4と直交)になっており、θは0度になっている。この場合には、ポリゴンPL1(PL3)のα値はαMIN(最小値。例えば0.0)に設定され、PL1は、より透明に見えるようになる。一方、ポリゴンPL2、4のα値はαMAX(最大値。例えば1.0)に設定され、PL2、4は、より不透明に見えるようになる。このようにすることで、図5(B)では目立っていたポリゴンPL1の色の線が、目立たなくなり、より自然な画像を生成できる。
【0096】
また図6(C)では、仮想カメラVCの向きはポリゴンPL1とPL4の間の向きになっており、θは例えば45度になっている。この場合には、ポリゴンPL1(PL3)のα値及びPL4(PL2)のα値は共にαMINとαMAXの例えば平均値に設定される。従って、図5(D)では目立っていた色の濃い部分と薄い部分の差が、目立たなくなる。この結果、オブジェクトOBが書き割り形状であることがプレーヤに知られてしまう不具合を防止でき、より自然でリアルな画像を生成できる。
【0097】
また図6(D)では、仮想カメラVCの向きはポリゴンPL4(PL2)と平行(PL1、3と直交)になっており、θは90度になっている。この場合には、ポリゴンPL4(PL2)のα値はαMINに設定され、PL4は、より透明に見えるようになる。一方、ポリゴンPL1、3のα値はαMAXに設定され、PL1、3は、より不透明に見えるようになる。これにより、ポリゴンPL4の色の線が目立って見えてしまう不具合を解消できる。
【0098】
次に、α値の具体的な設定手法について図7のフローチャートを用いて更に詳しく説明する。
【0099】
まず、ベクトルFL、FX、FY、FZを求める(ステップS1)。
【0100】
ここでベクトルFLは、図8に示すように、オブジェクトOBの中心点CP(代表点。基準線RLとポリゴンPL0の交点)を始点とし、仮想カメラVCの方向を向く単位ベクトルである。
【0101】
また、ベクトルFXは、中心点CPを始点とし、ポリゴンPL2、PL4に直交する単位ベクトル(PL1、3の面に沿った方向を向く単位ベクトル)である。
【0102】
また、ベクトルFYは、中心点CPを始点とし、ポリゴンPL0に直交する単位ベクトルである。
【0103】
また、ベクトルFZは、中心点CPを始点とし、ポリゴンPL1、PL3に直交する単位ベクトル(PL2、4の面に沿った方向を向く単位ベクトル)である。
【0104】
言い換えれば、これらのベクトルFX、FY、FZは、中心点CP(代表点)を原点とするオブジェクトOBのローカル座標系でのX、Y、Z軸方向の単位ベクトルである。
【0105】
次に、これらのベクトルFX、FY、FZとFLとの内積値を下式のように求める(ステップS2)。
【0106】
INR0=FY・FL (4)
INR1=FX・FL (5)
INR2=FZ・FL (6)
これらの内積値INR0〜3は、2つのベクトルが直交している時には0になり、平行の時には1又は−1になる。
【0107】
次に、求められた内積値INR0〜2に基づいて、ポリゴンの代表α値を求める(ステップS3)。より具体的には、まず、下式のような変換を行う。
【0108】
INRα0=1−ABS(INR0) (7)
INRα1=1−ABS(INR1) (8)
INRα2=1−ABS(INR2) (9)
ここで、ABS(X)は、引数Xに対してその絶対値を返値として返す関数である。上式(7)、(8)、(9)のような変換を行うことで、INRα0、INRα1、INRα2は、2つのベクトルが直交している時には1になり、平行の時には0になる値となる。
【0109】
ポリゴンP0〜P4の代表α値αP0〜αP4は、これらのINRα0〜INRα2を用いて下式のように求められる。
【0110】
αP0=(1−INRα0)×A0+A1 (10)
αP1=INRα1×INRα0×A0+A1 (11)
αP2=INRα2×INRα0×A0+A1 (12)
αP3=INRα1×INRα0×A0+A1 (13)
αP4=INRα2×INRα0×A0+A1 (14)
ここで、A0=αMAX−αMIN、A1=αMINである。
【0111】
例えば、図8のベクトルFLがFYと平行な場合(FLがFX、FZと直交する場合)には、上式(4)〜(6)からINR0=1、INR1=0、INR2=0になり、上式(7)〜(9)からINRα0=0、INRα1=1、INRα2=1になる。従って、上式(10)〜(14)から、
αP0=A0+A1=αMAX
αP1=αP2=αP3=αP4=A1=αMIN
となる。
【0112】
即ち、ポリゴンPL1〜PL4のα値であるαP1〜αP4が小さくなるため(αMIN)、上方の仮想カメラVCから見て、PL1〜PL4がより透明に見えるようになり、PL1〜PL4の線が目立たなくなる。一方、ポリゴンPL0のα値であるαP0が大きくなるため(αMAX)、仮想カメラVCには、PL0にマッピングされた炎のテクスチャの画像が見えるようになる。
【0113】
また、ベクトルFLがFXと平行な場合(FLがFY、FZと直交する場合)には、上式(4)〜(6)からINR0=0、INR1=1、INR2=0になり、上式(7)〜(9)からINRα0=1、INRα1=0、INRα2=1になる。従って、上式(10)〜(14)から、
αP0=αP1=αP3=A1=αMIN
αP2=αP4=A0+A1=αMAX
となる。
【0114】
即ち、ポリゴンPL0、1、3のα値であるαP0、1、3が小さくなるため、ベクトルFXの方向にある仮想カメラVCから見て、PL0、1、3がより透明に見えるようになり、PL0、1、3の線が目立たなくなる。一方、ポリゴンPL2、4のα値であるαP2、4が大きくなるため、仮想カメラVCには、PL2、4にマッピングされた炎のテクスチャの画像が見えるようになる。
【0115】
また、ベクトルFLがFZと平行な場合(FLがFX、FYと直交する場合)には、上式(4)〜(6)からINR0=0、INR1=0、INR2=1になり、上式(7)〜(9)からINRα0=1、INRα1=1、INRα2=0になる。従って、上式(10)〜(14)から、
αP0=αP2=αP4=A1=αMIN
αP1=αP3=A0+A1=αMAX
となる。
【0116】
即ち、ポリゴンPL0、2、4のα値であるαP0、2、4が小さくなるため、ベクトルFZの方向にある仮想カメラVCから見て、PL0、2、4がより透明に見えるようになり、PL0、2、4の線が目立たなくなる。一方、ポリゴンPL1、3のα値であるαP1、3が大きくなるため、仮想カメラVCには、PL1、3にマッピングされた炎のテクスチャの画像が見えるようになる。
【0117】
次に図7のステップS4に示すように、求められたポリゴンPL0〜4の代表α値αP0〜4に基づいて、オブジェクトOB(ポリゴン)の頂点α値を求める。より具体的には、オブジェクトOBの頂点が属する1又は複数のポリゴンに設定された代表α値に基づいて所与の演算処理(例えば平均化処理)を行い、オブジェクトOBの頂点のα値が求める。
【0118】
例えば図9(A)において、頂点VX1、2、3、4の頂点α値αV1、αV2、αV3、αV4については下式のように求めることができる。
【0119】
αV1=αP4 (15)
αV2=(αP1+αP2+αP3+αP4)/4 (16)
αV3=(αP0+αP1+αP2+αP3+αP4)/5 (17)
αV4=(αP0+αP4)/2 (18)
即ち、図9(A)に示すように頂点VX1はポリゴンPL4にしか属していない。このため、頂点VX1のα値αV1は、PL4の代表α値であるαP4になる(式(15))。
【0120】
また、頂点VX2はポリゴンPL1、2、3、4に属している。このため、頂点VX2のα値αV2は、PL1〜4の代表α値であるαP1〜4の平均値になる(式(16))。
【0121】
また、頂点VX3はポリゴンPL0、1、2、3、4に属している。このため、頂点VX3のα値αV3は、PL0〜4の代表α値であるαP0〜4の平均値になる(式(17))。
【0122】
また、頂点VX4はポリゴンPL0、4に属している。このため、頂点VX4のα値αV4は、PL0、4の代表α値であるαP0、4の平均値になる(式(18))。
【0123】
以上のようにして頂点α値を求めれば、ポリゴンの境界においてα値が滑らかに変化するようになる。従って、例えば仮想カメラがオブジェクトOBの周囲を移動した場合にも、仮想カメラから見てポリゴンの境界が目立たなくなり、より自然な画像を生成できるようになる。
【0124】
なお、図9(B)に示すように、オブジェクト(透視変換後のオブジェクト、ポリゴン)の各ピクセル(ドット)のα値αPIXは、頂点α値αV1〜4を補間(例えば線形補間)することで求めることができる。そして、この求められたα値αPIXに基づいて、ピクセル単位でのα合成処理を実現できる。この場合、各ピクセルのα値を求める処理は、描画プロセッサの機能(グーローシェーディング機能等)により実現できる。
【0125】
2.3 描画順序の決定
さて、本実施形態では以下に説明するような手法でポリゴンの描画順序を決定し、決定された描画順序にしたがってポリゴンを描画バッファに描画している。この場合に本実施形態では、前述の手法で得られたα値に基づいてα合成処理(半透明処理)を行いながら、ポリゴンを描画バッファに描画する。
【0126】
例えば図10(A)に示すように、図2の形状のオブジェクトOB1〜4がオブジェクト空間に配置されている場合を考える。
【0127】
この場合に本実施形態では、まず、仮想カメラVCの視点座標系での奥行き値(Z値)に基づいて、図10(B)のD1に示すように、オブジェクトOB1〜4についての描画順序を決定する。即ち、オブジェクトOB1〜OB4のZソートを行う。例えば、図10(A)の場合の描画順序は、OB4、OB1、OB3、OB2の順となる。
【0128】
また本実施形態では図10(B)のD2〜D5に示すように、これらの各オブジェクトOB1〜OB4が含むポリゴンの描画順序を決定し、これらのポリゴンをソートする。
【0129】
そして図10(A)の場合には、まず、最も奥側のオブジェクトOB4が含むポリゴンを、描画優先順位の高いものから順に描画する。次に、OB1が含むポリゴンを描画優先順位の高いものから順に描画する。次に、OB3が含むポリゴンを描画優先順位の高いものから順に描画する。最後に、最も手前側のOB2が含むポリゴンを描画優先順位の高いものから順に描画する。
【0130】
以上のような手法によりポリゴンを描画することで、矛盾の無いポリゴンのα合成処理を実現できる。また、オブジェクトOB1〜4の全てのポリゴンを一度にソートする手法に比べて、ソート処理の負荷を格段に軽減できる。
【0131】
そして本実施形態では、オブジェクトが含むポリゴンの描画順序を次のような手法で決定している。
【0132】
即ち本実施形態では図11(A)に示すように、オブジェクトOBのポリゴンPL1(PL2〜4)と仮想カメラVCとのなす角度θ(cosθ。広義には相対的な方向関係。以下の説明でも同様)に応じて、ポリゴンPL1〜4の描画順序を決定している。
【0133】
例えば図11(A)では、θが0〜90度の間にあり、仮想カメラVCから見て、ポリゴンPL1、PL4が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にポリゴンPL2、PL3を描画し、最後にポリゴンPL1、4を描画する。
【0134】
なお、底面のポリゴンPL0については、炎のオブジェクトOBを下から見るような状況がない限り、一番最初に描画しても問題ない。即ち、一番最初にポリゴンPL0を描画しても、矛盾の無いα合成処理を実現できる。従って、ポリゴンPL0の描画優先順位は常に最も高い順位(最初に描画される順位)に設定されている。
【0135】
また図11(A)の仮想カメラVCの位置では、ポリゴンPL1とPL4や、PL2とPL3は互いに重なることがなく、これらのポリゴン同士のソートは必要ない。従って、ポリゴンPL1、PL4間の描画順序や、PL2、PL3間の描画順序は任意となる。
【0136】
また図11(B)では、θが90〜180度の間にあり、仮想カメラVCから見てポリゴンPL3、PL4が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にポリゴンPL1、PL2を描画し、最後にポリゴンPL3、4を描画する。なお、ポリゴンPL1、PL2間及びPL3、PL4間の描画順序は任意である。
【0137】
また図11(C)では、θが180〜270度の間にあり、仮想カメラVCから見てポリゴンPL2、PL3が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にポリゴンPL1、PL4を描画し、最後にポリゴンPL2、3を描画する。なお、ポリゴンPL1、PL4間及びPL2、PL3間の描画順序は任意である。
【0138】
また図11(D)では、θが270〜360度の間にあり、仮想カメラVCから見てポリゴンPL1、PL2が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にポリゴンPL3、PL4を描画し、最後にポリゴンPL1、2を描画する。なお、ポリゴンPL3、PL4間及びPL1、PL2間の描画順序は任意である。
【0139】
このように本実施形態では、オブジェクトOBの形状が特定形状(基準線から放射状にポリゴンが配置される形状)に固定されていることに着目し、ポリゴンの面と仮想カメラの向きとのなす角度θ(内積値。相対的な方向関係)に応じて、ポリゴンの描画順序を一意的に決めている。従って、ポリゴンの奥行き値を判定することなくポリゴンをソートできるようになるため、ソート処理の負荷を格段に軽減できる。
【0140】
また本実施形態では、前述のように、ポリゴンの面と仮想カメラの向きとのなす角度θに応じて、ポリゴンのα値も設定している。従って、このα値を求めるために用いた角度θ(より具体的には内積値)を有効利用して、ポリゴンの描画順序も決定できるようになるため、処理負荷を更に軽減できる。
【0141】
2.4 パーティクル・エリア
さて、オブジェクトOBの画像を更にリアルなものにするためには、パーティクル・プリミティブ(点、線又は面で構成されたパーティクル)を用いたパーティクルシステムを採用することが望ましい。
【0142】
そこで本実施形態では図12に示すように、複数のパーティクル・エリアPTA1、PTA2、PTA3、PTA4(パーティクル存在エリア)を設定し、これらのPTA1〜4において、所与の寿命で消滅するパーティクル・プリミティブを発生させるようにしている。
【0143】
なお図12では、これらのパーティクル・エリアPTA1〜4は、オブジェクトOBが含むポリゴンPL1〜PL4により区分けされている。
【0144】
このように、各パーティクル・エリアPTA1〜4においてパーティクル・プリミティブを発生させるようにすれば、単にポリゴンPL0〜4だけでオブジェクトOBを構成する場合に比べて、よりボリューム感があり、立体的に見える炎を表現できるようになる。これにより、プレーヤの仮想現実感を更に向上できる。
【0145】
なお、本実施形態では、パーティクル・プリミティブとして、パーティクルを表すテクスチャがマッピングされたスプライト・ポリゴン(ビルボード表示のポリゴン)を用いている。このようにすることで、プリミティブ点で表現される多数のパーティクルを発生して炎等を表現する場合に比べて、描画負荷を格段に軽減できる。即ち、少ない個数のプリミティブ数(ポリゴン数)で、より広い範囲を占める炎を表現できるようになる。
【0146】
但し、パーティクル・プリミティブとして、スプライト・ポリゴンではなく、プリミティブ点やプリミティブ線などを用いてもよい。
【0147】
なお、よりリアルなパーティクル表現を実現するためには、パーティクル・プリミティブに色やα値(半透明度)などの種々の属性を持たせると共に、パーティクル・プリミティブを所与の規則に従って発生、移動、消滅させて、不定形な炎を表現することが望ましい。即ち、パーティクル・プリミティブの初期速度(初期移動方向)をランダムに変化させたり、パーティクル・プリミティブの寿命をランダムに変化させる。このようにすることで、現実世界の炎のように見えるリアルな画像表現を実現できる。なお、パーティクル・プリミティブの消滅は、パーティクル・プリミティブのα値を制御して、パーティクル・プリミティブを時間経過に伴い徐々に透明にすることで実現できる。
【0148】
さて、このようにパーティクル・エリアを設け、パーティクル・プリミティブを発生させた場合に、パーティクル・エリアPTA1〜4(パーティクル・プリミティブ)についての描画順序をどのように決定するかが問題となる。
【0149】
本実施形態では、このパーティクル・エリアについての描画順序も、ポリゴンの面と仮想カメラの向きとの相対的な方向関係(角度θ。内積値)に応じて決定している。
【0150】
例えば図13(A)では、θが0〜90度の間にあり、仮想カメラVCから見て、ポリゴンPL1、PL4が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にパーティクル・エリアPTA3内のパーティクル・プリミティブを描画する。そして、ポリゴンPL2、PL3を描画し、次に、パーティクル・エリアPTA2、4内のパーティクル・プリミティブを描画する。そして、ポリゴンPL1、4を描画し、最後に、パーティクル・エリアPTA1内のパーティクル・プリミティブを描画する。
【0151】
なおPL2、PL3間、PTA2、PTA4間及びPL1、PL4間の描画順序は任意である。また、各パーティクル・エリア内においては、パーティクル・プリミティブをZソートしながら描画することが望ましい。
【0152】
また図13(B)では、θが90〜180度の間にあり、仮想カメラVCから見て、ポリゴンPL3、PL4が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にパーティクル・エリアPTA2内のパーティクル・プリミティブを描画する。そして、ポリゴンPL1、PL2を描画し、次に、パーティクル・エリアPTA1、3内のパーティクル・プリミティブを描画する。そして、ポリゴンPL3、4を描画し、最後に、パーティクル・エリアPTA4内のパーティクル・プリミティブを描画する。なおPL1、PL2間、PTA1、PTA3間及びPL3、PL4間の描画順序は任意である。
【0153】
また図14(A)では、θが180〜270度の間にあり、仮想カメラVCから見て、ポリゴンPL2、PL3が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にパーティクル・エリアPTA1内のパーティクル・プリミティブを描画する。そして、ポリゴンPL1、PL4を描画し、次に、パーティクル・エリアPTA2、4内のパーティクル・プリミティブを描画する。そして、ポリゴンPL2、3を描画し、最後に、パーティクル・エリアPTA3内のパーティクル・プリミティブを描画する。なおPL1、PL4間、PTA2、PTA4間及びPL2、PL3間の描画順序は任意である。
【0154】
また図14(B)では、θが270〜360度の間にあり、仮想カメラVCから見て、ポリゴンPL1、PL2が前面に位置している。この場合には、まずポリゴンPL0を描画し、次にパーティクル・エリアPTA4内のパーティクル・プリミティブを描画する。そして、ポリゴンPL3、PL4を描画し、次に、パーティクル・エリアPTA1、3内のパーティクル・プリミティブを描画する。そして、ポリゴンPL1、2を描画し、最後に、パーティクル・エリアPTA2内のパーティクル・プリミティブを描画する。なおPL3、PL4間、PTA1、PTA3間及びPL1、PL2間の描画順序は任意である。
【0155】
なお、ポリゴンの面と仮想カメラVCとの方向関係(角度θ)は、具体的には図15に示す手法により判断する。
【0156】
例えば図15において、FLはオブジェクトOBの中心点CPを始点としVCの方向を向く単位ベクトルであり、FXは、CPを始点としPL2、PL4に直交する単位ベクトルであり、FZは、CPを始点としPL1、PL3に直交する単位ベクトルである(図8参照)。
【0157】
本実施形態では、これらのベクトルを用いて下式の内積値INR1、2を求める。
【0158】
INR1=FX・FL (19)
INR2=FZ・FL (20)
そして、INR1>0、INR2>0の場合には、仮想カメラVCはPL1、PL4の前面に位置すると判断され、描画順序は図13(A)に示す順序になる。
【0159】
また、INR1≦0、INR2>0の場合には、仮想カメラVCはPL3、PL4の前面に位置すると判断され、描画順序は図13(B)に示す順序になる。
【0160】
また、INR1≦0、INR2≦0の場合には、仮想カメラVCはPL2、PL3の前面に位置すると判断され、描画順序は図14(A)に示す順序になる。
【0161】
また、INR1>0、INR2≦0の場合には、仮想カメラVCはPL1、PL2の前面に位置すると判断され、描画順序は図14(B)に示す順序になる。
【0162】
この場合に本実施形態では、これらの内積値INR1、INR2(式(19)、(20))として、α値の設定の際に求めた内積値INR1、INR2(式(5)、(6))をそのまま利用できる。このようにすることで、α値の設定の際に求めた内積値INR1、2を有効利用できるようになり、処理負荷を軽減できる。
【0163】
2.5 パーティクルの発生
本実施形態では、図16に示すように、各パーティクル・エリアPTA1〜4に対して、パーティクル・プリミティブのジェネレータG1〜4(発生場所)を設定している。そして、このジェネレータG1〜4から、所与の寿命が設定されたパーティクル・プリミティブを所与の初期速度で発生させている。
【0164】
例えばパーティクル・エリアPTA1の領域は、(X0、Z0)、(X0+XSZ、Z0+ZSZ)と定義できる。この場合に、パーティクル・エリアPTA1の領域が、PTA1を区分けしているポリゴンPL1、PL4に重ならないようにPTA1を定義する。
【0165】
この時、ジェネレータG1〜4の位置GP1〜4は下式のように表すことができる。
【0166】
GP1
=(X0+XSZ×VLMIN、Z0+ZSZ×VLMIN) (21)
GP2
=(X0+XSZ×VLMAX、Z0+ZSZ×VLMIN) (22)
GP3
=(X0+XSZ×VLMIN、Z0+ZSZ×VLMAX) (23)
GP4
=(X0+XSZ×VLMAX、Z0+ZSZ×VLMAX) (24)
ここで、VLMIN、VLMAXはジェネレータの位置を定義するためのパラメータであり、0<VLMIN<VLMAXの関係が成り立つ。
【0167】
上式(21)〜(24)のようにその位置を決めることで、ジェネレータG1〜4はパーティクル・エリアの内側に位置するようになる。
【0168】
さて、パーティクル・プリミティブに対するパラメータの設定手法としては、種々の手法があるが、本実施形態では、処理負荷を軽くするために、以下のようなパラメータだけを各パーティクル・プリミティブの属性情報として持たせている。
(PX、PY、PZ)、(VCX、VCY、VCZ)、LIFE
ここで、(PX、PY、PZ)は、パーティクル・プリミティブの発生位置を表すパラメータである。即ち、上記のGP1〜4のいずれかを表すパラメータである。
【0169】
また、(VCX、VCY、VCZ)はパーティクル・プリミティブの初期速度を表すパラメータであり、LIFEはパーティクル・プリミティブの現在のライフ(年齢)を表すパラメータである。
【0170】
更に別のパラメータとして本実施形態ではLIFEMAXを用意している。このLIFEMAXはパーティクル・プリミティブの寿命を表すパラメータである。
【0171】
図17に、本実施形態のパーティクル処理についてのフローチャートを示す。
【0172】
まず、フレーム更新(描画バッファの更新)か否かを判断する(ステップS21)。これは、画像生成システムのハードウェアが垂直同期のタイミングで発生する割り込みに基づいて判断できる。
【0173】
フレーム更新であると判断された場合には、パーティクル番号NUMを0に設定する(ステップS22)。そして、NUM番目のパーティクル・プリミティブのLIFEを1だけインクリメントする(ステップS23)。
【0174】
次に、LIFE>LIFEMAXか否かを判断する(ステップS24)。そして、LIFE>LIFEMAXの場合には、LIFE=0に戻すと共に発生位置PX、PY、PZ、初期速度VCX、VCY、VCZを再設定する(ステップS25)。即ち、寿命を越えたパーティクル・プリミティブの発生位置や初期速度を再設定する。この場合に、パーティクル・プリミティブを発生させるジェネレータ及びパーティクル・プリミティブの初期速度は乱数に基づいて決定する。
【0175】
次に、パーティクル・プリミティブの描画位置(X、Y、Z)を下式のように決定する(ステップS26)。
【0176】
X=PX+VCX×LIFE (25)
Y=PY+VCY×LIFE (26)
Z=PZ+VCZ×LIFE (27)
即ち、各パーティクル・プリミティブの位置は、その発生位置と初期速度とLIFEとにより特定されることになる。
【0177】
次に、パーティクル番号NUMを1だけインクリメントする(ステップS27)。そして、NUM>NUMMAXか否かを判断し(ステップS28)、NUM≦NUMMAXの場合には、ステップS23に戻り、次のパーティクル・プリミティブに対する処理を行う。
【0178】
一方、NUM>NUMMAXの場合には、NUM個のパーティクル・プリミティブをZソートして、描画バッファに描画する(ステップS29)。これにより、当該フレームにおけるパーティクル・プリミティブの描画が完了する。
【0179】
さて、以上のようにしてパーティクル・プリミティブを発生させた場合、次のような問題がある。即ち、1つのパーティクル・エリアで発生したパーティクル・プリミティブが、そのパーティクル・エリアの外に出てしまい、他のパーティクル・エリアに進入してしまうと、誤った描画順序でそのパーティクル・プリミティブが描画されてしまうおそれがある。
【0180】
そこで本実施形態では図18(A)に示すように、パーティクル・プリミティブが、そのパーティクル・プリミティブが発生したパーティクル・エリア内だけで移動するように、その移動を制限している。これにより、図18(A)に示すように、例えばパーティクル・エリアPTA1で発生したパーティクル・プリミティブはPTA1内だけで移動して消滅するようになる。また、パーティクル・エリアPTA3で発生したパーティクル・プリミティブはPTA3内だけで移動して消滅するようになる。
【0181】
そして本実施形態では、このような移動の制限を、パーティクル・プリミティブの初期速度や寿命の制御により実現している。
【0182】
例えば本実施形態では、パーティクル・プリミティブの初期条件の設定や、図17のステップS25での初期条件の再設定の際に、次のようにして初期速度を決定している。
【0183】
例えば、パーティクル・プリミティブが図18(B)に示すようにジェネレータG1から発生する場合には、VCX>0、VCZ>0となる条件の下で、パーティクル・プリミティブの初期速度(VCX、VCY、VCZ)を乱数で決定する。
【0184】
また、パーティクル・プリミティブが図18(C)に示すようにジェネレータG2から発生する場合には、VCX<0、VCZ>0となる条件の下で、パーティクル・プリミティブの初期速度(VCX、VCY、VCZ)を乱数で決定する。
【0185】
また、パーティクル・プリミティブが図18(D)に示すようにジェネレータG3から発生する場合には、VCX>0、VCZ<0となる条件の下で、パーティクル・プリミティブの初期速度(VCX、VCY、VCZ)を乱数で決定する。
【0186】
また、パーティクル・プリミティブが図18(E)に示すようにジェネレータG4から発生する場合には、VCX<0、VCZ<0となる条件の下で、パーティクル・プリミティブの初期速度(VCX、VCY、VCZ)を乱数で決定する。
【0187】
また、初期速度が大きすぎると、パーティクル・プリミティブがパーティクル・エリアの外に直ぐに出ていってしまうおそれがある。このため、例えばジェネレータG1から発生するパーティクル・プリミティブの初期速度(VCX、VCY、VCZ)に対しては、下式のような制限を加える。
0<ABS(VCX)×LIFEMAX<XSZ×(1−VLMIN)(28)
0<ABS(VCZ)×LIFEMAX<ZSZ×(1−VLMIN)(29)
ここで、ABS(X)は、Xの絶対値を返値として返す関数である。また前述のように、LIFEMAXは寿命を表すパラメータであり、XSZ、ZSZは、パーティクル・エリアを定義するためのパラメータであり、VLMINはジェネレータの位置を定義するためのパラメータである。
【0188】
このように本実施形態では、パーティクル・プリミティブの初期条件の設定又は再設定だけで、パーティクル・プリミティブがパーティクル・エリアの外に出ないことを保証することに成功している。
【0189】
3.本実施形態の処理
次に、本実施形態の処理の詳細例について、図19、図20のフローチャートを用いて説明する。
【0190】
まず、炎オブジェクト(図2参照)を視点(カメラ)座標系でZソートする(ステップS31)。即ち図10(A)、(B)で説明したように、まず、炎オブジェクトOB1〜4についてのZソートを行う。
【0191】
次に、オブジェクト番号I=0に設定する(ステップS32)。そして、I番目の炎オブジェクトの中心点(代表点)の座標と仮想カメラの座標とに基づき、ベクトルFL(図8参照)を求める(ステップS33)。
【0192】
次に、I番目の炎オブジェクトのローカル座標系上におけるベクトルFX、FY、FZと、求められたFLとの内積値を求める(ステップS34)。そして、求められた内積値に基づいて、炎ポリゴン(PL0〜PL4)及びパーティクル・エリア(PTA1〜4)についてのα値及び描画順序を決定する(ステップS35)。
【0193】
次に、炎オブジェクトのベース・ポリゴン(PL0)を描画する(ステップS36)。そして、1番目の描画優先順位のパーティクル・エリア内のパーティクル・プリミティブを描画する(ステップS37)。
【0194】
次に、1番目、2番目の描画優先順位の炎ポリゴンを描画する(ステップS38)。そして、2番目、3番目の描画優先順位のパーティクル・エリア内のパーティクル・プリミティブを描画する(ステップS39)。
【0195】
次に、3番目、4番目の描画優先順位の炎ポリゴンを描画する(ステップS40)。そして、4番目の描画優先順位のパーティクル・エリア内のパーティクル・プリミティブを描画する(ステップS41)。
【0196】
次に、オブジェクト番号Iを1だけインクリメントする(ステップS42)。そして、I>IMAXか否かを判断し、I≦IMAXの場合には図19のステップS33に戻る。一方、I>IMAXの場合には処理を終了する。
【0197】
4.ハードウェア構成
次に、本実施形態を実現できるハードウェアの構成の一例について図21を用いて説明する。
【0198】
メインプロセッサ900は、CD982(情報記憶媒体)に格納されたプログラム、通信インターフェース990を介して転送されたプログラム、或いはROM950(情報記憶媒体の1つ)に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などの種々の処理を実行する。
【0199】
コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、オブジェクトを移動させたり動作(モーション)させるための物理シミュレーションに、マトリクス演算などの処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
【0200】
ジオメトリプロセッサ904は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ900で動作するプログラムが、その処理をジオメトリプロセッサ904に指示する。
【0201】
データ伸張プロセッサ906は、圧縮された画像データや音データを伸張するデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする処理を行う。これにより、オープニング画面、インターミッション画面、エンディング画面、或いはゲーム画面などにおいて、MPEG方式等で圧縮された動画像を表示できるようになる。なお、デコード処理の対象となる画像データや音データは、ROM950、CD982に格納されたり、或いは通信インターフェース990を介して外部から転送される。
【0202】
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ(プリミティブ面)で構成されるオブジェクトの描画(レンダリング)処理を高速に実行するものである。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970の機能を利用して、オブジェクトデータを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると、描画プロセッサ910は、これらのオブジェクトデータやテクスチャに基づいて、Zバッファなどを利用した陰面消去を行いながら、オブジェクトをフレームバッファ922に高速に描画する。また、描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行うことができる。そして、1フレーム分の画像がフレームバッファ922に書き込まれると、その画像はディスプレイ912に表示される。
【0203】
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などの高品位のゲーム音を生成する。生成されたゲーム音は、スピーカ932から出力される。
【0204】
ゲームコントローラ942(レバー、ボタン、筺体、パッド型コントローラ又はガン型コントローラ等)からの操作データや、メモリカード944からのセーブデータ、個人データは、シリアルインターフェース940を介してデータ転送される。
【0205】
ROM950にはシステムプログラムなどが格納される。なお、業務用ゲームシステムの場合には、ROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納されることになる。なお、ROM950の代わりにハードディスクを利用するようにしてもよい。
【0206】
RAM960は、各種プロセッサの作業領域として用いられる。
【0207】
DMAコントローラ970は、プロセッサ、メモリ(RAM、VRAM、ROM等)間でのDMA転送を制御するものである。
【0208】
CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。
【0209】
通信インターフェース990は、ネットワークを介して外部との間でデータ転送を行うためのインターフェースである。この場合に、通信インターフェース990に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどを考えることができる。そして、通信回線を利用することでインターネットを介したデータ転送が可能になる。また、高速シリアルバスを利用することで、他の画像生成システムとの間でのデータ転送が可能になる。
【0210】
なお、本発明の各手段は、その全てを、ハードウェアのみにより実現(実行)してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。
【0211】
そして、本発明の各手段をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、本発明の各手段をハードウェアを利用して実現するためのプログラムが格納されることになる。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930等に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930等は、その指示と渡されたデータとに基づいて、本発明の各手段を実現することになる。
【0212】
図22(A)に、本実施形態を業務用ゲームシステム(画像生成システム)に適用した場合の例を示す。プレーヤは、ディスプレイ1100、1101上に映し出されたゲーム画像を見ながら、ガン型コントローラ1102、1103などを操作してゲームを楽しむ。内蔵されるシステムボード(サーキットボード)1106には、各種プロセッサ、各種メモリなどが実装される。そして、本発明の各手段を実現するためのプログラム(データ)は、システムボード1106上の情報記憶媒体であるメモリ1108に格納される。以下、このプログラムを格納プログラム(格納情報)と呼ぶ。
【0213】
図22(B)に、本実施形態を家庭用のゲームシステム(画像生成システム)に適用した場合の例を示す。プレーヤはディスプレイ1200に映し出されたゲーム画像を見ながら、ガン型コントローラ1202、1204などを操作してゲームを楽しむ。この場合、上記格納プログラム(格納情報)は、本体システムに着脱自在な情報記憶媒体であるCD1206、或いはメモリカード1208、1209などに格納されている。
【0214】
図22(C)に、ホスト装置1300と、このホスト装置1300とネットワーク1302(LANのような小規模ネットワークや、インターネットのような広域ネットワーク)を介して接続される端末1304-1〜1304-n(ゲーム機、携帯電話、テレビ)とを含むシステムに本実施形態を適用した場合の例を示す。この場合、上記格納プログラム(格納情報)は、例えばホスト装置1300が制御可能な磁気ディスク装置、磁気テープ装置、メモリなどの情報記憶媒体1306に格納されている。端末1304-1〜1304-nが、スタンドアロンでゲーム画像、ゲーム音を生成できるものである場合には、ホスト装置1300からは、ゲーム画像、ゲーム音を生成するためのゲームプログラム等が端末1304-1〜1304-nに配送される。一方、スタンドアロンで生成できない場合には、ホスト装置1300がゲーム画像、ゲーム音を生成し、これを端末1304-1〜1304-nに伝送し端末において出力することになる。
【0215】
なお、図22(C)の構成の場合に、本発明の各手段を、ホスト装置(サーバー)と端末とで分散して実現するようにしてもよい。また、本発明の各手段を実現するための上記格納プログラム(格納情報)を、ホスト装置(サーバー)の情報記憶媒体と端末の情報記憶媒体に分散して格納するようにしてもよい。
【0216】
またネットワークに接続する端末は、家庭用ゲームシステムであってもよいし業務用ゲームシステムであってもよい。そして、業務用ゲームシステムをネットワークに接続する場合には、業務用ゲームシステムとの間で情報のやり取りが可能であると共に家庭用ゲームシステムとの間でも情報のやり取りが可能なセーブ用情報記憶装置(メモリカード、携帯型ゲーム装置)を用いることが望ましい。
【0217】
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。
【0218】
例えば、本発明のオブジェクトの形状は図2、図4(A)〜(D)で説明したものに限定されず、種々の形状を採用できる。
【0219】
また、α値の設定手法も、図6(A)〜図9(B)で説明した手法に限定されず、これと均等な種々の変形実施が可能である。
【0220】
また、描画順序の決定手法も、図10(A)〜図15で説明した手法に限定されるものではない。
【0221】
更に、パーティクル・プリミティブの処理手法も、図16〜図18(E)で説明した手法に限定されない。
【0222】
また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【0223】
また、本発明は種々のゲーム(格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。
【0224】
また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード等の種々の画像生成システム(ゲームシステム)に適用できる。
【図面の簡単な説明】
【図1】本実施形態の画像生成システムの機能ブロック図の例である。
【図2】本実施形態で用いられるオブジェクトの形状の例を示す図である。
【図3】図3(A)、(B)、(C)は、オブジェクトにマッピングされるテクスチャ(ムービーテクスチャ)の例である。
【図4】図4(A)〜(D)は、オブジェクトの形状の他の例について説明するための図である。
【図5】図5(A)〜(D)は、図2の形状のオブジェクトを用いた場合の問題点について説明するための図である。
【図6】図6(A)〜(D)は、α値の設定手法について説明するための図である。
【図7】α値の設定手法の具体例について説明するためのフローチャートである。
【図8】α値の設定手法の具体例について説明するための図である。
【図9】図9(A)、(B)は、頂点のα値やピクセルのα値を求める手法について説明するための図である。
【図10】図10(A)、(B)は、本実施形態のソート処理について説明するための図である。
【図11】図11(A)〜(D)は、ポリゴンの面と仮想カメラの向きに応じてポリゴンの描画順序を決定する手法について説明するための図である。
【図12】パーティクル・エリアの設定とパーティクル・プリミティブの発生について説明するための図である。
【図13】図13(A)、(B)は、ポリゴンの面と仮想カメラの向きに応じてポリゴンやパーティクル・エリアの描画順序を決定する手法について説明するための図である。
【図14】図14(A)、(B)も、ポリゴンの面と仮想カメラの向きに応じてポリゴンやパーティクル・エリアの描画順序を決定する手法について説明するための図である。
【図15】ベクトルの内積値を利用してポリゴンの面と仮想カメラの向きの方向関係を決定する手法について説明するための図である。
【図16】パーティクル・プリミティブのジェネレータについて説明するための図である。
【図17】パーティクル処理について説明するためのフローチャートである。
【図18】図18(A)〜(E)は、パーティクル・プリミティブの移動を制限する手法について説明するための図である。
【図19】本実施形態の処理の詳細例について示すフローチャートである。
【図20】本実施形態の処理の詳細例について示すフローチャートである。
【図21】本実施形態を実現できるハードウェアの構成の一例を示す図である。
【図22】図22(A)、(B)、(C)は、本実施形態が適用される種々の形態のシステムの例を示す図である。
【符号の説明】
VC 仮想カメラ
OB オブジェクト
PL0〜PL4 ポリゴン
RL 基準線
FX、FY、FZ ベクトル
VX1〜VX4 頂点
PTA1〜PTA4 パーティクル・エリア
CP 中心点
100 処理部
110 オブジェクト空間設定部
112 α値設定部
114 パーティクル処理部
116 描画順序決定部
120 描画部
122 テクスチャマッピング部
124 α合成部
160 操作部
170 記憶部
172 主記憶部
174 描画バッファ
176 テクスチャ記憶部
180 情報記憶媒体
190 表示部
192 音出力部
194 携帯型情報記憶装置
196 通信部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image generation system, a program, and an information storage medium.
[0002]
[Background Art and Problems to be Solved by the Invention]
Conventionally, an image generation system (game system) that generates an image that can be seen from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known. Popular. Taking an image generation system capable of enjoying a role-playing game (RPG) as an example, a player operates a character (object), which is his or her own character, and moves it on a map in the object space to play against an enemy character. Play games, interact with other characters, and visit various towns.
[0003]
Now, in such an image generation system, it is an important issue to generate a more realistic image in order to improve the player's virtual reality. Therefore, it is desirable that an irregular display object such as a flame or smoke generated during the game can be expressed with a realistic image.
[0004]
As a technique for expressing such an irregular display object such as a flame, the following techniques can be considered.
[0005]
In the first method, a flame is expressed using a flame polygon to which a texture of a flame picture is mapped.
[0006]
However, in this first method, when the flame polygon is viewed from various directions, the player is informed that the shape of the flame polygon is planar, and the virtual reality of the player is reduced.
[0007]
In the second method, a so-called particle system is used. That is, an irregularly shaped flame is represented by a set of flame particles that have attribute information such as position and color and that are generated, moved, and disappear according to a given rule.
[0008]
However, such a particle system has a drawback that the processing load of the image generation system becomes very heavy.
[0009]
The present invention has been made in view of the above problems, and an object thereof is to provide an image generation system, a program, and an information storage medium that can generate a realistic image of a display object with a small processing load. There is.
[0010]
[Means for Solving the Problems]
In order to solve the above-described problems, the present invention provides an image generation system for generating an image, wherein an object including first to Nth primitive surfaces is set in an object space, and the object includes the first Means for determining a drawing order for the first to Nth primitive surfaces according to a relative direction relationship between at least one of the first to Nth primitive surfaces and the orientation of the virtual camera; And means for drawing the first to Nth primitive surfaces in the determined drawing order. The program according to the present invention is a program usable by a computer (a program embodied in an information storage medium or a carrier wave), and causes the computer to realize the above means (makes the computer function as the above means). And An information storage medium according to the present invention is an information storage medium readable (usable) by a computer, and includes a program for causing the computer to realize the above means (functioning the computer as the above means). And
[0011]
According to the present invention, an object including the first to Nth primitive surfaces is set (arranged) in the object space, and an image that can be seen from the virtual camera is generated in the object space.
[0012]
According to the present invention, the drawing order (sort order) for the first to Nth primitive planes according to the relative directional relationship (angle or inner product value, etc.) between the primitive plane of the object and the orientation of the virtual camera. Are determined, and the first to Nth primitive surfaces are drawn in the determined drawing order.
[0013]
As described above, according to the present invention, the drawing order of primitive surfaces can be determined only by determining the relative directional relationship between the primitive surfaces and the orientation of the virtual camera. Therefore, it is possible to determine the drawing order of the primitive plane with a much smaller processing load than the method of determining the drawing order based on the depth value or the like.
[0014]
The image generation system, program, and information storage medium according to the present invention are characterized in that the first to Nth primitive surfaces are drawn in the drawing order while being α-combined.
[0015]
In this way, it is possible to realize an α composition process with no contradiction of primitive surfaces.
[0016]
The α value set for the primitive surface may also be determined according to the relative direction relationship between the primitive surface and the orientation of the virtual camera.
[0017]
In the image generation system, the program, and the information storage medium according to the present invention, the object includes a J-th primitive surface intersecting the first to N-th primitive surfaces, and the J-th primitive surface is drawn first. Then, the first to Nth primitive surfaces are drawn.
[0018]
In this way, it is not necessary to determine the drawing order for the Jth primitive surface, and the processing load can be reduced.
[0019]
In this case, an object having a configuration in which a plurality of first to Nth primitive surfaces are arranged radially from a reference line may be employed. Further, the Jth primitive surface may intersect so as to be in contact with the end sides of the first to Nth primitive surfaces, or may intersect between the upper end side and the lower end side of the first to Nth primitive surfaces. You may do it.
[0020]
In the image generation system, the program, and the information storage medium according to the present invention, the first to Nth primitive surfaces are radially arranged from a reference line, and are divided by the first to Nth primitive surfaces. In the Mth particle area, a plurality of particle primitives that disappear at a given lifetime are generated.
[0021]
In this way, it is possible to express a display object that is more voluminous and looks three-dimensional than in the case where an object is simply composed of primitive surfaces.
[0022]
The present invention is also an image generation system for generating an image, and performs a process of generating a plurality of particle primitives that disappear at a given lifetime in each particle area of the first to Mth particle areas. Means for determining the drawing order for the first to M-th particle areas, and means for drawing the particle primitives generated in the particle area in order from the particle area having the highest drawing order priority. It is characterized by including. The program according to the present invention is a program usable by a computer (a program embodied in an information storage medium or a carrier wave), and causes the computer to realize the above means (makes the computer function as the above means). And
An information storage medium according to the present invention is an information storage medium readable (usable) by a computer, and includes a program for causing the computer to realize the above means (functioning the computer as the above means). And
[0023]
According to the present invention, for example, when the priority of the drawing order of the first particle area is the highest, drawing is first performed for the particle primitive generated in the first particle area. After that, drawing is performed on the particle primitive generated in the particle area having the next highest priority in the drawing order.
[0024]
In this way, it is possible to remarkably reduce the load of the drawing order determination process, compared to the technique of sorting and drawing all the particle primitives at once.
[0025]
An image generation system, a program, and an information storage medium according to the present invention include at least one primitive surface among the first to Nth primitive surfaces that divide the first to Mth particle areas and the orientation of the virtual camera. The drawing order for the first to M-th particle areas or the drawing for the first to M-th particle areas and the first to N-th primitive planes according to the relative directional relationship The order is determined.
[0026]
In this way, the drawing order for the particle area and the primitive surface can be determined only by determining the relative direction relationship between the primitive surface and the orientation of the virtual camera. Therefore, the drawing order of the particle area and the primitive surface can be determined with a much smaller processing load than the method of determining the drawing order based on the depth value or the like.
[0027]
The image generation system, the program, and the information storage medium according to the present invention may be configured such that a particle primitive generated in an Lth (1 ≦ L ≦ M) particle area in the first to Mth particle areas is The movement is limited so as to move within the Lth particle area.
[0028]
In this way, it is possible to prevent the particle primitive generated in the Lth particle area from entering another particle area, and the problem that the particle primitive is drawn in the wrong drawing order. Can be prevented.
[0029]
The image generation system, the program, and the information storage medium according to the present invention are characterized in that the movement of the particle primitive is limited by controlling at least one of the initial speed and the life of the particle primitive.
[0030]
In this way, it is possible to limit the movement of particle primitives with a low-load process that only limits the initial speed and lifetime.
[0031]
In the present invention, an object including the first to N-th primitive planes is set in the object space, and at least one of the first to N-th primitive planes included in the object and the orientation of the virtual camera The drawing order of the first to Nth primitive faces may be determined according to the relative directional relationship, and the first to Nth primitive faces may be drawn in the determined drawing order. .
[0032]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present embodiment will be described with reference to the drawings.
[0033]
In addition, this embodiment demonstrated below does not limit the content of this invention described in the claim at all. Further, not all of the configurations described in the present embodiment are essential as a solution means of the present invention.
[0034]
1. Constitution
FIG. 1 shows an example of a functional block diagram of the image generation system (game system) of the present embodiment. In this figure, the present embodiment only needs to include at least the processing unit 100 (or include the processing unit 100 and the storage unit 170), and the other blocks can be optional components.
[0035]
The operation unit 160 is for a player to input operation data, and the function can be realized by hardware such as a lever, a button, a microphone, or a housing.
[0036]
The storage unit 170 serves as a work area such as the processing unit 100 or the communication unit 196, and its function can be realized by hardware such as a RAM.
[0037]
The information storage medium 180 (computer-readable medium) stores programs, data, and the like, and functions as an optical disk (CD, DVD), magneto-optical disk (MO), magnetic disk, hard disk, and magnetic tape. Alternatively, it can be realized by hardware such as a memory (ROM). The processing unit 100 performs various processes of the present invention (this embodiment) based on a program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores a program for causing a computer to implement (execute, function) the means of the present invention (this embodiment) (particularly, the blocks included in the processing unit 100). Or a plurality of modules (including objects in object orientation) are included.
[0038]
Part or all of the information stored in the information storage medium 180 is transferred to the storage unit 170 when the system is powered on. The information storage medium 180 also includes a program for performing the processing of the present invention, image data, sound data, shape data of the display object, information for instructing the processing of the present invention, or processing in accordance with the instructions. Information etc. can be included.
[0039]
The display unit 190 outputs an image generated according to the present embodiment, and the function thereof can be realized by hardware such as a CRT, LCD, or HMD (head mounted display).
[0040]
The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by hardware such as a speaker.
[0041]
The portable information storage device 194 stores player personal data, game save data, and the like. As the portable information storage device 194, a memory card, a portable game device, and the like can be considered.
[0042]
The communication unit 196 performs various controls for communicating with the outside (for example, a host device or other image generation system), and functions as hardware such as various processors or a communication ASIC. Or by a program.
[0043]
Note that a program (data) for realizing (executing and functioning) each unit of the present invention (this embodiment) is transmitted from the information storage medium of the host device (server) via the network and the communication unit 196. You may make it deliver to. Use of such an information storage medium of the host device (server) is also included in the scope of the present invention.
[0044]
The processing unit 100 (processor) performs various processing such as game processing, image generation processing, or sound generation processing based on operation data, a program, and the like from the operation unit 160. In this case, the processing unit 100 performs various processes using the main storage unit 172 in the storage unit 170 as a work area.
[0045]
Here, the processing performed by the processing unit 100 includes coin (price) acceptance processing, various mode setting processing, game progress processing, selection screen setting processing, and the position and rotation angle of an object (one or a plurality of primitives). Processing for obtaining (rotation angle around X, Y or Z axis), processing for moving an object (motion processing), processing for obtaining a viewpoint position (virtual camera position) and line of sight angle (virtual camera rotation angle), map object Consider processing such as placing objects in the object space, hit check processing, computing game results (results, results), processing for multiple players to play in a common game space, or game over processing, etc. Can do.
[0046]
The processing unit 100 includes an object space setting unit 110, an α value setting unit 112, a particle processing unit 114, a drawing order determination unit 116 (sorting unit), and a drawing unit 120. Note that it is not necessary for the processing unit 100 to include all of these functional blocks 110 to 120, and some of the functional blocks may be omitted.
[0047]
Here, the object space setting unit 110 performs a process for setting (arranging) various objects such as maps (objects composed of primitive surfaces such as polygons, free-form surfaces or subdivision surfaces) in the object space. More specifically, the position and rotation angle (direction) of the object in the world coordinate system are determined, and the rotation angle (rotation around the X, Y, and Z axes) is determined at that position (X, Y, Z). Place the object.
[0048]
The object space setting unit 110 according to the present embodiment includes an object (an object including a plurality of intersecting primitive surfaces) including a plurality of primitive surfaces (polygon, free-form surface, subdivision surface, etc.) radially arranged from the reference line. ) Is set in the object space. In the present embodiment, by using an object having such a shape, a realistic expression of an irregular display object such as a flame or smoke has been successfully achieved.
[0049]
Note that this object may include a primitive surface (base primitive surface; J-th primitive surface in a broad sense; the same applies to the following description) that intersects a plurality of primitive surfaces arranged radially. By providing such a primitive surface, an image occupying a certain area can be displayed even when the object is viewed from above, and the realism of the generated image can be increased.
[0050]
The α value setting unit 112 is a relative direction relationship between one or a plurality of primitive planes included in an object and a virtual camera direction (for example, a line-of-sight direction) (a relative relationship between a primitive plane direction and a virtual camera direction). The α value of the primitive surface is set according to the angle formed by these orientations, the inner product value obtained from these orientations, and the relationship determined by these angles, inner product values and mathematically equivalent parameters, etc. To do.
[0051]
More specifically, for example, a vector representing the orientation of the virtual camera (a three-dimensional vector representing the orientation or a two-dimensional vector obtained by projecting this three-dimensional vector onto a given plane), and the orientation of the primitive surface An angle (the inner product value of these vectors) formed with a vector (a vector in a direction along the primitive surface, a vector orthogonal to the primitive surface, a three-dimensional vector, or a two-dimensional vector) The α value is obtained on the basis of (1), and this α value is given to the primitive surface itself as the representative α value, or is given to the vertex of the primitive surface as the vertex α value.
[0052]
In this case, in this embodiment, as the primitive plane of the object (vector parallel to the primitive plane) and the direction of the virtual camera (gaze direction) become parallel, an α value that makes the primitive plane more transparent is obtained. Set to the primitive surface. In other words, an α value is set for the primitive surface such that the primitive surface becomes more opaque as the object's primitive surface and the orientation of the virtual camera are orthogonal.
[0053]
The α value (A value) is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as mask information, translucency (equivalent to transparency and opacity), bump information, and the like.
[0054]
The particle processing unit 114 generates a particle primitive (for example, a flame particle or smoke particle primitive) for representing an irregular display object (for example, flame, smoke, water, explosion) whose shape is deformed over time. A process of sequentially generating, moving, or extinguishing is performed. More specifically, a process of randomly changing the generation amount, generation position, movement state (speed, acceleration, etc.) or lifetime of the particle primitive is performed. As a result, an irregular display such as a flame can be expressed realistically.
[0055]
The particle processing unit 114 of the present embodiment performs processing for generating a plurality of particle primitives that disappear at a given lifetime in each particle area of a plurality of particle areas (particle existence areas). In addition, processing is performed to limit the movement of these particle primitives so that they do not go outside the generated particle area.
[0056]
When an object is composed of a plurality of primitive surfaces arranged radially from the reference line, the particle area can be divided using these primitive surfaces.
[0057]
The particle primitive may be expressed by a primitive surface (sprite polygon) to which a texture of a picture such as flame or smoke is mapped, or may be expressed by a primitive point or a primitive line.
[0058]
The drawing order determination unit 116 determines the drawing order for the primitive plane of the object according to the relative direction relationship between one or more primitive planes included in the object and the orientation of the virtual camera. Then, the primitive planes are sorted in the determined drawing order. The drawing order determination unit 116 also determines the drawing order for the above-described particle area.
[0059]
In this case, when the relative directional relationship (inner product value) between the primitive surface and the orientation of the virtual camera is obtained by the α value setting unit 112, the obtained relative directional relationship (inner product value). It is desirable to determine the drawing order for the primitive surface and particle area based on By doing so, the processing load can be reduced.
[0060]
In addition, when there are a plurality of objects including a plurality of primitive surfaces arranged radially from the reference line, the drawing order determination unit 116 also determines the drawing order of the plurality of objects. More specifically, these objects are sorted by, for example, the Z sort method (sort by depth value).
[0061]
The drawing unit 120 performs an image drawing process based on the results of various processes performed by the processing unit 100. For example, when generating a so-called three-dimensional image, first, geometric processing such as coordinate conversion, clipping processing, perspective conversion, or light source calculation is performed, and based on the processing result, primitive surface data (primitive surface vertex) (Position coordinates, texture coordinates, color (luminance) data, normal vector, α value, etc.) are created. Based on this primitive surface data (data of primitive surfaces such as polygons, free-form surfaces or subdivision surfaces; drawing data), an image of the object (one or a plurality of primitive surfaces) after the geometry processing is drawn buffer 174 ( The image data is drawn in a pixel buffer such as a frame buffer or a work buffer. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated.
[0062]
The drawing unit 120 according to the present embodiment draws the primitive surface (primitive surface data) included in the object in the drawing order determined by the drawing order determination unit 116.
[0063]
In the rendering process in the rendering unit 120, pixels are obtained by a depth comparison method (for example, Z buffer method) using a depth buffer (for example, Z buffer or stencil buffer) in which depth information (for example, Z value) is stored. It is desirable to perform hidden surface removal in units.
[0064]
The drawing unit 120 includes a texture mapping unit 122 and an α synthesis unit 124.
[0065]
The texture mapping unit 122 performs processing for mapping the texture stored in the texture storage unit 176 to the object.
[0066]
Here, in the present embodiment, the texture storage unit 176 stores data of a compressed movie texture (compressed movie) including a series of first to Nth compressed textures (first to Nth compressed frame images).
[0067]
A decompression unit (not shown) performs decompression processing based on the compressed movie texture data, and the texture mapping unit 122 decompresses the series of first to Nth compressed textures. Processing for sequentially mapping the Nth expanded texture (first to Nth expanded frame images) to the object is performed.
[0068]
In this embodiment, when an object is composed of a plurality of primitive surfaces arranged radially from the reference line, a common texture is used for the plurality of primitive surfaces. For example, when data of a series of movie textures (for example, a movie texture representing a flame picture) is stored in the texture storage unit 176, this series of movie textures is applied to all primitive surfaces included in the object. Make mapping.
[0069]
Note that the unit for mapping the texture may be a single primitive surface or a plurality of primitive surfaces. Alternatively, a primitive surface obtained by further dividing one primitive surface may be used.
[0070]
The α synthesis unit 124 performs α synthesis processing (α blending, α addition, α subtraction, or the like) based on the α value (A value). For example, when the α synthesis is α blending, a synthesis process as shown in the following equation is performed.
[0071]
R Q = (1-α) × R 1 + Α × R 2 (1)
G Q = (1-α) × G 1 + Α × G 2 (2)
B Q = (1-α) × B 1 + Α × B 2 (3)
Where R 1 , G 1 , B 1 Are the R, G, B components of the color (luminance) of the image (background image) already drawn in the drawing buffer 174, and R 2 , G 2 , B 2 Are the R, G, and B components of the color of the object (primitive) to be drawn in the drawing buffer. R Q , G Q , B Q Are the R, G, B components of the color of the image obtained by α blending.
[0072]
In this embodiment, the α composition unit 124 performs α composition processing based on the α value set on the primitive surface by the α value setting unit 112.
[0073]
More specifically, the α value setting unit 112 sets a representative α value of the primitive surface for the primitive surface. Based on the representative α value, the α value of the vertex (composition point) of the object (primitive surface) is obtained. Then, an alpha value of each pixel (dot) of the object (object after perspective transformation) is obtained by the interpolation process based on the alpha value of the vertex, and an alpha synthesis process is performed based on the obtained alpha value of each pixel. Done.
[0074]
Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or not only the single player mode but also a multiplayer mode in which a plurality of players can play. The system may also be provided.
[0075]
Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated using a plurality of terminals (game machine, mobile phone).
[0076]
2. Features of this embodiment
Next, features of the present embodiment will be described with reference to the drawings.
[0077]
In the following, the case where the present embodiment is applied to the expression of flame will be mainly described as an example, but the present embodiment can also be applied to image expression other than the flame. In the present embodiment, the case where the primitive surface is a polygon will be mainly described as an example, but the primitive surface of the present embodiment is not limited to a polygon.
[0078]
2.1 Object structure
In the present embodiment, an object OB having a configuration as shown in FIG. 2 is used to represent an irregular display object such as a flame.
[0079]
This object OB includes polygons PL1, PL2, PL3, and PL4 (first to Nth primitive surfaces in a broad sense, which are radially arranged from a reference line RL (center line)). Also included are polygons PL0 (PL0-1 to PL0-4, which are intersected so as to be in contact with the end sides (lower end sides) of these polygons PL1 to PL4.
[0080]
3A to 3C show examples of textures (movie textures) used for texture mapping of the object OB. These textures are textures that express flames, and by continuously playing a movie of these series of textures, it is possible to realistically represent how the flames are burning while shaking.
[0081]
In the present embodiment, common textures shown in FIGS. 3A to 3C are used in texture mapping for the polygons PL0 (PL0-1 to PL0-4), PL1, PL2, PL3, and PL4. Specifically, the series of textures in FIGS. 3A to 3C are mapped to a pair of polygons PL1 and PL3. Similarly, these series of textures are mapped to polygon PL2 and PL4 pairs, PL0-1 and PL0-2 pairs, and PL0-3 and PL0-4 pairs, respectively.
[0082]
3A to 3C is a direction in which the direction of the arrow indicated by B1 in FIGS. 3A to 3C matches the direction of the arrows indicated by B2 to B9 in FIG. Mapping.
[0083]
In this way, even when the object OB is viewed from the virtual camera VC in various positions and directions as shown by C1 to C8 in FIG. 2, the flame images as shown in FIGS. Will always be visible.
[0084]
For example, when the object OB is viewed from the virtual camera VC at the position C1, images in which the textures of FIGS. 3A to 3C are mapped to the polygons PL2 and PL4 can be seen. When the object OB is viewed from the virtual camera VC at the position C3, images in which the textures of FIGS. 3A to 3C are mapped to the polygons PL1 and PL3 can be seen. When the object OB is viewed from the virtual camera VC at the position C5 (directly above), the textures shown in FIGS. 3A to 3C are displayed on the polygons PL0-1, PL0-2, PL0-3, and PL0-4. The image that is mapped becomes visible.
[0085]
In this way, it is possible to show the object OB as if it were a three-dimensional shape having a volume, despite the so-called split shape (cross shape). Accordingly, it becomes possible to realistically represent an indefinite display such as a flame with a small number of polygons, and a realistic image can be generated with a small processing load.
[0086]
The shape of the object OB is not limited to the shape shown in FIG.
[0087]
For example, as shown in FIGS. 4A and 4B (views of the object OB from above), polygons PL1 to 8 and PL1 to PL3 may be arranged radially from the reference line RL. That is, the number of polygons arranged radially and the manner of arrangement are arbitrary.
[0088]
Further, polygons other than the radially arranged polygons may be provided in the object. For example, in FIG. 2, PL0 is provided as such a polygon. In this case, in FIG. 2 and FIG. 4C (side view), the polygon PL0 that intersects with the edges of the polygons PL1 to PL4 is provided, but FIG. 4D (side view). As shown in FIG. 4, a polygon PL0 ′ that intersects between the upper and lower sides of the polygons PL1 to PL4 may be provided.
[0089]
2.2 Setting the α value
Now, when a flame image is generated using an object OB as shown in FIG. 2, it has been found that there are the following problems.
[0090]
For example, when the virtual camera VC is at a position as shown in FIG. 5A, an image as shown in FIG. 5B is generated. That is, an image on a line drawn with the color of the polygon PL1 is displayed between the images of the polygons PL2 and PL4.
[0091]
Further, when the virtual camera VC is at a position as shown in FIG. 5C, an image as shown in FIG. 5D is generated. That is, an image in which the polygons PL1 and PL2 and the polygons PL3 and PL4 are semitransparently synthesized with the same α value is generated. Therefore, there is a difference in color intensity between the area of the polygon PL2 and the area where the polygons PL1 and PL2 overlap, and between the area of the polygon PL4 and the area where the polygons PL3 and PL4 overlap. It will stand out.
[0092]
As a result, when an image is generated without any contrivance using the object OB having the shape shown in FIG. 2, polygon lines can be seen as the virtual camera VC moves around the object OB. There arises a problem that a difference between a dark portion and a light portion becomes conspicuous. For this reason, the player is informed that the object OB is not actually a three-dimensional object having a volume, but a split-shaped object as shown in FIG. 2, and the virtual reality of the player is reduced. End up.
[0093]
Therefore, in the present embodiment, the following method is adopted to solve such a problem.
[0094]
That is, in this embodiment, as shown in FIG. 6A, the angle θ (or cos θ) formed by the polygon PL1 (PL2 to PL4) of the object OB and the virtual camera VC. In a broad sense, a relative directional relationship. However, the α values of the polygons PL1 to PL4 are set in accordance with the same.
[0095]
For example, in FIG. 6B, the orientation of the virtual camera VC is parallel to the polygon PL1 (PL3) (orthogonal to PL2, 4), and θ is 0 degree. In this case, the α value of the polygon PL1 (PL3) is set to αMIN (minimum value, for example, 0.0), and PL1 appears to be more transparent. On the other hand, the α value of the polygons PL2 and PL4 is set to αMAX (maximum value, for example, 1.0), and PL2 and PL4 appear to be more opaque. By doing in this way, the color line of the polygon PL1 that was conspicuous in FIG. 5B becomes inconspicuous, and a more natural image can be generated.
[0096]
In FIG. 6C, the orientation of the virtual camera VC is the orientation between the polygons PL1 and PL4, and θ is, for example, 45 degrees. In this case, both the α value of the polygon PL1 (PL3) and the α value of PL4 (PL2) are set to, for example, an average value of αMIN and αMAX. Therefore, the difference between the dark portion and the light portion that are conspicuous in FIG. 5D becomes inconspicuous. As a result, it is possible to prevent a problem that the player is informed that the object OB has a split shape, and a more natural and realistic image can be generated.
[0097]
In FIG. 6D, the orientation of the virtual camera VC is parallel to the polygon PL4 (PL2) (orthogonal to PL1, 3), and θ is 90 degrees. In this case, the α value of the polygon PL4 (PL2) is set to αMIN, and PL4 appears to be more transparent. On the other hand, the α value of the polygons PL1 and PL3 is set to αMAX, and PL1 and PL3 appear to be more opaque. Thereby, it is possible to solve the problem that the color line of the polygon PL4 is conspicuously seen.
[0098]
Next, a specific method for setting the α value will be described in more detail with reference to the flowchart of FIG.
[0099]
First, vectors FL, FX, FY, and FZ are obtained (step S1).
[0100]
Here, as shown in FIG. 8, the vector FL is a unit vector that starts from the center point CP (representative point, the intersection of the reference line RL and the polygon PL0) of the object OB and faces the virtual camera VC.
[0101]
The vector FX is a unit vector (unit vector pointing in a direction along the plane of PL1, 3) that starts at the center point CP and is orthogonal to the polygons PL2, PL4.
[0102]
The vector FY is a unit vector that starts from the center point CP and is orthogonal to the polygon PL0.
[0103]
The vector FZ is a unit vector (unit vector pointing in a direction along the plane of PL2, 4) that starts from the center point CP and is orthogonal to the polygons PL1, PL3.
[0104]
In other words, these vectors FX, FY, and FZ are unit vectors in the X, Y, and Z axis directions in the local coordinate system of the object OB with the center point CP (representative point) as the origin.
[0105]
Next, the inner product value of these vectors FX, FY, FZ and FL is obtained as in the following equation (step S2).
[0106]
INR0 = FY · FL (4)
INR1 = FX ・ FL (5)
INR2 = FZ · FL (6)
These inner product values INR0 to INR3 are 0 when the two vectors are orthogonal, and 1 or -1 when they are parallel.
[0107]
Next, the representative α value of the polygon is obtained based on the obtained inner product values INR0 to INR2 (step S3). More specifically, first, conversion as shown in the following equation is performed.
[0108]
INRα0 = 1−ABS (INR0) (7)
INRα1 = 1−ABS (INR1) (8)
INRα2 = 1−ABS (INR2) (9)
Here, ABS (X) is a function that returns the absolute value of the argument X as a return value. By performing transformations such as the above equations (7), (8), and (9), INRα0, INRα1, and INRα2 are 1 when the two vectors are orthogonal, and 0 when they are parallel. Become.
[0109]
The representative α values αP0 to αP4 of the polygons P0 to P4 are obtained as follows using these INRα0 to INRα2.
[0110]
αP0 = (1-INRα0) × A0 + A1 (10)
αP1 = INRα1 × INRα0 × A0 + A1 (11)
αP2 = INRα2 × INRα0 × A0 + A1 (12)
αP3 = INRα1 × INRα0 × A0 + A1 (13)
αP4 = INRα2 × INRα0 × A0 + A1 (14)
Here, A0 = αMAX−αMIN and A1 = αMIN.
[0111]
For example, when the vector FL in FIG. 8 is parallel to FY (when FL is orthogonal to FX and FZ), INR0 = 1, INR1 = 0, and INR2 = 0 from the above equations (4) to (6). From the above equations (7) to (9), INRα0 = 0, INRα1 = 1, and INRα2 = 1. Therefore, from the above formulas (10) to (14),
αP0 = A0 + A1 = αMAX
αP1 = αP2 = αP3 = αP4 = A1 = αMIN
It becomes.
[0112]
That is, since αP1 to αP4 which are α values of the polygons PL1 to PL4 are small (αMIN), PL1 to PL4 look more transparent when viewed from the upper virtual camera VC, and the lines PL1 to PL4 are conspicuous. Disappear. On the other hand, since αP0, which is the α value of the polygon PL0, increases (αMAX), the virtual camera VC can see an image of the flame texture mapped to PL0.
[0113]
When the vector FL is parallel to FX (when FL is orthogonal to FY and FZ), INR0 = 0, INR1 = 1, INR2 = 0 from the above equations (4) to (6), and the above equation From (7) to (9), INRα0 = 1, INRα1 = 0, and INRα2 = 1. Therefore, from the above formulas (10) to (14),
αP0 = αP1 = αP3 = A1 = αMIN
αP2 = αP4 = A0 + A1 = αMAX
It becomes.
[0114]
That is, αP0, 1, 3 which are α values of the polygons PL0, 1, 3 become smaller, so that PL0, 1, 3 appear more transparent when viewed from the virtual camera VC in the direction of the vector FX. The lines PL 0, 1, 3 become inconspicuous. On the other hand, αP2 and 4 which are α values of the polygons PL2 and PL4 become large, so that the virtual camera VC can see the flame texture image mapped to PL2 and PL4.
[0115]
Also, when the vector FL is parallel to FZ (when FL is orthogonal to FX and FY), INR0 = 0, INR1 = 0, INR2 = 1 from the above equations (4) to (6), and the above equation From (7) to (9), INRα0 = 1, INRα1 = 1, and INRα2 = 0. Therefore, from the above formulas (10) to (14),
αP0 = αP2 = αP4 = A1 = αMIN
αP1 = αP3 = A0 + A1 = αMAX
It becomes.
[0116]
That is, αP0, 2, 4 which are α values of the polygons PL0, 2, 4 become smaller, so PL0, 2, 4 appear more transparent when viewed from the virtual camera VC in the direction of the vector FZ. The lines PL0, 2, 4 become inconspicuous. On the other hand, αP1 and 3 which are α values of the polygons PL1 and PL3 become large, and thus the virtual camera VC can see an image of the flame texture mapped to PL1 and PL3.
[0117]
Next, as shown in step S4 of FIG. 7, the vertex α value of the object OB (polygon) is obtained based on the obtained representative α values αP0 to α4 of the polygons PL0 to PL4. More specifically, given arithmetic processing (for example, averaging processing) is performed based on the representative α value set for one or a plurality of polygons to which the vertex of the object OB belongs, and the α value of the vertex of the object OB is obtained. .
[0118]
For example, in FIG. 9A, the vertex α values αV1, αV2, αV3, and αV4 of the vertices VX1, 2, 3, and 4 can be obtained by the following equations.
[0119]
αV1 = αP4 (15)
αV2 = (αP1 + αP2 + αP3 + αP4) / 4 (16)
αV3 = (αP0 + αP1 + αP2 + αP3 + αP4) / 5 (17)
αV4 = (αP0 + αP4) / 2 (18)
That is, as shown in FIG. 9A, the vertex VX1 belongs only to the polygon PL4. Therefore, the α value αV1 of the vertex VX1 becomes αP4, which is the representative α value of PL4 (formula (15)).
[0120]
The vertex VX2 belongs to the polygons PL1, 2, 3, and 4. Therefore, the α value αV2 of the vertex VX2 is an average value of αP1 to α4 that are representative α values of PL1 to PL4 (formula (16)).
[0121]
The vertex VX3 belongs to the polygons PL0, 1, 2, 3, and 4. Therefore, the α value αV3 of the vertex VX3 is an average value of αP0 to α4 that are representative α values of PL0 to PL4 (formula (17)).
[0122]
The vertex VX4 belongs to the polygons PL0 and PL4. Therefore, the α value αV4 of the vertex VX4 is an average value of αP0 and 4 which are representative α values of PL0 and PL4 (formula (18)).
[0123]
If the vertex α value is obtained as described above, the α value smoothly changes at the boundary of the polygon. Therefore, for example, even when the virtual camera moves around the object OB, the boundary of the polygon becomes inconspicuous when viewed from the virtual camera, and a more natural image can be generated.
[0124]
As shown in FIG. 9B, the α value αPIX of each pixel (dot) of the object (object after perspective transformation, polygon) is obtained by interpolating the vertex α values αV1 to α4 (for example, linear interpolation). Can be sought. Based on the obtained α value αPIX, α composition processing in units of pixels can be realized. In this case, the process for obtaining the α value of each pixel can be realized by a function of a drawing processor (such as a Gouraud shading function).
[0125]
2.3 Determination of drawing order
In the present embodiment, the polygon rendering order is determined by the method described below, and the polygons are rendered in the rendering buffer according to the determined rendering order. In this case, in the present embodiment, the polygon is drawn in the drawing buffer while performing the α composition processing (translucent processing) based on the α value obtained by the above-described method.
[0126]
For example, as shown in FIG. 10A, consider a case where objects OB1 to OB4 having the shape of FIG. 2 are arranged in the object space.
[0127]
In this case, in the present embodiment, first, based on the depth value (Z value) in the viewpoint coordinate system of the virtual camera VC, the drawing order for the objects OB1 to OB4 is changed as indicated by D1 in FIG. decide. That is, the Z sort of the objects OB1 to OB4 is performed. For example, the drawing order in the case of FIG. 10A is the order of OB4, OB1, OB3, and OB2.
[0128]
In this embodiment, as indicated by D2 to D5 in FIG. 10B, the drawing order of polygons included in these objects OB1 to OB4 is determined, and these polygons are sorted.
[0129]
In the case of FIG. 10A, first, polygons included in the innermost object OB4 are drawn in descending order of drawing priority. Next, the polygons included in OB1 are drawn in descending order of drawing priority. Next, the polygons included in OB3 are drawn in descending order of drawing priority. Finally, the polygons included in the foremost OB2 are drawn in descending order of drawing priority.
[0130]
By drawing a polygon by the above-described method, it is possible to realize an α synthesis process for a polygon without contradiction. Further, compared to the method of sorting all the polygons of the objects OB1 to OB4 at a time, the sorting processing load can be remarkably reduced.
[0131]
In this embodiment, the drawing order of polygons included in the object is determined by the following method.
[0132]
That is, in the present embodiment, as shown in FIG. 11A, an angle θ (cos θ formed by the polygon PL1 (PL2 to PL4) of the object OB and the virtual camera VC. In a broad sense, a relative directional relationship. Similarly, the drawing order of the polygons PL1 to PL4 is determined.
[0133]
For example, in FIG. 11A, θ is between 0 and 90 degrees, and the polygons PL1 and PL4 are located in front as viewed from the virtual camera VC. In this case, first the polygon PL0 is drawn, then the polygons PL2 and PL3 are drawn, and finally the polygons PL1 and PL4 are drawn.
[0134]
Note that there is no problem even if the polygon PL0 on the bottom surface is drawn first, unless there is a situation where the flame object OB is viewed from below. That is, even if the polygon PL0 is drawn first, an α composition process without contradiction can be realized. Therefore, the drawing priority order of the polygon PL0 is always set to the highest order (order of drawing first).
[0135]
Further, at the position of the virtual camera VC in FIG. 11A, the polygons PL1 and PL4 and PL2 and PL3 do not overlap each other, and it is not necessary to sort these polygons. Accordingly, the drawing order between the polygons PL1 and PL4 and the drawing order between the PL2 and PL3 are arbitrary.
[0136]
In FIG. 11B, θ is between 90 and 180 degrees, and the polygons PL3 and PL4 are positioned in front of the virtual camera VC. In this case, first the polygon PL0 is drawn, then the polygons PL1 and PL2 are drawn, and finally the polygons PL3 and PL4 are drawn. The drawing order between polygons PL1 and PL2 and between PL3 and PL4 is arbitrary.
[0137]
In FIG. 11C, θ is between 180 and 270 degrees, and the polygons PL2 and PL3 are located in front as viewed from the virtual camera VC. In this case, first the polygon PL0 is drawn, then the polygons PL1 and PL4 are drawn, and finally the polygons PL2 and PL3 are drawn. The drawing order between polygons PL1 and PL4 and between PL2 and PL3 is arbitrary.
[0138]
In FIG. 11D, θ is between 270 and 360 degrees, and the polygons PL1 and PL2 are located in front as viewed from the virtual camera VC. In this case, first the polygon PL0 is drawn, then the polygons PL3 and PL4 are drawn, and finally the polygons PL1 and PL2 are drawn. The drawing order between polygons PL3 and PL4 and between PL1 and PL2 is arbitrary.
[0139]
Thus, in the present embodiment, focusing on the fact that the shape of the object OB is fixed to a specific shape (a shape in which polygons are arranged radially from the reference line), the angle formed between the surface of the polygon and the orientation of the virtual camera The polygon rendering order is uniquely determined according to θ (inner product value, relative directional relationship). Therefore, since polygons can be sorted without determining the polygon depth value, the sort processing load can be significantly reduced.
[0140]
In the present embodiment, as described above, the α value of the polygon is also set according to the angle θ formed by the polygon surface and the orientation of the virtual camera. Therefore, since the angle θ (more specifically, the inner product value) used for obtaining the α value can be effectively used to determine the polygon rendering order, the processing load can be further reduced.
[0141]
2.4 Particle area
In order to make the image of the object OB more realistic, it is desirable to employ a particle system using particle primitives (particles composed of points, lines, or faces).
[0142]
Therefore, in the present embodiment, as shown in FIG. 12, a plurality of particle areas PTA1, PTA2, PTA3, and PTA4 (particle existence areas) are set, and in these PTA1 to PTA1-4, particle primitives that disappear with a given lifetime Is generated.
[0143]
In FIG. 12, these particle areas PTA1 to PTA1 are divided by polygons PL1 to PL4 included in the object OB.
[0144]
In this way, if particle primitives are generated in each of the particle areas PTA1 to PTA4, compared to the case where the object OB is simply composed of only the polygons PL0 to PL4, there is a sense of volume and looks three-dimensional. You can express the flame. Thereby, the virtual reality of the player can be further improved.
[0145]
In the present embodiment, sprite polygons (polygons displayed on a billboard) to which textures representing particles are mapped are used as particle primitives. By doing so, the drawing load can be remarkably reduced as compared with the case where a large number of particles expressed by primitive points are generated to express a flame or the like. That is, a flame occupying a wider range can be expressed with a small number of primitives (number of polygons).
[0146]
However, primitive points, primitive lines, or the like may be used as particle primitives instead of sprite polygons.
[0147]
In order to realize more realistic particle representation, particle primitives are given various attributes such as color and alpha value (translucency), and particle primitives are generated, moved, and disappeared according to given rules. It is desirable to express an irregular flame. That is, the initial speed (initial moving direction) of the particle primitive is changed randomly, or the lifetime of the particle primitive is changed randomly. By doing so, it is possible to realize a realistic image expression that looks like a flame in the real world. The disappearance of the particle primitive can be realized by controlling the α value of the particle primitive so that the particle primitive gradually becomes transparent with time.
[0148]
Now, when the particle area is provided and the particle primitive is generated as described above, it becomes a problem how to determine the drawing order for the particle areas PTA1 to PTA4 (particle primitive).
[0149]
In the present embodiment, the drawing order for the particle area is also determined according to the relative directional relationship (angle θ, inner product value) between the polygon surface and the orientation of the virtual camera.
[0150]
For example, in FIG. 13A, θ is between 0 and 90 degrees, and the polygons PL1 and PL4 are located on the front side when viewed from the virtual camera VC. In this case, the polygon PL0 is first drawn, and then the particle primitive in the particle area PTA3 is drawn. The polygons PL2 and PL3 are drawn, and then the particle primitives in the particle areas PTA2 and 4 are drawn. Then, polygons PL1 and PL4 are drawn, and finally a particle primitive in the particle area PTA1 is drawn.
[0151]
The drawing order between PL2 and PL3, between PTA2 and PTA4, and between PL1 and PL4 is arbitrary. In each particle area, it is desirable to draw particle primitives while performing Z-sorting.
[0152]
In FIG. 13B, θ is between 90 and 180 degrees, and the polygons PL3 and PL4 are located in front as viewed from the virtual camera VC. In this case, the polygon PL0 is first drawn, and then the particle primitive in the particle area PTA2 is drawn. The polygons PL1 and PL2 are drawn, and then the particle primitives in the particle areas PTA1 and 3 are drawn. Then, the polygons PL3 and PL4 are drawn, and finally the particle primitive in the particle area PTA4 is drawn. The drawing order between PL1 and PL2, between PTA1 and PTA3, and between PL3 and PL4 is arbitrary.
[0153]
In FIG. 14A, θ is between 180 and 270 degrees, and the polygons PL2 and PL3 are located in front as viewed from the virtual camera VC. In this case, the polygon PL0 is first drawn, and then the particle primitive in the particle area PTA1 is drawn. The polygons PL1 and PL4 are drawn, and then the particle primitives in the particle areas PTA2 and 4 are drawn. Then, the polygons PL2 and PL3 are drawn, and finally the particle primitive in the particle area PTA3 is drawn. The drawing order between PL1 and PL4, between PTA2 and PTA4, and between PL2 and PL3 is arbitrary.
[0154]
In FIG. 14B, θ is between 270 and 360 degrees, and the polygons PL1 and PL2 are located in front as viewed from the virtual camera VC. In this case, the polygon PL0 is first drawn, and then the particle primitive in the particle area PTA4 is drawn. The polygons PL3 and PL4 are drawn, and then the particle primitives in the particle areas PTA1 and 3 are drawn. The polygons PL1 and PL2 are drawn, and finally the particle primitive in the particle area PTA2 is drawn. The drawing order between PL3 and PL4, between PTA1 and PTA3, and between PL1 and PL2 is arbitrary.
[0155]
Note that the directional relationship (angle θ) between the polygon surface and the virtual camera VC is specifically determined by the method shown in FIG.
[0156]
For example, in FIG. 15, FL is a unit vector starting from the center point CP of the object OB and facing the direction of VC, FX is a unit vector starting from CP and orthogonal to PL2 and PL4, and FZ is the starting point of CP. And unit vectors orthogonal to PL1 and PL3 (see FIG. 8).
[0157]
In the present embodiment, the inner product values INR1 and INR2 of the following equation are obtained using these vectors.
[0158]
INR1 = FX ・ FL (19)
INR2 = FZ · FL (20)
When INR1> 0 and INR2> 0, it is determined that the virtual camera VC is positioned in front of PL1 and PL4, and the drawing order is as shown in FIG.
[0159]
If INR1 ≦ 0 and INR2> 0, it is determined that the virtual camera VC is positioned in front of PL3 and PL4, and the drawing order is as shown in FIG. 13B.
[0160]
When INR1 ≦ 0 and INR2 ≦ 0, it is determined that the virtual camera VC is positioned in front of PL2 and PL3, and the drawing order is the order shown in FIG.
[0161]
When INR1> 0 and INR2 ≦ 0, it is determined that the virtual camera VC is positioned in front of PL1 and PL2, and the drawing order is as shown in FIG. 14B.
[0162]
In this case, in the present embodiment, as these inner product values INR1, INR2 (expressions (19), (20)), inner product values INR1, INR2 (expressions (5), (6)) obtained at the time of setting the α value. ) Can be used as is. By doing so, the inner product values INR1 and INR2 obtained at the time of setting the α value can be used effectively, and the processing load can be reduced.
[0163]
2.5 Particle generation
In this embodiment, as shown in FIG. 16, particle primitive generators G1 to G4 (occurrence locations) are set for the respective particle areas PTA1 to PTA4. The generators G1 to G4 generate particle primitives having a given lifetime at a given initial speed.
[0164]
For example, the area of the particle area PTA1 can be defined as (X0, Z0), (X0 + XSZ, Z0 + ZSZ). In this case, PTA1 is defined so that the area of the particle area PTA1 does not overlap the polygons PL1 and PL4 dividing PTA1.
[0165]
At this time, the positions GP1 to GP4 of the generators G1 to G4 can be expressed by the following equations.
[0166]
GP1
= (X0 + XSZ × VLMIN, Z0 + ZSZ × VLMIN) (21)
GP2
= (X0 + XSZ × VLMAX, Z0 + ZSZ × VLMIN) (22)
GP3
= (X0 + XSZ × VLMIN, Z0 + ZSZ × VLMAX) (23)
GP4
= (X0 + XSZ × VLMAX, Z0 + ZSZ × VLMAX) (24)
Here, VLMIN and VLMAX are parameters for defining the position of the generator, and a relationship of 0 <VLMIN <VLMAX is established.
[0167]
By determining the position as in the above equations (21) to (24), the generators G1 to G4 are positioned inside the particle area.
[0168]
There are various parameter setting methods for particle primitives. In this embodiment, in order to reduce the processing load, only the following parameters are provided as attribute information of each particle primitive. ing.
(PX, PY, PZ), (VCX, VCY, VCZ), LIFE
Here, (PX, PY, PZ) are parameters indicating the generation position of the particle primitive. That is, it is a parameter representing one of the above GP1 to GP4.
[0169]
Further, (VCX, VCY, VCZ) is a parameter representing the initial velocity of the particle primitive, and LIFE is a parameter representing the current life (age) of the particle primitive.
[0170]
As another parameter, LIFEMAX is prepared in this embodiment. This LIFEMAX is a parameter representing the lifetime of the particle primitive.
[0171]
FIG. 17 shows a flowchart of the particle processing of this embodiment.
[0172]
First, it is determined whether or not it is frame update (drawing buffer update) (step S21). This can be determined based on an interrupt generated at the timing of vertical synchronization by the hardware of the image generation system.
[0173]
If it is determined that the frame is to be updated, the particle number NUM is set to 0 (step S22). Then, the LIFE of the NUM-th particle primitive is incremented by 1 (step S23).
[0174]
Next, it is determined whether LIFE> LIFEMAX (step S24). If LIFE> LIFEMAX, LIFE is reset to 0, and the generation positions PX, PY, PZ and initial speeds VCX, VCY, VCZ are reset (step S25). That is, the generation position and initial velocity of the particle primitive exceeding the lifetime are reset. In this case, the generator for generating the particle primitive and the initial speed of the particle primitive are determined based on a random number.
[0175]
Next, the drawing position (X, Y, Z) of the particle primitive is determined as in the following equation (step S26).
[0176]
X = PX + VCX × LIFE (25)
Y = PY + VCY × LIFE (26)
Z = PZ + VCZ × LIFE (27)
That is, the position of each particle primitive is specified by its generation position, initial velocity, and LIFE.
[0177]
Next, the particle number NUM is incremented by 1 (step S27). Then, it is determined whether or not NUM> NUMMAX (step S28). If NUM ≦ NUMMAX, the process returns to step S23 to process the next particle primitive.
[0178]
On the other hand, if NUM> NUMMAX, NUM particle primitives are Z-sorted and drawn in the drawing buffer (step S29). Thereby, the drawing of the particle primitive in the frame is completed.
[0179]
When the particle primitive is generated as described above, there are the following problems. That is, if a particle primitive generated in one particle area goes out of the particle area and enters another particle area, the particle primitive is drawn in the wrong drawing order. There is a risk that.
[0180]
Therefore, in the present embodiment, as shown in FIG. 18A, the movement of the particle primitive is limited so that the particle primitive moves only within the particle area where the particle primitive is generated. As a result, as shown in FIG. 18A, for example, the particle primitive generated in the particle area PTA1 moves and disappears only in PTA1. Further, the particle primitive generated in the particle area PTA3 moves only within the PTA3 and disappears.
[0181]
In this embodiment, such movement limitation is realized by controlling the initial speed and life of the particle primitive.
[0182]
For example, in the present embodiment, the initial velocity is determined as follows when setting the initial conditions of the particle primitive or resetting the initial conditions in step S25 of FIG.
[0183]
For example, when the particle primitive is generated from the generator G1 as shown in FIG. 18B, the initial velocity (VCX, VCY, VCZ) of the particle primitive under the condition of VCX> 0 and VCZ> 0. ) Is determined by a random number.
[0184]
When the particle primitive is generated from the generator G2 as shown in FIG. 18C, the initial velocity (VCX, VCY, VCZ) of the particle primitive under the condition of VCX <0, VCZ> 0. ) Is determined by a random number.
[0185]
When the particle primitive is generated from the generator G3 as shown in FIG. 18D, the initial velocity (VCX, VCY, VCZ) of the particle primitive under the condition that VCX> 0 and VCZ <0. ) Is determined by a random number.
[0186]
Further, when the particle primitive is generated from the generator G4 as shown in FIG. 18E, the initial velocity (VCX, VCY, VCZ) of the particle primitive under the condition of VCX <0, VCZ <0. ) Is determined by a random number.
[0187]
Also, if the initial velocity is too high, the particle primitive may come out of the particle area immediately. For this reason, for example, for the initial velocity (VCX, VCY, VCZ) of the particle primitive generated from the generator G1, the following limitation is applied.
0 <ABS (VCX) × LIFEMAX <XSZ × (1-VLMIN) (28)
0 <ABS (VCZ) × LIFEMAX <ZSZ × (1-VLMIN) (29)
Here, ABS (X) is a function that returns the absolute value of X as a return value. Further, as described above, LIFEMAX is a parameter representing the life, XSZ and ZSZ are parameters for defining the particle area, and VLMIN is a parameter for defining the position of the generator.
[0188]
As described above, in this embodiment, it is succeeded to ensure that the particle primitive does not go out of the particle area only by setting or resetting the initial condition of the particle primitive.
[0189]
3. Processing of this embodiment
Next, a detailed example of the processing of this embodiment will be described using the flowcharts of FIGS. 19 and 20.
[0190]
First, flame objects (see FIG. 2) are Z-sorted in the viewpoint (camera) coordinate system (step S31). That is, as described with reference to FIGS. 10A and 10B, first, Z sort is performed on the flame objects OB1 to OB4.
[0191]
Next, the object number I = 0 is set (step S32). Then, a vector FL (see FIG. 8) is obtained based on the coordinates of the center point (representative point) of the I-th flame object and the coordinates of the virtual camera (step S33).
[0192]
Next, an inner product value of the vectors FX, FY, FZ on the local coordinate system of the I-th flame object and the obtained FL is obtained (step S34). Then, based on the calculated inner product value, the α value and drawing order for the flame polygon (PL0 to PL4) and the particle area (PTA1 to PTA4) are determined (step S35).
[0193]
Next, the base polygon (PL0) of the flame object is drawn (step S36). Then, the particle primitive in the particle area having the first drawing priority is drawn (step S37).
[0194]
Next, the first and second drawing polygons having the drawing priority are drawn (step S38). Then, the particle primitives in the second and third drawing priority order particle areas are drawn (step S39).
[0195]
Next, the 3rd and 4th drawing priority flame polygons are drawn (step S40). Then, the particle primitive in the particle area of the fourth drawing priority is drawn (step S41).
[0196]
Next, the object number I is incremented by 1 (step S42). Then, it is determined whether or not I> IMAX. If I ≦ IMAX, the process returns to step S33 in FIG. On the other hand, if I> IMAX, the process ends.
[0197]
4). Hardware configuration
Next, an example of a hardware configuration capable of realizing the present embodiment will be described with reference to FIG.
[0198]
The main processor 900 operates based on a program stored in the CD 982 (information storage medium), a program transferred via the communication interface 990, or a program stored in the ROM 950 (one of information storage media). Various processes such as processing, image processing, and sound processing are executed.
[0199]
The coprocessor 902 assists the processing of the main processor 900, has a product-sum calculator and a divider capable of high-speed parallel calculation, and executes matrix calculation (vector calculation) at high speed. For example, if a physical simulation for moving or moving an object requires processing such as matrix operation, a program operating on the main processor 900 instructs (requests) the processing to the coprocessor 902. )
[0200]
The geometry processor 904 performs geometry processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation, has a product-sum calculator and a divider capable of high-speed parallel computation, and performs matrix computation (vector computation). Run fast. For example, when processing such as coordinate transformation, perspective transformation, and light source calculation is performed, a program operating on the main processor 900 instructs the geometry processor 904 to perform the processing.
[0201]
The data decompression processor 906 performs a decoding process for decompressing the compressed image data and sound data, and a process for accelerating the decoding process of the main processor 900. As a result, a moving image compressed by the MPEG method or the like can be displayed on the opening screen, the intermission screen, the ending screen, or the game screen. Note that the image data and sound data to be decoded are stored in the ROM 950 and the CD 982 or transferred from the outside via the communication interface 990.
[0202]
The drawing processor 910 performs drawing (rendering) processing of an object composed of primitives (primitive surfaces) such as polygons and curved surfaces at high speed. When drawing an object, the main processor 900 uses the function of the DMA controller 970 to pass the object data to the drawing processor 910 and transfer the texture to the texture storage unit 924 if necessary. Then, the rendering processor 910 renders the object in the frame buffer 922 at high speed while performing hidden surface removal using a Z buffer or the like based on the object data and texture. The drawing processor 910 can also perform α blending (translucent processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. When an image for one frame is written in the frame buffer 922, the image is displayed on the display 912.
[0203]
The sound processor 930 includes a multi-channel ADPCM sound source and the like, and generates high-quality game sounds such as BGM, sound effects, and sounds. The generated game sound is output from the speaker 932.
[0204]
Operation data from the game controller 942 (lever, button, chassis, pad type controller, gun type controller, etc.), save data from the memory card 944, and personal data are transferred via the serial interface 940.
[0205]
The ROM 950 stores system programs and the like. In the case of an arcade game system, the ROM 950 functions as an information storage medium, and various programs are stored in the ROM 950. A hard disk may be used instead of the ROM 950.
[0206]
The RAM 960 is used as a work area for various processors.
[0207]
The DMA controller 970 controls DMA transfer between the processor and memory (RAM, VRAM, ROM, etc.).
[0208]
The CD drive 980 drives a CD 982 (information storage medium) in which programs, image data, sound data, and the like are stored, and enables access to these programs and data.
[0209]
The communication interface 990 is an interface for transferring data to and from the outside via a network. In this case, as a network connected to the communication interface 990, a communication line (analog telephone line, ISDN), a high-speed serial bus, or the like can be considered. By using a communication line, data transfer via the Internet becomes possible. Further, by using the high-speed serial bus, data transfer with other image generation systems becomes possible.
[0210]
All of the means of the present invention may be realized (executed) only by hardware, or only by a program stored in an information storage medium or a program distributed via a communication interface. Also good. Alternatively, it may be realized by both hardware and a program.
[0211]
When each means of the present invention is realized by both hardware and a program, the information storage medium stores a program for realizing each means of the present invention using hardware. Become. More specifically, the program instructs each processor 902, 904, 906, 910, 930, etc., which is hardware, and passes data if necessary. Each of the processors 902, 904, 906, 910, 930 and the like implements each unit of the present invention based on the instruction and the passed data.
[0212]
FIG. 22A shows an example in which the present embodiment is applied to an arcade game system (image generation system). The player enjoys the game by operating the gun-type controllers 1102 and 1103 and the like while viewing the game images displayed on the displays 1100 and 1101. Various processors and various memories are mounted on the built-in system board (circuit board) 1106. A program (data) for realizing each means of the present invention is stored in a memory 1108 which is an information storage medium on the system board 1106. Hereinafter, this program is referred to as a storage program (storage information).
[0213]
FIG. 22B shows an example in which the present embodiment is applied to a home game system (image generation system). The player enjoys the game by operating the gun-type controllers 1202 and 1204 while watching the game image displayed on the display 1200. In this case, the stored program (stored information) is stored in a CD 1206, which is an information storage medium that is detachable from the main system, or in memory cards 1208, 1209, and the like.
[0214]
FIG. 22C shows a host device 1300 and terminals 1304-1 to 1304-n connected to the host device 1300 via a network 1302 (a small-scale network such as a LAN or a wide area network such as the Internet). An example in which the present embodiment is applied to a system including (game machine, mobile phone, television) is shown. In this case, the storage program (storage information) is stored in an information storage medium 1306 such as a magnetic disk device, a magnetic tape device, or a memory that can be controlled by the host device 1300, for example. When the terminals 1304-1 to 1304-n can generate game images and game sounds stand-alone, the host device 1300 receives a game program and the like for generating game images and game sounds from the terminal 1304-. 1 to 1304-n. On the other hand, if it cannot be generated stand-alone, the host device 1300 generates game images and game sounds, which are transmitted to the terminals 1304-1 to 1304-n and output at the terminals.
[0215]
In the case of the configuration shown in FIG. 22C, each unit of the present invention may be realized by being distributed between a host device (server) and a terminal. Further, the above storage program (storage information) for realizing each means of the present invention may be distributed and stored in the information storage medium of the host device (server) and the information storage medium of the terminal.
[0216]
The terminal connected to the network may be a home game system or an arcade game system. When the arcade game system is connected to a network, the save information storage device can exchange information with the arcade game system and exchange information with the home game system. It is desirable to use (memory card, portable game device).
[0217]
The present invention is not limited to that described in the above embodiment, and various modifications can be made.
[0218]
For example, the shape of the object of the present invention is not limited to that described in FIGS. 2 and 4A to 4D, and various shapes can be adopted.
[0219]
Further, the α value setting method is not limited to the method described with reference to FIGS. 6A to 9B, and various modifications equivalent to this can be performed.
[0220]
Further, the method for determining the drawing order is not limited to the method described with reference to FIGS.
[0221]
Further, the particle primitive processing method is not limited to the method described with reference to FIGS.
[0222]
In the invention according to the dependent claims of the present invention, a part of the constituent features of the dependent claims can be omitted. Moreover, the principal part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.
[0223]
The present invention can also be applied to various games (such as fighting games, shooting games, robot battle games, sports games, competitive games, role playing games, music playing games, dance games, etc.).
[0224]
The present invention is also applicable to various image generation systems (game systems) such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, and a system board for generating game images. Applicable.
[Brief description of the drawings]
FIG. 1 is an example of a functional block diagram of an image generation system according to an embodiment.
FIG. 2 is a diagram showing an example of the shape of an object used in the present embodiment.
FIGS. 3A, 3B, and 3C are examples of textures (movie textures) mapped to objects.
FIGS. 4A to 4D are diagrams for explaining another example of the shape of an object.
FIGS. 5A to 5D are diagrams for explaining problems when the object having the shape of FIG. 2 is used.
6A to 6D are diagrams for explaining a method for setting an α value. FIG.
FIG. 7 is a flowchart for explaining a specific example of an α value setting method;
FIG. 8 is a diagram for explaining a specific example of an α value setting method;
FIGS. 9A and 9B are diagrams for explaining a method for obtaining the α value of a vertex and the α value of a pixel.
FIGS. 10A and 10B are diagrams for explaining sort processing according to the present embodiment.
FIGS. 11A to 11D are diagrams for explaining a method of determining a polygon rendering order according to a polygon plane and a virtual camera orientation.
FIG. 12 is a diagram for explaining setting of a particle area and generation of a particle primitive.
FIGS. 13A and 13B are diagrams for explaining a method for determining the drawing order of polygons and particle areas in accordance with the polygon plane and the orientation of the virtual camera.
FIGS. 14A and 14B are diagrams for explaining a method for determining the drawing order of polygons and particle areas in accordance with the polygon plane and the orientation of the virtual camera.
FIG. 15 is a diagram for explaining a method of determining a directional relationship between a polygon surface and a virtual camera direction using a vector inner product value;
FIG. 16 is a diagram for explaining a particle primitive generator;
FIG. 17 is a flowchart for explaining particle processing;
FIGS. 18A to 18E are diagrams for explaining a technique for restricting the movement of particle primitives.
FIG. 19 is a flowchart illustrating a detailed example of processing according to the present embodiment.
FIG. 20 is a flowchart illustrating a detailed example of processing according to the embodiment.
FIG. 21 is a diagram illustrating an example of a hardware configuration capable of realizing the present embodiment.
FIGS. 22A, 22B, and 22C are diagrams illustrating examples of various types of systems to which the present embodiment is applied.
[Explanation of symbols]
VC virtual camera
OB object
PL0 to PL4 polygon
RL reference line
FX, FY, FZ vectors
VX1 to VX4 vertex
PTA1-PTA4 particle area
CP center point
100 processor
110 Object space setting part
112 α value setting part
114 Particle processing unit
116 Drawing order determination unit
120 Drawing part
122 Texture mapping part
124 α synthesis unit
160 Operation unit
170 Storage unit
172 Main memory
174 Drawing buffer
176 texture storage
180 Information storage medium
190 Display
192 sound output section
194 Portable information storage device
196 Communication Department

Claims (7)

画像生成を行う画像生成システムであって、
第1〜第Mのパーティクル・エリアの各パーティクル・エリアにおいて、所与の寿命で消滅する複数のパーティクル・プリミティブを発生させる処理を行うパーティクル処理手段と、
前記第1〜第Mのパーティクル・エリアについての描画順序を決定する描画順序決定手段と、
描画順序の優先度の高いパーティクル・エリアから順に、該パーティクル・エリアで発生したパーティクル・プリミティブを描画する手段とを含み、
前記描画順序決定手段が、
前記第1〜第Mのパーティクル・エリアを区分けする第1〜第Nのプリミティブ面の中の少なくとも1つのプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、前記第1〜第Mのパーティクル・エリアについての描画順序、或いは前記第1〜第Mのパーティクル・エリア及び前記第1〜第Nのプリミティブ面についての描画順序を決定することを特徴とする画像生成システム。
An image generation system for generating an image,
Particle processing means for performing a process of generating a plurality of particle primitives that disappear at a given lifetime in each of the first to M-th particle areas;
Drawing order determining means for determining a drawing order for the first to Mth particle areas;
In descending order particle area priority of drawing order, look including a means for drawing the particles primitives generated by the particle area,
The drawing order determining means is
According to the relative direction relationship between at least one primitive surface among the first to Nth primitive surfaces that divide the first to Mth particle areas and the orientation of the virtual camera, An image generation system for determining a drawing order for M particle areas or a drawing order for the first to M-th particle areas and the first to N-th primitive surfaces .
請求項において、
前記パーティクル処理手段が、
前記第1〜第Mのパーティクル・エリアの中の第L(1≦L≦M)のパーティクル・エリアで発生したパーティクル・プリミティブが、該第Lのパーティクル・エリア内で移動するように、その移動制限することを特徴とする画像生成システム。
In claim 1 ,
The particle processing means is
The particle primitive generated in the Lth (1 ≦ L ≦ M) particle area in the first to Mth particle areas is moved so as to move in the Lth particle area. image generation system and limits the.
請求項において、
前記パーティクル処理手段が、
パーティクル・プリミティブの初期速度及び寿命の少なくとも一方の制御により、パーティクル・プリミティブの移動を制限することを特徴とする画像生成システム。
In claim 2 ,
The particle processing means is
An image generation system, wherein movement of particle primitives is limited by controlling at least one of an initial speed and a lifetime of particle primitives.
第1〜第Mのパーティクル・エリアの各パーティクル・エリアにおいて、所与の寿命で消滅する複数のパーティクル・プリミティブを発生させる処理を行うパーティクル処理手段と、
前記第1〜第Mのパーティクル・エリアについての描画順序を決定する描画順序決定手段と、
描画順序の優先度の高いパーティクル・エリアから順に、該パーティクル・エリアで発生したパーティクル・プリミティブを描画する手段としてコンピュータを機能させ
前記描画順序決定手段が、
前記第1〜第Mのパーティクル・エリアを区分けする第1〜第Nのプリミティブ面の中の少なくとも1つのプリミティブ面と仮想カメラの向きとの相対的な方向関係に応じて、前記第1〜第Mのパーティクル・エリアについての描画順序、或いは前記第1〜第Mのパーティクル・エリア及び前記第1〜第Nのプリミティブ面についての描画順序を決定することを特徴とするプログラム。
Particle processing means for performing a process of generating a plurality of particle primitives that disappear at a given lifetime in each of the first to M-th particle areas;
Drawing order determining means for determining a drawing order for the first to Mth particle areas;
A high particle area priority of drawing order sequentially, cause the computer to function as a means for drawing the particles primitives generated by the particle area,
The drawing order determining means is
According to the relative direction relationship between at least one primitive surface among the first to Nth primitive surfaces that divide the first to Mth particle areas and the orientation of the virtual camera, A program for determining a drawing order for M particle areas or a drawing order for the first to Mth particle areas and the first to Nth primitive surfaces .
請求項において、
前記パーティクル処理手段が、
前記第1〜第Mのパーティクル・エリアの中の第L(1≦L≦M)のパーティクル・エリアで発生したパーティクル・プリミティブが、該第Lのパーティクル・エリア内で移動するように、その移動制限することを特徴とするプログラム。
In claim 4 ,
The particle processing means is
The particle primitive generated in the Lth (1 ≦ L ≦ M) particle area in the first to Mth particle areas is moved so as to move in the Lth particle area. program and limits the.
請求項において、
前記パーティクル処理手段が、
パーティクル・プリミティブの初期速度及び寿命の少なくとも一方の制御により、パーティクル・プリミティブの移動を制限することを特徴とするプログラム。
In claim 5 ,
The particle processing means is
A program for restricting the movement of particle primitives by controlling at least one of the initial speed and lifetime of the particle primitives.
コンピュータにより読み取り可能な情報記憶媒体であって、請求項乃至のいずれかのプログラムを記憶したことを特徴とする情報記憶媒体。An information storage medium readable by a computer, the information storage medium characterized by storing one of the programs of Claims 4 to 6.
JP2001081317A 2001-03-21 2001-03-21 Image generation system, program, and information storage medium Expired - Fee Related JP4592043B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001081317A JP4592043B2 (en) 2001-03-21 2001-03-21 Image generation system, program, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001081317A JP4592043B2 (en) 2001-03-21 2001-03-21 Image generation system, program, and information storage medium

Publications (2)

Publication Number Publication Date
JP2002279446A JP2002279446A (en) 2002-09-27
JP4592043B2 true JP4592043B2 (en) 2010-12-01

Family

ID=18937448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001081317A Expired - Fee Related JP4592043B2 (en) 2001-03-21 2001-03-21 Image generation system, program, and information storage medium

Country Status (1)

Country Link
JP (1) JP4592043B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009151365A (en) * 2007-12-18 2009-07-09 Sumitomo Forestry Co Ltd Drawing device and drawing program
EP2736019A4 (en) 2011-07-20 2015-07-22 Zte Corp Method and device for generating animated wallpaper

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0371378A (en) * 1989-08-11 1991-03-27 Daikin Ind Ltd Method and device for display of transparency
JPH05210745A (en) * 1991-09-06 1993-08-20 Canon Inc Method and device for processing three-dimensional graphics
JPH06215152A (en) * 1992-11-06 1994-08-05 Canon Inc Method and device for processing image data
JP2000039130A (en) * 1998-05-19 2000-02-08 Nkk Corp Refuse incinerator with operation supporting device
JP2000197769A (en) * 1998-12-29 2000-07-18 Namco Ltd Game device and information recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0371378A (en) * 1989-08-11 1991-03-27 Daikin Ind Ltd Method and device for display of transparency
JPH05210745A (en) * 1991-09-06 1993-08-20 Canon Inc Method and device for processing three-dimensional graphics
JPH06215152A (en) * 1992-11-06 1994-08-05 Canon Inc Method and device for processing image data
JP2000039130A (en) * 1998-05-19 2000-02-08 Nkk Corp Refuse incinerator with operation supporting device
JP2000197769A (en) * 1998-12-29 2000-07-18 Namco Ltd Game device and information recording medium

Also Published As

Publication number Publication date
JP2002279446A (en) 2002-09-27

Similar Documents

Publication Publication Date Title
JP3777288B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4305903B2 (en) Image generation system, program, and information storage medium
JP4610748B2 (en) Image generation system, program, and information storage medium
JP4187192B2 (en) Image generation system, program, and information storage medium
JP3420985B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4245356B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4592043B2 (en) Image generation system, program, and information storage medium
JP4577968B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4743733B2 (en) Image generation system, program, and information storage medium
JP4528008B2 (en) Program, information storage medium, and image generation system
JP4707078B2 (en) Image generation system, program, and information storage medium
JP4574058B2 (en) Image generation system, program, and information storage medium
JP2001229403A (en) Game system and information storage medium
JP4229317B2 (en) Image generation system, program, and information storage medium
JP2002216167A (en) Image generation system, program and information storage medium
JP4592042B2 (en) Image generation system, program, and information storage medium
JP4412692B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4394211B2 (en) Image generation system and information storage medium
JP4698701B2 (en) Image generation system, program, and information storage medium
JP4592039B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP3431562B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4458607B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2002216165A (en) Image generation system, program and information storage medium
JP4632521B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2002216151A (en) Image generation system, program and information storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100609

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100809

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100913

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

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4592043

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

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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