JP4804122B2 - Program, texture data structure, information storage medium, and image generation system - Google Patents

Program, texture data structure, information storage medium, and image generation system Download PDF

Info

Publication number
JP4804122B2
JP4804122B2 JP2005336050A JP2005336050A JP4804122B2 JP 4804122 B2 JP4804122 B2 JP 4804122B2 JP 2005336050 A JP2005336050 A JP 2005336050A JP 2005336050 A JP2005336050 A JP 2005336050A JP 4804122 B2 JP4804122 B2 JP 4804122B2
Authority
JP
Japan
Prior art keywords
shadow
texture
texel
processing
parameter
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.)
Active
Application number
JP2005336050A
Other languages
Japanese (ja)
Other versions
JP2007141082A (en
Inventor
隆 今給黎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Namco Ltd
Bandai Namco Entertainment Inc
Original Assignee
Namco Ltd
Namco Bandai Games Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Ltd, Namco Bandai Games Inc filed Critical Namco Ltd
Priority to JP2005336050A priority Critical patent/JP4804122B2/en
Publication of JP2007141082A publication Critical patent/JP2007141082A/en
Application granted granted Critical
Publication of JP4804122B2 publication Critical patent/JP4804122B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Description

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

従来より、仮想的な3次元空間であるオブジェクト空間内の仮想カメラ(所与の視点)から見える画像を生成する画像生成システムが知られており、いわゆる仮想現実を体験できるものとして人気が高い。レーシングゲームを楽しむことができる画像生成システムを例にとれば、プレーヤはプレーヤオブジェクトを操作してオブジェクト空間内で走行させ、他のプレーヤやコンピュータが操作する敵オブジェクトと競争することで3次元ゲームを楽しむ。   2. Description of the Related Art Conventionally, an image generation system that generates an image that can be viewed from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known, and is popular as a device that can experience so-called virtual reality. Taking an image generation system that can enjoy a racing game as an example, a player operates a player object to run in an object space, and competes with an enemy object operated by another player or a computer to play a three-dimensional game. have fun.

このような画像生成システムでは、プレーヤの仮想現実感の向上のためによりリアルな画像を生成することが重要な技術的課題になっている。このため地面に映るオブジェクトの影などについても、よりリアルに表現できることが望まれる。
特許3667393号公報
In such an image generation system, it is an important technical problem to generate a more realistic image in order to improve the player's virtual reality. For this reason, it is desired that the shadow of an object reflected on the ground can be expressed more realistically.
Japanese Patent No. 3667393

本発明は上記事情に鑑みてなされたものであり、その目的は、オブジェクトの影等をリアルに表現することができるプログラム、テクスチャデータ構造、情報記憶媒体及び画像生成システムを提供することにある。   The present invention has been made in view of the above circumstances, and an object thereof is to provide a program, a texture data structure, an information storage medium, and an image generation system that can realistically represent the shadow of an object.

(1)本発明は、オブジェクト空間を所与の視点から見た画像を生成するための画像生成システムであって、影テクスチャを記憶するテクスチャ記憶部と、前記オブジェクト空間内における第1のオブジェクトと第2のオブジェクトとの位置関係に基づいて距離パラメータを求める距離演算部と、前記距離パラメータと、前記テクスチャ記憶部から読み出された影テクスチャのテクセルデータとに基づき得られる影濃度パラメータに基づいて、第2のオブジェクトに対して第1のオブジェクトの影を生成する影処理を行う影処理部と、を含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラム及び該プログラムを記憶する情報記憶媒体に関係する。   (1) The present invention is an image generation system for generating an image of an object space viewed from a given viewpoint, and includes a texture storage unit that stores shadow texture, a first object in the object space, Based on a distance calculation unit that obtains a distance parameter based on a positional relationship with the second object, the shadow parameter obtained based on the distance parameter, and the texel data of the shadow texture read from the texture storage unit And a shadow processing unit that performs a shadow process for generating a shadow of the first object on the second object. The present invention also relates to a program that causes a computer to function as each of the above-described units and an information storage medium that stores the program.

本発明によれば、第1のオブジェクトと第2のオブジェクトとの位置関係に応じて変化する距離パラメータと影テクスチャのテクセルデータとから第1のオブジェクトと第2のオブジェクトとの位置関係に応じた影濃度パラメータが求められる。このため本発明によれば、第1のオブジェクトと第2のオブジェクトとの位置関係毎に影テクスチャを用意しなくても済むので、メモリの使用量の節約や処理負荷の軽減が期待できる。   According to the present invention, the distance parameter that changes according to the positional relationship between the first object and the second object and the texel data of the shadow texture correspond to the positional relationship between the first object and the second object. A shadow density parameter is determined. Therefore, according to the present invention, it is not necessary to prepare a shadow texture for each positional relationship between the first object and the second object, so that it is possible to expect a reduction in memory usage and a reduction in processing load.

(2)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影処理部が、前記距離パラメータの2次関数に反比例して変化するように前記影濃度パラメータを求めて、第2のオブジェクトに対して第1のオブジェクトの影を生成する影処理を行うようにしてもよい。このようにすれば、第2のオブジェクトから見た第1のオブジェクトの断面がオブジェクト間の距離の2次関数に従って小さくなりつつ薄くなっていくような影濃度パラメータの分布パターンを得ることができる。   (2) In the image generation system, the program, and the information storage medium of the present invention, the shadow processing unit obtains the shadow density parameter so as to change in inverse proportion to the quadratic function of the distance parameter, You may make it perform the shadow process which produces | generates the shadow of a 1st object with respect to an object. In this way, it is possible to obtain a distribution pattern of shadow density parameters such that the cross section of the first object viewed from the second object becomes smaller and thinner according to a quadratic function of the distance between the objects.

(3)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記テクスチャ記憶部が、前記第1のオブジェクトと前記第2のオブジェクトとの位置関係に応じて得られる複数の前記影濃度パラメータ(s)の分布パターンに基づいて、前記距離パラメータ(h)と前記影濃度パラメータとが下式の関係を満たすように、テクセルのRGBの各色成分の輝度値(R、G、B)とテクセルのα値(A)とが設定された影テクスチャを記憶するようにしてもよい。   (3) In the image generation system, the program, and the information storage medium of the present invention, the texture storage unit includes a plurality of the shadow density parameters obtained according to the positional relationship between the first object and the second object. Based on the distribution pattern of (s), the luminance value (R, G, B) of each RGB color component of the texel and the texel so that the distance parameter (h) and the shadow density parameter satisfy the following relationship. The shadow texture in which the α value (A) is set may be stored.

このようにすれば、第1のオブジェクトが第2のオブジェクトに近いほど第1のオブジェクトの断面形状に沿った影濃度パラメータの分布パターンが得られ、第1のオブジェクトが第2のオブジェクトから離れるに従って、影の形状が曖昧になっていくような影濃度パラメータの分布パターンを得ることができるようになる。   In this way, as the first object is closer to the second object, a shadow density parameter distribution pattern is obtained along the cross-sectional shape of the first object, and as the first object moves away from the second object. Thus, it is possible to obtain a shadow density parameter distribution pattern in which the shadow shape becomes ambiguous.

(4)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影テクスチャのテクセルには、RGBの各色成分の輝度値(R、G、B)と、α値(A)とが前記テクセルデータとして設定されており、前記影処理部が、前記影テクスチャのテクセルデータ(R、G、B、A)と、距離パラメータ(h)とに基づいて、下式により各テクセルに対応する影濃度パラメータ(s)を求めることを特徴とするようにしてもよい。   (4) In the image generation system, the program, and the information storage medium of the present invention, the shadow texture texel includes the luminance values (R, G, B) of each of the RGB color components and the α value (A). Based on the shadow texture texel data (R, G, B, A) and the distance parameter (h), the shadow processing unit is set as texel data. The density parameter (s) may be obtained.

このようにすれば、第1のオブジェクトと第2のオブジェクトとの位置関係に応じて第1のオブジェクトが第2のオブジェクトから離れれば離れるほど、第2のオブジェクトに映る第1のオブジェクトの影が薄くなるようなリアルな表現を行うことができる。   In this way, the more the first object moves away from the second object according to the positional relationship between the first object and the second object, the more the shadow of the first object reflected in the second object becomes. Realistic expressions can be made thin.

(5)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記オブジェクト空間には、前記第1のオブジェクトとして、プレーヤオブジェクトと敵オブジェクトとが設定され、前記第2のオブジェクトとして、地形オブジェクトが設定され、前記影処理部が、前記地形オブジェクトに対して前記プレーヤオブジェクトの影を生成する場合には第1の影処理を行い、前記地形オブジェクトに対して前記敵オブジェクトの影を生成する場合には第1の影処理とは処理内容が異なる第2の影処理を行うようにしてもよい。このように影処理の内容を全てのオブジェクトに共通にせずに、プレーヤに注目されやすいプレーヤオブジェクトの影を生成する処理と敵オブジェクトの影を生成する処理とで処理内容を変えることで、ある程度の画像品質を保ちつつ大量の敵オブジェクトが描画対象となる場合の処理負荷を軽減することができる。   (5) In the image generation system, the program, and the information storage medium of the present invention, a player object and an enemy object are set as the first object in the object space, and a terrain object is set as the second object. Is set, and the shadow processing unit performs a first shadow process when the shadow of the player object is generated with respect to the terrain object, and generates a shadow of the enemy object with respect to the terrain object. Alternatively, a second shadow process having a different process content from the first shadow process may be performed. In this way, by changing the processing contents between the process of generating the shadow of the player object and the process of generating the shadow of the enemy object that are easily noticed by the player without making the contents of the shadow processing common to all objects, It is possible to reduce the processing load when a large number of enemy objects are drawn while maintaining the image quality.

(6)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記距離演算部が、前記プレーヤオブジェクトに設定した基準点の位置に基づいて前記距離パラメータを求め、前記影処理部が、前記基準点を投影中心として前記地形オブジェクトに対して前記影テクスチャを投影して前記地形オブジェクトの頂点と前記影テクスチャのテクセルとを対応付け、前記頂点に対応づけられたテクセルのテクセルデータと、頂点毎に求められた距離パラメータとに基づき得られる影濃度パラメータに応じて前記地形オブジェクトの色を暗くする処理を第1の影処理として行うようにしてもよい。このようにすれば、プレーヤに注目されやすいプレーヤオブジェクトの影については高精細な表現を行うことができる。   (6) In the image generation system, the program, and the information storage medium of the present invention, the distance calculation unit obtains the distance parameter based on the position of the reference point set in the player object, and the shadow processing unit Projecting the shadow texture onto the terrain object with a reference point as the projection center, associating the vertex of the terrain object with the texel of the shadow texture, texel data of the texel associated with the vertex, and each vertex The process of darkening the color of the terrain object according to the shadow density parameter obtained based on the distance parameter obtained in the above may be performed as the first shadow process. In this way, high-definition expression can be performed for the shadow of the player object that is likely to be noticed by the player.

(7)また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記距離演算部が、前記敵オブジェクトに設定した基準点の位置に基づいて前記距離パラメータを求め、前記影処理部が、求められた前記距離パラメータと、影ポリゴンの頂点に予め対応づけられた前記影テクスチャのテクセルのテクセルデータとに基づき得られる影濃度パラメータを、頂点に影の色が予め対応づけられた前記影ポリゴンの半透明度として、前記敵オブジェクトの位置に応じて定められる前記地形オブジェクトの所与の領域に前記影ポリゴンを半透明描画する処理を第2の影処理として行うようにしてもよい。このようにすれば、例えば、プレーヤオブジェクトに比べて敵オブジェクトの出現数が多い場合に、その影を簡略化して表現することで処理負荷を軽減することができる。   (7) In the image generation system, the program, and the information storage medium of the present invention, the distance calculation unit obtains the distance parameter based on the position of the reference point set for the enemy object, and the shadow processing unit obtains the distance parameter. The shadow density parameter obtained based on the distance parameter and the texel data of the texel of the shadow texture previously associated with the vertex of the shadow polygon, the shadow density parameter obtained by associating the shadow color with the vertex in advance. As the translucency, a process of rendering the shadow polygon translucently in a given area of the terrain object determined according to the position of the enemy object may be performed as the second shadow process. In this way, for example, when the number of appearances of enemy objects is larger than that of the player object, the processing load can be reduced by expressing the shadows in a simplified manner.

(8)また本発明は、コンピュータがオブジェクト空間に設定された第1のオブジェクトと第2のオブジェクトとの位置関係に応じて変化する距離パラメータを求めて、第2のオブジェクトに対して生成される第1のオブジェクトの影を距離パラメータに基づいて算出される影濃度パラメータに応じて変化させる影処理に用いられるテクスチャデータ構造であって、RGBの各色成分の輝度値とα値とからなるテクセルデータがテクスチャ座標に対応づけられており、前記距離パラメータの2次関数に反比例して前記影濃度パラメータが変化するように、前記テクセルデータが設定されているテクスチャデータ構造に関係する。また本発明は、上記テクスチャデータ構造を記憶する情報記憶媒体に関係する。   (8) According to the present invention, the computer obtains a distance parameter that changes according to the positional relationship between the first object and the second object set in the object space, and is generated for the second object. A texture data structure used for shadow processing for changing a shadow of a first object according to a shadow density parameter calculated based on a distance parameter, and comprising texel data composed of a luminance value and an α value of each color component of RGB Is associated with the texture coordinates, and is related to the texture data structure in which the texel data is set so that the shadow density parameter changes in inverse proportion to the quadratic function of the distance parameter. The present invention also relates to an information storage medium for storing the texture data structure.

本発明によれば、第2のオブジェクトから見た第1のオブジェクトの断面がオブジェクト間の距離の2次関数に従って小さくなりつつ薄くなっていくような影濃度パラメータの分布パターンを得ることができる。   According to the present invention, it is possible to obtain a distribution pattern of shadow density parameters such that the cross section of the first object viewed from the second object becomes smaller and thinner according to a quadratic function of the distance between the objects.

(9)また本発明は、コンピュータがオブジェクト空間に設定された第1のオブジェクトと第2のオブジェクトとの位置関係に応じて変化する距離パラメータ(h)を求めて、第2のオブジェクトに対して生成される第1のオブジェクトの影を距離パラメータ(h)に基づいて算出される影濃度パラメータ(s)に応じて変化させる影処理に用いられるテクスチャデータ構造であって、RGBの各色成分の輝度値(R、G、B)と、α値(A)とからなるテクセルデータがテクスチャ座標(U、V)に対応づけられており、前記距離パラメータ(h)と前記影濃度パラメータ(s)とが下式の関係を満たすように、前記テクセルデータ(R、G、B、A)が設定されているテクスチャデータ構造に関係する。また本発明は、上記テクスチャデータ構造を記憶する情報記憶媒体に関係する。   (9) In the present invention, the computer obtains a distance parameter (h) that changes according to the positional relationship between the first object and the second object set in the object space, A texture data structure used for shadow processing that changes a shadow of a generated first object according to a shadow density parameter (s) calculated based on a distance parameter (h), and the luminance of each RGB color component The texel data consisting of the values (R, G, B) and the α value (A) are associated with the texture coordinates (U, V), and the distance parameter (h), the shadow density parameter (s), Is related to the texture data structure in which the texel data (R, G, B, A) is set so that the following relationship is satisfied. The present invention also relates to an information storage medium for storing the texture data structure.

本発明によれば、第1のオブジェクトが第2のオブジェクトに近いほど第1のオブジェクトの断面形状に沿った影濃度パラメータの分布パターンが得られ、第1のオブジェクトが第2のオブジェクトから離れるに従って、影の形状が曖昧になっていくような影濃度パラメータの分布パターンを得ることができるようになる。   According to the present invention, as the first object is closer to the second object, a distribution pattern of shadow density parameters along the cross-sectional shape of the first object is obtained, and as the first object moves away from the second object. Thus, it is possible to obtain a shadow density parameter distribution pattern in which the shadow shape becomes ambiguous.

(10)また本発明は、コンピュータがオブジェクト空間に設定された第1のオブジェクトと第2のオブジェクトとの位置関係に応じて変化する距離パラメータ(h)を求めて、第2のオブジェクトに対して生成される第1のオブジェクトの影を距離パラメータ(h)に基づいて算出される影濃度パラメータ(s)に応じて変化させる影処理に用いられるテクスチャデータ構造であって、RGBの各色成分の輝度値(R、G、B)と、α値(A)とからなるテクセルデータがテクスチャ座標(U、V)に対応づけられており、前記距離パラメータ(h)、前記テクセルデータ(R、G、B、A)、及び影濃度パラメータ(s)が下式の関係を有するテクスチャデータ構造に関係する。また本発明は、上記テクスチャデータ構造を記憶する情報記憶媒体に関係する。   (10) In the present invention, the computer obtains a distance parameter (h) that changes according to the positional relationship between the first object and the second object set in the object space, A texture data structure used for shadow processing that changes a shadow of a generated first object according to a shadow density parameter (s) calculated based on a distance parameter (h), and the luminance of each RGB color component The texel data consisting of the values (R, G, B) and the α value (A) are associated with the texture coordinates (U, V), and the distance parameter (h), the texel data (R, G, B, A) and the shadow density parameter (s) are related to the texture data structure having the following relationship. The present invention also relates to an information storage medium for storing the texture data structure.

本発明によれば、第1のオブジェクトと第2のオブジェクトとの位置関係毎に影テクスチャを用意しなくても済むので、メモリの使用量の節約や処理負荷の軽減が期待できる。また本発明によれば、第1のオブジェクトと第2のオブジェクトとの位置関係に応じて第1のオブジェクトが第2のオブジェクトから離れれば離れるほど、第2のオブジェクトに映る第1のオブジェクトの影が薄くなるようなリアルな表現を行うことができる。   According to the present invention, since it is not necessary to prepare a shadow texture for each positional relationship between the first object and the second object, it is possible to save memory usage and reduce processing load. According to the present invention, the shadow of the first object reflected in the second object increases as the first object moves away from the second object according to the positional relationship between the first object and the second object. Realistic expressions can be made so that is thin.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   Hereinafter, this embodiment will be described. 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の構成要素(各部)の一部を省略した構成としてもよい。   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 of the present embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.

操作部160は、プレーヤがプレーヤオブジェクト(移動体オブジェクトの一例、プレーヤが操作するプレーヤキャラクタ)の操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、マイク、タッチパネル型ディスプレイ、或いは筺体などにより実現できる。記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM(VRAM)などにより実現できる。   The operation unit 160 is for a player to input operation data of a player object (an example of a moving object, a player character operated by the player), and functions thereof are a lever, a button, a steering, a microphone, and a touch panel display. Alternatively, it can be realized by a housing or the like. 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 a RAM (VRAM) or the like.

情報記憶媒体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 a memory (ROM). The processing unit 100 performs various processes of the present embodiment based on a program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute processing of each unit).

表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などにより実現できる。音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどにより実現できる。   The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by a CRT, LCD, touch panel display, HMD (head mounted display), or the like. The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by a speaker, headphones, or the like.

携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などがある。通信部196は外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。   The portable information storage device 194 stores player personal data, game save data, and the like. Examples of the portable information storage device 194 include a memory card and a portable game device. 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 communication ASICs, programs, and the like. It can be realized by.

なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部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. May be. Use of the information storage medium of such a host device (server) can also be included in the scope of the present invention.

処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの処理を行う。ここでゲーム処理としては、ゲーム開始条件が満たされた場合にゲームを開始する処理、ゲームを進行させる処理、キャラクタやマップなどのオブジェクトを配置する処理、オブジェクトを表示する処理、ゲーム結果を演算する処理、或いはゲーム終了条件が満たされた場合にゲームを終了する処理などがある。この処理部100は記憶部170内の主記憶部172をワーク領域として各種処理を行う。処理部100の機能は各種プロセッサ(CPU、DSP等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。   The processing unit 100 (processor) performs processing such as game processing, image generation processing, or sound generation processing based on operation data and programs from the operation unit 160. Here, as the game process, a process for starting a game when a game start condition is satisfied, a process for advancing the game, a process for placing an object such as a character or a map, a process for displaying an object, and a game result are calculated. There is a process or a process of ending a game when a game end condition is satisfied. The processing unit 100 performs various processes using the main storage unit 172 in the storage unit 170 as a work area. The functions of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.), ASIC (gate array, etc.), and programs.

