JP2006318389A - Program, information storage medium, and image generation system - Google Patents

Program, information storage medium, and image generation system Download PDF

Info

Publication number
JP2006318389A
JP2006318389A JP2005142822A JP2005142822A JP2006318389A JP 2006318389 A JP2006318389 A JP 2006318389A JP 2005142822 A JP2005142822 A JP 2005142822A JP 2005142822 A JP2005142822 A JP 2005142822A JP 2006318389 A JP2006318389 A JP 2006318389A
Authority
JP
Japan
Prior art keywords
fog
value
color
depth
original image
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
JP2005142822A
Other languages
Japanese (ja)
Inventor
Takashi Imakire
隆 今給黎
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.)
Bandai Namco Entertainment Inc
Original Assignee
Namco Bandai Games Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Bandai Games Inc filed Critical Namco Bandai Games Inc
Priority to JP2005142822A priority Critical patent/JP2006318389A/en
Publication of JP2006318389A publication Critical patent/JP2006318389A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, information storage medium, and image generation system capable of expressing various fog effects according to various situations. <P>SOLUTION: The program is used for generating an image of an object space seen from a virtual camera. The program makes a computer function as an original image generating section 122 for generating an original image by drawing an object while shading, a fog information setting section 124 for setting the fog color and α value according to the depth value based on the depth value of the original image, and an α blending section 126 for blending the color of the original image and the fog color according to the depth value based on the α value according to the depth value. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、プログラム、情報記憶媒体、及び画像生成システムに関する。   The present invention relates to a program, an information storage medium, and an image generation system.

従来より、キャラクタなどのオブジェクトが配置設定されるオブジェクト空間内(仮想的な3次元空間)において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。   Conventionally, an image generation system (game system) that generates an image that can be viewed from a virtual camera (a given viewpoint) in an object space (virtual three-dimensional space) in which an object such as a character is set is known. It is popular as a place to experience so-called virtual reality.

このような画像生成システムでは、霧、もや、煙、ホコリなどのフォグ(fog)が掛かった場面を表示する場合がある。この場合には、プレーヤの仮想現実感を向上させるために、仮想カメラ(視点)からの距離に応じてフォグ濃度を変化させ、現実世界のフォグ特性を表現することが望ましい。このようなフォグ濃度の制御を行う技術としては、特開2003−323630号公報に開示される従来技術がある。
特開2003−323630号公報
In such an image generation system, a scene with fog such as fog, haze, smoke, and dust may be displayed. In this case, in order to improve the player's virtual reality, it is desirable to change the fog density according to the distance from the virtual camera (viewpoint) to express the real world fog characteristics. As a technique for controlling the fog density, there is a conventional technique disclosed in Japanese Patent Laid-Open No. 2003-323630.
JP 2003-323630 A

しかしながら、従来の画像生成システムでは、フォグの変化はα値(フォグの乗り具合)で制御するのみであり、フォグ効果による画像表現には限界があった。   However, in the conventional image generation system, the change in fog is only controlled by the α value (fog riding condition), and there is a limit to the image expression by the fog effect.

本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、種々のシチュエーションに応じた様々なフォグ効果を表現することができるプログラム、情報記憶媒体及び画像生成システムを提供することにある。   The present invention has been made in view of the problems as described above, and an object thereof is a program, an information storage medium, and an image generation system capable of expressing various fog effects according to various situations. Is to provide.

(1)本発明は、オブジェクト空間を仮想カメラから見た画像を生成する画像生成システムであって、オブジェクト空間を仮想カメラから見た画像を生成するためのプログラムであって、陰面消去を行いながらオブジェクトを描画して元画像を生成する元画像生成部と、前記元画像の奥行き値に基づいて、該奥行き値に応じたフォグ色とα値とを設定するフォグ情報設定部と、前記元画像の色と前記奥行き値に応じたフォグ色とを前記奥行き値に応じたα値に基づいてブレンディングするαブレンディング部と、を含むことを特徴とする画像生成システムに関係する。   (1) The present invention is an image generation system that generates an image of an object space viewed from a virtual camera, and is a program for generating an image of the object space viewed from a virtual camera while performing hidden surface removal. An original image generation unit that generates an original image by drawing an object, a fog information setting unit that sets a fog color and an α value according to the depth value based on the depth value of the original image, and the original image And an α blending unit for blending the color of the color and the fog color corresponding to the depth value based on the α value corresponding to the depth value.

また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。   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 unit.

本発明において、奥行き値とは、Zバッファに格納された元画像のZ値や、該Z値を変換した距離情報とすることができる。   In the present invention, the depth value can be the Z value of the original image stored in the Z buffer, or distance information obtained by converting the Z value.

本発明によれば、フォグ濃度を制御するパラメータであるα値と、フォグ色を制御するためのパラメータであるフォグ色(例えば、R、G、B成分)とを、元画像の奥行き値に応じて変化させる。そして、元画像の色と、元画像の奥行き値に応じたフォグ色とを、元画像の奥行き値に応じたα値に基づいてブレンディングする。これにより、元画像の奥行き値に応じてフォグ濃度とフォグ色が変化するフォグ効果が施された画像を生成することができる。   According to the present invention, the α value that is a parameter for controlling the fog density and the fog color (for example, R, G, and B components) that is a parameter for controlling the fog color are set according to the depth value of the original image. Change. Then, the color of the original image and the fog color corresponding to the depth value of the original image are blended based on the α value corresponding to the depth value of the original image. Thereby, it is possible to generate an image with a fog effect in which the fog density and the fog color change according to the depth value of the original image.

(2)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(1)の発明において、前記フォグ情報設定部が、手前側の奥行き値用の第1のフォグ色から奥側の奥行き値用の第2のフォグ色へと、前記フォグ色が前記元画像の奥行き値に応じてグラデーション変化するように前記フォグ色を設定するようにしてもよい。
(2) In the image generation system, program, and information storage medium according to the present invention,
In the invention of (1), the fog information setting section changes the first fog color for the depth value on the near side from the first fog color for the depth value on the near side to the second fog color for the depth value on the far side. The fog color may be set so that the gradation changes according to the depth value.

本発明によれば、仮想カメラから見て手前側から奥側に行くにつれ、第1のフォグ色から第2のフォグ色へとフォグ色がグラデーション変化するフォグ効果が表現された画像を生成することができる。   According to the present invention, as the virtual camera is viewed from the near side to the far side, an image expressing a fog effect in which the fog color changes in gradation from the first fog color to the second fog color is generated. Can do.

ここで、手前側の奥行き値と奥側の奥行き値との間の奥行き値に対応するフォグ色は、第1のフォグ色と第2のフォグ色とを奥行き値に応じて補間することにより、奥行き値に応じてグラデーション変化するフォグ色とすることができる。例えば、第1のフォグ色が青色で、第2のフォグ色が赤色の場合には、中間色として紫色が設定され、仮想カメラから見て手前側から奥側に行くにつれ、青、紫、赤へとグラデーション変化するフォグ効果が表現された画像を生成することができる。   Here, the fog color corresponding to the depth value between the depth value on the near side and the depth value on the back side is obtained by interpolating the first fog color and the second fog color according to the depth value, The fog color can be changed in gradation according to the depth value. For example, when the first fog color is blue and the second fog color is red, purple is set as the intermediate color, and the color changes from blue to purple and red as it goes from the near side to the far side as viewed from the virtual camera. It is possible to generate an image in which a fog effect with gradation changes is expressed.

これにより、例えば、仮想カメラから奥側に夕日を見る画像を生成する場合に、奥側では夕焼けの影響を強く受けた赤色のフォグを発生させ、手前側では夕焼けの影響をあまり受けない青色のフォグを発生させることができ、擬似的に光の散乱スペクトルを表現することができる。なお、第1のフォグ色と第2のフォグ色の補間の手法は線形補間等、種々の手法を適用することができる。   As a result, for example, when generating an image that looks at the sunset from the virtual camera, a red fog that is strongly affected by the sunset is generated on the back, and a blue fog that is not significantly affected by the sunset on the front is generated. Fog can be generated and a light scattering spectrum can be expressed in a pseudo manner. Note that various methods such as linear interpolation can be applied to the interpolation method of the first fog color and the second fog color.

(3)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(2)の発明において、前記フォグ情報設定部が、フォグ変化開始深度とフォグ変化終了深度との間で、前記α値が前記元画像の奥行き値に応じて変化するようにα値を設定するとともに、前記フォグ変化開始深度と前記フォグ変化終了深度との間で、前記フォグ色が前記元画像の奥行き値に応じてグラデーション変化するように前記フォグ色を設定するようにしてもよい。
(3) In the image generation system, the program, and the information storage medium according to the present invention,
In the invention of (2), the fog information setting unit sets the α value so that the α value changes according to the depth value of the original image between the fog change start depth and the fog change end depth. At the same time, the fog color may be set so that the fog color changes in gradation according to the depth value of the original image between the fog change start depth and the fog change end depth.

本発明において、フォグ変化開始深度とは、フォグ効果の変化を開始させる奥行き値をいい、フォグ変化終了深度とは、フォグ変化開始深度から開始させたフォグ効果の変化を終了させる奥行き値をいう。   In the present invention, the fog change start depth refers to a depth value at which the fog effect change starts, and the fog change end depth refers to a depth value at which the fog effect change started from the fog change start depth ends.

本発明によれば、α値を変化させるフォグ変化開始深度とフォグ変化終了深度との間で、第1のフォグ色から第2のフォグ色へとフォグ色をグラデーション変化させることができ、種々のシチュエーションに応じた様々なフォグ効果を表現することができる。   According to the present invention, the fog color can be gradation-changed from the first fog color to the second fog color between the fog change start depth and the fog change end depth for changing the α value. Various fog effects according to the situation can be expressed.

(4)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(1)の発明において、前記フォグ情報設定部が、フォグ変化開始深度とフォグ変化終了深度との間で、前記α値が前記元画像の奥行き値に応じて変化するようにα値を設定するようにしてもよい。
(4) In the image generation system, the program, and the information storage medium according to the present invention,
In the invention of (1), the fog information setting unit sets an α value such that the α value changes according to a depth value of the original image between a fog change start depth and a fog change end depth. You may do it.

本発明によれば、フォグ変化開始深度とフォグ変化終了深度との間では、奥行き値に応じてフォグ濃度を変化させることができ、例えば、現実のフォグ特性を反映したリアルなフォグ効果を表現することができる。   According to the present invention, the fog density can be changed according to the depth value between the fog change start depth and the fog change end depth, for example, a realistic fog effect reflecting actual fog characteristics is expressed. be able to.

(5)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(3)、(4)の発明のいずれかにおいて、前記フォグ情報設定部が、前記フォグ変化開始深度より手前側の奥行き値に対応するα値を第1のα値にクランプ設定し、前記フォグ変化終了深度より奥側の奥行き値に対応するα値を第2のα値にクランプ設定するようにしてもよい。
(5) In the image generation system, the program, and the information storage medium according to the present invention,
In any one of the inventions of (3) and (4), the fog information setting unit clamps and sets an α value corresponding to a depth value closer to the fog change start depth to a first α value, and the fog information The α value corresponding to the depth value on the back side from the change end depth may be clamped to the second α value.

(6)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(1)〜(5)の発明のいずれかにおいて、
前記フォグ情報設定部が、前記元画像の最遠景に相当する奥行き値より手前側の奥行き値でフォグ濃度が最小となるようにα値を設定するようにしてもよい。
(6) In the image generation system, the program, and the information storage medium according to the present invention,
In any one of the inventions of (1) to (5),
The fog information setting unit may set the α value so that the fog density is minimized at a depth value closer to the depth value corresponding to the farthest view of the original image.

本発明において、最遠景とは、描画対象となるオブジェクト空間のうち、最も仮想カメラからの距離が遠い部分をいう。また、フォグ濃度が最小となるようにα値を設定する奥行き値は、元画像の最遠景に相当する奥行き値より手前側の所定範囲の奥行き値とすることができる。   In the present invention, the farthest view refers to a portion of the object space to be drawn that is farthest from the virtual camera. Also, the depth value for setting the α value so that the fog density is minimized can be a depth value in a predetermined range on the near side of the depth value corresponding to the farthest view of the original image.

本発明によれば、最遠景にフォグをかけないようにすることができ、例えば、最遠景に背景スプライト等を設定して空を表現するような場合でも、背景スプライトにまでフォグがかかってしまうことを防止することができる。   According to the present invention, it is possible to prevent the farthest view from being fogged. For example, even when a background sprite or the like is set for the farthest view to express the sky, the background sprite is fogged. This can be prevented.

(7)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
(1)〜(6)の発明のいずれかにおいて、インデックス番号とフォグ色及びα値とを対応付けるインデックスカラー・テクスチャマッピング用のルックアップテーブルを記憶する記憶部を更に含み、前記フォグ情報設定部が、前記元画像の奥行き値を前記ルックアップテーブルのインデックス番号として扱い、該ルックアップテーブルを用いて仮想オブジェクトに対してインデックスカラー・テクスチャマッピングを行って、前記奥行き値に応じたフォグ色とα値とを設定するようにしてもよい。
(7) In the image generation system, the program, and the information storage medium according to the present invention,
In any one of the inventions (1) to (6), the image processing apparatus further includes a storage unit that stores a lookup table for index color / texture mapping that associates an index number with a fog color and an α value, and the fog information setting unit includes: , Treating the depth value of the original image as an index number of the lookup table, performing index color / texture mapping on the virtual object using the lookup table, and the fog color and α value corresponding to the depth value And may be set.

本発明によれば、テクスチャ記憶部に実際の色情報(例えば24ビットの色情報)を記憶する必要が無くなるため、テクスチャ記憶部の使用記憶容量を大幅に節約して、奥行き値に応じたフォグ色とα値とを設定することができる。   According to the present invention, since it is not necessary to store actual color information (for example, 24-bit color information) in the texture storage unit, the use storage capacity of the texture storage unit can be greatly saved, and the fog corresponding to the depth value can be saved. Color and alpha value can be set.

(8)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、陰面消去を行いながらオブジェクトを描画して元画像を生成する元画像生成部と、インデックス番号とフォグ色及びα値とを対応付けるインデックスカラー・テクスチャマッピング用のルックアップテーブルを記憶する記憶部と、前記元画像の奥行き値を前記ルックアップテーブルのインデックス番号として扱い、該ルックアップテーブルを用いて仮想オブジェクトに対してインデックスカラー・テクスチャマッピングを行って、前記奥行き値に応じたフォグ色とα値とを設定するテクスチャマッピング部と、前記元画像の色と前記フォグ色とを前記奥行き値に応じたα値に基づいてαブレンディングするαブレンディング部とを含むようにしてもよい。   (8) In the image generation system, the program, and the information storage medium according to the present invention, an original image generation unit that generates an original image by drawing an object while performing hidden surface removal, an index number, a fog color, and an α value A storage unit for storing a lookup table for index color / texture mapping to be associated, a depth value of the original image as an index number of the lookup table, and an index color for a virtual object using the lookup table A texture mapping unit that performs texture mapping and sets a fog color and an α value according to the depth value; and α blending based on the α value according to the depth value between the color of the original image and the fog color And an α blending portion to be included.

以下、本実施形態について図面を用いて説明する。   Hereinafter, the present embodiment will be described with reference to the drawings.

なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.

1.構成
図1に、本実施形態の画像生成システム(ゲームシステム)の機能ブロック図の一例を示す。なお同図において本実施形態は、少なくとも処理部100内の音生成部130以外を含めばよく(或いは処理部100と記憶部170を含めばよく)、それ以外の各部(機能ブロック)については任意の構成要素とすることができる。
1. Configuration FIG. 1 shows an example of a functional block diagram of an image generation system (game system) of the present embodiment. In this figure, the present embodiment only needs to include at least the sound generation unit 130 in the processing unit 100 (or include the processing unit 100 and the storage unit 170), and the other units (functional blocks) are optional. It can be made into the component of.

操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、シフトレバー、アクセルペダル、ブレーキペダル、マイク、センサー、或いは筺体などのハードウェアにより実現できる。   The operation unit 160 is for a player to input operation data, and the function can be realized by hardware such as a lever, a button, a steering, a shift lever, an accelerator pedal, a brake pedal, a microphone, a sensor, or a housing. .

記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどのハードウェアにより実現できる。   The storage unit 170 serves as a work area such as the processing unit 100 or the communication unit 196, and its function can be realized by hardware such as a RAM.

情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などのハードウェアにより実現できる。処理部100は、この情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。即ち情報記憶媒体180には、本実施形態の各部(各手段)としてコンピュータを機能させるためのプログラム(各部をコンピュータに実現させるためのプログラム)が記憶(記録、格納)される。   The information storage medium 180 (computer-readable medium) stores programs, data, and the like, and functions as an optical disk (CD, DVD), magneto-optical disk (MO), magnetic disk, hard disk, and magnetic tape. Alternatively, it can be realized by hardware such as a memory (ROM). The processing unit 100 performs various processes of this embodiment based on a program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores (records and stores) a program for causing the computer to function as each unit (each unit) of the present embodiment (a program for causing the computer to implement each unit).

表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、或いはHMD(ヘッドマウントディスプレイ)などのハードウェアにより実現できる。   The display unit 190 outputs an image generated according to the present embodiment, and the function thereof can be realized by hardware such as a CRT, LCD, or HMD (head mounted display).

音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどのハードウェアにより実現できる。   The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by hardware such as a speaker or headphones.

携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などを考えることができる。   The portable information storage device 194 stores player personal data, game save data, and the like. As the portable information storage device 194, a memory card, a portable game device, and the like can be considered.

通信部196は、外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。   The communication unit 196 performs various controls for communicating with the outside (for example, a host device or other image generation system), and functions thereof are hardware such as various processors or a communication ASIC, It can be realized by a program.

なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180(記憶部170)に配信するようにしてもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含まれる。   Note that a program (data) for causing a computer to function as each unit of this embodiment is distributed from the information storage medium of the host device (server) to the information storage medium 180 (storage unit 170) via the network and communication unit 196. You may do it. Use of such an information storage medium of the host device (server) is also included in the scope of the present invention.

処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの各種の処理を行う。この場合、処理部100は、記憶部170内の主記憶部172をワーク領域として使用して、各種の処理を行う。この処理部100の機能は、各種プロセッサ(CPU、DSP等)又はASIC(ゲートアレイ等)などのハードウェアや、プログラム(ゲームプログラム)により実現できる。   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. In this case, the processing unit 100 performs various processes using the main storage unit 172 in the storage unit 170 as a work area. The function of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.) or ASIC (gate array, etc.) and a program (game program).

処理部100は、移動・動作処理部110、オブジェクト空間設定部112、仮想カメラ制御部114、画像生成部120、音生成部130を含む。なお、処理部100は、これらの各部(機能ブロック)を全て含む必要はなく、その一部を省略してもよい。   The processing unit 100 includes a movement / motion processing unit 110, an object space setting unit 112, a virtual camera control unit 114, an image generation unit 120, and a sound generation unit 130. Note that the processing unit 100 does not need to include all these units (functional blocks), and some of them may be omitted.

移動・動作処理部110は、オブジェクト(移動体)の移動情報(位置、回転角度)や動作情報(オブジェクトの各パーツの位置、回転角度)を求める処理を行う。即ち、操作部160によりプレーヤが入力した操作データやゲームプログラムなどに基づいて、オブジェクトを移動させたり動作(モーション、アニメーション)させたりする処理を行う。   The movement / motion processing unit 110 performs processing for obtaining movement information (position, rotation angle) and motion information (position, rotation angle of each part of the object) of the object (moving body). That is, based on operation data input by the player through the operation unit 160, a game program, or the like, processing for moving an object or moving (motion, animation) is performed.

オブジェクト空間設定部112は、移動体(キャラクタ、車、戦車、ロボット)、柱、壁、建物、マップ(地形)などの各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間内に配置設定するための処理を行う。より具体的には、ワールド座標系でのオブジェクトの位置や回転角度(方向)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転)でオブジェクトを配置する。   The object space setting unit 112 includes various objects (polygons, free-form surfaces, subdivision surfaces, etc.) such as moving objects (characters, cars, tanks, robots), columns, walls, buildings, maps (terrain), and the like. A process for arranging and setting (object) in the object space is performed. More specifically, the position and rotation angle (direction) of the object in the world coordinate system are determined, and the rotation angle (rotation around the X, Y, and Z axes) is determined at that position (X, Y, Z). Arrange objects.

仮想カメラ制御部114は、オブジェクト空間内に設定される仮想カメラを制御する処理を行う。即ち、仮想カメラの位置(X、Y、Z)又は回転(X、Y、Z軸回りでの回転)などの仮想カメラ情報を求め、仮想カメラを制御する(視点位置や視線方向を制御する)。   The virtual camera control unit 114 performs processing for controlling a virtual camera set in the object space. That is, virtual camera information such as the position (X, Y, Z) or rotation (rotation around the X, Y, Z axes) of the virtual camera is obtained, and the virtual camera is controlled (controls the viewpoint position and line-of-sight direction). .

例えば、仮想カメラにより移動オブジェクトを後方から撮影する場合には、移動オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転(仮想カメラの方向)を制御することが望ましい。この場合には、移動・動作処理部110で得られた移動オブジェクトの位置、方向又は速度などの情報に基づいて、仮想カメラを制御することになる。或いは、仮想カメラを、予め決められた移動経路で移動させながら予め決められた角度で回転させるようにしてもよい。この場合には、仮想カメラの位置(移動経路)や回転角度を特定するためのカメラ経路情報を予め用意しておき、このカメラ経路情報に基づいて仮想カメラを制御する。   For example, when a moving object is photographed from behind with a virtual camera, the position or rotation (direction of the virtual camera) of the virtual camera may be controlled so that the virtual camera follows changes in the position or rotation of the moving object. desirable. In this case, the virtual camera is controlled based on information such as the position, direction, or speed of the moving object obtained by the movement / motion processing unit 110. Alternatively, the virtual camera may be rotated at a predetermined angle while being moved along a predetermined movement route. In this case, camera path information for specifying the position (movement path) and rotation angle of the virtual camera is prepared in advance, and the virtual camera is controlled based on the camera path information.

画像生成部120は、処理部100で行われる種々の処理の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。特に、本実施の形態では、オブジェクトにフォグがかかったオブジェクト空間を仮想カメラから見た画像を生成する。   The image generation unit 120 performs drawing processing based on the results of various processes performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. In particular, in the present embodiment, an image in which an object space in which an object is fogged is viewed from a virtual camera is generated.

画像生成部120が含む元画像生成部122は、例えば、いわゆる3次元のゲーム画像を生成する場合には、まず、座標変換、クリッピング処理、透視変換或いは光源処理等のジオメトリ処理を行い、その処理結果に基づいて、描画データ(プリミティブ面の頂点(構成点)に付与される位置座標、テクスチャ座標、色(輝度)データ、法線ベクトル或いは癇l等)を作成する。そして、この描画データ(プリミティブ面データ)に基づいて、ジオメトリ処理後のオブジェクト(1又は複数プリミティブ面)の画像を、描画バッファ174(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できるバッファ)に描画する。   For example, when generating a so-called three-dimensional game image, the original image generation unit 122 included in the image generation unit 120 first performs geometric processing such as coordinate conversion, clipping processing, perspective conversion, or light source processing. Based on the result, drawing data (position coordinates, texture coordinates, color (luminance) data, normal vector or 癇 l, etc.) given to the vertex (component point) of the primitive surface is created. Based on the drawing data (primitive surface data), an image of the object (one or a plurality of primitive surfaces) after the geometry processing is stored in a drawing buffer 174 (frame buffer, work buffer, or other image information in units of pixels). ) To draw.

また、元画像生成部122は、テクスチャ記憶部178に記憶されるテクスチャをオブジェクト(プリミティブ面)にマッピングするための処理を行う。   Further, the original image generation unit 122 performs processing for mapping the texture stored in the texture storage unit 178 to the object (primitive surface).

また、元画像生成部122は、Z値(奥行き値)が格納されるZバッファ176(奥行きバッファ)を用いて、Zバッファ法(奥行き比較法)により陰面消去を行いながらオブジェクトを描画バッファ174に描画して元画像を生成する。そして、元画像のZ値は、この描画処理の際に行われるZバッファ法(奥行き比較法)により、Zバッファ176上に格納(生成)される。   In addition, the original image generation unit 122 uses the Z buffer 176 (depth buffer) in which the Z value (depth value) is stored, and performs the hidden surface removal by the Z buffer method (depth comparison method) while the object is stored in the drawing buffer 174. Render to generate the original image. The Z value of the original image is stored (generated) on the Z buffer 176 by the Z buffer method (depth comparison method) performed at the time of the drawing process.

なお、本実施形態のZ値は、Zバッファ176のZ値(カメラ座標系のZ座標軸のZ値)そのものであってもよいし、このZ値と数学的に均等なパラメータであってもよい。例えば、Zバッファ176のZ値の逆数に相当するパラメータや、Zバッファ176のZ値に所与の変換処理を施すことで得られるパラメータであってもよい。   The Z value of the present embodiment may be the Z value of the Z buffer 176 (Z value of the Z coordinate axis of the camera coordinate system) itself, or may be a parameter mathematically equivalent to this Z value. . For example, it may be a parameter corresponding to a reciprocal of the Z value of the Z buffer 176 or a parameter obtained by applying a given conversion process to the Z value of the Z buffer 176.

画像生成部120が含むフォグ情報設定部124は、Zバッファ176に格納された元画像の各画素のZ値及び該Z値を変換した距離情報を含む奥行き値に基づいて、該奥行き値に応じたフォグ色とα値とを設定する。例えば、フォグ情報設定部124をテクスチャマッピング部124として機能させ、LUT記憶部179に記憶されるインデックスカラー・テクスチャマッピング用のLUT(ルックアップテーブル)を用いてテクスチャマッピングを行うことにより、元画像の各画素の奥行き値に応じたフォグ色とα値とを設定するができる。   The fog information setting unit 124 included in the image generation unit 120 responds to the depth value based on the Z value of each pixel of the original image stored in the Z buffer 176 and the depth value including the distance information obtained by converting the Z value. Set the fog color and alpha value. For example, by causing the fog information setting unit 124 to function as the texture mapping unit 124 and performing texture mapping using an index color / texture mapping LUT (lookup table) stored in the LUT storage unit 179, A fog color and an α value corresponding to the depth value of each pixel can be set.

この場合、LUT記憶部179が、インデックス番号とフォグ色及びα値とを対応付けるインデックスカラー・テクスチャマッピング用のルックアップテーブルを記憶し、テクスチャマッピング部(フォグ情報設定部)124が、元画像の奥行き値をルックアップテーブルのインデックス番号として扱い、該ルックアップテーブルを用いて仮想オブジェクト(例えば表示画面サイズのスプライト、ポリゴン)に対してインデックスカラー・テクスチャマッピングを行って、元画像の各画素の奥行き値に応じたフォグ色とα値とを設定する。   In this case, the LUT storage unit 179 stores an index color / texture mapping lookup table that associates the index number with the fog color and the α value, and the texture mapping unit (fog information setting unit) 124 stores the depth of the original image. The value is treated as an index number of the lookup table, and index color / texture mapping is performed on a virtual object (for example, display screen size sprite, polygon) using the lookup table, and the depth value of each pixel of the original image Set the fog color and α value according to.

ここで、インデックスカラー・テクスチャマッピング用のルックアップテーブルが256色として設定されている場合には、フォグ情報設定部124が、Zバッファの元画像のZ値を0〜255までの256段階の距離情報に変換して、これをインデックス番号として扱うようにしてもよい。   When the lookup table for index color / texture mapping is set as 256 colors, the fog information setting unit 124 sets the Z value of the original image in the Z buffer to a 256-step distance from 0 to 255. It may be converted into information and handled as an index number.

なお、フォグ情報設定部124は、入力情報に基づき、LUT記憶部179が記憶するルックアップテーブルLUTに格納されている情報の対応関係を変化させるようにしてもよい。これにより、奥行き値に応じて様々な態様で変化するフォグ色、α値を設定し、種々のシチュエーションに応じたフォグ効果を表現することができる。   The fog information setting unit 124 may change the correspondence relationship of information stored in the lookup table LUT stored in the LUT storage unit 179 based on the input information. As a result, fog colors and α values that change in various manners according to the depth value can be set, and fog effects according to various situations can be expressed.

画像生成部120が含むαブレンディング部126は、元画像の色と元画像の奥行き値に応じたフォグ色とを、元画像の奥行き値に応じたα値に基づいてブレンディングする処理(αブレンディング処理、広義には元画像の奥行き値に応じたα値に基づく画像生成処理)を行う。この場合のαブレンディング処理としては、通常αブレンディング、加算αブレンディング或いは減算αブレンディングなどがある。例えば通常αブレンディングの場合には下式の処理を行う。   The α blending unit 126 included in the image generation unit 120 performs processing for blending the color of the original image and the fog color corresponding to the depth value of the original image based on the α value corresponding to the depth value of the original image (α blending processing). In a broad sense, image generation processing based on an α value corresponding to the depth value of the original image is performed. The α blending process in this case includes normal α blending, addition α blending, subtraction α blending, and the like. For example, in the case of normal α blending, the following processing is performed.

=(1−α)×R+α×R
=(1−α)×G+α×G
=(1−α)×B+α×B
一方、加算αブレンディングの場合には下式の処理を行う。
R Q = (1−α) × R 1 + α × R 2
G Q = (1−α) × G 1 + α × G 2
B Q = (1−α) × B 1 + α × B 2
On the other hand, in the case of addition α blending, the following processing is performed.

=R+α×R
=G+α×G
=B+α×B
また、減算αブレンディングの場合には下式の処理を行う。
R Q = R 1 + α × R 2
G Q = G 1 + α × G 2
B Q = B 1 + α × B 2
In the case of subtractive α blending, the following processing is performed.

=R−α×R
=G−α×G
=B−α×B
ここで、R、G、Bは、描画バッファ174(フレームバッファ)に既に描画されている画像(元画像)のRGB成分であり、R、G、Bは、描画バッファ174に描画すべき画像のRGB成分である。また、R、G、Bは、αブレンディングにより得られる画像のRGB成分である。なおα値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、半透明度(透明度、不透明度と等価)情報、マスク情報、或いはバンプ情報などとして使用できる。本実施の形態では、R、G、Bにフォグ色のR、G、B成分を設定して上記のようなαブレンディング処理を行うことで、元画像にフォグ(霧、雲、湯気、もや、ほこり、ちり、煙、竜巻又は露等)が掛かった画像を生成できる。
R Q = R 1 −α × R 2
G Q = G 1 −α × G 2
B Q = B 1 −α × B 2
Here, R 1 , G 1 , B 1 are RGB components of an image (original image) already drawn in the drawing buffer 174 (frame buffer), and R 2 , G 2 , B 2 are drawing buffers 174. Are RGB components of the image to be drawn. R Q , G Q , and B Q are RGB components of an image obtained by α blending. The α value is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as translucency (equivalent to transparency and opacity) information, mask information, or bump information. In the present embodiment, by R 2, G 2, B 2 in fog color of R, by setting G, B components performing α blending processing such as described above, fog (mist original image, clouds, steam , Haze, dust, dust, smoke, tornado or dew).

音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。   The sound generation unit 130 performs sound processing based on the results of various processes performed by the processing unit 100, generates game sounds such as BGM, sound effects, or sounds, and outputs the game sounds to the sound output unit 192.

なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、このようなシングルプレーヤモードのみならず、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。   Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or not only the single player mode but also a multiplayer mode in which a plurality of players can play. The system may also be provided.

また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて生成してもよい。   Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated using a plurality of terminals (game machine, mobile phone).

2.本実施形態の手法
次に本実施形態の手法について図面を用いて説明する。なお、以下では、フォグの表現に本実施形態の手法を適用した場合を主に例にとり説明するが、本実施形態の手法は、フォグ以外の画像表現に適用することも可能である。
2. Next, the method of this embodiment will be described with reference to the drawings. In the following, the case where the method of the present embodiment is applied to fog expression will be mainly described as an example, but the method of the present embodiment can also be applied to image representation other than fog.

2.1 距離に応じたフォグ濃度とフォグ色の変化
オブジェクト空間において仮想カメラから見える画像を生成する場合に、よりリアルなフォグ効果を表現するためには、仮想カメラ(視点)からの距離に応じてフォグ濃度を変化させることが望ましい。即ち、仮想カメラからの距離が遠くなるほどフォグ濃度を濃くする。加えて、仮想カメラ(視点)からの距離に応じてフォグ色をも変化させれば、天候や時間帯等、種々のシチュエーションに応じた様々なフォグ効果を表現することができる。
2.1 Change in fog density and fog color according to distance When generating an image that can be seen from a virtual camera in object space, in order to express a more realistic fog effect, depending on the distance from the virtual camera (viewpoint) It is desirable to change the fog density. That is, the fog density increases as the distance from the virtual camera increases. In addition, if the fog color is changed according to the distance from the virtual camera (viewpoint), various fog effects corresponding to various situations such as weather and time zone can be expressed.

そして、このようにフォグ濃度とフォグ色とを変化させるためには、フォグ濃度を制御するパラメータであるα値と、フォグ色を制御するためのパラメータであるフォグ色の成分、例えばR、G、B成分を、仮想カメラからの距離に応じて変化させることが望ましい。即ち、仮想カメラからの距離が遠くなるほどフォグ濃度が濃くなるようにα値を制御するとともに、フォグ色が変化するようにR、G、B成分を制御する。   In order to change the fog density and the fog color in this way, an α value that is a parameter for controlling the fog density and a fog color component that is a parameter for controlling the fog color, for example, R, G, It is desirable to change the B component 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, and the R, G, and B components are controlled so that the fog color changes.

そこで本実施形態では、仮想カメラからの距離パラメータであるZ値(ZバッファのZ値)に基づいて、α値とフォグ色のR、G、B成分に変換する手法を採用している。具体的には図2のA1に示すように、まず元画像(描画バッファ上に描画された画像)のZ値ZPを奥行き距離情報D(仮想カメラからの距離情報、元画像のZ値を変換することで得られる第2のZ値)に変換する。本実施の形態では、元画像のZ値ZPを、仮想カメラから見て手前側に対応する0から、奥側に対応する255までの256段階の奥行き距離情報Dに変換する。そして、A2に示すように、奥行き距離情報Dをα値αPとフォグ色FCPに変換する。   Therefore, in the present embodiment, a method of converting the α value and the R, G, and B components of the fog color based on the Z value (Z value of the Z buffer) that is a distance parameter from the virtual camera is employed. Specifically, as shown by A1 in FIG. 2, first, the Z value ZP of the original image (image drawn on the drawing buffer) is converted into the depth distance information D (distance information from the virtual camera, the Z value of the original image). To the second Z value obtained by doing so. In the present embodiment, the Z value ZP of the original image is converted into 256-step depth distance information D from 0 corresponding to the near side when viewed from the virtual camera to 255 corresponding to the back side. Then, as shown in A2, the depth distance information D is converted into an α value αP and a fog color FCP.

そして図2のA3に示すように、元画像の色ICP(RGB、YUV等)と、フォグ色(白、青、赤等)FCPとを、αPに基づいてαブレンディングする。これにより、仮想カメラからの距離に応じてフォグ濃度とフォグ色が変化するフォグ効果が施されたフォグ処理後画像(完成画像)を生成することができる。   Then, as shown by A3 in FIG. 2, the original image color ICP (RGB, YUV, etc.) and the fog color (white, blue, red, etc.) FCP are α-blended based on αP. As a result, it is possible to generate a post-fogging image (completed image) with a fog effect in which the fog density and the fog color change according to the distance from the virtual camera.

なお、ZバッファのZ値を奥行き距離情報Dに変換する際には、仮想スクリーン位置に対応するZ値と最遠景に対応するZ値との間で、奥行き距離情報Dの最小値及び最大値を任意に設定することができる。   When the Z value of the Z buffer is converted into the depth distance information D, the minimum value and the maximum value of the depth distance information D between the Z value corresponding to the virtual screen position and the Z value corresponding to the farthest view. Can be set arbitrarily.

2.2 インデックスカラー・テクスチャマッピングによるフォグ画像の生成
そして本実施形態では、図2のA2に示す、奥行き距離情報Dをα値αPとフォグ色FCPに変換する処理を、インデックスカラー・テクスチャマッピングを有効利用して実現している。
2.2 Generation of fog image by index color / texture mapping In this embodiment, the process of converting depth distance information D into α value αP and fog color FCP shown in A2 of FIG. Realized by effective use.

通常のインデックスカラー・テクスチャーマッピングでは、テクスチャ記憶部の使用記憶容量を節約するために、図3のB1に示すように、実際の色情報(RGB)ではなくインデックス番号が、テクスチャの各テクセルに関連づけて記憶される。また、図3のB2に示すように、インデックスカラー・テクスチャマッピング用のLUT(カラーパレット)には、インデックス番号により指定される色情報が記憶される。そして、オブジェクトに対してテクスチャマッピングを行う際には、テクスチャの各テクセルのインデックス番号に基づいてLUTを参照し、対応する色情報をLUTから読み出し、読み出された色情報を描画バッファ(フレームバッファ等)に描画する。   In normal index color / texture mapping, in order to save the storage capacity of the texture storage unit, an index number, not actual color information (RGB), is associated with each texel of the texture as shown in B1 of FIG. Is memorized. Also, as indicated by B2 in FIG. 3, the color information specified by the index number is stored in the index color / texture mapping LUT (color palette). When texture mapping is performed on an object, the LUT is referred to based on the index number of each texture texel, the corresponding color information is read from the LUT, and the read color information is read from the drawing buffer (frame buffer). Etc.).

このようなインデックスカラーモードのテクスチャマッピングでは、LUTを用いない通常モードのテクスチャマッピングに比べて、使用できる色数は少なくなる(例えば256色)。しかしながら、テクスチャ記憶部に実際の色情報(例えば24ビットの色情報)を記憶する必要が無くなるため、テクスチャ記憶部の使用記憶容量を大幅に節約できる。   In such texture mapping in the index color mode, the number of colors that can be used is smaller (for example, 256 colors) than in texture mapping in the normal mode that does not use the LUT. However, since there is no need to store actual color information (for example, 24-bit color information) in the texture storage unit, the used storage capacity of the texture storage unit can be greatly saved.

そこで、本実施形態では、このようなインデックスカラー・テクスチャマッピングを通常とは異なる形態で利用し、奥行き距離情報Dをα値とフォグ色成分に変換している。   Therefore, in the present embodiment, such index color / texture mapping is used in a form different from normal, and the depth distance information D is converted into an α value and a fog color component.

このため本実施形態では、図4のB3に示すように、256段階の奥行き距離情報DをルックアップテーブルLUTのインデックス番号として扱う(奥行き距離情報Dをインデックス番号とみなす)。そして、ルックアップテーブルLUTには、インデックス番号により指定されるフォグ色のR、G、B成分とα値とが格納されている。   For this reason, in this embodiment, as shown by B3 in FIG. 4, the 256-step depth distance information D is handled as the index number of the lookup table LUT (the depth distance information D is regarded as the index number). The look-up table LUT stores the R, G, B components and the α value of the fog color designated by the index number.

そしてB4に示すように、奥行き距離情報Dをインデックス番号として扱いLUTを用いて、仮想オブジェクト(例えば表示画面サイズのスプライト、ポリゴン)に対してインデックスカラー・テクスチャマッピングを行う。これにより、元画像の各画素の奥行き値に応じたα値と、フォグ色のR、G、B成分とを得ることができる。そして、B5に示すように、元画像の色と奥行き値に応じたフォグ色とを、奥行き値に応じたα値に基づいてブレンディングし、フォグ処理後画像を生成する。   Then, as shown in B4, index color / texture mapping is performed on a virtual object (for example, a sprite having a display screen size, a polygon) using the LUT by treating the depth distance information D as an index number. Thereby, the α value corresponding to the depth value of each pixel of the original image and the R, G, and B components of the fog color can be obtained. Then, as shown in B5, the color of the original image and the fog color corresponding to the depth value are blended based on the α value corresponding to the depth value to generate an image after fog processing.

特に、本実施の形態では、図5に示すように、ルックアップテーブルLUTには、仮想カメラから見て手前側の奥行き値用の第1のフォグ色と、奥側の奥行き値用の第2のフォグ色とが、元画像の奥行き値に応じてグラデーション変化するように、フォグ色のR、G、B成分が記憶されている。図5のルックアップテーブルLUTの例では、手前側の奥行き距離情報Dに対応するインデックス番号0には、手前側の奥行き値用のフォグ色として青色(R=0、G=0、B=255)が対応付けられ、奥側の奥行き距離情報Dに対応するインデックス番号255には、奥側の奥行き値用のフォグ色として赤色(R=255、G=0、B=0)が対応付けられている。そして、手前側から奥側に行くにつれ、奥行き値に応じてフォグ色が青色から赤色に次第に変化するようにフォグ色のR、G、B成分の値が格納されている。   In particular, in the present embodiment, as shown in FIG. 5, the look-up table LUT includes a first fog color for the depth value on the near side as viewed from the virtual camera and a second fog value for the depth value on the back side. The fog color R, G, and B components are stored such that the fog color changes in gradation according to the depth value of the original image. In the example of the look-up table LUT in FIG. 5, the index number 0 corresponding to the near side depth distance information D has blue (R = 0, G = 0, B = 255) as the fog color for the near side depth value. ) And the index number 255 corresponding to the depth distance information D on the back side is associated with red (R = 255, G = 0, B = 0) as the fog color for the depth value on the back side. ing. The values of the R, G, and B components of the fog color are stored so that the fog color gradually changes from blue to red according to the depth value from the near side to the far side.

そして、フォグ情報設定部124(テクスチャマッピング部124)は、ルックアップテーブルLUTを用いることにより、元画像の奥行き値に基づいて、手前側の奥行き値用の青色から奥側の奥行き値用の赤色へと、フォグ色が元画像の奥行き値に応じてグラデーション変化するようにフォグ色を設定する。従って、図6に示すように、仮想カメラから見て手前側から奥側に行くにつれ、フォグ色が青、紫、赤へとグラデーション変化するフォグ効果が表現された画像を生成することができる。これにより、例えば、仮想カメラから奥側に夕日を見る画像を生成する場合に、奥側では夕焼けの影響を強く受けた赤色のフォグを発生させ、手前側では夕焼けの影響をあまり受けない青色のフォグを発生させることができ、擬似的に光の散乱スペクトルを表現することができる。   Then, the fog information setting unit 124 (texture mapping unit 124) uses the look-up table LUT, and based on the depth value of the original image, the blue for the depth value on the near side to the red for the depth value on the back side. Next, the fog color is set so that the fog color changes in gradation according to the depth value of the original image. Therefore, as shown in FIG. 6, as the virtual camera is viewed from the near side to the far side, it is possible to generate an image that expresses a fog effect in which the fog color changes from blue to purple to red. As a result, for example, when generating an image that looks at the sunset from the virtual camera, a red fog that is strongly affected by the sunset is generated on the back, and a blue fog that is not significantly affected by the sunset on the front is generated. Fog can be generated and a light scattering spectrum can be expressed in a pseudo manner.

なお、図5の例では、フォグ色のR成分とB成分のみを変化させているが、本実施の形態はこれに限られず、G成分をも変化させて手前側の奥行き値用の第1のフォグ色と奥側の奥行き値用の第2のフォグ色とを設定することができる。例えば、手前側の奥行き距離情報Dに対応するインデックス番号0には、手前側の奥行き値用のフォグ色として白色(R=255、G=255、B=255)を対応付け、奥側の奥行き距離情報Dに対応するインデックス番号255には、奥側の奥行き値用のフォグ色として青色(R=0、G=0、B=255)を対応付けてもよい。そして、手前側から奥側に行くにつれ、奥行き値に応じてフォグ色が白色から青色に次第に変化するようにフォグ色のR、G、B成分の値を設定する。この場合には、例えば、仮想カメラから奥側に地平線を見る画像を生成する場合に、奥側では青空の影響を強く受けた青色のフォグを発生させ、手前側では空気中の塵等の影響を受けた白色のフォグを発生させることができる。   In the example of FIG. 5, only the R component and the B component of the fog color are changed. However, the present embodiment is not limited to this, and the G component is also changed to change the first depth value for the near side. And a second fog color for the depth value on the back side can be set. For example, the index number 0 corresponding to the depth depth information D on the near side is associated with white (R = 255, G = 255, B = 255) as the fog color for the depth value on the near side, and the depth on the far side The index number 255 corresponding to the distance information D may be associated with blue (R = 0, G = 0, B = 255) as the fog color for the depth value on the back side. Then, the values of the R, G, and B components of the fog color are set so that the fog color gradually changes from white to blue according to the depth value from the near side to the far side. In this case, for example, when generating an image in which the horizon is viewed from the back side from the virtual camera, blue fog that is strongly influenced by the blue sky is generated on the back side and the influence of dust in the air is generated on the front side. It is possible to generate white fog.

このように、本実施の形態によれば、手前側の奥行き値用の第1のフォグ色と、奥側の奥行き値用の第2のフォグ色とを任意に設定し、手前側の奥行き値用の第1のフォグ色から奥側の奥行き値用の第2のフォグ色へと、フォグ色が元画像の奥行き値に応じてグラデーション変化するようにフォグ色を設定することにより、天候や時間帯等、種々のシチュエーションに応じた様々なフォグ効果を表現することができる。   Thus, according to the present embodiment, the first fog color for the depth value on the near side and the second fog color for the depth value on the far side are arbitrarily set, and the depth value on the near side is set. By setting the fog color so that the fog color changes in gradation according to the depth value of the original image from the first fog color for the second to the second fog color for the depth value on the back side, the weather and time Various fog effects according to various situations such as bands can be expressed.

なお、図4では、表示画面サイズの仮想オブジェクトに対してテクスチャマッピングを行っているが、表示画面を分割したサイズの仮想オブジェクトに対してテクスチャマッピングを行うようにしてもよい。   In FIG. 4, texture mapping is performed on a virtual object having a display screen size. However, texture mapping may be performed on a virtual object having a size obtained by dividing the display screen.

2.3 Z値とα値とフォグ色のR、G、B成分との関係
図7(A)は、奥行き距離情報D(ルックアップテーブルLUTのインデックス番号)とα値との関係をグラフ化したものである。図7(A)のグラフでは、横軸が奥行き距離情報D(インデックス番号)を表し、0が手前側、255が奥側と対応する。また、縦軸がα値を表し、256段階の値が0.0〜1.0で表されている。
2.3 Relationship between Z Value, α Value, and R, G, and B Components of Fog Color FIG. 7A is a graph showing the relationship between depth distance information D (index number of lookup table LUT) and α value. It is a thing. In the graph of FIG. 7A, the horizontal axis represents depth distance information D (index number), with 0 corresponding to the near side and 255 corresponding to the back side. In addition, the vertical axis represents the α value, and 256 levels are represented by 0.0 to 1.0.

図7(A)に示すように、本実施の形態のルックアップテーブルLUTでは、奥行き距離情報DがD1とD2との間にあるときにα値を変化させている。即ち、フォグ変化を手前側から見た場合には、D1をフォグ変化開始深度とし、D2をフォグ変化終了深度として、フォグ情報設定部124が、フォグ変化開始深度とフォグ変化終了深度との間で、α値が奥行き距離情報Dに応じて変化するようにα値を設定する。これにより、フォグ変化開始深度とフォグ変化終了深度との間では、例えば、奥行き距離情報Dが奥側となるにつれてα値を増加させ、フォグ濃度を濃くすることができ、現実のフォグ特性を反映したリアルなフォグ効果を表現することができる。   As shown in FIG. 7A, in the lookup table LUT according to the present embodiment, the α value is changed when the depth distance information D is between D1 and D2. That is, when the fog change is viewed from the near side, D1 is set as the fog change start depth, D2 is set as the fog change end depth, and the fog information setting unit 124 determines that the fog change start depth and the fog change end depth are between The α value is set so that the α value changes according to the depth distance information D. Thereby, between the fog change start depth and the fog change end depth, for example, the α value can be increased as the depth distance information D becomes deeper, and the fog density can be increased, reflecting the actual fog characteristics. The realistic fog effect can be expressed.

また、図7(A)の例では、フォグ変化開始深度より手前側の奥行き距離情報Dに対応するα値が0.0にクランプし、フォグ変化終了深度より奥側の奥行き距離情報Dに対応するα値が1.0にクランプしている。ここで、α値をクランプさせる値は任意に設定することができる。即ち、フォグ情報設定部124が、フォグ変化開始深度より手前側の奥行き距離情報Dに対応するα値を第1のα値にクランプ設定し、フォグ変化終了深度より奥側の奥行き距離情報Dに対応するα値を第2のα値にクランプ設定する。これにより、フォグ変化開始深度とフォグ変化終了深度との間で、現実のフォグ特性を反映したリアルなフォグ効果を表現することができる。   In the example of FIG. 7A, the α value corresponding to the depth distance information D on the near side from the fog change start depth is clamped to 0.0, and the depth distance information D on the far side from the fog change end depth is supported. The α value to be clamped to 1.0. Here, the value for clamping the α value can be arbitrarily set. That is, the fog information setting unit 124 clamps and sets the α value corresponding to the depth distance information D on the near side from the fog change start depth to the first α value, and sets the depth value information D on the back side from the fog change end depth. The corresponding α value is clamped to the second α value. Thereby, a real fog effect reflecting the actual fog characteristic can be expressed between the fog change start depth and the fog change end depth.

また、図7(A)の例では、元画像の最遠景に相当する奥行き距離情報Dmax(Dmax=255)より手前側の奥行き距離情報DであるD3でα値が最小となっている。即ち、フォグ情報設定部124が、元画像の最遠景に相当する奥行き距離情報Dmaxより手前側の奥行き距離情報D3でフォグ濃度が最小となるようにα値を設定する。これにより、最遠景にフォグをかけないようにすることができ、例えば、最遠景に背景スプライト等を設定して空を表現するような場合でも、背景スプライトにまでフォグがかかってしまうことを防止することができる。   In the example of FIG. 7A, the α value is minimum at D3 which is depth distance information D on the near side of the depth distance information Dmax (Dmax = 255) corresponding to the farthest view of the original image. That is, the fog information setting unit 124 sets the α value so that the fog density is minimized in the depth distance information D3 on the near side of the depth distance information Dmax corresponding to the farthest view of the original image. This prevents fog from being applied to the farthest view.For example, even when a background sprite or the like is set for the farthest view to express the sky, fog is prevented from reaching the background sprite. can do.

また、図7(B)は、奥行き距離情報D(ルックアップテーブルLUTのインデックス番号)とフォグ色のR、G、B成分との関係をグラフ化したものである。図7(B)のグラフでは、横軸が元画像の奥行き距離情報D(インデックス番号)を表し、0が手前側、255が奥側と対応する。また、縦軸がフォグ色のR、G、B成分の値を表し、グラフRが奥行き距離情報Dに応じたR成分の変化を、グラフGが奥行き距離情報Dに応じたG成分の変化(本図の例では0で一定)を、グラフBが奥行き距離情報Dに応じたB成分の変化を表している。   FIG. 7B is a graph showing the relationship between the depth distance information D (index number of the lookup table LUT) and the R, G, B components of the fog color. In the graph of FIG. 7B, the horizontal axis represents the depth distance information D (index number) of the original image, with 0 corresponding to the near side and 255 corresponding to the back side. The vertical axis represents the values of the R, G, and B components of the fog color, the graph R represents the change in the R component according to the depth distance information D, and the graph G represents the change in the G component according to the depth distance information D ( In the example of this figure, the graph B represents a change in the B component according to the depth distance information D.

図7(B)に示すように、本実施の形態ルックアップテーブルLUTでは、奥行き距離情報DがD1とD2との間にあるときに、奥行き距離情報Dが奥側となるにつれてフォグ色のR成分が次第に増加するように、一方、B成分は次第に減少するように、R成分の値とB成分の値とを変化させている。即ち、フォグ情報設定部124が、フォグ変化開始深度とフォグ変化終了深度との間で、α値が奥行き距離情報Dに応じて変化するようにα値を設定するとともに、フォグ変化開始深度とフォグ変化終了深度との間で、フォグ色が奥行き距離情報Dに応じて、手前側用のフォグ色(B成分)から奥側用の第2のフォグ色(R成分)へとグラデーション変化するようにフォグ色を設定する。これにより、フォグ変化開始深度とフォグ変化終了深度との間で、奥行き距離情報Dが奥側となるにつれて手前側用のフォグ色から奥側用のフォグ色へと、フォグ色をグラデーション変化させることができ、天候や時間帯等、種々のシチュエーションに応じた様々なフォグ効果を表現することができる。   As shown in FIG. 7B, in the lookup table LUT according to the present embodiment, when the depth distance information D is between D1 and D2, the fog color R increases as the depth distance information D becomes the back side. On the other hand, the value of the R component and the value of the B component are changed so that the component gradually increases while the B component gradually decreases. That is, the fog information setting unit 124 sets the α value so that the α value changes according to the depth distance information D between the fog change start depth and the fog change end depth, and the fog change start depth and the fog change depth. The fog color changes from the front fog color (B component) to the rear second fog color (R component) according to the depth distance information D between the change end depth and the depth distance information D. Set the fog color. Thereby, the fog color is changed in gradation between the fog color for the near side and the fog color for the far side as the depth distance information D becomes the far side between the fog change start depth and the fog change end depth. It is possible to express various fog effects according to various situations such as weather and time zone.

2.4 ルックアップテーブルLUT情報の変更
また、本実施の形態では、フォグ情報設定部124が、入力情報や所与のプログラムに基づき、ルックアップテーブルLUTに格納されている情報の対応関係を変化させる。即ち、入力情報としてフォグパラメータ設定情報を受け付け、フォグ効果を変化させる。例えば、フォグ変化開始深度とする奥行き距離情報D、フォグ変化終了深度とする奥行き距離情報Dを変化させる。これにより、フォグが変化する範囲を変化させることができる。例えば、フォグが変化する範囲を狭くして、局所的にフォグが変化するフォグ効果を表現することができる。
2.4 Change of Look-up Table LUT Information In the present embodiment, the fog information setting unit 124 changes the correspondence relationship of information stored in the look-up table LUT based on input information and a given program. Let That is, fog parameter setting information is received as input information, and the fog effect is changed. For example, the depth distance information D used as the fog change start depth and the depth distance information D used as the fog change end depth are changed. Thereby, the range in which fog changes can be changed. For example, a fog effect in which the fog changes locally can be expressed by narrowing the range in which the fog changes.

また、フォグ変化開始深度より手前側の奥行き距離情報Dに対応するフォグ色のR、G、B成分の値及びα値、フォグ変化終了深度より奥側の奥行き距離情報Dに対応するフォグ色のR、G、B成分の値及びα値を変化させる。これにより、奥行き距離情報Dに応じたフォグ色の変化特性、フォグ濃度の変化特性を変化させることができる。   Also, the R, G, and B component values and α values of the fog color corresponding to the depth distance information D on the near side from the fog change start depth, and the fog color corresponding to the depth distance information D on the far side from the fog change end depth. The values of R, G, and B components and the α value are changed. Accordingly, the fog color change characteristic and the fog density change characteristic according to the depth distance information D can be changed.

また、α値を0.0とする奥行き距離情報D、インデックス番号として扱う奥行き距離情報Dの範囲を変化させる。これにより、フォグ効果を無くす範囲を変化させることができる。   Further, the range of the depth distance information D having an α value of 0.0 and the depth distance information D handled as an index number is changed. Thereby, the range which eliminates a fog effect can be changed.

3.本実施の形態の処理
次に、本実施の形態の処理を、図8のフローチャートを用いて説明する。
3. Processing of this Embodiment Next, the processing of this embodiment will be described with reference to the flowchart of FIG.

まず、ステップS1において、フォグ変化開始深度とする奥行き距離情報D、フォグ変化終了深度とする奥行き距離情報D、フォグ変化開始深度より手前側の奥行き距離情報Dに対応するフォグ色のR、G、B成分の値及びα値、フォグ変化終了深度より奥側の奥行き距離情報Dに対応するフォグ色のR、G、B成分の値及びα値、α値を0.0とする奥行き距離情報D、インデックス番号として扱う奥行き距離情報Dの範囲等の、入力情報として受け付けたフォグパラメータ設定情報から、インデックス番号(奥行き距離情報D)とフォグ色のR、G、B成分の値及びα値とを対応付けるルックアップテーブルLUTを作成する。   First, in step S1, the depth information D used as the fog change start depth, the depth distance information D used as the fog change end depth, and the fog colors R, G corresponding to the depth distance information D before the fog change start depth, Depth distance information D with the B component value, α value, and fog color R, G, B component values, α value, and α value corresponding to depth distance information D behind the fog change end depth being 0.0 From the fog parameter setting information received as input information, such as the range of the depth distance information D treated as the index number, the index number (depth distance information D), the values of the R, G, and B components of the fog color, and the α value are obtained. A lookup table LUT to be associated is created.

そして、ステップS2において、元画像(透視変換後のオブジェクト)をフレームバッファに描画する。この際に、Zバッファには各画素のZ値が書き込まれることになる。すると、ステップS3において、ZバッファのZ値を256段階の奥行き距離情報Dに変換してワークバッファに格納し、ステップS4において、ワークバッファの奥行き距離情報Dを256色のインデックステクスチャとして設定し、フォグパラメータから作成したルックアップテーブルLUTをインデックステクスカラー・テクスチャチャマッピング用のルックアップテーブルLUTとして設定する。   In step S2, the original image (the object after perspective transformation) is drawn in the frame buffer. At this time, the Z value of each pixel is written in the Z buffer. Then, in step S3, the Z value of the Z buffer is converted into 256 steps of depth distance information D and stored in the work buffer. In step S4, the depth distance information D of the work buffer is set as an index texture of 256 colors, A lookup table LUT created from fog parameters is set as a lookup table LUT for index texture color / texture mapping.

そして、ステップS5において、変換したZバッファに対応する画面の位置にポリゴンを描画する。即ち、ルックアップテーブルLUTによって決定したα値に基づき、ルックアップテーブルLUTによって決定したフォグ色と元画像の色とを線形合成してフレームバッファに書き込む。このとき、下式に従ったαブレンディング処理を行う。   In step S5, a polygon is drawn at the position on the screen corresponding to the converted Z buffer. That is, based on the α value determined by the lookup table LUT, the fog color determined by the lookup table LUT and the color of the original image are linearly synthesized and written to the frame buffer. At this time, α blending processing according to the following equation is performed.

=(1−α)×R+α×R
=(1−α)×G+α×G
=(1−α)×B+α×B
ここで、R、G、Bは、元画像の色(輝度)のR、G、B成分であり、R、G、Bは、フォグ色のR、G、B成分である。こうして、元画像に、元画像の奥行き値に応じたフォグ色を元画像の奥行き値に応じたα値でブレンディングしたフォグ処理後画像を生成する。
R Q = (1−α) × R 1 + α × R 2
G Q = (1−α) × G 1 + α × G 2
B Q = (1−α) × B 1 + α × B 2
Here, R 1 , G 1 , and B 1 are R, G, and B components of the color (luminance) of the original image, and R 2 , G 2 , and B 2 are R, G, and B components of the fog color. is there. In this way, a fog-processed image is generated by blending the fog color corresponding to the depth value of the original image with the α value corresponding to the depth value of the original image.

4.ハードウェア構成
次に、本実施形態を実現できるハードウェアの構成の一例について図9を用いて説明する。
4). Hardware Configuration Next, an example of a hardware configuration capable of realizing the present embodiment will be described with reference to FIG.

メインプロセッサ900は、CD982(情報記憶媒体)に格納されたプログラム、通信インターフェース990を介して転送されたプログラム、或いはROM950(情報記憶媒体の1つ)に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などの種々の処理を実行する。   The main processor 900 operates based on a program stored in the CD 982 (information storage medium), a program transferred via the communication interface 990, or a program stored in the ROM 950 (one of information storage media). Various processes such as processing, image processing, and sound processing are executed.

コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、オブジェクトを移動させたり動作(モーション)させるための物理シミュレーションに、マトリクス演算などの処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。   The coprocessor 902 assists the processing of the main processor 900, has a product-sum calculator and a divider capable of high-speed parallel calculation, and executes matrix calculation (vector calculation) at high speed. For example, if a physical simulation for moving or moving an object requires processing such as matrix operation, a program operating on the main processor 900 instructs (requests) the processing to the coprocessor 902. )

ジオメトリプロセッサ904は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ900で動作するプログラムが、その処理をジオメトリプロセッサ904に指示する。   The geometry processor 904 performs geometry processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation, has a product-sum calculator and a divider capable of high-speed parallel computation, and performs matrix computation (vector computation). Run fast. For example, when processing such as coordinate transformation, perspective transformation, and light source calculation is performed, a program operating on the main processor 900 instructs the geometry processor 904 to perform the processing.

データ伸張プロセッサ906は、圧縮された画像データや音データを伸張するデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする処理を行う。これにより、オープニング画面、インターミッション画面、エンディング画面、或いはゲーム画面などにおいて、MPEG方式等で圧縮された動画像を表示できるようになる。なお、デコード処理の対象となる画像データや音データは、ROM950、CD982に格納されたり、或いは通信インターフェース990を介して外部から転送される。   The data decompression processor 906 performs a decoding process for decompressing the compressed image data and sound data, and a process for accelerating the decoding process of the main processor 900. As a result, a moving image compressed by the MPEG method or the like can be displayed on the opening screen, the intermission screen, the ending screen, or the game screen. Note that the image data and sound data to be decoded are stored in the ROM 950 and the CD 982 or transferred from the outside via the communication interface 990.

描画プロセッサ910は、ポリゴンや曲面などのプリミティブ(プリミティブ面)で構成されるオブジェクトの描画(レンダリング)処理を高速に実行するものである。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970の機能を利用して、オブジェクトデータを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると、描画プロセッサ910は、これらのオブジェクトデータやテクスチャに基づいて、Zバッファなどを利用した陰面消去を行いながら、オブジェクトをフレームバッファ922に高速に描画する。また、描画プロセッサ910は、痺uレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行うことができる。そして、1フレーム分の画像がフレームバッファ922に書き込まれると、その画像はディスプレイ912に表示される。   The drawing processor 910 performs drawing (rendering) processing of an object composed of primitives (primitive surfaces) such as polygons and curved surfaces at high speed. When drawing an object, the main processor 900 uses the function of the DMA controller 970 to pass the object data to the drawing processor 910 and transfer the texture to the texture storage unit 924 if necessary. Then, the rendering processor 910 renders the object in the frame buffer 922 at high speed while performing hidden surface removal using a Z buffer or the like based on the object data and texture. The drawing processor 910 can also perform numbness lending (translucent processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. When an image for one frame is written in the frame buffer 922, the image is displayed on the display 912.

サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などの高品位のゲーム音を生成する。生成されたゲーム音は、スピーカ932から出力される。   The sound processor 930 includes a multi-channel ADPCM sound source and the like, and generates high-quality game sounds such as BGM, sound effects, and sounds. The generated game sound is output from the speaker 932.

ゲームコントローラ942(レバー、ボタン、筺体、パッド型コントローラ又はガン型コントローラ等)からの操作データや、メモリカード944からのセーブデータ、個人データは、シリアルインターフェース940を介してデータ転送される。   Operation data from the game controller 942 (lever, button, chassis, pad type controller, gun type controller, etc.), save data from the memory card 944, and personal data are transferred via the serial interface 940.

ROM950にはシステムプログラムなどが格納される。なお、業務用ゲームシステムの場合には、ROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納されることになる。なお、ROM950の代わりにハードディスクを利用するようにしてもよい。   The ROM 950 stores system programs and the like. In the case of an arcade game system, the ROM 950 functions as an information storage medium, and various programs are stored in the ROM 950. A hard disk may be used instead of the ROM 950.

RAM960は、各種プロセッサの作業領域として用いられる。   The RAM 960 is used as a work area for various processors.

DMAコントローラ970は、プロセッサ、メモリ(RAM、VRAM、ROM等)間でのDMA転送を制御するものである。   The DMA controller 970 controls DMA transfer between the processor and memory (RAM, VRAM, ROM, etc.).

CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。   The CD drive 980 drives a CD 982 (information storage medium) in which programs, image data, sound data, and the like are stored, and enables access to these programs and data.

通信インターフェース990は、ネットワークを介して外部との間でデータ転送を行うためのインターフェースである。この場合に、通信インターフェース990に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどを考えることができる。そして、通信回線を利用することでインターネットを介したデータ転送が可能になる。また、高速シリアルバスを利用することで、他の画像生成システムとの間でのデータ転送が可能になる。   The communication interface 990 is an interface for transferring data to and from the outside via a network. In this case, as a network connected to the communication interface 990, a communication line (analog telephone line, ISDN), a high-speed serial bus, or the like can be considered. By using a communication line, data transfer via the Internet becomes possible. Further, by using the high-speed serial bus, data transfer with other image generation systems becomes possible.

なお、本実施形態の各部(各手段)は、その全てを、ハードウェアのみにより実現してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。   Note that all the units (units) of the present embodiment may be realized only by hardware, or only by a program stored in an information storage medium or a program distributed via a communication interface. May be. Alternatively, it may be realized by both hardware and a program.

そして、本実施形態の各部をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、ハードウェア(コンピュータ)を本実施形態の各部として機能させるためのプログラムが格納されることになる。より具体的には、上記プログラムが、ハードウェアである各プロセッサ902、904、906、910、930等に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ902、904、906、910、930等は、その指示と渡されたデータとに基づいて、本発明の各部を実現することになる。   And when each part of this embodiment is implement | achieved by both hardware and a program, the program for functioning hardware (computer) as each part of this embodiment is stored in an information storage medium. Become. More specifically, the program instructs each processor 902, 904, 906, 910, 930, etc., which is hardware, and passes data if necessary. Each of the processors 902, 904, 906, 910, 930 and the like implements each unit of the present invention based on the instruction and the passed data.

5.変形例
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書中の記載において広義な用語(仮想オブジェクト)として引用された用語(スプライト、ポリゴン等)は、明細書中の他の記載においても広義な用語に置き換えることができる。
5. Modifications The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms (sprites, polygons, etc.) cited as broad terms (virtual objects) in the description in the specification can be replaced with broad terms in other descriptions in the specification.

また、α値のブレンディング手法も、本実施形態で詳細に説明した手法に限定されず、種々の変形実施が可能である。また、α値や色のブレンディング処理は、プレーン単位で行ってもよいし、画素単位で行ってもよい。また、元画像の奥行き値に応じたα値とフォグ色が設定されたフォグ画像を生成し、元画像とフォグ画像とを、フォグ画像のα値に基づいてブレンディングしてもよい。   Also, the blending method of the α value is not limited to the method described in detail in the present embodiment, and various modifications can be made. Further, the blending process of the α value and the color may be performed in units of planes or in units of pixels. Alternatively, a fog image in which an α value and a fog color are set according to the depth value of the original image may be generated, and the original image and the fog image may be blended based on the α value of the fog image.

また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。   In the invention according to the dependent claims of the present invention, a part of the constituent features of the dependent claims can be omitted. Moreover, the principal part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.

また、本発明は種々のゲーム(格闘ゲーム、競争ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、ロールプレイングゲーム等)にも適用することができる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード等の種々の画像生成システム(ゲームシステム)に適用することができる。   The present invention can also be applied to various games (such as fighting games, competitive games, shooting games, robot battle games, sports games, role-playing games, etc.). The present invention is also applicable to various image generation systems (game systems) such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, and a system board for generating game images. Can be applied.

本実施形態の画像生成システムの機能ブロック図の例である。It is an example of a functional block diagram of the image generation system of this embodiment. 元画像のZ値をフォグ情報に変換し、得られたα値で元画像の色とフォグの色をブレンドする手法について説明するための図である。It is a figure for demonstrating the method of converting the Z value of an original image into fog information, and blending the color of an original image, and the color of fog with the obtained (alpha) value. インデックスカラー・テクスチャマッピングについて説明するための図である。It is a figure for demonstrating index color and texture mapping. インデックスカラー・テクスチャマッピングを利用して、Z値をフォグ情報に変換する手法について説明するための図である。It is a figure for demonstrating the method of converting Z value into fog information using an index color texture mapping. 本実施形態のルックアップテーブルの一例である。It is an example of the lookup table of this embodiment. フォグ処理後画像の例を示す図である。It is a figure which shows the example of the image after fog processing. 図7(A)、(B)は、ルックアップテーブルの変換特性の一例について説明するための図である。FIGS. 7A and 7B are diagrams for explaining an example of conversion characteristics of the lookup table. 本実施形態の処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of this embodiment. 本実施形態を実現できるハードウェアの構成の一例を示す図である。It is a figure which shows an example of the structure of the hardware which can implement | achieve this embodiment.

符号の説明Explanation of symbols

ICP 元画像の色
ZP 元画像のZ値
FCP フォグの色
αP フォグのα値
LUT ルックアップテーブル
D 奥行き距離情報
100 処理部
120 画像生成部
122 元画像生成部
124 フォグ情報設定部(テクスチャマッピング部)
126 αブレンディング部
130 音生成部
170 記憶部
172 主記憶部
174 描画バッファ
176 Zバッファ
178 テクスチャ記憶部
179 LUT記憶部
190 表示部
ICP Original image color ZP Original image Z value FCP Fog color αP Fog α value LUT Look-up table D Depth distance information 100 Processing unit 120 Image generation unit 122 Original image generation unit 124 Fog information setting unit (texture mapping unit)
126 α blending unit 130 sound generation unit 170 storage unit 172 main storage unit 174 drawing buffer 176 Z buffer 178 texture storage unit 179 LUT storage unit 190 display unit

Claims (10)

オブジェクト空間を仮想カメラから見た画像を生成するためのプログラムであって、
陰面消去を行いながらオブジェクトを描画して元画像を生成する元画像生成部と、
前記元画像の奥行き値に基づいて、該奥行き値に応じたフォグ色とα値とを設定するフォグ情報設定部と、
前記元画像の色と前記奥行き値に応じたフォグ色とを前記奥行き値に応じたα値に基づいてブレンディングするαブレンディング部として、
コンピュータを機能させることを特徴とするプログラム。
A program for generating an image of an object space viewed from a virtual camera,
An original image generation unit that generates an original image by drawing an object while performing hidden surface removal;
A fog information setting unit that sets a fog color and an α value according to the depth value based on the depth value of the original image;
As an α blending unit for blending the color of the original image and the fog color corresponding to the depth value based on the α value corresponding to the depth value,
A program characterized by causing a computer to function.
請求項1において、
前記フォグ情報設定部が、
手前側の奥行き値用の第1のフォグ色から奥側の奥行き値用の第2のフォグ色へと、前記フォグ色が前記元画像の奥行き値に応じてグラデーション変化するように前記フォグ色を設定することを特徴とするプログラム。
In claim 1,
The fog information setting unit
The fog color is changed from the first fog color for the depth value on the near side to the second fog color for the depth value on the back side so that the fog color changes in gradation according to the depth value of the original image. A program characterized by setting.
請求項2において、
前記フォグ情報設定部が、
フォグ変化開始深度とフォグ変化終了深度との間で、前記α値が前記元画像の奥行き値に応じて変化するようにα値を設定するとともに、前記フォグ変化開始深度と前記フォグ変化終了深度との間で、前記フォグ色が前記元画像の奥行き値に応じてグラデーション変化するように前記フォグ色を設定することを特徴とするプログラム。
In claim 2,
The fog information setting unit
The α value is set so that the α value changes according to the depth value of the original image between the fog change start depth and the fog change end depth, and the fog change start depth and the fog change end depth are The fog color is set such that the fog color changes in gradation according to the depth value of the original image.
請求項1において、
前記フォグ情報設定部が、
フォグ変化開始深度とフォグ変化終了深度との間で、前記α値が前記元画像の奥行き値に応じて変化するようにα値を設定することを特徴とするプログラム。
In claim 1,
The fog information setting unit
A program that sets an α value such that the α value changes according to a depth value of the original image between a fog change start depth and a fog change end depth.
請求項3、4のいずれかにおいて、
前記フォグ情報設定部が、
前記フォグ変化開始深度より手前側の奥行き値に対応するα値を第1のα値にクランプ設定し、前記フォグ変化終了深度より奥側の奥行き値に対応するα値を第2のα値にクランプ設定することを特徴とするプログラム。
In any one of Claims 3 and 4,
The fog information setting unit
The α value corresponding to the depth value closer to the fog change start depth is clamped to the first α value, and the α value corresponding to the depth value deeper than the fog change end depth is set to the second α value. A program characterized by clamp setting.
請求項1〜5のいずれかにおいて、
前記フォグ情報設定部が、
前記元画像の最遠景に相当する奥行き値より手前側の奥行き値でフォグ濃度が最小となるようにα値を設定することを特徴とするプログラム。
In any one of Claims 1-5,
The fog information setting unit
A program for setting an α value so that a fog density is minimized at a depth value closer to the depth value corresponding to the farthest view of the original image.
請求項1〜6のいずれかにおいて、
インデックス番号とフォグ色及びα値とを対応付けるインデックスカラー・テクスチャマッピング用のルックアップテーブルを記憶する記憶部としてコンピュータを更に機能させ、
前記フォグ情報設定部が、
前記元画像の奥行き値を前記ルックアップテーブルのインデックス番号として扱い、該ルックアップテーブルを用いて仮想オブジェクトに対してインデックスカラー・テクスチャマッピングを行って、前記奥行き値に応じたフォグ色とα値とを設定することを特徴とするプログラム。
In any one of Claims 1-6,
Further causing the computer to function as a storage unit for storing a lookup table for index color / texture mapping that associates the index number with the fog color and α value,
The fog information setting unit
The depth value of the original image is treated as an index number of the lookup table, index color / texture mapping is performed on the virtual object using the lookup table, and the fog color and α value corresponding to the depth value are A program characterized by setting.
オブジェクト空間を仮想カメラから見た画像を生成するためのプログラムであって、
陰面消去を行いながらオブジェクトを描画して元画像を生成する元画像生成部と、
インデックス番号とフォグ色及びα値とを対応付けるインデックスカラー・テクスチャマッピング用のルックアップテーブルを記憶する記憶部と、
前記元画像の奥行き値を前記ルックアップテーブルのインデックス番号として扱い、該ルックアップテーブルを用いて仮想オブジェクトに対してインデックスカラー・テクスチャマッピングを行って、前記奥行き値に応じたフォグ色とα値とを設定するテクスチャマッピング部と、
前記元画像の色と前記フォグ色とを前記奥行き値に応じたα値に基づいてαブレンディングするαブレンディング部として、
コンピュータを機能させることを特徴とするプログラム。
A program for generating an image of an object space viewed from a virtual camera,
An original image generation unit that generates an original image by drawing an object while performing hidden surface removal;
A storage unit for storing a lookup table for index color / texture mapping that associates an index number with a fog color and an α value;
The depth value of the original image is treated as an index number of the lookup table, index color / texture mapping is performed on the virtual object using the lookup table, and the fog color and α value corresponding to the depth value are A texture mapping unit for setting
As an α blending unit that α blends the color of the original image and the fog color based on an α value corresponding to the depth value,
A program characterized by causing a computer to function.
コンピュータ読み取り可能な情報記憶媒体であって、請求項1〜8のいずれかのプログラムを記憶したことを特徴とする情報記憶媒体。   A computer-readable information storage medium, wherein the program according to any one of claims 1 to 8 is stored. オブジェクト空間を仮想カメラから見た画像を生成するための画像生成システムであって、
陰面消去を行いながらオブジェクトを描画して元画像を生成する元画像生成部と、
前記元画像の奥行き値に基づいて、該奥行き値に応じたフォグ色とα値とを設定するフォグ情報設定部と、
前記元画像の色と前記奥行き値に応じたフォグ色とを前記奥行き値に応じたα値に基づいてブレンディングするαブレンディング部と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image of an object space viewed from a virtual camera,
An original image generation unit that generates an original image by drawing an object while performing hidden surface removal;
A fog information setting unit that sets a fog color and an α value according to the depth value based on the depth value of the original image;
An α blending unit for blending the color of the original image and the fog color corresponding to the depth value based on the α value corresponding to the depth value;
An image generation system comprising:
JP2005142822A 2005-05-16 2005-05-16 Program, information storage medium, and image generation system Withdrawn JP2006318389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005142822A JP2006318389A (en) 2005-05-16 2005-05-16 Program, information storage medium, and image generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005142822A JP2006318389A (en) 2005-05-16 2005-05-16 Program, information storage medium, and image generation system

Publications (1)

Publication Number Publication Date
JP2006318389A true JP2006318389A (en) 2006-11-24

Family

ID=37538982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005142822A Withdrawn JP2006318389A (en) 2005-05-16 2005-05-16 Program, information storage medium, and image generation system

Country Status (1)

Country Link
JP (1) JP2006318389A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242619A (en) * 2007-03-26 2008-10-09 Samii Kk Image generation device and image generation program
WO2009006233A2 (en) * 2007-06-29 2009-01-08 Microsoft Corporation Real-time rendering of light-scattering media
WO2009006235A2 (en) * 2007-06-29 2009-01-08 Microsoft Corporation Real-time rendering of light scattering media
JP2009075867A (en) * 2007-09-20 2009-04-09 Sega Corp Program for image processing, computer-readable recording medium with the program recorded thereon, image processor, and image processing method
JP2009093609A (en) * 2007-09-20 2009-04-30 Sega Corp Image processing program, computer-readable recording medium recording the program, image processing apparatus and image processing method
US7990377B2 (en) 2007-06-26 2011-08-02 Microsoft Corporation Real-time rendering of light-scattering media
WO2011101904A1 (en) * 2010-02-18 2011-08-25 三菱電機株式会社 Gradation drawing device
US8009168B2 (en) 2007-06-26 2011-08-30 Microsoft Corporation Real-time rendering of light-scattering media
US8190403B2 (en) 2007-06-26 2012-05-29 Microsoft Corporation Real-time rendering of light-scattering media
JP2013146324A (en) * 2012-01-18 2013-08-01 Copcom Co Ltd Computer program and image processor
WO2013118190A1 (en) * 2012-02-10 2013-08-15 三菱電機株式会社 Gradation drawing device
JP2020154923A (en) * 2019-03-22 2020-09-24 任天堂株式会社 Image processing program, image processing system, image processing device, and image processing method
WO2022085479A1 (en) * 2020-10-23 2022-04-28 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242619A (en) * 2007-03-26 2008-10-09 Samii Kk Image generation device and image generation program
US8190403B2 (en) 2007-06-26 2012-05-29 Microsoft Corporation Real-time rendering of light-scattering media
US7990377B2 (en) 2007-06-26 2011-08-02 Microsoft Corporation Real-time rendering of light-scattering media
US8009168B2 (en) 2007-06-26 2011-08-30 Microsoft Corporation Real-time rendering of light-scattering media
WO2009006233A2 (en) * 2007-06-29 2009-01-08 Microsoft Corporation Real-time rendering of light-scattering media
WO2009006235A2 (en) * 2007-06-29 2009-01-08 Microsoft Corporation Real-time rendering of light scattering media
WO2009006233A3 (en) * 2007-06-29 2009-02-26 Microsoft Corp Real-time rendering of light-scattering media
WO2009006235A3 (en) * 2007-06-29 2009-02-26 Microsoft Corp Real-time rendering of light scattering media
US7940268B2 (en) 2007-06-29 2011-05-10 Microsoft Corporation Real-time rendering of light-scattering media
US7940269B2 (en) 2007-06-29 2011-05-10 Microsoft Corporation Real-time rendering of light-scattering media
JP2009075867A (en) * 2007-09-20 2009-04-09 Sega Corp Program for image processing, computer-readable recording medium with the program recorded thereon, image processor, and image processing method
JP2009093609A (en) * 2007-09-20 2009-04-30 Sega Corp Image processing program, computer-readable recording medium recording the program, image processing apparatus and image processing method
WO2011101904A1 (en) * 2010-02-18 2011-08-25 三菱電機株式会社 Gradation drawing device
JP2013146324A (en) * 2012-01-18 2013-08-01 Copcom Co Ltd Computer program and image processor
WO2013118190A1 (en) * 2012-02-10 2013-08-15 三菱電機株式会社 Gradation drawing device
JPWO2013118190A1 (en) * 2012-02-10 2015-05-11 三菱電機株式会社 Gradient drawing device
US9607430B2 (en) 2012-02-10 2017-03-28 Mitsubishi Electric Corporation Gradation drawing device
JP2020154923A (en) * 2019-03-22 2020-09-24 任天堂株式会社 Image processing program, image processing system, image processing device, and image processing method
US11219829B2 (en) 2019-03-22 2022-01-11 Nintendo Co., Ltd. Non-transitory computer-readable storage medium storing image processing program, image processing system, image processing apparatus, and image processing method
JP7223610B2 (en) 2019-03-22 2023-02-16 任天堂株式会社 Image processing program, image processing system, image processing apparatus, and image processing method
WO2022085479A1 (en) * 2020-10-23 2022-04-28 ソニーセミコンダクタソリューションズ株式会社 Information processing device, information processing method, and program

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
US7248260B2 (en) Image generation system, program, information storage medium and image generation method
JP4305903B2 (en) Image generation system, program, and information storage medium
JP4223244B2 (en) Image generation system, program, and information storage medium
JP4749198B2 (en) Program, information storage medium, and image generation system
JP2004334661A (en) Image generating system, program, and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4159082B2 (en) Image generation system, program, and information storage medium
JP4632855B2 (en) Program, information storage medium, and image generation system
JP4187192B2 (en) Image generation system, program, and information storage medium
JP2002032780A (en) Game system, program and information storage medium
JP4698701B2 (en) Image generation system, program, and information storage medium
JP4476040B2 (en) Program, information storage medium, and image generation system
JP2008077406A (en) Image generation system, program, and information storage medium
JP2006318386A (en) Program, information storage medium, and image forming system
JP4771903B2 (en) Image generation system, program, and information storage medium
JP4521811B2 (en) Program, information storage medium, and image generation system
JP2006252423A (en) Program, information storage medium and image generation system
JP4680670B2 (en) Program, information storage medium, and image generation system
JP4794597B2 (en) Image generation system, program, and information storage medium
JP4693153B2 (en) Image generation system, program, and information storage medium
JP2006252427A (en) Program, information storage medium and image generation system
JP4596551B2 (en) Image generation system, program, and information storage medium

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