Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4518643B2 - GAME SYSTEM AND INFORMATION STORAGE MEDIUM - Google Patents
[go: Go Back, main page]

JP4518643B2 - GAME SYSTEM AND INFORMATION STORAGE MEDIUM - Google Patents

GAME SYSTEM AND INFORMATION STORAGE MEDIUM Download PDF

Info

Publication number
JP4518643B2
JP4518643B2 JP2000219030A JP2000219030A JP4518643B2 JP 4518643 B2 JP4518643 B2 JP 4518643B2 JP 2000219030 A JP2000219030 A JP 2000219030A JP 2000219030 A JP2000219030 A JP 2000219030A JP 4518643 B2 JP4518643 B2 JP 4518643B2
Authority
JP
Japan
Prior art keywords
vector
reflection
reflection vector
coordinate system
axis
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
JP2000219030A
Other languages
Japanese (ja)
Other versions
JP2002032790A (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.)
Kabushiki Kaisha Bandai Namco Entertainment (also trading as Bandai Namco Entertainment Inc.)
Namco Ltd
Bandai Namco Entertainment Inc
Original Assignee
Kabushiki Kaisha Bandai Namco Entertainment (also trading as Bandai Namco Entertainment Inc.)
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 Kabushiki Kaisha Bandai Namco Entertainment (also trading as Bandai Namco Entertainment Inc.), Namco Ltd, Namco Bandai Games Inc filed Critical Kabushiki Kaisha Bandai Namco Entertainment (also trading as Bandai Namco Entertainment Inc.)
Priority to JP2000219030A priority Critical patent/JP4518643B2/en
Publication of JP2002032790A publication Critical patent/JP2002032790A/en
Application granted granted Critical
Publication of JP4518643B2 publication Critical patent/JP4518643B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、ゲームシステム及び情報記憶媒体に関する。
【0002】
【背景技術及び発明が解決しようとする課題】
従来より、仮想的な3次元空間であるオブジェクト空間内の所与の視点から見える画像を生成するゲームシステムが知られており、いわゆる仮想現実を体験できるものとして人気が高い。レーシングゲームを楽しむことができるゲームシステムを例にとれば、プレーヤは、車(オブジェクト)を操作してオブジェクト空間内で走行させ、他のプレーヤやコンピュータが操作する車と競争することで3次元ゲームを楽しむ。
【0003】
さて、このようなゲームシステムでは、プレーヤの仮想現実感の向上のために、よりリアルで高品質な画像を生成することが重要な技術的課題になっている。このため、オブジェクトの表面での鏡面反射(スペキュラー)についても、よりリアルに表現できることが望ましい。
【0004】
このような鏡面反射を実現する手法とし、従来より、フォン(Phong)、ブリン(Blinn)などのモデルが知られている。しかしながら、これらのモデルはいずれも等方性反射のモデルであり、反射光の強度分布は等方的なものになっている。
【0005】
一方、オブジェクトの表面上に一定方向の傷がある場合には、反射光がその傷に影響され、特定の方向に強く反射される現象が生じる。例えば、同心円状の傷がついてるオーディオ機器のつまみに特有の明暗パターンが見えたり、人間の髪の毛に「天使の輪」が見えたりする現象である。
【0006】
このような特有の明暗パターンを表現するには、いわゆる異方性反射のモデルが必要になる。そして、このような異方性反射モデルの従来例については、例えば”「異方性反射モデルに関する検討」,高木・横井等,グラフィックスとCAD,11-1,1983.10.17”に開示されている。
【0007】
例えばオブジェクト表面に図1(A)に示すような傷があるとする。図1(A)の点Pの部分を局所的に見ると、図1(B)に示すようになる。ここで、面に垂直な法線ベクトルをNとし、傷に水平なベクトルをUとし、傷に垂直なベクトルをVとする。また光源LSからの光源ベクトルLの点Pでの反射ベクトルをRとする。この時、反射ベクトルRは下式(1)のようになる。
【0008】
R=2(N・L)N−L (1)
一般的な反射モデルでは、上式(1)で求められた反射ベクトルRと視線ベクトルとのなす角度に基づき鏡面反射光(スペキュラー成分)の強度(輝度)が決定される。
【0009】
そして、鏡面反射光自体を扁平な楕円体の強度分布でモデル化したのが図2(A)に示す大平のモデルである。即ち視線ベクトルEが楕円体ELPと交わる点までの長さDEに基づいて鏡面反射光の強度を求める。
【0010】
一方、図2(B)に示す高木・横井のモデルでは、ブリンの微少平面モデルに異方性を持たせ、微少平面の分布を楕円体モデルで解いている。
【0011】
しかしながら、このような大平や高木・横井のモデルでは、楕円体モデルを用いるため、鏡面反射光の強度の計算に多大な処理時間を要する。従って、リアルタイム処理が強く要求されるゲームシステムには不向きなモデルである。
【0012】
また、大平や高木・横井のモデルでは、スカラー量である鏡面反射光の強度が計算結果として出力される。従って、スペキュラー形状(ハイライト形状)がポリゴン形状の影響を受けて不自然な形になるという問題を、いわゆるスペキュラーマッピングの手法を利用して解決できない。
【0013】
この場合、ノンリアルタイム処理のCG(Computer Graphics)のようにピクセル単位で鏡面反射光の強度を計算すれば、上記問題を解決できるが、これは処理時間の更なる増加という問題を招く。
【0014】
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、異方性反射の表現を少ない処理負担で実現できるゲームシステム及び情報記憶媒体を提供することにある。
【0015】
【課題を解決するための手段】
上記課題を解決するために、本発明は、画像生成を行うゲームシステムであって、光源情報と法線情報とに基づいてオブジェクトの各構成点での反射ベクトルを求める手段と、前記反射ベクトルの方向を異方性反射の方向に変化させて、第2の反射ベクトルを求める手段と、前記第2の反射ベクトルと視点情報とに基づいてオブジェクトのシェーディング演算を行う手段とを含むことを特徴とする。また本発明に係る情報記憶媒体は、コンピュータにより使用可能な情報記憶媒体であって、上記手段を実行するためのプログラムを含むことを特徴とする。また本発明に係るプログラムは、コンピュータにより使用可能なプログラム(搬送波に具現化されるプログラムを含む)であって、上記手段を実行するための処理ルーチンを含むことを特徴とする。
【0016】
本発明によれば、光源情報(例えば光源ベクトル、光源位置)と法線情報(例えば法線ベクトル、面の方向を表す情報)に基づいて、オブジェクトの各構成点(例えば頂点、プリミティブ点)での反射ベクトルが求められる。そして、この反射ベクトルを、異方性反射の方向(例えば、オブジェクトに傷等があると想定している場合には、その傷に垂直な方向)に変化させることで、第2の反射ベクトルが求められる。そして、この第2の反射ベクトルを用いて、オブジェクトのシェーディング演算が行われる。
【0017】
このようにすることで本発明によれば、楕円体モデルを用いる従来の手法に比べて、非常に負荷の少ない演算処理で異方性反射を表現できる。従って、リアルタイム処理が要求されるゲームシステムに最適な異方性反射モデルを構築できる。
【0018】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記反射ベクトルを、異方性反射の方向を定義する第2の座標系に座標変換し、前記第2の座標系において前記反射ベクトルの方向を変化させて前記第2の反射ベクトルを求め、前記第2の座標系での前記第2の反射ベクトルを前記第1の座標系に座標変換し、前記第1の座標系での前記第2の反射ベクトルに基づいてオブジェクトのシェーディング演算を行うことを特徴とする。
【0019】
このようにすれば、例えば各構成点に設定された第2の座標系において、統一的な処理で反射ベクトルの方向を変化させることができるようになり、処理の簡素化を図れる。
【0020】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記第2の座標系が、異方性反射の方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、前記第2の座標系での前記反射ベクトルの方向を前記第1、第2の軸のいずれかの方向に変化させて、前記第2の反射ベクトルを求めることを特徴とする。
【0021】
このようにすれば、例えば各構成点に設定された第2の座標系において、反射ベクトルの方向を第1、第2の軸のいずれかの方向に変化させるという簡素な処理で、異方性反射を表現できる。
【0022】
なお、オブジェクトの表面に想定される傷の方向は、第1、第2の軸のいずれの方向であってもよい。
【0023】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記第2の座標系が、異方性反射の方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、前記第2の座標系での前記反射ベクトルの前記第1の軸の成分を第1の係数でスケーリングすると共に、前記第2の座標系での前記反射ベクトルの前記第2の軸の成分を第2の係数でスケーリングすることで、前記第2の反射ベクトルを求めることを特徴とする。
【0024】
このようにすれば、反射ベクトルの第1、第2の軸の成分を第1、第2の係数でスケーリングするだけという簡素な処理で、第2の反射ベクトルを得ることができ、処理負荷を大幅に軽減化できる。
【0025】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記第2の座標系が、異方性反射の方向を表す第1の軸と該第1の軸に交差する第2の軸を有し、オブジェクトが自由曲面により表される場合において、自由曲面の各構成点での第1、第2の接線ベクトルの方向に、前記第1、第2の軸が設定されること特徴とする。
【0026】
このようにすれば、自由曲面の各構成点での第1、第2の接線ベクトルを所与の計算式で求めるだけで、第2の座標系を設定できるようになり、第2の座標系の設定処理を簡素化できる。また法線ベクトルを得るために求める必要がある接線ベクトルを、第2の座標系の設定処理のために有効利用できるようになり、処理の効率化を図れる。
【0027】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記第1、第2の接線ベクトルに基づき前記法線情報となる法線ベクトルが求められ、該法線ベクトルの方向に、前記第2の座標系の第3の軸が設定されることを特徴とする。
【0028】
このようにすれば、この法線ベクトルを法線情報として用いて反射ベクトルを求めることができるようになると共に、この法線ベクトルを得るために求めた接線ベクトルを第2の座標系の設定処理に有効利用できるようになるため、処理の効率化を図れる。
【0029】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、スペキュラー表現テクスチャのテクスチャ座標を前記第2の反射ベクトルに基づいて求め、求められたテクスチャ座標に基づいて前記スペキュラー表現テクスチャをオブジェクトにマッピングすることを特徴とする。
【0030】
このようにすれば、スペキュラー形状(ハイライト形状)がプリミティブ面(ポリゴン等)の形状の影響を受けて不自然な形になるという問題を効果的に解決できるようになる。
【0031】
また本発明に係るゲームシステム、情報記憶媒体及びプログラムは、前記第2の反射ベクトルの方向が視線ベクトルの方向に一致した場合に前記スペキュラー表現テクスチャに描かれたハイライト画像の中心が参照される変換を前記第2の反射ベクトルに対して施し、前記テクスチャ座標を求めることを特徴とする。
【0032】
このようにすれば、スペキュラー表現テクスチャを参照するためのテクスチャ座標を簡素な処理で求めることができるようになる。
【0033】
【発明の実施の形態】
以下、本発明の好適な実施形態について図面を用いて説明する。
【0034】
1.構成
図3に、本実施形態のゲームシステム(画像生成システム)の機能ブロック図の一例を示す。なお同図において本実施形態は、少なくとも処理部100を含めばよく(或いは処理部100と記憶部170を含めばよく)、それ以外のブロックについては任意の構成要素とすることができる。
【0035】
操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、マイク、或いは筺体などのハードウェアにより実現できる。
【0036】
記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどのハードウェアにより実現できる。
【0037】
情報記憶媒体(コンピュータにより使用可能な記憶媒体)180は、プログラムやデータなどの情報を格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などのハードウェアにより実現できる。処理部100は、この情報記憶媒体180に格納される情報に基づいて本発明(本実施形態)の種々の処理を行う。即ち情報記憶媒体180には、本発明(本実施形態)の手段(特に処理部100に含まれるブロック)を実行するための情報(プログラム或いはデータ)が格納される。
【0038】
なお、情報記憶媒体180に格納される情報の一部又は全部は、システムへの電源投入時等に記憶部170に転送されることになる。また情報記憶媒体180には、本発明の処理を行うためのプログラム、画像データ、音データ、表示物の形状データ、本発明の処理を指示するための情報、或いはその指示に従って処理を行うための情報などを含ませることができる。
【0039】
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、或いはHMD(ヘッドマウントディスプレイ)などのハードウェアにより実現できる。
【0040】
音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカなどのハードウェアにより実現できる。
【0041】
携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などを考えることができる。
【0042】
通信部196は、外部(例えばホスト装置や他のゲームシステム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ、或いは通信用ASICなどのハードウェアや、プログラムなどにより実現できる。
【0043】
なお本発明(本実施形態)の手段を実行するためのプログラム或いはデータは、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180に配信するようにしてもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含まれる。
【0044】
処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの各種の処理を行う。この処理部100の機能は、各種プロセッサ(CPU、DSP等)又はASIC(ゲートアレイ等)などのハードウェアや、所与のプログラム(ゲームプログラム)により実現できる。
【0045】
ここで、処理部100が行うゲーム処理としては、コイン(代価)の受け付け処理、各種モードの設定処理、ゲームの進行処理、選択画面の設定処理、オブジェクト(1又は複数のプリミティブ面)の位置や回転角度(X、Y又はZ軸回り回転角度)を求める処理、オブジェクトを動作させる処理(モーション処理)、視点の位置(仮想カメラの位置)や視線角度(仮想カメラの回転角度)を求める処理、マップオブジェクトなどのオブジェクトをオブジェクト空間へ配置する処理、ヒットチェック処理、ゲーム結果(成果、成績)を演算する処理、複数のプレーヤが共通のゲーム空間でプレイするための処理、或いはゲームオーバー処理などを考えることができる。
【0046】
また、処理部100は、上記のゲーム処理結果に基づいて例えばオブジェクト空間内において所与の視点(仮想カメラ)から見える画像を生成し、表示部190に出力する。
【0047】
更に、処理部100は、上記のゲーム処理結果に基づいて各種の音処理を行い、BGM、効果音、又は音声などの音を生成し、音出力部192に出力する。
【0048】
なお、処理部100の機能は、その全てをハードウェアにより実現してもよいし、その全てをプログラムにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。
【0049】
処理部100は、反射ベクトル演算部110、反射ベクトル変化部112、シェーディング演算部114、描画部130を含む。
【0050】
ここで、反射ベクトル演算部110は、光源情報(光源位置、光源ベクトル等)と法線情報(法線ベクトル、面の方向を表す情報等)とに基づいて、オブジェクトの各構成点(頂点、プリミティブ点等)での反射ベクトルを求める。
【0051】
反射ベクトル変化部112は、反射ベクトル演算部110で求められた反射ベクトルの方向を、異方性反射の方向(傷の方向により特定される方向)に変化させて、第2の反射ベクトルを求める。より具体的には、反射ベクトルを、第1の座標系(例えばワールド座標系)から、異方性反射の方向を定義する第2の座標系に座標変換する。次に、この第2の座標系において反射ベクトルの方向を変化させて第2の反射ベクトルを求める。そして、第2の座標系での第2の反射ベクトルを第1の座標系に座標変換して戻す。
【0052】
シェーディング演算部114は、反射ベクトル変化部112で求められた第2の反射ベクトルと、視点情報(視点位置、視線ベクトル等)とに基づいて、オブジェクトのシェーディング演算を行う。この場合のシェーディング演算は、第2の反射ベクトルと視線ベクトルとのなす角度に基づいて鏡面反射光の強度(輝度)を求めるフォン(Phong)のモデルで実現してもよいし、物体の表面を微少平面の集合と考えるブリン(Blinn)のモデルで実現してもよい。或いは、第2の反射ベクトルに基づきテクスチャ座標を求め、このテクスチャ座標に基づきスペキュラー表現テクスチャをオブジェクトにマッピングするスペキュラーマッピングで実現してもよい。
【0053】
描画部130はジオメトリ処理(座標変換、クリッピング処理、透視変換、或いは光源計算等)後のオブジェクト(1又は複数プリミティブ面)の画像を、描画領域174(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できる領域)に描画する処理を行う。
【0054】
なお、ジオメトリ処理後の描画データ(構成点に付与される位置座標、テクスチャ座標、色(輝度)データ、法線ベクトル或いはα値等)は、主記憶部172に格納される。描画部130は、この描画データ(ポリゴンデータ)に基づいて描画処理を行う。
【0055】
描画部130が含むテクスチャマッピング部132は、テクスチャ記憶部176に記憶されるテクスチャをオブジェクトにマッピングするための処理を行う。
【0056】
例えばスペキュラーマッピングを行う場合には、反射ベクトル変化部112で得られた第2の反射ベクトルに基づいてテクスチャ座標が求められ、そのテクスチャ座標がオブジェクトの各構成点(頂点)に対して付与される。そして、テクスチャマッピング部132は、各構成点に付与されたテクスチャ座標により指定されるスペキュラー表現テクスチャ(例えば、マッピングすべきハイライト画像が描かれたテクスチャ)をテクスチャ記憶部176から読み出して、オブジェクトにマッピングする。
【0057】
なお、本実施形態のゲームシステムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、このようなシングルプレーヤモードのみならず、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。
【0058】
また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて生成してもよい。
【0059】
2.本実施形態の特徴
2.1 反射ベクトルの方向の変化による異方性反射の表現
異方性反射の性質を有するオブジェクトの表面には、ある特定方向に傷がついていると考えられる。この傷の存在により、オブジェクトの表面に入射された光の多くは、傷の向きに垂直な方向に反射される。従って、傷がないオブジェクトの表面での反射ベクトルの方向を、オブジェクトの表面上の傷を考慮した方向に変化させることができれば、異方性反射モデルを構築できる。
【0060】
そこで本実施形態では、まず、図4(A)に示すように、光源LSからの光源ベクトルをLとし、面に垂直な法線ベクトルをNとした場合に、オブジェクトの各構成点(頂点、プリミティブ点等)での反射ベクトルRを下式(2)のように求める。即ち、光源情報(L)と法線情報(N)とに基づいて反射ベクトルRを求める。
【0061】
R=2(N・L)N−L (2)
なお図4(A)において、オブジェクトの表面上の傷は、U軸方向或いはV軸方向のいずかの方向に発生していると想定されている。
【0062】
そして本実施形態では、上式(2)で求められた反射ベクトルRを、図4(B)に示すように、異方性反射の方向に変化させて、反射ベクトルR2(第2の反射ベクトル)を得る。
【0063】
より具体的には、傷の向きがU軸(第1、第2の軸の一方の軸)の方向であると想定されている場合には、図4(B)に示すように、反射ベクトルRの方向をV軸の方に変化させて(回転させて)、反射ベクトルR2を得る。このようにすれば、オブジェクトの各構成点での反射ベクトルの方向を、傷に垂直なV軸の方に一律に変化させることができる。
【0064】
一方、傷の向きがV軸(第1、第2の軸の他方の軸)の方向であると想定されている場合には、図4(B)とは逆に、反射ベクトルRの方向をU軸の方に変化させて(回転させて)、反射ベクトルR2を得る。このようにすれば、オブジェクトの各構成点での反射ベクトルの方向を、傷に垂直なU軸の方に一律に変化させることができる。
【0065】
そして本実施形態では、このようにして得られた反射ベクトルR2を用いてシェーディング演算を行い、オブジェクトの各構成点での鏡面反射光の強度(輝度)を求める。
【0066】
例えばフォンのモデルを利用する場合には、反射ベクトルR2と視線ベクトルとのなす角度をθとした場合に、PS×COSnθの計算を行い、鏡面反射光の強度を求める。なお、PSはスペキュラー係数(スペキュラー成分の最大係数)であり、nは累乗の係数である。nを変化させることでハイライトの広がり具合を制御できる。
【0067】
また、ブリンのモデルを利用する場合には、反射ベクトルR2と光源ベクトルLとの中間ベクトルを求め、この中間ベクトルと視線ベクトルとに基づいて鏡面反射光の強度を求めればよい。
【0068】
以上のようにして鏡面反射光の強度を求めることで、本実施形態では、オブジェクトの表面での反射光の異方性反射の表現を、少ない処理負担で実現している。これにより、オーディオ機器のつまみの表面に見える特有の明暗パターン(ブラシ効果)や、人間の髪の毛に見える「天使の輪」(ヘアライン効果)などの画像を、少ない処理負担で生成できるようになる。
【0069】
反射ベクトルの方向を変化させる処理は、より具体的には以下のような手法により実現できる。
【0070】
(I)まず図5に示すように、上式(2)の計算に基づき、オブジェクトOBの各構成点(頂点)での反射ベクトルR(第1の反射ベクトル)をワールド座標系(XW、YW、ZW)において求める。
【0071】
(II)次に、図5のA1に示すように、反射ベクトルR(RX、RY、RZ)を、ワールド座標系(第1の座標系)からUVN座標系(第2の座標系)に座標変換して、UVN座標系での反射ベクトルRUVN(RU、RN、RV)を得る。この座標変換は例えば下式(3)のようにして実現できる。
【0072】
【数1】

Figure 0004518643
ここで、UVN座標系のU軸及びV軸の一方の軸は、各構成点での傷の方向を表す軸であり、U軸及びV軸の他方の軸は上記一方の軸に直交する軸である。そして、上式(3)の(UX、UY、UZ)はU軸方向の単位ベクトルであり、(VX、VY、VZ)はV軸方向の単位ベクトルである。また、N軸は、法線ベクトルの方向に設定された軸であり、上式(3)の(NX、NY、NZ)は、N軸方向の単位ベクトルである。
【0073】
なお、U軸、V軸は互いに直交していなくてもよく、互いに交差する軸であればよい。また、N軸も、法線ベクトルの方向の軸でなくてもよく、U軸及びV軸に交差する軸であればよい。
【0074】
(III)次に、図5のA2に示すように、UVN座標系において反射ベクトルRUVN(RU、RN、RV)の方向を変化させて、反射ベクトルR2UVN(R2U、R2N、R2V)を求める。これは例えば下式(4)により求めることができる。
【0075】
【数2】
Figure 0004518643
ここで、CUはU軸成分でのスケーリング係数であり、CVはV軸方向でのスケーリング係数である。
【0076】
(IV)次に、図5のA3に示すように、反射ベクトルR2UVN(R2U、R2N、R2V)を、UVN座標系からワールド座標系に座標変換して、ワールド座標系での反射ベクトルR2(R2X、R2Y、R2Z)を求める。これは例えば下式(5)により求めることができる。
【0077】
【数3】
Figure 0004518643
以上のように本実施形態では、異方性反射の方向を定義するUVN座標系を設定し、このUVN座標系において反射ベクトルRUVNを変化させて反射ベクトルR2UVNを求めるようにしている。このようにすれば、上式(4)のように、反射ベクトルRUVNのU軸成分RUを係数CUでスケーリングし、V軸成分RVを係数CVでスケーリングするだけという非常な簡素な処理で、反射ベクトルRUVNを異方性反射の方向に変化させて反射ベクトルR2UVNを得ることができるようになる。
【0078】
例えば、U軸方向に傷の方向を設定する場合には、図6(A)に示すように、U軸方向のスケーリング係数CUを1.0よりも小さくすればよい。例えば図6(A)では、CU=0.5、CV=2.0に設定されている。このようにすることで、反射ベクトルは、傷に垂直な方向であるV軸の方向に変化し、異方性反射を表現できるようになる。
【0079】
一方、V軸方向に傷の方向を設定する場合には、図6(B)に示すように、V軸方向のスケーリング係数CVを1.0よりも小さくすればよい。例えば図6(B)では、CU=2.0、CV=0.5に設定されている。このようにすることで、反射ベクトルは、傷に垂直な方向であるU軸の方向に変化し、異方性反射を表現できるようになる。
【0080】
なお、スケーリング係数により反射ベクトルの方向を変化させる手法では、反射ベクトルの方向が象限を越えては変化しないことを前提としている。
【0081】
また、図6(A)、(B)では、スケーリング係数CU、CVを用いて反射ベクトルRUVNの方向を変化させているが、RUVNをN軸回りで回転させることでRUVNの方向を変化させる手法を採用してもよい。但し、この手法では、反射ベクトルを回転させる処理や、反射ベクトルの方向が象限を越えて変化しないように制御する処理が必要になるため、処理負荷が重くなるという不利点がある。
【0082】
これに対して、スケーリング係数で反射ベクトルの方向を変化させる手法では、スケーリング係数を反射ベクトルの各成分に乗算するだけで済むと共に、反射ベクトルの方向が象限を越えて変化しないように制御する処理も不要となるため、処理負荷が非常に軽いという利点がある。
【0083】
図7(A)は、オブジェクトOBに対して、異方性反射の処理を行わずに通常のシェーディング処理を行った場合の生成画像例である。異方性反射の処理を行わない場合には、反射光の強度分布は等方的なものになるため、オブジェクトOBの表面には通常形状のハイライトが生じる。
【0084】
図7(B)は、従来の楕円体モデルを用いて異方性反射を表現した場合の生成画像例である。図7(B)では、オブジェクトOBの上面に同心円状の傷があると想定されており、ブラシ効果が表現されたハイライト画像が生成されている。
【0085】
一方、図7(C)は、本実施形態の手法により異方性反射を表現した場合の生成画像例である。図7(C)では、図6(A)、(B)で説明したスケーリング係数がCU=0.5、CV=2.0に設定されている。これにより、オブジェクトOBの上面に同心円状の傷がある場合に見えるブラシ効果のハイライト画像を生成できる。
【0086】
図8(A)は、従来の楕円体モデルを用いて異方性反射を表現した場合の生成画像例である。図8(A)では、オブジェクトOBの中心から放射状に傷があると想定されており、ヘアライン効果(髪の毛の天使の輪)が表現されたハイライト画像が生成されている。
【0087】
一方、図8(B)は、本実施形態の手法により異方性反射を表現した場合の生成画像例である。図8(B)では、スケーリング係数がCU=2.0、CV=0.5に設定されている。これにより、オブジェクトOBの中心から放射状に傷がある場合に見えるヘアライン効果のハイライト画像を生成できる。
【0088】
図9(A)〜(D)、図10(A)〜(D)に、スケーリング係数CU、CVを徐々に変化させた場合に本実施形態により生成されるオブジェクトOBの画像の例を示す。
【0089】
図9(A)では、CU=0.5、CV=2.0に設定されている。そして、図9(B)、(C)、(D)、図10(A)、(B)、(C)、(D)では、CUが0.2ずつ増加し、CVが0.2ずつ減少している。図9(A)では、ブラシ効果のハイライト画像が生成され、図10(D)ではヘアライン効果のハイライト画像が生成される。
【0090】
このように本実施形態によれば、スケーリング係数CU、CVの値を所望の値に変化させるだけで、オブジェクトの表面上に想定する傷の方向を任意に制御でき、ブラシ効果やヘアライン効果などの多様なハイライト画像の生成に成功している。
【0091】
2.2 自由曲面の利用
次に、オブジェクトを自由曲面で表す場合について説明する。オブジェクトを自由曲面で表すと、図5で説明したUVN座標系を簡易な処理で設定することができる。
【0092】
自由曲面の構成点Puv(u,v)のx成分であるPxuv(u,v)は下式(6)のように求められる。
【0093】
【数4】
Figure 0004518643
Puv(u,v)のy成分、z成分についても、上式(6)と同様の式により求めることができる。
【0094】
なお、有理化を行った場合には下式(7)のようになる。
【0095】
【数5】
Figure 0004518643
上式(6)、(7)において、Q00〜Q33は制御点である。
【0096】
またNu0,4〜Nu3,4、Nv0,4〜Nv3,4は混ぜ合わせ関数である。これらの混ぜ合わせ関数は、下式(8)、(9)の再帰形表現の漸化式(DeBoorCoxの漸化式)と、下式(10)のノットベクトルTU、TVとに基づき求めることができる。
【0097】
【数6】
Figure 0004518643
【0098】
【数7】
Figure 0004518643
ノットベクトルは、パラメータの節目を数値の列として与えるベクトルである。ノットベクトルのノット間隔(ノットベクトルの隣り合う要素間の数値差)が一定である場合には、ユニフォーム(Uniform)と呼ばれ、ノット間隔が一定でない場合は、ノンユニフォーム(Non Uniform)と呼ばれる。
【0099】
ノンユニフォーム(Non Uniform)で、有理化(Rational)されたBスプラインが、NURBS(Non Uniform Rational B-Spline)である。
【0100】
図11に、本実施形態により生成された曲面パッチ20(自由曲面)の例を示す。
【0101】
上式(6)又は(7)から明らかなように、曲面パッチ20の各構成点は、制御点Q00〜Q33と混ぜ合わせ関数Nu0,4〜Nu3,4、Nv0,4〜Nv3,4に基づき求められる。この場合、パラメータuの変域はu3≦u<u4となり、パラメータvの変域はv3≦v<v4になる。
【0102】
一方、曲面パッチ22を生成する場合には、使用する制御点のセットが、Q00〜Q33からQ01〜Q34に変わる。そして、曲面パッチ22の各構成点は、制御点Q01〜Q34と混ぜ合わせ関数Nu1,4〜Nu4,4、Nv0,4〜Nv3,4に基づき求められる。この場合、パラメータuの変域はu4≦u<u5となり、パラメータvの変域はv3≦v<v4になる。
【0103】
本実施形態により生成された曲面パッチ20の各構成点は、ポリゴンの頂点に設定され、これらの頂点により構成されるポリゴンが画面上に表示されることになる。
【0104】
図12に、自由曲面(NURBS)で表されたオブジェクトOB(ワイヤーフレーム表示)の画像の例を示す。曲面の分割数を制御することで、オブジェクトOBの精密度を変化させることができる。
【0105】
さて、オブジェクトを自由曲面で表した場合には、曲面の接線(傾き)ベクトルを簡易に求めることができる。
【0106】
例えば、図13において、構成点Pでのu方向の接線ベクトルUVECのx成分は下式(11)の計算を行うことで求めることができる。y成分、z成分も同様である。
【0107】
【数8】
Figure 0004518643
また、v方向の接線ベクトルVVECのx成分は下式(12)の計算を行うことで求めることができる。y成分、z成分も同様である。
【0108】
【数9】
Figure 0004518643
なお、上式(12)、(13)は有理化を行わない場合の式であるが、有理化を行う場合も同様にして求めることができる。
【0109】
また、上式(12)、(13)により求められた接線ベクトルUVEC、VVECの外積を計算することで、図13に示すように、構成点Pでの法線ベクトルNを求めることができる。
【0110】
そして、接線ベクトルUVECの方向に図5で説明したUVN座標系のU軸を設定し、接線ベクトルVVECの方向にUVN座標系のV軸を設定し、法線ベクトルNの方向にUVN座標系のN軸を設定する。
【0111】
このようにすれば、オブジェクトの各構成点に対して図5に示すようなUVN座標系を設定できる。そして、この各構成点に設定されたUVN座標系において図5のA2に示すように反射ベクトルの方向を変化させれば、異方性反射を表現できるようになる。
【0112】
このように、オブジェクトを自由曲面を表した場合には、反射ベクトルを変化させるUVN座標系を、比較的簡易な処理で設定できるという利点がある。
【0113】
また、法線ベクトルNを得るために求める接線ベクトルUVEC、VVECを、UVN座標系の設定処理のために有効利用できるようになり、処理の効率化を図れる。
【0114】
なお、オブジェクトをポリゴンで表現した場合にも、例えば以下に述べるような手法でUVN座標系を設定できる。
【0115】
例えば図14(A)では、オブジェクトOB(OB1、OB2又はOB3)のローカル座標系(XL、YL、ZL)において、YL軸を中心としオブジェクトOBの各構成点(頂点)を通る円を想定し、この円の接線ベクトルUVECの方向にU軸を設定する。そして、この接線ベクトルUVECと各構成点に付与されている法線ベクトルとの外積を計算することでV軸の方向を求める。このようにすることで、オブジェクトOBの各構成点(頂点)に対してUVN座標系を設定できるようになる。
【0116】
そしてこの手法によれば、図14(B)に示すように、一定方向(接線ベクトルUVECの方向又はUVECに垂直な方向)に傷がついた金属板等での異方性反射を表現できるようになる。
【0117】
2.3 スペキュラーマッピング
さて図4(B)や上式(5)で得られた反射ベクトルR2を用い行うシェーディング演算は、いわゆるスペキュラーマッピングにより実現することが望ましい。反射ベクトルR2と視線ベクトルのなす角度により鏡面反射の強度を計算するフォンのモデル等では、スペキュラー形状(ハイライト形状)がポリゴン(広義にはプリミティブ面)形状の影響を受けて不自然な形になるという問題が生じる場合があるからである。
【0118】
しかしながら、前述した大平や高木・横井のモデルでは、スカラー量である鏡面反射光の強度が計算結果として出力される。従って、スペキュラー形状がポリゴン形状の影響で不自然な形になるという問題を、いわゆるスペキュラーマッピングの手法により解決できない。
【0119】
この場合、ノンリアルタイム処理のCGのようにピクセル単位で鏡面反射光の強度を計算すれば、スペキュラー形状がポリゴン形状に依存してしまうという問題を解決できる。しかしながら、この解決手法は、リアルタイム処理が要求されるゲームシステムにおいては非現実的である。
【0120】
これに対して本実施形態では、スカラー量ではなく、反射ベクトルR2が上式(5)のように求められる。従って、この反射ベクトルR2に基づいてテクスチャ座標を求め、このテクスチャ座標に基づいてスペキュラー表現テクスチャをオブジェクトにマッピングするようにすれば、スペキュラーマッピングを実現できるようになる。
【0121】
より具体的には例えば図15(A)に示すようなスペキュラー表現テクスチャを用意する。なお、このスペキュラー表現テクスチャはリアルタイムに生成してもよい。
【0122】
図15(A)に示すスペキュラー表現テクスチャでは、その中心に例えば白いハイライト(光源)画像が描かれており、中心から周囲に向かうにつれてその輝度が徐々に減衰し、黒に変化して行く。なお、後述する最終的な極座標変換の後のハイライト画像が所望の適切な形状になるように、スペキュラー表現テクスチャに描かれるハイライト画像の形状を変形しておくことが望ましい。
【0123】
この図15(A)に示すスペキュラー表現テクスチャにより、図15(B)に示すような仮想球30を想定する。
【0124】
そして図16に示すように、オブジェクトOBを内包するように仮想球30を設定する。次に、光源ベクトルLに基づき構成点Pでの反射ベクトルを求め、この反射ベクトルから、本実施形態の手法で、異方性反射を考慮した反射ベクトルR2を求める。そして、この反射ベクトルR2と仮想球30との交点PRを求めることで、スペキュラー表現テクスチャのテクスチャ座標TX、TY(コーディネート値)を求め、これらのTX、TYを構成点Pに設定する。
【0125】
そして、このようにして各構成点に設定されたテクスチャ座標TX、TYに基づいて、図15(A)に示すスペキュラー表現テクスチャをオブジェクトOBにマッピングして、スペキュラーマッピングを実現する。
【0126】
以上のようにすれば、スペキュラー形状(ハイライト形状)がポリゴン形状の影響を受けないようになるため、より自然でリアルな画像を生成できるようになる。
【0127】
3.本実施形態の処理
次に、本実施形態の処理の詳細例について、図17、図18のフローチャートを用いて説明する。
【0128】
まずPN(構成点の番号)を0に設定する(ステップS1)。
【0129】
次に、構成点(頂点)PNでの接線ベクトルUVEC、VVECを上式(11)、(12)などに基づいて求める(ステップS2)。
【0130】
次に、図13で説明したように、接線ベクトルUVEC、VVECの外積計算を行い、法線ベクトルNを求める(ステップS3)。
【0131】
次に、光源情報、構成点PNの位置、構成点PNでの法線ベクトルNに基づき反射ベクトルRを求める(ステップS4)。例えば点光源の場合には、光源位置と構成点PNの位置とを結ぶベクトルを図4(A)の光源ベクトルLとして求め、この光源ベクトルLと法線ベクトルNとに基づき反射ベクトルRを求める。一方、平行光源の場合には、平行光源からの光源ベクトルLと法線ベクトルNとに基づき反射ベクトルRを求める。
【0132】
次に、図5のA1で説明したように、ワールド座標系からUVN座標系(UVEC、VVEC、Nで構成される座標系)に反射ベクトルRを座標変換し、RUVNを求める(ステップS5)。
【0133】
次に、図5のA2で説明したように、UVN座標系においてRUVNに対して、異方性反射の方向を表す係数CU、CVに基づくスケーリング計算を行い、反射ベクトルR2UVNを求める(ステップS6)。
【0134】
次に、図5のA3で説明しように、R2UVNをワールド座標系に座標変換し、反射ベクトルR2を求める(ステップS7)。
【0135】
次に、R2と視線ベクトルとのなす角度θに基づき、例えばPS×COSnθの計算を行い、構成点PNでの鏡面反射光の強度を求める(ステップS8)。
【0136】
次に、PNがPENDよりも大きいか否かを判断し、PENDよりも小さい場合には、PNを1だけインクリメントし(ステップS10)、ステップS2に戻る。一方、PENDよりも大きい場合には処理を終了する。
【0137】
図18は、スペキュラーマッピングを行う場合のフローチャートである。スペキュラーマッピングを行う場合には、図17のステップS8において図18の処理を行うことになる。
【0138】
まず、オブジェクトの中心を仮想球の中心に設定した場合に、オブジェクトの中心と仮想球上のハイライト画像の中心(マップの中心)とを結ぶ方向を、視線ベクトルの方向に一致させるマトリクスMを求める(ステップS11)。
【0139】
即ち図19(A)に示すように、その中心がオブジェクトOBの中心と一致するような仮想球30を想定する。そして、例えばオブジェクトに設定されたXYZ座標系(各構成点に設定してもよい)において視点VPの方へと向かう視線ベクトルをEとした場合に、図19(B)、(C)に示すように、視線ベクトルE’の方向がX’軸の負側方向に向くようなX’Y’Z’座標系を想定する。すると、上記のマトリクスMは、下式(13)のように、視線ベクトルE’をEに変換するマトリクスとなる。
【0140】
E=M×E’ (13)
上式(13)より、
E’=M-1×E (14)
となる。上式(14)において、M-1はMの逆変換マトリクスである。
【0141】
そして、この逆変換マトリクスM-1に基づいて下式(15)のように反射ベクトルR2を変換して、反射ベクトルR2’を求める(ステップS12)。
【0142】
R2’=M-1×R2 (15)
次に、図19(D)に示すように、反射ベクトルR2’を極座標変換して、テクスチャ座標TX、TYを求める(ステップS13)。
【0143】
即ち、図19(D)に示すように、反射ベクトルR2’をX’Z’平面に投影したベクトルをR2”とし、R2”とX’軸とのなす角度をθ1(度)とする。また反射ベクトルR2’とY’軸のなす角度をθ2(度)とする。この場合に、下式(16)のようにしてテクスチャ座標TX、TYを求めることができる。
【0144】
TX=θ1/360
TY=θ2/180 (16)
例えば上式(16)において、θ1=180(度)、θ2=90(度)とした場合には、図19(D)から明らかなように、反射ベクトルR2’の方向と視線ベクトルE’の方向とが一致する。そして、この時のテクスチャ座標は、TX=0.5、TY=0.5となり、スペキュラー表現テクスチャのハイライト画像の中心(マップの中心)が参照されることになる。即ち、上式(15)の変換は、反射ベクトルの方向が視線ベクトルの方向に一致した場合に、スペキュラー表現テクスチャのハイライト画像の中心が参照されるような変換であるということができる。
【0145】
最後に、求められたテクスチャ座標TX、TYを構成点PN(頂点)に付与する(ステップS14)。このテクスチャ座標TX、TYを用いて、図15(A)に示すようなスペキュラー表現テクスチャをオブジェクトOBにマッピングすることで、いわゆるスペキュラーマッピングを実現できる。
【0146】
4.ハードウェア構成
次に、本実施形態を実現できるハードウェアの構成の一例について図20を用いて説明する。
【0147】
メインプロセッサ900は、CD982(情報記憶媒体)に格納されたプログラム、通信インターフェース990を介して転送されたプログラム、或いはROM950(情報記憶媒体の1つ)に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などの種々の処理を実行する。
【0148】
コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、オブジェクトを移動させたり動作(モーション)させるための物理シミュレーションに、マトリクス演算などの処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
【0149】
ジオメトリプロセッサ904は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ900で動作するプログラムが、その処理をジオメトリプロセッサ904に指示する。
【0150】
データ伸張プロセッサ906は、圧縮された画像データや音データを伸張するデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする処理を行う。これにより、オープニング画面、インターミッション画面、エンディング画面、或いはゲーム画面などにおいて、MPEG方式等で圧縮された動画像を表示できるようになる。なお、デコード処理の対象となる画像データや音データは、ROM950、CD982に格納されたり、或いは通信インターフェース990を介して外部から転送される。
【0151】
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を高速に実行するものである。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970の機能を利用して、オブジェクトデータを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると、描画プロセッサ910は、これらのオブジェクトデータやテクスチャに基づいて、Zバッファなどを利用した陰面消去を行いながら、オブジェクトをフレームバッファ922に高速に描画する。また、描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行うことができる。そして、1フレーム分の画像がフレームバッファ922に書き込まれると、その画像はディスプレイ912に表示される。
【0152】
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などの高品位のゲーム音を生成する。生成されたゲーム音は、スピーカ932から出力される。
【0153】
ゲームコントローラ942からの操作データや、メモリカード944からのセーブデータ、個人データは、シリアルインターフェース940を介してデータ転送される。
【0154】
ROM950にはシステムプログラムなどが格納される。なお、業務用ゲームシステムの場合には、ROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納されることになる。なお、ROM950の代わりにハードディスクを利用するようにしてもよい。
【0155】
RAM960は、各種プロセッサの作業領域として用いられる。
【0156】
DMAコントローラ970は、プロセッサ、メモリ(RAM、VRAM、ROM等)間でのDMA転送を制御するものである。
【0157】
CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。
【0158】
通信インターフェース990は、ネットワークを介して外部との間でデータ転送を行うためのインターフェースである。この場合に、通信インターフェース990に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどを考えることができる。そして、通信回線を利用することでインターネットを介したデータ転送が可能になる。また、高速シリアルバスを利用することで、他のゲームシステムとの間でのデータ転送が可能になる。
【0159】
なお、本発明の各手段は、その全てを、ハードウェアのみにより実行してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実行してもよい。或いは、ハードウェアとプログラムの両方により実行してもよい。
【0160】
そして、本発明の各手段をハードウェアとプログラムの両方により実行する場合には、情報記憶媒体には、本発明の各手段をハードウェアを利用して実行するためのプログラムが格納されることになる。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930等に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930等は、その指示と渡されたデータとに基づいて、本発明の各手段を実行することになる。
【0161】
図21(A)に、本実施形態を業務用ゲームシステムに適用した場合の例を示す。プレーヤは、ディスプレイ1100上に映し出されたゲーム画像を見ながら、レバー1102、ボタン1104等を操作してゲームを楽しむ。内蔵されるシステムボード(サーキットボード)1106には、各種プロセッサ、各種メモリなどが実装される。そして、本発明の各手段を実行するための情報(プログラム又はデータ)は、システムボード1106上の情報記憶媒体であるメモリ1108に格納される。以下、この情報を格納情報と呼ぶ。
【0162】
図21(B)に、本実施形態を家庭用のゲームシステムに適用した場合の例を示す。プレーヤはディスプレイ1200に映し出されたゲーム画像を見ながら、ゲームコントローラ1202、1204を操作してゲームを楽しむ。この場合、上記格納情報は、本体システムに着脱自在な情報記憶媒体であるCD1206、或いはメモリカード1208、1209等に格納されている。
【0163】
図21(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に伝送し端末において出力することになる。
【0164】
なお、図21(C)の構成の場合に、本発明の各手段を、ホスト装置(サーバー)と端末とで分散して実行するようにしてもよい。また、本発明の各手段を実行するための上記格納情報を、ホスト装置(サーバー)の情報記憶媒体と端末の情報記憶媒体に分散して格納するようにしてもよい。
【0165】
またネットワークに接続する端末は、家庭用ゲームシステムであってもよいし業務用ゲームシステムであってもよい。そして、業務用ゲームシステムをネットワークに接続する場合には、業務用ゲームシステムとの間で情報のやり取りが可能であると共に家庭用ゲームシステムとの間でも情報のやり取りが可能なセーブ用情報記憶装置(メモリカード、携帯型ゲーム装置)を用いることが望ましい。
【0166】
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。
【0167】
例えば、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【0168】
また反射ベクトルの方向を変化させる手法としては、処理の簡素化の観点からは図5で説明した手法が特に望ましいが、本発明はこれに限定されず種々の変形実施が可能である。
【0169】
また第2の座標系の設定手法も、図13や図14(A)、(B)で説明した手法に限定されるものではない。
【0170】
また、シェーディング演算により得られた鏡面反射光の強度(輝度)をα値(各ピクセルに関連づけられて記憶される情報であり色情報以外のプラスアルファの情報)に設定し、このα値に基づいてα合成(αブレンディング、α加算)を行い、例えばガラス表面上の傷で反射光が異方性反射する様子を表現してもよい。
【0171】
また、本発明は種々のゲーム(格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。
【0172】
また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード等の種々のゲームシステム(画像生成システム)に適用できる。
【図面の簡単な説明】
【図1】図1(A)、(B)は、異方性反射について説明するための図である。
【図2】図2(A)、(B)は、楕円体モデルを用いて異方性反射を実現する手法について説明するための図である。
【図3】本実施形態のゲームシステムの機能ブロック図の例である。
【図4】図4(A)、(B)は、反射ベクトルの方向を変化させて異方性反射を実現する手法について説明するための図である。
【図5】UVN座標系で反射ベクトルの方向を変化させて異方性反射を実現する手法について説明するための図である。
【図6】図6(A)、(B)は、スケーリング係数を用いて反射ベクトルの方向を変化させる手法について説明するための図である。
【図7】図7(A)はノーマルシェーディングの場合、図7(B)は楕円体モデルを用いた場合、図7(C)は本実施形態の手法を用いた場合の生成画像例である。
【図8】図8(A)は楕円体モデルを用いた場合、図8(B)は本実施形態の手法を用いた場合の生成画像例である。
【図9】図9(A)、(B)、(C)、(D)は、スケーリング係数を徐々に変化させた場合の生成画像例である。
【図10】図10(A)、(B)、(C)、(D)も、スケーリング係数を徐々に変化させた場合の生成画像例である。
【図11】オブジェクトを自由曲面で表現する手法について説明するための図である。
【図12】オブジェクトを自由曲面で表現する手法について説明するための図である。
【図13】各構成点での接線ベクトルを求めて、UVN座標系を設定する手法について説明するための図である。
【図14】図14(A)、(B)は、オブジェクトがポリゴンで表現される場合におけるUVN座標系の設定手法について説明するための図である。
【図15】図15(A)、(B)は、スペキュラー表現テクスチャと仮想球について説明するための図である。
【図16】スペキュラーマッピングについて説明するための図である。
【図17】本実施形態の処理の詳細例について示すフローチャートである。
【図18】本実施形態の処理の詳細例について示すフローチャートである。
【図19】図19(A)、(B)、(C)、(D)は、スペキュラー表現テクスチャのテクスチャ座標の求め方について説明するための図である。
【図20】本実施形態を実現できるハードウェアの構成の一例を示す図である。
【図21】図21(A)、(B)、(C)は、本実施形態が適用される種々の形態のシステムの例を示す図である。
【符号の説明】
OB オブジェクト
LS 光源
VP 視点
L 光源ベクトル
N 法線ベクトル
R、R2、RUVN、R2UVN 反射ベクトル
20、22 曲面パッチ
30 仮想球
100 処理部
110 反射ベクトル演算部
112 反射ベクトル変化部
114 シェーディング演算部
130 描画部
132 テクスチャマッピング部
160 操作部
170 記憶部
172 主記憶部
174 描画領域
176 テクスチャ記憶部
180 情報記憶媒体
190 表示部
192 音出力部
194 携帯型情報記憶装置
196 通信部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a game system and an information storage medium.
[0002]
[Background Art and Problems to be Solved by the Invention]
Conventionally, a game system that generates an image that can be seen from a given viewpoint in an object space that is a virtual three-dimensional space is known, and is popular as a device that can experience so-called virtual reality. Taking a game system in which a racing game can be enjoyed as an example, a player operates a car (object) to run in an object space, and competes with other players and cars operated by a computer to play a three-dimensional game. Enjoy.
[0003]
Now, in such a game system, it is an important technical problem to generate a more realistic and high-quality image in order to improve the virtual reality of the player. For this reason, it is desirable that the specular reflection (specular) on the surface of the object can be expressed more realistically.
[0004]
As a method for realizing such specular reflection, models such as Phong and Blinn are conventionally known. However, these models are all isotropic reflection models, and the intensity distribution of reflected light is isotropic.
[0005]
On the other hand, when there is a scratch in a certain direction on the surface of the object, a phenomenon occurs in which reflected light is strongly reflected in a specific direction due to the scratch. For example, a phenomenon in which a light and dark pattern peculiar to a knob of an audio device having concentric scratches can be seen, or an “angel's ring” can be seen in human hair.
[0006]
In order to express such a specific light-dark pattern, a so-called anisotropic reflection model is required. For example, a conventional example of such an anisotropic reflection model is disclosed in "" Analysis of anisotropic reflection model ", Takagi, Yokoi et al., Graphics and CAD, 11-1, 1983.10.17. Yes.
[0007]
For example, it is assumed that there is a scratch as shown in FIG. When the portion of the point P in FIG. 1A is viewed locally, it is as shown in FIG. Here, the normal vector perpendicular to the surface is N, the vector horizontal to the flaw is U, and the vector perpendicular to the flaw is V. Also, let R be the reflection vector at point P of the light source vector L from the light source LS. At this time, the reflection vector R is expressed by the following equation (1).
[0008]
R = 2 (N · L) N−L (1)
In a general reflection model, the intensity (luminance) of specular reflection light (specular component) is determined based on the angle formed by the reflection vector R and the line-of-sight vector obtained by the above equation (1).
[0009]
The specular reflected light itself is modeled by the intensity distribution of a flat ellipsoid is the Ohira model shown in FIG. That is, the intensity of the specular reflection light is obtained based on the length DE up to the point where the line-of-sight vector E intersects the ellipsoid ELP.
[0010]
On the other hand, in the Takagi / Yokoi model shown in FIG. 2 (B), an anisotropy is given to Bryn's minute plane model, and the distribution of the minute plane is solved by an ellipsoidal model.
[0011]
However, since the Ohira, Takagi, and Yokoi models use an ellipsoidal model, a large amount of processing time is required to calculate the intensity of the specular reflection light. Therefore, this model is not suitable for a game system that requires real-time processing.
[0012]
In the Ohira, Takagi, and Yokoi models, the intensity of specular reflected light, which is a scalar quantity, is output as a calculation result. Therefore, the problem that the specular shape (highlight shape) becomes unnatural due to the influence of the polygon shape cannot be solved by using a so-called specular mapping method.
[0013]
In this case, if the intensity of specular reflection light is calculated in units of pixels as in non-real-time processing CG (Computer Graphics), the above problem can be solved. However, this causes a problem of further increase in processing time.
[0014]
The present invention has been made in view of the above problems, and an object of the present invention is to provide a game system and an information storage medium that can realize the expression of anisotropic reflection with a small processing load. .
[0015]
[Means for Solving the Problems]
In order to solve the above problems, the present invention provides a game system for generating an image, a unit for obtaining a reflection vector at each constituent point of an object based on light source information and normal information, Characterized in that it includes means for obtaining a second reflection vector by changing the direction to the direction of anisotropic reflection, and means for performing a shading operation of the object based on the second reflection vector and viewpoint information. To do. The information storage medium according to the present invention is an information storage medium that can be used by a computer, and includes a program for executing the above means. The program according to the present invention is a program (including a program embodied in a carrier wave) that can be used by a computer, and includes a processing routine for executing the above means.
[0016]
According to the present invention, based on light source information (eg, light source vector, light source position) and normal information (eg, normal vector, information indicating the direction of a surface), each component point (eg, vertex, primitive point) of the object. Is obtained. Then, by changing this reflection vector in the direction of anisotropic reflection (for example, in a case where the object is assumed to have a flaw or the like, the second reflection vector is changed to a direction perpendicular to the flaw). Desired. Then, an object shading calculation is performed using the second reflection vector.
[0017]
In this way, according to the present invention, anisotropic reflection can be expressed by a calculation process with very little load compared to the conventional method using an ellipsoidal model. Therefore, it is possible to construct an anisotropic reflection model that is optimal for a game system that requires real-time processing.
[0018]
In addition, the game system, information storage medium, and program according to the present invention perform coordinate conversion of the reflection vector into a second coordinate system that defines the direction of anisotropic reflection, and the reflection vector of the reflection vector is converted in the second coordinate system. The direction is changed to obtain the second reflection vector, the second reflection vector in the second coordinate system is transformed into the first coordinate system, and the second reflection vector in the first coordinate system is transformed. The object shading calculation is performed based on the reflection vector of 2.
[0019]
In this way, for example, in the second coordinate system set for each constituent point, the direction of the reflection vector can be changed by a uniform process, and the process can be simplified.
[0020]
In the game system, information storage medium, and program according to the present invention, the second coordinate system has a first axis that represents the direction of anisotropic reflection and a second axis that intersects the first axis. In this case, the second reflection vector is obtained by changing the direction of the reflection vector in the second coordinate system to one of the first and second axes.
[0021]
In this way, for example, in the second coordinate system set at each constituent point, the anisotropy can be achieved by a simple process of changing the direction of the reflection vector to one of the first and second axes. Reflection can be expressed.
[0022]
Note that the direction of the flaw assumed on the surface of the object may be either the first or second axis.
[0023]
In the game system, information storage medium, and program according to the present invention, the second coordinate system has a first axis that represents the direction of anisotropic reflection and a second axis that intersects the first axis. In the case, the component of the first axis of the reflection vector in the second coordinate system is scaled by a first coefficient and the second axis of the reflection vector in the second coordinate system is scaled. The second reflection vector is obtained by scaling the component by a second coefficient.
[0024]
In this way, the second reflection vector can be obtained by a simple process of simply scaling the components of the first and second axes of the reflection vector by the first and second coefficients, and the processing load is reduced. It can be greatly reduced.
[0025]
In the game system, information storage medium, and program according to the present invention, the second coordinate system has a first axis that represents the direction of anisotropic reflection and a second axis that intersects the first axis. When the object is represented by a free-form surface, the first and second axes are set in the directions of the first and second tangent vectors at each constituent point of the free-form surface.
[0026]
In this way, the second coordinate system can be set only by obtaining the first and second tangent vectors at each constituent point of the free-form surface by a given calculation formula. The setting process can be simplified. Also, the tangent vector that needs to be obtained in order to obtain the normal vector can be effectively used for the setting process of the second coordinate system, and the processing efficiency can be improved.
[0027]
In the game system, information storage medium, and program according to the present invention, a normal vector serving as the normal information is obtained based on the first and second tangent vectors, and the second vector is oriented in the direction of the normal vector. A third axis of the coordinate system is set.
[0028]
In this way, the reflection vector can be obtained using the normal vector as normal information, and the tangent vector obtained for obtaining the normal vector is set in the second coordinate system. Therefore, it is possible to improve the processing efficiency.
[0029]
The game system, information storage medium, and program according to the present invention determine a texture coordinate of a specular expression texture based on the second reflection vector, and map the specular expression texture to an object based on the determined texture coordinate. It is characterized by that.
[0030]
In this way, the problem that the specular shape (highlight shape) becomes an unnatural shape due to the influence of the shape of the primitive surface (polygon or the like) can be effectively solved.
[0031]
In the game system, information storage medium, and program according to the present invention, the center of the highlight image drawn on the specular expression texture is referred to when the direction of the second reflection vector coincides with the direction of the line-of-sight vector. Transformation is performed on the second reflection vector to obtain the texture coordinates.
[0032]
In this way, texture coordinates for referring to the specular expression texture can be obtained by simple processing.
[0033]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0034]
1. Constitution
FIG. 3 shows an example of a functional block diagram of the game system (image generation 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]
An information storage medium (storage medium usable by a computer) 180 stores information such as programs and data, and functions thereof are an optical disk (CD, DVD), a magneto-optical disk (MO), a magnetic disk, and a hard disk. It can be realized by hardware such as a magnetic tape or a memory (ROM). The processing unit 100 performs various processes of the present invention (this embodiment) based on information stored in the information storage medium 180. That is, the information storage medium 180 stores information (program or data) for executing the means of the present invention (this embodiment) (particularly, the blocks included in the processing unit 100).
[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 game system), and functions thereof are various processors, hardware such as a communication ASIC, It can be realized by a program.
[0043]
The program or data for executing the means of the present invention (this embodiment) may be distributed from the information storage medium of the host device (server) to the information storage medium 180 via the network and the communication unit 196. Good. 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. The function of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.) or ASIC (gate array, etc.) and a given program (game program).
[0045]
Here, game processing performed by the processing unit 100 includes coin (price) acceptance processing, various mode setting processing, game progress processing, selection screen setting processing, position of an object (one or more primitive surfaces), Processing for obtaining a rotation angle (rotation angle about X, Y or Z axis), processing for moving an object (motion processing), processing for obtaining a viewpoint position (virtual camera position) and a line-of-sight angle (virtual camera rotation angle), Processing to place objects such as map objects in the object space, hit check processing, processing to calculate game results (results, results), processing for multiple players to play in a common game space, game over processing, etc. Can think.
[0046]
Further, the processing unit 100 generates an image that can be seen from a given viewpoint (virtual camera) in the object space, for example, based on the game processing result, and outputs the image to the display unit 190.
[0047]
Further, the processing unit 100 performs various kinds of sound processing based on the above game processing result, generates a sound such as BGM, sound effect, or sound, and outputs the sound to the sound output unit 192.
[0048]
Note that all of the functions of the processing unit 100 may be realized by hardware, or all of them may be realized by a program. Alternatively, it may be realized by both hardware and a program.
[0049]
The processing unit 100 includes a reflection vector calculation unit 110, a reflection vector change unit 112, a shading calculation unit 114, and a drawing unit 130.
[0050]
Here, the reflection vector calculation unit 110, based on the light source information (light source position, light source vector, etc.) and normal information (normal vector, information indicating the direction of the surface, etc.), each component point (vertex, The reflection vector at a primitive point or the like is obtained.
[0051]
The reflection vector changing unit 112 determines the second reflection vector by changing the direction of the reflection vector obtained by the reflection vector calculation unit 110 to the direction of anisotropic reflection (direction specified by the direction of the scratch). . More specifically, the reflection vector is coordinate-converted from a first coordinate system (for example, a world coordinate system) to a second coordinate system that defines the direction of anisotropic reflection. Next, the second reflection vector is obtained by changing the direction of the reflection vector in the second coordinate system. Then, the second reflection vector in the second coordinate system is coordinate-converted back to the first coordinate system.
[0052]
The shading calculation unit 114 performs an object shading calculation based on the second reflection vector obtained by the reflection vector changing unit 112 and viewpoint information (viewpoint position, line-of-sight vector, etc.). The shading calculation in this case may be realized by a Phong model that obtains the intensity (luminance) of the specular reflection light based on the angle formed by the second reflection vector and the line-of-sight vector. You may implement | achieve with the model of Blinn considered to be a collection of minute planes. Alternatively, it may be realized by specular mapping in which texture coordinates are obtained based on the second reflection vector and the specular expression texture is mapped to the object based on the texture coordinates.
[0053]
The drawing unit 130 displays an image of an object (one or more primitive surfaces) after geometry processing (coordinate conversion, clipping processing, perspective conversion, light source calculation, etc.) in a pixel unit such as a drawing area 174 (frame buffer, work buffer, etc.). A drawing process is performed in an area where information can be stored.
[0054]
The drawing data after the geometry processing (position coordinates, texture coordinates, color (luminance) data, normal vector, α value, etc. given to the constituent points) is stored in the main storage unit 172. The drawing unit 130 performs drawing processing based on the drawing data (polygon data).
[0055]
The texture mapping unit 132 included in the drawing unit 130 performs processing for mapping the texture stored in the texture storage unit 176 to the object.
[0056]
For example, when performing specular mapping, texture coordinates are obtained based on the second reflection vector obtained by the reflection vector changing unit 112, and the texture coordinates are assigned to each component point (vertex) of the object. . Then, the texture mapping unit 132 reads the specular expression texture (for example, the texture on which the highlight image to be mapped is drawn) designated by the texture coordinates given to each component point from the texture storage unit 176, and stores it in the object. Map.
[0057]
Note that the game system according to the present embodiment may be a system dedicated to the single player mode in which only one player can play, and not only such a single player mode but also a multiplayer mode in which a plurality of players can play. A system may be provided.
[0058]
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).
[0059]
2. Features of this embodiment
2.1 Representation of anisotropic reflection by changing the direction of the reflection vector
The surface of the object having the anisotropic reflection property is considered to be scratched in a specific direction. Due to the presence of this scratch, much of the light incident on the surface of the object is reflected in a direction perpendicular to the direction of the scratch. Therefore, an anisotropic reflection model can be constructed if the direction of the reflection vector on the surface of the object having no scratch can be changed to a direction that takes into consideration the scratch on the surface of the object.
[0060]
Therefore, in this embodiment, first, as shown in FIG. 4A, when the light source vector from the light source LS is L and the normal vector perpendicular to the surface is N, each component point (vertex, The reflection vector R at a primitive point or the like is obtained as in the following equation (2). That is, the reflection vector R is obtained based on the light source information (L) and the normal information (N).
[0061]
R = 2 (N · L) N−L (2)
In FIG. 4A, it is assumed that the scratch on the surface of the object occurs in either the U-axis direction or the V-axis direction.
[0062]
In the present embodiment, the reflection vector R obtained by the above equation (2) is changed in the direction of anisotropic reflection as shown in FIG. 4B, and the reflection vector R2 (second reflection vector) is changed. )
[0063]
More specifically, when it is assumed that the direction of the flaw is the direction of the U axis (one of the first and second axes), as shown in FIG. The reflection vector R2 is obtained by changing (rotating) the direction of R toward the V axis. In this way, the direction of the reflection vector at each constituent point of the object can be uniformly changed toward the V axis perpendicular to the flaw.
[0064]
On the other hand, when the direction of the flaw is assumed to be the direction of the V-axis (the other of the first and second axes), the direction of the reflection vector R is opposite to that in FIG. By changing (rotating) toward the U axis, a reflection vector R2 is obtained. In this way, the direction of the reflection vector at each constituent point of the object can be uniformly changed toward the U axis perpendicular to the flaw.
[0065]
In this embodiment, shading calculation is performed using the reflection vector R2 obtained in this way, and the intensity (luminance) of specular reflection light at each constituent point of the object is obtained.
[0066]
For example, when using a Phong model, if the angle between the reflection vector R2 and the line-of-sight vector is θ, P S × COS n θ is calculated and the intensity of the specular reflection light is obtained. P S Is a specular coefficient (maximum coefficient of specular components), and n is a power coefficient. The extent of highlight can be controlled by changing n.
[0067]
Further, when the Bryn model is used, an intermediate vector between the reflection vector R2 and the light source vector L is obtained, and the intensity of the specular reflection light may be obtained based on the intermediate vector and the line-of-sight vector.
[0068]
By obtaining the intensity of the specular reflection light as described above, in this embodiment, the expression of the anisotropic reflection of the reflection light on the surface of the object is realized with a small processing load. As a result, it is possible to generate images such as a peculiar light / dark pattern (brush effect) that appears on the surface of the knob of the audio device and an “angel ring” (hairline effect) that looks like human hair with a small processing load.
[0069]
More specifically, the process of changing the direction of the reflection vector can be realized by the following method.
[0070]
(I) First, as shown in FIG. 5, based on the calculation of the above equation (2), the reflection vector R (first reflection vector) at each component point (vertex) of the object OB is represented by the world coordinate system (XW, YW). , ZW).
[0071]
(II) Next, as shown by A1 in FIG. 5, the reflection vector R (RX, RY, RZ) is coordinated from the world coordinate system (first coordinate system) to the UVN coordinate system (second coordinate system). The reflection vector RUVN (RU, RN, RV) in the UVN coordinate system is obtained by conversion. This coordinate conversion can be realized, for example, by the following equation (3).
[0072]
[Expression 1]
Figure 0004518643
Here, one of the U axis and the V axis in the UVN coordinate system is an axis representing the direction of the flaw at each component point, and the other axis of the U axis and the V axis is an axis orthogonal to the one axis. It is. In the above equation (3), (UX, UY, UZ) is a unit vector in the U-axis direction, and (VX, VY, VZ) is a unit vector in the V-axis direction. The N axis is an axis set in the direction of the normal vector, and (NX, NY, NZ) in the above equation (3) is a unit vector in the N axis direction.
[0073]
Note that the U-axis and V-axis do not have to be orthogonal to each other, as long as they intersect with each other. Further, the N axis may not be an axis in the direction of the normal vector, and may be an axis that intersects the U axis and the V axis.
[0074]
(III) Next, as shown by A2 in FIG. 5, the direction of the reflection vector RUVN (RU, RN, RV) is changed in the UVN coordinate system to obtain the reflection vector R2UVN (R2U, R2N, R2V). This can be obtained by the following equation (4), for example.
[0075]
[Expression 2]
Figure 0004518643
Here, CU is a scaling coefficient in the U-axis component, and CV is a scaling coefficient in the V-axis direction.
[0076]
(IV) Next, as shown by A3 in FIG. 5, the reflection vector R2UVN (R2U, R2N, R2V) is coordinate-converted from the UVN coordinate system to the world coordinate system, and the reflection vector R2 (R2X in the world coordinate system) is converted. , R2Y, R2Z). This can be obtained by the following equation (5), for example.
[0077]
[Equation 3]
Figure 0004518643
As described above, in this embodiment, the UVN coordinate system that defines the direction of anisotropic reflection is set, and the reflection vector RUVN is changed in this UVN coordinate system to obtain the reflection vector R2UVN. In this way, as shown in the above equation (4), the reflection vector RUVN is reflected by a very simple process in which the U-axis component RU is scaled by the coefficient CU and the V-axis component RV is scaled by the coefficient CV. It becomes possible to obtain the reflection vector R2UVN by changing the vector RUVN in the direction of anisotropic reflection.
[0078]
For example, when the flaw direction is set in the U-axis direction, the scaling coefficient CU in the U-axis direction may be made smaller than 1.0 as shown in FIG. For example, in FIG. 6A, CU = 0.5 and CV = 2.0 are set. By doing so, the reflection vector changes in the direction of the V-axis, which is a direction perpendicular to the scratch, and anisotropic reflection can be expressed.
[0079]
On the other hand, when the flaw direction is set in the V-axis direction, the scaling coefficient CV in the V-axis direction may be made smaller than 1.0 as shown in FIG. For example, in FIG. 6B, CU = 2.0 and CV = 0.5 are set. By doing so, the reflection vector changes in the direction of the U-axis, which is the direction perpendicular to the scratch, and anisotropic reflection can be expressed.
[0080]
Note that the method of changing the direction of the reflection vector by using the scaling coefficient assumes that the direction of the reflection vector does not change beyond the quadrant.
[0081]
6A and 6B, the direction of the reflection vector RUVN is changed using the scaling factors CU and CV. However, the method of changing the direction of the RUVN by rotating the RUVN around the N axis. May be adopted. However, this method has a disadvantage that the processing load becomes heavy because a process of rotating the reflection vector and a process of controlling the direction of the reflection vector so as not to change beyond the quadrant are necessary.
[0082]
On the other hand, in the method of changing the direction of the reflection vector using the scaling factor, it is only necessary to multiply each component of the reflection vector by the scaling factor, and control is performed so that the direction of the reflection vector does not change beyond the quadrant. Is also unnecessary, and there is an advantage that the processing load is very light.
[0083]
FIG. 7A shows an example of a generated image in a case where normal shading processing is performed on the object OB without performing anisotropic reflection processing. When the anisotropic reflection process is not performed, the intensity distribution of the reflected light is isotropic, so that a normal-shaped highlight is generated on the surface of the object OB.
[0084]
FIG. 7B is an example of a generated image when anisotropic reflection is expressed using a conventional ellipsoidal model. In FIG. 7B, it is assumed that there is a concentric scratch on the upper surface of the object OB, and a highlight image expressing the brush effect is generated.
[0085]
On the other hand, FIG. 7C is an example of a generated image when anisotropic reflection is expressed by the method of the present embodiment. In FIG. 7C, the scaling coefficients described in FIGS. 6A and 6B are set to CU = 0.5 and CV = 2.0. Thereby, it is possible to generate a highlight image of the brush effect that is seen when there is a concentric scratch on the upper surface of the object OB.
[0086]
FIG. 8A is an example of a generated image when anisotropic reflection is expressed using a conventional ellipsoidal model. In FIG. 8A, it is assumed that there is a radial scar from the center of the object OB, and a highlight image in which the hairline effect (angel's ring of hair) is expressed is generated.
[0087]
On the other hand, FIG. 8B is an example of a generated image when anisotropic reflection is expressed by the method of the present embodiment. In FIG. 8B, the scaling coefficients are set to CU = 2.0 and CV = 0.5. Thereby, a highlight image of the hairline effect that can be seen when there is a radial scar from the center of the object OB can be generated.
[0088]
FIGS. 9A to 9D and FIGS. 10A to 10D show examples of images of the object OB generated by the present embodiment when the scaling coefficients CU and CV are gradually changed.
[0089]
In FIG. 9A, CU = 0.5 and CV = 2.0 are set. 9 (B), (C), (D), and FIG. 10 (A), (B), (C), (D), CU increases by 0.2 and CV increases by 0.2. is decreasing. In FIG. 9A, a highlight image of the brush effect is generated, and in FIG. 10D, a highlight image of the hairline effect is generated.
[0090]
As described above, according to the present embodiment, it is possible to arbitrarily control the direction of the flaw assumed on the surface of the object simply by changing the values of the scaling factors CU and CV to desired values, such as the brush effect and the hairline effect. It has succeeded in generating various highlight images.
[0091]
2.2 Use of free-form surfaces
Next, a case where an object is represented by a free-form surface will be described. If the object is represented by a free-form surface, the UVN coordinate system described with reference to FIG. 5 can be set by simple processing.
[0092]
P that is the x component of the constituent point Puv (u, v) of the free-form surface x uv (u, v) is obtained as in the following equation (6).
[0093]
[Expression 4]
Figure 0004518643
The y component and z component of Puv (u, v) can also be obtained by the same equation as the above equation (6).
[0094]
When rationalization is performed, the following equation (7) is obtained.
[0095]
[Equation 5]
Figure 0004518643
In the above formulas (6) and (7), Q 00 ~ Q 33 Is the control point.
[0096]
Also Nu 0,4 ~ Nu 3,4 , Nv 0,4 ~ Nv 3,4 Is a blending function. These mixing functions can be obtained based on the recursive expression recursive expression (DeBoorCox recursive expression) of the following expressions (8) and (9) and the knot vectors TU and TV of the following expression (10). it can.
[0097]
[Formula 6]
Figure 0004518643
[0098]
[Expression 7]
Figure 0004518643
The knot vector is a vector that gives parameter nodes as a sequence of numerical values. When the knot interval of the knot vector (the numerical difference between adjacent elements of the knot vector) is constant, it is called a uniform (Uniform), and when the knot interval is not constant, it is called a non-uniform (Non Uniform).
[0099]
Non Uniform and Rationalized B-splines are NURBS (Non Uniform Rational B-Spline).
[0100]
FIG. 11 shows an example of the curved surface patch 20 (free curved surface) generated by the present embodiment.
[0101]
As is clear from the above formula (6) or (7), each constituent point of the curved patch 20 is a control point Q. 00 ~ Q 33 And mixing function Nu 0,4 ~ Nu 3,4 , Nv 0,4 ~ Nv 3,4 It is required based on. In this case, the domain of the parameter u is u Three ≦ u <u Four And the domain of parameter v is v Three ≦ v <v Four become.
[0102]
On the other hand, when generating the curved patch 22, the set of control points to be used is Q 00 ~ Q 33 To Q 01 ~ Q 34 Changes to. Each constituent point of the curved patch 22 is a control point Q. 01 ~ Q 34 And mixing function Nu 1,4 ~ Nu 4,4 , Nv 0,4 ~ Nv 3,4 It is required based on. In this case, the domain of the parameter u is u Four ≦ u <u Five And the domain of parameter v is v Three ≦ v <v Four become.
[0103]
Each constituent point of the curved surface patch 20 generated according to the present embodiment is set as a vertex of a polygon, and a polygon constituted by these vertices is displayed on the screen.
[0104]
FIG. 12 shows an example of an image of an object OB (wire frame display) represented by a free-form surface (NURBS). By controlling the number of divisions of the curved surface, the precision of the object OB can be changed.
[0105]
When the object is represented by a free-form surface, the tangent (slope) vector of the curved surface can be easily obtained.
[0106]
For example, in FIG. 13, the x component of the tangent vector UVEC in the u direction at the component point P can be obtained by calculating the following equation (11). The same applies to the y component and the z component.
[0107]
[Equation 8]
Figure 0004518643
Further, the x component of the tangent vector VVEC in the v direction can be obtained by calculating the following equation (12). The same applies to the y component and the z component.
[0108]
[Equation 9]
Figure 0004518643
The above equations (12) and (13) are equations when rationalization is not performed, but can be similarly obtained when rationalization is performed.
[0109]
Further, by calculating the outer product of the tangent vectors UVEC and VVEC obtained by the above equations (12) and (13), the normal vector N at the component point P can be obtained as shown in FIG.
[0110]
5 is set in the direction of the tangent vector UVEC, the V axis of the UVN coordinate system is set in the direction of the tangent vector VVEC, and the UVN coordinate system is set in the direction of the normal vector N. Set the N axis.
[0111]
In this way, a UVN coordinate system as shown in FIG. 5 can be set for each constituent point of the object. Then, anisotropic reflection can be expressed by changing the direction of the reflection vector as indicated by A2 in FIG. 5 in the UVN coordinate system set for each component point.
[0112]
Thus, when the object represents a free-form surface, there is an advantage that the UVN coordinate system for changing the reflection vector can be set by a relatively simple process.
[0113]
Further, the tangent vectors UVEC and VVEC obtained for obtaining the normal vector N can be effectively used for the setting process of the UVN coordinate system, and the processing efficiency can be improved.
[0114]
Even when the object is represented by a polygon, the UVN coordinate system can be set by the method described below, for example.
[0115]
For example, in FIG. 14A, in the local coordinate system (XL, YL, ZL) of the object OB (OB1, OB2, or OB3), a circle passing through each component point (vertex) of the object OB with the YL axis as the center is assumed. The U axis is set in the direction of the tangent vector UVEC of this circle. Then, the V-axis direction is obtained by calculating the outer product of this tangent vector UVEC and the normal vector assigned to each component point. In this way, a UVN coordinate system can be set for each constituent point (vertex) of the object OB.
[0116]
Then, according to this method, as shown in FIG. 14B, anisotropic reflection on a metal plate or the like having scratches in a certain direction (the direction of the tangent vector UVEC or the direction perpendicular to UVEC) can be expressed. become.
[0117]
2.3 Specular mapping
Now, it is desirable to realize the shading calculation using the reflection vector R2 obtained in FIG. 4B or the above equation (5) by so-called specular mapping. In Phong's model that calculates the intensity of specular reflection based on the angle formed by the reflection vector R2 and the line-of-sight vector, the specular shape (highlight shape) becomes unnatural due to the influence of the polygon (primitive surface in a broad sense). This is because the problem of becoming may occur.
[0118]
However, in the Ohira, Takagi, and Yokoi models described above, the intensity of specular reflected light, which is a scalar quantity, is output as a calculation result. Therefore, the problem that the specular shape becomes unnatural due to the influence of the polygon shape cannot be solved by a so-called specular mapping method.
[0119]
In this case, the problem that the specular shape depends on the polygon shape can be solved by calculating the intensity of the specular reflection light in units of pixels as in the non-real time processing CG. However, this solution is unrealistic in a game system that requires real-time processing.
[0120]
On the other hand, in the present embodiment, not the scalar quantity but the reflection vector R2 is obtained as in the above equation (5). Therefore, if the texture coordinates are obtained based on the reflection vector R2, and the specular expression texture is mapped to the object based on the texture coordinates, the specular mapping can be realized.
[0121]
More specifically, for example, a specular expression texture as shown in FIG. This specular expression texture may be generated in real time.
[0122]
In the specular expression texture shown in FIG. 15A, for example, a white highlight (light source) image is drawn at the center, and the luminance gradually attenuates from the center toward the periphery and changes to black. Note that it is desirable to change the shape of the highlight image drawn on the specular expression texture so that the highlight image after final polar coordinate conversion described later has a desired appropriate shape.
[0123]
A virtual sphere 30 as shown in FIG. 15B is assumed based on the specular expression texture shown in FIG.
[0124]
Then, as shown in FIG. 16, the virtual sphere 30 is set so as to include the object OB. Next, a reflection vector at the component point P is obtained based on the light source vector L, and a reflection vector R2 in consideration of anisotropic reflection is obtained from the reflection vector by the method of this embodiment. Then, by obtaining the intersection point PR between the reflection vector R2 and the phantom sphere 30, the texture coordinates TX and TY (coordinate values) of the specular expression texture are obtained, and these TX and TY are set as the constituent points P.
[0125]
Then, based on the texture coordinates TX and TY set at each constituent point in this way, the specular expression texture shown in FIG. 15A is mapped to the object OB to realize specular mapping.
[0126]
By doing so, the specular shape (highlight shape) is not affected by the polygon shape, so that a more natural and realistic image can be generated.
[0127]
3. Processing of this embodiment
Next, a detailed example of the processing of this embodiment will be described using the flowcharts of FIGS.
[0128]
First, PN (composition point number) is set to 0 (step S1).
[0129]
Next, tangent vectors UVEC and VVEC at the constituent point (vertex) PN are obtained based on the above formulas (11) and (12) (step S2).
[0130]
Next, as described with reference to FIG. 13, the outer product calculation of the tangent vectors UVEC and VVEC is performed to obtain the normal vector N (step S3).
[0131]
Next, a reflection vector R is obtained based on the light source information, the position of the constituent point PN, and the normal vector N at the constituent point PN (step S4). For example, in the case of a point light source, a vector connecting the light source position and the position of the component point PN is obtained as the light source vector L in FIG. 4A, and the reflection vector R is obtained based on the light source vector L and the normal vector N. . On the other hand, in the case of a parallel light source, a reflection vector R is obtained based on a light source vector L and a normal vector N from the parallel light source.
[0132]
Next, as described in A1 of FIG. 5, the reflection vector R is coordinate-transformed from the world coordinate system to the UVN coordinate system (coordinate system composed of UVEC, VVEC, and N) to obtain RUVN (step S5).
[0133]
Next, as described in A2 of FIG. 5, scaling calculation based on the coefficients CU and CV representing the direction of anisotropic reflection is performed on RUFN in the UVN coordinate system to obtain a reflection vector R2UVN (step S6). .
[0134]
Next, as will be described with reference to A3 in FIG. 5, R2UVN is coordinate-transformed into the world coordinate system to obtain a reflection vector R2 (step S7).
[0135]
Next, based on the angle θ formed by R2 and the line-of-sight vector, for example, P S × COS n θ is calculated, and the intensity of the specular reflected light at the constituent point PN is obtained (step S8).
[0136]
Next, it is determined whether or not PN is larger than PEND. If PN is smaller than PEND, PN is incremented by 1 (step S10), and the process returns to step S2. On the other hand, if it is larger than PEND, the process is terminated.
[0137]
FIG. 18 is a flowchart for performing specular mapping. When specular mapping is performed, the process of FIG. 18 is performed in step S8 of FIG.
[0138]
First, when the center of the object is set as the center of the virtual sphere, a matrix M that matches the direction connecting the center of the object and the center of the highlight image on the virtual sphere (the center of the map) with the direction of the line-of-sight vector is set. Obtain (step S11).
[0139]
That is, as shown in FIG. 19A, a virtual sphere 30 whose center coincides with the center of the object OB is assumed. For example, in the case where the line-of-sight vector toward the viewpoint VP in the XYZ coordinate system (which may be set for each constituent point) set for the object is E, it is shown in FIGS. 19B and 19C. Thus, an X′Y′Z ′ coordinate system is assumed in which the direction of the line-of-sight vector E ′ is directed to the negative direction of the X ′ axis. Then, the matrix M is a matrix for converting the line-of-sight vector E ′ to E as shown in the following equation (13).
[0140]
E = M × E '(13)
From the above equation (13),
E '= M -1 × E (14)
It becomes. In the above formula (14), M -1 Is the inverse transformation matrix of M.
[0141]
And this inverse transformation matrix M -1 Based on the above, the reflection vector R2 is converted as shown in the following equation (15) to obtain the reflection vector R2 ′ (step S12).
[0142]
R2 '= M -1 × R2 (15)
Next, as shown in FIG. 19D, the reflection vector R2 ′ is subjected to polar coordinate conversion to obtain texture coordinates TX and TY (step S13).
[0143]
That is, as shown in FIG. 19D, a vector obtained by projecting the reflection vector R2 ′ onto the X′Z ′ plane is R2 ″, and the angle between R2 ″ and the X ′ axis is θ1 (degrees). The angle formed by the reflection vector R2 ′ and the Y ′ axis is θ2 (degrees). In this case, the texture coordinates TX and TY can be obtained by the following equation (16).
[0144]
TX = θ1 / 360
TY = θ2 / 180 (16)
For example, in the above equation (16), when θ1 = 180 (degrees) and θ2 = 90 (degrees), as is clear from FIG. 19D, the direction of the reflection vector R2 ′ and the line-of-sight vector E ′ The direction matches. The texture coordinates at this time are TX = 0.5 and TY = 0.5, and the center of the highlight image of the specular expression texture (the center of the map) is referred to. That is, the conversion of the above equation (15) can be said to be a conversion in which the center of the highlight image of the specular expression texture is referred to when the direction of the reflection vector coincides with the direction of the line-of-sight vector.
[0145]
Finally, the obtained texture coordinates TX and TY are assigned to the constituent point PN (vertex) (step S14). By using the texture coordinates TX and TY to map a specular expression texture as shown in FIG. 15A to the object OB, so-called specular mapping can be realized.
[0146]
4). Hardware configuration
Next, an example of a hardware configuration capable of realizing the present embodiment will be described with reference to FIG.
[0147]
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.
[0148]
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. )
[0149]
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.
[0150]
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.
[0151]
The drawing processor 910 performs drawing (rendering) processing of an object composed of 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.
[0152]
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.
[0153]
Operation data from the game controller 942, save data from the memory card 944, and personal data are transferred via the serial interface 940.
[0154]
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.
[0155]
The RAM 960 is used as a work area for various processors.
[0156]
The DMA controller 970 controls DMA transfer between the processor and memory (RAM, VRAM, ROM, etc.).
[0157]
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.
[0158]
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 game systems becomes possible.
[0159]
All of the means of the present invention may be executed by hardware alone, or may be executed only by a program stored in an information storage medium or a program distributed via a communication interface. Alternatively, it may be executed by both hardware and a program.
[0160]
When each means of the present invention is executed by both hardware and a program, a program for executing each means of the present invention using hardware is stored in the information storage medium. Become. More specifically, the program instructs each processor 902, 904, 906, 910, 930, etc., which is hardware, and passes data if necessary. Each processor 902, 904, 906, 910, 930, etc. executes each means of the present invention based on the instruction and the passed data.
[0161]
FIG. 21A shows an example in which the present embodiment is applied to an arcade game system. The player enjoys the game by operating the lever 1102, the button 1104, and the like while viewing the game image displayed on the display 1100. Various processors and various memories are mounted on the built-in system board (circuit board) 1106. Information (program or data) for executing 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 information is referred to as storage information.
[0162]
FIG. 21B shows an example where the present embodiment is applied to a home game system. The player enjoys the game by operating the game controllers 1202 and 1204 while viewing the game image displayed on the display 1200. In this case, the stored information is stored in a CD 1206 or a memory card 1208, 1209, which is an information storage medium that is detachable from the main system.
[0163]
FIG. 21C 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) is shown. In this case, the stored 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 a game image and a game sound, which is transmitted to the terminals 1304-1 to 1304-n and output at the terminal.
[0164]
In the case of the configuration shown in FIG. 21C, each unit of the present invention may be executed in a distributed manner between the host device (server) and the terminal. The storage information for executing 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.
[0165]
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).
[0166]
The present invention is not limited to the one described in the above embodiment, and various modifications can be made.
[0167]
For example, 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.
[0168]
Further, as a method of changing the direction of the reflection vector, the method described with reference to FIG. 5 is particularly desirable from the viewpoint of simplification of processing, but the present invention is not limited to this, and various modifications can be made.
[0169]
Further, the second coordinate system setting method is not limited to the method described with reference to FIGS. 13, 14 </ b> A, and 14 </ b> B.
[0170]
Further, the intensity (luminance) of the specular reflection light obtained by the shading calculation is set to an α value (information stored in association with each pixel, plus alpha information other than color information), and based on this α value. Then, α composition (α blending, α addition) may be performed to express a state in which reflected light is anisotropically reflected by a scratch on the glass surface, for example.
[0171]
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.).
[0172]
The present invention is also applicable to various game systems (image generation systems) such as a commercial 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]
FIGS. 1A and 1B are diagrams for explaining anisotropic reflection. FIGS.
FIGS. 2A and 2B are diagrams for explaining a method for realizing anisotropic reflection using an ellipsoid model. FIGS.
FIG. 3 is an example of a functional block diagram of the game system of the present embodiment.
FIGS. 4A and 4B are diagrams for explaining a method for realizing anisotropic reflection by changing the direction of a reflection vector. FIGS.
FIG. 5 is a diagram for explaining a technique for realizing anisotropic reflection by changing the direction of a reflection vector in a UVN coordinate system.
FIGS. 6A and 6B are diagrams for describing a method of changing the direction of a reflection vector using a scaling coefficient.
7A is an example of a generated image in the case of normal shading, FIG. 7B is an example of a generated image when an ellipsoidal model is used, and FIG. 7C is an example of a generated image when the method of this embodiment is used. .
8A is an example of a generated image when an ellipsoid model is used, and FIG. 8B is an example of a generated image when the method of this embodiment is used.
FIGS. 9A, 9B, 9C, and 9D are examples of generated images when the scaling coefficient is gradually changed.
10 (A), (B), (C), and (D) are also examples of generated images when the scaling coefficient is gradually changed. FIG.
FIG. 11 is a diagram for explaining a method of expressing an object by a free-form surface.
FIG. 12 is a diagram for explaining a method of expressing an object by a free-form surface.
FIG. 13 is a diagram for explaining a method of obtaining a tangent vector at each constituent point and setting a UVN coordinate system.
FIGS. 14A and 14B are diagrams for explaining a UVN coordinate system setting method when an object is represented by a polygon.
FIGS. 15A and 15B are diagrams for explaining a specular expression texture and a virtual sphere. FIG.
FIG. 16 is a diagram for describing specular mapping;
FIG. 17 is a flowchart illustrating a detailed example of processing according to the embodiment.
FIG. 18 is a flowchart illustrating a detailed example of processing according to the embodiment.
FIGS. 19A, 19B, 19C, and 19D are diagrams for explaining how to obtain texture coordinates of a specular expression texture.
FIG. 20 is a diagram illustrating an example of a hardware configuration capable of realizing the present embodiment.
FIGS. 21A, 21B, and 21C are diagrams illustrating examples of various types of systems to which the present embodiment is applied.
[Explanation of symbols]
OB object
LS light source
VP perspective
L light source vector
N normal vector
R, R2, RUVN, R2UVN reflection vector
20, 22 Curved patch
30 virtual spheres
100 processor
110 Reflection vector calculation unit
112 Reflection vector changing part
114 Shading calculation unit
130 Drawing part
132 Texture mapping section
160 Operation unit
170 Storage unit
172 Main memory
174 Drawing area
176 texture storage
180 Information storage medium
190 Display
192 sound output section
194 Portable information storage device
196 Communication Department