処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、距離演算部116、描画部120、音生成部130を含む。なおこれらの一部を省略する構成としてもよい。   The processing unit 100 includes an object space setting unit 110, a movement / motion processing unit 112, a virtual camera control unit 114, a distance calculation unit 116, a drawing unit 120, and a sound generation unit 130. Note that some of these may be omitted.

オブジェクト空間設定部110は、キャラクタ、建物、球場、車、樹木、柱、壁、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブで構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。なおオブジェクトの頂点座標等を含むオブジェクトデータは記憶部170のオブジェクトデータ記憶部176に格納される。   The object space setting unit 110 is an object composed of various objects (polygons, free-form surfaces, subdivision surfaces, etc.) representing display objects such as characters, buildings, stadiums, cars, trees, pillars, walls, and maps (terrain). ) Is set in the object space. In other words, the position and rotation angle of the object in the world coordinate system (synonymous with direction and direction) are determined, and the rotation angle (rotation angle around the X, Y, and Z axes) is determined at that position (X, Y, Z). Arrange objects. The object data including the vertex coordinates of the object is stored in the object data storage unit 176 of the storage unit 170.

移動・動作処理部112は、オブジェクト(キャラクタ、車、電車又は飛行機等)の移動・動作演算(移動・動作シミュレーション)を行う。すなわち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクトをオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させたりする処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(オブジェクトを構成する各パーツの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。特に本実施形態では、操作部160によりプレーヤが入力した操作データなどに基づいて、照明源オブジェクト(移動体オブジェクト)をオブジェクト空間内で移動させる処理を行う。   The movement / motion processing unit 112 performs a movement / motion calculation (movement / motion simulation) of an object (character, car, train, airplane, etc.). That is, based on operation data input by the player through the operation unit 160, a program (movement / motion algorithm), various data (motion data), or the like, the object is moved in the object space, or the object is moved (motion, animation). ) Process. Specifically, object movement information (position, rotation angle, speed, or acceleration) and motion information (position or rotation angle of each part that constitutes the object) are sequentially transmitted every frame (1/60 seconds). Perform the required simulation process. A frame is a unit of time for performing object movement / motion processing (simulation processing) and image generation processing. In particular, in the present embodiment, processing for moving the illumination source object (moving object) in the object space is performed based on operation data input by the player through the operation unit 160.

仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置、視線方向あるいは画角を制御する処理)を行う。   The virtual camera control unit 114 performs a virtual camera (viewpoint) control process for generating an image viewed from a given (arbitrary) viewpoint in the object space. Specifically, processing for controlling the position (X, Y, Z) or rotation angle (rotation angle about the X, Y, Z axis) of the virtual camera (processing for controlling the viewpoint position, the line-of-sight direction or the angle of view) I do.

例えば仮想カメラによりオブジェクト(例えばキャラクタ、ボール、車)を後方から撮影する場合には、オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部112で得られたオブジェクトの位置、回転角度又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させる制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。   For example, when an object (eg, character, ball, car) is photographed from behind using a virtual camera, the position or rotation angle of the virtual camera (the direction of the virtual camera is set so that the virtual camera follows changes in the position or rotation of the object. ) To control. In this case, the virtual camera can be controlled based on information such as the position, rotation angle, or speed of the object obtained by the movement / motion processing unit 112. Alternatively, the virtual camera may be controlled to rotate at a predetermined rotation angle or to move along a predetermined movement path. In this case, the virtual camera is controlled based on the virtual camera data for specifying the position (movement path) or rotation angle of the virtual camera. When there are a plurality of virtual cameras (viewpoints), the above control process is performed for each virtual camera.

距離演算部116は、オブジェクト空間内における第1のオブジェクトと第2のオブジェクトとの位置関係に基づいて距離パラメータを求める処理を行う。距離パラメータは、第1のオブジェクトの基準点(代表点)の位置(高さ)に基づいて求めることができる。なお距離パラメータは、第2のオブジェクトにおける影処理の対象となる領域の頂点毎に求めてもよいし、第2のオブジェクトにおける影処理の対象となる領域に対して1の距離パラメータのみを求めるようにしてもよい。   The distance calculation unit 116 performs a process for obtaining a distance parameter based on the positional relationship between the first object and the second object in the object space. The distance parameter can be obtained based on the position (height) of the reference point (representative point) of the first object. The distance parameter may be obtained for each vertex of the shadow processing target area in the second object, or only one distance parameter is obtained for the shadow processing target area in the second object. It may be.

描画部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まずオブジェクト(モデル)の各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含むオブジェクトデータ(モデルデータ)が入力され、入力されたオブジェクトデータに含まれる頂点データに基づいて、頂点処理(頂点シェーダによるシェーディング)が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。頂点処理では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)が行われる。ピクセル処理では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色を描画バッファ174(ピクセル単位で画像情報を記憶できるバッファ。VRAM、レンダリングターゲット)に出力(描画)する。すなわち、ピクセル処理では、画像情報(色、法線、輝度、α値等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として1画面に表示できるように画像を生成することができる。   The drawing unit 120 performs drawing processing based on the results of various processing (game processing) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. When generating a so-called three-dimensional game image, first, object data (model data) including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object (model) ) Is input, and vertex processing (shading by a vertex shader) is performed based on the vertex data included in the input object data. When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary. In the vertex processing, according to the vertex processing program (vertex shader program, first shader program), vertex movement processing, coordinate conversion (world coordinate conversion, camera coordinate conversion), clipping processing, perspective processing, and other geometric processing are performed. On the basis of the processing result, the vertex data given to the vertex group constituting the object is changed (updated or adjusted). Then, rasterization (scan conversion) is performed based on the vertex data after the vertex processing, and the surface of the polygon (primitive) is associated with the pixel. Subsequent to rasterization, pixel processing (shading or fragment processing by a pixel shader) for drawing pixels (fragments forming a display screen) constituting an image is performed. In pixel processing, according to a pixel processing program (pixel shader program, second shader program), various processes such as texture reading (texture mapping), color data setting / change, translucent composition, anti-aliasing, etc. are performed, and an image is processed. The final drawing color of the constituent pixels is determined, and the drawing color of the perspective-transformed object is output (drawn) to the drawing buffer 174 (a buffer capable of storing image information in units of pixels; VRAM, rendering target). That is, in pixel processing, per-pixel processing for setting or changing image information (color, normal, luminance, α value, etc.) in units of pixels is performed. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated. Note that when there are a plurality of virtual cameras (viewpoints), an image can be generated so that an image seen from each virtual camera can be displayed as a divided image on one screen.

なお頂点処理やピクセル処理は、シェーディング言語によって記述されたシェーダプログラムによって、ポリゴン(プリミティブ)の描画処理をプログラム可能にするハードウェア、いわゆるプログラマブルシェーダ(頂点シェーダやピクセルシェーダ)により実現される。プログラマブルシェーダでは、頂点単位の処理やピクセル単位の処理がプログラム可能になることで描画処理内容の自由度が高く、従来のハードウェアによる固定的な描画処理に比べて表現力を大幅に向上させることができる。   The vertex processing and pixel processing are realized by hardware that enables polygon (primitive) drawing processing to be programmed by a shader program written in a shading language, so-called programmable shaders (vertex shaders and pixel shaders). Programmable shaders can be programmed with vertex-level processing and pixel-level processing, so that the degree of freedom of drawing processing is high, and expressive power is greatly improved compared to conventional hardware-based fixed drawing processing. Can do.

そして描画部120は、オブジェクトを描画する際に、ジオメトリ処理、テクスチャマッピング、隠面消去処理、αブレンディング等を行う。   The drawing unit 120 performs geometry processing, texture mapping, hidden surface removal processing, α blending, and the like when drawing an object.

ジオメトリ処理では、オブジェクトに対して、座標変換、クリッピング処理、透視投影変換、或いは光源計算等の処理が行われる。そして、ジオメトリ処理後(透視投影変換後)のオブジェクトデータ(オブジェクトの頂点の位置座標、テクスチャ座標、色データ(輝度データ)、法線ベクトル、或いはα値等)は、主記憶部172に保存される。   In the geometry processing, processing such as coordinate conversion, clipping processing, perspective projection conversion, or light source calculation is performed on the object. Then, object data (positional coordinates of object vertices, texture coordinates, color data (luminance data), normal vector, α value, etc.) after geometry processing (after perspective projection conversion) is stored in the main storage unit 172. The

テクスチャマッピングは、記憶部170のテクスチャ記憶部178に記憶されるテクスチャ(テクセル値)をオブジェクトにマッピングするための処理である。具体的には、オブジェクトの頂点に設定(付与)されるテクスチャ座標等を用いて記憶部170のテクスチャ記憶部178からテクスチャ(色(RGB)、α値などの表面プロパティ)を読み出す。そして、2次元の画像であるテクスチャをオブジェクトにマッピングする。この場合に、ピクセルとテクセルとを対応づける処理や、テクセルの補間としてバイリニア補間などを行う。   Texture mapping is a process for mapping a texture (texel value) stored in the texture storage unit 178 of the storage unit 170 to an object. Specifically, the texture (surface properties such as color (RGB) and α value) is read from the texture storage unit 178 of the storage unit 170 using the texture coordinates set (given) at the vertex of the object. Then, a texture that is a two-dimensional image is mapped to an object. In this case, processing for associating pixels with texels, bilinear interpolation or the like is performed as texel interpolation.

隠面消去処理としては、描画ピクセルのZ値(奥行き情報)が格納されるZバッファ(奥行きバッファ)を用いたZバッファ法(奥行き比較法、Zテスト)による隠面消去処理を行うことができる。すなわちオブジェクトのプリミティブに対応する描画ピクセルを描画する際に、Zバッファに格納されるZ値を参照する。そして参照されたZバッファのZ値と、プリミティブの描画ピクセルでのZ値とを比較し、描画ピクセルでのZ値が、仮想カメラから見て手前側となるZ値(例えば小さなZ値)である場合には、その描画ピクセルの描画処理を行うとともにZバッファのZ値を新たなZ値に更新する。   As the hidden surface removal processing, hidden surface removal processing can be performed by a Z buffer method (depth comparison method, Z test) using a Z buffer (depth buffer) in which Z values (depth information) of drawing pixels are stored. . That is, when drawing pixels corresponding to the primitive of the object are drawn, the Z value stored in the Z buffer is referred to. Then, the Z value of the referenced Z buffer is compared with the Z value at the drawing pixel of the primitive, and the Z value at the drawing pixel is a Z value (for example, a small Z value) on the near side when viewed from the virtual camera. In some cases, the drawing process of the drawing pixel is performed and the Z value of the Z buffer is updated to a new Z value.

αブレンディング(α合成)は、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。   α blending (α synthesis) is a translucent synthesis process (usually α blending, addition α blending, subtraction α blending, or the like) based on an α value (A value).

なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。   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 mask information, translucency (equivalent to transparency and opacity), bump information, and the like.

さらに本実施形態では描画部120が、影処理部122を含む。   Further, in the present embodiment, the drawing unit 120 includes a shadow processing unit 122.

影処理部122は、距離パラメータと、テクスチャ記憶部178から読み出された影テクスチャのテクセルデータとに基づき得られる影濃度パラメータに基づいて、第2のオブジェクトに対して第1のオブジェクトの影を生成する影処理を行う。影処理としては、第1のオブジェクトに設定した基準点を投影中心として第2のオブジェクトに影テクスチャを投影マッピングして、距離パラメータに応じて変化する影濃度パラメータに基づいて第2のオブジェクトの色を暗くする(輝度を下げる)処理(第1の影処理)や、予め頂点に影の色と影テクスチャのテクスチャ座標が設定された影ポリゴンを用意しておき、距離パラメータに応じて変換する影濃度パラメータを半透明度として、影ポリゴンを第1のオブジェクトの位置に応じて第2のオブジェクトに重ねて半透明描画する処理(第2の影処理)などを行うことができる。これらの影処理は、第1のオブジェクトの種類に応じて切り替えるようにしてもよい。   The shadow processing unit 122 applies the shadow of the first object to the second object based on the shadow density parameter obtained based on the distance parameter and the texel data of the shadow texture read from the texture storage unit 178. Performs shadow processing to be generated. As the shadow processing, the shadow texture is projected and mapped onto the second object with the reference point set on the first object as the projection center, and the color of the second object is changed based on the shadow density parameter that changes according to the distance parameter. Shadow (decrease brightness) (first shadow processing), shadow polygons with shadow color and shadow texture texture coordinates set in advance are prepared, and the shadow is converted according to the distance parameter. With the density parameter as semi-transparency, a process (second shadow process) for rendering a semi-transparent image by overlaying a shadow polygon on a second object according to the position of the first object can be performed. These shadow processes may be switched according to the type of the first object.

また影処理部122は、影濃度演算部124を含む。   The shadow processing unit 122 includes a shadow density calculation unit 124.

影濃度演算部124は、影テクスチャのテクセル毎に設定されたRGBの各色成分の輝度値(R、G、B)及びα値(A)からなるテクセルデータと、距離演算部116で求められた第1のオブジェクトと第2のオブジェクトとの位置関係に応じた距離パラメータ(h)とに基づいて、所定の変換式を用いて影濃度パラメータsを求める処理を行う。   The shadow density calculation unit 124 is obtained by the distance calculation unit 116 using texel data including luminance values (R, G, B) and α values (A) of RGB color components set for each texel of the shadow texture. Based on the distance parameter (h) corresponding to the positional relationship between the first object and the second object, a process for obtaining the shadow density parameter s using a predetermined conversion formula is performed.

音生成部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人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、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 may be a system having a multiplayer mode in which a plurality of players can play. 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 by distributed processing using a plurality of terminals (game machine, mobile phone).

2.本実施形態の手法
本実施形態では、図2に示すように、地形オブジェクトOB2(第2のオブジェクト)に映る車両オブジェクトOB1(第1のオブジェクト)の影をリアルに表現するために以下のような手法を採用している。
2. In this embodiment, as shown in FIG. 2, in order to realistically express the shadow of the vehicle object OB1 (first object) reflected in the terrain object OB2 (second object), the following method is used. The method is adopted.

まず本実施形態では、地形オブジェクトに対する車両オブジェクトの高さ(地形オブジェクトと車両オブジェクトとの距離)に応じた影濃度パラメータの分布パターンを求めることができる影テクスチャを予め用意しておく手法を採用している。   First, the present embodiment employs a technique in which a shadow texture is prepared in advance, which can determine a distribution pattern of shadow density parameters according to the height of the vehicle object relative to the terrain object (distance between the terrain object and the vehicle object). ing.

図3に影テクスチャTEXの例を示す。この影テクスチャTEXは、テクセル毎にテクスチャ座標(U、V)とRGBの各色成分の輝度値(R、G、B)とα値(A)とが対応づけられており、所定の変換式を用いて影濃度パラメータを算出することにより、図4に示すように、地形に対する車両の高さに応じて影の濃度が薄くなっていくような影濃度パラメータの分布パターンを得ることができるようになっている。   FIG. 3 shows an example of the shadow texture TEX. In this shadow texture TEX, the texture coordinates (U, V), the luminance values (R, G, B) of each RGB color component, and the α value (A) are associated with each texel, and a predetermined conversion equation is obtained. As shown in FIG. 4, the shadow density parameter distribution pattern in which the shadow density decreases according to the height of the vehicle with respect to the terrain can be obtained by calculating the shadow density parameter. It has become.

そして影濃度パラメータ(s)、距離パラメータ(h:高さパラメータ)、及びテクセルデータ(R、G、B、A)が以下の変換式に基づく関係を有している。   The shadow density parameter (s), distance parameter (h: height parameter), and texel data (R, G, B, A) have a relationship based on the following conversion formula.

ここで影テクスチャTEXのテクセルデータ(R、G、B、A)は、図5に示すように、車両オブジェクトOB1が地表上にいる場合の影の濃さを表す影濃度パラメータ(s0)と、車両オブジェクトOB1が地表より高い位置にある場合の影の濃さを表す影濃度パラメータ(s1)と、その地表より高い位置の高さを表す距離パラメータ(h1)とに基づいて、距離パラメータhの2次関数に反比例して影濃度パラメータsが変化するように設定されている。   Here, the texel data (R, G, B, A) of the shadow texture TEX includes, as shown in FIG. 5, a shadow density parameter (s0) that represents the shadow density when the vehicle object OB1 is on the ground surface, Based on the shadow density parameter (s1) representing the darkness of the shadow when the vehicle object OB1 is at a position higher than the ground surface and the distance parameter (h1) representing the height of the position higher than the ground surface, The shadow density parameter s is set to change in inverse proportion to the quadratic function.

このとき図6に示すように、天球全体から一様な強さの光で物体(オブジェクト)を照らす面光源LSを用いてテクセルデータ(R、G、B、A)を生成する。すなわち面光源LSからの照射光が車両オブジェクトOB1によって遮蔽されることにより投影面に映る影(本影(ハードシャドウ)及び半影(ソフトシャドウ))の濃さの分布を車両オブジェクトOB1の地表からの高さ(車両オブジェクトOB1と地表との距離)に応じた影濃度パラメータの分布パターンとして求めておき、下式の関係を有するようにパラメータ(β、γ、δ、ε)をフィッティングしてテクセルデータ(R、G、B、A)を設定することにより影テクスチャTEXを得ることができる。   At this time, as shown in FIG. 6, texel data (R, G, B, A) is generated using a surface light source LS that illuminates an object (object) with light of uniform intensity from the entire celestial sphere. That is, the distribution of the darkness of the shadows (main shadow (hard shadow) and penumbra (soft shadow)) reflected on the projection surface when the irradiation light from the surface light source LS is shielded by the vehicle object OB1 from the ground surface of the vehicle object OB1. Is obtained as a shadow density parameter distribution pattern according to the height of the vehicle (the distance between the vehicle object OB1 and the ground surface), and the parameters (β, γ, δ, ε) are fitted so as to have the relationship of A shadow texture TEX can be obtained by setting data (R, G, B, A).

このようにすれば、投影面から見た車両オブジェクトOB1の断面が車両オブジェクトOB1から投影面までの距離の2乗(広義には、距離を変数とする2次関数)に従って小さくなりつつ薄くなっていくような影濃度パラメータの分布パターンを得ることができる。すなわち複数の影濃度パラメータの分布パターンを統合した影テクスチャTEXを予め用意しておくことによって、車両オブジェクトOB1が地形オブジェクトOB2に近いほど車両オブジェクトOB1の断面形状に沿った影濃度パラメータの分布パターンが得られ、車両オブジェクトOB1が地形オブジェクトOB2から離れるに従って、影の形状が曖昧になっていくような影濃度パラメータの分布パターンを得ることができるようになる。   In this way, the cross section of the vehicle object OB1 viewed from the projection plane becomes smaller and thinner according to the square of the distance from the vehicle object OB1 to the projection plane (in a broad sense, a quadratic function with the distance as a variable). Various distribution patterns of shadow density parameters can be obtained. That is, by preparing a shadow texture TEX that integrates a plurality of shadow density parameter distribution patterns in advance, the closer the vehicle object OB1 is to the topographic object OB2, the more the shadow density parameter distribution pattern along the cross-sectional shape of the vehicle object OB1 is. As a result, it is possible to obtain a shadow density parameter distribution pattern in which the shadow shape becomes ambiguous as the vehicle object OB1 moves away from the terrain object OB2.

また本実施形態では、車両オブジェクト(第1のオブジェクト)として、プレーヤが操作するプレーヤ車両オブジェクトと、プレーヤ車両オブジェクトの競争相手となる敵車両オブジェクトとをオブジェクト空間に登場させてレーシングゲームを行わせる場合に、地形オブジェクト(第2のオブジェクト)に映るプレーヤ車両オブジェクトの影と地形オブジェクトに映る敵車両オブジェクトの影とを異なる手法で生成している。   In the present embodiment, as a vehicle object (first object), a player vehicle object operated by a player and an enemy vehicle object that is a competitor of the player vehicle object appear in the object space to perform a racing game. In addition, the shadow of the player vehicle object reflected on the terrain object (second object) and the shadow of the enemy vehicle object reflected on the terrain object are generated by different methods.

まずプレーヤ車両オブジェクトについての影の生成手法(第1の影処理の手法)を説明する。プレーヤ車両オブジェクトについては、影テクスチャを地形オブジェクトに投影マッピングして、影テクスチャから得た影濃度パラメータの分布パターンに応じて地形オブジェクトの色を暗くしてプレーヤ車両オブジェクトの影を生成している。   First, a shadow generation method (first shadow processing method) for the player vehicle object will be described. For the player vehicle object, the shadow texture is projected and mapped onto the terrain object, and the shadow of the player vehicle object is generated by darkening the color of the terrain object according to the distribution pattern of the shadow density parameter obtained from the shadow texture.

具体的には、図7に示すように、車両オブジェクトOB1に対して基準点Cを設定し、基準点Cを投影中心とする投影マッピング用の仮想カメラVCを地形オブジェクトOB2に向けて設置する。   Specifically, as shown in FIG. 7, a reference point C is set for the vehicle object OB1, and a virtual camera VC for projection mapping with the reference point C as the projection center is set toward the terrain object OB2.

そして仮想カメラVCからの射影空間と交差する領域R1を影テクスチャTEXの投影マッピングの対象領域として、領域R1に影テクスチャTEXを置いたときの領域R1内に含まれる頂点V(X、Y、Z)と影テクスチャTEXのテクセルT(U、V)との対応付けを行う。   Then, the region R1 intersecting with the projection space from the virtual camera VC is set as a target region for the projection mapping of the shadow texture TEX, and the vertex V (X, Y, Z included in the region R1 when the shadow texture TEX is placed in the region R1. ) And the texel T (U, V) of the shadow texture TEX.

具体的には、所与の変換マトリクスを用いて地形オブジェクトOB2の領域R1内の頂点座標を影テクスチャTEXのテクスチャ座標に変換することで地形オブジェクトOB2の頂点と影テクスチャTEXのテクセルとが対応づけられる。例えば、地形オブジェクトOB2の頂点の座標値をローカル座標系(モデル座標系)の座標値からワールド座標系の座標値へ変換するワールドマトリクスWと、仮想カメラVCの投影中心を原点とするビュー座標系(視点座標系)への変換を行うビューマトリクスVと、車両オブジェクトOB1のサイズ(H、W)に応じた影の広がり具合(投影中心からの距離に応じた影テクスチャTEXの拡大率)と投影中心に対する影の生成位置のずれ具合を表す射影マトリクスPと、各マトリクスW,V,Pによって得られたテクスチャ座標の座標系の中心(原点)をずらすとともに値域を正規化(−1〜1を0〜1に正規化)するための行列要素を含む補正マトリクスとを用意して、これらの各マトリクスに基づいて、コースオブジェクトOB2の頂点座標をテクスチャ座標に変換するための変換マトリクスmを求めることができる。   Specifically, the vertex coordinates of the terrain object OB2 and the texels of the shadow texture TEX are associated by converting the vertex coordinates in the region R1 of the terrain object OB2 into the texture coordinates of the shadow texture TEX using a given conversion matrix. It is done. For example, a world matrix W that converts the coordinate value of the vertex of the terrain object OB2 from the coordinate value of the local coordinate system (model coordinate system) to the coordinate value of the world coordinate system, and the view coordinate system that has the projection center of the virtual camera VC as the origin View matrix V for conversion to (viewpoint coordinate system), shadow spread according to size (H, W) of vehicle object OB1 (expansion rate of shadow texture TEX according to distance from projection center) and projection The projection matrix P representing the deviation of the generation position of the shadow with respect to the center and the center (origin) of the coordinate system of the texture coordinate obtained by each matrix W, V, P are shifted and the range is normalized (-1 to 1) And a correction matrix including matrix elements for normalization to 0 to 1, and based on each of these matrices, the course object OB2 Can be obtained conversion matrix m to convert the point coordinates to the texture coordinates.

また影テクスチャTEXを地形オブジェクトOB2に投影マッピングする場合には、車両オブジェクトOB1に対して設定した基準点Cの位置と地形オブジェクトOB2の位置とに基づいて距離パラメータ(h)を求めておく。距離パラメータ(h)は、地形オブジェクトOB2の領域R1内の頂点毎に求めておくことが好ましい。このようにすれば、地形オブジェクトOB2の面の傾斜や凹凸を反映した影を生成することができる。   When the shadow texture TEX is projected and mapped onto the terrain object OB2, the distance parameter (h) is obtained based on the position of the reference point C set for the vehicle object OB1 and the position of the terrain object OB2. The distance parameter (h) is preferably obtained for each vertex in the region R1 of the terrain object OB2. In this way, it is possible to generate a shadow that reflects the inclination and unevenness of the surface of the topographic object OB2.

そして、地形オブジェクトOB2の領域R1内の頂点に対応づけられたテクセルのテクセルデータ(R、G、B、A)と距離パラメータ(h)とに基づいて、上記変換式を用いて影濃度パラメータsを求めて、図8に示すように、地形オブジェクトOB2の領域R1については、RGB(o)=RGB(m)×(1−s)として地形オブジェクトOB2のオブジェクトデータに基づき得られる色RGB(m)を影濃度パラメータsに応じて暗く(輝度を低く)した色RGB(o)を描画色として設定することにより地形オブジェクトOB2の領域R1に対して車両オブジェクトOB1の影を生成することができる。一方、地形オブジェクトOB2の領域R1以外の領域R2については、地形オブジェクトOB2のオブジェクトデータに基づき得られる色RGB(m)を、そのまま描画色として設定する。なお色RGB(m)は、オブジェクトの頂点色であってもよいし、オブジェクトにテクスチャマッピングされるデカールテクスチャ(模様テクスチャ)のテクセルの色であってもよいし、頂点色とデカールテクスチャのテクセルの色との乗算結果であってもよい。   Then, based on the texel data (R, G, B, A) of the texel associated with the vertex in the region R1 of the topographic object OB2, and the distance parameter (h), the shadow density parameter s is calculated using the above conversion formula. As shown in FIG. 8, for the region R1 of the terrain object OB2, the color RGB (m) obtained based on the object data of the terrain object OB2 as RGB (o) = RGB (m) × (1-s) ) In accordance with the shadow density parameter s, the color RGB (o) darkened (lower brightness) is set as the drawing color, so that the shadow of the vehicle object OB1 can be generated in the region R1 of the topographic object OB2. On the other hand, for the region R2 other than the region R1 of the terrain object OB2, the color RGB (m) obtained based on the object data of the terrain object OB2 is set as the drawing color as it is. Note that the color RGB (m) may be the vertex color of the object, the texel color of the decal texture (pattern texture) mapped to the object, or the vertex color and the texel of the decal texture. It may be a multiplication result with a color.

続いて、敵車両オブジェクトについての影の生成手法(第2の影処理の手法)を説明する。敵車両オブジェクトについては、黒色(影の色)を頂点色として設定した単色の四角形ポリゴンである影ポリゴンを、影テクスチャから得た影濃度パラメータを半透明度として、地形オブジェクトに重ねて半透明描画することで、影濃度パラメータの分布パターンに応じて地形オブジェクトの色を暗くして敵車両オブジェクトの影を生成している。   Next, a shadow generation method (second shadow processing method) for the enemy vehicle object will be described. For enemy vehicle objects, a shadow polygon, which is a single-color quadrilateral polygon set with black (shadow color) as the vertex color, is drawn semi-transparently overlaid on the terrain object using the shadow density parameter obtained from the shadow texture as the translucency. Thus, the shadow of the enemy vehicle object is generated by darkening the color of the terrain object according to the distribution pattern of the shadow density parameter.

具体的には、図9(A)に示すように、車両オブジェクトOB1に設定した基準点Cの位置に基づいて、地形オブジェクトOB2上の領域R1を影ポリゴンの描画位置として決定する。このとき領域R1は、車両オブジェクトOB1を地形オブジェクトOB2に平行投影した位置(真下の位置)としてもよいが、本実施形態では影ポリゴンの描画位置を車両オブジェクトOB1の中心からずれた位置に設定している。このようにすれば、画像を見る者に擬似的に光源の方向を意識させることができる。また影ポリゴンは地形オブジェクトOB2から少し浮かせた位置に置くようにしてもよい。このようにすれば、地形オブジェクトOB2の面の傾斜や凹凸によって影ポリゴンの一部が地形オブジェクトOB2の下にめり込んでしまうような事態を防ぐことができる。   Specifically, as shown in FIG. 9A, based on the position of the reference point C set on the vehicle object OB1, the region R1 on the terrain object OB2 is determined as the drawing position of the shadow polygon. At this time, the region R1 may be a position (directly below) where the vehicle object OB1 is parallel-projected on the terrain object OB2, but in the present embodiment, the drawing position of the shadow polygon is set to a position shifted from the center of the vehicle object OB1. ing. In this way, it is possible to make the viewer of the image aware of the direction of the light source in a pseudo manner. The shadow polygon may be placed at a position slightly lifted from the terrain object OB2. In this way, it is possible to prevent a situation in which a part of the shadow polygon is sunk under the terrain object OB2 due to the inclination or unevenness of the surface of the terrain object OB2.

また図9(B)に示すように、影ポリゴンSPは、予め頂点に影テクスチャTEX用のテクスチャ座標が設定されていて、頂点V1〜V4に対して影テクスチャTEXの4角のテクセルT1〜T4が対応づけられている。   As shown in FIG. 9B, the shadow polygon SP has texture coordinates for the shadow texture TEX set in advance at the vertices, and the four texels T1 to T4 of the shadow texture TEX with respect to the vertices V1 to V4. Are associated.

そして地形オブジェクトOB2の領域R1に影ポリゴンSPを重ねて描画する際には、図10に示すように、影テクスチャTEXのテクセルデータ(R、G、B、A)と、車両オブジェクトOB1の基準点Cの位置(高さ)と地形オブジェクトOB2の位置(高さ)とに基づいて求められる距離パラメータ(h)とに基づいて、上記変換式により影濃度パラメータ(s)の分布パターンを得て、影濃度パラメータ(s)の分布パターンを影ポリゴンSPのαプレーンとして半透明描画する。このようにすると、領域R1における地形オブジェクトOB2の描画色RGB(o)は、RGB(o)=RGB(m)×(1−s)+RGB(s)×sにより求められる。なおRGB(m)は地形オブジェクトOB2のオブジェクトデータに基づいて得られる色であり、RGB(s)は、影ポリゴンSPの頂点V1〜V4に設定された色(影の色)である。本実施形態では、影ポリゴンSPに設定された影の色が黒色(R=0、G=0、B=0)であるため、実際の地形オブジェクトOB2の描画色RGB(o)は、RGB(o)=RGB(m)×(1−s)となって、地形オブジェクトOB2の色が影濃度パラメータ(s)に応じて暗くした色で領域R1に影が描かれる。   When the shadow polygon SP is drawn over the region R1 of the terrain object OB2, as shown in FIG. 10, the texel data (R, G, B, A) of the shadow texture TEX and the reference point of the vehicle object OB1 Based on the distance parameter (h) obtained based on the position (height) of C and the position (height) of the topographic object OB2, the distribution pattern of the shadow density parameter (s) is obtained by the above conversion formula, The distribution pattern of the shadow density parameter (s) is rendered translucent as the α plane of the shadow polygon SP. In this way, the drawing color RGB (o) of the topographic object OB2 in the region R1 is obtained by RGB (o) = RGB (m) × (1−s) + RGB (s) × s. Note that RGB (m) is a color obtained based on the object data of the terrain object OB2, and RGB (s) is a color (shadow color) set to the vertices V1 to V4 of the shadow polygon SP. In this embodiment, since the shadow color set in the shadow polygon SP is black (R = 0, G = 0, B = 0), the actual drawing color RGB (o) of the topographic object OB2 is RGB ( o) = RGB (m) × (1−s), and the shadow is drawn in the region R1 with the color of the terrain object OB2 darkened according to the shadow density parameter (s).

以上に説明したように本実施形態の手法によれば、車両オブジェクトOB1(プレーヤ車両オブジェクト又は敵車両オブジェクト)が地形オブジェクトOB2から離れるほど影の濃度が薄くなるように影テクスチャTEXのテクセルデータ(R、G、B、A)が設定されていて、上記のような変換式を用いることにより、距離パラメータ(h)の2次関数に反比例して変化するような影濃度パラメータ(s)を求めることができる。そして1枚の影テクスチャTEXから得られる影濃度パラメータ(s)の分布パターンに応じて地形オブジェクトOB2の色を暗く(輝度値を低く)することによって、メモリの消費量を節約しながら地表からの車両の高さに応じたリアルな車両の影を生成することができる。   As described above, according to the method of the present embodiment, the texel data (R of the shadow texture TEX) such that the density of the shadow decreases as the vehicle object OB1 (player vehicle object or enemy vehicle object) moves away from the terrain object OB2. , G, B, A) are set, and the shadow density parameter (s) that changes in inverse proportion to the quadratic function of the distance parameter (h) is obtained by using the above conversion formula. Can do. Then, by darkening the color of the terrain object OB2 according to the distribution pattern of the shadow density parameter (s) obtained from one shadow texture TEX (lowering the brightness value), the memory consumption can be saved while saving the memory consumption. A realistic vehicle shadow according to the height of the vehicle can be generated.

3.本実施形態の処理
次に、本実施形態の詳細な処理例について図11及び図12のフローチャートを用いて説明する。
3. Processing of this embodiment Next, a detailed processing example of this embodiment will be described with reference to the flowcharts of FIGS. 11 and 12.

まず図11を参照しながら、車両オブジェクトがプレーヤ車両オブジェクトである場合の影処理の例を説明する。   First, an example of shadow processing when the vehicle object is a player vehicle object will be described with reference to FIG.

はじめに車両オブジェクトOB1の位置、向きを求めておき(ステップS10)、車両オブジェクトOB1の位置と、車両オブジェクトOB1の向きと、車両オブジェクトOB1のサイズ(形状)とに応じた変換マトリクスmを演算する(ステップS11)。   First, the position and orientation of the vehicle object OB1 are obtained (step S10), and a conversion matrix m is calculated according to the position of the vehicle object OB1, the orientation of the vehicle object OB1, and the size (shape) of the vehicle object OB1 ( Step S11).

次に、地形オブジェクトOB2の頂点の位置座標を変換マトリクスmを用いてテクスチャ座標に変換するとともに、地形オブジェクトOB2の頂点の位置に対応する距離パラメータ(h)を求める。そして求めたテクスチャ座標に基づいて影テクスチャTEXをサンプリングし、影テクスチャTEXのテクセルデータ(R、G、B、A)と距離パラメータhとに基づいて影濃度パラメータsを求める。   Next, the position coordinates of the vertices of the terrain object OB2 are converted into texture coordinates using the conversion matrix m, and the distance parameter (h) corresponding to the position of the vertices of the terrain object OB2 is obtained. Then, the shadow texture TEX is sampled based on the obtained texture coordinates, and the shadow density parameter s is obtained based on the texel data (R, G, B, A) of the shadow texture TEX and the distance parameter h.

そして、地形オブジェクトOB2のオブジェクトデータに基づき得られる色(R、G、B)に1−sを乗算しながら地形オブジェクトOB2を描画するとともに車両オブジェクトOB1を描画して、地形オブジェクトOB2に車両オブジェクトOB1の高さに応じた影が生成された画像を得る(ステップS14、S15)。   Then, the terrain object OB2 is drawn while multiplying the color (R, G, B) obtained based on the object data of the terrain object OB2 by 1-s, the vehicle object OB1 is drawn, and the vehicle object OB1 is drawn on the terrain object OB2. An image in which a shadow corresponding to the height of the image is generated is obtained (steps S14 and S15).

次に図12を参照しながら、車両オブジェクトが敵車両オブジェクトである場合の影処理の例を説明する。   Next, an example of shadow processing when the vehicle object is an enemy vehicle object will be described with reference to FIG.

まず車両オブジェクトOB1の位置、向きを求めておき(ステップS20)、車両オブジェクトOB1の位置、向きに基づいて、影ポリゴンSPの位置、向きを演算する(ステップS21)。また車両オブジェクトOB1の位置に基づいて距離パラメータhを求めておく(ステップS22)。   First, the position and orientation of the vehicle object OB1 are obtained (step S20), and the position and orientation of the shadow polygon SP are calculated based on the position and orientation of the vehicle object OB1 (step S21). Further, a distance parameter h is obtained based on the position of the vehicle object OB1 (step S22).

次に影テクスチャTEXを読み込んで(ステップS23)、影テクスチャTEXのテクセルデータ(R、G、B、A)と距離パラメータhに基づいて影濃度パラメータsを求める(ステップS24)。そして地形オブジェクトOB2を描画するとともに、影濃度パラメータsを影ポリゴンSPのα値として影ポリゴンSPを地形オブジェクトOB2に重ねて半透明描画する(ステップS25)。そして車両オブジェクトOB1を描画することにより地形オブジェクトOB2に車両オブジェクトOB1の高さに応じた影が生成された画像を得る(ステップS26)。   Next, the shadow texture TEX is read (step S23), and the shadow density parameter s is obtained based on the texel data (R, G, B, A) of the shadow texture TEX and the distance parameter h (step S24). Then, the terrain object OB2 is drawn, and the shadow density parameter s is set to the α value of the shadow polygon SP, and the shadow polygon SP is superimposed on the terrain object OB2 to be rendered translucent (step S25). Then, by drawing the vehicle object OB1, an image in which a shadow corresponding to the height of the vehicle object OB1 is generated on the terrain object OB2 is obtained (step S26).

4.ハードウェア構成
図13に本実施形態を実現できるハードウェア構成の例を示す。メインプロセッサ900は、DVD982(情報記憶媒体。CDでもよい。)に格納されたプログラム、通信インターフェース990を介してダウンロードされたプログラム、或いはROM950に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などを実行する。コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、マトリクス演算(ベクトル演算)を高速に実行する。例えばオブジェクトを移動させたり動作(モーション)させる物理シミュレーションに、マトリクス演算処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
4). Hardware Configuration FIG. 13 shows an example of a hardware configuration that can realize this embodiment. The main processor 900 operates based on a program stored in a DVD 982 (information storage medium, which may be a CD), a program downloaded via the communication interface 990, a program stored in the ROM 950, or the like. Perform processing, sound processing, etc. The coprocessor 902 assists the processing of the main processor 900, and executes matrix operation (vector operation) at high speed. For example, when a matrix calculation process is required for a physical simulation for moving or moving an object, a program operating on the main processor 900 instructs (requests) the process to the coprocessor 902.

ジオメトリプロセッサ904は、メインプロセッサ900上で動作するプログラムからの指示に基づいて、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、マトリクス演算を高速に実行する。データ伸張プロセッサ906は、圧縮された画像データや音データのデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセレートする。これにより、オープニング画面やゲーム画面において、MPEG方式等で圧縮された動画像を表示できる。   The geometry processor 904 performs geometry processing such as coordinate conversion, perspective conversion, light source calculation, and curved surface generation based on an instruction from a program operating on the main processor 900, and executes matrix calculation at high speed. The data decompression processor 906 performs decoding processing of compressed image data and sound data, and accelerates the decoding processing of the main processor 900. Thereby, a moving image compressed by the MPEG method or the like can be displayed on the opening screen or the game screen.

