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

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

Info

Publication number
JP2010055131A
JP2010055131A JP2008205224A JP2008205224A JP2010055131A JP 2010055131 A JP2010055131 A JP 2010055131A JP 2008205224 A JP2008205224 A JP 2008205224A JP 2008205224 A JP2008205224 A JP 2008205224A JP 2010055131 A JP2010055131 A JP 2010055131A
Authority
JP
Japan
Prior art keywords
shadow
image
model object
processing unit
value
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.)
Pending
Application number
JP2008205224A
Other languages
Japanese (ja)
Inventor
Yoshihito Iwanaga
欣仁 岩永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bandai Namco Entertainment Inc
Original Assignee
Namco Bandai Games Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Namco Bandai Games Inc filed Critical Namco Bandai Games Inc
Priority to JP2008205224A priority Critical patent/JP2010055131A/en
Publication of JP2010055131A publication Critical patent/JP2010055131A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, an information storage medium and an image generation system, capable of generating a real shadow image of a model object. <P>SOLUTION: This image generation system includes the first drawing processing part for drawing-processing a plurality of objects including the model objects MOB1, MOB2, while executing shadowing processing, to generate an image displayed with images of the model objects MOB1, MOB2 and the shadow images SD1, SD2 thereof, and the second drawing processing part for drawing-processing shadow primitive faces corresponding to grounding parts LOB1, LOB2 of the model objects MOB1, MOB2, to generate an image composed with shadow images LSD1, LSD2 of the grounding parts LOB1, LOB2 in the shadow images SD1, SD2 of the model objects MOB1, MOB2. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

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

従来より、仮想的な3次元空間であるオブジェクト空間内において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。格闘ゲームを楽しむことができる画像生成システムを例にとれば、プレーヤは、ゲームコントローラ(操作部)を用いて自キャラクタ(モデルオブジェクト)を操作し、相手プレーヤやコンピュータが操作する敵キャラクタと対戦することでゲームを楽しむ。   Conventionally, an image generation system (game system) that generates an image that can be seen from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known. Popular. Taking an image generation system capable of enjoying a fighting game as an example, a player operates his / her character (model object) using a game controller (operation unit), and battles an opponent character or an enemy character operated by a computer. Enjoy the game.

さて、このような画像生成システムでは、キャラクタなどのモデルオブジェクトのよりリアルな影を生成することが望まれる。このような影生成手法としては、例えば特許文献1に開示されるようなシャドウボリューム(モディファイアボリューム)処理などのシャドウイング処理が知られている。   In such an image generation system, it is desired to generate a more realistic shadow of a model object such as a character. As such a shadow generation method, for example, a shadowing process such as a shadow volume (modifier volume) process disclosed in Patent Document 1 is known.

しかしながら、このようなシャドウイング処理では、ゲームフィールドに落ちるキャラクタの影形状についてはリアルに表現できるものの、その場のライティングに合ったリアルな影を目指すと、地面に落ちる影が淡くなってしまう場合が多い。従って、例えば足などの接地部の下のいわゆるオクルージョン領域の影については、リアルに表現することが難しいという課題があった。
特開2003−242523号公報
However, in such shadowing processing, although the shadow shape of the character falling on the game field can be expressed realistically, when aiming for a realistic shadow that matches the lighting on the spot, the shadow falling on the ground will become light There are many. Therefore, for example, a shadow of a so-called occlusion area under a grounding part such as a foot has a problem that it is difficult to express it realistically.
JP 2003-242523 A

本発明の幾つかの態様によれば、モデルオブジェクトのよりリアルな影画像を生成できるプログラム、情報記憶媒体及び画像生成システムを提供できる。   According to some aspects of the present invention, it is possible to provide a program, an information storage medium, and an image generation system that can generate a more realistic shadow image of a model object.

本発明は、オブジェクト空間において仮想カメラから見える画像を生成するための画像生成システムであって、シャドウイング処理を行いながらモデルオブジェクトを含む複数のオブジェクトの描画処理を行って、前記モデルオブジェクトの画像と前記モデルオブジェクトの影画像が表示される画像を生成する第1の描画処理部と、前記モデルオブジェクトの接地部に対応する影プリミティブ面の描画処理を行って、前記モデルオブジェクトの前記影画像に対して前記接地部の影画像が合成された画像を生成する第2の描画処理部とを含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラム、又は該プログラムを記憶したコンピュータ読み取り可能な情報記憶媒体に関係する。   The present invention is an image generation system for generating an image that is visible from a virtual camera in an object space, and performs a drawing process of a plurality of objects including a model object while performing a shadowing process, and an image of the model object A first rendering processing unit that generates an image on which a shadow image of the model object is displayed, and a shadow primitive surface corresponding to the grounding unit of the model object are rendered to the shadow image of the model object And an image generation system including a second drawing processing unit that generates an image in which the shadow image of the grounding unit is combined. The present invention also relates to a program that causes a computer to function as each of the above-described units, or a computer-readable information storage medium that stores the program.

本発明によれば、モデルオブジェクトを含む複数のオブジェクトの描画処理が行われることで、モデルオブジェクトの画像とモデルオブジェクトの影画像が表示される画像が生成される。また、モデルオブジェクトの接地部に対応する影プリミティブ面の描画処理が行われることで、モデルオブジェクトの影画像に対して接地部の影画像が合成された画像が生成される。このようにすれば、モデルオブジェクトの全体的な影画像と、部分的な接地部の影画像が合成されることで、よりリアルな影画像の生成が可能になる。   According to the present invention, an image in which an image of a model object and a shadow image of the model object are displayed is generated by performing drawing processing of a plurality of objects including the model object. In addition, the shadow primitive plane corresponding to the ground portion of the model object is drawn, thereby generating an image in which the shadow image of the ground portion is combined with the shadow image of the model object. In this way, it is possible to generate a more realistic shadow image by synthesizing the entire shadow image of the model object and the shadow image of the partial ground contact portion.

また本発明では、前記第1の描画処理部は、シャドウマップ処理により、前記モデルオブジェクトの前記影画像を生成してもよい。   In the present invention, the first drawing processing unit may generate the shadow image of the model object by shadow map processing.

このようにシャドウマップ処理により影画像を生成した場合には、その場に合ったリアルな影を目指すと、地面に落ちる影が淡くなってしまうことが増えてくる。この点、本発明によれば、この接地部の影画像については、影プリミティブ面の描画処理という別処理により生成されるため、少ない処理負荷でよりリアルな影画像の生成が可能になる。   In this way, when a shadow image is generated by shadow map processing, the shadow falling on the ground becomes lighter when aiming for a realistic shadow that suits the situation. In this regard, according to the present invention, since the shadow image of the grounding portion is generated by a separate process called the shadow primitive plane drawing process, a more realistic shadow image can be generated with a small processing load.

また本発明では、前記第2の描画処理部は、前記接地部に対して設定された影生成用プリミティブ面を、前記モデルオブジェクトが移動するフィールドに対して投影することで生成された前記影プリミティブ面の描画処理を行うことで、前記接地部の影画像を生成してもよい。   Also, in the present invention, the second rendering processing unit generates the shadow primitive generated by projecting a shadow generation primitive surface set for the ground unit onto a field in which the model object moves. A shadow image of the grounding unit may be generated by performing surface drawing processing.

このようにすれば、接地部の動きや影の投影方向を反映させた接地部の影画像を生成できるようになる。   In this way, it is possible to generate a shadow image of the grounding part reflecting the movement of the grounding part and the projection direction of the shadow.

また本発明では、前記第2の描画処理部は、前記第1の描画処理部が前記モデルオブジェクトの影画像の生成に使用する投影方向とは異なる投影方向を用いて、前記接地部の影画像を生成してもよい。   In the present invention, the second drawing processing unit uses a projection direction different from a projection direction used by the first drawing processing unit to generate a shadow image of the model object, and uses the shadow image of the grounding unit. May be generated.

このようにすれば、モデルオブジェクトの影画像の投影方向とは異なる投影方向に、接地部の影画像が生成されるようになるため、エフェクト効果の高い画像生成が可能になる。   In this way, since the shadow image of the grounding portion is generated in a projection direction different from the projection direction of the shadow image of the model object, it is possible to generate an image with a high effect effect.

また本発明では、前記第2の描画処理部は、点光源が存在する場合に、前記点光源の投影方向を用いて、前記接地部の影画像を生成してもよい。   In the present invention, the second drawing processing unit may generate a shadow image of the grounding unit using a projection direction of the point light source when a point light source is present.

このようにすれば、点光源の投影方向に応じた接地部の影画像を生成できるようになる。   In this way, it becomes possible to generate a shadow image of the grounding portion corresponding to the projection direction of the point light source.

また本発明では、前記第2の描画処理部は、前記影プリミティブ面を、前記仮想カメラから見て奥側方向にZシフトすると共に、前記影プリミティブ面の各ピクセルのZ値の方がZバッファのZ値よりも奥側のZ値である場合に描画されるというZ比較の設定で、前記影プリミティブ面の描画処理を行ってもよい。   In the present invention, the second drawing processing unit Z-shifts the shadow primitive plane in the rearward direction when viewed from the virtual camera, and the Z value of each pixel of the shadow primitive plane is the Z buffer. The shadow primitive plane may be drawn with a Z comparison setting in which drawing is performed when the Z value is deeper than the Z value.

このようにすれば、例えばモデルオブジェクトの接地部がフィールドの端部付近に位置する場合に不自然な画像が生成されてしまう事態などを防止できる。   In this way, it is possible to prevent a situation in which an unnatural image is generated when, for example, the ground portion of the model object is located near the end of the field.

また本発明では、前記第1の描画処理部は、前記モデルオブジェクトの描画処理を行う際に、前記モデルオブジェクトの描画領域に対応するステンシルバッファの領域に対して所定ステンシル値を書き込み、前記第2の描画処理部は、前記ステンシルバッファに前記所定ステンシル値が書き込まれておらずステンシル値がクリアされている領域に対して、前記影プリミティブ面を描画してもよい。   In the present invention, the first drawing processing unit writes a predetermined stencil value in an area of a stencil buffer corresponding to the drawing area of the model object when the drawing process of the model object is performed. The drawing processing unit may draw the shadow primitive surface in a region where the predetermined stencil value is not written in the stencil buffer and the stencil value is cleared.

このようにすれば、モデルオブジェクトの接地部に対して影が落ちてしまうような不自然な影画像が生成されてしまう事態を防止できる。   In this way, it is possible to prevent a situation in which an unnatural shadow image that causes a shadow to fall on the ground portion of the model object is generated.

また本発明では、前記第2の描画処理部は、前記影プリミティブ面の各ピクセルのZ値の方がZバッファのZ値よりも手前側のZ値である場合に描画されるというZ比較の設定で、前記影プリミティブ面に対応するプリミティブ面の描画処理を行って、前記ステンシルバッファの前記所定ステンシル値をクリアしてもよい。   Further, in the present invention, the second drawing processing unit draws when the Z value of each pixel of the shadow primitive plane is drawn when the Z value is closer to the Z value than the Z buffer. In setting, the primitive surface corresponding to the shadow primitive surface may be drawn to clear the predetermined stencil value of the stencil buffer.

このようにすれば、例えばモデルオブジェクトの接地部がフィールドにめり込んだような状況においても、不自然さのない影画像を生成できる。   In this way, it is possible to generate a shadow image free from unnaturalness even in a situation where, for example, the ground portion of the model object is embedded in the field.

また本発明では、前記第2の描画処理部は、前記接地部の接地面と、前記モデルオブジェクトが移動するフィールドとのなす角度に応じて、前記接地部の影画像の濃さを制御してもよい。   Further, in the present invention, the second drawing processing unit controls the darkness of the shadow image of the grounding unit according to an angle formed by the ground plane of the grounding unit and a field where the model object moves. Also good.

このようにすれば、例えば接地部の接地面とフィールドとのなす角度が大きくなった場合に不自然な影画像が生成されてしまう事態等を防止できる。   In this way, for example, it is possible to prevent a situation in which an unnatural shadow image is generated when the angle formed between the ground plane of the grounding portion and the field becomes large.

また本発明では、前記第1の描画処理部は、前記モデルオブジェクトの描画処理を行った後に、背景オブジェクトの描画処理を行ってもよい。   In the present invention, the first drawing processing unit may perform the drawing process of the background object after performing the drawing process of the model object.

このようにすれば、モデルオブジェクトの描画領域については背景オブジェクトを描画しなくても済むようになり、描画処理の負荷を軽減できる。   In this way, it is not necessary to draw the background object in the drawing area of the model object, and the load of the drawing process can be reduced.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   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に本実施形態の画像生成システム(ゲームシステム)のブロック図の例を示す。なお本実施形態の画像生成システムは図1の構成要素(各部)の一部を省略した構成としてもよい。
1. Configuration FIG. 1 shows an example of a 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は、プレーヤが操作データを入力するためのものであり、その機能は、方向キー、操作ボタン、アナログスティック、レバー、ステアリング、アクセル、ブレーキ、マイク、或いはタッチパネル型ディスプレイなどにより実現できる。   The operation unit 160 is for a player to input operation data, and the function can be realized by a direction key, operation buttons, analog stick, lever, steering, accelerator, brake, microphone, touch panel display, or the like.

記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM(DRAM、VRAM)などにより実現できる。この記憶部170は、電源を切るとデータが消えてしまう揮発性のメモリにより構成できるが、補助記憶装置194よりも高速な記憶装置になっている。そしてゲームプログラムや、ゲームプログラムの実行に必要なゲームデータは、この記憶部170に保持される。   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 (DRAM, VRAM) or the like. The storage unit 170 can be configured by a volatile memory that loses data when the power is turned off, but is a storage device that is faster than the auxiliary storage device 194. Then, the game program and game data necessary for executing the game program are held in the storage unit 170.

情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、HDD(ハードディスクドライブ)、或いはメモリ(ROM等)などにより実現できる。処理部100は、情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。即ち情報記憶媒体180には、本実施形態の各部としてコンピュータ(操作部、処理部、記憶部、出力部を備える装置)を機能させるためのプログラム(各部の処理をコンピュータに実行させるためのプログラム)が記憶される。   An information storage medium 180 (a computer-readable medium) stores programs, data, and the like, and functions thereof by an optical disk (CD, DVD), HDD (hard disk drive), memory (ROM, etc.), and the like. realizable. 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, in the information storage medium 180, a program for causing a computer (an apparatus including an operation unit, a processing unit, a storage unit, and an output unit) to function as each unit of the present embodiment (a program for causing the computer to execute processing of each unit). Is memorized.

表示部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(補助メモリ、2次メモリ)は、記憶部170の容量を補うために使用される大容量の記憶装置であり、SDメモリーカード、マルチメディアカードなどのメモリーカードや、HDDなどにより実現できる。この補助記憶装置194は脱着自在になっているが、内蔵されるものであってもよい。この補助記憶装置194は、ゲームの途中結果などのセーブデータや、プレーヤ(ユーザ)の個人的な画像データや音楽データなどを保存するために使用される。   The auxiliary storage device 194 (auxiliary memory, secondary memory) is a large-capacity storage device that is used to supplement the capacity of the storage unit 170, and may be a memory card such as an SD memory card or a multimedia card, an HDD, or the like. realizable. The auxiliary storage device 194 is detachable, but may be built-in. The auxiliary storage device 194 is used to save save data such as the game midway results, personal image data and music data of the player (user), and the like.

通信部196は、有線や無線のネットワークを介して外部(例えば他の画像生成システム、サーバ、ホスト装置)との間で通信を行うものであり、その機能は、通信用ASIC又は通信用プロセッサなどのハードウェアや、通信用ファームウェアにより実現できる。   The communication unit 196 communicates with the outside (for example, another image generation system, a server, or a host device) via a wired or wireless network, and functions as a communication ASIC, a communication processor, or the like. It can be realized by hardware and communication firmware.

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

処理部100(プロセッサ)は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などを行う。処理部100は記憶部170をワーク領域として各種処理を行う。この処理部100の機能は、各種プロセッサ(CPU、GPU等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。   The processing unit 100 (processor) performs game processing, image generation processing, sound generation processing, and the like based on operation data from the operation unit 160, a program, and the like. The processing unit 100 performs various processes using 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, GPU, etc.), ASIC (gate array, etc.), and programs.

処理部100は、ゲーム演算部102、オブジェクト空間設定部104、移動体演算部106、仮想カメラ制御部108、描画処理部120、音生成部130を含む。なおこれらの一部を省略する構成としてもよい。   The processing unit 100 includes a game calculation unit 102, an object space setting unit 104, a moving body calculation unit 106, a virtual camera control unit 108, a drawing processing unit 120, and a sound generation unit 130. Note that some of these may be omitted.

ゲーム演算部102はゲーム演算処理を行う。ここでゲーム演算としては、ゲーム開始条件が満たされた場合にゲームを開始する処理、ゲームを進行させる処理、ゲーム結果を演算する処理、或いはゲーム終了条件が満たされた場合にゲームを終了する処理などがある。   The game calculation unit 102 performs game calculation processing. Here, as a game calculation, a process for starting a game when a game start condition is satisfied, a process for advancing the game, a process for calculating a game result, or a process for ending a game when a game end condition is satisfied and so on.

オブジェクト空間設定部104は、モデルオブジェクト(人、ロボット、車、戦闘機、ミサイル、弾等の移動体)、マップ(地形)、建物、コース(道路)、樹木、壁などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェイスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。具体的には、記憶部170のオブジェクトデータ記憶部172には、オブジェクトの位置、回転角度、移動速度、移動方向等のデータであるオブジェクトデータがオブジェクト番号に対応づけて記憶される。そしてこのオブジェクトデータは、移動体演算部106の移動体演算処理等により順次更新される。   The object space setting unit 104 displays various display objects such as model objects (moving objects such as people, robots, cars, fighters, missiles, bullets, etc.), maps (terrain), buildings, courses (roads), trees, and walls. Processing for setting an object (an object composed of a primitive surface such as a polygon, a free-form surface, or a subdivision surface) in the object space is performed. 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). Place the object. Specifically, the object data storage unit 172 of the storage unit 170 stores object data such as object position, rotation angle, moving speed, moving direction and the like in association with the object number. Then, the object data is sequentially updated by a moving object calculation process or the like of the moving object calculation unit 106.

移動体演算部(移動体制御部)106は、移動体であるモデルオブジェクト等を移動させるための演算を行う。またモデルオブジェクトを動作させるための演算も行う。即ち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、モデルオブジェクト(移動体オブジェクト)をオブジェクト空間内で移動させたり、モデルオブジェクトを動作(モーション、アニメーション)させる処理を行う。具体的には、モデルオブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(パーツオブジェクトの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。   A moving object calculation unit (moving object control unit) 106 performs an operation for moving a model object or the like that is a moving object. It also performs calculations for operating the model object. That is, a model object (moving object) is moved in the object space based on operation data input by the player through the operation unit 160, a program (movement / motion algorithm), various data (motion data), etc. Performs processing to make the object move (motion, animation). Specifically, a simulation process for sequentially obtaining model object movement information (position, rotation angle, speed, or acceleration) and motion information (part object position or rotation angle) for each frame (1/60 second). I do. A frame is a unit of time for performing movement / motion processing (simulation processing) and image generation processing.

より具体的には、移動体演算部106は、モーションデータ記憶部173に記憶されるモーションデータに基づいて、モデルオブジェクトのモーションを再生する処理を行う。即ち、モデルオブジェクト(スケルトン)を構成する各パーツオブジェクト(スケルトンを構成する骨)の位置又は回転角度(方向)等を含むモーションデータを、モーションデータ記憶部173から読み出す。そして、モデルオブジェクトの各パーツオブジェクト(骨)を動かすことで(スケルトン形状を変形させることで)、モデルオブジェクトのモーションを再生する。   More specifically, the mobile object calculation unit 106 performs processing for reproducing the motion of the model object based on the motion data stored in the motion data storage unit 173. That is, motion data including the position or rotation angle (direction) of each part object (bone constituting the skeleton) constituting the model object (skeleton) is read from the motion data storage unit 173. Then, by moving each part object (bone) of the model object (by deforming the skeleton shape), the motion of the model object is reproduced.

仮想カメラ制御部108は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置、視線方向あるいは画角を制御する処理)を行う。   The virtual camera control unit 108 performs a virtual camera (viewpoint) control process for generating an image that can be seen 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.

例えば仮想カメラによりキャラクタ、車、戦闘機などのモデルオブジェクトを後方から撮影する場合には、モデルオブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動体演算部106で得られたモデルオブジェクトの位置、回転角度又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させる制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。   For example, when shooting a model object such as a character, a car, or a fighter from behind using a virtual camera, the position or rotation angle of the virtual camera (virtual camera is set so that the virtual camera follows changes in the position or rotation of the model object. The direction). In this case, the virtual camera can be controlled based on information such as the position, rotation angle, or speed of the model object obtained by the moving object computing unit 106. 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.

描画処理部120(画像生成部)は、モデルオブジェクトを含む複数のオブジェクトの描画処理を行う。例えば処理部100で行われる種々の処理(ゲーム処理、シミュレーション処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まずモデルオブジェクトの各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)が生成され、これらのデータに基づいて、頂点処理(頂点シェーダによるシェーディング)が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。   The drawing processing unit 120 (image generation unit) performs drawing processing of a plurality of objects including model objects. For example, a drawing process is performed based on the results of various processes (game process, simulation process) performed by the processing unit 100, thereby generating an image and outputting it to the display unit 190. When generating a so-called three-dimensional game image, first, vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the model object is generated, and based on these data Thus, vertex processing (shading by a vertex shader) is performed. When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary.

頂点処理(頂点シェーダ処理)では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)が行われる。   In vertex processing (vertex shader processing), vertex movement processing, coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, perspective transformation, etc. according to a vertex processing program (vertex shader program, first shader program) Geometry processing is performed, and based on the processing result, the vertex data given to the vertex group constituting the object is changed (updated, 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.

ピクセル処理(ピクセルシェーダ処理)では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャ記憶部174に記憶されるテクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたモデルの描画色を描画バッファ176(ピクセル単位で画像情報を記憶できるバッファ。VRAM、レンダリングターゲット、フレームバッファ)に出力(描画)する。即ち、ピクセル処理では、画像情報(色、法線、輝度、α値等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。   In pixel processing (pixel shader processing), according to a pixel processing program (pixel shader program, second shader program), reading of texture (texture mapping) stored in the texture storage unit 174, setting / changing of color data, and translucency Various processes such as synthesis and anti-aliasing are performed to determine the final drawing color of the pixels constituting the image, and the drawing color of the perspective transformed model is drawn buffer 176 (a buffer that can store image information in pixel units. VRAM). (Rendering target, frame buffer). 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.

なお頂点処理やピクセル処理は、シェーディング言語によって記述されたシェーダプログラムによって、ポリゴン(プリミティブ)の描画処理をプログラム可能にするハードウェア、いわゆるプログラマブルシェーダ(頂点シェーダやピクセルシェーダ)により実現される。プログラマブルシェーダでは、頂点単位の処理やピクセル単位の処理がプログラム可能になることで描画処理内容の自由度が高く、従来のハードウェアによる固定的な描画処理に比べて表現力を大幅に向上させることができる。   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 processing unit 120 performs lighting processing (shading processing) based on an illumination model or the like. Specifically, this lighting processing includes light source information (light source vector, light source color, brightness, light source type, etc.), line-of-sight vector of virtual camera (viewpoint), normal vector of object (translucent object), object material ( Color, material) and the like. Illumination models include Lambert's diffuse lighting model that considers only ambient light and diffused light, Phong lighting model that considers specular light in addition to ambient light and diffused light, and Brin Phong lighting model. is there.

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

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

また描画処理部120は影画像を生成するためのシャドウイング処理を行う。具体的には本実施形態では、描画処理部120が第1の描画処理部121と第2の描画処理部122を含む。   The drawing processing unit 120 performs a shadowing process for generating a shadow image. Specifically, in the present embodiment, the drawing processing unit 120 includes a first drawing processing unit 121 and a second drawing processing unit 122.

そして第1の描画処理部121は、モデルオブジェクトを含む複数のオブジェクトの描画処理を行って、モデルオブジェクトの画像とモデルオブジェクトの影画像が表示される画像を生成する。具体的には、モデルオブジェクトの描画処理を行い、モデルオブジェクトの画像を生成する。次に、シャドウイング処理を行いながら背景オブジェクトの描画処理を行い、モデルオブジェクトが移動するフィールド等の背景に対してモデルオブジェクトの影が表示された画像を生成する。   Then, the first drawing processing unit 121 performs drawing processing of a plurality of objects including model objects, and generates an image in which an image of the model object and a shadow image of the model object are displayed. Specifically, a model object drawing process is performed to generate an image of the model object. Next, the background object is drawn while performing the shadowing process, and an image in which the shadow of the model object is displayed on the background such as the field to which the model object moves is generated.

このように第1の描画処理部121は、モデルオブジェクトの描画処理を行った後に、背景オブジェクトの描画処理を行う。これによりモデルオブジェクトを描画した領域には、背景オブジェクトを描画しなくても済むようになり、描画処理の負荷を軽減できる。   As described above, the first drawing processing unit 121 performs the drawing process of the background object after performing the drawing process of the model object. As a result, it is not necessary to draw a background object in the area where the model object is drawn, and the drawing processing load can be reduced.

第1の描画処理部121は、例えばシャドウマップ(Shadow map)処理により、モデルオブジェクトの影画像を生成する。具体的には、影の投影方向でのオブジェクトのZ値をレンダリングすることでシャドウマップテクスチャを生成する。そして、このシャドウマップテクスチャとオブジェクトのテクスチャを用いてオブジェクトの描画処理を行うことで影画像を生成する。   The first drawing processing unit 121 generates a shadow image of the model object by, for example, shadow map processing. Specifically, the shadow map texture is generated by rendering the Z value of the object in the shadow projection direction. Then, a shadow image is generated by performing an object drawing process using the shadow map texture and the texture of the object.

また第1の描画処理部121は、分散シャドウマップ(Variance Shadow map)処理により影画像を生成してもよい。この場合には、影の投影方向でのオブジェクトのZ値のレンダリングを行うと共にZ値の二乗のレンダリングを行うことで、シャドウマップテクスチャを生成すればよい。なおシャドウマップ処理としては、分散シャドウマップ以外にも、コンベンショナルなシャドウマップ処理やライトスペースシャドウマップ処理やオパシティシャドウマップ処理などの種々の処理を採用できる。或いは、シャドウマップ処理以外にも、ボリュームシャドウ(ステンシルシャドウ)処理や投影テクスチャシャドウ処理などのシャドウイング処理を採用してもよい。   Further, the first drawing processing unit 121 may generate a shadow image by distributed shadow map processing. In this case, the shadow map texture may be generated by rendering the Z value of the object in the shadow projection direction and rendering the Z value squared. In addition to the distributed shadow map, various processes such as a conventional shadow map process, a light space shadow map process, and an opacity shadow map process can be employed as the shadow map process. Alternatively, in addition to the shadow map process, a shadowing process such as a volume shadow (stencil shadow) process or a projected texture shadow process may be employed.

一方、第2の描画処理部122は、モデルオブジェクトの接地部に対応する影プリミティブ面の描画処理を行って、接地部の影画像を生成する。これによりモデルオブジェクトの影画像に対して接地部の影画像が合成された画像が生成される。   On the other hand, the second drawing processing unit 122 performs a shadow primitive surface drawing process corresponding to the grounding part of the model object, and generates a shadow image of the grounding part. As a result, an image in which the shadow image of the grounding portion is combined with the shadow image of the model object is generated.

ここで、接地部は、モデルオブジェクトの例えば足や手などであり、モデルオブジェクトが移動するフィールドに接地することが予定されている部分である。なおモデルオブジェクトがフィールド(地面)に倒れた場合には、倒れた際にモデルオブジェクトがフィールドに接地する部分である背中等を接地部に設定してもよい。本実施形態では、このような接地部のいわゆるオクルージョン領域の影を表現するために、接地部に対応する影プリミティブ面(狭義には足影ポリゴン等の影ポリゴン)の描画処理を行う。   Here, the grounding unit is a part of the model object, for example, a foot or a hand, and is a part scheduled to be grounded to a field where the model object moves. When the model object falls to the field (ground), the back or the like where the model object touches the field when it falls may be set as the grounding unit. In the present embodiment, in order to express the shadow of the so-called occlusion area of such a grounding portion, a rendering process of a shadow primitive surface (shadow polygon such as a foot shadow polygon in a narrow sense) corresponding to the grounding portion is performed.

具体的には第2の描画処理部122は、接地部に対して設定された影生成用プリミティブ面を、モデルオブジェクトが移動するフィールド(ゲームフィールド、地面)に対して投影することで影プリミティブ面を生成する。そしてこの影プリミティブ面の描画処理を行うことで、接地部の影画像を生成する。   Specifically, the second drawing processing unit 122 projects the shadow generation primitive surface set for the grounding unit onto the field (game field, ground) on which the model object moves, thereby projecting the shadow primitive surface. Is generated. Then, by performing the shadow primitive plane drawing process, a shadow image of the grounding portion is generated.

この場合に第2の描画処理部122は、第1の描画処理部121がモデルオブジェクトの影画像の生成に使用する投影方向とは異なる投影方向に基づいて、接地部の影画像を生成してもよい。例えば第1の描画処理部121が、主光源の投影方向を用いてシャドウマップ処理等のシャドウイング処理を行ったとする。そして、この時に点光源が存在する場合には、第2の描画処理部122は、点光源の投影方向(投影ベクトル、光源ベクトル)を用いて、接地部の影画像を生成する。具体的には例えば点光源の明るさ(明度)が所定のしきい値以上である場合に、点光源の投影方向に基づいて接地部の影画像を生成する。一方。点光源の明るさが所定のしきい値よりも小さい場合には、主光源の投影方向(投影ベクトル、光源ベクトル)に基づいて接地部の影画像を生成する。   In this case, the second drawing processing unit 122 generates a shadow image of the grounding unit based on a projection direction different from the projection direction used by the first drawing processing unit 121 to generate the shadow image of the model object. Also good. For example, it is assumed that the first drawing processing unit 121 performs shadowing processing such as shadow map processing using the projection direction of the main light source. If a point light source is present at this time, the second drawing processing unit 122 generates a shadow image of the grounding unit using the projection direction (projection vector, light source vector) of the point light source. Specifically, for example, when the brightness (brightness) of the point light source is equal to or greater than a predetermined threshold, a shadow image of the grounding unit is generated based on the projection direction of the point light source. on the other hand. When the brightness of the point light source is smaller than a predetermined threshold value, a shadow image of the grounding unit is generated based on the projection direction (projection vector, light source vector) of the main light source.

また第2の描画処理部122は、影プリミティブ面を、仮想カメラから見て奥側方向にZシフトする。そして影プリミティブ面の各ピクセルのZ値の方がZバッファ177のZ値よりも仮想カメラから見て奥側のZ値である場合に描画されるという、通常とは異なるZ比較(Zテスト)の設定で、影プリミティブ面の描画処理を行ってもよい。このようにすることで、モデルオブジェクトの接地部が、フィールドの端部付近に位置する場合にも、接地部の適正な影画像を生成できるようになる。   The second drawing processing unit 122 Z-shifts the shadow primitive surface in the back direction as viewed from the virtual camera. Then, the Z value of each pixel of the shadow primitive surface is drawn when the Z value is the back Z value as viewed from the virtual camera rather than the Z value of the Z buffer 177. With this setting, the drawing process of the shadow primitive surface may be performed. This makes it possible to generate an appropriate shadow image of the grounding portion even when the grounding portion of the model object is located near the end of the field.

更に具体的には、第1の描画処理部121は、モデルオブジェクトの描画処理を行う際に、モデルオブジェクトの描画領域に対応するステンシルバッファ178の領域(ピクセル)に対して所定ステンシル値を書き込む。即ちモデルオブジェクトの描画の際にステンシルバッファ178への所定ステンシル値の書き込みも行う。   More specifically, the first drawing processing unit 121 writes a predetermined stencil value in an area (pixel) of the stencil buffer 178 corresponding to the drawing area of the model object when the drawing process of the model object is performed. That is, the predetermined stencil value is also written to the stencil buffer 178 when drawing the model object.

そして第2の描画処理部122は、ステンシルバッファ178に所定ステンシル値が書き込まれておらずステンシル値が例えばゼロにクリアされている領域(ピクセル)に対して、影プリミティブ面を描画する。このようにすれば、モデルオブジェクトの接地部に対して影画像が生成されてしまう事態を防止できる。   Then, the second drawing processing unit 122 draws a shadow primitive surface in a region (pixel) in which a predetermined stencil value is not written in the stencil buffer 178 and the stencil value is cleared to, for example, zero. In this way, it is possible to prevent a situation where a shadow image is generated with respect to the ground portion of the model object.

この場合に第2の描画処理部122は、影プリミティブ面の各ピクセルのZ値の方がZバッファ177のZ値よりも仮想カメラから見て手前側のZ値である場合に描画されるという、通常のZ比較の設定で、影プリミティブ面の描画処理を行って、ステンシルバッファ178の所定ステンシル値をクリアしてもよい。このようにすれば、モデルオブジェクトの接地部がフィールドにめり込んでいるような状況においても、接地部の適正な影画像の生成が可能になる。   In this case, the second drawing processing unit 122 is drawn when the Z value of each pixel of the shadow primitive surface is the Z value closer to the virtual camera than the Z value of the Z buffer 177. The shadow primitive plane may be drawn with the normal Z comparison setting to clear the predetermined stencil value in the stencil buffer 178. This makes it possible to generate an appropriate shadow image of the grounding portion even in a situation where the grounding portion of the model object is embedded in the field.

なおステンシルバッファ178は、Zバッファ177の上位ビットの領域に形成できる。例えばZバッファ177の各ピクセルのビット数が24ビットである場合に、その上位8ビットの領域をステンシルバッファ178に設定して、ステンシル値を書き込めるようにしてもよい。   The stencil buffer 178 can be formed in the upper bit area of the Z buffer 177. For example, when the number of bits of each pixel in the Z buffer 177 is 24 bits, the upper 8 bits may be set in the stencil buffer 178 so that the stencil value can be written.

また第2の描画処理部122は、接地部の接地面と、モデルオブジェクトが移動するフィールドとのなす角度に応じて、影画像の濃さを制御してもよい。例えば接地面とフィールドとのなす角度が増えるにつれて、影画像の濃さを薄くする。このようにすることで、例えばキャラクタであるモデルオブジェクトが倒れた場合などにおいて、その接地部である足の不自然な影画像が生成されてしまう事態を防止できる。   Further, the second drawing processing unit 122 may control the darkness of the shadow image according to the angle formed by the ground plane of the ground unit and the field where the model object moves. For example, as the angle between the ground plane and the field increases, the darkness of the shadow image is reduced. In this way, for example, when a model object that is a character falls, an unnatural shadow image of a foot that is a ground contact portion can be prevented from being generated.

音生成部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.1 距離に応じた影の濃さの制御
本実施形態では、キャラクタなどのモデルオブジェクトのよりリアルな影を表現するために、例えば後述するシャドウマップ処理などのシャドウイング処理により影画像を生成している。
2. 2. Technique of this embodiment 2.1 Shadow density control according to distance In this embodiment, in order to express a more realistic shadow of a model object such as a character, for example, shadowing processing such as shadow map processing described later is performed. Thus, a shadow image is generated.

しかしながら、シャドウマップ処理等により影画像を生成した場合、影形状についてはリアルに表現できるものの、足などのオクルージョン領域の影については、リアルに表現することが難しい。   However, when a shadow image is generated by shadow map processing or the like, the shadow shape can be expressed realistically, but the shadow of an occlusion area such as a foot is difficult to express realistically.

そこで本実施形態では、シャドウイング処理によりモデルオブジェクトの影画像(全体の影画像)を生成すると共に、その影画像に対して、モデルオブジェクトの足等の接地部の影画像を合成する手法を採用している。具体的には、足部分(広義には接地部)に対応する足影ポリゴン(広義には影プリミティブ面)の描画処理を行って、モデルオブジェクトの全体の影画像に対して足の影画像(広義には接地部の影画像)が合成された画像を生成する。   Therefore, in the present embodiment, a method of generating a shadow image of the model object (entire shadow image) by shadowing processing and combining the shadow image of the grounding portion such as the foot of the model object with the shadow image is adopted. is doing. Specifically, a foot shadow polygon (a shadow primitive surface in a broad sense) corresponding to a foot portion (a ground contact portion in a broad sense) is drawn, and a foot shadow image ( In a broad sense, an image in which a shadow image of the grounding portion is combined is generated.

例えば図2に本実施形態により生成されたゲーム画像の例を示す。図2は、キャラクタであるモデルオブジェクトMOB1とMOB2が対峙して対戦するゲーム画像の例である。   For example, FIG. 2 shows an example of a game image generated by this embodiment. FIG. 2 is an example of a game image in which the model objects MOB1 and MOB2 that are characters face each other.

図2においてモデルオブジェクトMOB1の全体の影画像SD1は、シャドウマップ処理などのシャドウイング処理により生成されている。この影画像SD1は、その影形状については、モデルオブジェクトMOB1の形状を忠実に反映したよりリアルな影になっているが、光源の明るさ等の関係で、全体的に濃さが薄い影画像になっている。モデルオブジェクトMOB2の影画像SD2についても同様である。   In FIG. 2, the entire shadow image SD1 of the model object MOB1 is generated by shadowing processing such as shadow map processing. The shadow image SD1 is a more realistic shadow that faithfully reflects the shape of the model object MOB1. However, the shadow image SD1 is generally darker due to the brightness of the light source. It has become. The same applies to the shadow image SD2 of the model object MOB2.

そして、このようなシャドウイング処理だけでは、モデルオブジェクトの足部分の影画像については、現実世界のようなリアルな影を生成することが難しい。即ち足部分の下のようないわゆるオクルージョン領域は、外部からの光が届かない領域であるため、現実世界においては非常に暗い影が生成される。しかしながら、シャドウイング処理で使用される主光源の光は淡い光になる場合が多いため、これにより生成された影画像も淡い影になる場合が増えてくる。従って、シャドウイング処理により足部分の下の暗い影を表現することは難しい。そして、このような足部分の影のリアルな表現を実現できないと、キャラクタであるモデルオブジェクトが地面から浮いて見えるようになってしまい、いわゆるキャラクタの接地感の表現が不十分になる。   And it is difficult to generate a real shadow like the real world for the shadow image of the foot part of the model object only by such shadowing processing. That is, a so-called occlusion area, such as under the foot part, is an area where light from the outside does not reach, and thus a very dark shadow is generated in the real world. However, since the light of the main light source used in the shadowing process often becomes light, the shadow image generated thereby increases in number of light shadows. Therefore, it is difficult to express a dark shadow under the foot portion by shadowing processing. If such a realistic expression of the shadow of the foot portion cannot be realized, the model object that is the character will appear to float from the ground, and the expression of the so-called ground contact feeling of the character will be insufficient.

この場合、例えば厳密な物理計算を行うことで、このようなオクルージョン領域の影を表現する手法も考えられるが、この手法では処理負荷が非常に重くなってしまうという問題がある。   In this case, for example, a technique for expressing the shadow of such an occlusion area by performing strict physical calculation is conceivable. However, this technique has a problem that the processing load becomes very heavy.

この点、図2に示すように本実施形態では、足部分LOB1の影である足影画像LSD1については、足影ポリゴンの描画処理により生成しており、いわゆる丸影により実現している。そして、シャドウマップ処理等のシャドウイング処理により生成された影画像SD1と、足影ポリゴンの描画により得られた足影画像LSD1を合成することで、モデルオブジェクトMOB1の影が表現される。同様に、モデルオブジェクトMOB2の影画像SD2と足影画像LSD2を合成することで、モデルオブジェクトMOB2の影が表現される。   In this regard, as shown in FIG. 2, in the present embodiment, the foot shadow image LSD1, which is a shadow of the foot portion LOB1, is generated by a foot shadow polygon drawing process, and is realized by a so-called round shadow. Then, the shadow of the model object MOB1 is expressed by synthesizing the shadow image SD1 generated by shadowing processing such as shadow map processing and the foot shadow image LSD1 obtained by drawing the foot shadow polygon. Similarly, the shadow of the model object MOB2 is expressed by combining the shadow image SD2 of the model object MOB2 and the foot shadow image LSD2.

このようにすれば、モデルオブジェクトMOB1の全体的な影については、シャドウイング処理による影画像SD1により、その影形状等をリアルに表現できる。   In this way, the shadow shape and the like of the entire shadow of the model object MOB1 can be realistically represented by the shadow image SD1 obtained by the shadowing process.

一方、足部分LOB1のオクルージョン領域の部分的な影については、足影ポリゴンの描画による足影画像LSD1により、その影の暗さ等をリアルに表現できる。これにより、モデルオブジェクトMOB1が地面から浮いて見える事態を防止でき、接地感を好適に表現できる。   On the other hand, regarding the partial shadow of the occlusion area of the foot portion LOB1, the darkness of the shadow can be realistically expressed by the foot shadow image LSD1 drawn by the foot shadow polygon. As a result, it is possible to prevent the model object MOB1 from appearing floating from the ground, and to express a feeling of grounding appropriately.

このように本実施形態では、影画像SD1と足影画像LSD1を異なる手法で互いに独立に生成し、全体的な影画像SD1と部分的な足影画像LSD1を合成することで、少ない処理負荷でよりリアルな影を生成することに成功している。   As described above, in this embodiment, the shadow image SD1 and the foot shadow image LSD1 are generated independently from each other by different methods, and the overall shadow image SD1 and the partial foot shadow image LSD1 are synthesized, thereby reducing the processing load. It has succeeded in generating more realistic shadows.

2.2 シャドウマップ処理
さて、キャラクタ等のモデルオブジェクトの影画像は、例えばシャドウマップ処理により生成できる。次に、このシャドウマップ処理の詳細について図3を用いて説明する。
2.2 Shadow Map Processing A shadow image of a model object such as a character can be generated by, for example, shadow map processing. Next, details of the shadow map processing will be described with reference to FIG.

シャドウマップ処理では、まず、影生成用の光源LSから見た、モデルオブジェクトMOBや背景オブジェクトBOBなどのオブジェクトのZ値(深度値、奥行き値)をレンダリングすることで、シャドウマップテクスチャSDTEXを生成する。即ち光源LSの位置に仮想カメラVCを設定してオブジェクトのZ値のレンダリングを行う。例えば図3では、モデルオブジェクトMOBの点P1’のZ値Z1や、背景オブジェクトBOBの点P2のZ値Z2等がレンダリングされて、シャドウマップテクスチャSDTEXが生成されている。   In the shadow map processing, first, a shadow map texture SDTEX is generated by rendering Z values (depth values and depth values) of objects such as the model object MOB and the background object BOB as viewed from the light source LS for generating shadows. . That is, the virtual camera VC is set at the position of the light source LS, and the Z value of the object is rendered. For example, in FIG. 3, the Z value Z1 of the point P1 'of the model object MOB, the Z value Z2 of the point P2 of the background object BOB, and the like are rendered to generate the shadow map texture SDTEX.

例えば図4にシャドウマップテクスチャSDTEXの例を示す。このシャドウマップテクスチャSDTEXは、図2のゲーム画像に対応するものであり、影生成用の光源を図2の右上に設定した場合に生成されるテクスチャの例である。図4では、仮想カメラに近い側のZ値は黒で描かれ、仮想カメラから遠い側のZ値は白で描かれている。   For example, FIG. 4 shows an example of a shadow map texture SDTEX. This shadow map texture SDTEX corresponds to the game image of FIG. 2, and is an example of a texture generated when the light source for shadow generation is set in the upper right of FIG. In FIG. 4, the Z value closer to the virtual camera is drawn in black, and the Z value farther from the virtual camera is drawn in white.

次に、スクリーンSCに映る視界画像生成用の視点位置に、仮想カメラVCを設定して、モデルオブジェクトMOBや背景オブジェクトBOBなどのオブジェクトのレンダリングを行う。この際に、オブジェクトの各ピクセルのZ値と、シャドウマップテクスチャSDTEXの対応する各テクセルのZ値とを比較しながら、オブジェクトのレンダリングを行う。   Next, the virtual camera VC is set at the viewpoint position for generating the visual field image displayed on the screen SC, and rendering of objects such as the model object MOB and the background object BOB is performed. At this time, the object is rendered while comparing the Z value of each pixel of the object with the Z value of each corresponding texel of the shadow map texture SDTEX.

例えば図3において、仮想カメラVCから見た点P1のZ値(距離)は、シャドウマップテクスチャSDTEXの対応する点P1’のZ値よりも大きい。従って、点P1は点P1’に隠れて影になる部分であると判定され、点P1に対応するピクセルには影の色(例えば黒)が描かれる。   For example, in FIG. 3, the Z value (distance) of the point P1 viewed from the virtual camera VC is larger than the Z value of the corresponding point P1 'of the shadow map texture SDTEX. Accordingly, it is determined that the point P1 is a portion that is shadowed by the point P1 ', and a shadow color (for example, black) is drawn on the pixel corresponding to the point P1.

一方、点P2については、仮想カメラVCから見たZ値と、シャドウマップテクスチャSDTEXにおけるZ値が例えば等しくなる。従って、点P2は影の部分ではないと判断されて、影の色は描画されない。   On the other hand, for the point P2, the Z value viewed from the virtual camera VC is equal to the Z value in the shadow map texture SDTEX, for example. Therefore, it is determined that the point P2 is not a shadow portion, and the shadow color is not drawn.

このようにすることで、背景に対して落ちるモデルオブジェクトMOBの影やモデルオブジェクトMOBの自己影等を生成できる。   By doing so, it is possible to generate a shadow of the model object MOB falling on the background, a self-shadow of the model object MOB, and the like.

さて、コンベンショナルなシャドウマップ処理では、影部分か否かの判定処理を0か1かの2値判定により行っている。このため、影の輪郭(影部分と影以外の部分との境界)等においてジャギー等が目立ってしまい、生成される影画像の品質を今ひとつ高めることができないという課題がある。   Now, in the conventional shadow map process, the process of determining whether or not it is a shadow part is performed by binary determination of 0 or 1. For this reason, jaggy or the like is conspicuous in the shadow outline (the boundary between the shadow portion and the portion other than the shadow), and there is a problem that the quality of the generated shadow image cannot be improved.

このような課題を解決するためには、分散シャドウマップ(Variance Shadow Map)と呼ばれる手法を採用することが望ましい。この分散シャドウマップでは、確率論であるチェビシェフの不等式の考えを利用して、光が当たっている確率(最大確率)を算出する。即ち、分散シャドウマップ処理では、影か否かの判定の結果が、0〜1の範囲の実数である確率(最大確率)で表されるため、この確率の値をそのまま影の濃さ(影の色)として設定できる。従って、影の判定処理を0(影部分)か1(光が当たっている部分)かの2値で行っているコンベンショナルなシャドウマップ処理に比べて、影画像のジャギー等を目立たなくすることができ、滑らかな影の輪郭を表現できる。   In order to solve such a problem, it is desirable to adopt a technique called a distributed shadow map. In this distributed shadow map, the probability of light hitting (maximum probability) is calculated using the idea of Chebyshev's inequality, which is probability theory. That is, in the distributed shadow map processing, the result of the determination as to whether or not it is a shadow is represented by a probability (maximum probability) that is a real number in the range of 0 to 1. Therefore, this probability value is directly used as the shadow density (shadow shadow). Color). Therefore, compared with the conventional shadow map process in which the shadow determination process is performed with binary values of 0 (shadow part) or 1 (lighted part), the shadow image jaggies and the like may be made inconspicuous. And can express a smooth shadow outline.

例えば、確率論の基本的な定理であるチェビシェフの不等式は下式(1)のように表される。   For example, Chebyshev's inequality, which is a basic theorem of probability theory, is expressed as the following equation (1).

ここでxは確率分布における確率変数であり、μは平均であり、σは分散であり、tはt>0となる任意の実数である。例えばt=2とすると、確率分布において平均μから2σ以上離れた値は全体の1/4を超えることはないということが導き出される。即ちx>μ+2σ、x<μ−2σとなる確率は1/4を超えることはないことが導き出される。 Here, x is a random variable in the probability distribution, μ is an average, σ is a variance, and t is an arbitrary real number that satisfies t> 0. For example, when t = 2, it is derived that a value that is 2σ or more away from the average μ in the probability distribution does not exceed 1/4 of the whole. That is, it is derived that the probability that x> μ + 2σ and x <μ−2σ does not exceed ¼.

分散シャドウマップ処理は、このチェビシェフの不等式の考えを利用するものであり、下式(2)(3)のモーメントM1、M2が求められる。   The distributed shadow map process utilizes the Chebyshev inequality idea, and the moments M1 and M2 of the following expressions (2) and (3) are obtained.

これらの式(2)(3)より、下式(4)(5)のように表される平均μ、分散(variance)σが求められる。 From these formulas (2) and (3), the average μ and the variance σ 2 expressed as the following formulas (4) and (5) are obtained.

そしてチェビシェフの不等式の考えにより、t>μの条件の下で、下式(6)が成立する。 Based on the Chebyshev inequality, the following equation (6) is established under the condition of t> μ.

ここで、tはピクセルのZ値に相当し、xは、ぼかし処理が施されたシャドウマップテクスチャのZ値に相当する。この確率pmax(x)から影の濃さ(色)を決めることになる。 Here, t corresponds to the Z value of the pixel, and x corresponds to the Z value of the shadow map texture subjected to the blurring process. The darkness (color) of the shadow is determined from this probability pmax (x).

そして本実施形態では上式(6)を変形した下式(7)を使用する。   In this embodiment, the following expression (7) obtained by modifying the above expression (6) is used.

ここで、Σは、σ+εを0〜1.0の範囲にクランプした値であり、調整された分散値である。 Here, Σ is a value obtained by clamping σ 2 + ε within a range of 0 to 1.0, and is an adjusted dispersion value.

またεは分散調整パラメータであり、分散σに対してバイアス値を加算するためのパラメータである。この分散調整パラメータεの値を大きくすることで、分散シャドウマップにおける分散の度合いを強制的に大きくすることが可能になる。なお分散調整パラメータをε=0に設定すると、本来は影とならない領域にノイズピクセルが発生してしまうが、ε>0に設定することで、このノイズピクセルを低減できる。 The ε is the variance adjustment parameter is a parameter for adding a bias value to the variance sigma 2. By increasing the value of the dispersion adjustment parameter ε, the degree of dispersion in the dispersion shadow map can be forcibly increased. If the dispersion adjustment parameter is set to ε = 0, noise pixels are generated in a region that is not originally shaded. However, by setting ε> 0, the noise pixels can be reduced.

例えばコンベンショナルなシャドウマップ処理ではZ値だけをレンダリングするが、分散シャドウマップ処理では、Z値をレンダリングすると共に、Z値の二乗をレンダリングして、2チャネルのバッファにシャドウマップテクスチャを生成する。そして、このシャドウマップテクスチャに対して、ブラーなどのフィルタ処理(ガウシアン・フィルタ等)を施す。   For example, in the conventional shadow map process, only the Z value is rendered. In the distributed shadow map process, the Z value is rendered, and the square of the Z value is rendered to generate a shadow map texture in a two-channel buffer. The shadow map texture is then subjected to filter processing such as blur (Gaussian filter, etc.).

次に、シャドウマップテクスチャにより上式(2)(3)のモーメントM1、M2を求め、上式(4)(5)の平均(期待値)μ、分散σを求める。また分散σと分散調整パラメータεに基づいて、調整された分散値であるΣを求める。 Next, the moments M1 and M2 of the above equations (2) and (3) are obtained from the shadow map texture, and the average (expected value) μ and the variance σ 2 of the above equations (4) and (5) are obtained. Further, based on the dispersion σ 2 and the dispersion adjustment parameter ε, Σ which is an adjusted dispersion value is obtained.

そして、ピクセル(フラグメント)のZ値(デプス)であるtが、t<μである場合には、影以外の部分であると判断する。一方、t≧μである場合には、上式(7)の確率pmax(t)により、光の減衰率を求めて、影の濃さ(色)を決定する。なお確率pmax(t)そのものではなく、pmax(t)のべき乗(例えば4乗)を用いてもよい。   If t, which is the Z value (depth) of a pixel (fragment), is t <μ, it is determined that the portion is not a shadow. On the other hand, when t ≧ μ, the light attenuation rate is obtained from the probability pmax (t) of the above equation (7), and the shadow density (color) is determined. Instead of the probability pmax (t) itself, a power (for example, the fourth power) of pmax (t) may be used.

以上のようなシャドウマップ処理を、モデルオブジェクトや背景オブジェクトの描画処理の際に行うことで、図2に示すモデルオブジェクトMOB1、MOB2の影画像SD1、SD2を生成できるようになる。   By performing the shadow map process as described above during the drawing process of the model object and the background object, the shadow images SD1 and SD2 of the model objects MOB1 and MOB2 shown in FIG. 2 can be generated.

2.3 足影画像の生成手法
次に、図2の足影画像LSD1、LSD2の具体的な生成手法について説明する。
2.3 Foot Shadow Image Generation Method Next, a specific generation method of the foot shadow images LSD1 and LSD2 in FIG. 2 will be described.

まず、図5(A)に示すように、モデルオブジェクトの足部分LOB(広義には接地部)に対応する足影生成用ポリゴンGPL(広義には影生成用プリミティブ面)を生成する。具体的には、足首のボーンBN1の位置BP1(BN1の座標変換マトリクス)と、つま先のボーンBN2の位置BP2(BN2の座標変換マトリクス)に基づいて、足影生成用ポリゴンGPLを構成する頂点V1〜V6を生成する。   First, as shown in FIG. 5A, a foot shadow generation polygon GPL (a shadow generation primitive surface in a broad sense) corresponding to a foot portion LOB (a ground contact portion in a broad sense) of the model object is generated. Specifically, based on the position BP1 of the ankle bone BN1 (the coordinate conversion matrix of BN1) and the position BP2 of the toe bone BN2 (the coordinate conversion matrix of BN2), the vertex V1 constituting the foot shadow generation polygon GPL ~ V6 is generated.

更に具体的には図5(B)に示すようなサイズテーブルと図5(C)に示すような頂点データテーブルを用意する。   More specifically, a size table as shown in FIG. 5B and a vertex data table as shown in FIG. 5C are prepared.

ここで、図5(B)のサイズテーブルには、モデルオブジェクトの種別である男、女、怪物に対応して、標準的な足影サイズが格納されている。例えば小さい男用、大きい男用、小さい女用、大きい女用、小さい怪物用、大きい怪物用の足影サイズSZA、SZB、SZC、SZD、SZE、SZFが格納されている。また図5(C)の頂点データテーブルには各種別に対応する頂点データ(頂点座標)が格納されている。   Here, in the size table of FIG. 5B, standard foot shadow sizes are stored corresponding to the types of model objects, male, female, and monster. For example, foot shadow sizes SZA, SZB, SZC, SZD, SZE, and SZF for a small man, a large man, a small woman, a large woman, a small monster, and a large monster are stored. The vertex data table in FIG. 5C stores vertex data (vertex coordinates) corresponding to each type.

そして図5(A)のボーンBN1の位置(関節)BP1とボーンBN2の位置(関節)BP2との距離LBを求める。次に、モデルオブジェクトの種別が例えば男であった場合には、小さい男に対応する最小距離LBAと大きい男に対応する最大距離LBBを、図5(B)のサイズテーブルから読み出して、距離LBと距離LBA、LBBとに基づいて補間率を求める。そして、求められた補間率を用いて、小さい男用の足影サイズSZAと大きい男用の足影サイズSZBの補間処理を行うことで、モデルオブジェクトの足影サイズを求める。そして、求められた足影サイズ(補間率)に基づいて、図5(B)の頂点データテーブルの対応する種別の頂点データの補間処理を行うことで、図5(A)の足影生成用ポリゴンGPLの頂点V1〜V6の頂点データ(頂点座標)を求める。   Then, the distance LB between the position (joint) BP1 of the bone BN1 and the position (joint) BP2 of the bone BN2 in FIG. Next, when the type of the model object is, for example, male, the minimum distance LBA corresponding to the small male and the maximum distance LBB corresponding to the large male are read from the size table of FIG. Then, an interpolation rate is obtained based on the distances LBA and LBB. Then, using the obtained interpolation rate, the foot shadow size of the model object is obtained by performing an interpolation process between the small male foot shadow size SZA and the large male foot shadow size SZB. Then, based on the obtained foot shadow size (interpolation rate), interpolation processing of the corresponding types of vertex data in the vertex data table of FIG. 5B is performed, thereby generating the foot shadow of FIG. 5A. Vertex data (vertex coordinates) of the vertices V1 to V6 of the polygon GPL is obtained.

次に、図6に示すように、影生成用の光源LS(主光源、点光源)の投影方向PDで、足影生成用ポリゴンGPLの頂点V1〜V6をゲームフィールドFLD(広義にはフィールド)に投影することで、投影された頂点VP1〜VP6により構成される足影ポリゴンSPLを生成する。   Next, as shown in FIG. 6, vertices V1 to V6 of the foot shadow generation polygon GPL are set in the game field FLD (field in a broad sense) in the projection direction PD of the light source LS (main light source, point light source) for shadow generation. To generate a foot shadow polygon SPL constituted by the projected vertices VP1 to VP6.

また足影生成用ポリゴンGPLの頂点V1〜V6のゲームフィールドFLD(地面)からの高さ距離LH1〜LH6を求める。そして光源LSの明るさから求められた足影の最大濃さを、この高さ距離LH1〜LH6に応じて距離減衰させることで、足影ポリゴンSPLの頂点VP1〜VP6に設定される影の濃さを求める。具体的には、所定距離で影が透明になると共に高さ距離LH1〜LH6が遠いほど減衰量が大きくなるように設定された演算式を用いて、足影ポリゴンSPLの頂点VP1〜VP6の影の濃さを求める。そして、この影の濃さで足影ポリゴンSPLを描画することで、図2に示すような足影画像LSD1、LSD2を生成する。このようにして、モデルオブジェクトMOB1、MOB2の全体的な影画像SD1、SD2と、足影画像LSD1、LSD2とが合成された画像が生成される。   Also, the height distances LH1 to LH6 of the vertices V1 to V6 of the foot shadow generating polygon GPL from the game field FLD (ground) are obtained. The maximum darkness of the foot shadow obtained from the brightness of the light source LS is attenuated by the distance according to the height distances LH1 to LH6, whereby the darkness of the shadow set at the vertices VP1 to VP6 of the footshadow polygon SPL. I ask for it. Specifically, the shadows of the vertices VP1 to VP6 of the foot shadow polygon SPL are calculated using an arithmetic expression set so that the shadow becomes transparent at a predetermined distance and the attenuation amount increases as the height distances LH1 to LH6 increase. Find the density of. Then, by drawing the foot shadow polygon SPL with this shadow density, foot shadow images LSD1 and LSD2 as shown in FIG. 2 are generated. In this manner, an image in which the overall shadow images SD1 and SD2 of the model objects MOB1 and MOB2 and the foot shadow images LSD1 and LSD2 are combined is generated.

なお本実施形態では、モデルオブジェクトMOB1、MOB2の全体的な影画像SD1、SD2の生成に使用する投影ベクトルとは異なる投影ベクトルを用いて、足影画像LSD1、LSDを生成できるようにしている。   In the present embodiment, the foot shadow images LSD1 and LSD can be generated using projection vectors different from the projection vectors used for generating the overall shadow images SD1 and SD2 of the model objects MOB1 and MOB2.

例えば図7では、モデルオブジェクトMOB1の剣とモデルオブジェクトMOB2の剣とがヒットするイベントにより、点光源が発生している。このような点光源が発生した場合には、この点光源の投影方向(投影ベクトル、光源ベクトル)を用いて、例えばモデルオブジェクトMOB1、MOB2の足影画像LSD1、LSD2を生成する。この場合に足影画像LSD1、LSD2は、モデルオブジェクトMOB1、MOOB2の影画像SD1、SD2の光源(例えば主光源)とは異なる点光源の投影方向PDを用いて生成される。従って、全体的な影画像SD1、SD2が落ちる方向とは異なる方向に足影画像LSD1、LSD2が落ちるようになる。この結果、図7に示すような点光源の発生をユーザに視覚的に訴えることが可能になり、ユーザの仮想現実感を向上できる。   For example, in FIG. 7, a point light source is generated by an event in which the sword of the model object MOB1 and the sword of the model object MOB2 hit. When such a point light source is generated, for example, foot shadow images LSD1 and LSD2 of the model objects MOB1 and MOB2 are generated using the projection direction (projection vector, light source vector) of the point light source. In this case, the foot shadow images LSD1 and LSD2 are generated using a projection direction PD of a point light source different from the light source (for example, main light source) of the shadow images SD1 and SD2 of the model objects MOB1 and MOOB2. Accordingly, the foot shadow images LSD1 and LSD2 fall in a direction different from the direction in which the overall shadow images SD1 and SD2 fall. As a result, it becomes possible to visually appeal to the user the generation of a point light source as shown in FIG. 7, and the virtual reality of the user can be improved.

なお足影画像を生成する光源の切り替えは、光源の明るさに基づいて行うようにしてもよい。例えば、ゲームフィールド上に松明等を表す点光源が予め設定されている場合は、モデルオブジェクトと点光源との距離に応じて、モデルオブジェクトの位置での点光源の明るさを求める。そして、その明るさが所定のしきい値より小さい場合には、主光源の投影方向を用いて、足影画像を生成する。一方、点光源の明るさが所定のしきい値以上である場合には、主光源から点光源に切り替えて、点光源の投影方向で足影画像を生成する。このようにすれば、松明等の点光源の存在をプレーヤに対して視覚的に訴えることができ、プレーヤの仮想現実感を更に向上できる。   Note that the switching of the light source that generates the foot shadow image may be performed based on the brightness of the light source. For example, when a point light source representing torches or the like is set in advance on the game field, the brightness of the point light source at the position of the model object is obtained according to the distance between the model object and the point light source. If the brightness is smaller than a predetermined threshold value, a foot shadow image is generated using the projection direction of the main light source. On the other hand, when the brightness of the point light source is equal to or greater than a predetermined threshold, the main light source is switched to the point light source, and a foot shadow image is generated in the projection direction of the point light source. In this way, the presence of a point light source such as a torch can be visually appealed to the player, and the virtual reality of the player can be further improved.

図8〜図11に本実施形態により生成されたゲーム画像の例を示す。   8 to 11 show examples of game images generated according to this embodiment.

例えば図8では、画面の左手前側に主光源が配置されているため、モデルオブジェクトMOB1の全体的な影画像SD1は、画面の左手前側から右奥側へと向かう方向に沿ってゲームフィールドFLDに落ちる。一方、図8では、非常に明るい点光源が画面の右奥側に配置されているため、モデルオブジェクトMOB1の足影画像LSD1については、全体的な影画像SD1とは反対に、画面の右奥側から左手前側へと向かう方向に沿ってゲームフィールドFLDに落ちる。   For example, in FIG. 8, since the main light source is arranged on the left front side of the screen, the entire shadow image SD1 of the model object MOB1 is displayed on the game field FLD along the direction from the left front side to the right back side of the screen. drop down. On the other hand, in FIG. 8, since the very bright point light source is arranged on the right back side of the screen, the foot shadow image LSD1 of the model object MOB1 is opposite to the overall shadow image SD1, and on the right back side of the screen. It falls to the game field FLD along the direction from the side toward the left front side.

図9ではモデルオブジェクトMOB2の武器がモデルオブジェクトMOB1にヒットすることで、モデルオブジェクトMOB1の胸の付近に仮想的なエフェクト用の点光源が発生している。これにより、モデルオブジェクトMOB1の足影画像LSD1は、この点光源の投影方向に沿ってゲームフィールドFLDに落ちるようになる。   In FIG. 9, when the weapon of the model object MOB2 hits the model object MOB1, a point light source for virtual effects is generated near the chest of the model object MOB1. Thereby, the foot shadow image LSD1 of the model object MOB1 falls on the game field FLD along the projection direction of the point light source.

図10ではモデルオブジェクトMOB1の足部分が上方向に浮いている。そして、このように足部分が浮くにしたがって、足影画像LSD1の濃さが薄くなって行く。そして図11では、足部分の高さ距離が所定値を超えたため、足影画像LSD1の濃さがほぼ透明になり、表示されないようになる。このようにすることで、モデルオブジェクトMOB1の足が徐々に上がって行く様子が、足影画像LSD1によって表現されるようになり、生成される画像のリアル感や仮想現実感を向上できる。   In FIG. 10, the foot portion of the model object MOB1 is floating upward. Then, as the foot portion floats in this way, the darkness of the foot shadow image LSD1 becomes lighter. In FIG. 11, since the height distance of the foot portion exceeds the predetermined value, the darkness of the foot shadow image LSD1 becomes almost transparent and is not displayed. By doing so, the state in which the foot of the model object MOB1 gradually rises is expressed by the foot shadow image LSD1, and the real feeling and virtual reality of the generated image can be improved.

2.4 ゲームフィールドの端部付近での足影画像の生成
さて、図5(A)〜図7等で説明した手法により足影画像を生成した場合に、例えばモデルオブジェクトの足部分がゲームフィールドの端部付近に置かれると、生成される画像に不具合が生じることが判明した。このよう不具合を解消するために本実施形態では以下に説明する手法を採用している。
2.4 Generation of Foot Shadow Image near End of Game Field Now, when a foot shadow image is generated by the method described in FIG. 5A to FIG. It has been found that a defect occurs in the generated image when placed near the edge of the. In order to eliminate such a problem, the present embodiment employs a method described below.

まず図12(A)に示すように、図5(A)、図6の手法により生成された足影ポリゴンSPL(影プリミティブ面)のZシフトを行う。具体的には足影ポリゴンSPLを、仮想カメラから見て奥側方向にZシフトして、ゲームフィールドFLDの面よりも仮想カメラから見て奥側になるようにする。例えば仮想カメラから遠ざかるにつれてZ値が大きくなる座標系では、足影ポリゴンSPLのZ値に対してZシフト値を加算し、仮想カメラから遠ざかるにつれてZ値が小さくなる座標系では、Zシフト値を減算すればよい。   First, as shown in FIG. 12A, the Z-shift of the foot shadow polygon SPL (shadow primitive plane) generated by the method of FIGS. 5A and 6 is performed. Specifically, the foot shadow polygon SPL is Z-shifted in the back direction when viewed from the virtual camera so that the foot shadow polygon SPL is on the back side when viewed from the virtual camera rather than the surface of the game field FLD. For example, in a coordinate system in which the Z value increases as the distance from the virtual camera increases, the Z shift value is added to the Z value of the foot shadow polygon SPL. In a coordinate system in which the Z value decreases as the distance from the virtual camera increases, the Z shift value is determined. Subtract.

そして、影ポリゴンSLPの各ピクセルのZ値の方がZバッファ177の対応するピクセルのZ値よりも仮想カメラから見て奥側のZ値である場合に描画されるというZ比較の設定にして、影ポリゴンSPLを描画する。即ち、通常のZ比較では手前側のポリゴンが描画されるように設定されるが、これとは逆に奥側のポリゴンが描画されるように設定して、影ポリゴンSPLを描画する。   The Z value of each pixel of the shadow polygon SLP is set to Z comparison so that drawing is performed when the Z value of the corresponding pixel in the Z buffer 177 is a Z value on the back side as viewed from the virtual camera. The shadow polygon SPL is drawn. That is, in the normal Z comparison, the front side polygon is set to be drawn, but on the contrary, the back side polygon is set to be drawn, and the shadow polygon SPL is drawn.

このようにすれば図12(A)のA1に示す部分では、ゲームフィールドFLDに対して影ポリゴンSPLの方が奥側にあるためSPLが描画され、A2に示す部分では、SPLは描画されないようになる。従って、足部分LOBの下側に適正に足影画像が生成されるようになる。   In this way, in the portion indicated by A1 in FIG. 12A, the shadow polygon SPL is behind the game field FLD, so that the SPL is drawn, and in the portion indicated by A2, the SPL is not drawn. become. Therefore, a foot shadow image is appropriately generated below the foot portion LOB.

即ち、上記のようなZシフトとZ比較の設定を行わずに影ポリゴンSPLを描画すると、足部分LOBがゲームフィールドFLDの端部付近にある場合に、A1に示す部分のみならずA2に示す部分においても影ポリゴンSPLが描画されてしまい、空間に影が浮いて見えるような不自然な画像が生成されてしまうおそれがある。   That is, when the shadow polygon SPL is drawn without setting Z shift and Z comparison as described above, when the foot portion LOB is near the end of the game field FLD, not only the portion shown in A1 but also A2 shows. The shadow polygon SPL is drawn also in the portion, and there is a possibility that an unnatural image in which a shadow appears in space is generated.

この点、図12(A)の手法によれば、上記のようなZシフトとZ比較の設定を行うことで、A1に示す部分においてのみ影ポリゴンSPLが描画され、A2に示す部分では影ポリゴンSPLが描画されないようになるため、適正な足影画像の生成が可能になる。   In this regard, according to the method of FIG. 12A, the shadow polygon SPL is drawn only in the portion indicated by A1 by performing the Z shift and Z comparison as described above, and the shadow polygon is indicated in the portion indicated by A2. Since the SPL is not drawn, an appropriate foot image can be generated.

また図12(A)の手法では、ゲームフィールドFLDのみならず足部分LOBに対しても影ポリゴンSPLが描画されるZ比較の設定になるため、足部分LOBに対して影が落ちたような画像が生成されてしまうおそれがある。   Further, in the method of FIG. 12A, since the Z comparison setting is performed in which the shadow polygon SPL is drawn not only for the game field FLD but also for the foot portion LOB, the shadow appears to be dropped on the foot portion LOB. An image may be generated.

即ち、ゲームフィールドFLDや影ポリゴンSPLを描画した後に、モデルオブジェクトを描画するという順序で描画すれば、このような事態は防止できる。しかしながら本実施形態では、描画処理の負荷を軽減するために、まずモデルオブジェクトを描画し、その後にゲームフィールドFLD等の背景オブジェクトを描画する手法を採用している。このようにすれば、モデルオブジェクトが既に描画された領域に対しては、背景オブジェクトを描画しなくても済むようになる。従って、ゲーム画面においてモデルオブジェクトが占める領域が大きい場合には、無駄な描画処理を省くことができ、描画処理の負荷を格段に軽減できる。   That is, such a situation can be prevented by drawing the model object in the order of drawing the game field FLD and the shadow polygon SPL. However, in this embodiment, in order to reduce the load of the drawing process, a method of drawing a model object first and then drawing a background object such as a game field FLD is adopted. In this way, it is not necessary to draw the background object in the area where the model object has already been drawn. Therefore, when the area occupied by the model object is large on the game screen, useless drawing processing can be omitted, and the drawing processing load can be greatly reduced.

しかしながら、このような順序で描画処理を行うと、図12(A)では、Z比較において、足部分LOBが影ポリゴンSPLにより隠面消去される設定になっているため、足部分LOB上に足影が落ちる画像が生成されてしまう。   However, if the drawing processing is performed in such an order, in FIG. 12A, since the foot portion LOB is set to be hidden by the shadow polygon SPL in the Z comparison, the foot portion LOB is set to the foot portion LOB. An image with shadows will be generated.

そこで図12(B)では、モデルオブジェクトの描画処理を行う際に、モデルオブジェクトの描画領域に対応するステンシルバッファ178の領域に対して所定ステンシル値を書き込む。そしてステンシルバッファ178に、上記の所定ステンシル値が書き込まれておらずステンシル値がクリアされている領域に対して、影ポリゴンSPLを描画するようにする。   Therefore, in FIG. 12B, when the drawing process of the model object is performed, a predetermined stencil value is written in the area of the stencil buffer 178 corresponding to the drawing area of the model object. Then, the shadow polygon SPL is drawn in the area where the predetermined stencil value is not written in the stencil buffer 178 and the stencil value is cleared.

このようにすれば、図12(B)のA3に示す足部分LOBの領域には、影ポリゴンSPLが描画されないようになるため、足部分LOBに対して足の影が落ちたような不自然な画像が生成されてしまう事態を防止できる。   In this way, since the shadow polygon SPL is not drawn in the area of the foot portion LOB indicated by A3 in FIG. 12B, it is unnatural that the foot shadow has fallen on the foot portion LOB. It is possible to prevent a situation where an image is generated.

また、例えばモーションデータに基づいてモデルオブジェクトのモーションを再生した場合に、図12(C)に示すようにモデルオブジェクトの足部分LOBがゲームフィールドFLDに対してめり込んでしまう場合がある。即ちモーションデータに基づきモーション再生を行う場合に、モーション補正等を行うことで、このような足のめり込みを、ある程度は解消できるが、それには限界がある。例えばキャラクタの足の踏み込みが激しい場合等には、足部分LOBがゲームフィールドFLDの下にめり込んでしまう。   Further, for example, when the motion of the model object is reproduced based on the motion data, as shown in FIG. 12C, the foot portion LOB of the model object may be embedded in the game field FLD. In other words, when performing motion reproduction based on motion data, such a dip in the foot can be eliminated to some extent by performing motion correction or the like, but there is a limit to this. For example, when the foot of the character is striking, the foot portion LOB will sink below the game field FLD.

このようなめり込みが生じた場合には、図12(C)のA4に示す領域にも、図12(B)の処理により所定ステンシル値が書き込まれてしまう。従って、A4の領域には影ポリゴンSPLが描画されないようになり、A4の領域だけ影が抜けたような不自然な画像が生成されてしまう。   When such indentation occurs, a predetermined stencil value is also written in the area indicated by A4 in FIG. 12C by the process in FIG. Therefore, the shadow polygon SPL is not drawn in the area A4, and an unnatural image in which only the area A4 has a shadow is generated.

そこで図12(C)では、A4に対応する領域については、ステンシルバッファ178において所定ステンシル値をクリアする処理を行う。具体的には、影ポリゴンSPLの各ピクセルのZ値の方がZバッファ177のZ値よりも仮想カメラから見て手前側のZ値である場合に描画されるという、通常のZ比較の設定にする。そして、このような通常のZ比較の設定で影ポリゴンSPLに対応するポリゴン(プリミティブ面)をステンシルバッファ178に描画することで、図12(C)のA4に対応する領域については、ステンシルバッファ178の所定ステンシル値をクリアしてゼロに設定する。   Therefore, in FIG. 12C, processing for clearing a predetermined stencil value is performed in the stencil buffer 178 for the area corresponding to A4. Specifically, a normal Z comparison setting is drawn in which the Z value of each pixel of the shadow polygon SPL is drawn when the Z value is closer to the virtual camera than the Z value of the Z buffer 177. To. Then, by drawing the polygon (primitive surface) corresponding to the shadow polygon SPL in the stencil buffer 178 with such a normal Z comparison setting, the stencil buffer 178 for the area corresponding to A4 in FIG. Clear the predetermined stencil value of and set it to zero.

このようにすればA4の領域にも影ポリゴンSPLが描画されるようになるため、A4の領域だけ影が抜けたような不自然な画像が生成されてしまう事態を防止できる。   In this way, since the shadow polygon SPL is drawn also in the area A4, it is possible to prevent a situation in which an unnatural image in which only the shadow of the area A4 is lost is generated.

次に図13〜図18の画像を用いて本実施形態の具体的な描画処理について説明する。   Next, a specific drawing process according to the present embodiment will be described with reference to images in FIGS.

図13では、まずモデルオブジェクトMOB1、MOB2が描画されている。そして、このようにモデルオブジェクトMOB1、MOB2を描画する際に、図14に示すように、MOB1、MOB2の描画領域に対応するステンシルバッファ178の領域に対して、図12(B)で説明したように所定ステンシル値(0以外のステンシル値)を書き込む。例えば図14において白い領域には所定ステンシル値が書き込まれており、黒い領域ではステンシル値がゼロにクリアされている。   In FIG. 13, first, model objects MOB1 and MOB2 are drawn. When the model objects MOB1 and MOB2 are drawn in this way, as shown in FIG. 14, the area of the stencil buffer 178 corresponding to the drawing area of MOB1 and MOB2 is described with reference to FIG. A predetermined stencil value (a stencil value other than 0) is written in. For example, in FIG. 14, a predetermined stencil value is written in a white area, and the stencil value is cleared to zero in a black area.

次に図15に示すように背景オブジェクトを描画する。このようにモデルオブジェクトMOB1、MOB2を描画した後に背景オブジェクトを描画することで、無駄な領域に背景を描画しなくても済むようになり、描画処理の負荷を大幅に低減できる。そして、このような背景オブジェクトの描画処理の際に図3、図4で説明したシャドウマップ処理が行われることで、モデルオブジェクトMOB1の全体の影画像SD1が生成されるようになる。   Next, a background object is drawn as shown in FIG. Thus, by drawing the background object after drawing the model objects MOB1 and MOB2, it is not necessary to draw the background in a useless area, and the load of the drawing process can be greatly reduced. When the background object drawing process is performed, the shadow map process described with reference to FIGS. 3 and 4 is performed, so that the entire shadow image SD1 of the model object MOB1 is generated.

このように背景オブジェクトを描画した後に、図5(A)〜図6、図12(A)〜図12(C)で説明した足影ポリゴンSPLの描画処理を行う。例えば図16では、モデルオブジェクトMOB1の足部分LOB1に対応する足影生成用ポリゴンGPLが生成されている。そしてこの足影生成用ポリゴンGPLを、影の投影方向でゲームフィールドに投影することで、影ポリゴンSPLが生成され、この影ポリゴンSPLを描画することで足影画像が生成される。   After drawing the background object in this way, the drawing process of the foot shadow polygon SPL described with reference to FIGS. 5A to 6 and FIGS. 12A to 12C is performed. For example, in FIG. 16, a foot shadow generation polygon GPL corresponding to the foot portion LOB1 of the model object MOB1 is generated. A shadow polygon SPL is generated by projecting the foot shadow generating polygon GPL onto the game field in the shadow projection direction, and a foot shadow image is generated by drawing the shadow polygon SPL.

具体的には、図12(C)で説明したように、通常のZ比較の設定で、影ポリゴンSPLに対応するポリゴンをステンシルバッファ178に書き込むことで、図12(C)のA4に示す領域の所定ステンシル値をゼロにクリアする。   Specifically, as described with reference to FIG. 12C, by writing the polygon corresponding to the shadow polygon SPL to the stencil buffer 178 with the normal Z comparison setting, the area indicated by A4 in FIG. The predetermined stencil value is cleared to zero.

図17にはこのような描画処理が行われた後のステンシルバッファ178の状態が示されている。図14と図17を比較すれば明らかなように、図17ではC1に示す領域のステンシル値がゼロにクリアされている。従って、このC1に示す領域にも足影画像が生成されるようになる。   FIG. 17 shows the state of the stencil buffer 178 after such drawing processing has been performed. As is apparent from a comparison between FIG. 14 and FIG. 17, in FIG. 17, the stencil value in the region indicated by C1 is cleared to zero. Therefore, a foot shadow image is also generated in the area indicated by C1.

即ち図15ではモデルオブジェクトMOB1の足部分LOB1のつま先がゲームフィールドにめり込んでいる。この場合に図17のC1に示す領域に足影画像が生成されないと、C1に示す領域だけ影が抜けたような不自然な画像が生成されてしまう
この点、図17に示すように、C1に示す領域でのステンシル値をゼロにクリアすれば、この領域にも影画像が生成されるようになり、この領域だけ影が抜けたような不自然な画像が生成されてしまう事態を防止できる。
That is, in FIG. 15, the toe of the foot portion LOB1 of the model object MOB1 is recessed into the game field. In this case, if a foot shadow image is not generated in the area indicated by C1 in FIG. 17, an unnatural image in which only the area indicated by C1 is shadowed is generated. In this regard, as shown in FIG. If the stencil value in the area shown in (2) is cleared to zero, a shadow image is also generated in this area, and it is possible to prevent a situation where an unnatural image in which only the shadow is lost is generated. .

例えば図18に、モデルオブジェクトMOB1の足部分LOB1がゲームフィールドFLDの端部付近にある場合に生成される画像の例を示す。図18の上側の画像は実際に表示される画像である。一方、図18の下側の画像では、説明を容易化するために、足影生成用ポリゴンGPLや足影ポリゴンSPLについても示している。   For example, FIG. 18 shows an example of an image generated when the foot part LOB1 of the model object MOB1 is near the end of the game field FLD. The upper image in FIG. 18 is an actually displayed image. On the other hand, in the lower image in FIG. 18, the foot shadow generation polygon GPL and the foot shadow polygon SPL are also shown for ease of explanation.

図18の上側の画像に示すように、本実施形態の手法を採用することで、モデルオブジェクトMOB1の全体の影画像SD1のみならず、MOB1の足部分LOB1の足影画像LSD1についても適正に生成されている。即ち足部分LOB1がゲームフィールドFLDの端部付近に置かれている場合にも適正な足影画像LSD1を生成することに成功している。   As shown in the upper image of FIG. 18, by adopting the method of the present embodiment, not only the entire shadow image SD1 of the model object MOB1, but also the foot shadow image LSD1 of the foot portion LOB1 of the MOB1 is appropriately generated. Has been. In other words, even when the foot portion LOB1 is placed near the end of the game field FLD, the proper foot shadow image LSD1 has been successfully generated.

例えば図18では、足影用の点光源が、ゲームフィールドFLDの高さと同じぐらいの低い位置に配置されている。従って、図18の下側の画像のD1に示すように、足影ポリゴンSPLがゲームフィールドFLDの外側に向かって長く延びている。このような場合に、図12(A)で説明した手法を採用しないと、D1に示す部分にも足影が表示されてしまい、不自然な画像が生成されてしまう事態が生じるが、本実施形態の手法を採用することで、このような事態を防止できる。また図12(B)、図12(C)に示す手法を採用することで、足部分LOB上に影が落ちたり、足部分LOBがゲームフィールドFLDにめり込んだ場合に不自然な画像が生成されてしまう事態も防止できるようになる。   For example, in FIG. 18, the point light source for the foot shadow is disposed at a position as low as the height of the game field FLD. Accordingly, as indicated by D1 in the lower image of FIG. 18, the foot shadow polygon SPL extends long toward the outside of the game field FLD. In such a case, if the method described with reference to FIG. 12A is not adopted, a foot shadow is also displayed on the portion indicated by D1, and an unnatural image may be generated. By adopting the form technique, such a situation can be prevented. In addition, by employing the method shown in FIGS. 12B and 12C, an unnatural image is generated when a shadow falls on the foot portion LOB or the foot portion LOB sinks into the game field FLD. It will be possible to prevent the situation.

2.5 詳細な処理例
次に本実施形態の詳細な処理例を図19〜図21のフローチャートを用いて説明する。図19は全体的な描画処理の流れについて説明するためのフローチャートである。
2.5 Detailed Processing Example Next, a detailed processing example of this embodiment will be described with reference to the flowcharts of FIGS. FIG. 19 is a flowchart for explaining the overall drawing process flow.

まず、図3で説明したように、影の投影方向(影生成用の光源の照明方向)での各オブジェクトのZ値をレンダリングすることで、図4に示すようなシャドウマップテクスチャを生成する(ステップS1)。なお、分散シャドウマップ処理の場合には、Z値についてのレンダリングとZ値の二乗についてのレンダリングを行って、シャドウマップテクスチャを生成すればよい。   First, as described in FIG. 3, by rendering the Z value of each object in the shadow projection direction (illumination direction of the light source for shadow generation), a shadow map texture as shown in FIG. 4 is generated ( Step S1). In the case of the distributed shadow map process, a shadow map texture may be generated by performing rendering for the Z value and rendering for the square of the Z value.

次に、描画バッファ、Zバッファ、ステンシルバッファ等をクリアする(ステップS2)。そしてモデルオブジェクトのテクスチャ(元絵テクスチャ)と、ステップS1で生成されたシャドウマップテクスチャを用いて、例えばピクセルシェーダによりモデルオブジェクトの描画処理を行う(ステップS3)。この際に、図12(B)や図14で説明したように、モデルオブジェクトの描画領域に対応するステンシルバッファ178の領域に対して、所定ステンシル値を書き込む。   Next, the drawing buffer, Z buffer, stencil buffer, etc. are cleared (step S2). Then, using the texture of the model object (original picture texture) and the shadow map texture generated in step S1, the model object is rendered by, for example, a pixel shader (step S3). At this time, as described with reference to FIGS. 12B and 14, a predetermined stencil value is written into the area of the stencil buffer 178 corresponding to the drawing area of the model object.

次に、背景オブジェクトのテクスチャ(元絵テクスチャ)と、シャドウマップテクスチャを用いて、例えばピクセルシェーダにより背景オブジェクトの描画処理を行う(ステップS4)。このように、先にモデルオブジェクトの描画処理(ステップS3)を行った後に、背景オブジェクトの描画処理(ステップS4)を行うようにすれば、モデルオブジェクトの描画領域については、背景オブジェクトを描画しなくても済むようになる。従って、無駄な描画処理が行われるのを防止できるため、1フレーム内での描画処理が間に合わなくなってしまう事態を防止できる。特に画面全体においてモデルオブジェクトの占める面積が大きい場合には、ステップS3、S4に示すような順序で描画処理を行うことは効果的である。   Next, using the background object texture (original picture texture) and the shadow map texture, a background object drawing process is performed by, for example, a pixel shader (step S4). As described above, if the drawing process of the model object is first performed (step S3) and then the drawing process of the background object (step S4) is performed, the background object is not drawn in the drawing area of the model object. You can do it. Therefore, since it is possible to prevent unnecessary drawing processing, it is possible to prevent a situation in which drawing processing within one frame is not in time. In particular, when the area occupied by the model object is large in the entire screen, it is effective to perform the drawing processing in the order shown in steps S3 and S4.

次に、図5(A)〜図6や図12(A)〜図12(C)等で説明した手法により、足影ポリゴンの描画処理を行い、モデルオブジェクトの影画像に足影画像が合成された画像を生成する(ステップS5)。   Next, the foot shadow polygon is drawn by the method described in FIGS. 5A to 6 and FIGS. 12A to 12C, and the foot shadow image is synthesized with the shadow image of the model object. Generated images are generated (step S5).

図20、図21は、足影ポリゴンの描画処理の詳細を説明するためのフローチャートである。   20 and 21 are flowcharts for explaining the details of the foot shadow polygon drawing process.

まず、ゲームフィールド(地面)よりも低い位置から見上げている仮想カメラの視点設定になっているか否かを判断し(ステップS11)、このような視点設定の場合には、足影ポリゴンSPLの描画は行わずに処理を終了する。このような視点設定で足影ポリゴンSPLを描画すると、不自然な足影画像が生成されるおそれがあるからである。   First, it is determined whether or not the viewpoint setting of the virtual camera looking up from a position lower than the game field (ground) is set (step S11). In such a viewpoint setting, the foot shadow polygon SPL is drawn. The process is terminated without performing. This is because if the foot shadow polygon SPL is drawn with such a viewpoint setting, an unnatural foot shadow image may be generated.

次に、図7で説明した点光源の明るさが所定のしきい値以上か否かを判断する(ステップS12)。そして所定のしきい値以上である場合には、点光源の照明方向を足影の投影方向に設定する(ステップS13)。このようにすることで、モデルオブジェクトの影画像の生成に使用する投影方向とは異なる投影方向を用いて、足影画像を生成できるようになる。なお、このような照明方向の設定の際に、必要であれば、投影方向を若干調整する処理を行う。即ち、図7のような位置に点光源を発生させた場合に、この点光源の位置では、足影が足の真下に表示されてしまう場合が多いため、点光源の発生をプレーヤに強調して伝えるために、投影方向を、例えば少しだけ水平方向側に向かうように調整する。   Next, it is determined whether the brightness of the point light source described with reference to FIG. 7 is equal to or higher than a predetermined threshold (step S12). If it is equal to or greater than the predetermined threshold value, the illumination direction of the point light source is set to the foot shadow projection direction (step S13). In this way, a foot shadow image can be generated using a projection direction different from the projection direction used for generating a shadow image of the model object. When setting the illumination direction, a process for slightly adjusting the projection direction is performed if necessary. That is, when a point light source is generated at a position as shown in FIG. 7, the foot shadow is often displayed directly below the foot at the position of this point light source. Therefore, the projection direction is adjusted, for example, slightly toward the horizontal direction.

一方、点光源の明るさが所定のしきい値よりも小さい場合には、シャドウマップ処理に使用する主光源(図3のLS)の照明方向を足影の投影方向に設定する(ステップS14)。この場合には、モデルオブジェクトの影画像の生成に使用する投影方向と、足影画像生成用の投影方向は同じになる。   On the other hand, when the brightness of the point light source is smaller than a predetermined threshold value, the illumination direction of the main light source (LS in FIG. 3) used for the shadow map process is set as the foot shadow projection direction (step S14). . In this case, the projection direction used for generating the shadow image of the model object is the same as the projection direction for generating the foot shadow image.

次に図5(A)〜図5(C)で説明したように、モデルオブジェクト(キャラクタ)の種別に応じたサイズテーブルと頂点データテーブルを選択する(ステップS15)。そして、足首のボーンBN1の位置BP1とつま先のボーンBN2の位置BP2の位置との距離LBを求め、サイズテーブルに設定されている距離に基づき補間処理を行い、足影のサイズを求める(ステップS16)。   Next, as described with reference to FIGS. 5A to 5C, a size table and a vertex data table corresponding to the type of model object (character) are selected (step S15). Then, a distance LB between the position BP1 of the ankle bone BN1 and the position BP2 of the toe bone BN2 is obtained, and interpolation processing is performed based on the distance set in the size table to obtain the size of the foot shadow (step S16). ).

次に、ステップS13又はS14で採用された光源の明るさに基づいて、足影の最大濃さを求める(ステップS17)。具体的には光源が明るいほど足影の最大濃さを濃くする。例えばステップS13のように点光源が選択された場合には、点光源との距離が近づいて明るくなると、足影の最大濃さは濃くなる。これにより、プレーヤの仮想現実感を向上できる。   Next, the maximum darkness of the foot shadow is obtained based on the brightness of the light source employed in step S13 or S14 (step S17). Specifically, the maximum darkness of the foot shadow is increased as the light source is brighter. For example, when the point light source is selected as in step S13, the maximum darkness of the foot shadow becomes deeper as the distance from the point light source becomes closer and brighter. Thereby, the virtual reality of a player can be improved.

次に、足首のボーンBN1のY軸成分(絶対座標系での高さ方向の軸の成分)が小さくなるほど薄くなるように、ステップS17で求められた足影の最大濃さを調整する(ステップS18)。このようにすれば、足部分(接地部)の接地面と、モデルオブジェクトが移動するゲームフィールドとのなす角度に応じて、足影画像の濃さを制御することが可能になる。これにより、例えばモデルオブジェクトがダウンして倒れた場合等に、不自然な足影画像が生成されてしまう事態を防止できる。   Next, the maximum darkness of the foot shadow obtained in step S17 is adjusted so that the Y-axis component of the ankle bone BN1 (the component of the axis in the height direction in the absolute coordinate system) becomes smaller (step S17). S18). In this way, it is possible to control the darkness of the foot shadow image according to the angle formed by the ground plane of the foot portion (ground portion) and the game field where the model object moves. As a result, for example, when the model object is down and falls, an unnatural foot shadow image can be prevented from being generated.

次に、ステップS16で求められた足影のサイズと、図15(C)で説明した頂点データテーブルに基づいて、足影生成用ポリゴンGPLを生成する(ステップS19)。そして、図6で説明したように、足影生成用ポリゴンGPLの各頂点を、ステップS13又はS14で設定された足影の投影方向に投影することで、足影ポリゴンSPLを生成する(ステップS20)。この際に足影生成用ポリゴンGPLの各頂点のゲームフィールドに対する高さ距離に基づいて、足影の最大濃さを減衰させて、足影ポリゴンSPLの各頂点の影の濃さを設定する。   Next, a foot shadow generation polygon GPL is generated based on the size of the foot shadow obtained in step S16 and the vertex data table described in FIG. 15C (step S19). Then, as described with reference to FIG. 6, the foot shadow polygon SPL is generated by projecting each vertex of the foot shadow generation polygon GPL in the projection direction of the foot shadow set in step S13 or S14 (step S20). ). At this time, based on the height distance with respect to the game field of each vertex of the foot shadow generation polygon GPL, the maximum darkness of the foot shadow is attenuated to set the shadow density of each vertex of the foot shadow polygon SPL.

次に足影ポリゴンSPLの全頂点の影の濃さの和が、所定のしきい値以下か否かを判断し(ステップS21)、所定のしきい値以下である場合には、足影ポリゴンSPLの描画は行わずに処理を終了する。このようにすることで、図10に示すように、足が上がるにつれて足影が消えて行く画像表現を実現できる。   Next, it is determined whether the sum of the darkness of the shadows of all the vertices of the foot shadow polygon SPL is equal to or smaller than a predetermined threshold value (step S21). The processing ends without drawing SPL. By doing so, as shown in FIG. 10, it is possible to realize an image expression in which the foot shadow disappears as the foot rises.

次に、足影ポリゴンSPLの全頂点を画面座標系に変換し、これらの全頂点が画面外にあるか否かを判断する(ステップS22)。そして画面外である場合には、足影ポリゴンSPLの描画は行わずに処理を終了する。   Next, all the vertices of the foot shadow polygon SPL are converted into the screen coordinate system, and it is determined whether or not these vertices are outside the screen (step S22). If it is outside the screen, the process ends without drawing the foot shadow polygon SPL.

次に、足影ポリゴンSPLを、仮想カメラから見て手前側にZシフトする(ステップS23)。そして、図12(C)で説明したように、足影ポリゴンSPLのZ値の方がZバッファ177のZ値よりも手前側のZ値である場合に描画するという通常のZ比較の設定で、描画処理を行い、ステンシルバッファ178の対応する領域の所定ステンシル値をゼロにクリアする(ステップS24)。即ち図12(C)のA4に示す領域のステンシル値をクリアする。   Next, the foot shadow polygon SPL is Z-shifted to the near side when viewed from the virtual camera (step S23). Then, as described with reference to FIG. 12C, the normal Z comparison setting is such that drawing is performed when the Z value of the foot shadow polygon SPL is closer to the Z value of the Z buffer 177. Then, the drawing process is performed, and the predetermined stencil value of the corresponding area of the stencil buffer 178 is cleared to zero (step S24). That is, the stencil value in the area indicated by A4 in FIG.

次に、図12(A)で説明したように、足影ポリゴンSPLを、仮想カメラから見て奥側にZシフトする(ステップS25)。そして、足影ポリゴンSPLのZ値の方がZバッファ177のZ値よりも奥側のZ値である場合に描画するという、通常とは異なるZ比較の設定で、ステンシルバッファ178に所定ステンシル値が書き込まれておらずゼロにクリアされている領域(ピクセル)に対して、足影ポリゴンSPLの描画処理を行う(ステップS26)。これにより、図18に示すように、足影ポリゴンSPLに対応した適正な足影画像LSD1が生成されるようになる。そして、Z比較の設定を元の通常設定に戻すと共に、ステンシル機能をディスエーブルにする(ステップS27)。   Next, as described with reference to FIG. 12A, the foot shadow polygon SPL is Z-shifted rearward as viewed from the virtual camera (step S25). A predetermined stencil value is stored in the stencil buffer 178 with a Z comparison setting different from normal, in which drawing is performed when the Z value of the foot shadow polygon SPL is a Z value on the back side of the Z value of the Z buffer 177. A drawing process of the foot shadow polygon SPL is performed on an area (pixel) that has not been written and is cleared to zero (step S26). Thereby, as shown in FIG. 18, an appropriate foot shadow image LSD1 corresponding to the foot shadow polygon SPL is generated. Then, the Z comparison setting is returned to the original normal setting, and the stencil function is disabled (step S27).

3.ハードウェア構成
図22(A)に本実施形態を実現できるハードウェアの構成例を示す。
3. Hardware Configuration FIG. 22A shows a hardware configuration example that can realize this embodiment.

CPU900(メインプロセッサ)は、複数のCPUコア1、CPUコア2、CPUコア3を含むマルチコアプロセッサである。またCPU900は図示しないキャッシュメモリを含む。CPUコア1、2、3の各々にはベクタ演算器等が設けられている。そしてCPUコア1、2、3の各々は、例えば2つのH/Wスレッド処理をコンテクストスイッチをすることなしに並列実行でき、マルチスレッド機能がハードウェアでサポートされている。そして3つのCPUコア1、2、3の合計で、6つのH/Wスレッド処理を並列実行できる。   The CPU 900 (main processor) is a multi-core processor including a plurality of CPU cores 1, CPU cores 2, and CPU cores 3. The CPU 900 includes a cache memory (not shown). Each of the CPU cores 1, 2, and 3 is provided with a vector calculator and the like. Each of the CPU cores 1, 2, and 3 can execute, for example, two H / W thread processes in parallel without performing a context switch, and a multi-thread function is supported by hardware. A total of three CPU cores 1, 2, and 3 can execute six H / W thread processes in parallel.

GPU910(描画プロセッサ)は、頂点処理やピクセル処理を行って、描画(レンダリング)処理を実現する。具体的には、シェーダプログラムに従って、頂点データの作成・変更やピクセル(フラグメント)の描画色の決定を行う。1フレーム分の画像がVRAM920(フレームバッファ)に書き込まれると、その画像はビデオ出力を介してTVなどのディスプレイに表示される。なおメインメモリ930はCPU900やGPU910のワークメモリとして機能する。またGPU910では、複数の頂点スレッド、複数のピクセルスレッドが並列実行され、描画処理のマルチスレッド機能がハードウェアでサポートされている。またGPU910にはハードウェアのテッセレータも備えられている。またGPU910は、頂点シェーダとピクセルシェーダとがハードウェア的に区別されていないユニファイド・シェーダ・タイプとなっている。   The GPU 910 (drawing processor) performs vertex processing and pixel processing to realize drawing (rendering) processing. Specifically, according to the shader program, the vertex data is created / changed and the drawing color of the pixel (fragment) is determined. When an image for one frame is written in the VRAM 920 (frame buffer), the image is displayed on a display such as a TV via a video output. The main memory 930 functions as a work memory for the CPU 900 and the GPU 910. Further, in the GPU 910, a plurality of vertex threads and a plurality of pixel threads are executed in parallel, and a multi-thread function of drawing processing is supported by hardware. The GPU 910 is also provided with a hardware tessellator. The GPU 910 is a unified shader type in which the vertex shader and the pixel shader are not distinguished in terms of hardware.

ブリッジ回路940(サウスブリッジ)は、システム内部の情報流通を制御する回路であり、USBコントローラ(シリアルインターフェース)、ネットワークの通信コントローラ、IDEコントローラ、或いはDMAコントローラなどのコントローラを内蔵する。そしてこのブリッジ回路940により、ゲームコントローラ942、メモリーカード944、HDD946、DVDドライブ948との間のインターフェース機能が実現される。   The bridge circuit 940 (south bridge) is a circuit that controls the flow of information inside the system, and incorporates a controller such as a USB controller (serial interface), a network communication controller, an IDE controller, or a DMA controller. The bridge circuit 940 implements an interface function among the game controller 942, the memory card 944, the HDD 946, and the DVD drive 948.

なお本実施形態を実現できるハードウェア構成は図22(A)に限定されず、例えば図22(B)のような構成であってもよい。   Note that the hardware configuration capable of realizing this embodiment is not limited to FIG. 22A, and may be, for example, a configuration as shown in FIG.

図22(B)ではCPU902が、プロセッサエレメントPPと8つのプロセッサエレメントPE1〜PE8を含む。プロセッサエレメントPPは汎用的なプロセッサコアであり、プロセッサエレメントPE1〜PE8は比較的シンプルな構成のプロセッサコアである。そしてプロセッサエレメントPPとプロセッサエレメントPE1〜PE8のアーキテクチャは異なっており、プロセッサエレメントPE1〜PE8は、複数のデータに対して1命令で同じ処理を同時にできるSIMD型のプロセッサコアとなっている。これによりストリーミング処理などのマルチメディア処理を効率的に実行できる。プロセッサエレメントPPは、2つのH/Wスレッド処理を並列実行でき、プロセッサエレメントPE1〜PE8の各々は、1つのH/Wスレッド処理を実行できる。従って、CPU902では、合計で10個のH/Wスレッド処理の並列実行が可能になる。   In FIG. 22B, the CPU 902 includes a processor element PP and eight processor elements PE1 to PE8. The processor element PP is a general-purpose processor core, and the processor elements PE1 to PE8 are processor cores having a relatively simple configuration. The architectures of the processor element PP and the processor elements PE1 to PE8 are different, and the processor elements PE1 to PE8 are SIMD type processor cores that can simultaneously perform the same processing on a plurality of data with one instruction. Thereby, multimedia processing such as streaming processing can be executed efficiently. The processor element PP can execute two H / W thread processes in parallel, and each of the processor elements PE1 to PE8 can execute one H / W thread process. Therefore, the CPU 902 can execute a total of 10 H / W thread processes in parallel.

図22(B)では、GPU912とCPU902の連携が密になっており、GPU912は、CPU902側のメインメモリ930に直接にレンダリング処理を行うことができる。また例えばCPU902がジオメトリ処理を行って、頂点データを転送したり、GPU912からCPU902にデータを戻すことも容易にできる。またCPU902が、レンダリングのプリプロセッシング処理やポストプロセッシング処理を行うことも容易であり、テッセレーション(平面分割)やドットフィルをCPU902が実行できる。例えば抽象度の高い処理はCPU902が行い、抽象度が低い細かな処理はGPU912が行うというような役割分担が可能である。   In FIG. 22B, the GPU 912 and the CPU 902 are closely linked, and the GPU 912 can directly perform the rendering process on the main memory 930 on the CPU 902 side. Further, for example, the CPU 902 can perform geometry processing to transfer vertex data, or easily return data from the GPU 912 to the CPU 902. It is also easy for the CPU 902 to perform rendering pre-processing and post-processing, and the CPU 902 can execute tessellation (plane division) and dot fill. For example, the CPU 902 can perform a process with a high level of abstraction, and the GPU 912 can perform a detailed process with a low level of abstraction.

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

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語(接地部、影プリミティブ面、足影生成用プリミティブ面、足影画像、フィールド、モデルオブジェクト等)と共に記載された用語(足部分、足影ポリゴン、足影生成用ポリゴン、接地部の影画像、ゲームフィールド、キャラクタ等)は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。   Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, in the specification or the drawings, terms (foot) that are described at least once together with different terms having broader or the same meaning (grounding portion, shadow primitive surface, foot shadow generation primitive surface, foot shadow image, field, model object, etc.) (Parts, foot shadow polygons, foot shadow generating polygons, ground shadow images, game fields, characters, etc.) can be replaced with their different terms anywhere in the specification or drawings.

また、モデルオブジェクトの影画像の生成処理、接地部の影画像の生成処理、モデルオブジェクトの描画処理、シャドウマップ処理、分散シャドウマップ処理などのシャドウイング処理等も、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。また本発明は種々のゲームに適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々の画像生成システムに適用できる。   In addition, shadow image processing such as model object shadow image generation processing, ground image shadow image generation processing, model object drawing processing, shadow map processing, and distributed shadow map processing are also described in this embodiment. Without being limited thereto, techniques equivalent to these are also included in the scope of the present invention. The present invention can be applied to various games. 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 example of the block diagram of the image generation system of this embodiment. 本実施形態より生成されたゲーム画像の例。The example of the game image produced | generated from this embodiment. シャドウマップ処理の説明図。Explanatory drawing of a shadow map process. シャドウマップテクスチャの例。An example of a shadow map texture. 図5(A)〜図5(C)は足影画像の生成手法の説明図。FIG. 5A to FIG. 5C are explanatory diagrams of a method for generating a foot shadow image. 足影画像の生成手法の説明図。Explanatory drawing of the production method of a foot shadow image. 点光源による足影画像の生成手法の説明図。Explanatory drawing of the production method of the foot shadow image by a point light source. 本実施形態より生成されたゲーム画像の例。The example of the game image produced | generated from this embodiment. 本実施形態より生成されたゲーム画像の例。The example of the game image produced | generated from this embodiment. 本実施形態より生成されたゲーム画像の例。The example of the game image produced | generated from this embodiment. 本実施形態より生成されたゲーム画像の例。The example of the game image produced | generated from this embodiment. 図12(A)〜図12(C)は足影画像の生成手法の説明図。12 (A) to 12 (C) are explanatory diagrams of a method for generating a foot shadow image. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の具体的な描画処理を説明するための図。The figure for demonstrating the concrete drawing process of this embodiment. 本実施形態の詳細な処理を説明するフローチャート。The flowchart explaining the detailed process of this embodiment. 本実施形態の詳細な処理を説明するフローチャート。The flowchart explaining the detailed process of this embodiment. 本実施形態の詳細な処理を説明するフローチャート。The flowchart explaining the detailed process of this embodiment. 図22(A)、図22(B)はハードウェア構成例。22A and 22B show examples of hardware configurations.

符号の説明Explanation of symbols

100 処理部、102 ゲーム演算部、104 オブジェクト空間設定部、
106 移動体演算部、108 仮想カメラ制御部、120 描画処理部、
121 第1の描画処理部、122 第2の描画処理部、130 音生成部、
160 操作部、170 記憶部、172 オブジェクトデータ記憶部、
173 モーションデータ記憶部、174 テクスチャ記憶部、176 描画バッファ、
177 Zバッファ、178 ステンシルバッファ、180 情報記憶媒体、
190 表示部、192 音出力部、194 補助記憶装置、196 通信部
100 processing unit, 102 game calculation unit, 104 object space setting unit,
106 moving object calculation unit, 108 virtual camera control unit, 120 drawing processing unit,
121 a first drawing processing unit, 122 a second drawing processing unit, 130 a sound generation unit,
160 operation unit, 170 storage unit, 172 object data storage unit,
173 motion data storage unit, 174 texture storage unit, 176 drawing buffer,
177 Z buffer, 178 stencil buffer, 180 information storage medium,
190 Display unit, 192 Sound output unit, 194 Auxiliary storage device, 196 Communication unit

Claims (12)

オブジェクト空間において仮想カメラから見える画像を生成するためのプログラムであって、
シャドウイング処理を行いながらモデルオブジェクトを含む複数のオブジェクトの描画処理を行って、前記モデルオブジェクトの画像と前記モデルオブジェクトの影画像が表示される画像を生成する第1の描画処理部と、
前記モデルオブジェクトの接地部に対応する影プリミティブ面の描画処理を行って、前記モデルオブジェクトの前記影画像に対して前記接地部の影画像が合成された画像を生成する第2の描画処理部として、
コンピュータを機能させることを特徴とするプログラム。
A program for generating an image visible from a virtual camera in an object space,
A first drawing processing unit that performs drawing processing of a plurality of objects including a model object while performing shadowing processing, and generates an image in which an image of the model object and a shadow image of the model object are displayed;
As a second drawing processing unit that performs a drawing process of a shadow primitive surface corresponding to the grounding unit of the model object, and generates an image in which the shadow image of the grounding unit is combined with the shadow image of the model object ,
A program characterized by causing a computer to function.
請求項1において、
前記第1の描画処理部は、
シャドウマップ処理により、前記モデルオブジェクトの前記影画像を生成することを特徴とするプログラム。
In claim 1,
The first drawing processing unit includes:
A program for generating the shadow image of the model object by shadow map processing.
請求項1又は2において、
前記第2の描画処理部は、
前記接地部に対して設定された影生成用プリミティブ面を、前記モデルオブジェクトが移動するフィールドに対して投影することで生成された前記影プリミティブ面の描画処理を行うことで、前記接地部の影画像を生成することを特徴とするプログラム。
In claim 1 or 2,
The second drawing processing unit
The shadow primitive surface generated by projecting the shadow generating primitive surface set for the grounding portion onto the field in which the model object moves is drawn, so that the shadow of the grounding portion is processed. A program characterized by generating an image.
請求項1乃至3のいずれかにおいて、
前記第2の描画処理部は、
前記第1の描画処理部が前記モデルオブジェクトの影画像の生成に使用する投影方向とは異なる投影方向を用いて、前記接地部の影画像を生成することを特徴とするプログラム。
In any one of Claims 1 thru | or 3,
The second drawing processing unit
A program characterized in that the first drawing processing unit generates a shadow image of the grounding unit using a projection direction different from a projection direction used for generating a shadow image of the model object.
請求項4において、
前記第2の描画処理部は、
点光源が存在する場合に、前記点光源の投影方向を用いて、前記接地部の影画像を生成することを特徴とするプログラム。
In claim 4,
The second drawing processing unit
A program that generates a shadow image of the grounding unit using a projection direction of the point light source when a point light source exists.
請求項1乃至5のいずれかにおいて、
前記第2の描画処理部は、
前記影プリミティブ面を、前記仮想カメラから見て奥側方向にZシフトすると共に、前記影プリミティブ面の各ピクセルのZ値の方がZバッファのZ値よりも奥側のZ値である場合に描画されるというZ比較の設定で、前記影プリミティブ面の描画処理を行うことを特徴とするプログラム。
In any one of Claims 1 thru | or 5,
The second drawing processing unit
When the shadow primitive plane is Z-shifted in the rearward direction when viewed from the virtual camera, and the Z value of each pixel of the shadow primitive plane is the rear Z value of the Z buffer. A program that performs drawing processing of the shadow primitive surface with a Z comparison setting of drawing.
請求項6において、
前記第1の描画処理部は、
前記モデルオブジェクトの描画処理を行う際に、前記モデルオブジェクトの描画領域に対応するステンシルバッファの領域に対して所定ステンシル値を書き込み、
前記第2の描画処理部は、
前記ステンシルバッファに前記所定ステンシル値が書き込まれておらずステンシル値がクリアされている領域に対して、前記影プリミティブ面を描画することを特徴とするプログラム。
In claim 6,
The first drawing processing unit includes:
When performing the drawing process of the model object, a predetermined stencil value is written to the area of the stencil buffer corresponding to the drawing area of the model object,
The second drawing processing unit
A program for drawing the shadow primitive surface in an area where the predetermined stencil value is not written in the stencil buffer and the stencil value is cleared.
請求項7において、
前記第2の描画処理部は、
前記影プリミティブ面の各ピクセルのZ値の方がZバッファのZ値よりも手前側のZ値である場合に描画されるというZ比較の設定で、前記影プリミティブ面に対応するプリミティブ面の描画処理を行って、前記ステンシルバッファの前記所定ステンシル値をクリアすることを特徴とするプログラム。
In claim 7,
The second drawing processing unit
Drawing a primitive surface corresponding to the shadow primitive surface by setting Z comparison in which the Z value of each pixel of the shadow primitive surface is drawn when the Z value is closer to the Z value in the Z buffer. A program that performs processing to clear the predetermined stencil value of the stencil buffer.
請求項1乃至8のいずれかにおいて、
前記第2の描画処理部は、
前記接地部の接地面と、前記モデルオブジェクトが移動するフィールドとのなす角度に応じて、前記接地部の影画像の濃さを制御することを特徴とするプログラム。
In any one of Claims 1 thru | or 8.
The second drawing processing unit
A program for controlling a darkness of a shadow image of the grounding portion according to an angle formed by a grounding surface of the grounding portion and a field where the model object moves.
請求項1乃至9のいずれかにおいて、
前記第1の描画処理部は、
前記モデルオブジェクトの描画処理を行った後に、背景オブジェクトの描画処理を行うことを特徴とするプログラム。
In any one of Claims 1 thru | or 9,
The first drawing processing unit includes:
A program for performing a drawing process for a background object after performing a drawing process for the model object.
コンピュータ読み取り可能な情報記憶媒体であって、請求項1乃至10のいずれかに記載のプログラムを記憶したことを特徴とする情報記憶媒体。   A computer-readable information storage medium, wherein the program according to any one of claims 1 to 10 is stored. オブジェクト空間において仮想カメラから見える画像を生成するための画像生成システムであって、
シャドウイング処理を行いながらモデルオブジェクトを含む複数のオブジェクトの描画処理を行って、前記モデルオブジェクトの画像と前記モデルオブジェクトの影画像が表示される画像を生成する第1の描画処理部と、
前記モデルオブジェクトの接地部に対応する影プリミティブ面の描画処理を行って、前記モデルオブジェクトの前記影画像に対して前記接地部の影画像が合成された画像を生成する第2の描画処理部と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image visible from a virtual camera in an object space,
A first drawing processing unit that performs drawing processing of a plurality of objects including a model object while performing shadowing processing, and generates an image in which an image of the model object and a shadow image of the model object are displayed;
A second rendering processing unit that performs a rendering process of a shadow primitive surface corresponding to the grounding unit of the model object, and generates an image in which the shadow image of the grounding unit is combined with the shadow image of the model object; ,
An image generation system comprising:
JP2008205224A 2008-07-28 2008-08-08 Program, information storage medium, and image generation system Pending JP2010055131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008205224A JP2010055131A (en) 2008-07-28 2008-08-08 Program, information storage medium, and image generation system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008194210 2008-07-28
JP2008205224A JP2010055131A (en) 2008-07-28 2008-08-08 Program, information storage medium, and image generation system

Publications (1)

Publication Number Publication Date
JP2010055131A true JP2010055131A (en) 2010-03-11

Family

ID=42071029

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008205224A Pending JP2010055131A (en) 2008-07-28 2008-08-08 Program, information storage medium, and image generation system

Country Status (1)

Country Link
JP (1) JP2010055131A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014103599A (en) * 2012-11-21 2014-06-05 Canon Inc Image processing device and image processing method
JP2017099751A (en) * 2015-12-03 2017-06-08 株式会社三洋物産 Game machine
JP2020537200A (en) * 2017-10-04 2020-12-17 グーグル エルエルシー Shadow generation for image content inserted into an image
CN115375828A (en) * 2022-10-24 2022-11-22 腾讯科技(深圳)有限公司 Model shadow generation method, device, equipment and medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014103599A (en) * 2012-11-21 2014-06-05 Canon Inc Image processing device and image processing method
JP2017099751A (en) * 2015-12-03 2017-06-08 株式会社三洋物産 Game machine
JP2020537200A (en) * 2017-10-04 2020-12-17 グーグル エルエルシー Shadow generation for image content inserted into an image
JP2020537201A (en) * 2017-10-04 2020-12-17 グーグル エルエルシー Shadow generation for inserted image content
JP7008733B2 (en) 2017-10-04 2022-01-25 グーグル エルエルシー Shadow generation for inserted image content
JP7008730B2 (en) 2017-10-04 2022-01-25 グーグル エルエルシー Shadow generation for image content inserted into an image
CN115375828A (en) * 2022-10-24 2022-11-22 腾讯科技(深圳)有限公司 Model shadow generation method, device, equipment and medium
CN115375828B (en) * 2022-10-24 2023-02-03 腾讯科技(深圳)有限公司 Model shadow generation method, device, equipment and medium

Similar Documents

Publication Publication Date Title
JP4651435B2 (en) Program, information storage medium, and image generation system
JP2010033296A (en) Program, information storage medium, and image generation system
US7479961B2 (en) Program, information storage medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP2007140842A (en) Program, information storage medium, and image generation system
JP2006318388A (en) Program, information storage medium, and image forming system
JP4776017B2 (en) Program, information storage medium, and image generation system
JP4651527B2 (en) Program, information storage medium, and image generation system
JP2010055131A (en) Program, information storage medium, and image generation system
JP2008027064A (en) Program, information recording medium, and image forming system
JP3280355B2 (en) Image generation system and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP2009129167A (en) Program, information storage medium, and image generation system
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4632855B2 (en) Program, information storage medium, and image generation system
JP4229317B2 (en) Image generation system, program, and information storage medium
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4861862B2 (en) Program, information storage medium, and image generation system
JP4528008B2 (en) Program, information storage medium, and image generation system
JP2007226575A (en) Program, information storage medium, and image creation system
JP2007164323A (en) Program, information storage medium and image generation system
JP2005319106A (en) Program, information storage medium, and image forming system
JP4671756B2 (en) Program, information storage medium, and image generation system
JP2010033302A (en) Image generation system, program and information storage medium
JP2006252423A (en) Program, information storage medium and image generation system