Claims (16)

画像生成を行うゲームシステムであって、
光源情報と法線情報とに基づいてオブジェクトの各構成点での反射ベクトルを求める手段と、
前記反射ベクトルの方向を、前記各構成点に設定された傷方向ベクトルに基づく方向に変化させて、第2の反射ベクトルを求める反射ベクトル変化手段と、
前記第2の反射ベクトルと視点情報とに基づいてオブジェクトのシェーディング演算を行うシェーディング演算手段とを含み、
前記傷方向ベクトルは、オブジェクト表面に特定方向の傷がついていると想定した場合の前記傷の方向により設定されることを特徴とするゲームシステム。
A game system for generating images,
Means for obtaining a reflection vector at each constituent point of the object based on the light source information and the normal information;
Reflection vector changing means for obtaining a second reflection vector by changing the direction of the reflection vector to a direction based on a flaw direction vector set at each of the constituent points ;
Shading calculation means for performing a shading calculation of an object based on the second reflection vector and viewpoint information ,
The game system according to claim 1, wherein the flaw direction vector is set according to the flaw direction when it is assumed that the object surface has a flaw in a specific direction .
請求項1において、
前記反射ベクトル変化手段が、
前記反射ベクトルを、前記傷方向ベクトルに基づく方向を定義する第2の座標系に座標変換し、前記第2の座標系において前記反射ベクトルの方向を変化させて前記第2の反射ベクトルを求め、前記第2の座標系での前記第2の反射ベクトルを前記第1の座標系に座標変換し、
前記シェーディング演算手段が、
前記第1の座標系での前記第2の反射ベクトルに基づいてオブジェクトのシェーディング演算を行うことを特徴とするゲームシステム。
In claim 1,
The reflection vector changing means is
Coordinate-transforming the reflection vector into a second coordinate system that defines a direction based on the flaw direction vector, and changing the direction of the reflection vector in the second coordinate system to obtain the second reflection vector; Coordinate-transforming the second reflection vector in the second coordinate system into the first coordinate system;
The shading calculation means is
A game system, wherein an object shading operation is performed based on the second reflection vector in the first coordinate system.
請求項2において、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、
前記反射ベクトル変化手段が、
前記第2の座標系での前記反射ベクトルの方向を前記第1、第2の軸のいずれかの方向に変化させて、前記第2の反射ベクトルを求めることを特徴とするゲームシステム。
In claim 2,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis,
The reflection vector changing means is
A game system characterized in that the second reflection vector is obtained by changing the direction of the reflection vector in the second coordinate system to one of the first and second axes.
請求項2又は3において、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、
前記反射ベクトル変化手段が、
前記第2の座標系での前記反射ベクトルの前記第1の軸の成分を第1の係数でスケーリングすると共に、前記第2の座標系での前記反射ベクトルの前記第2の軸の成分を第2の係数でスケーリングすることで、前記第2の反射ベクトルを求めることを特徴とするゲームシステム。
In claim 2 or 3,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis,
The reflection vector changing means is
The component of the first axis of the reflection vector in the second coordinate system is scaled by a first coefficient, and the component of the second axis of the reflection vector in the second coordinate system is scaled. A game system characterized in that the second reflection vector is obtained by scaling by a factor of two.
請求項2乃至4のいずれかにおいて、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有し、オブジェクトが自由曲面により表される場合において、
自由曲面の各構成点での2つの接線ベクトルの方向に、前記第1、第2の軸が設定されること特徴とするゲームシステム。
In any of claims 2 to 4,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis, and the object is represented by a free-form surface,
A game system, wherein the first and second axes are set in the directions of two tangent vectors at respective constituent points of a free-form surface.
請求項5において、
前記2つの接線ベクトルに基づき前記法線情報となる法線ベクトルが求められ、該法線ベクトルの方向に、前記第2の座標系の第3の軸が設定されることを特徴とするゲームシステム。
In claim 5,
A game system characterized in that a normal vector serving as the normal information is obtained based on the two tangent vectors, and a third axis of the second coordinate system is set in the direction of the normal vector. .
請求項1乃至6のいずれかにおいて、
前記シェーディング演算手段が、
スペキュラー表現テクスチャのテクスチャ座標を前記第2の反射ベクトルに基づいて求め、求められたテクスチャ座標に基づいて前記スペキュラー表現テクスチャをオブジェクトにマッピングすることを特徴とするゲームシステム。
In any one of Claims 1 thru | or 6.
The shading calculation means is
A game system, wherein texture coordinates of a specular expression texture are obtained based on the second reflection vector, and the specular expression texture is mapped to an object based on the obtained texture coordinates.
請求項7において、
前記シェーディング演算手段が、
前記第2の反射ベクトルの方向が視線ベクトルの方向に一致した場合に前記スペキュラー表現テクスチャに描かれたハイライト画像の中心が参照される変換を前記第2の反射ベクトルに対して施し、変換された前記第2の反射ベクトルに基づいて前記テクスチャ座標を求めることを特徴とするゲームシステム。
In claim 7,
The shading calculation means is
When the direction of the second reflection vector coincides with the direction of the line-of-sight vector, a conversion is performed on the second reflection vector by referring to the center of the highlight image drawn on the specular expression texture. A game system, wherein the texture coordinates are obtained based on the second reflection vector.
コンピュータ読み取り可能な情報記憶媒体であって、
光源情報と法線情報とに基づいてオブジェクトの各構成点での反射ベクトルを求める手段と、
前記反射ベクトルの方向を、前記各構成点に設定された傷方向ベクトルに基づく方向に変化させて、第2の反射ベクトルを求める反射ベクトル変化手段と、
前記第2の反射ベクトルと視点情報とに基づいてオブジェクトのシェーディング演算を行うシェーディング演算手段としてコンピュータを機能させるためのプログラムを記憶し
前記傷方向ベクトルは、オブジェクト表面に特定方向の傷がついていると想定した場合の前記傷の方向により設定されることを特徴とする情報記憶媒体。
A computer-readable information storage medium,
Means for obtaining a reflection vector at each constituent point of the object based on the light source information and the normal information;
Reflection vector changing means for obtaining a second reflection vector by changing the direction of the reflection vector to a direction based on a flaw direction vector set at each of the constituent points ;
Storing a program for causing a computer to function as a shading calculation means for performing a shading calculation of an object based on the second reflection vector and viewpoint information ;
The information storage medium according to claim 1, wherein the flaw direction vector is set according to the flaw direction when it is assumed that the object surface has a flaw in a specific direction .
請求項9において、
前記反射ベクトル変化手段が、
前記反射ベクトルを、前記傷方向ベクトルに基づく方向を定義する第2の座標系に座標変換し、前記第2の座標系において前記反射ベクトルの方向を変化させて前記第2の反射ベクトルを求め、前記第2の座標系での前記第2の反射ベクトルを前記第1の座標系に座標変換し、
前記シェーディング演算手段が、
前記第1の座標系での前記第2の反射ベクトルに基づいてオブジェクトのシェーディング演算を行うことを特徴とする情報記憶媒体。
In claim 9,
The reflection vector changing means is
Coordinate-transforming the reflection vector into a second coordinate system that defines a direction based on the flaw direction vector, and changing the direction of the reflection vector in the second coordinate system to obtain the second reflection vector; Coordinate-transforming the second reflection vector in the second coordinate system into the first coordinate system;
The shading calculation means is
An information storage medium that performs shading calculation of an object based on the second reflection vector in the first coordinate system.
請求項10において、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、
前記反射ベクトル変化手段が、
前記第2の座標系での前記反射ベクトルの方向を前記第1、第2の軸のいずれかの方向に変化させて、前記第2の反射ベクトルを求めることを特徴とする情報記憶媒体。
In claim 10,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis,
The reflection vector changing means is
An information storage medium characterized in that the second reflection vector is obtained by changing the direction of the reflection vector in the second coordinate system to one of the first and second axes.
請求項10又は11において、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有する場合において、
前記反射ベクトル変化手段が、
前記第2の座標系での前記反射ベクトルの前記第1の軸の成分を第1の係数でスケーリングすると共に、前記第2の座標系での前記反射ベクトルの前記第2の軸の成分を第2の係数でスケーリングすることで、前記第2の反射ベクトルを求めることを特徴とする情報記憶媒体。
In claim 10 or 11,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis,
The reflection vector changing means is
The component of the first axis of the reflection vector in the second coordinate system is scaled by a first coefficient, and the component of the second axis of the reflection vector in the second coordinate system is scaled. An information storage medium characterized in that the second reflection vector is obtained by scaling by a coefficient of 2.
請求項10乃至12のいずれかにおいて、
前記第2の座標系が、前記傷方向ベクトルに基づく方向を表す第1の軸と該第1の軸に交差する第2の軸を有し、オブジェクトが自由曲面により表される場合において、
自由曲面の各構成点での2つの接線ベクトルの方向に、前記第1、第2の軸が設定されること特徴とする情報記憶媒体。
In any of claims 10 to 12,
When the second coordinate system has a first axis representing a direction based on the flaw direction vector and a second axis intersecting the first axis, and the object is represented by a free-form surface,
An information storage medium characterized in that the first and second axes are set in the directions of two tangent vectors at each constituent point of a free-form surface.
請求項13において、
前記2つの接線ベクトルに基づき前記法線情報となる法線ベクトルが求められ、該法線ベクトルの方向に、前記第2の座標系の第3の軸が設定されることを特徴とする情報記憶媒体。
In claim 13,
A normal vector serving as the normal vector is obtained based on the two tangent vectors, and a third axis of the second coordinate system is set in the direction of the normal vector. Medium.
請求項9乃至14のいずれかにおいて、
前記シェーディング演算手段が、
スペキュラー表現テクスチャのテクスチャ座標を前記第2の反射ベクトルに基づいて求め、求められたテクスチャ座標に基づいて前記スペキュラー表現テクスチャをオブジェクトにマッピングすることを特徴とする情報記憶媒体。
In any of claims 9 to 14,
The shading calculation means is
An information storage medium, wherein texture coordinates of a specular expression texture are obtained based on the second reflection vector, and the specular expression texture is mapped to an object based on the obtained texture coordinates.
請求項15において、
前記シェーディング演算手段が、
前記第2の反射ベクトルの方向が視線ベクトルの方向に一致した場合に前記スペキュラー表現テクスチャに描かれたハイライト画像の中心が参照される変換を前記第2の反射ベクトルに対して施し、変換された前記第2の反射ベクトルに基づいて前記テクスチャ座標を求めることを特徴とする情報記憶媒体。
In claim 15,
The shading calculation means is
When the direction of the second reflection vector coincides with the direction of the line-of-sight vector, a conversion is performed on the second reflection vector by referring to the center of the highlight image drawn on the specular expression texture. An information storage medium characterized in that the texture coordinates are obtained based on the second reflection vector.
JP2000219030A 2000-07-19 2000-07-19 GAME SYSTEM AND INFORMATION STORAGE MEDIUM Expired - Fee Related JP4518643B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000219030A JP4518643B2 (en) 2000-07-19 2000-07-19 GAME SYSTEM AND INFORMATION STORAGE MEDIUM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000219030A JP4518643B2 (en) 2000-07-19 2000-07-19 GAME SYSTEM AND INFORMATION STORAGE MEDIUM

Publications (2)

Publication Number Publication Date
JP2002032790A JP2002032790A (en) 2002-01-31
JP4518643B2 true JP4518643B2 (en) 2010-08-04

Family

ID=18713884

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000219030A Expired - Fee Related JP4518643B2 (en) 2000-07-19 2000-07-19 GAME SYSTEM AND INFORMATION STORAGE MEDIUM

Country Status (1)

Country Link
JP (1) JP4518643B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109224448A (en) * 2018-09-25 2019-01-18 北京天马时空网络技术有限公司 A kind of method and apparatus of streamer rendering

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3702269B2 (en) * 2002-12-06 2005-10-05 コナミ株式会社 Image processing apparatus, computer control method, and program
JP4434830B2 (en) 2004-05-18 2010-03-17 パイオニア株式会社 Domed diaphragm
KR100824055B1 (en) 2006-07-18 2008-04-21 엠텍비젼 주식회사 3D specular reflection processing device and method
JP7138994B1 (en) 2022-04-27 2022-09-20 Activ8株式会社 Image processing program, image processing apparatus, and image processing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6479888A (en) * 1987-09-22 1989-03-24 Dainippon Printing Co Ltd Method and device for treating surface of substance in expressing three-dimensional substance as two-dimensional substance

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109224448A (en) * 2018-09-25 2019-01-18 北京天马时空网络技术有限公司 A kind of method and apparatus of streamer rendering

Also Published As

Publication number Publication date
JP2002032790A (en) 2002-01-31

Similar Documents

Publication Publication Date Title
JP4079410B2 (en) Image generation system, program, and information storage medium
JP3777288B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2001070633A (en) Image generation system and information storage medium
JP3656012B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4223244B2 (en) Image generation system, program, and information storage medium
JP4518643B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP3442344B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4229319B2 (en) Image generation system, program, and information storage medium
JP2001079261A (en) Image generation system and information storage medium
JP2001229403A (en) Game system and information storage medium
JP3297410B2 (en) Image generation system and information storage medium
JP4245356B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4707078B2 (en) Image generation system, program, and information storage medium
JP4574058B2 (en) Image generation system, program, and information storage medium
JP3254195B2 (en) Image generation system and information storage medium
JP4577968B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP4592039B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2004070669A (en) Image generation system, program, and information storage medium
JP3377490B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP3614340B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP3431562B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2003162734A (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP3538392B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP4413369B2 (en) Image generation system and information storage medium
JP2006323512A (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: 20070605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090812

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091008

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091209

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100205

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

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

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4518643

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130528

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140528

Year of fee payment: 4

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

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees