JP2004334661A - Image generating system, program, and information storage medium - Google Patents

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

Info

Publication number
JP2004334661A
JP2004334661A JP2003131575A JP2003131575A JP2004334661A JP 2004334661 A JP2004334661 A JP 2004334661A JP 2003131575 A JP2003131575 A JP 2003131575A JP 2003131575 A JP2003131575 A JP 2003131575A JP 2004334661 A JP2004334661 A JP 2004334661A
Authority
JP
Japan
Prior art keywords
texture
value
original image
data
unit
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.)
Withdrawn
Application number
JP2003131575A
Other languages
Japanese (ja)
Inventor
Naoya Sasaki
直哉 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Namco Ltd
Original Assignee
Namco Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Ltd filed Critical Namco Ltd
Priority to JP2003131575A priority Critical patent/JP2004334661A/en
Publication of JP2004334661A publication Critical patent/JP2004334661A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image generating system, program, and information storage medium for expressing various conversion processing with a small processing load. <P>SOLUTION: The pixel data (color, α value, Z value, luminance or the like) of an original image are set in an indirect texture storage part 177, and data for conversion are set in a normal texture storage part 178. The pixel data of the original image read from the indirect texture storage part 177 are set to texture coordinates, the data for conversion are read from the normal texture storage part 178, and the read data for conversion are plotted in pixels to be plotted so that the pixel data of the original image can be converted. A first α value obtained by converting the Z value of the original image is combined with an α value for α non-uniformity setting so that a second α value can be generated, and the color of each pixel of the original image is combined with a fog color on the basis of the second α value. The Z value or luminance are converted into the α value, and a depth-of-field image or a halation image are generated on the basis of the acquired α value. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、画像生成システム、プログラム及び情報記憶媒体に関する。
【0002】
【従来技術】
従来より、仮想的な3次元空間であるオブジェクト空間内において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。このよう画像生成システムではテクスチャマッピングと呼ばれる手法を用いてリアルな画像を生成している。
【0003】
【特許文献1】
特開2001−224847号公報
【0004】
【発明が解決しようとする課題】
しかしながら、これまでのテクスチャマッピングは、テクスチャ座標(U、V)でアドレス指定されたテクスチャ記憶部のテクセルデータを、描画対象ピクセルに描画(マッピング)することで実現されていた。このため例えば被写界深度、フォグむら(fog nonuniformity)表現、ガンマ補正等の変換処理(画像エフェクト処理)を実現しようとすると、処理負荷が重くなったり、処理が繁雑化したり、処理速度が遅くなるなどの課題があった。
【0005】
本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、少ない処理負荷で種々の変換処理を表現できる画像生成システム、プログラム及び情報記憶媒体を提供することにある。
【0006】
【課題を解決するための手段】
本発明は、画像生成を行う画像生成システムであって、間接テクスチャのテクセルデータを記憶する間接テクスチャ記憶部と、通常テクスチャのテクセルデータを記憶する通常テクスチャ記憶部と、描画対象ピクセルのテクスチャ座標で指定される間接テクスチャのテクセルデータを、前記間接テクスチャ記憶部から読み出し、読み出されたテクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から通常テクスチャのテクセルデータを読み出し、読み出されたテクセルデータに基づいて、描画対象ピクセルの描画処理を行うテクスチャマッピング部と、元画像のピクセルデータを、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定する間接テクスチャ設定部と、ピクセルデータを変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定する通常テクスチャ設定部とを含み、前記テクスチャマッピング部が、前記間接テクスチャ記憶部から読み出された元画像のピクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から前記変換用データを読み出し、読み出された変換用データに基づいて描画対象ピクセルの描画処理を行うことで、元画像のピクセルデータの変換処理を行う画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。
【0007】
本発明では、元画像のピクセルデータがテクセルデータに設定された間接テクスチャと、変換用データがテクセルデータに設定された通常テクスチャとに基づいて、間接テクスチャマッピングが行われ、元画像のピクセルデータの変換処理が実現される。従って間接テクスチャマッピングを行うだけで、全表示画面分或いは分割表示画面分のピクセルデータを一度に変換することが可能となり、少ない処理負荷で効果的な変換処理(画像エフェクト処理)を実現できる。
【0008】
なお本発明では、間接テクスチャ記憶部から読み出されたテクセルデータを、直接に通常テクスチャ記憶部のテクスチャ座標に設定してもよいし、テクセルデータとテクスチャ座標とに基づく演算処理(加算、減算、乗算又は除算等)により得られたデータを、通常テクスチャ記憶部のテクスチャ座標に設定してもよい。また通常テクスチャ記憶部から読み出されたテクセルデータを、そのまま描画対象ピクセルに描画してもよいし、読み出されたピクセルデータに演算処理を施したものを描画対象ピクセルに描画してもよい。
【0009】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記間接テクスチャ設定部が、元画像のZ値を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、前記通常テクスチャ設定部が、Z値をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、前記テクスチャマッピング部が、間接テクスチャマッピングによる前記変換処理により、元画像のZ値をα値に変換するようにしてもよい。
【0010】
このようにすれば、間接テクスチャマッピングを有効利用して、元画像のZ値(Zプレーン)をα値(αプレーン)に変換できるようになる。そしてこの変換により得られたα値を用いて、種々のエフェクト画像を生成することが可能となる。なおZ値とα値との間の変換特性は、通常テクスチャを用いて任意の特性に設定できる。また通常テクスチャを動的に変化させることで、得られるα値の値を動的に変化させてもよい。
【0011】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、元画像のZ値を前記変換処理により変換することで得られた第1のα値と、各ピクセルのα値が仮想プレーン内で不均一に設定されるαむら設定用α値とを合成して、第2のα値を生成するα値合成部と、元画像の各ピクセルの色と所与の色とを、前記第2のα値に基づいて合成する色合成部を含んでもよい(これらの各部としてコンピュータを機能させる、或いはこれらの各部としてコンピュータを機能させるプログラムを記憶してもよい)。
【0012】
本発明によれば、元画像のZ値(奥行き値)に応じて設定された第1のα値と、αむら設定用α値が合成され、得られた第2のα値に基づいて、元画像の色と所与の色(例えばフォグの色)が合成される。このようにすることで、元画像のZ値とαむら(むら模様)の両方が加味された画像エフェクトを、元画像に対して施すことができる。これにより、リアルなフォグむら画像等を生成できる。
【0013】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記α値合成部が、仮想プレーン内でのむら模様が異なる複数のαむら設定用α値を合成して、前記第1のα値の合成対象となるαむら設定用α値を生成するようにしてもよい。
【0014】
この場合、複数のαむら設定用α値に対応する複数の仮想プレーンに対して、仮想カメラからの仮想距離を設定し、この仮想距離に基づいて、複数のαむら設定用α値の合成に使用するα値を制御したり、複数のαむら設定用α値の仮想プレーン内でのむら模様を制御してもよい。
【0015】
また、α値合成部が、複数のαむら設定用α値に対応する複数の仮想プレーンのうち最も手前側の仮想プレーンについての仮想カメラからの仮想距離が、所与の距離よりも小さくなった場合に、最も手前側の仮想プレーンに対応するαむら設定用α値の合成率を低くし、複数の仮想プレーンのうち最も奥側の仮想プレーンについての仮想カメラからの仮想距離が、所与の距離よりも大きくなった場合に、最も奥側の仮想プレーンに対応するαむら設定用α値の合成率を低くするようにしてもよい。
【0016】
なお、最も手前側の仮想プレーンに対応するαむら設定用α値の合成率を低くした後に(零にした後に)、最も奥側の仮想プレーンの更に奥側に、新たな仮想プレーンを発生させてもよい。また、最も奥側の仮想プレーンに対応するαむら設定用α値の合成率を低くした後に(零にした後に)、最も手前側の仮想プレーンの更に手前側に、新たな仮想プレーンを発生させてもよい。
【0017】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、α値合成部が、仮想カメラ情報及び時間情報の少なくとも一方に応じて、αむら設定用α値の仮想プレーン内でのむら模様を変化させるようにしてもよい。
【0018】
このようにすれば、仮想カメラの動きや時間経過に応じて、むら模様が多様に変化するようになり、更にリアルな画像を生成できる。
【0019】
なおこの場合に、複数のαむら設定用α値の仮想プレーン内でのむら模様を変化させてもよいし、複数のαむら設定用α値を合成することで得られるαむら設定用α値(第1のα値の合成対象になるαむら設定用α値)のむら模様を変化させてもよい。
【0020】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記α値合成部が、αむら設定用α値に対応する仮想プレーンについての仮想カメラからの仮想距離が小さくなるほど、αむら設定用α値のむら模様を拡大するようにしてもよい。
【0021】
なお、α値合成部が、スクリーンに平行な第1の方向に仮想カメラが移動した場合に、αむら設定用α値のむら模様を、第1の方向とは逆方向の第2の方向に移動させるようにしてもよい。この場合に、αむら設定用α値のむら模様の移動距離を、仮想カメラからの仮想距離に応じて変化させてもよい。
【0022】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像のZ値を前記変換処理により変換することで得られたα値に基づいて合成する色合成部を含んでもよい(これらの各部としてコンピュータを機能させる、或いはこれらの各部としてコンピュータを機能させるプログラムを記憶してもよい)。
【0023】
このようにすれば、元画像の各ピクセルのZ値(奥行き値)に応じた値に設定されたα値に基づいて、元画像とぼかし画像とが合成される。従って、Z値に応じて、ぼかし画像の合成比率等を変化させることが可能になり、被写界深度などの表現が可能になる。
【0024】
なお、Z値(奥行き値)は、仮想カメラ(視点)から近いほど大きい値にしてもよいし、仮想カメラから遠いほど大きい値にしてもよい。また、元画像の合成対象となるぼかし画像の合成手法としては種々の手法を採用できる。またα値を用いた合成処理はαブレンディングに限定されない。
【0025】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記間接テクスチャ設定部が、元画像の色を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、前記通常テクスチャ設定部が、元画像の色を変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、前記テクスチャマッピング部が、間接テクスチャマッピングによる前記変換処理により、元画像の色を変換するようにしてもよい。
【0026】
このようにすれば種々の色データ変換処理を実現できる。
【0027】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、変換用データを用いた元画像の色の変換が、ガンマ補正、ネガポジ反転、ポスタリゼーション、ソラリゼーション、2値化の変換の少なくとも1つであってもよい。
【0028】
なお本発明における色データ変換処理は上記した変換処理に限定されない。
【0029】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、前記間接テクスチャ設定部が、元画像の輝度を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、前記通常テクスチャ設定部が、元画像の輝度をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、前記テクスチャマッピング部が、間接テクスチャマッピングによる前記変換処理により、元画像の輝度をα値に変換するようにしてもよい。
【0030】
このようにすれば、間接テクスチャマッピングを有効利用して、元画像の輝度(輝度プレーン)を少ない処理負荷でα値(αプレーン)に変換できるようになる。そしてこの変換により得られたα値を用いて、種々のエフェクト画像を生成することが可能となる。なお輝度とα値との間の変換特性は、通常テクスチャを用いて任意の特性に設定できる。また通常テクスチャを動的に変化させることで、得られるα値の値を動的に変化させてもよい。
【0031】
また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像の輝度を前記変換処理により変換することで得られたα値に基づいて合成する色合成部を含んでもよい(これらの各部としてコンピュータを機能させる、或いはこれらの各部としてコンピュータを機能させるプログラムを記憶してもよい)。
【0032】
このようにすれば、元画像の各ピクセルの輝度に応じた値に設定されたα値に基づいて、元画像とぼかし画像を合成できる。従って、輝度に応じて、ぼかし画像の合成比率等を変化させることが可能になり、ハレーション画像の表現などが可能になる。
【0033】
【発明の実施の形態】
以下、本実施形態について説明する。
【0034】
なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。
【0035】
1.構成
図1に本実施形態の画像生成システム(ゲームシステム)の機能ブロック図の例を示す。なお、本実施形態の画像生成システムは、図1の構成要素(各部)を全て含む必要はなく、その一部(例えば操作部160、携帯型情報記憶装置194又は通信部196等)を省略した構成としてもよい。
【0036】
操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、シフトレバー、アクセルペダル、ブレーキペダル、マイク、センサー、タッチパネル型ディスプレイ、或いは筺体などのハードウェアにより実現できる。
【0037】
記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどのハードウェアにより実現できる。
【0038】
情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などのハードウェアにより実現できる。処理部100は、この情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。即ち情報記憶媒体180には、本実施形態の各部としてコンピュータを機能させるためのプログラム(各部の処理をコンピュータに実行させるためのプログラム)が記憶(記録、格納)される。
【0039】
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などのハードウェアにより実現できる。
【0040】
音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどのハードウェアにより実現できる。
【0041】
携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などがある。
【0042】
通信部196は、外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。
【0043】
なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180(記憶部170)に配信するようにしてもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含めることができる。
【0044】
処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの各種の処理を行う。ここで処理部100が行うゲーム処理としては、ゲーム開始条件(コースやマップやキャラクタや参加プレーヤ人数の選択等)が満たされた場合にゲームを開始させる処理、ゲームを進行させる処理、キャラクタやマップなどのオブジェクトを配置する処理、オブジェクトを表示する処理、ゲーム結果を演算する処理、或いはゲーム終了条件が満たされた場合にゲームを終了させる処理などがある。また処理部100は記憶部170をワーク領域として各種処理を行う。この処理部100の機能は、各種プロセッサ(CPU、DSP等)やASIC(ゲートアレイ等)などのハードウェアや、プログラム(ゲームプログラム)により実現できる。
【0045】
処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、画像生成部120、音生成部130を含む。なおこれらの一部を省略してもよい。
【0046】
オブジェクト空間設定部110は、キャラクタ、樹木、車、柱、壁、建物、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。
【0047】
移動・動作処理部112は、移動オブジェクト(車、飛行機、又はキャラクタ等)の移動・動作演算(移動・動作シミュレーション)を行う。即ち、操作部160によりプレーヤが入力した操作データ、プログラム(移動・動作アルゴリズム)、或いは各種データ(モーションデータ)などに基づいて、移動オブジェクトをオブジェクト空間内で移動させたり、移動オブジェクトを動作(モーション、アニメーション)させる処理を行う。より具体的には、移動オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(各パーツオブジェクトの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。ここでフレームは、移動オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。
【0048】
仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点での画像を生成するための仮想カメラを制御する処理を行う。即ち、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置や視線方向を制御する処理)を行う。
【0049】
例えば、仮想カメラにより移動オブジェクトを後方から撮影する場合には、移動オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部112で得られた移動オブジェクトの位置、回転角度又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた移動経路で移動させながら予め決められた回転角度で回転させるようにしてもよい。この場合には、仮想カメラの位置(移動経路)や回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。
【0050】
画像生成部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。即ちいわゆる3次元ゲーム画像を生成する場合には、まず、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、透視変換、或いは光源処理等のジオメトリ処理が行われ、その処理結果に基づいて、描画データ(プリミティブ面の頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)が作成される。そして、この描画データ(プリミティブ面データ)に基づいて、透視変換後(ジオメトリ処理後)のオブジェクト(1又は複数プリミティブ面)を、描画バッファ172(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できるバッファ)に描画する。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。
【0051】
画像生成部120は、隠面消去部122、テクスチャマッピング部123、間接テクスチャ設定部124、通常テクスチャ設定部125、α値合成部126、色合成部127を含む。なおこれらの一部を省略する構成としてもよい。
【0052】
隠面消去部122は、Z値(奥行き情報)が格納されるZバッファ174(奥行きバッファ)等を用いて、Zバッファ法(奥行き比較法)により隠面消去処理を行う。
【0053】
テクスチャマッピング部123は、テクスチャ記憶部176に記憶されるテクスチャ(テクセルデータ)をオブジェクト(ポリゴン、或いは表示画面サイズ又は分割表示画面サイズの仮想ポリゴン)にマッピングする処理を行う。具体的には、テクスチャ座標で指定されるテクセルデータをテクスチャ記憶部176(テクスチャバッファ、テクスチャ用記憶領域)から読み出す。そして読み出したテクセルデータを描画対象ピクセルに描画する。この場合にテクスチャマッピング部123は、バイリニア補間などのテクセル補間を行いながらマッピング処理を行うことができる。
【0054】
そして本実施形態では、テクスチャマッピング部123が間接テクスチャマッピング(インダイレクトテクスチャマッピング)を行うことができる。
【0055】
より具体的にはテクスチャマッピング部123は、描画対象ピクセルのテクスチャ座標で指定される間接テクスチャ(インダイレクトテクスチャ)のテクセルデータを、間接テクスチャ記憶部177(間接テクスチャ用のテクスチャバッファ、記憶領域)から読み出す。この場合、描画対象ピクセルのテクスチャ座標は、例えばポリゴン(仮想ポリゴン)の頂点テクスチャ座標を補間(線形補間)することで得ることができる。そしてテクスチャマッピング部123は、間接テクスチャ記憶部177から読み出したテクセルデータによりテクスチャ座標を特定し(テクセルデータをテクスチャ座標に設定し)、このテクスチャ座標に基づいて、通常テクスチャ記憶部178(通常テクスチャ用のテクスチャバッファ、記憶領域)から通常テクスチャ(レギュラーテクスチャ)のテクセルデータを読み出す。そして読み出されたテクセルデータに基づいて、描画対象ピクセルの描画処理(マッピング)を行う。このようにすることで間接テクスチャマッピングが実現される。
【0056】
間接テクスチャ設定部124は、間接テクスチャ記憶部177に間接テクスチャを設定する処理(書き込む処理)を行う。より具体的には、例えば元画像(original image)のピクセルデータ(色、α値、Z値、又は輝度などのピクセルと関連づけて記憶できるデータ)を、間接テクスチャのテクセルデータ(テクセルに関連づけて記憶できるデータ)として、間接テクスチャ記憶部177に設定する。
【0057】
通常テクスチャ設定部125は、通常テクスチャ記憶部178に通常テクスチャを設定する処理(書き込む処理)を行う。より具体的には、例えばピクセルデータを同種又は異種のピクセルデータに変換するための変換用データ(変換テーブルデータ、関数データ、勾配データ)を、通常テクスチャのテクセルデータとして、通常テクスチャ記憶部178に設定する。
【0058】
そしてテクスチャマッピング部123は、間接テクスチャ設定部124により設定された間接テクスチャ(ピクセルデータ)と、通常テクスチャ設定部125により設定された通常テクスチャ(変換用データ)とに基づいて、間接テクスチャマッピングを行うことで、元画像(原画像)のピクセルデータの変換処理(同種又は異種のピクセルデータに変換する処理)を実現している。より具体的には、テクスチャマッピング部123は、間接テクスチャ記憶部177から読み出された元画像のピクセルデータに基づき、テクスチャ座標を特定し(テクスチャ座標を設定し)、このテクスチャ座標に基づいて通常テクスチャ記憶部178からピクセルデータの変換用データを読み出す。そして読み出された変換用データに基づき、描画対象ピクセルの描画処理を行うことで、元画像のピクセルデータの変換処理を実現する。
【0059】
α値合成部126はα値の合成処理を行う。より具体的には、第1のα値とαむら設定用α値とを合成(α値の乗算、加算、除算又は減算等)して、第2のα値を生成する。
【0060】
ここで、第1のα値では、例えば、元画像の各ピクセルのZ値に応じた値に、各ピクセルのα値が設定されている。また、αむら設定用α値では、仮想プレーン内(ピクセル間、画面内)において各ピクセルのα値が不均一(nonuniform)に設定されている。
【0061】
また元画像は、例えば、Z値を格納するZバッファ174(フレームバッファのZプレーン)を用いて隠面消去を行いながらオブジェクトを描画バッファ172に描画することで生成される画像である。そして、元画像のZ値は、この描画処理の際に行われるZバッファ法(奥行き比較法)により、Zバッファ174(Zプレーン)に生成(格納)される。
【0062】
なお本実施形態のZ値(奥行き値)は、カメラ座標系のZ座標軸のZ値そのものであってもよいし、このZ値と数学的な均等なパラメータであってもよい。例えば、カメラ座標系のZ値の逆数に相当するパラメータや、カメラ座標系のZ値に所与の変換処理を施すことで得られるパラメータであってもよい。
【0063】
色合成部127は色の合成処理を行う。例えば元画像の色と所与の色(例えばフォグ色、元画像のぼかし画像の色等)とを、α値(第2のα値)に基づいて合成する処理を行う。この場合の合成処理としては、αブレンディング(狭義のαブレンディング)、加算αブレンディング、又は減算αブレンディングなどを考えることができる。このような合成処理を行うことで、元画像にフォグ(霧、雲、湯気、もや、ほこり、ちり、煙、竜巻又は露等)が掛かった画像や、被写界深度が表現された画像を生成できる。
【0064】
合成処理がαブレンディングである場合を例にとれば、色合成部127は下式に従ったα合成処理を行う。
【0065】
=(1−α)×R+α×R (1)
=(1−α)×G+α×G (2)
=(1−α)×B+α×B (3)
合成処理が加算αブレンディングである場合を例にとれば、色合成部127は下式に従ったα合成処理を行う。
【0066】
=R+α×R (4)
=G+α×G (5)
=B+α×B (6)
ここで、R、G、Bは、元画像(描画バッファ172に既に描画されている画像)の色(輝度)のR、G、B成分であり、R、G、Bは、合成対象となる色(フォグの色、ぼかし画像の色)のR、G、B成分である。また、R、G、Bは、α合成により得られる画像(完成画像)の色のR、G、B成分である。
【0067】
なお、α値(A値)は、各ピクセル(テクセル、ドット)に関連づけて記憶できるデータであり、例えば色データ以外のプラスアルファのデータである。α値は、マスクデータ、半透明度(透明度、不透明度と等価)、又はバンプデータ等として使用できる。
【0068】
音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。
【0069】
なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、このようなシングルプレーヤモードのみならず、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。
【0070】
また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて生成してもよい。
【0071】
2.本実施形態の手法
次に本実施形態の手法について図面を用いて説明する。
【0072】
2.1 間接テクスチャマッピングを利用したピクセルデータの変換処理
本実施形態では間接(インダイレクト)テクスチャマッピングを利用して、ピクセルデータの変換処理を実現している。
【0073】
図2(A)に間接テクスチャマッピングの原理図を示す。間接テクスチャマッピングでは、テクスチャ座標(U、V)に基づいて、そのテクスチャ座標で指定(アドレス指定)されるテクセルデータが、間接テクスチャ記憶部177(間接テクスチャ用記憶領域、間接テクスチャ用ルックアップテーブル)から読み出される。そして、このテクセルデータ(色等)がテクスチャ座標(U’、V’)に設定され、そのテクスチャ座標(U’、V’)で指定されるテクセルデータが通常テクスチャ記憶部178(通常テクスチャ用記憶領域、通常テクスチャ用ルックアップテーブル)から読み出される。即ち、即ちテクスチャ座標(U、V)により直接指定されたテクセルデータではなく、テクスチャ座標(U、V)により間接指定されたテクセルデータが読み出される。
【0074】
なお図2(B)に示すように、テクスチャ座標と、間接テクスチャ記憶部177から読み出されたテクセルデータとに基づく演算処理(加算、減算、乗算又は除算等)を、演算部129により行い、演算処理により得られたテクスチャ座標に基づいて、通常テクスチャ記憶部178からテクセルデータを読み出すようにしてもよい。
【0075】
この間接テクスチャマッピングによれば、いわゆるテクスチャワープによる歪み画像の生成や、テクスチャタイルマップや、バンプマッピングを、簡素な処理で実現できるという利点がある。本実施形態では、この間接テクスチャマッピングを通常とは異なる形態で利用している。
【0076】
即ち一般的な間接テクスチャマッピングでは、テクスチャワープ用のテーブルデータ等が、間接テクスチャとして間接テクスチャ記憶部177に設定され、元画像のピクセルデータが、通常テクスチャとして通常テクスチャ記憶部178に設定される。そしてテクスチャワープ用のテーブルデータの設定の仕方で、元画像の歪み具合が変化する。
【0077】
これに対して本実施形態では図3に示すように、元画像のピクセルデータ(色、α値、Z値、輝度等)を間接テクスチャ記憶部177に設定(記憶)し、ピクセルデータの変換用データ(ピクセルデータを同種又は異種のピクセルデータに変換するためのデータ)を通常テクスチャ記憶部178に設定(記憶)している。そして間接テクスチャ記憶部177から読み出された元画像のピクセルデータをテクスチャ座標として、通常テクスチャ記憶部178から変換用データを読み出す。そして、読み出された変換用データを描画対象ピクセルに描画することで、元画像のピクセルデータを変換する。例えば元画像の色、α値、Z値、又は輝度を、各々、変換処理が施された同種の色、α値、Z値、又は輝度に変換する。或いは、元画像の色を、色とは異種のα値、Z値、又は輝度に変換したり、α値を、α値とは異種の色、Z値、又は輝度に変換する。或いはZ値を、Z値とは異種の色、α値、又は輝度に変換したり、輝度を、輝度とは異種の色、α値、又はZ値に変換する。このようにすることで、表示画面分又は分割表示画面分のピクセルデータを、間接テクスチャマッピング処理により一度に変換できるため、処理負荷の軽減化、処理の簡素化、処理速度の向上等を図れる。なお元画像のピクセルデータは、ピクセルに関連づけて記憶できるデータ(プレーン)であればよく、例えば法線ベクトルデータなどであってもよい。
【0078】
例えば図4(A)に示すように一般的なテクスチャマッピング(直接テクスチャマッピング)では、描画対象ピクセルPXiのテクスチャ座標Ui、Vi(頂点VX1〜VX4のテクスチャ座標を補間することで得られるテクスチャ座標)により指定されるテクセルデータを、テクスチャ記憶部500から読み出して、ピクセルPXiに描画する。
【0079】
これに対して間接テクスチャマッピングでは図4(B)に示すように、描画対象ピクセルPXiのテクスチャ座標Ui、Viで指定されるテクセルデータを、間接テクスチャ記憶部177から読み出す(参照する)。そして、読み出されたテクセルデータをテクスチャ座標Ui’(Vi’或いはUi’及びVi’でもよい)に設定して、通常テクスチャ記憶部178から通常テクスチャのテクセルデータを読み出す(参照する)。そして読み出されたテクセルデータを描画対象ピクセルPXiに描画する(書き込む)。
【0080】
この場合に本実施形態では、テクスチャ座標Ui、Viで指定されるテクセルTXiには、元画像のピクセルデータがテクセルデータとして記憶されている。そして通常テクスチャ記憶部178の読み出しアドレスとなるテクスチャ座標Ui’は、テクセルTXiに記憶されているピクセルデータの値に応じて変化する。従って、通常テクスチャ記憶部178のテクセルTXi’から読み出されて、ピクセルPXiに書き込まれる変換用データも、テクセルTXiに記憶されている元画像のピクセルデータの値に応じて変化する。
【0081】
例えば間接テクスチャ記憶部177のテクセルTXiに記憶されている元画像のピクセルデータと、テクセルTXjに記憶されている元画像のピクセルデータとが異なっていれば、テクスチャ座標Ui’、Uj’も異なるようになり、通常テクスチャ記憶部178において異なるテクセルTXi’、TXj’が指定されるようになる。従って、テクセルTXi’、TXj’に記憶されている異なった値を持つ変換用データが、ピクセルPXi、PXjに描画されるようになり、ピクセルデータの変換処理を実現できる。即ち図4(C)、(D)に示すように、ピクセルデータPDと変換後のピクセルデータCPDとの間の種々の変換特性(関数)を実現できる。
【0082】
このように本実施形態では間接テクスチャマッピングを利用することで、元画像の1プレーン(M×Nピクセル)分のピクセルデータPDを、1プレーン分のピクセルデータCPDに一度で変換できるため、高速な変換処理を実現できる。またピクセルデータPD、CPD間の変換特性は、通常テクスチャ記憶部178に記憶される変換用データ(変換特性データ)により任意に設定できる。従って通常テクスチャ記憶部178の変換用データを書き換えることで、PD、CPD間の様々な変換特性を容易に実現できるという利点がある。
【0083】
なお、変換用データを時間経過などに伴い動的(リアルタイム)に変化させることで、ピクセルデータPD、CPD間の変換特性を動的(リアルタイム)に変化させてもよい。またテクスチャが描画(マッピング)される描画ピクセル領域のサイズと、間接テクスチャのテクセルデータが読み出されるテクセル領域のサイズは同一でなくてもよく、例えば間接テクスチャ領域のサイズを小さくしてもよい。
【0084】
次に、間接テクスチャマッピングを利用して実現できる様々な画像エフェクト処理(画像変換処理)について説明する。
【0085】
2.2 フォグむら画像のエフェクト処理
ゲームにおいては、霧、もや、煙、ホコリなどのフォグ(fog)が掛かったゲーム画像を生成する場合がある。そして、プレーヤの仮想現実感の向上のためには、フォグのむら(nonuniformity,unevenness)についてもリアルに表現できることが望まれる。
【0086】
そして、よりリアルなフォグ効果を表現するためには、仮想カメラ(視点)からの距離に応じてフォグ濃度を変化させることが望ましい。即ち、仮想カメラからの距離が遠くなるほどフォグ濃度を濃くする。
【0087】
そして、このようにフォグ濃度を変化させるためには、フォグ濃度を制御するパラメータであるα値を、仮想カメラからの距離に応じて変化させることが望ましい。即ち、仮想カメラからの距離が遠くなるほどフォグ濃度が濃くなるようにα値を制御する。
【0088】
そこで本実施形態では、仮想カメラからの距離パラメータであるZ値(奥行き距離)をα値に変換する。具体的には図5のA1に示すように、元画像(フレームバッファ上に描画された画像)のZ値ZPを第1のα値αP1に変換する。
【0089】
そして図5のA2に示すように、元画像の色ICP(RGB、YUV等)と、フォグの色(白、灰色等)CPとを、αP1に基づいて合成(αブレンディング等)する。これにより、元画像にフォグ効果が施されたフォグ画像を生成できる。
【0090】
そして本実施形態では図5のA1に示すZ値からα値への変換を、前述した間接テクスチャマッピングを有効利用して実現している。
【0091】
即ち図3において、元画像のZ値を間接テクスチャのテクセルデータとして間接テクスチャ記憶部177に設定する。またZ値をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして通常テクスチャ記憶部178に設定する。そして図4(B)で説明した間接テクスチャマッピングによる変換処理により、元画像のZ値を、Z値に応じてその値が変化するα値に変換する。このようにすることで、表示画面分又は分割表示画面分のZ値(Zプレーン)を、間接テクスチャマッピングを利用して1回の処理で、表示画面分又は分割表示画面分のα値(αプレーン)に変換できる。
【0092】
さて、図5の手法によれば、Z値(仮想カメラからの距離)に応じて濃淡が変化するフォグ効果を元画像に対して施すことが可能になる。
【0093】
しかしながら、図5の手法では、濃淡(濃度)にむらがあるフォグ(不均一なフォグ)を表現できないという課題がある。
【0094】
この場合、例えば、図5の色CP(フォグ色のスプライト)に、白、灰色、黒などの色の濃淡をつける手法を考えることもできる。
【0095】
しかしながら、この手法では、生成されるフォグは、灰色や黒のフォグになるだけで、濃淡にむらがあるフォグにはならない。
【0096】
そこで本実施形態では、α値にむらをつける手法、即ちα値を仮想プレーン内(ピクセル間、画面内)で不均一にする手法を採用している。
【0097】
即ち、まず本実施形態では図6のC1に示すように、図5の手法と同様に元画像のZ値(Zプレーン)ZPを変換し、ZPに応じて各ピクセルのα値が設定される第1のα値(第1のαプレーン)αP1を得る。この場合、ZPからαP1への変換は、図3〜図4(D)で説明した間接テクスチャマッピングを利用した変換処理で実現する。
【0098】
また本実施形態では図6のC2に示すように、仮想プレーン内でα値が不均一に設定されたαむら設定用α値(αむら設定用αプレーン)αUPを用意する。そして図6のC3に示すように、αP1とαUPを合成して、第2のα値(第2のαプレーン)αP2を得る。このようにすることで、Z値とαむら(むら模様)の両方が加味されたα値(フォグ濃度値)を得ることができる。なお、α値の合成処理としては、各ピクセルのαP1、αUPを乗算する処理を考えることができる。但し、α値の加算、減算又は除算等、乗算以外の合成処理を採用してもよい。
【0099】
次に本実施形態では図6のC4に示すように、得られたαP2に基づいて、元画像の色ICPと色CP(フォグの色)とを合成し、フォグ画像(完成画像)を生成する。ここで、色の合成としては、狭義のαブレンディング(上式(1)(2)(3))又は加算αブレンディング(上式(4)(5)(6))などを採用できる。
【0100】
以上のようにすることで、Z値(距離)に応じて濃度が変化すると共にその濃度にむらがあるフォグを、元画像に対して施すことが可能になる。
【0101】
図7に本実施形態で用いられる元画像の例を示す。この元画像は、キャラクタや背景などのオブジェクトを、ジオメトリ処理を行いながらフレームバッファ(描画バッファ)に描画することで得られる画像である。
【0102】
図8にフォグのむら模様(αむら設定用α値αUPを表すグレースケール画像)の例を示す。図8において、白い部分ほどα値が低くなっており、フォグ濃度が薄くなっている。一方、黒い部分ほどα値が高くなっており、フォグ濃度が濃くなっている。このように、図8では、α値(フォグ濃度)が仮想プレーン(画面)内で不均一になっている。
【0103】
図9は、通常テクスチャ記憶部178に記憶される通常(勾配)テクスチャの例である。この図9の通常テクスチャは元画像のα値をZ値に変換するための変換用データとして利用される。
【0104】
図10の左隅部分の画像は、元画像のZ値に応じて設定されるαP1に対して図9のむら模様(むら模様テクスチャ)を掛け合わせる(乗算する)ことで得られる画像の例である。また図11は、本実施形態により生成される最終的なフォグむら画像の例である。
【0105】
図11に示すように本実施形態によれば、視点(仮想カメラ)からの距離が遠くなるほど、フォグの濃度が濃くなっている。また、フォグの濃度にむらがあるため、あたかも本物のフォグがオブジェクト(キャラクタ)に掛かっているように見え、これまでにないリアルな画像の生成に成功している。
【0106】
さて、αむら設定用α値の仮想プレーンが1枚だけであると、ある奥行きにだけフォグむらが存在するかのように見えてしまい、今ひとつリアルなフォグを表現できない。
【0107】
そこで本実施形態では、図12に示すように、仮想カメラVCからの仮想距離d0、d1、d2が異なる複数の仮想プレーンPL0、PL1、PL2(2枚でもよいし、4枚以上でもよい)を仮想配置する。例えば図12では、仮想距離がd0であるPL0は、仮想カメラVCから見て最も手前側に仮想配置され、仮想距離がd2であるPL2は、VCから見て最も奥側に仮想配置されている。
【0108】
そして本実施形態では、これらの複数の仮想プレーンPL0、PL1、PL2に対応して、仮想プレーン内でのむら模様(nonuniformity pattern)が異なる複数のαむら設定用α値(αプレーン)αUP0〜αUP2を用意する。そして、これらの複数のαむら設定用α値αUP0〜αUP2を、仮想距離d0〜d2などに基づき得られるα値α0〜α2(合成率)を用いて合成することで、αむら設定用α値αUPを生成する。具体的には、仮想プレーンPL0〜PL2に対応するスプライトSP0〜SP2(広義には仮想オブジェクト)を配置し、これらのスプライトSP0〜SP2にαむら設定用α値αUP0〜αUP2のテクスチャをマッピングして、ワークバッファ上で複数回重ね描きする。これにより、むら模様が2層以上重なって見える画像を生成できるようになる。
【0109】
また本実施形態では図13(A)に示すように、仮想カメラVCが移動(前進)し、最も手前側の仮想プレーンPL0の仮想距離d0が所与の距離以下になると、PL0に対応するαむら設定用α値αUP0の合成率(ブレンド率)を低くし、徐々に消して行く。そして、仮想プレーンPL2の奥側に新たな仮想プレーンPLNを発生し、PLNに対応するαむら設定用α値αUPNの合成率を徐々に高くする。
【0110】
一方、図13(B)に示すように、仮想カメラVCが移動(後退)し、最も奥側の仮想プレーンPL2の仮想距離d2が所与の距離以上になると、PL2に対応するαUP2の合成率を低くし、徐々に消して行く。そして、PL0の手前側に新たな仮想プレーンPLNを発生し、PLNに対応するαUPNの合成率を徐々に高くする。
【0111】
図13(A)、(B)に示すような処理を行うことで、有限の枚数のαUP0〜αUP2の仮想プレーンを用いながらも、無限の枚数の仮想プレーンを用いた場合と同様の効果を得ることができる。
【0112】
また本実施形態では、仮想カメラ情報(仮想カメラの位置又は方向等)や時間情報(時間やフレームの経過を表す情報)に基づいて、αむら設定用α値の仮想プレーン内でのむら模様を変化させている。
【0113】
具体的には図14(A)に示すように、仮想カメラVCと仮想プレーンPL(PL0〜PL2)との仮想距離d(d0〜d2)が小さくなるほど、PLに対応するαUPのむら模様を拡大する。逆に、仮想距離dが遠くなるほど、αUPのむら模様を縮小する。
【0114】
このようにすれば、例えば図12において、仮想カメラVCからの仮想距離d0が近い仮想プレーンPL0のαUP0では、そのむら模様が大きくなり、仮想距離d2が遠い仮想プレーンPL2のαUP2では、そのむら模様が小さくなる。従って、むら模様に奥行き感や立体感を持たせることができ、よりリアルな画像を生成できる。
【0115】
また本実施形態では図14(B)に示すように、スクリーン(スクリーン座標系のXY平面)に平行な第1の方向(例えば上下左右のうちの左方向)に仮想カメラVCが移動した場合に、それとは逆の第2の方向(例えば右方向)に、αUP(αUP0〜αUP2)のむら模様を適正距離だけ移動させる。
【0116】
この場合に本実施形態では、むら模様の移動距離を、仮想プレーンPL(PL0〜PL2)の仮想距離d(d0〜d2)に応じて変化させている。具体的には図12において、短い仮想距離d0の仮想プレーンPL0のαUP0では、仮想カメラVCの移動に対するむら模様の移動距離を大きくし、遠い仮想距離d2の仮想プレーンPL2のαUP2では、仮想カメラVCの移動に対するむら模様の移動距離を小さくする。このようにすることで、平面の仮想プレーンを用いているのにもかかわらず、あたかも立体的なフォグが目の前にあるかのように見える画像を生成できる。
【0117】
図15に、フォグむらのエフェクト処理の具体例のフローチャートを示す。
【0118】
まず、当該フレームにおいて表示すべき背景、キャラクタなどのオブジェクトをフレームバッファ(広義には描画バッファ)に描画して、図7に示すような元画像を生成する(ステップS1)。そしてフォグむら処理を行うか否かを判断し(ステップS2)、行わない場合にはステップS12に移行する。
【0119】
フォグむら処理を行う場合には、フレームバッファと同サイズのテクスチャバッファ1(1テクセルのビット数が24ビットのバッファ)を確保する(ステップS3)。同様にフレームバッファの1/4サイズのテクスチャバッファ2(8ビット)と、フレームバッファの1/16サイズのテクスチャバッファ3(8ビット)を確保する(ステップS4、S5)。なお、このようにテクスチャバッファのサイズをフレームバッファのサイズよりも小さくするのは、メモリを節約すると共に処理時間を短縮化するためである。従ってメモリの容量や処理負荷に余裕がある場合には、フレームバッファと同サイズのテクスチャバッファを確保するようにしてもよい。
【0120】
次に、フレームバッファの元画像(図7)の色成分(RGBプレーン)をテクスチャバッファ1にコピーする(ステップS6)。またフレームバッファ(Zバッファ)のZ値成分(Zプレーン)を、1/4にサイズダウンしながらテクスチャバッファ2(間接テクスチャ記憶部)にコピーする(ステップS7)。
【0121】
次にテクスチャバッファ2(間接テクスチャ記憶部)に設定(記憶)された間接テクスチャ(元画像のZ値)と、予め用意された図9に示す通常(勾配)テクスチャとに基づき、図3〜図4(D)で説明した間接テクスチャマッピングを行い、Z値の深度に応じたα値αP1を得る(ステップS8)。具体的には、Z値が、仮想カメラ(視点)から見て手前側を表す値であるほどαP1が0(透明)に近づき、Z値が、仮想カメラから見て奥側を表す値であるほどαP1が1.0(不透明)に近づくように、元画像のZ値をα値αP1に変換する。これにより図6のC1に示す変換が行われる。
【0122】
次に、得られたαP1と、図8のむら模様(αむら設定用α値αUP)とを掛け合わせて(乗算して)、フレームバッファの1/16のサイズでレンダリングする(ステップS9)。これにより図6のC3に示す合成処理が行われ、図10の左隅部分に示されるような画像が生成される。
【0123】
次にステップS9でレンダリングされたむら模様(むら模様テクスチャ)のRGBプレーンのうちの1プレーンを、α値αP2としてテクスチャバッファ3にコピーする(ステップS10)。そしてテクスチャバッファ1の元画像の色と、フォグ色(広義には所与の色)とを、テクスチャバッファ3にコピーされたα値αP2で合成し、合成された色(RGB)をフレームバッファに描画して表示する(ステップS11)。これにより図11に示すようなフォグむらが表現された画像が生成されて、表示されるようになる。そして最後にゲームオーバー(フレーム更新)か否かを判断し、ゲームオーバーではない場合にはステップS1に戻り、次のフレームの処理に移行する。
【0124】
2.3 被写界深度のエフェクト処理
さて、従来の画像生成システムにより生成される画像は、人間の視界画像のように視点からの距離に応じてフォーカシングされた画像ではなかった。このため、画像内の全ての被写体にピントが合っているかのような表現になっていた。
【0125】
しかしながら、至近距離から遠距離までの全ての被写体にピントが合っている画像は、日常生活では見ることができない画像であるため、見た目に不自然さがあった。
【0126】
よりリアリティを追求するためには、視点とオブジェクトとの距離や視線方向などに応じてピントの度合いが調節された画像を生成することが望ましい。しかしながら、ゲーム空間内の個々のオブジェクトについて視点との距離等を計算し、各オブジェクト毎にぼやけ具合を演算することで、いわゆる被写界深度が表現された画像を生成すると、処理負荷が過大になる。
【0127】
そこで本実施形態では、図3〜図4(D)で説明した間接テクスチャマッピングを利用して、被写界深度が表現された画像の生成を行っている。
【0128】
即ち本実施形態では、仮想カメラからの距離パラメータであるZ値(奥行き距離)を、間接テクスチャマッピングを利用してα値に変換する。具体的には図3において、元画像のZ値を間接テクスチャ記憶部177に設定し、Z値をα値に変換するための変換用データを通常テクスチャ記憶部178に設定する。そして図4(B)で説明した間接テクスチャマッピングによる変換処理により、元画像のZ値を、Z値に応じてその値が変化するα値に変換する。即ちZ値が仮想カメラから見て手前側の値であるほどα値が0.0(透明)に近づき、Z値が仮想カメラから見て奥側の値であるほどα値が1.0(不透明)に近づくように、Z値をα値に変換する。
【0129】
このように間接テクスチャマッピングを利用した変換処理を行うことで、図16のF1に示すように、元画像の各ピクセルA、B、C、DのZ値ZA、ZB、ZC、ZDに応じた値に、各ピクセルのα値αA、αB、αC、αDを設定し、F2に示すようなαプレーンを生成する。より具体的には、仮想カメラ10の焦点(注視点)から遠いピクセル(焦点とのZ値の差が大きいピクセル)ほど、例えば大きなα値を設定する。これにより、仮想カメラ10の焦点から遠いピクセルほど、ぼかし画像の合成比率が高くなる。
【0130】
そして、図16のF3に示すように、生成されたαプレーン(各ピクセルに設定されたα値)に基づいて、図7に示す元画像と、元画像のぼかし画像とのα合成(上述の式(1)(2)(3)のαブレンディング等)を行う。
【0131】
このように、Z値(奥行き値)に応じて設定されたα値に基づき、元画像の各ピクセルの色と、ぼかし画像の各ピクセルの色とのα合成を行うことで、仮想カメラの焦点(ピントが合っている点として設定される点)から遠くなるほど、ぼけて見える画像を生成できるようになり、いわゆる被写界深度を表現できる。これにより、画面内の全ての被写体にピントが合っていた従来のゲーム画像とは異なり、現実世界の視界画像のように視点からの距離に応じてフォーカシングされたリアルで自然なゲーム画像を生成できる。
【0132】
図17に、被写界深度のエフェクト処理の具体例のフローチャートを示す。
【0133】
まず、当該フレームにおいて表示すべき背景、キャラクタなどのオブジェクトをフレームバッファに描画して、図7に示すような元画像を生成する(ステップS21)。そして被写界深度(ピンぼけ)処理を行うか否かを判断し(ステップS22)、行わない場合にはステップS34に移行する。
【0134】
被写界深度処理を行う場合には、フレームバッファと同サイズのテクスチャバッファ1(24ビット)を確保する(ステップS23)。同様にフレームバッファの1/16サイズのテクスチャバッファ2(24ビット)と、フレームバッファと同サイズのテクスチャバッファ3(8ビット)を確保する(ステップS24、S25)。
【0135】
次に、フレームバッファの元画像(図7)の色成分(RGBプレーン)をテクスチャバッファ1にコピーする(ステップS26)。またフレームバッファ(Zバッファ)のZ値成分(Zプレーン)を、1/4にサイズダウンしながらテクスチャバッファ3(間接テクスチャ記憶部)にコピーする(ステップS27)。またテクスチャバッファ1のテクスチャ(色成分)を1/4にサイズダウンしながらフレームバッファに描画する(ステップS28)。更にフレームバッファの色成分(RGB)を1/4にサイズダウンしながらテクスチャバッファ2にコピーする(ステップS29)。
【0136】
次にテクスチャバッファ3(間接テクスチャ記憶部)に設定された間接テクスチャ(元画像のZ値)と、予め用意された図9に示す通常(勾配)テクスチャとに基づき、図3〜図4(D)で説明した間接テクスチャマッピングを行い、Z値の深度に応じたα値αP1を得る(ステップS30)。即ち図16のF1、F2に示す変換を行って、図18に示すようなαP1のプレーンを得る。この図18のαP1のプレーンは、そのZ値が仮想カメラから見て手前側の値になるオブジェクト(例えばキャラクタ)ほど、αP1が0(透明)に近づき、そのZ値が仮想カメラから見て奥側の値になるオブジェクト(例えばビル)ほど、αP1が1.0(不透明)に近づくプレーンとなっている。
【0137】
次に、テクスチャバッファ2のテクスチャ(色成分)をバイリニア補間(広義にはテクセル補間)で16倍にサイズアップして、元画像のぼかし画像を生成する(ステップS31)。そして図16のF3で説明したように、テクスチャバッファ1の元画像(色)とぼかし画像(色)とを、図18のαP1でαブレンディング(広義にはα合成)して、合成画像をフレームバッファに描画して表示する(ステップS32)。これにより、図19に示すような被写界深度が表現された画像が表示されるようになる。そして最後にゲームオーバー(フレーム更新)か否かを判断し、ゲームオーバーではない場合にはステップS21に戻り、次のフレームの処理に移行する。
【0138】
なおステップS30で使用される通常テクスチャ(ramp texture)を時間経過などに応じて変化させることで、リアルタイムに被写界深度が変化したりピント位置が変化する画像を生成できる。
【0139】
2.4 ガンマ補正等の画像エフェクト
以上では、Z値をα値に変換するというように、間接テクスチャマッピングを利用して元画像のピクセルデータ(Z値)を異種のピクセルデータ(α値)に変換する例について説明した。しかしながら、間接テクスチャマッピングを利用して、元画像の色、α値、Z値、又は輝度などのピクセルデータを、各々、同種のピクセルデータである色、α値、Z値、又は輝度などに変換してもよい。
【0140】
より具体的には図3において、元画像の色(広義にはピクセルデータ)を、間接テクスチャ記憶部177に設定する。また元画像の色を変換するための変換用データを、通常テクスチャ記憶部178に設定する。そして間接テクスチャマッピングを利用した変換処理により、元画像の色を変換する。
【0141】
この場合の変換用データを用いた色の変換としては、ガンマ補正、ネガポジ反転、ポスタリゼーション、ソラリゼーション、或いは2値化などがある。図20(A)、(B)、図21(A)、(B)、(C)に、各々、ガンマ補正、ネガポジ反転、ポスタリゼーション、ソラリゼーション、2値化についての変換特性(ピクセルデータPDと変換後のピクセルデータCPDの関係を表す特性)を示す。
【0142】
図20(A)のガンマ補正は、モニタ(表示部)の非線形特性を補正するための変換処理である。図20(B)のネガポジ反転は、元画像の輝度(濃度)を反転させるものであり、例えばCPD=255−PDの関係式で表されるエフェクト処理である。
【0143】
図21(A)のポスタリゼーションは、多階調の画像をいくつかの階調に制限して表示するためのものであり、例えばCPD={INT(PD/VAL)}×VALの関係式で表されるエフェクト処理である。なおINT(R)はRの小数点を切り捨てて整数化する関数であり、VALは任意の値である。
【0144】
図21(B)のソラリゼーションは、ある点において入力値(PD)と出力値(CPD)の曲線関数の傾きが反転するエフェクト処理である。図21(C)の2値化は、画像のハイコントラスト効果を実現するエフェクト処理である。
【0145】
なお間接テクスチャマッピングを利用した本実施形態の変換処理によれば、図20(A)〜図21(C)に示すような画像エフェクト以外にも、例えばモノトーンフィルタやセピアフィルタなどの様々な画像エフェクトを実現できる。また例えば図20(A)〜図21(C)に示すような色の変換のみならず、α値、Z値、又は輝度などのピクセルデータを同種のピクセルデータに変換する処理を、間接テクスチャマッピングを利用して実現してもよい。
【0146】
図22に、ガンマ補正のエフェクト処理の具体例のフローチャートを示す。
【0147】
まず、当該フレームにおいて表示すべき背景、キャラクタなどのオブジェクトをフレームバッファに描画して、元画像を生成する(ステップS41)。そしてガンマ補正処理を行うか否かを判断し(ステップS42)、行わない場合にはステップS49に移行する。
【0148】
ガンマ補正処理を行う場合には、フレームバッファと同サイズのテクスチャバッファ1(24ビット)を確保する(ステップS43)。そしてフレームバッファの元画像の色成分(RGBプレーン)をテクスチャバッファ1(間接テクスチャ記憶部)にコピーする(ステップS44)。
【0149】
次にテクスチャバッファ1(間接テクスチャ記憶部)に設定された間接テクスチャのR(赤)成分と、図23の上段に示す通常(勾配)テクスチャとに基づき、図3〜図4(D)で説明した間接テクスチャマッピングを行い、元画像のR成分に応じたガンマ補正後のR成分を得る(ステップS45)。即ち図20(A)に示すような変換特性の変換処理を行う。
【0150】
次にテクスチャバッファ1に設定された間接テクスチャのG(緑)成分と、図23の中段に示す通常テクスチャとに基づき、間接テクスチャマッピングを行い、元画像のG成分に応じたガンマ補正後のG成分を得る(ステップS46)。同様に、テクスチャバッファ1に設定された間接テクスチャのB(青)成分と、図23の下段に示す通常テクスチャとに基づき、間接テクスチャマッピングを行い、元画像のB成分に応じたガンマ補正後のB成分を得る(ステップS47)。
【0151】
次にガンマ補正後のR、G、B成分をフレームバッファに描画して、表示する(ステップS48)。こにより、元画像にガンマ補正が施された画像が表示されるようになる。そして最後にゲームオーバー(フレーム更新)か否かを判断し、ゲームオーバーではない場合にはステップS41に戻り、次のフレームの処理に移行する。
【0152】
なお、R、G、B成分の間でガンマ補正のカーブが同じである場合には、図23の通常テクスチャとして同じ勾配(ramp)のテクスチャを用いることも可能である。
【0153】
2.5 ハレーションのエフェクト処理
本実施形態では、強い光が当たった部分(輝度の明るい部分)の回りを白くぼかして見せるハレーション(halation)の画像エフェクトについても、間接テクスチャマッピングを利用した変換処理により実現している。
【0154】
即ち本実施形態では、元画像の各ピクセルの輝度(RGBをYUVに変換した時のY成分)を、間接テクスチャマッピングを利用してα値に変換する。具体的には図3において、元画像の輝度を間接テクスチャ記憶部177に設定し、輝度をα値に変換するための変換用データを通常テクスチャ記憶部178に設定する。そして図4(B)で説明した間接テクスチャマッピングによる変換処理により、元画像の輝度を、輝度に応じてその値が変化するα値に変換する。即ち輝度が暗いほどα値が0.0(透明)に近づき、輝度が明るいほどα値が1.0(不透明)に近づくように、輝度をα値に変換する。
【0155】
このように間接テクスチャマッピングを利用した変換処理を行うことで、図24のG1に示すように、元画像の各ピクセルA、B、C、Dの輝度BRA、BRB、BRC、BRDに応じた値に、各ピクセルのα値αA、αB、αC、αDを設定し、G2に示すようなαプレーンを生成する。より具体的には、輝度が明るいピクセルほど、例えばα値を1.0に近づける。これにより、輝度が明るいピクセルほど、ぼかし画像の合成比率が高くなる。
【0156】
そして、図24のG3に示すように、生成されたαプレーン(各ピクセルに設定されたα値)に基づいて、図7に示す元画像と、元画像のぼかし画像とのα合成(上述の式(4)(5)(6)の加算αブレンディング等)を行う。なお加算αブレンディングを行うことにより、いわゆる「白飛び」を表現できる。
【0157】
このように、輝度に応じて設定されたα値に基づき元画像とぼかし画像のα合成を行うことで、例えば雲などの輝度が明るい部分(白い部分)の回りがぼやけた画像になるハレーション画像を生成できるようになり、現実のカメラで撮ったかのように見えるリアルな画像を生成できる。
【0158】
図25に、ハレーションのエフェクト処理の具体例のフローチャートを示す。
【0159】
まず、当該フレームにおいて表示すべき背景、キャラクタなどのオブジェクトをフレームバッファに描画して、図7に示すような元画像を生成する(ステップS51)。そしてハレーション処理を行うか否かを判断し(ステップS52)、行わない場合にはステップS63に移行する。
【0160】
ハレーション処理を行う場合には、フレームバッファと同サイズのテクスチャバッファ1(24ビット)を確保する(ステップS53)。同様にフレームバッファの1/64サイズのテクスチャバッファ2(24ビット)と、フレームバッファと同サイズのテクスチャバッファ3(8ビット)を確保する(ステップS54、S55)。
【0161】
次に、フレームバッファの元画像(図7)の色成分(RGBプレーン)をテクスチャバッファ1にコピーする(ステップS56)。またフレームバッファの元画像の輝度成分(Yプレーン)を、1/4にサイズダウンしながらテクスチャバッファ3(間接テクスチャ記憶部)にコピーする(ステップS57)。これにより図27の左隅部分に示す画像がテクスチャバッファ3にコピーされる。なお元画像の輝度成分としては、元画像のRGBをYUVに変換した時のY成分を採用できる。
【0162】
次にテクスチャバッファ3(間接テクスチャ記憶部)に設定された間接テクスチャ(元画像の輝度)と、予め用意された図26に示す通常(勾配)テクスチャとに基づき、図3〜図4(D)で説明した間接テクスチャマッピングを行い、元画像の輝度に応じたα値αP1を得る(ステップS58)。即ち図24のG1、G2に示す変換を行って、G3に示すαP1のプレーンを得る。このαP1のプレーンは、輝度が暗いオブジェクト(例えばキャラクタ)ほど、αP1が0(透明)に近づき、輝度が明るいオブジェクト(例えば雲)ほど、αP1が1(不透明)に近づくプレーンとなっている。
【0163】
次に、テクスチャバッファ1のテクスチャ(色成分)を1/64にサイズダウンしながら、αP1と掛け合わせて(αP1と乗算して)、フレームバッファに描画する(ステップS59)。そしてフレームバッファに描画された1/64サイズの画像の色成分をテクスチャバッファ2にコピーする(ステップS60)。またテクスチャバッファ1のテクスチャ(色成分)をフレームバッファに描画する(ステップS61)。
【0164】
次に、テクスチャバッファ2のテクスチャ(色成分)をバイリニア補間(テクセル補間)で64倍にサイズアップして、輝度の明るい部分が白くぼやけた画像を生成し、フレームバッファに加算αブレンディング(広義にはα合成)で描画して表示する(ステップS62)。これにより、図28に示すようなハレーションが表現された画像が表示されるようになる。即ち図28と図7の画像を比較すれば明らかなように、図28では雲などの白部分の画像の輪郭がぼやけた画像になり、ハレーションが表現される。そして最後にゲームオーバー(フレーム更新)か否かを判断し、ゲームオーバーではない場合にはステップS51に戻り、次のフレームの処理に移行する。
【0165】
なおステップ58で使用される通常テクスチャ(ramp texture)を時間経過などに応じて変化させることで、リアルタイムでピント位置が変化する画像を生成できる。
【0166】
3.ハードウェア構成
図29に本実施形態を実現できるハードウェア構成の例を示す。
【0167】
メインプロセッサ900は、CD982(情報記憶媒体)に格納されたプログラム、通信インターフェース990を介して転送されたプログラム、或いはROM950に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などを実行する。
【0168】
コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、オブジェクトを移動させたり動作(モーション)させるための物理シミュレーションに、マトリクス演算などの処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
【0169】
ジオメトリプロセッサ904は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ900で動作するプログラムが、その処理をジオメトリプロセッサ904に指示する。
【0170】
データ伸張プロセッサ906は、圧縮された画像データや音データのデコード(伸長)処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする。これにより、オープニング画面、インターミッション画面、エンディング画面、或いはゲーム画面などにおいて、MPEG方式等で圧縮された動画像を表示できる。
【0171】
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を高速に実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行う。そして1フレーム分の画像がフレームバッファ922に書き込まれると、その画像はディスプレイ912に表示される。
【0172】
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などのゲーム音を生成し、スピーカ932を介して出力する。ゲームコントローラ942からの操作データや、メモリカード944からのセーブデータ、個人データは、シリアルインターフェース940を介して入力される。
【0173】
ROM950にはシステムプログラムなどが格納される。業務用ゲームシステムの場合にはROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納されることになる。なおROM950の代わりにハードディスクを利用してもよい。RAM960は各種プロセッサの作業領域となる。DMAコントローラ970は、プロセッサ、メモリ(RAM、VRAM、ROM等)間でのDMA転送を制御する。CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982にアクセスする処理を行う。
【0174】
通信インターフェース990は、ネットワークを介して外部との間でデータ転送を行う。通信インターフェース990に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどがある。
【0175】
なお本実施形態の各部(各手段)の処理は、その全てをハードウェアのみにより実現してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。
【0176】
そして本実施形態の各部の処理をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、ハードウェア(コンピュータ)を本実施形態の各部として機能させるためのプログラムが格納される。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930等に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930等は、その指示と渡されたデータとに基づいて本発明の各部の処理を実現する。
【0177】
図30(A)に業務用ゲームシステムへの本実施形態の適用例を示す。プレーヤは、ディスプレイ1100上に映し出されたゲーム画像を見ながら、操作部1102を操作してゲームを楽しむ。内蔵されるシステムボード1106にはプロセッサ、メモリなどが実装される。本実施形態の各部の処理を実現するためのプログラム(データ)は、システムボード1106上の情報記憶媒体であるメモリ1108に格納される。以下、このプログラムを格納プログラムと呼ぶ。
【0178】
図30(B)に家庭用ゲームシステムへの本実施形態の適用例を示す。この場合、上記格納プログラム(格納情報)は、本体システムに着脱自在な情報記憶媒体であるCD1206、或いはメモリカード1208、1209に格納される。
【0179】
図30(C)に、ホスト装置1300と、このホスト装置1300とネットワーク1302を介して接続される端末1304−1〜1304−n(ゲーム機、携帯電話)とを含むシステムへの本実施形態の適用例を示す。この場合、上記格納プログラムは、ホスト装置1300の情報記憶媒体1306(ハードディスク、磁気テープ装置等)に格納される。また本実施形態の各部の処理をホスト装置と端末の分散処理で実現してもよい。
【0180】
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。
【0181】
例えば、明細書又は図面中の記載において広義や同義な用語(描画バッファ、所与の色、テクセル補間、ピクセルデータ、α合成等)として引用された用語(フレームバッファ、フォグ色・ぼかし画像の色、バイリニア補間、色・α値・Z値・輝度、αブレンディング・加算αブレンディング等)は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。
【0182】
また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。
【0183】
また元画像のピクセルデータの変換処理も、本実施形態で説明したものに限定されず、これらと均等な種々の変換処理も本発明の範囲に含まれる。
【0184】
また、本発明は種々のゲーム(格闘ゲーム、競争ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、ロールプレイングゲーム等)に適用できる。
【0185】
また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード等の種々の画像生成システム(ゲームシステム)に適用できる。
【図面の簡単な説明】
【図1】本実施形態の画像生成システムの機能ブロック図の例である。
【図2】図2(A)(B)は間接テクスチャマッピングの説明図である。
【図3】間接テクスチャマッピングを利用したピクセルデータの変換処理の説明図である。
【図4】図4(A)〜(D)は、間接テクスチャマッピングを利用したピクセルデータの変換処理の説明図である。
【図5】元画像のZ値を変換することで得られたα値で元画像の色とフォグ色を合成する手法の説明図である。
【図6】フォグむら画像の生成手法の説明図である。
【図7】元画像の例である。
【図8】フォグのむら模様の例である。
【図9】フォグむら用の通常テクスチャ(変換用データ)の例である。
【図10】Z値に応じたα値に対してむら模様を掛け合わせることで得られる画像の例である。
【図11】本実施形態により生成されたフォグむら画像の例である。
【図12】仮想プレーン内でのむら模様が異なる複数のαむら設定用α値を合成する手法の説明図である。
【図13】図13(A)、(B)も、仮想プレーン内でのむら模様が異なる複数のαむら設定用α値を合成する手法の説明図である。
【図14】図14(A)、(B)は、仮想カメラ情報に基づいてむら模様を変化させる手法の説明図である。
【図15】フォグむらのエフェクト処理の具体例のフローチャートである。
【図16】Z値に応じて設定されたα値を用いて元画像とぼかし画像を合成し、被写界深度画像を生成する手法の説明図である。
【図17】被写界深度のエフェクト処理の具体例のフローチャートである。
【図18】変換により得られるαプレーンの例である。
【図19】本実施形態により生成された被写界深度画像の例である。
【図20】図20(A)(B)は、ガンマ補正、ネガポジ反転の変換特性の例である。
【図21】図21(A)(B)(C)は、ポスタリゼーション、ソラリゼーション、2値化の変換特性の例である。
【図22】ガンマ補正のエフェクト処理の具体例のフローチャートである。
【図23】ガンマ補正用の通常テクスチャ(変換用データ)の例である。
【図24】輝度に応じて設定されたα値を用いて元画像とぼかし画像を合成し、ハレーション画像を生成する手法の説明図である。
【図25】ハレーションのエフェクト処理の具体例のフローチャートである。
【図26】ハレーション用の通常テクスチャ(変換用データ)の例である。
【図27】元画像の輝度成分の例である。
【図28】本実施形態により生成されたハレーション画像の例である。
【図29】ハードウェア構成例である。
【図30】図30(A)(B)(C)は種々の形態のシステム例である。
【符号の説明】
100 処理部、110 オブジェクト空間設定部、
112 移動・動作処理部、114 仮想カメラ制御部、
120 画像生成部、122 隠面消去部、
123 テクスチャマッピング部、124 間接テクスチャ設定部、
125 通常テクスチャ設定部、126 α値合成部、127 色合成部、
130 音生成部、160 操作部、170 記憶部、
172 描画バッファ、174 Zバッファ、176 テクスチャ記憶部、
177 間接テクスチャ設定部、178 通常テクスチャ設定部、
180 情報記憶媒体、190 表示部、
192 音出力部、194 携帯型情報記憶装置、196 通信部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image generation system, a program, and an information storage medium.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, an image generation system (game system) that generates an image viewed from a virtual camera (given viewpoint) in an object space that is a virtual three-dimensional space has been known. Popular. Such an image generation system generates a real image using a technique called texture mapping.
[0003]
[Patent Document 1]
JP 2001-224847 A
[0004]
[Problems to be solved by the invention]
However, the conventional texture mapping has been realized by drawing (mapping) the texel data of the texture storage unit addressed by the texture coordinates (U, V) to the drawing target pixel. For this reason, for example, when trying to realize conversion processing (image effect processing) such as depth of field, fog non-uniformity expression, gamma correction, etc., the processing load becomes heavy, the processing becomes complicated, and the processing speed becomes slow. There were issues such as becoming.
[0005]
The present invention has been made in view of the above problems, and has as its object to provide an image generation system, a program, and an information storage medium that can express various conversion processes with a small processing load. is there.
[0006]
[Means for Solving the Problems]
The present invention is an image generation system that performs image generation, and includes an indirect texture storage unit that stores texel data of an indirect texture, a normal texture storage unit that stores texel data of a normal texture, and texture coordinates of a pixel to be drawn. The texel data of the specified indirect texture is read from the indirect texture storage unit, and the texel data of the normal texture is read and read from the normal texture storage unit based on the texture coordinates specified by the read texel data. A texture mapping unit that performs a rendering process of a pixel to be rendered based on the texel data obtained, an indirect texture setting unit that sets pixel data of an original image as texel data of an indirect texture in the indirect texture storage unit, and pixel data. Change And a normal texture setting unit for setting the conversion data for the normal texture as texel data of the normal texture in the normal texture storage unit, and wherein the texture mapping unit includes pixels of the original image read from the indirect texture storage unit. Based on the texture coordinates specified by the data, the conversion data is read from the normal texture storage unit, and the drawing processing of the drawing target pixel is performed based on the read conversion data. Related to an image generation system that performs a conversion process. The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to a computer-readable information storage medium that stores (records) a program that causes a computer to function as each of the above-described units.
[0007]
In the present invention, indirect texture mapping is performed based on the indirect texture in which the pixel data of the original image is set to the texel data and the normal texture in which the conversion data is set to the texel data. Conversion processing is realized. Therefore, only by performing indirect texture mapping, pixel data for the entire display screen or the divided display screen can be converted at a time, and an effective conversion process (image effect process) can be realized with a small processing load.
[0008]
In the present invention, the texel data read from the indirect texture storage unit may be directly set to the texture coordinates of the normal texture storage unit, or may be calculated based on the texel data and the texture coordinates (addition, subtraction, The data obtained by multiplication or division may be set to the texture coordinates of the normal texture storage unit. In addition, the texel data read from the normal texture storage unit may be drawn as it is on the drawing target pixel, or the read pixel data obtained by performing an arithmetic process may be drawn on the drawing target pixel.
[0009]
In the image generation system, the program, and the information storage medium according to the present invention, the indirect texture setting unit sets a Z value of an original image in the indirect texture storage unit as texel data of an indirect texture, and Sets the conversion data for converting the Z value to the α value in the normal texture storage unit as texel data of the normal texture, and the texture mapping unit performs the conversion process by the indirect texture mapping to convert the original image. The Z value may be converted to an α value.
[0010]
In this way, the Z value (Z plane) of the original image can be converted to an α value (α plane) by effectively using indirect texture mapping. Then, various effect images can be generated using the α value obtained by this conversion. The conversion characteristic between the Z value and the α value can be set to an arbitrary characteristic using a normal texture. The value of the obtained α value may be dynamically changed by dynamically changing the normal texture.
[0011]
In the image generation system, the program, and the information storage medium according to the present invention, the first α value obtained by converting the Z value of the original image by the conversion processing and the α value of each pixel are set in the virtual plane. An α value synthesizing unit that generates a second α value by synthesizing the α unevenness setting α value that is set non-uniformly, and converts the color of each pixel of the original image and a given color into the second value. May be included (a computer may function as each of these units, or a program that causes a computer to function as each of these units may be stored).
[0012]
According to the present invention, the first α value set according to the Z value (depth value) of the original image and the α unevenness setting α value are combined, and based on the obtained second α value, The color of the original image is combined with a given color (for example, a fog color). In this manner, an image effect that takes into account both the Z value and α unevenness (uneven pattern) of the original image can be applied to the original image. Thereby, a realistic fog unevenness image or the like can be generated.
[0013]
Further, in the image generation system, the program, and the information storage medium according to the present invention, the α value combining unit combines a plurality of α unevenness setting α values having different uneven patterns in the virtual plane to obtain the first α value. May be generated as an α unevenness setting α value to be combined.
[0014]
In this case, a virtual distance from the virtual camera is set for a plurality of virtual planes corresponding to the plurality of α unevenness setting α values, and a plurality of α unevenness setting α values are synthesized based on the virtual distance. The α value to be used may be controlled, or an uneven pattern in a virtual plane of a plurality of α unevenness setting α values may be controlled.
[0015]
Further, the α value synthesizing unit has determined that the virtual distance from the virtual camera for the virtual plane closest to the front among the plurality of virtual planes corresponding to the plurality of α unevenness setting α values has become smaller than the given distance. In this case, the synthesis rate of the α value for α unevenness setting corresponding to the virtual plane on the front side is reduced, and the virtual distance from the virtual camera for the virtual plane on the back side of the plurality of virtual planes is given. When the distance becomes larger than the distance, the composition ratio of the α value for α unevenness setting corresponding to the virtual plane on the innermost side may be reduced.
[0016]
Note that after lowering the synthesis rate of the α value for α unevenness setting corresponding to the virtual plane on the front side (after setting it to zero), a new virtual plane is generated further on the back side of the virtual plane on the back side. You may. Further, after lowering the synthesis rate of the α value for α unevenness setting corresponding to the farthest virtual plane (after setting it to zero), a new virtual plane is generated on the further front side of the foreground virtual plane. You may.
[0017]
Further, in the image generation system, the program, and the information storage medium according to the present invention, the α value synthesizing unit changes an uneven pattern in the virtual plane of the α value for α unevenness setting according to at least one of the virtual camera information and the time information. You may make it do.
[0018]
By doing so, the uneven pattern changes variously in accordance with the movement of the virtual camera and the passage of time, and a more realistic image can be generated.
[0019]
In this case, the uneven pattern of the plurality of α unevenness setting α values in the virtual plane may be changed, or the α unevenness setting α value obtained by synthesizing the plurality of α unevenness setting α values ( The uneven pattern of the α unevenness setting α value to be synthesized with the first α value may be changed.
[0020]
Further, in the image generation system, the program, and the information storage medium according to the present invention, the α value synthesizing unit sets the α unevenness setting as the virtual distance from the virtual camera for the virtual plane corresponding to the α unevenness setting α value decreases. The uneven pattern of the α value may be enlarged.
[0021]
Note that, when the virtual camera moves in a first direction parallel to the screen, the α value synthesizing unit moves the uneven pattern of the α value for α unevenness setting in a second direction opposite to the first direction. You may make it do. In this case, the moving distance of the uneven pattern of the α value for α unevenness setting may be changed according to the virtual distance from the virtual camera.
[0022]
In the image generation system, the program, and the information storage medium according to the present invention, the color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image are converted into the Z value of the original image. A color synthesizing unit for synthesizing based on the α value obtained by the conversion by the processing may be included (the computer may function as each of these units, or a program that causes the computer to function as each of these units may be stored). .
[0023]
In this way, the original image and the blurred image are synthesized based on the α value set to a value corresponding to the Z value (depth value) of each pixel of the original image. Therefore, it is possible to change the composition ratio of the blurred image and the like according to the Z value, and it is possible to express the depth of field and the like.
[0024]
Note that the Z value (depth value) may be set to a larger value closer to the virtual camera (viewpoint), or may be set to a larger value farther from the virtual camera. Various methods can be adopted as a method of synthesizing the blurred image to be synthesized with the original image. Further, the synthesis processing using the α value is not limited to α blending.
[0025]
In the image generation system, the program, and the information storage medium according to the present invention, the indirect texture setting unit sets a color of an original image in the indirect texture storage unit as texel data of an indirect texture, and the normal texture setting unit The conversion data for converting the color of the original image is set as the texel data of the normal texture in the normal texture storage unit, and the texture mapping unit converts the color of the original image by the conversion process using indirect texture mapping. You may make it convert.
[0026]
In this way, various color data conversion processes can be realized.
[0027]
In the image generation system, the program, and the information storage medium according to the present invention, the color conversion of the original image using the conversion data is at least one of gamma correction, negative / positive inversion, posterization, solarization, and binary conversion. There may be.
[0028]
Note that the color data conversion processing in the present invention is not limited to the above-described conversion processing.
[0029]
In the image generation system, the program, and the information storage medium according to the present invention, the indirect texture setting unit sets the luminance of the original image in the indirect texture storage unit as texel data of the indirect texture, and the normal texture setting unit The conversion data for converting the luminance of the original image into the α value is set as the texel data of the normal texture in the normal texture storage unit, and the texture mapping unit performs the conversion process by the indirect texture mapping. May be converted to an α value.
[0030]
With this configuration, the luminance (luminance plane) of the original image can be converted to an α value (α plane) with a small processing load by effectively using the indirect texture mapping. Then, various effect images can be generated using the α value obtained by this conversion. The conversion characteristic between the luminance and the α value can be set to an arbitrary characteristic using a normal texture. The value of the obtained α value may be dynamically changed by dynamically changing the normal texture.
[0031]
Further, in the image generation system, the program, and the information storage medium according to the present invention, the color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image are converted into the luminance of the original image by the conversion processing. May be included (a computer may function as each of these units, or a program for causing a computer to function as each of these units may be stored).
[0032]
In this way, the original image and the blurred image can be combined based on the α value set to a value corresponding to the luminance of each pixel of the original image. Therefore, it is possible to change the composition ratio of the blurred image and the like according to the luminance, and it is possible to express a halation image.
[0033]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present embodiment will be described.
[0034]
The present embodiment described below does not unduly limit the contents of the present invention described in the claims. In addition, all of the configurations described in the present embodiment are not necessarily essential components of the invention.
[0035]
1. Constitution
FIG. 1 shows an example of a functional block diagram of an image generation system (game system) of the present embodiment. Note that the image generation system according to the present embodiment does not need to include all the components (each unit) in FIG. 1 and omits some of them (for example, the operation unit 160, the portable information storage device 194, the communication unit 196, and the like). It may be configured.
[0036]
The operation unit 160 is used by a player to input operation data. The function of the operation unit 160 is a lever, a button, a steering wheel, a shift lever, an accelerator pedal, a brake pedal, a microphone, a sensor, a touch panel display, or a hardware such as a housing. It can be realized by hardware.
[0037]
The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by hardware such as a RAM.
[0038]
The information storage medium 180 (a medium readable by a computer) stores programs, data, and the like, and functions as an optical disk (CD, DVD), a magneto-optical disk (MO), a magnetic disk, a hard disk, a magnetic tape. Alternatively, it can be realized by hardware such as a memory (ROM). The processing unit 100 performs various processes of the present embodiment based on the program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores (records and stores) a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute processing of each unit).
[0039]
The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by hardware such as a CRT, an LCD, a touch panel display, or an HMD (head mounted display).
[0040]
The sound output unit 192 outputs the sound generated according to the present embodiment, and its function can be realized by hardware such as a speaker or headphones.
[0041]
The portable information storage device 194 stores personal data of a player, save data of a game, and the like. Examples of the portable information storage device 194 include a memory card and a portable game device.
[0042]
The communication unit 196 performs various types of control for performing communication with the outside (for example, a host device or another image generation system), and functions thereof include hardware such as various processors or a communication ASIC. , And a program.
[0043]
A program (data) for causing a computer to function as each unit of the present embodiment is distributed from an information storage medium of a host device (server) to an information storage medium 180 (storage unit 170) via a network and a communication unit 196. You may do so. Use of such an information storage medium of the host device (server) can also be included in the scope of the present invention.
[0044]
The processing unit 100 (processor) performs various processes such as a game process, an image generation process, and a sound generation process based on operation data from the operation unit 160, a program, and the like. Here, the game process performed by the processing unit 100 includes a process of starting a game when game start conditions (such as selection of a course, a map, a character, and the number of participating players), a process of advancing the game, a process of progressing a character or a map. For example, there are a process of arranging objects, a process of displaying objects, a process of calculating a game result, and a process of ending a game when a game ending condition is satisfied. The processing unit 100 performs various processes using the storage unit 170 as a work area. The function of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.) and ASIC (gate array, etc.), and a program (game program).
[0045]
The processing unit 100 includes an object space setting unit 110, a movement / motion processing unit 112, a virtual camera control unit 114, an image generation unit 120, and a sound generation unit 130. Note that some of these may be omitted.
[0046]
The object space setting unit 110 is an object that represents a display object such as a character, a tree, a car, a pillar, a wall, a building, or a map (terrain) (an object configured by a primitive surface such as a polygon, a free-form surface, or a subdivision surface). Is performed in the object space. That is, the position and rotation angle (synonymous with direction and direction) of the object in the world coordinate system are determined, and the position (X, Y, Z) is determined by the rotation angle (the rotation angle around the X, Y, and Z axes). Arrange objects.
[0047]
The movement / motion processing unit 112 performs a movement / motion calculation (movement / motion simulation) of a moving object (a car, an airplane, a character, or the like). That is, based on operation data, a program (movement / motion algorithm), or various data (motion data) input by the player through the operation unit 160, the moving object is moved in the object space, or the moving object is moved (motion). , Animation). More specifically, movement information (position, rotation angle, speed, or acceleration) of the moving object and motion information (position or rotation angle of each part object) are sequentially obtained for each frame (1/60 second). Perform simulation processing. Here, the frame is a unit of time for performing the movement / motion processing (simulation processing) of the moving object and the image generation processing.
[0048]
The virtual camera control unit 114 performs a process of controlling a virtual camera for generating an image at a given (arbitrary) viewpoint in the object space. That is, a process of controlling the position (X, Y, Z) or a rotation angle (a rotation angle around the X, Y, Z axes) of the virtual camera (a process of controlling the viewpoint position and the line-of-sight direction) is performed.
[0049]
For example, when photographing a moving object from behind using a virtual camera, the position or rotation angle (the direction of the virtual camera) of the virtual camera is controlled so that the virtual camera follows changes in the position or rotation of the moving object. In this case, the virtual camera can be controlled based on information such as the position, rotation angle, or speed of the moving object obtained by the movement / motion processing unit 112. Alternatively, the virtual camera may be rotated at a predetermined rotation angle while moving along a predetermined movement path. In this case, the virtual camera is controlled based on virtual camera data for specifying the position (moving path) and the rotation angle of the virtual camera.
[0050]
The image generation unit 120 performs a drawing process based on the results of various processes (game processes) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. That is, when generating a so-called three-dimensional game image, first, geometric processing such as coordinate conversion (world coordinate conversion, camera coordinate conversion), clipping processing, perspective conversion, or light source processing is performed, and based on the processing result, , Drawing data (position coordinates of vertices of a primitive surface, texture coordinates, color data, normal vectors, α values, etc.) are created. Then, based on the drawing data (primitive surface data), the object (one or more primitive surfaces) after the perspective transformation (after the geometry processing) is converted into image information in pixel units such as a drawing buffer 172 (frame buffer, work buffer, etc.). Draw in a buffer that can be stored. As a result, an image that is viewed from the virtual camera (given viewpoint) in the object space is generated.
[0051]
The image generating unit 120 includes a hidden surface removing unit 122, a texture mapping unit 123, an indirect texture setting unit 124, a normal texture setting unit 125, an α value synthesizing unit 126, and a color synthesizing unit 127. Note that a configuration in which some of these are omitted may be adopted.
[0052]
The hidden surface erasing unit 122 performs a hidden surface erasing process by a Z buffer method (depth comparison method) using a Z buffer 174 (depth buffer) in which a Z value (depth information) is stored.
[0053]
The texture mapping unit 123 performs a process of mapping the texture (texel data) stored in the texture storage unit 176 to an object (polygon or a virtual polygon having a display screen size or a divided display screen size). Specifically, the texel data specified by the texture coordinates is read from the texture storage unit 176 (texture buffer, texture storage area). Then, the read texel data is drawn on the drawing target pixel. In this case, the texture mapping unit 123 can perform the mapping process while performing texel interpolation such as bilinear interpolation.
[0054]
In the present embodiment, the texture mapping unit 123 can perform indirect texture mapping (indirect texture mapping).
[0055]
More specifically, the texture mapping unit 123 stores the texel data of the indirect texture (indirect texture) specified by the texture coordinates of the pixel to be drawn from the indirect texture storage unit 177 (the texture buffer and storage area for the indirect texture). read out. In this case, the texture coordinates of the pixel to be drawn can be obtained, for example, by interpolating (linearly interpolating) the vertex texture coordinates of the polygon (virtual polygon). Then, the texture mapping unit 123 specifies the texture coordinates based on the texel data read from the indirect texture storage unit 177 (sets the texel data to the texture coordinates), and, based on the texture coordinates, uses the normal texture storage unit 178 (for the normal texture). Texel data of a normal texture (regular texture) is read from the texture buffer and storage area. Then, based on the read texel data, a rendering process (mapping) of the pixel to be rendered is performed. In this way, indirect texture mapping is realized.
[0056]
The indirect texture setting unit 124 performs a process of setting (writing) the indirect texture in the indirect texture storage unit 177. More specifically, for example, pixel data (data that can be stored in association with pixels such as color, α value, Z value, or luminance) of an original image (original image) is stored in texel data of an indirect texture (stored in association with a texel) Is set in the indirect texture storage unit 177.
[0057]
The normal texture setting unit 125 performs a process (writing process) of setting a normal texture in the normal texture storage unit 178. More specifically, for example, conversion data (conversion table data, function data, gradient data) for converting pixel data into the same or different pixel data is stored in the normal texture storage unit 178 as texel data of the normal texture. Set.
[0058]
The texture mapping unit 123 performs indirect texture mapping based on the indirect texture (pixel data) set by the indirect texture setting unit 124 and the normal texture (conversion data) set by the normal texture setting unit 125. Thus, the conversion processing of the pixel data of the original image (original image) (the processing of converting to the same or different pixel data) is realized. More specifically, the texture mapping unit 123 specifies the texture coordinates (sets the texture coordinates) based on the pixel data of the original image read from the indirect texture storage unit 177, and performs the normal processing based on the texture coordinates. The conversion data of the pixel data is read from the texture storage unit 178. Then, based on the read-out conversion data, the rendering process of the pixel to be rendered is performed, thereby realizing the conversion process of the pixel data of the original image.
[0059]
The α value synthesizing unit 126 performs an α value synthesizing process. More specifically, the second α value is generated by combining the first α value and the α value for α unevenness setting (such as multiplication, addition, division, or subtraction of α values).
[0060]
Here, in the first α value, for example, the α value of each pixel is set to a value corresponding to the Z value of each pixel of the original image. Further, in the α value for α unevenness setting, the α value of each pixel is set to be non-uniform (nonuniform) in the virtual plane (between pixels, in the screen).
[0061]
The original image is, for example, an image generated by drawing an object in the drawing buffer 172 while erasing a hidden surface using a Z buffer 174 (Z plane of a frame buffer) that stores a Z value. Then, the Z value of the original image is generated (stored) in the Z buffer 174 (Z plane) by the Z buffer method (depth comparison method) performed at the time of this drawing processing.
[0062]
Note that the Z value (depth value) in the present embodiment may be the Z value itself on the Z coordinate axis of the camera coordinate system, or may be a mathematically equivalent parameter to the Z value. For example, a parameter corresponding to the reciprocal of the Z value in the camera coordinate system or a parameter obtained by performing a given conversion process on the Z value in the camera coordinate system may be used.
[0063]
The color combining section 127 performs a color combining process. For example, a process of combining the color of the original image and a given color (for example, a fog color, a color of a blurred image of the original image, and the like) based on the α value (second α value) is performed. As the combining process in this case, α blending (α blending in a narrow sense), addition α blending, subtraction α blending, or the like can be considered. By performing such a synthesis process, an image in which fog (fog, clouds, steam, haze, dust, dust, smoke, tornado or dew, etc.) is applied to the original image, or an image in which the depth of field is expressed Can be generated.
[0064]
Taking the case where the combining process is α blending as an example, the color combining unit 127 performs the α combining process according to the following equation.
[0065]
R Q = (1-α) × R 1 + Α × R 2 (1)
G Q = (1-α) × G 1 + Α × G 2 (2)
B Q = (1-α) × B 1 + Α × B 2 (3)
Taking the case where the combining process is addition α blending as an example, the color combining unit 127 performs the α combining process according to the following equation.
[0066]
R Q = R 1 + Α × R 2 (4)
G Q = G 1 + Α × G 2 (5)
B Q = B 1 + Α × B 2 (6)
Where R 1 , G 1 , B 1 Are the R, G, and B components of the color (luminance) of the original image (the image already drawn in the drawing buffer 172). 2 , G 2 , B 2 Are the R, G, and B components of the color to be synthesized (the color of the fog, the color of the blurred image). Also, R Q , G Q , B Q Are the R, G, B components of the color of the image (completed image) obtained by the α synthesis.
[0067]
The α value (A value) is data that can be stored in association with each pixel (texel, dot), for example, plus alpha data other than color data. The α value can be used as mask data, translucency (equivalent to transparency, opacity), bump data, or the like.
[0068]
The sound generation unit 130 performs sound processing based on the results of various processes performed by the processing unit 100, generates a game sound such as BGM, sound effect, or voice, and outputs the generated game sound to the sound output unit 192.
[0069]
Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or a multi-player mode in which a plurality of players can play in addition to the single player mode. A system may also be provided.
[0070]
Further, when a plurality of players play, a game image or a game sound to be provided to the plurality of players may be generated using one terminal, or may be connected via a network (transmission line, communication line) or the like. It may be generated using a plurality of terminals (game machines, mobile phones).
[0071]
2. Method of this embodiment
Next, the method of the present embodiment will be described with reference to the drawings.
[0072]
2.1 Pixel Data Conversion Using Indirect Texture Mapping
In the present embodiment, pixel data conversion processing is realized using indirect (indirect) texture mapping.
[0073]
FIG. 2A shows the principle of indirect texture mapping. In the indirect texture mapping, based on the texture coordinates (U, V), texel data designated (addressed) by the texture coordinates is stored in an indirect texture storage unit 177 (an indirect texture storage area, an indirect texture lookup table). Is read from. Then, the texel data (color, etc.) is set to the texture coordinates (U ′, V ′), and the texel data specified by the texture coordinates (U ′, V ′) is stored in the normal texture storage unit 178 (normal texture storage). Area, usually a texture look-up table). That is, the texel data not directly specified by the texture coordinates (U, V) but the texel data indirectly specified by the texture coordinates (U, V) is read.
[0074]
As shown in FIG. 2B, arithmetic processing (addition, subtraction, multiplication, division, etc.) based on the texture coordinates and the texel data read from the indirect texture storage unit 177 is performed by the arithmetic unit 129. The texel data may be read from the normal texture storage unit 178 based on the texture coordinates obtained by the arithmetic processing.
[0075]
According to this indirect texture mapping, there is an advantage that generation of a distortion image by a so-called texture warp, texture tile map, and bump mapping can be realized by simple processing. In the present embodiment, this indirect texture mapping is used in a form different from the usual.
[0076]
That is, in general indirect texture mapping, table data for texture warping is set in the indirect texture storage unit 177 as an indirect texture, and pixel data of the original image is set in the normal texture storage unit 178 as a normal texture. The degree of distortion of the original image changes depending on how to set the table data for texture warp.
[0077]
On the other hand, in the present embodiment, as shown in FIG. 3, the pixel data (color, α value, Z value, luminance, etc.) of the original image is set (stored) in the indirect texture storage unit 177, and the pixel data Data (data for converting pixel data to the same or different pixel data) is set (stored) in the normal texture storage unit 178. Then, conversion data is read from the normal texture storage unit 178 using the pixel data of the original image read from the indirect texture storage unit 177 as texture coordinates. Then, the pixel data of the original image is converted by drawing the read conversion data on the pixel to be drawn. For example, the color, α value, Z value, or luminance of the original image is converted into the same kind of color, α value, Z value, or luminance that has been subjected to the conversion processing. Alternatively, the color of the original image is converted into an α value, a Z value, or luminance different from the color, or the α value is converted into a color, Z value, or luminance different from the α value. Alternatively, the Z value is converted into a color, α value, or luminance different from the Z value, or the luminance is converted into a color, α value, or Z value different from the luminance. By doing so, the pixel data for the display screen or the divided display screen can be converted at a time by indirect texture mapping processing, so that the processing load can be reduced, the processing can be simplified, the processing speed can be improved, and the like. The pixel data of the original image may be any data (plane) that can be stored in association with the pixel, and may be, for example, normal vector data.
[0078]
For example, as shown in FIG. 4A, in general texture mapping (direct texture mapping), texture coordinates Ui, Vi (texture coordinates obtained by interpolating texture coordinates of vertices VX1 to VX4) of a drawing target pixel PXi. Is read from the texture storage unit 500 and drawn on the pixel PXi.
[0079]
On the other hand, in the indirect texture mapping, as shown in FIG. 4B, the texel data specified by the texture coordinates Ui, Vi of the drawing target pixel PXi is read from the indirect texture storage unit 177 (refer to). Then, the read texel data is set to the texture coordinates Ui ′ (or Vi ′ or Ui ′ and Vi ′), and the normal texture texel data is read from the normal texture storage unit 178 (refer to). Then, the read texel data is drawn (written) on the drawing target pixel PXi.
[0080]
In this case, in the present embodiment, pixel data of the original image is stored as texel data in the texel TXi specified by the texture coordinates Ui, Vi. The texture coordinates Ui ′ serving as the read address of the normal texture storage unit 178 change according to the value of the pixel data stored in the texel TXi. Therefore, the conversion data read from the texel TXi 'of the normal texture storage unit 178 and written to the pixel PXi also changes according to the value of the pixel data of the original image stored in the texel TXi.
[0081]
For example, if the pixel data of the original image stored in the texel TXi of the indirect texture storage unit 177 is different from the pixel data of the original image stored in the texel TXj, the texture coordinates Ui ′ and Uj ′ are also different. Thus, different texels TXi ′ and TXj ′ are designated in the normal texture storage unit 178. Therefore, the conversion data having different values stored in the texels TXi ′ and TXj ′ are drawn on the pixels PXi and PXj, and the conversion process of the pixel data can be realized. That is, as shown in FIGS. 4C and 4D, various conversion characteristics (functions) between the pixel data PD and the converted pixel data CPD can be realized.
[0082]
As described above, in the present embodiment, the pixel data PD for one plane (M × N pixels) of the original image can be converted into the pixel data CPD for one plane at a time by using the indirect texture mapping. Conversion processing can be realized. The conversion characteristic between the pixel data PD and CPD can be arbitrarily set by the conversion data (conversion characteristic data) stored in the normal texture storage unit 178. Therefore, there is an advantage that various conversion characteristics between PD and CPD can be easily realized by rewriting the conversion data in the normal texture storage unit 178.
[0083]
The conversion characteristic between the pixel data PD and CPD may be dynamically (real-time) changed by dynamically (real-time) changing the conversion data over time. In addition, the size of the drawing pixel area on which the texture is drawn (mapped) and the size of the texel area from which the texel data of the indirect texture is read may not be the same. For example, the size of the indirect texture area may be reduced.
[0084]
Next, various image effect processing (image conversion processing) that can be realized using indirect texture mapping will be described.
[0085]
2.2 Effect processing of fog uneven image
In a game, a fog such as fog, haze, smoke, or dust may be generated as a game image. In order to improve the virtual reality of the player, it is desired that fog unevenness (nonuniformity, evenness) can be realistically expressed.
[0086]
In order to express a more realistic fog effect, it is desirable to change the fog density according to the distance from the virtual camera (viewpoint). That is, the fog density increases as the distance from the virtual camera increases.
[0087]
To change the fog density in this way, it is desirable to change the α value, which is a parameter for controlling the fog density, according to the distance from the virtual camera. That is, the α value is controlled so that the fog density increases as the distance from the virtual camera increases.
[0088]
Therefore, in the present embodiment, the Z value (depth distance), which is a distance parameter from the virtual camera, is converted into an α value. Specifically, as shown by A1 in FIG. 5, the Z value ZP of the original image (the image drawn on the frame buffer) is converted into a first α value αP1.
[0089]
Then, as shown at A2 in FIG. 5, the color ICP (RGB, YUV, etc.) of the original image and the fog color (white, gray, etc.) CP are synthesized (α blending, etc.) based on αP1. This makes it possible to generate a fog image in which the fog effect has been applied to the original image.
[0090]
In the present embodiment, the conversion from the Z value to the α value indicated by A1 in FIG. 5 is realized by effectively using the indirect texture mapping described above.
[0091]
That is, in FIG. 3, the Z value of the original image is set in the indirect texture storage unit 177 as texel data of the indirect texture. The conversion data for converting the Z value into the α value is set in the normal texture storage unit 178 as texel data of the normal texture. Then, by the conversion process using indirect texture mapping described in FIG. 4B, the Z value of the original image is converted into an α value whose value changes according to the Z value. By doing so, the Z value (Z plane) for the display screen or the divided display screen is converted into the α value (α plane) for the display screen or the divided display screen in one process using indirect texture mapping. Plane).
[0092]
Now, according to the method of FIG. 5, it is possible to apply a fog effect in which the shading changes according to the Z value (distance from the virtual camera) to the original image.
[0093]
However, the technique of FIG. 5 has a problem that fog (uneven fog) having uneven density (density) cannot be expressed.
[0094]
In this case, for example, a method of giving shades of white, gray, black or the like to the color CP (fog color sprite) in FIG. 5 can be considered.
[0095]
However, in this method, the generated fog is only gray or black fog, not fog having uneven density.
[0096]
Therefore, in the present embodiment, a method of making the α value uneven, that is, a method of making the α value non-uniform in the virtual plane (between pixels, in the screen) is adopted.
[0097]
That is, in the present embodiment, first, as shown by C1 in FIG. 6, the Z value (Z plane) ZP of the original image is converted in the same manner as in the method of FIG. 5, and the α value of each pixel is set according to the ZP. A first α value (first α plane) αP1 is obtained. In this case, the conversion from ZP to αP1 is realized by the conversion processing using indirect texture mapping described with reference to FIGS.
[0098]
Further, in the present embodiment, as shown by C2 in FIG. 6, an α value for α unevenness setting (α plane for α unevenness setting) αUP in which the α value is set unevenly in the virtual plane is prepared. Then, as shown by C3 in FIG. 6, αP1 and αUP are combined to obtain a second α value (second α plane) αP2. By doing so, it is possible to obtain an α value (fog density value) that takes into account both the Z value and α unevenness (uneven pattern). In addition, as the synthesis process of the α value, a process of multiplying αP1 and αUP of each pixel can be considered. However, synthesis processing other than multiplication, such as addition, subtraction, or division of α values, may be employed.
[0099]
Next, in the present embodiment, as shown by C4 in FIG. 6, based on the obtained αP2, the color ICP of the original image and the color CP (the color of the fog) are combined to generate a fog image (completed image). . Here, as the color synthesis, α blending in a narrow sense (the above equations (1), (2), (3)) or additive α blending (the above equations (4), (5), (6)) can be adopted.
[0100]
By doing so, it becomes possible to apply fog whose density changes according to the Z value (distance) and whose density is uneven to the original image.
[0101]
FIG. 7 shows an example of an original image used in the present embodiment. The original image is an image obtained by drawing an object such as a character or a background in a frame buffer (drawing buffer) while performing geometry processing.
[0102]
FIG. 8 shows an example of the fog uneven pattern (gray scale image representing α value αUP for α unevenness setting). In FIG. 8, the white portion has a lower α value and a lower fog density. On the other hand, the black portion has a higher α value and a higher fog density. Thus, in FIG. 8, the α value (fog density) is non-uniform in the virtual plane (screen).
[0103]
FIG. 9 is an example of a normal (gradient) texture stored in the normal texture storage unit 178. The normal texture shown in FIG. 9 is used as conversion data for converting the α value of the original image into a Z value.
[0104]
The image in the left corner of FIG. 10 is an example of an image obtained by multiplying (multiplying) the αP1 set according to the Z value of the original image by the uneven pattern (uneven pattern texture) of FIG. FIG. 11 is an example of a final fog unevenness image generated by the present embodiment.
[0105]
As shown in FIG. 11, according to the present embodiment, the fog density increases as the distance from the viewpoint (virtual camera) increases. In addition, since the density of fog is uneven, it looks as if a real fog is hung on an object (character), and an unprecedented realistic image has been successfully generated.
[0106]
By the way, if there is only one virtual plane having the α value for α unevenness setting, it looks as if fog unevenness exists only at a certain depth, and it is not possible to express a more realistic fog.
[0107]
Therefore, in the present embodiment, as shown in FIG. 12, a plurality of virtual planes PL0, PL1, PL2 having different virtual distances d0, d1, and d2 from the virtual camera VC (two or four or more planes may be used). Virtual placement. For example, in FIG. 12, PL0 having a virtual distance of d0 is virtually arranged on the near side as viewed from the virtual camera VC, and PL2 having a virtual distance of d2 is virtually arranged on the farthest side as viewed from the VC. .
[0108]
In the present embodiment, a plurality of α unevenness setting α values (α planes) αUP0 to αUP2 having different unevenness patterns (nonuniformity patterns) in the virtual planes corresponding to the plurality of virtual planes PL0, PL1, and PL2 are defined. prepare. Then, the plurality of α unevenness setting α values αUP0 to αUP2 are synthesized using the α values α0 to α2 (synthesis rate) obtained based on the virtual distances d0 to d2 and the like, whereby the α unevenness setting α value is obtained. Generate αUP. More specifically, sprites SP0 to SP2 (virtual objects in a broad sense) corresponding to the virtual planes PL0 to PL2 are arranged, and textures of α unevenness setting α values αUP0 to αUP2 are mapped to these sprites SP0 to SP2. Draw multiple times on the work buffer. This makes it possible to generate an image in which two or more layers of uneven patterns appear to overlap.
[0109]
Further, in the present embodiment, as shown in FIG. 13A, when the virtual camera VC moves (forwards) and the virtual distance d0 of the virtual plane PL0 closest to the front becomes less than or equal to a given distance, α corresponding to PL0 The synthesis rate (blend rate) of the non-uniformity setting α value αUP0 is reduced and gradually disappears. Then, a new virtual plane PLN is generated on the back side of the virtual plane PL2, and the synthesis rate of the α unevenness setting α value αUPN corresponding to the PLN is gradually increased.
[0110]
On the other hand, as shown in FIG. 13B, when the virtual camera VC moves (retreats) and the virtual distance d2 of the innermost virtual plane PL2 becomes equal to or greater than a given distance, the synthesis rate of αUP2 corresponding to PL2 And gradually turn it off. Then, a new virtual plane PLN is generated in front of PL0, and the synthesis rate of αUPN corresponding to the PLN is gradually increased.
[0111]
By performing the processing as shown in FIGS. 13A and 13B, the same effect as when an infinite number of virtual planes are used while using a finite number of virtual planes of αUP0 to αUP2 is obtained. be able to.
[0112]
Also, in the present embodiment, the uneven pattern in the virtual plane of the α value for α unevenness setting is changed based on virtual camera information (the position or direction of the virtual camera, etc.) and time information (information indicating the time and progress of a frame). Let me.
[0113]
Specifically, as shown in FIG. 14A, as the virtual distance d (d0 to d2) between the virtual camera VC and the virtual plane PL (PL0 to PL2) decreases, the unevenness of αUP corresponding to the PL increases. . Conversely, as the virtual distance d increases, the irregularity pattern of αUP is reduced.
[0114]
By doing so, for example, in FIG. 12, the irregularity pattern becomes large in αUP0 of the virtual plane PL0 whose virtual distance d0 from the virtual camera VC is short, and the irregularity pattern becomes large in αUP2 of the virtual plane PL2 whose virtual distance d2 is far. Becomes smaller. Therefore, the uneven pattern can be given a sense of depth or a three-dimensional effect, and a more realistic image can be generated.
[0115]
Further, in the present embodiment, as shown in FIG. 14B, when the virtual camera VC moves in a first direction (for example, the left direction of up, down, left, and right) parallel to the screen (XY plane of the screen coordinate system). The uneven pattern of αUP (αUP0 to αUP2) is moved by an appropriate distance in a second direction (for example, rightward) opposite to the above.
[0116]
In this case, in the present embodiment, the movement distance of the uneven pattern is changed according to the virtual distance d (d0 to d2) of the virtual plane PL (PL0 to PL2). Specifically, in FIG. 12, the moving distance of the uneven pattern with respect to the movement of the virtual camera VC is increased at αUP0 of the virtual plane PL0 with the short virtual distance d0, and the virtual camera VC is set at αUP2 of the virtual plane PL2 with the long virtual distance d2 The movement distance of the uneven pattern with respect to the movement of is reduced. In this way, it is possible to generate an image that looks as if a three-dimensional fog is in front of the eyes, even though a planar virtual plane is used.
[0117]
FIG. 15 shows a flowchart of a specific example of the fog unevenness effect process.
[0118]
First, an object such as a background or a character to be displayed in the frame is drawn in a frame buffer (a drawing buffer in a broad sense) to generate an original image as shown in FIG. 7 (step S1). Then, it is determined whether or not fog unevenness processing is to be performed (step S2).
[0119]
When fog unevenness processing is performed, a texture buffer 1 (a buffer having one texel of 24 bits) having the same size as the frame buffer is secured (step S3). Similarly, a texture buffer 2 (8 bits) of 1/4 size of the frame buffer and a texture buffer 3 (8 bits) of 1/16 size of the frame buffer are secured (steps S4 and S5). The reason why the size of the texture buffer is made smaller than the size of the frame buffer is to save memory and shorten processing time. Therefore, if there is sufficient memory capacity or processing load, a texture buffer having the same size as the frame buffer may be secured.
[0120]
Next, the color components (RGB planes) of the original image (FIG. 7) in the frame buffer are copied to the texture buffer 1 (step S6). The Z value component (Z plane) of the frame buffer (Z buffer) is copied to the texture buffer 2 (indirect texture storage unit) while reducing the size to 1/4 (step S7).
[0121]
Next, based on the indirect texture (Z value of the original image) set (stored) in the texture buffer 2 (indirect texture storage unit) and the normal (gradient) texture prepared in advance in FIG. The indirect texture mapping described in 4 (D) is performed to obtain an α value αP1 corresponding to the Z value depth (step S8). Specifically, as the Z value is closer to the near side as viewed from the virtual camera (viewpoint), αP1 is closer to 0 (transparent), and the Z value is the value indicating the far side as viewed from the virtual camera. The Z value of the original image is converted to an α value αP1 such that αP1 approaches 1.0 (opaque). Thus, the conversion shown in C1 of FIG. 6 is performed.
[0122]
Next, the obtained αP1 is multiplied (multiplied) by the uneven pattern of FIG. 8 (α unevenness setting α value αUP), and rendering is performed with a size of 1/16 of the frame buffer (step S9). As a result, the combining process shown at C3 in FIG. 6 is performed, and an image as shown in the left corner of FIG.
[0123]
Next, one of the RGB planes of the uneven pattern (uneven pattern texture) rendered in step S9 is copied to the texture buffer 3 as the α value αP2 (step S10). Then, the color of the original image in the texture buffer 1 and the fog color (given color in a broad sense) are combined with the α value αP2 copied in the texture buffer 3, and the combined color (RGB) is stored in the frame buffer. Draw and display (step S11). As a result, an image expressing fog unevenness as shown in FIG. 11 is generated and displayed. Finally, it is determined whether or not the game is over (frame update). If the game is not over, the process returns to step S1 to shift to the processing of the next frame.
[0124]
2.3 Depth of field effect processing
An image generated by a conventional image generation system is not an image focused according to a distance from a viewpoint like a human visual field image. For this reason, the expression is as if all the subjects in the image are in focus.
[0125]
However, an image in which all subjects from a short distance to a long distance are in focus is an image that cannot be seen in daily life, and thus looks unnatural.
[0126]
In order to pursue more reality, it is desirable to generate an image in which the degree of focus is adjusted according to the distance between the viewpoint and the object, the direction of the line of sight, and the like. However, if an image expressing the so-called depth of field is generated by calculating the distance from the viewpoint to each object in the game space and calculating the degree of blur for each object, the processing load becomes excessively large. Become.
[0127]
Therefore, in the present embodiment, an image expressing the depth of field is generated using the indirect texture mapping described with reference to FIGS.
[0128]
That is, in the present embodiment, the Z value (depth distance), which is a distance parameter from the virtual camera, is converted into an α value using indirect texture mapping. Specifically, in FIG. 3, the Z value of the original image is set in the indirect texture storage unit 177, and the conversion data for converting the Z value into the α value is set in the normal texture storage unit 178. Then, by the conversion process using indirect texture mapping described in FIG. 4B, the Z value of the original image is converted into an α value whose value changes according to the Z value. That is, the α value approaches 0.0 (transparent) as the Z value is closer to the near side as viewed from the virtual camera, and the α value is 1.0 (transparent) as the Z value is closer to the back side as viewed from the virtual camera. The Z value is converted to an α value so as to approach (opaque).
[0129]
By performing the conversion process using the indirect texture mapping in this manner, as shown in F1 of FIG. 16, the Z values ZA, ZB, ZC, and ZD of the pixels A, B, C, and D of the original image are determined. The α values αA, αB, αC, and αD of each pixel are set as the values, and an α plane as shown in F2 is generated. More specifically, as the pixel is farther from the focal point (gaze point) of the virtual camera 10 (pixel having a larger Z value difference from the focal point), for example, a larger α value is set. As a result, the farther the pixel is from the focal point of the virtual camera 10, the higher the composition ratio of the blurred image.
[0130]
Then, as shown in F3 in FIG. 16, based on the generated α plane (α value set for each pixel), α synthesis of the original image shown in FIG. Equations (1), (2), and (3) α blending are performed.
[0131]
As described above, based on the α value set in accordance with the Z value (depth value), the α synthesis of the color of each pixel of the original image and the color of each pixel of the blurred image is performed, so that the focus of the virtual camera is improved. The further away from (the point set as the point in focus), the more blurred the image can be generated, and the so-called depth of field can be expressed. Thus, unlike the conventional game image in which all the subjects in the screen are in focus, a real and natural game image focused according to the distance from the viewpoint like a view image of the real world can be generated. .
[0132]
FIG. 17 shows a flowchart of a specific example of the depth-of-field effect processing.
[0133]
First, objects such as backgrounds and characters to be displayed in the frame are drawn in a frame buffer to generate an original image as shown in FIG. 7 (step S21). Then, it is determined whether or not to perform the depth of field (out-of-focus) processing (step S22). If not, the process proceeds to step S34.
[0134]
When performing the depth of field processing, a texture buffer 1 (24 bits) having the same size as the frame buffer is secured (step S23). Similarly, a texture buffer 2 (24 bits) having a 1/16 size of the frame buffer and a texture buffer 3 (8 bits) having the same size as the frame buffer are secured (steps S24 and S25).
[0135]
Next, the color components (RGB planes) of the original image (FIG. 7) in the frame buffer are copied to the texture buffer 1 (step S26). The Z value component (Z plane) of the frame buffer (Z buffer) is copied to the texture buffer 3 (indirect texture storage unit) while reducing the size to 1/4 (step S27). The texture (color component) of the texture buffer 1 is drawn in the frame buffer while the size is reduced to 4 (step S28). Further, the color components (RGB) of the frame buffer are copied to the texture buffer 2 while being reduced in size to 1/4 (step S29).
[0136]
Next, based on the indirect texture (Z value of the original image) set in the texture buffer 3 (indirect texture storage unit) and the normal (gradient) texture shown in FIG. ) Is performed to obtain an α value αP1 corresponding to the depth of the Z value (step S30). That is, the conversion shown in F1 and F2 in FIG. 16 is performed to obtain the αP1 plane as shown in FIG. In the plane of αP1 in FIG. 18, the closer the Z value is to an object (for example, a character) whose value is closer to the virtual camera, the closer the αP1 is to 0 (transparent), and the lower the Z value is when viewed from the virtual camera. An object (for example, a building) having a value on the side is a plane in which αP1 approaches 1.0 (opaque).
[0137]
Next, the size of the texture (color component) in the texture buffer 2 is increased 16 times by bilinear interpolation (texel interpolation in a broad sense) to generate a blurred image of the original image (step S31). Then, as described in F3 of FIG. 16, the original image (color) and the blurred image (color) of the texture buffer 1 are α-blended (α-combination in a broad sense) by αP1 in FIG. The image is drawn and displayed in the buffer (step S32). As a result, an image in which the depth of field is represented as shown in FIG. 19 is displayed. Finally, it is determined whether or not the game is over (frame update). If the game is not over, the process returns to step S21 to shift to the processing of the next frame.
[0138]
By changing the normal texture (ramp texture) used in step S30 according to the passage of time or the like, an image in which the depth of field changes and the focus position changes in real time can be generated.
[0139]
2.4 Image effects such as gamma correction
In the above, an example has been described in which pixel data (Z value) of an original image is converted to different pixel data (α value) using indirect texture mapping, such as converting a Z value to an α value. However, using indirect texture mapping, the pixel data such as the color, α value, Z value, or luminance of the original image is converted into color, α value, Z value, luminance, or the like, which is the same kind of pixel data, respectively. May be.
[0140]
More specifically, in FIG. 3, the color (pixel data in a broad sense) of the original image is set in the indirect texture storage unit 177. Further, conversion data for converting the color of the original image is set in the normal texture storage unit 178. Then, the color of the original image is converted by a conversion process using indirect texture mapping.
[0141]
In this case, color conversion using the conversion data includes gamma correction, negative / positive inversion, posterization, solarization, binarization, and the like. FIGS. 20 (A), (B), 21 (A), (B), and (C) show conversion characteristics (gamma correction, negative / positive inversion, posterization, solarization, and binarization) (pixel data PD and conversion, respectively). (Characteristic indicating the relationship of the pixel data CPD later).
[0142]
The gamma correction in FIG. 20A is a conversion process for correcting a non-linear characteristic of a monitor (display unit). The negative-positive inversion in FIG. 20B is for inverting the luminance (density) of the original image, and is an effect process represented by, for example, a relational expression of CPD = 255-PD.
[0143]
The posterization in FIG. 21A is for displaying a multi-tone image by limiting it to several tones, and is expressed by, for example, a relational expression of CPD = {INT (PD / VAL)} × VAL. Effect processing. Note that INT (R) is a function that rounds off the decimal point of R and converts it to an integer, and VAL is an arbitrary value.
[0144]
The solarization in FIG. 21B is effect processing in which the slope of the curve function between the input value (PD) and the output value (CPD) is inverted at a certain point. The binarization in FIG. 21C is an effect process for realizing a high contrast effect of an image.
[0145]
According to the conversion processing of the present embodiment using indirect texture mapping, in addition to the image effects shown in FIGS. 20A to 21C, various image effects such as a monotone filter and a sepia filter are used. Can be realized. For example, in addition to color conversion as shown in FIGS. 20A to 21C, a process of converting pixel data such as an α value, a Z value, or luminance into pixel data of the same type is performed by indirect texture mapping. It may be realized by using.
[0146]
FIG. 22 shows a flowchart of a specific example of the gamma correction effect process.
[0147]
First, an object such as a background or a character to be displayed in the frame is drawn in a frame buffer to generate an original image (step S41). Then, it is determined whether or not to perform the gamma correction process (step S42). If not, the process proceeds to step S49.
[0148]
When performing gamma correction processing, a texture buffer 1 (24 bits) having the same size as the frame buffer is secured (step S43). Then, the color components (RGB planes) of the original image in the frame buffer are copied to the texture buffer 1 (indirect texture storage unit) (step S44).
[0149]
Next, description will be made with reference to FIGS. 3 and 4D based on the R (red) component of the indirect texture set in the texture buffer 1 (indirect texture storage unit) and the normal (gradient) texture shown in the upper part of FIG. The indirect texture mapping is performed to obtain a gamma-corrected R component corresponding to the R component of the original image (step S45). That is, conversion processing of conversion characteristics as shown in FIG.
[0150]
Next, indirect texture mapping is performed based on the G (green) component of the indirect texture set in the texture buffer 1 and the normal texture shown in the middle part of FIG. A component is obtained (step S46). Similarly, indirect texture mapping is performed based on the B (blue) component of the indirect texture set in the texture buffer 1 and the normal texture shown in the lower part of FIG. 23, and after gamma correction according to the B component of the original image. The B component is obtained (Step S47).
[0151]
Next, the R, G, and B components after the gamma correction are drawn and displayed on the frame buffer (step S48). As a result, an image obtained by performing gamma correction on the original image is displayed. Finally, it is determined whether or not the game is over (frame update). If the game is not over, the process returns to step S41 and shifts to the processing of the next frame.
[0152]
When the gamma correction curves are the same among the R, G, and B components, it is also possible to use a texture having the same gradient (ramp) as the normal texture in FIG.
[0153]
2.5 Halation effect processing
In the present embodiment, an image effect of halation, which makes the area around a part (bright part) exposed to intense light blur white, is realized by a conversion process using indirect texture mapping.
[0154]
That is, in the present embodiment, the luminance of each pixel of the original image (the Y component when RGB is converted to YUV) is converted to an α value using indirect texture mapping. Specifically, in FIG. 3, the luminance of the original image is set in the indirect texture storage unit 177, and conversion data for converting the luminance into the α value is set in the normal texture storage unit 178. Then, the luminance of the original image is converted into an α value whose value changes according to the luminance by the conversion processing using indirect texture mapping described with reference to FIG. That is, the luminance is converted into an α value such that the α value approaches 0.0 (transparent) as the luminance is lower, and approaches 1.0 (opaque) as the luminance is higher.
[0155]
By performing the conversion process using the indirect texture mapping in this way, as shown by G1 in FIG. 24, values corresponding to the luminances BRA, BRB, BRC, and BRD of the pixels A, B, C, and D of the original image are obtained. , Α values αA, αB, αC, and αD of each pixel are set, and an α plane as shown by G2 is generated. More specifically, for a pixel having a higher luminance, for example, the α value is set closer to 1.0. As a result, a pixel having a higher luminance has a higher blurred image synthesis ratio.
[0156]
Then, as shown by G3 in FIG. 24, based on the generated α plane (α value set for each pixel), α synthesis of the original image shown in FIG. Expressions (4), (5), and (6) are added. By performing the addition α blending, a so-called “overexposure” can be expressed.
[0157]
As described above, by performing α synthesis of the original image and the blurred image based on the α value set in accordance with the brightness, for example, a halation image in which the periphery of a bright portion (white portion) such as a cloud becomes a blurred image is obtained. Can be generated, and a realistic image that looks as if taken with a real camera can be generated.
[0158]
FIG. 25 shows a flowchart of a specific example of the halation effect process.
[0159]
First, objects such as backgrounds and characters to be displayed in the frame are drawn in a frame buffer to generate an original image as shown in FIG. 7 (step S51). Then, it is determined whether or not the halation process is to be performed (step S52), and if not, the process proceeds to step S63.
[0160]
When performing the halation processing, a texture buffer 1 (24 bits) having the same size as the frame buffer is secured (step S53). Similarly, a texture buffer 2 (24 bits) of 1/64 size of the frame buffer and a texture buffer 3 (8 bits) of the same size as the frame buffer are secured (steps S54 and S55).
[0161]
Next, the color components (RGB planes) of the original image (FIG. 7) in the frame buffer are copied to the texture buffer 1 (step S56). The luminance component (Y plane) of the original image in the frame buffer is copied to the texture buffer 3 (indirect texture storage unit) while reducing the size to に (step S57). As a result, the image shown in the left corner of FIG. As a luminance component of the original image, a Y component when RGB of the original image is converted into YUV can be adopted.
[0162]
Next, based on the indirect texture (luminance of the original image) set in the texture buffer 3 (indirect texture storage unit) and the normal (gradient) texture shown in FIG. 26 prepared in advance, FIGS. The indirect texture mapping described in (1) is performed to obtain an α value αP1 corresponding to the luminance of the original image (step S58). That is, the conversion shown in G1 and G2 in FIG. 24 is performed to obtain the plane of αP1 shown in G3. The plane of αP1 is a plane in which αP1 approaches 0 (transparent) as the brightness of an object (eg, a character) decreases, and αP1 approaches 1 (opaque) as the brightness of an object (eg, a cloud) increases.
[0163]
Next, while reducing the texture (color component) of the texture buffer 1 to 1/64, it is multiplied by αP1 (multiplied by αP1) and drawn in the frame buffer (step S59). Then, the color components of the 1/64 size image drawn in the frame buffer are copied to the texture buffer 2 (step S60). The texture (color component) of the texture buffer 1 is drawn in the frame buffer (step S61).
[0164]
Next, the texture (color component) of the texture buffer 2 is increased by 64 times by bilinear interpolation (texel interpolation) to generate an image in which the bright portion is white and blurred, and is added to the frame buffer. Is drawn and displayed by [alpha] synthesis (step S62). As a result, an image expressing halation as shown in FIG. 28 is displayed. That is, as is clear from the comparison between the images of FIG. 28 and FIG. 7, in FIG. 28, the outline of the image of the white portion such as a cloud becomes a blurred image, and halation is expressed. Finally, it is determined whether or not the game is over (frame update). If the game is not over, the process returns to step S51 and shifts to processing of the next frame.
[0165]
By changing the normal texture (ramp texture) used in step 58 according to the passage of time or the like, an image whose focus position changes in real time can be generated.
[0166]
3. Hardware configuration
FIG. 29 shows an example of a hardware configuration capable of realizing the present embodiment.
[0167]
The main processor 900 operates based on a program stored in a CD 982 (information storage medium), a program transferred via the communication interface 990, or a program stored in the ROM 950, and performs game processing, image processing, sound processing, and the like. Execute
[0168]
The coprocessor 902 assists the processing of the main processor 900, has a multiply-accumulate unit or a divider capable of high-speed parallel operation, and executes a matrix operation (vector operation) at high speed. For example, when a process such as a matrix operation is required for a physical simulation for moving or moving an object (motion), a program operating on the main processor 900 instructs the coprocessor 902 to perform the process (request ).
[0169]
The geometry processor 904 performs geometry processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation. The geometry processor 904 includes a multiply-accumulator and a divider capable of high-speed parallel computation, and performs matrix computation (vector computation). Run fast. For example, when performing processing such as coordinate transformation, perspective transformation, and light source calculation, a program operating on the main processor 900 instructs the geometry processor 904 to perform the processing.
[0170]
The data decompression processor 906 decodes (decompresses) the compressed image data and sound data, and accelerates the decoding process of the main processor 900. Thus, a moving image compressed by the MPEG method or the like can be displayed on the opening screen, the intermission screen, the ending screen, the game screen, or the like.
[0171]
The rendering processor 910 performs high-speed rendering (rendering) of an object composed of primitive surfaces such as polygons and curved surfaces. When drawing an object, the main processor 900 uses the DMA controller 970 to pass the drawing data to the drawing processor 910 and, if necessary, transfer the texture to the texture storage unit 924. Then, the drawing processor 910 draws the object on the frame buffer 922 based on the drawing data and the texture while performing hidden surface removal using a Z buffer or the like. The drawing processor 910 also performs α blending (translucent processing), depth queuing, 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.
[0172]
The sound processor 930 includes a multi-channel ADPCM sound source or the like, generates game sounds such as BGM, sound effects, and sounds, and outputs the generated game sounds via a speaker 932. Operation data from the game controller 942, save data and personal data from the memory card 944 are input via the serial interface 940.
[0173]
The ROM 950 stores a system program 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. Note that a hard disk may be used instead of the ROM 950. The RAM 960 is a work area for various processors. The DMA controller 970 controls DMA transfer between a processor and a memory (RAM, VRAM, ROM, etc.). The CD drive 980 performs a process of accessing a CD 982 in which programs, image data, sound data, and the like are stored.
[0174]
The communication interface 990 performs data transfer with the outside via a network. Examples of a network connected to the communication interface 990 include a communication line (analog telephone line, ISDN), a high-speed serial bus, and the like.
[0175]
The processing of each unit (each unit) in the present embodiment may be entirely realized by hardware only, or may be realized only by a program stored in an information storage medium or a program distributed via a communication interface. You may. Alternatively, it may be realized by both hardware and a program.
[0176]
When the processing of each unit of this embodiment is realized by both hardware and a program, a program for causing hardware (computer) to function as each unit of this embodiment is stored in the information storage medium. More specifically, the program instructs the processors 902, 904, 906, 910, 930, etc., which are hardware, to perform processing, and passes data if necessary. Then, each of the processors 902, 904, 906, 910, 930 and the like implements the processing of each unit of the present invention based on the instruction and the passed data.
[0177]
FIG. 30A shows an application example of the present embodiment to an arcade game system. The player enjoys the game by operating the operation unit 1102 while watching the game image projected on the display 1100. A processor, a memory, and the like are mounted on a built-in system board 1106. A program (data) for realizing the processing of each unit of the present embodiment is stored in a memory 1108 which is an information storage medium on the system board 1106. Hereinafter, this program is called a storage program.
[0178]
FIG. 30B shows an application example of the present embodiment to a home game system. In this case, the storage program (storage information) is stored in a CD 1206 or a memory card 1208 or 1209, which is an information storage medium detachable from the main system.
[0179]
FIG. 30C illustrates a system including a host device 1300 and terminals 1304-1 to 1304-n (game machines and mobile phones) connected to the host device 1300 via a network 1302 according to this embodiment. An application example is shown. In this case, the storage program is stored in the information storage medium 1306 (hard disk, magnetic tape device, or the like) of the host device 1300. Further, the processing of each unit of the present embodiment may be realized by distributed processing of the host device and the terminal.
[0180]
The present invention is not limited to the embodiments described above, and various modifications can be made.
[0181]
For example, a term (frame buffer, fog color / blurred image color) cited as a broad or synonymous term (drawing buffer, given color, texel interpolation, pixel data, alpha synthesis, etc.) in the description or drawings. , Bilinear interpolation, color / α value / Z value / brightness, α blending / additional α blending, etc.) can be replaced with other terms in the description or drawings in a broad or synonymous manner.
[0182]
Further, in the invention according to the dependent claims of the present invention, a configuration in which some of the constituent elements of the dependent claims are omitted may be adopted. In addition, a main part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.
[0183]
Also, the conversion process of the pixel data of the original image is not limited to the one described in the present embodiment, and various conversion processes equivalent thereto are also included in the scope of the present invention.
[0184]
Further, the present invention can be applied to various games (fighting games, competition games, shooting games, robot battle games, sports games, role playing games, etc.).
[0185]
The present invention is also applied to various image generation systems (game systems) such as arcade game systems, home game systems, large attraction systems in which many players participate, simulators, multimedia terminals, and system boards for generating game images. Applicable.
[Brief description of the drawings]
FIG. 1 is an example of a functional block diagram of an image generation system according to an embodiment.
FIGS. 2A and 2B are explanatory diagrams of indirect texture mapping. FIG.
FIG. 3 is an explanatory diagram of a conversion process of pixel data using indirect texture mapping.
FIGS. 4A to 4D are explanatory diagrams of pixel data conversion processing using indirect texture mapping.
FIG. 5 is an explanatory diagram of a method of combining the color of the original image and the fog color with the α value obtained by converting the Z value of the original image.
FIG. 6 is an explanatory diagram of a fog uneven image generation method.
FIG. 7 is an example of an original image.
FIG. 8 is an example of an uneven fog pattern.
FIG. 9 is an example of a normal texture (conversion data) for fog unevenness.
FIG. 10 is an example of an image obtained by multiplying an α value according to a Z value by an uneven pattern.
FIG. 11 is an example of a fog unevenness image generated according to the embodiment.
FIG. 12 is an explanatory diagram of a method of synthesizing a plurality of α unevenness setting α values having different uneven patterns in a virtual plane.
FIGS. 13A and 13B are explanatory diagrams of a method of combining a plurality of α unevenness setting α values having different uneven patterns in a virtual plane.
FIGS. 14A and 14B are explanatory diagrams of a method of changing an uneven pattern based on virtual camera information.
FIG. 15 is a flowchart of a specific example of fog unevenness effect processing.
FIG. 16 is an explanatory diagram of a method of combining an original image and a blurred image using an α value set according to a Z value to generate a depth of field image.
FIG. 17 is a flowchart of a specific example of depth-of-field effect processing;
FIG. 18 is an example of an α plane obtained by conversion.
FIG. 19 is an example of a depth-of-field image generated by the embodiment.
FIGS. 20A and 20B are examples of conversion characteristics of gamma correction and negative / positive inversion.
FIGS. 21A, 21B, and 21C are examples of conversion characteristics of posterization, solarization, and binarization.
FIG. 22 is a flowchart of a specific example of gamma correction effect processing.
FIG. 23 is an example of a normal texture (conversion data) for gamma correction.
FIG. 24 is an explanatory diagram of a method of generating a halation image by synthesizing an original image and a blurred image using an α value set according to luminance.
FIG. 25 is a flowchart of a specific example of halation effect processing.
FIG. 26 is an example of a normal texture for halation (conversion data).
FIG. 27 is an example of a luminance component of an original image.
FIG. 28 is an example of a halation image generated according to the present embodiment.
FIG. 29 is a hardware configuration example.
FIGS. 30A, 30B, and 30C are examples of various types of systems.
[Explanation of symbols]
100 processing unit, 110 object space setting unit,
112 movement / motion processing unit, 114 virtual camera control unit,
120 image generation unit, 122 hidden surface removal unit,
123 texture mapping unit, 124 indirect texture setting unit,
125 normal texture setting unit, 126 α value synthesizing unit, 127 color synthesizing unit,
130 sound generation unit, 160 operation unit, 170 storage unit,
172 drawing buffer, 174 Z buffer, 176 texture storage unit,
177 indirect texture setting unit, 178 normal texture setting unit,
180 information storage medium, 190 display unit,
192 sound output unit, 194 portable information storage device, 196 communication unit

Claims (23)

画像生成を行う画像生成システムであって、
間接テクスチャのテクセルデータを記憶する間接テクスチャ記憶部と、
通常テクスチャのテクセルデータを記憶する通常テクスチャ記憶部と、
描画対象ピクセルのテクスチャ座標で指定される間接テクスチャのテクセルデータを、前記間接テクスチャ記憶部から読み出し、読み出されたテクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から通常テクスチャのテクセルデータを読み出し、読み出されたテクセルデータに基づいて、描画対象ピクセルの描画処理を行うテクスチャマッピング部と、
元画像のピクセルデータを、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定する間接テクスチャ設定部と、
ピクセルデータを変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定する通常テクスチャ設定部とを含み、
前記テクスチャマッピング部が、
前記間接テクスチャ記憶部から読み出された元画像のピクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から前記変換用データを読み出し、読み出された変換用データに基づいて描画対象ピクセルの描画処理を行うことで、元画像のピクセルデータの変換処理を行うことを特徴とする画像生成システム。
An image generation system that performs image generation,
An indirect texture storage unit that stores texel data of the indirect texture,
A normal texture storage unit for storing texel data of the normal texture,
The texel data of the indirect texture specified by the texture coordinates of the pixel to be drawn is read from the indirect texture storage unit, and the normal texture storage unit reads out the texel data of the normal texture based on the texture coordinates specified by the read texel data. A texture mapping unit that reads texel data and performs a drawing process of a pixel to be drawn based on the read texel data;
An indirect texture setting unit that sets the pixel data of the original image in the indirect texture storage unit as texel data of the indirect texture,
A normal texture setting unit that sets conversion data for converting pixel data in the normal texture storage unit as texel data of a normal texture,
The texture mapping unit,
The conversion data is read from the normal texture storage unit based on the texture coordinates specified by the pixel data of the original image read from the indirect texture storage unit, and the drawing target is read based on the read conversion data. An image generation system, which performs conversion processing of pixel data of an original image by performing pixel drawing processing.
請求項1において、
前記間接テクスチャ設定部が、
元画像のZ値を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
Z値をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像のZ値をα値に変換することを特徴とする画像生成システム。
In claim 1,
The indirect texture setting unit,
Setting the Z value of the original image in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
The conversion data for converting the Z value to the α value is set in the normal texture storage unit as texel data of the normal texture,
The texture mapping unit,
An image generation system for converting a Z value of an original image into an α value by the conversion processing by indirect texture mapping.
請求項2において、
元画像のZ値を前記変換処理により変換することで得られた第1のα値と、各ピクセルのα値が仮想プレーン内で不均一に設定されるαむら設定用α値とを合成して、第2のα値を生成するα値合成部と、
元画像の各ピクセルの色と所与の色とを、前記第2のα値に基づいて合成する色合成部を含むことを特徴とする画像生成システム。
In claim 2,
The first α value obtained by converting the Z value of the original image by the conversion processing is combined with the α unevenness setting α value in which the α value of each pixel is set unevenly in the virtual plane. An α value synthesizing unit for generating a second α value;
An image generation system, comprising: a color synthesizing unit that synthesizes a color of each pixel of an original image and a given color based on the second α value.
請求項3において、
前記α値合成部が、
仮想プレーン内でのむら模様が異なる複数のαむら設定用α値を合成して、前記第1のα値の合成対象となるαむら設定用α値を生成することを特徴とする画像生成システム。
In claim 3,
The α-value synthesizing unit,
An image generation system comprising: combining a plurality of α unevenness setting α values having different unevenness patterns in a virtual plane to generate an α unevenness setting α value to be synthesized with the first α value.
請求項3又は4において、
前記α値合成部が、
仮想カメラ情報及び時間情報の少なくとも一方に応じて、αむら設定用α値の仮想プレーン内でのむら模様を変化させることを特徴とする画像生成システム。
In claim 3 or 4,
The α-value synthesizing unit,
An image generation system characterized by changing an uneven pattern in a virtual plane of an α value for α unevenness setting according to at least one of virtual camera information and time information.
請求項5において、
前記α値合成部が、
αむら設定用α値に対応する仮想プレーンについての仮想カメラからの仮想距離が小さくなるほど、αむら設定用α値のむら模様を拡大することを特徴とする画像生成システム。
In claim 5,
The α-value synthesizing unit,
An image generation system characterized in that, as the virtual distance from a virtual camera with respect to a virtual plane corresponding to an α unevenness setting α value becomes smaller, an uneven pattern of the α unevenness setting α value is enlarged.
請求項2乃至6のいずれかにおいて、
元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像のZ値を前記変換処理により変換することで得られたα値に基づいて合成する色合成部を含むことを特徴とする画像生成システム。
In any one of claims 2 to 6,
The color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image are synthesized based on the α value obtained by converting the Z value of the original image by the conversion processing. An image generation system comprising a color synthesizing unit.
請求項1乃至7のいずれかにおいて、
前記間接テクスチャ設定部が、
元画像の色を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
元画像の色を変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像の色を変換することを特徴とする画像生成システム。
In any one of claims 1 to 7,
The indirect texture setting unit,
The color of the original image is set in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
Conversion data for converting the color of the original image is set as the normal texture texel data in the normal texture storage unit,
The texture mapping unit,
An image generation system, wherein the color of an original image is converted by the conversion processing by indirect texture mapping.
請求項8において、
変換用データを用いた元画像の色の変換が、ガンマ補正、ネガポジ反転、ポスタリゼーション、ソラリゼーション、2値化の変換の少なくとも1つであることを特徴とする画像生成システム。
In claim 8,
An image generation system, wherein the color conversion of the original image using the conversion data is at least one of gamma correction, negative / positive inversion, posterization, solarization, and binarization conversion.
請求項1乃至9のいずれかにおいて、
前記間接テクスチャ設定部が、
元画像の輝度を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
元画像の輝度をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像の輝度をα値に変換することを特徴とする画像生成システム。
In any one of claims 1 to 9,
The indirect texture setting unit,
The luminance of the original image is set in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
Conversion data for converting the luminance of the original image into an α value is set in the normal texture storage unit as texel data of a normal texture,
The texture mapping unit,
An image generation system, wherein the luminance of an original image is converted to an α value by the conversion processing by indirect texture mapping.
請求項10において、
元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像の輝度を前記変換処理により変換することで得られたα値に基づいて合成する色合成部を含むことを特徴とする画像生成システム。
In claim 10,
A color that combines the color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image based on the α value obtained by converting the luminance of the original image by the conversion processing. An image generation system including a synthesis unit.
画像を生成するためのプログラムであって、
間接テクスチャのテクセルデータを記憶する間接テクスチャ記憶部と、
通常テクスチャのテクセルデータを記憶する通常テクスチャ記憶部と、
描画対象ピクセルのテクスチャ座標で指定される間接テクスチャのテクセルデータを、前記間接テクスチャ記憶部から読み出し、読み出されたテクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から通常テクスチャのテクセルデータを読み出し、読み出されたテクセルデータに基づいて、描画対象ピクセルの描画処理を行うテクスチャマッピング部と、
元画像のピクセルデータを、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定する間接テクスチャ設定部と、
ピクセルデータを変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定する通常テクスチャ設定部として、
コンピュータを機能させ、
前記テクスチャマッピング部が、
前記間接テクスチャ記憶部から読み出された元画像のピクセルデータにより特定されるテクスチャ座標に基づいて、前記通常テクスチャ記憶部から前記変換用データを読み出し、読み出された変換用データに基づいて描画対象ピクセルの描画処理を行うことで、元画像のピクセルデータの変換処理を行うことを特徴とするプログラム。
A program for generating an image,
An indirect texture storage unit that stores texel data of the indirect texture,
A normal texture storage unit for storing texel data of the normal texture,
The texel data of the indirect texture specified by the texture coordinates of the pixel to be drawn is read from the indirect texture storage unit, and the normal texture storage unit reads out the texel data of the normal texture based on the texture coordinates specified by the read texel data. A texture mapping unit that reads texel data and performs a drawing process of a pixel to be drawn based on the read texel data;
An indirect texture setting unit that sets the pixel data of the original image in the indirect texture storage unit as texel data of the indirect texture,
Conversion data for converting pixel data, as a normal texture setting unit to set the normal texture storage unit as texel data of the normal texture,
Let the computer work,
The texture mapping unit,
The conversion data is read from the normal texture storage unit based on the texture coordinates specified by the pixel data of the original image read from the indirect texture storage unit, and the drawing target is read based on the read conversion data. A program for performing conversion processing of pixel data of an original image by performing pixel drawing processing.
請求項12において、
前記間接テクスチャ設定部が、
元画像のZ値を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
Z値をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像のZ値をα値に変換することを特徴とするプログラム。
In claim 12,
The indirect texture setting unit,
Setting the Z value of the original image in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
The conversion data for converting the Z value to the α value is set in the normal texture storage unit as texel data of the normal texture,
The texture mapping unit,
A program for converting a Z value of an original image into an α value by the conversion processing by indirect texture mapping.
請求項13において、
元画像のZ値を前記変換処理により変換することで得られた第1のα値と、各ピクセルのα値が仮想プレーン内で不均一に設定されるαむら設定用α値とを合成して、第2のα値を生成するα値合成部と、
元画像の各ピクセルの色と所与の色とを、前記第2のα値に基づいて合成する色合成部として、
コンピュータを機能させることを特徴とするプログラム。
In claim 13,
The first α value obtained by converting the Z value of the original image by the conversion processing is combined with the α unevenness setting α value in which the α value of each pixel is set unevenly in the virtual plane. An α value synthesizing unit for generating a second α value;
As a color combining unit that combines the color of each pixel of the original image and a given color based on the second α value,
A program that causes a computer to function.
請求項14において、
前記α値合成部が、
仮想プレーン内でのむら模様が異なる複数のαむら設定用α値を合成して、前記第1のα値の合成対象となるαむら設定用α値を生成することを特徴とするプログラム。
In claim 14,
The α-value synthesizing unit,
A program for combining a plurality of α unevenness setting α values having different uneven patterns in a virtual plane to generate an α unevenness setting α value to be synthesized with the first α value.
請求項14又は15において、
前記α値合成部が、
仮想カメラ情報及び時間情報の少なくとも一方に応じて、αむら設定用α値の仮想プレーン内でのむら模様を変化させることを特徴とするプログラム。
In claim 14 or 15,
The α-value synthesizing unit,
A program for changing an uneven pattern in a virtual plane of an α value for α unevenness setting according to at least one of virtual camera information and time information.
請求項16において、
前記α値合成部が、
αむら設定用α値に対応する仮想プレーンについての仮想カメラからの仮想距離が小さくなるほど、αむら設定用α値のむら模様を拡大することを特徴とするプログラム。
In claim 16,
The α-value synthesizing unit,
A non-transitory computer-readable storage medium storing a program for enlarging an uneven pattern of an α-value for α-irregularity setting as a virtual distance from a virtual camera for a virtual plane corresponding to the α-value for α-irregularity setting becomes smaller.
請求項13乃至17のいずれかにおいて、
元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像のZ値を前記変換処理により変換することで得られたα値に基づいて合成する色合成部として、
コンピュータを機能させることを特徴とするプログラム。
In any one of claims 13 to 17,
The color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image are synthesized based on the α value obtained by converting the Z value of the original image by the conversion processing. As a color synthesis unit,
A program that causes a computer to function.
請求項12乃至18のいずれかにおいて、
前記間接テクスチャ設定部が、
元画像の色を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
元画像の色を変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像の色を変換することを特徴とするプログラム。
In any one of claims 12 to 18,
The indirect texture setting unit,
The color of the original image is set in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
Conversion data for converting the color of the original image is set as the normal texture texel data in the normal texture storage unit,
The texture mapping unit,
A program for converting a color of an original image by the conversion processing by indirect texture mapping.
請求項19において、
変換用データを用いた元画像の色の変換が、ガンマ補正、ネガポジ反転、ポスタリゼーション、ソラリゼーション、2値化の変換の少なくとも1つであることを特徴とするプログラム。
In claim 19,
A program characterized in that the color conversion of the original image using the conversion data is at least one of gamma correction, negative / positive inversion, posterization, solarization, and binarization conversion.
請求項12乃至20のいずれかにおいて、
前記間接テクスチャ設定部が、
元画像の輝度を、間接テクスチャのテクセルデータとして前記間接テクスチャ記憶部に設定し、
前記通常テクスチャ設定部が、
元画像の輝度をα値に変換するための変換用データを、通常テクスチャのテクセルデータとして前記通常テクスチャ記憶部に設定し、
前記テクスチャマッピング部が、
間接テクスチャマッピングによる前記変換処理により、元画像の輝度をα値に変換することを特徴とするプログラム。
In any one of claims 12 to 20,
The indirect texture setting unit,
The luminance of the original image is set in the indirect texture storage unit as texel data of the indirect texture,
The normal texture setting unit,
Conversion data for converting the luminance of the original image into an α value is set in the normal texture storage unit as texel data of a normal texture,
The texture mapping unit,
A program for converting the luminance of an original image into an α value by the conversion processing by indirect texture mapping.
請求項21において、
元画像の各ピクセルの色と、元画像に基づき生成されたぼかし画像の各ピクセルの色とを、元画像の輝度を前記変換処理により変換することで得られたα値に基づいて合成する色合成部として機能させることを特徴とするプログラム。
In claim 21,
A color that combines the color of each pixel of the original image and the color of each pixel of the blurred image generated based on the original image based on the α value obtained by converting the luminance of the original image by the conversion processing. A program characterized by functioning as a synthesizing unit.
コンピュータ読み取り可能な情報記憶媒体であって、請求項12乃至22のいずれかのプログラムを記憶したことを特徴とする情報記憶媒体。An information storage medium readable by a computer, wherein the information storage medium stores the program according to any one of claims 12 to 22.
JP2003131575A 2003-05-09 2003-05-09 Image generating system, program, and information storage medium Withdrawn JP2004334661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003131575A JP2004334661A (en) 2003-05-09 2003-05-09 Image generating system, program, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003131575A JP2004334661A (en) 2003-05-09 2003-05-09 Image generating system, program, and information storage medium

Publications (1)

Publication Number Publication Date
JP2004334661A true JP2004334661A (en) 2004-11-25

Family

ID=33506709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003131575A Withdrawn JP2004334661A (en) 2003-05-09 2003-05-09 Image generating system, program, and information storage medium

Country Status (1)

Country Link
JP (1) JP2004334661A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007140842A (en) * 2005-11-17 2007-06-07 Namco Bandai Games Inc Program, information storage medium, and image generation system
JP2007272356A (en) * 2006-03-30 2007-10-18 Namco Bandai Games Inc Program, information storage medium and image generation system
JP2008242619A (en) * 2007-03-26 2008-10-09 Samii Kk Image generation device and image generation program
JP2008257127A (en) * 2007-04-09 2008-10-23 Toppan Printing Co Ltd Image display device and image display method
JP2009500878A (en) * 2005-04-11 2009-01-08 ヒューマンアイズ テクノロジーズ リミテッド Depth illusion digital imaging
JP2009015263A (en) * 2007-07-09 2009-01-22 Nintendo Co Ltd Image processing program and image processing device
JP2009145941A (en) * 2007-12-11 2009-07-02 Konami Digital Entertainment Co Ltd Image processor, control method and program of image processor
JP2010224733A (en) * 2009-03-23 2010-10-07 Yamaha Corp Rendering device and program
JP2015172924A (en) * 2014-02-18 2015-10-01 パナソニックIpマネジメント株式会社 Image processor and image processing method
CN112316434A (en) * 2020-11-16 2021-02-05 腾讯科技(深圳)有限公司 Loading method and device of terrain map, mobile terminal and storage medium
WO2022085479A1 (en) * 2020-10-23 2022-04-28 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program
JP2022524889A (en) * 2019-09-11 2022-05-10 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Image rendering methods, equipment, equipment and computer programs

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009500878A (en) * 2005-04-11 2009-01-08 ヒューマンアイズ テクノロジーズ リミテッド Depth illusion digital imaging
JP2007140842A (en) * 2005-11-17 2007-06-07 Namco Bandai Games Inc Program, information storage medium, and image generation system
JP2007272356A (en) * 2006-03-30 2007-10-18 Namco Bandai Games Inc Program, information storage medium and image generation system
JP2008242619A (en) * 2007-03-26 2008-10-09 Samii Kk Image generation device and image generation program
JP2008257127A (en) * 2007-04-09 2008-10-23 Toppan Printing Co Ltd Image display device and image display method
US8421795B2 (en) 2007-07-09 2013-04-16 Nintendo Co., Ltd. Storage medium having image processing program stored thereon and image processing apparatus
JP2009015263A (en) * 2007-07-09 2009-01-22 Nintendo Co Ltd Image processing program and image processing device
JP2009145941A (en) * 2007-12-11 2009-07-02 Konami Digital Entertainment Co Ltd Image processor, control method and program of image processor
JP2010224733A (en) * 2009-03-23 2010-10-07 Yamaha Corp Rendering device and program
JP2015172924A (en) * 2014-02-18 2015-10-01 パナソニックIpマネジメント株式会社 Image processor and image processing method
JP2022524889A (en) * 2019-09-11 2022-05-10 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Image rendering methods, equipment, equipment and computer programs
JP7270760B2 (en) 2019-09-11 2023-05-10 ▲騰▼▲訊▼科技(深▲セン▼)有限公司 Image rendering method, apparatus, equipment and computer program
US11833424B2 (en) 2019-09-11 2023-12-05 Tencent Technology (Shenzhen) Company Limited Image rendering method and apparatus, device and storage medium
WO2022085479A1 (en) * 2020-10-23 2022-04-28 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program
CN112316434A (en) * 2020-11-16 2021-02-05 腾讯科技(深圳)有限公司 Loading method and device of terrain map, mobile terminal and storage medium

Similar Documents

Publication Publication Date Title
JP2006318389A (en) Program, information storage medium, and image generation system
JP4804120B2 (en) Program, information storage medium, and image generation system
JP2004334661A (en) Image generating system, program, and information storage medium
JP4187188B2 (en) Image generation system, program, and information storage medium
JP4305903B2 (en) Image generation system, program, and information storage medium
WO2001055970A1 (en) Game system and image creating method
JP4223244B2 (en) Image generation system, program, and information storage medium
JP3449993B2 (en) Image generation system, program, and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP4159082B2 (en) Image generation system, program, and information storage medium
JP2007272356A (en) Program, information storage medium and image generation system
JP2006011539A (en) Program, information storage medium, and image generating system
JP2001143099A (en) Image-forming system and information storage medium
JP3467259B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP4656616B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP4656617B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP2007087425A (en) Image generation system, program and information storage medium
JP4704615B2 (en) Image generation system, program, and information storage medium
JP4056035B2 (en) Image generation system, program, and information storage medium
JP4913898B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
GB2432499A (en) Image generation of objects distant from and near to a virtual camera
JP4476040B2 (en) Program, information storage medium, and image generation system
JP2010033302A (en) Image generation system, program and information storage medium
JP2008077406A (en) Image generation system, program, and information storage medium
JP2006277488A (en) Program, information storage medium and image generation system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060801