描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエイリアシング、シェーディング処理なども行う。頂点シェーダやピクセルシェーダなどのプログラマブルシェーダが実装されている場合には、シェーダプログラムに従って、頂点データの作成・変更(更新)やピクセル(あるいはフラグメント)の描画色の決定を行う。1フレーム分の画像がフレームバッファ922に書き込まれるとその画像はディスプレイ912に表示される。   The drawing processor 910 executes drawing (rendering) processing 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, transfers the texture to the texture storage unit 924. Then, the drawing processor 910 draws the object in the frame buffer 922 while performing hidden surface removal using a Z buffer or the like based on the drawing data and texture. The drawing processor 910 also performs α blending (translucent processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. When a programmable shader such as a vertex shader or a pixel shader is installed, the vertex data is created / changed (updated) and the drawing color of a pixel (or fragment) is determined according to the shader program. 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を介して出力する。ゲームコントローラ942やメモリカード944からのデータはシリアルインターフェース940を介して入力される。   The sound processor 930 includes a multi-channel ADPCM sound source and the like, generates game sounds such as BGM, sound effects, and sounds, and outputs them through the speaker 932. Data from the game controller 942 and the memory card 944 is input via the serial interface 940.

ROM950にはシステムプログラムなどが格納される。業務用ゲームシステムの場合にはROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納される。なおROM950の代わりにハードディスクを利用してもよい。RAM960は各種プロセッサの作業領域となる。DMAコントローラ970は、プロセッサ、メモリ間でのDMA転送を制御する。DVDドライブ980(CDドライブでもよい。)は、プログラム、画像データ、或いは音データなどが格納されるDVD982(CDでもよい。)にアクセスする。通信インターフェース990はネットワーク(通信回線、高速シリアルバス)を介して外部との間でデータ転送を行う。   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. The RAM 960 is a work area for various processors. The DMA controller 970 controls DMA transfer between the processor and the memory. The DVD drive 980 (may be a CD drive) accesses a DVD 982 (may be a CD) in which programs, image data, sound data, and the like are stored. The communication interface 990 performs data transfer with the outside via a network (communication line, high-speed serial bus).

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

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

なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書又は図面中の記載において広義や同義な用語として引用された用語は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。また接触痕跡の表現手法も、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。   The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms cited as broad or synonymous terms in the description in the specification or drawings can be replaced with broad or synonymous terms in other descriptions in the specification or drawings. Further, the method of expressing the contact trace is not limited to that described in the present embodiment, and a method equivalent to these is also included in the scope of the present invention.

また上記実施形態では、テクスチャ投影や影ポリゴンの描画により地形オブジェクトに対して影を生成する手法を採用したが、上記以外の手法を採用してもよい。   In the above-described embodiment, a method of generating a shadow for a terrain object by texture projection or drawing of a shadow polygon is employed, but a method other than the above may be employed.

また本発明は種々のゲーム(レーシングゲーム、格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々の画像生成システムに適用できる。   The present invention can be applied to various games (racing game, fighting game, shooting game, robot battle game, sports game, competition game, role playing game, music playing game, dance game, etc.). Further, the present invention is applied to various image generation 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, a system board for generating a game image, and a mobile phone. it can.

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 本実施形態の手法を用いて描かれた画像。The image drawn using the method of this embodiment. 本実施形態の手法で用いられる影テクスチャの例。The example of the shadow texture used with the method of this embodiment. 本実施形態の手法で用いられる影テクスチャの説明図。Explanatory drawing of the shadow texture used with the method of this embodiment. 本実施形態の手法で用いられる影テクスチャの生成過程の説明図。Explanatory drawing of the production | generation process of the shadow texture used with the method of this embodiment. 本実施形態の手法で用いられる影テクスチャの生成過程の説明図。Explanatory drawing of the production | generation process of the shadow texture used with the method of this embodiment. 本実施形態の手法を説明するための図。The figure for demonstrating the method of this embodiment. 本実施形態の手法を説明するための図。The figure for demonstrating the method of this embodiment. 本実施形態の手法を説明するための図。The figure for demonstrating the method of this embodiment. 本実施形態の手法を説明するための図。The figure for demonstrating the method of this embodiment. 本実施形態の処理の例を示すフローチャート。The flowchart which shows the example of the process of this embodiment. 本実施形態の処理の例を示すフローチャート。The flowchart which shows the example of the process of this embodiment. ハードウェア構成の例。An example of a hardware configuration.

符号の説明Explanation of symbols

OB1 車両オブジェクト(第1のオブジェクト)、
OB2 地形オブジェクト(第2のオブジェクト)、
TEX 影テクスチャ、SP 影ポリゴン、C 基準点、
100 処理部、110 オブジェクト空間設定部、112 移動・動作処理部、
114 仮想カメラ制御部、116 距離演算部、120 描画部、122 影処理部、
124 影濃度演算部、160 操作部、170 記憶部、172 主記憶部、
174 描画バッファ、176 オブジェクトデータ記憶部、
178 テクスチャ記憶部、180 情報記憶媒体、190 表示部、
192 音出力部、194 携帯型情報記憶装置、196 通信部、
OB1 vehicle object (first object),
OB2 Terrain object (second object),
TEX shadow texture, SP shadow polygon, C reference point,
100 processing unit, 110 object space setting unit, 112 movement / motion processing unit,
114 virtual camera control unit, 116 distance calculation unit, 120 drawing unit, 122 shadow processing unit,
124 shadow density calculation unit, 160 operation unit, 170 storage unit, 172 main storage unit,
174 Drawing buffer, 176 Object data storage unit,
178 texture storage unit, 180 information storage medium, 190 display unit,
192 sound output unit, 194 portable information storage device, 196 communication unit,

Claims (7)

オブジェクト空間を所与の視点から見た画像を生成するためのプログラムであって、
影テクスチャを記憶するテクスチャ記憶部と、
前記オブジェクト空間内における第1のオブジェクトと第2のオブジェクトとの位置関係に基づいて距離パラメータを求める距離演算部と、
前記距離パラメータと、前記テクスチャ記憶部から読み出された影テクスチャのテクセルデータとに基づき得られる影濃度パラメータに基づいて、第2のオブジェクトに対して第1のオブジェクトの影を生成する影処理を行う影処理部として、
コンピュータを機能させ
前記影テクスチャのテクセルには、RGBの各色成分の輝度値(R、G、B)と、α値(A)とが前記テクセルデータとして設定されており、
前記影処理部が、
前記影テクスチャのテクセルデータ(R、G、B、A)と、前記距離パラメータ(h)とに基づいて、各テクセルに対応する前記影濃度パラメータ(s)を求めることを特徴とするプログラム。
A program for generating an image of an object space viewed from a given viewpoint,
A texture storage unit for storing shadow texture;
A distance calculation unit for obtaining a distance parameter based on a positional relationship between the first object and the second object in the object space;
Shadow processing for generating a shadow of the first object for the second object based on the shadow density parameter obtained based on the distance parameter and the texel data of the shadow texture read from the texture storage unit As a shadow processing unit to perform
Make the computer work ,
In the shadow texture texel, luminance values (R, G, B) of each color component of RGB and an α value (A) are set as the texel data,
The shadow processing unit
A program for obtaining the shadow density parameter (s) corresponding to each texel based on the texel data (R, G, B, A) of the shadow texture and the distance parameter (h) .
請求項1において、
前記影処理部が、下式により各テクセルに対応する前記影濃度パラメータ(s)を求めることを特徴とするプログラム。
In claim 1,
The shadow processing unit obtains the shadow density parameter (s) corresponding to each texel by the following equation .
請求項1または2において、In claim 1 or 2,
前記オブジェクト空間には、前記第1のオブジェクトとして、プレーヤオブジェクトと敵オブジェクトとが設定され、前記第2のオブジェクトとして、地形オブジェクトが設定され、  In the object space, a player object and an enemy object are set as the first object, and a terrain object is set as the second object.
前記影処理部が、  The shadow processing unit
前記地形オブジェクトに対して前記プレーヤオブジェクトの影を生成する場合には第1の影処理を行い、前記地形オブジェクトに対して前記敵オブジェクトの影を生成する場合には第1の影処理とは処理内容が異なる第2の影処理を行うことを特徴とするプログラム。  When the shadow of the player object is generated for the terrain object, a first shadow process is performed. When the shadow of the enemy object is generated for the terrain object, the first shadow process is a process. A program that performs second shadow processing with different contents.
請求項3において、  In claim 3,
前記距離演算部が、  The distance calculation unit is
前記プレーヤオブジェクトに設定した基準点の位置に基づいて前記距離パラメータを求め、  Obtaining the distance parameter based on the position of the reference point set in the player object;
前記影処理部が、  The shadow processing unit
前記基準点を投影中心として前記地形オブジェクトに対して前記影テクスチャを投影して前記地形オブジェクトの頂点と前記影テクスチャのテクセルとを対応付け、前記頂点に対応づけられたテクセルのテクセルデータと、前記距離パラメータとに基づき得られる影濃度パラメータに応じて前記地形オブジェクトの色を暗くする処理を第1の影処理として行うことを特徴とするプログラム。  Projecting the shadow texture onto the terrain object with the reference point as the projection center to associate the vertex of the terrain object with the texel of the shadow texture, texel data of the texel associated with the vertex, and A program for performing a process of darkening the color of the terrain object as a first shadow process according to a shadow density parameter obtained based on a distance parameter.
請求項3において、  In claim 3,
前記距離演算部が、  The distance calculation unit is
前記敵オブジェクトに設定した基準点の位置に基づいて前記距離パラメータを求め、  Obtaining the distance parameter based on the position of the reference point set in the enemy object;
前記影処理部が、  The shadow processing unit
求められた前記距離パラメータと、影ポリゴンの頂点に予め対応づけられた前記影テクスチャのテクセルのテクセルデータとに基づき得られる影濃度パラメータを用いて、頂点に影の色が予め対応づけられた前記影ポリゴンの透明度を設定し、前記敵オブジェクトの位置に応じて定められる前記地形オブジェクトの所与の領域に前記影ポリゴンを描画する処理を第2の影処理として行うことを特徴とするプログラム。  The shadow color is previously associated with the vertex using the shadow density parameter obtained based on the obtained distance parameter and the texel data of the texel of the shadow texture previously associated with the vertex of the shadow polygon. A program which sets transparency of a shadow polygon and draws the shadow polygon in a given area of the terrain object determined according to the position of the enemy object as a second shadow process.
コンピュータにより読取可能な情報記憶媒体であって、請求項1〜5のいずれかに記載のプログラムを記憶することを特徴とする情報記憶媒体。An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 5 is stored. オブジェクト空間を所与の視点から見た画像を生成するための画像生成システムであって、  An image generation system for generating an image of an object space viewed from a given viewpoint,
影テクスチャを記憶するテクスチャ記憶部と、  A texture storage unit for storing shadow texture;
前記オブジェクト空間内における第1のオブジェクトと第2のオブジェクトとの位置関係に基づいて距離パラメータを求める距離演算部と、  A distance calculation unit for obtaining a distance parameter based on a positional relationship between the first object and the second object in the object space;
前記距離パラメータと、前記テクスチャ記憶部から読み出された影テクスチャのテクセルデータとに基づき得られる影濃度パラメータに基づいて、第2のオブジェクトに対して第1のオブジェクトの影を生成する影処理を行う影処理部と、  Shadow processing for generating a shadow of the first object for the second object based on the shadow density parameter obtained based on the distance parameter and the texel data of the shadow texture read from the texture storage unit A shadow processing unit to perform;
を含み、  Including
前記影テクスチャのテクセルには、RGBの各色成分の輝度値(R、G、B)と、α値(A)とが前記テクセルデータとして設定されており、  In the shadow texture texel, luminance values (R, G, B) of each color component of RGB and an α value (A) are set as the texel data,
前記影処理部が、  The shadow processing unit
前記影テクスチャのテクセルデータ(R、G、B、A)と、距離パラメータ(h)とに基づいて、各テクセルに対応する前記影濃度パラメータ(s)を求めることを特徴とする画像生成システム。  An image generation system, wherein the shadow density parameter (s) corresponding to each texel is obtained based on texel data (R, G, B, A) of the shadow texture and a distance parameter (h).
JP2005336050A 2005-11-21 2005-11-21 Program, texture data structure, information storage medium, and image generation system Active JP4804122B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005336050A JP4804122B2 (en) 2005-11-21 2005-11-21 Program, texture data structure, information storage medium, and image generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005336050A JP4804122B2 (en) 2005-11-21 2005-11-21 Program, texture data structure, information storage medium, and image generation system

Publications (2)

Publication Number Publication Date
JP2007141082A JP2007141082A (en) 2007-06-07
JP4804122B2 true JP4804122B2 (en) 2011-11-02

Family

ID=38203841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005336050A Active JP4804122B2 (en) 2005-11-21 2005-11-21 Program, texture data structure, information storage medium, and image generation system

Country Status (1)

Country Link
JP (1) JP4804122B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4941934B2 (en) * 2007-06-08 2012-05-30 サミー株式会社 Image generating apparatus and image generating program
JP5350612B2 (en) * 2007-07-04 2013-11-27 任天堂株式会社 GAME PROGRAM, GAME DEVICE, GAME SYSTEM, AND GAME PROCESSING METHOD
JP5469516B2 (en) 2010-04-12 2014-04-16 任天堂株式会社 Image display program, image display system, image display method, and image display apparatus
CN103080981B (en) * 2010-08-27 2016-03-02 矽锂铬艺术有限公司 Select the method for MIP-map level and utilize the texturing system of the method
CN116126170A (en) * 2016-06-28 2023-05-16 株式会社尼康 Display device and control device
CA3045133C (en) * 2019-06-03 2023-03-21 Eidos Interactive Corp. Systems and methods for augmented reality applications
CN111311723B (en) * 2020-01-22 2021-11-02 腾讯科技(深圳)有限公司 Pixel point identification and illumination rendering method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08276074A (en) * 1995-04-03 1996-10-22 Sega Enterp Ltd Game machine and its data processing method
JP3667393B2 (en) * 1995-08-04 2005-07-06 株式会社ナムコ 3D game device and image composition method
JP2001101445A (en) * 1999-10-01 2001-04-13 Tsuneo Ikedo Soft shadow casting circuit

Also Published As

Publication number Publication date
JP2007141082A (en) 2007-06-07

Similar Documents

Publication Publication Date Title
JP4651435B2 (en) Program, information storage medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP4651527B2 (en) Program, information storage medium, and image generation system
JP3748451B1 (en) Program, information storage medium, and image generation system
JP4824514B2 (en) Program, information storage medium, and image generation system
JP2006252426A (en) Program, information storage medium, and image generation system
JP4743770B2 (en) Image generation system, program, and information storage medium
JP4754384B2 (en) Program, information recording medium, and image generation system
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4861862B2 (en) Program, information storage medium, and image generation system
JP2008077304A (en) Program, information storage medium, and image generation system
JP4488346B2 (en) Program, information storage medium, and image generation system
JP4528008B2 (en) Program, information storage medium, and image generation system
JP4913399B2 (en) Program, information storage medium, and image generation system
JP4574058B2 (en) Image generation system, program, and information storage medium
JP4592087B2 (en) Image generation system, program, and information storage medium
JP4688648B2 (en) Program, information storage medium, and image generation system
JP2006252423A (en) Program, information storage medium and image generation system
JP2006277488A (en) Program, information storage medium and image generation system
JP2006252291A (en) Program, information storage medium and image generation system
JP4865471B2 (en) Program, information storage medium, and image generation system
JP2008077406A (en) Image generation system, program, and information storage medium
JP2007164736A (en) Image generation system, program and information storage medium
JP4749131B2 (en) Program, information storage medium, and image generation system
JP4641831B2 (en) Program, information storage medium, and image generation system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110323

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110520

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110803

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110809

R150 Certificate of patent or registration of utility model

Ref document number: 4804122

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140819

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140819

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250