JP4563070B2 - GAME DEVICE AND GAME PROGRAM - Google Patents
GAME DEVICE AND GAME PROGRAM Download PDFInfo
- Publication number
- JP4563070B2 JP4563070B2 JP2004130198A JP2004130198A JP4563070B2 JP 4563070 B2 JP4563070 B2 JP 4563070B2 JP 2004130198 A JP2004130198 A JP 2004130198A JP 2004130198 A JP2004130198 A JP 2004130198A JP 4563070 B2 JP4563070 B2 JP 4563070B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- texture
- game
- polygon
- generating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Generation (AREA)
Description
本発明はゲーム装置に関し、より特定的には、ゲーム空間の一部が光で照らされているような画像を生成するゲーム装置に関する。 The present invention relates to a game apparatus, and more particularly to a game apparatus that generates an image in which a part of a game space is illuminated with light.
従来、3Dグラフィックス処理では、仮想空間に存在するオブジェクトに落ちた影を表現することによって、よりリアルな3D画像を生成している。影を表現する手法としては種々の手法が存在する。例えば、シャドウマップやシャドウボリューム等を利用すれば、仮想空間内のあるオブジェクトが別のオブジェクトに落とす影を正確に表現することができる。 Conventionally, in 3D graphics processing, a more realistic 3D image is generated by expressing a shadow that falls on an object existing in a virtual space. There are various methods for expressing a shadow. For example, by using a shadow map, a shadow volume, or the like, it is possible to accurately represent a shadow that an object in the virtual space drops on another object.
また、より簡易的にハイライトや影を表現する手法も存在する。例えば、特許文献1には投影テクスチャを用いてハイライトや影を表現するゲーム装置が開示されている。特許文献1に開示されたゲーム装置では、元絵テクスチャと半透明の投影テクスチャを重ねてマッピングしてアルファブレンディングを施すことによって、ハイライトや影の表現を実現している。
しかし、上記のシャドウマップやシャドウボリューム等を利用した影の描画処理は、影を描画するための処理負荷が大きく、高速な描画が要求されるゲーム処理などには向かないという問題がある。 However, the shadow drawing process using the above-described shadow map, shadow volume, or the like has a problem that the processing load for drawing the shadow is large and it is not suitable for a game process that requires high-speed drawing.
また、特許文献1に開示された方法では、半透明の黒いテクスチャを元絵テクスチャに重ねてマッピングしているため、ハイライト部分以外の部分において画像が暗くなってしまうため、元絵の質感や色合いがなくなってしまう。
Further, in the method disclosed in
なお、ハイライト部分だけを周囲よりも明るくするために、ハイライト部分に半透明の灰色のテクスチャをマッピングし、元絵テクスチャとこの半透明の灰色のテクスチャとを加算混色してハイライトを表現することも考えられる。しかしながらこの場合には、元絵テクスチャの明るさが一様に増加するため、元絵の質感が失われてしまう。 In order to make only the highlight part brighter than the surroundings, a semi-transparent gray texture is mapped to the highlight part, and the original picture texture and this semi-transparent gray texture are added and mixed to express the highlight. It is also possible to do. However, in this case, since the brightness of the original picture texture increases uniformly, the texture of the original picture is lost.
そこで本発明は、元絵の質感や色合いを残しつつ、ライトの表現をおこなうことができるゲーム装置を提供することを目的とする。 Therefore, an object of the present invention is to provide a game device that can express light while leaving the texture and color of the original picture.
上記目的を達成するために、本発明は以下の構成を採用した。なお、括弧内の参照符号や図番号や補足説明は、本発明の理解を助けるために後述する実施形態との対応関係を示したものであって、本発明の範囲を何ら限定するものではない。 In order to achieve the above object, the present invention employs the following configuration. Note that the reference numerals, figure numbers, and supplementary explanations in parentheses indicate the correspondence with the embodiments described later in order to help understanding of the present invention, and do not limit the scope of the present invention. .
第1の発明は、中間画像データ生成手段と、加算手段と、表示制御手段とを備えるゲーム装置である。
中間画像データ生成手段は、原画像データ(図10の第1データ)をマスクデータ(図6)でマスクした中間画像データ(図11の第2データ)を生成する(図11)。加算手段は、前記原画像データに前記中間画像データを加算する(図12)。表示制御手段は、前記加算手段から出力される画像データ(図12の第3データ)に基づいてゲーム画像を生成して表示手段に表示する。
なお、原画像データとは、マスク処理を施す前の画像データであって、例えば、記憶装置に予め用意された画像データであってもよいし、3Dグラフィックス処理によって生成した画像データであってもよい。
A first invention is a game apparatus including intermediate image data generation means, addition means, and display control means.
The intermediate image data generating means generates intermediate image data (second data in FIG. 11) obtained by masking original image data (first data in FIG. 10) with mask data (FIG. 6) (FIG. 11). The adding means adds the intermediate image data to the original image data (FIG. 12). The display control means generates a game image based on the image data (third data in FIG. 12) output from the adding means and displays it on the display means.
Note that the original image data is image data before mask processing, for example, image data prepared in advance in a storage device, or image data generated by 3D graphics processing. Also good.
第2の発明は、3次元の仮想空間を表示手段(12)に表示するゲーム装置であって、ポリゴンデータ記憶手段(34)と、地テクスチャ記憶手段(34)と、マスクテクスチャ記憶手段(34)と、第1データ生成手段(S16)と、第2データ生成手段(S17)と、加算手段(S18)と、表示制御手段(S21)とを備えるゲーム装置である。
ポリゴンデータ記憶手段は、ポリゴンデータを記憶する(図17)。地テクスチャ記憶手段は、地テクスチャを記憶する(図16)。マスクテクスチャ記憶手段は、マスクテクスチャ(図6)を記憶する(図16)。第1データ生成手段は、ポリゴンに前記地テクスチャをマッピングして第1データを生成する(図10)。第2データ生成手段は、前記ポリゴンに前記マスクテクスチャをマッピングし、前記第1データを前記マスクテクスチャでマスクした第2データを生成する(図11)。加算手段は、前記第1データに前記第2データを加算して第3データを生成する(図12)。表示制御手段は、前記第3データに基づいてゲーム画像を生成して前記表示手段に表示する。
なお、第1データ生成手段は、ポリゴンに地テクスチャをマッピングすると同時にライト処理を施すものであってもよい(図7)。
The second invention is a game apparatus for displaying a three-dimensional virtual space on the display means (12), and is a polygon data storage means (34), a ground texture storage means (34), and a mask texture storage means (34). ), First data generation means (S16), second data generation means (S17), addition means (S18), and display control means (S21).
The polygon data storage means stores polygon data (FIG. 17). The ground texture storage means stores the ground texture (FIG. 16). The mask texture storage means stores the mask texture (FIG. 6) (FIG. 16). The first data generating means generates the first data by mapping the ground texture onto the polygon (FIG. 10). The second data generating means maps the mask texture onto the polygon and generates second data obtained by masking the first data with the mask texture (FIG. 11). The adding means generates the third data by adding the second data to the first data (FIG. 12). The display control means generates a game image based on the third data and displays it on the display means.
Note that the first data generation means may perform a light process at the same time as mapping the ground texture to the polygon (FIG. 7).
第3の発明は、第2の発明において、前記第1データ生成手段は、仮想空間のライトの設定データおよび前記ポリゴンデータに基づいてポリゴン上の各点の明るさを示す明度データを生成し(図7〜図9)、当該明度データおよび前記地テクスチャに基づいて前記第1データを生成することを特徴とする(図10)。 In a third aspect based on the second aspect, the first data generation means generates lightness data indicating the brightness of each point on the polygon based on the light setting data of the virtual space and the polygon data. 7 to 9), the first data is generated based on the brightness data and the ground texture (FIG. 10).
第4の発明は、第2の発明において、前記第2データ生成手段は、前記第1データと前記マスクテクスチャを乗算することによって前記第2データを生成することを特徴とする(図11)。 In a fourth aspect based on the second aspect, the second data generation means generates the second data by multiplying the first data and the mask texture (FIG. 11).
第5の発明は、第4の発明において、前記ゲーム装置は、前記マスクテクスチャ記憶手段から読み出されたマスクテクスチャを所定の係数で乗算する係数乗算手段をさらに備え、前記第2データ生成手段は、前記係数乗算手段の乗算結果に基づいて前記第2データを生成することを特徴とする。 In a fifth aspect based on the fourth aspect, the game apparatus further comprises coefficient multiplication means for multiplying the mask texture read from the mask texture storage means by a predetermined coefficient, and the second data generation means The second data is generated based on a multiplication result of the coefficient multiplication means.
第6の発明は、コンピュータ(24、34)を、中間画像データ生成手段、加算手段、および表示制御手段として機能させるためのゲームプログラムである。
中間画像データ生成手段は、原画像データをマスクデータでマスクした中間画像データを生成する。加算手段は、前記原画像データに前記中間画像データを加算する。表示制御手段は、前記加算手段から出力される画像データに基づいてゲーム画像を生成して表示手段に表示する。
A sixth invention is a game program for causing a computer (24, 34) to function as intermediate image data generation means, addition means, and display control means.
The intermediate image data generation unit generates intermediate image data obtained by masking original image data with mask data. The adding means adds the intermediate image data to the original image data. The display control means generates a game image based on the image data output from the adding means and displays it on the display means.
第7の発明は、3次元の仮想空間を表示手段(12)に表示するゲーム装置のコンピュータ(24、34)を、ポリゴンデータ記憶手段、地テクスチャ記憶手段、マスクテクスチャ記憶手段、第1データ生成手段、第2データ生成手段、加算手段、および表示制御手段として機能させるためのゲームプログラムである。
ポリゴンデータ記憶手段は、ポリゴンデータを記憶する。地テクスチャ記憶手段は、地テクスチャを記憶する。マスクテクスチャ記憶手段は、マスクテクスチャを記憶する。第1データ生成手段は、ポリゴンに前記地テクスチャをマッピングして第1データを生成する。第2データ生成手段は、前記ポリゴンに前記マスクテクスチャをマッピングし、前記第1データを前記マスクテクスチャでマスクした第2データを生成する。加算手段は、前記第1データに前記第2データを加算して第3データを生成する。表示制御手段は、前記第3データに基づいてゲーム画像を生成して前記表示手段に表示する。
According to a seventh aspect of the present invention, there is provided a computer (24, 34) of a game apparatus that displays a three-dimensional virtual space on a display means (12), polygon data storage means, ground texture storage means, mask texture storage means, and first data generation. A game program for functioning as means, second data generation means, addition means, and display control means.
The polygon data storage means stores polygon data. The ground texture storage means stores the ground texture. The mask texture storage means stores the mask texture. The first data generation means generates the first data by mapping the ground texture to the polygon. The second data generation means maps the mask texture onto the polygon and generates second data obtained by masking the first data with the mask texture. Adding means generates the third data by adding the second data to the first data. The display control means generates a game image based on the third data and displays it on the display means.
第8の発明は、第7の発明において、前記第1データ生成手段は、仮想空間のライトの設定データおよび前記ポリゴンデータに基づいてポリゴン上の各点の明るさを示す明度データを生成し、当該明度データおよび前記地テクスチャに基づいて前記第1データを生成することを特徴とする。 In an eighth aspect based on the seventh aspect, the first data generation means generates lightness data indicating the brightness of each point on the polygon based on the light setting data of the virtual space and the polygon data. The first data is generated based on the brightness data and the ground texture.
第9の発明は、第7の発明において、前記第2データ生成手段は、前記第1データと前記マスクテクスチャを乗算することによって前記第2データを生成することを特徴とする。 According to a ninth aspect based on the seventh aspect, the second data generation means generates the second data by multiplying the first data and the mask texture.
第10の発明は、第9の発明において、前記ゲームプログラムは、前記コンピュータを、前記マスクテクスチャ記憶手段から読み出されたマスクテクスチャを所定の係数で乗算する係数乗算手段としてさらに機能させ、前記第2データ生成手段は、前記係数乗算手段の乗算結果に基づいて前記第2データを生成することを特徴とする。 In a tenth aspect based on the ninth aspect, the game program causes the computer to further function as coefficient multiplication means for multiplying the mask texture read from the mask texture storage means by a predetermined coefficient, The two-data generating unit generates the second data based on a multiplication result of the coefficient multiplying unit.
上記第1の発明によれば、原画像データをマスク処理した結果を原画像データに加算するため、明るくする部分が全体的に白っぽくなってしまうのを防ぐことができ、元絵の質感や色合いを残しつつ、ライトの表現をおこなうことができる。 According to the first invention, since the result of masking the original image data is added to the original image data, it is possible to prevent the portion to be brightened from becoming entirely whitish, and the texture and color of the original picture. It is possible to express light while leaving
上記第2の発明によれば、地テクスチャに基づいて生成した第1データをマスク処理した結果を第1データに加算するため、明るくする部分が全体的に白っぽくなってしまうのを防ぐことができ、元絵の質感や色合いを残しつつ、ライトの表現をおこなうことができる。 According to the second aspect, since the result of masking the first data generated based on the ground texture is added to the first data, it is possible to prevent the portion to be brightened from becoming entirely whitish. It is possible to express light while leaving the texture and color of the original picture.
上記第3の発明によれば、ライト処理をして一旦生成した3D画像に対して、その一部だけをさらに明るくすることができるので、ライトの表現を簡易的に加えることができる。 According to the third aspect of the present invention, since only a part of the 3D image once generated by the light processing can be further brightened, the expression of light can be easily added.
上記第4の発明によれば、乗算処理により第2データを簡単に生成することができる。 According to the fourth aspect, the second data can be easily generated by multiplication processing.
上記第5の発明によれば、マスクテクスチャに所望の係数を乗算することで、係数に応じた所望のライト効果が得られる。 According to the fifth aspect, by multiplying the mask texture by a desired coefficient, a desired light effect corresponding to the coefficient can be obtained.
以下、図面を参照して、本発明の一実施形態に係るゲームシステムについて説明する。 Hereinafter, a game system according to an embodiment of the present invention will be described with reference to the drawings.
図1は、本発明の一実施形態に係るゲームシステムの構成を示す外観図であり、図2はそのブロック図である。図1および図2に示すように、ゲームシステム10は、TVモニタ12、ゲーム機本体14、DVD−ROM16、外部メモリカード18、コントローラ20を備える。DVD−ROM16および外部メモリカード18は、ゲーム機本体14に着脱自在に装着される。コントローラ20は、通信ケーブルを介して、ゲーム機本体14に設けられた複数(図1では4つ)のコントローラポート用コネクタのいずれかに接続される。TVモニタ12は、AVケーブル等によってゲーム機本体14と接続される。なお、ゲーム機本体14とコントローラ20との通信は無線通信であってもよい。
FIG. 1 is an external view showing a configuration of a game system according to an embodiment of the present invention, and FIG. 2 is a block diagram thereof. As shown in FIGS. 1 and 2, the
DVD−ROM16は、ゲームプログラムやゲームデータ等を固定的に記憶している。プレイヤがゲームをプレイするとき、DVD−ROM16はゲーム機本体14に装着される。なお、ゲームプログラム等を記憶する手段として、DVD−ROM16の代わりに例えばCD−ROM、MO、メモリカード、ROMカートリッジ等の外部記憶媒体を用いてもよい。
The DVD-
外部メモリカード18は、例えばフラッシュメモリ等の書き換え可能な記憶媒体によって構成され、例えばゲームのセーブデータ等のデータを記録する。
The
ゲーム機本体14は、DVD−ROM16に記録されているプログラムを読み出し、読み出したプログラムに応じた処理を行う。
The
コントローラ20は、プレイヤがゲーム操作に関する入力を行うための入力装置であり、複数の操作スイッチを有する。コントローラ20は、プレイヤによる操作スイッチの押圧等に応じて操作データをゲーム機本体14に出力する。
The
TVモニタ12は、ゲーム機本体14から出力された画像データを画面に表示する。
The
次に、図2を参照してゲーム機本体14の構成について説明する。図2において、ゲーム機本体14には、CPU22およびそれに接続されるメモリコントローラ40が設けられる。さらにゲーム機本体14において、メモリコントローラ40は、GPU(グラフィックスプロセッシングユニット)24と、メインメモリ34と、DSP36と、各種インターフェース(I/F)42、44、46、48、52とに接続される。メモリコントローラ40は、これら各構成要素間のデータ転送を制御する。
Next, the configuration of the
ゲーム開始の際、まず、ディスクドライブ54は、ゲーム機本体14に装着されたDVD−ROM16を駆動する。DVD−ROM16に記憶されているゲームプログラムは、ディスクI/F52およびメモリコントローラ40を介して、メインメモリ34に読み込まれる。このメインメモリ34上のプログラムをCPU22が実行することによってゲームが開始される。ゲーム開始後、プレイヤは、操作スイッチを用いてコントローラ20に対してゲーム操作等の入力を行う。プレイヤによる入力に従い、コントローラ20は、操作データをゲーム機本体14に出力する。コントローラ20から出力される操作データは、コントローラI/F42およびメモリコントローラ40を介してCPU22に供給される。CPU22は、入力された操作データに応じてゲーム処理を行う。ゲーム処理における画像データ生成等に際して、GPU24やDSP36が用いられる。また、サブメモリ38は、DSP36が処理を行う際に用いられる。
When starting the game, first, the
GPU24は、ジオメトリユニット26およびレンダリングユニット28を含み、画像処理専用のメモリに接続されている。この画像処理専用メモリは、例えばカラーバッファ30やZバッファ32として利用される。ジオメトリユニット26は、仮想三次元空間であるゲーム空間に置かれた物体や図形に関する立体モデル(例えばポリゴンで構成されるオブジェクト)の座標についての演算処理を行うものであり、例えば立体モデルの回転・拡大縮小・変形や、ワールド座標系の座標から視点座標系やスクリーン座標系の座標への変換を行うものである。レンダリングユニット28は、所定のテクスチャに基づいて、スクリーン座標に投影された立体モデルについて各ピクセルごとのカラーデータ(RGBデータ)をカラーバッファ30に書き込むことによって、ゲーム画像を生成するためのものである。また、カラーバッファ30は、レンダリングユニット28によって生成されたゲーム画像データ(RGBデータ)を保持するために確保されたメモリ領域である。Zバッファ32は、3次元の視点座標から2次元のスクリーン座標に変換する際に失われる視点からの奥行情報を保持するために確保されたメモリ領域である。GPU24は、これらバッファを用いてTVモニタ12に表示すべき画像データを生成し、メモリコントローラ40およびビデオI/F44を介して、この画像データをTVモニタ12に適宜出力する。なお、ゲームプログラム実行時にCPU22において生成される音声データは、メモリコントローラ40からオーディオI/F48を介してスピーカ50に出力される。なお本実施形態では、画像処理専用のメモリを別途設けたハードウェア構成としたが、これに限らず例えばメインメモリ34の一部を画像処理用のメモリとして利用する方式(UMA:Unified Memory Architecture)を使うようにしてもよい。
The
次に、ゲームプログラムに基づいてCPU22およびGPU24によって実行される画像処理の具体例を説明する。
Next, a specific example of image processing executed by the
本実施形態では、ゲーム空間内の一部の領域だけをより明るくするような処理が行われる。本実施形態では、図3に示すように、ゲーム空間の地下マップをTVモニタ12に表示するときに、あたかも、穴を通じて洩れた光が地下マップの地面の一部を照らしているかのような画像を生成する例を説明する。なお、図3の例において、穴を有する地上のモデルがゲーム空間に実際に存在していなくてもよい。
In the present embodiment, processing for making only a part of the area in the game space brighter is performed. In the present embodiment, as shown in FIG. 3, when the underground map of the game space is displayed on the
地下マップの地面は、図4に示すように複数のポリゴンで構成されている。これにより地面の起伏(凹凸)が表現される。これらのポリゴンのうち、穴から洩れた光に照らされているものは図5に示す4つのポリゴン(ポリゴンA〜D)となる。 The ground of the underground map is composed of a plurality of polygons as shown in FIG. Thereby, the undulations (unevenness) of the ground are expressed. Of these polygons, the ones illuminated by light leaking from the holes are the four polygons (polygons A to D) shown in FIG.
本実施形態では、穴から洩れた光に照らされている部分の形に対応するマスクテクスチャを利用して、この部分の明るさをより明るくする。図6に、マスクテクスチャの一例を示す。このマスクテクスチャは16×16ピクセルで構成され、ピクセル毎に値が決められている。値が1の部分は、穴から洩れた光に照らされている領域に対応し、値が0の部分は、穴から洩れた光に照らされていない領域に対応する。両方の領域の境界に位置するピクセルについては、0〜1の間の値が設定されている。これは、最終的に生成される画像において、穴から洩れた光に照らされている領域の輪郭にエイリアシングが発生するのを防止するためである。なお、図6の例では、各ピクセルの値を0〜1の範囲としているが、例えば、0〜255の整数値で定義されたマスクテクスチャを利用する場合には、それを正規化して利用すればよい。また、マスクテクスチャとしては、16×16ピクセルのサイズに限らず、任意のサイズのものを利用することができる。 In this embodiment, a mask texture corresponding to the shape of the portion illuminated by light leaked from the hole is used to make the brightness of this portion brighter. FIG. 6 shows an example of the mask texture. This mask texture is composed of 16 × 16 pixels, and a value is determined for each pixel. A portion with a value of 1 corresponds to a region illuminated by light leaking from the hole, and a portion with a value of 0 corresponds to a region not illuminated by light leaking from the hole. A value between 0 and 1 is set for pixels located at the boundary between both regions. This is to prevent aliasing from occurring in the outline of the area illuminated by the light leaked from the hole in the finally generated image. In the example of FIG. 6, the value of each pixel is in the range of 0 to 1. However, for example, when using a mask texture defined by an integer value of 0 to 255, normalize it and use it. That's fine. Further, the mask texture is not limited to a size of 16 × 16 pixels, and an arbitrary size can be used.
次に、図7〜図12を参照して、本実施形態に係る画像処理の詳細を説明する。 Next, details of the image processing according to the present embodiment will be described with reference to FIGS.
まず、図7に示すように、洞窟の地面を構成する各ポリゴンの頂点に設定されている法線ベクトルと光線ベクトルの向きに基づいて所定の演算を行い、図8に示すように各頂点の明度を求める。頂点を除くポリゴン上の各点の明度は、そのポリゴンの各頂点の明度に基づく補間処理によって求められる。こうして図9のような明度データが得られる。なお、本実施形態では、このようなグローシェーディングを採用しているが、フラットシェーディングなどの他のシェーディング手法を用いても構わない。 First, as shown in FIG. 7, a predetermined calculation is performed based on the direction of the normal vector and the ray vector set at the vertex of each polygon constituting the ground of the cave, and as shown in FIG. Find the brightness. The brightness of each point on the polygon excluding the vertex is obtained by interpolation processing based on the brightness of each vertex of the polygon. In this way, brightness data as shown in FIG. 9 is obtained. In the present embodiment, such glow shading is adopted, but other shading methods such as flat shading may be used.
地面を構成するポリゴンには、洞窟の地面の色や質感を表現するためのテクスチャ(以下、地テクスチャと称す)がマッピングされる。そして、図10に示すように、ポリゴンにマッピングされた地テクスチャと、このポリゴンの明度データ(0〜1に正規化した値とする)とをピクセル毎に乗算することによって、ポリゴンに陰影が付けられる。この陰影付けられたポリゴンの色データのことを第1データと称す。以下、この第1データを元絵として、この元絵を部分的に明るくする処理が行われる。なお、本実施形態では、ゲーム機本体14の内部で上記のような演算を行って第1データを生成しているが、本発明はこれに限らず、予め用意された第1データをゲーム機本体14の外部から取得して以下の処理を行うようにしてもよい。例えば、デジタルカメラで得られた画像データを第1データとして利用してもよい。また、第1データは必ずしも陰影付けされていなくてもよい。つまり、アニメのようなべた塗りの画像を第1データとして利用してもよい。
Textures for expressing the color and texture of the cave ground (hereinafter referred to as ground texture) are mapped to the polygons constituting the ground. Then, as shown in FIG. 10, the polygon is shaded by multiplying the background texture mapped to the polygon and the lightness data of the polygon (value normalized to 0 to 1) for each pixel. It is done. The shaded polygon color data is referred to as first data. Hereinafter, the first data is used as an original picture, and a process for partially brightening the original picture is performed. In the present embodiment, the first data is generated by performing the above calculation inside the game machine
地面を構成するポリゴンには、地テクスチャとは別に、図6に示すようなマスクテクスチャがマッピングされる。ポリゴンの各頂点には、マスクテクスチャの座標(u,v)、すなわちuv値がそれぞれ割り当てられており、このuv値にしたがってポリゴンにマスクテクスチャがマッピングされる(いわゆるuvマッピング)。本実施形態では、0よりも小さいu値およびv値は0にクリップされ、1よりも大きいu値およびv値は1にクリップされる。これにより、図6のようなマスクテクスチャを用いて、図4に示すように円形の領域以外の領域全体をマスクすることができる。なお、マスクテクスチャのマッピング手法としては、他の任意の手法を採用してもよい。例えば、図6に示すマスクテクスチャが地面上で繰り返されるようにマスクテクスチャをマッピングしてもよい。また、uvマッピングに限らず、投影マッピングによりマスクテクスチャをマッピングしてもよい。また、ポリゴン毎にマスクテクスチャを用意してもよい。例えば、図5の4つのポリゴンA〜Dに対応した4つのマスクテクスチャを用意して、各マスクテクスチャを対応するポリゴンにマッピングするようにしてもよい。 In addition to the ground texture, a mask texture as shown in FIG. 6 is mapped to the polygon constituting the ground. Each vertex of the polygon is assigned a mask texture coordinate (u, v), that is, a uv value, and the mask texture is mapped to the polygon according to the uv value (so-called uv mapping). In this embodiment, u and v values less than 0 are clipped to 0, and u and v values greater than 1 are clipped to 1. Accordingly, the entire area other than the circular area can be masked as shown in FIG. 4 using the mask texture as shown in FIG. Note that any other method may be employed as a mask texture mapping method. For example, the mask texture may be mapped so that the mask texture shown in FIG. 6 is repeated on the ground. In addition to the uv mapping, the mask texture may be mapped by projection mapping. A mask texture may be prepared for each polygon. For example, four mask textures corresponding to the four polygons A to D in FIG. 5 may be prepared and each mask texture may be mapped to the corresponding polygon.
本実施形態では、図11に示すように第1データとマスクテクスチャを画素毎に乗算して第2データを生成し、さらに、図12に示すように第1データと第2データとを画素毎に加算して第3データを生成する。この第3データは、最終的にTVモニタ12に表示される画像データである。第3データは、元絵データである第1データと比較して、図4に示すように、マスクテクスチャに対応した一部の領域だけがより明るくなる。しかも、穴から洩れた光に照らされている部分において、第1データに加算される値は、第1データの明るさに比例した値が加算されることになるため、第1データにおいて暗い部分は、第3データにおいてもある程度の暗さを保っている。
In the present embodiment, as shown in FIG. 11, the first data and the mask texture are multiplied for each pixel to generate second data, and further, the first data and the second data are converted for each pixel as shown in FIG. To generate third data. This third data is image data that is finally displayed on the
なお、図13は、比較例として、従来のように元絵データ(第1データ)とマスクテクスチャを単に加算した場合の例を示している。この場合、穴から洩れた光に照らされる部分の明るさが一様に明るくなり、その部分の本来の質感が失われてしまう。 As a comparative example, FIG. 13 shows an example in which original picture data (first data) and a mask texture are simply added as in the prior art. In this case, the brightness of the portion illuminated by the light leaking from the hole is uniformly brightened, and the original texture of the portion is lost.
以下、図14および図15を参照して、本実施形態の上記処理による効果を従来のものと比較して説明する。 Hereinafter, with reference to FIG. 14 and FIG. 15, the effect of the above processing of the present embodiment will be described in comparison with the conventional one.
図14は、図13のように(すなわち従来のように)元絵データ(第1データ)とマスクテクスチャを単に加算した場合の、マスクされない部分(すなわち穴から洩れた光に照らされる部分)に関する第1データと第3データの関係を示している。この従来の方法では、マスクテクスチャの値を調整することによって明るくする効果の度合いを調整することができるが、図14に示すように、効果を大きくするにつれて暗い部分がどんどん明るくなり、その結果、画像が白っぽくなって、元絵に表現されていた地面の質感が失われていく。一方、本実施形態の場合は、第1データと第3データの関係は図15に示すような関係となるため、効果を大きくしても暗い部分がそれほど明るくはならないため、元絵に表現されていた地面の質感が失われることはない。なお、第1データとマスクテクスチャとを乗算する際に、マスクテクスチャに所望の係数を乗算してから第1データと乗算するようにすれば、明るくする度合いを所望の度合いに調整することができる。 FIG. 14 relates to an unmasked portion (that is, a portion illuminated by light leaking from a hole) when the original picture data (first data) and the mask texture are simply added as in FIG. The relationship between 1st data and 3rd data is shown. In this conventional method, the degree of the brightening effect can be adjusted by adjusting the value of the mask texture. However, as shown in FIG. 14, the darker portion becomes brighter and brighter as the effect is increased. The image becomes whitish and the texture of the ground that was expressed in the original picture is lost. On the other hand, in the case of the present embodiment, the relationship between the first data and the third data is as shown in FIG. The texture of the ground that was left is not lost. In addition, when multiplying the first data and the mask texture, the degree of brightening can be adjusted to a desired degree by multiplying the mask texture by a desired coefficient and then multiplying by the first data. .
次に、上記のような処理を実行するときのゲーム機本体14の動作について具体的に説明する。
Next, the operation of the
図16のように、DVD−ROM16には洞窟の地面に対応する地形データが記憶されている。地形データは頂点データとテクスチャデータで構成され、テクスチャデータには地テクスチャとマスクテクスチャが含まれている。地テクスチャは、洞窟の地面の色や質感を表すテクスチャであり、マスクテクスチャは、特に明るくしたい領域の形を表すテクスチャである。
As shown in FIG. 16, the DVD-
DVD−ROM16に記憶されている地形データは、ゲーム機本体14のメインメモリ34に読み込まれる。メインメモリ34は、図16に示すようにフレームバッファとしても利用可能である。図17は、メインメモリ34に記憶される頂点データ60の詳細を示している。図17の例では、頂点データ60として、洞窟の地面を構成するポリゴン毎に、ポリゴンの各頂点の座標(ワールド座標系)、法線ベクトル、UV値が記憶される。UV値としては、地テクスチャに対応するUV値(その頂点が地テクスチャのどの点に対応するかを示す)と、マスクテクスチャに対応するUV値(その頂点がマスクテクスチャのどの点に対応するかを示す)が記憶される。GPU24は、その内部にテクスチャ演算回路を備えており、CPU22からの指示に従って、図7から図12のような演算処理を行う。なお、本実施形態では画像処理の大部分をGPU24が実行するとしているが、本発明はこれに限らず、CPU22が全ての処理を実行するようにしてもよい。
The terrain data stored in the DVD-
図18は、CPU22およびGPU24による画像処理の流れを示すフローチャートである。
FIG. 18 is a flowchart showing the flow of image processing by the
図18において、まずCPU22は、DVD−ROM16に記憶されているデータをメインメモリ34にロードする(S10)。次にCPU22は、GPU24のテクスチャ演算回路の計算式(すなわち、図7〜図12の処理に対応する計算式)を設定する(S11)。続いてCPU22は、仮想カメラの設定(S12)およびライトの設定(S13)を行う。
In FIG. 18, first, the
こうしてゲーム空間の設定が完了すると、GPU24は、頂点データ60に含まれる各頂点の座標を、仮想カメラの設定に従ってワールド座標系からスクリーン座標系に変換する(S14)。
When the setting of the game space is thus completed, the
続いてGPU24は、光線ベクトルと各頂点の法線ベクトルに基づいて各頂点の明度を決定し、決定された各頂点の明度から明度データを生成する(S15)。次にGPU24は、頂点データ60に含まれる地テクスチャのUV値に基づいて各ポリゴンに地テクスチャをマッピングし、地テクスチャと明度データとを乗算して第1データを生成する(S16)。そして、頂点データ60に含まれるマスクテクスチャのUV値に基づいて各ポリゴンにマスクテクスチャをマッピングし、ステップS16で生成した第1データとマスクデータを乗算して第2データを生成する(S17)。さらに、こうして生成した第2データと地テクスチャを加算して第3データを生成する(S18)。そして、この第3データをフレームバッファに書き込む(S19)。
Subsequently, the
こうしてフレームバッファに格納された画像データに基づいてTVモニタ12に映像信号が送られ、TVモニタ12にゲーム画像が表示される。
Thus, a video signal is sent to the
以上のように、本実施形態によれば、シャドウボリューム等のような負荷の高い処理を行うことなく、3Dゲーム空間の一部の領域に光が照らされているような表現が可能となる。また、光が照らされている部分の明るさは一様には明るくならず、暗い部分における明るさの増加が抑えられるため、元絵の質感を維持したまま明るくすることができる。 As described above, according to the present embodiment, it is possible to perform an expression in which light is illuminated on a part of the 3D game space without performing a heavy load process such as a shadow volume. In addition, the brightness of the portion illuminated with light is not uniformly bright, and the increase in brightness in the dark portion can be suppressed, so that it can be brightened while maintaining the texture of the original picture.
なお、本実施形態では、3D空間を部分的に明るくする例を説明したが、本発明はこれに限定されない。例えば、2次元のゲーム空間をスクリーンに表示するゲームに本発明を適用し、スクリーンに表示されているゲーム空間の一部が光で照らされているような表現を実現することもできる。この場合、光で照らしたい領域の形に対応したマスクデータを用意しておき、元絵となるゲーム画像(第1データに相当)とマスクデータ(マスクテクスチャに相当)を乗算し、この乗算結果(第2データに相当)と元絵となるゲーム画像を加算すればよい。 In this embodiment, the example in which the 3D space is partially brightened has been described, but the present invention is not limited to this. For example, the present invention can be applied to a game in which a two-dimensional game space is displayed on a screen to realize an expression in which a part of the game space displayed on the screen is illuminated with light. In this case, mask data corresponding to the shape of the area to be illuminated with light is prepared, and the game image (corresponding to the first data) to be the original picture is multiplied by the mask data (corresponding to the mask texture). What is necessary is just to add the game image used as an original picture (equivalent to 2nd data).
10 ゲームシステム
12 TVモニタ
14 ゲーム機本体
16 DVD−ROM
18 外部メモリカード
20 コントローラ
22 CPU
24 GPU
26 ジオメトリユニット
28 レンダリングユニット
30 カラーバッファ
32 Zバッファ
34 メインメモリ
36 DSP
38 サブメモリ
40 メモリコントローラ
42 コントローラI/F
44 ビデオI/F
46 外部メモリI/F
48 オーディオI/F
50 スピーカ
52 ディスクI/F
54 ディスクドライブ
60 頂点データ
10
18
24 GPU
26
38
44 Video I / F
46 External memory I / F
48 Audio I / F
50
54
Claims (10)
前記原画像データに前記中間画像データを加算する加算手段と、
前記加算手段から出力される画像データに基づいてゲーム画像を生成して表示手段に表示する表示制御手段とを備えるゲーム装置。 Intermediate image data generating means for generating intermediate image data obtained by masking original image data with mask data;
Adding means for adding the intermediate image data to the original image data;
A game apparatus comprising: display control means for generating a game image based on image data output from the adding means and displaying the game image on the display means.
ポリゴンデータを記憶するポリゴンデータ記憶手段と、
地テクスチャを記憶する地テクスチャ記憶手段と、
マスクテクスチャを記憶するマスクテクスチャ記憶手段と、
ポリゴンに前記地テクスチャをマッピングして第1データを生成する第1データ生成手段と、
前記ポリゴンに前記マスクテクスチャをマッピングし、前記第1データを前記マスクテクスチャでマスクした第2データを生成する第2データ生成手段と、
前記第1データに前記第2データを加算して第3データを生成する加算手段と、
前記第3データに基づいてゲーム画像を生成して前記表示手段に表示する表示制御手段とを備えるゲーム装置。 A game device for displaying a three-dimensional virtual space on a display means,
Polygon data storage means for storing polygon data;
A ground texture storage means for storing the ground texture;
Mask texture storage means for storing the mask texture;
First data generation means for mapping the ground texture to polygons to generate first data;
Second data generating means for mapping the mask texture to the polygon and generating second data obtained by masking the first data with the mask texture;
Adding means for generating a third data by adding the second data to the first data,
A game apparatus comprising: display control means for generating a game image based on the third data and displaying the game image on the display means.
前記第2データ生成手段は、前記係数乗算手段の乗算結果に基づいて前記第2データを生成することを特徴とする、請求項4に記載のゲーム装置。 The game apparatus further includes coefficient multiplication means for multiplying the mask texture read from the mask texture storage means by a predetermined coefficient,
The game apparatus according to claim 4, wherein the second data generating unit generates the second data based on a multiplication result of the coefficient multiplying unit.
原画像データをマスクデータでマスクした中間画像データを生成する中間画像データ生成手段、
前記原画像データに前記中間画像データを加算する加算手段、および
前記加算手段から出力される画像データに基づいてゲーム画像を生成して表示手段に表示する表示制御手段として機能させるためのゲームプログラム。 Computer
Intermediate image data generating means for generating intermediate image data obtained by masking original image data with mask data;
An addition means for adding the intermediate image data to the original image data, and a game program for functioning as a display control means for generating a game image based on the image data output from the addition means and displaying the game image on the display means.
ポリゴンデータを記憶するポリゴンデータ記憶手段、
地テクスチャを記憶する地テクスチャ記憶手段、
マスクテクスチャを記憶するマスクテクスチャ記憶手段、
ポリゴンに前記地テクスチャをマッピングして第1データを生成する第1データ生成手段、
前記ポリゴンに前記マスクテクスチャをマッピングし、前記第1データを前記マスクテクスチャでマスクした第2データを生成する第2データ生成手段、
前記第1データに前記第2データを加算して第3データを生成する加算手段、および
前記第3データに基づいてゲーム画像を生成して前記表示手段に表示する表示制御手段として機能させるためのゲームプログラム。 A game machine computer for displaying a three-dimensional virtual space on a display means,
Polygon data storage means for storing polygon data;
A ground texture storage means for storing the ground texture;
Mask texture storage means for storing the mask texture;
First data generating means for mapping the ground texture to a polygon to generate first data;
A second data generation means for mapping the mask texture to the polygon and generating second data obtained by masking the first data with the mask texture;
Adding means for generating a third data by adding the second data to the first data, and to function as a display control means for displaying on the display means generates a game image based on the third data Game program.
前記第2データ生成手段は、前記係数乗算手段の乗算結果に基づいて前記第2データを生成することを特徴とする、請求項9に記載のゲームプログラム。 The game program further causes the computer to function as coefficient multiplication means for multiplying the mask texture read from the mask texture storage means by a predetermined coefficient,
The game program according to claim 9, wherein the second data generation unit generates the second data based on a multiplication result of the coefficient multiplication unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004130198A JP4563070B2 (en) | 2004-04-26 | 2004-04-26 | GAME DEVICE AND GAME PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004130198A JP4563070B2 (en) | 2004-04-26 | 2004-04-26 | GAME DEVICE AND GAME PROGRAM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005310071A JP2005310071A (en) | 2005-11-04 |
JP4563070B2 true JP4563070B2 (en) | 2010-10-13 |
Family
ID=35438729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004130198A Expired - Fee Related JP4563070B2 (en) | 2004-04-26 | 2004-04-26 | GAME DEVICE AND GAME PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4563070B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7530949B2 (en) | 2022-10-19 | 2024-08-08 | 任天堂株式会社 | GAME PROGRAM, INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING DEVICE, AND GAME PRO |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001224844A (en) * | 2000-02-17 | 2001-08-21 | Namco Ltd | Game system and information storage medium |
JP2003323630A (en) * | 2002-04-26 | 2003-11-14 | Namco Ltd | Image generation system, image generation program and information storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05298456A (en) * | 1992-04-22 | 1993-11-12 | Mitsubishi Electric Corp | Texture mapping system |
JPH06203157A (en) * | 1992-10-14 | 1994-07-22 | Fujitsu Ltd | Color image processing method and apparatus |
-
2004
- 2004-04-26 JP JP2004130198A patent/JP4563070B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001224844A (en) * | 2000-02-17 | 2001-08-21 | Namco Ltd | Game system and information storage medium |
JP2003323630A (en) * | 2002-04-26 | 2003-11-14 | Namco Ltd | Image generation system, image generation program and information storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP2005310071A (en) | 2005-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3725524B2 (en) | Method for generating computer display image and computer processing system and graphics processor for generating image data | |
US20080246760A1 (en) | Method and apparatus for mapping texture onto 3-dimensional object model | |
US20030216175A1 (en) | Game machine and game program | |
JP4917346B2 (en) | Game image processing program and game image processing apparatus | |
US8133117B2 (en) | Game apparatus, game message displaying method and storage medium storing game program | |
JP3352982B2 (en) | Rendering method and device, game device, and computer-readable recording medium for storing program for rendering three-dimensional model | |
JP4794811B2 (en) | Image processing program and image processing apparatus | |
JP4995054B2 (en) | GAME PROGRAM, RECORDING MEDIUM CONTAINING THE GAME PROGRAM, AND COMPUTER | |
JP2004334661A (en) | Image generating system, program, and information storage medium | |
JP2001126086A (en) | Method and device for displaying three-dimensional model in video game, game machine, and computer- readable recording medium storing three-dimensional model displaying program for video game | |
JP2009140135A5 (en) | ||
JP4199817B1 (en) | Image generating apparatus, image generating method, and program | |
JP4563070B2 (en) | GAME DEVICE AND GAME PROGRAM | |
JP2003085578A (en) | Game information, information storage medium and game device | |
JP2006195882A (en) | Program, information storage medium and image generation system | |
US6646650B2 (en) | Image generating apparatus and image generating program | |
JP2001204962A (en) | Recording medium having image displaying program recorded thereon, method of displaying image, and game apparatus | |
JP4086002B2 (en) | Program, image processing apparatus and method, and recording medium | |
JP3652586B2 (en) | Image drawing system | |
JP3469225B2 (en) | Method for applying lighting effect to three-dimensional model, drawing apparatus, and recording medium | |
JP2006252426A (en) | Program, information storage medium, and image generation system | |
JP2010033302A (en) | Image generation system, program and information storage medium | |
JP3437166B2 (en) | 3D image processing method, apparatus thereof, computer-readable recording medium recording 3D image processing program, and video game apparatus | |
JP3574628B2 (en) | Image processing method and image processing program | |
JP2006127368A (en) | Graphics drawing device having gamma compensation function using depth value |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070328 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100312 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100317 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100517 |
|
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: 20100702 |
|
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: 20100728 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130806 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4563070 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: 20130806 Year of fee payment: 3 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |