JP2008310377A - Image generation system, program and information storage medium - Google Patents

Image generation system, program and information storage medium Download PDF

Info

Publication number
JP2008310377A
JP2008310377A JP2007154707A JP2007154707A JP2008310377A JP 2008310377 A JP2008310377 A JP 2008310377A JP 2007154707 A JP2007154707 A JP 2007154707A JP 2007154707 A JP2007154707 A JP 2007154707A JP 2008310377 A JP2008310377 A JP 2008310377A
Authority
JP
Japan
Prior art keywords
value
information
pixel
reference range
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007154707A
Other languages
Japanese (ja)
Inventor
Tetsuya Otaguro
鉄也 大田黒
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 JP2007154707A priority Critical patent/JP2008310377A/en
Publication of JP2008310377A publication Critical patent/JP2008310377A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image generation system, a program and an information storage medium for performing the appropriate plotting of a semi-transparent object corresponding to various circumstances. <P>SOLUTION: This image generation system is composed to decide whether or not the value of the transparency information of a pixel corresponding to an object is within a predetermined reference range, and to, when deciding that the value of the transparency information is within the reference range, plot the color information of the pixel based on the transparency information without plotting the depth information of the pixel, and to, when deciding that the value of the transparency information is not within the reference range, plot the depth information of the pixel, and to plot the color information of the pixel based on the transparency information. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

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

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

このような画像生成システムにおいて、奥行き情報を参照するZバッファ法によりオブジェクトの描画を行う場合に、半透明の部分を含むオブジェクトを正しく描画するための手法として、α値(透明度情報)が所定の条件を満たすか否かを判定して描画モードを切り替える手法が知られている(例えば特許文献1参照)。
特開平11−102179号公報
In such an image generation system, when an object is drawn by a Z buffer method that refers to depth information, an α value (transparency information) is a predetermined value as a technique for correctly drawing an object including a translucent portion. There is known a method of determining whether or not the condition is satisfied and switching the drawing mode (see, for example, Patent Document 1).
JP-A-11-102179

しかしながら、上記画像生成システムでは、上記条件が予めハードウェアに実装されていたため、設定できる条件の自由度が少なく様々な状況に対応した描画モードの切り替えが行えないという問題点があった。   However, the above-described image generation system has a problem in that since the above conditions are pre-installed in hardware, the degree of freedom of conditions that can be set is small, and it is not possible to switch between drawing modes corresponding to various situations.

本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、様々な状況に対応した適切な半透明オブジェクトの描画を行うことができる画像生成システム、プログラム、及び情報記憶媒体を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an image generation system, a program, and a program capable of drawing an appropriate translucent object corresponding to various situations, and An object is to provide an information storage medium.

(1)本発明は、オブジェクト空間において仮想カメラから見える画像を生成するためのプログラムであって、
オブジェクト空間にオブジェクトを設定するオブジェクト空間設定部と、
前記オブジェクトに対応するピクセルの透明度情報の値が所与の基準範囲にあるか否かを判定する判定部と、
前記透明度情報の値が前記基準範囲にあると判定された場合には、前記ピクセルの奥行き情報を描画せずに、前記透明度情報に基づき前記ピクセルの色情報を描画し、
前記透明度情報の値が前記基準範囲にないと判定された場合には、前記ピクセルの奥行き情報を描画し、前記透明度情報に基づき前記ピクセルの色情報を描画する描画部と、
してコンピュータを機能させることを特徴とする。
(1) The present invention is a program for generating an image visible from a virtual camera in an object space,
An object space setting section for setting an object in the object space;
A determination unit that determines whether or not a value of transparency information of a pixel corresponding to the object is in a given reference range;
When it is determined that the value of the transparency information is within the reference range, the pixel color information is drawn based on the transparency information without drawing the depth information of the pixel,
When it is determined that the value of the transparency information is not within the reference range, a drawing unit that draws the depth information of the pixel and draws the color information of the pixel based on the transparency information;
And making the computer function.

また本発明は上記各部を含む画像生成システムに関係する。また本発明はコンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶した情報記憶媒体に関係する。   The present invention also relates to an image generation system including the above-described units. The present invention is also a computer-readable information storage medium, and relates to an information storage medium storing a program that causes a computer to function as each of the above-described units.

本発明によれば、ピクセルの透明度情報の値が所与の基準範囲にあるか否かを判定して、奥行き情報と色情報を描画するモードと、奥行き情報を描画せず色情報を描画するモードとを切り替える処理を行うことで、適切な半透明オブジェクトの描画を行うことができる。   According to the present invention, it is determined whether or not the value of transparency information of a pixel is within a given reference range, the mode for drawing depth information and color information, and the color information is drawn without drawing the depth information. By performing the process of switching between modes, it is possible to draw an appropriate translucent object.

(2)また本発明に係るプログラム及び情報記憶媒体では、
前記基準範囲が、最も透明度の高い値を含む範囲であり、且つ最も透明度の低い値を含まない範囲であることを特徴とする。
(2) In the program and information storage medium according to the present invention,
The reference range is a range including a value with the highest transparency and a range not including a value with the lowest transparency.

本発明によれば、半透明オブジェクトを描画した後に当該オブジェクトよりも奥に位置するオブジェクトをさらに描画する場合においても、適切な描画処理を行うことができる。   According to the present invention, an appropriate drawing process can be performed even when an object located behind the object after drawing the semi-transparent object is further drawn.

(3)また本発明に係るプログラム及び情報記憶媒体では、
前記オブジェクトに対応する前記基準範囲を記憶する記憶部と、
してコンピュータを機能させ、
前記判定部は、
前記透明度情報の値が、前記記憶部に記憶された前記基準範囲にあるか否かを判定することを特徴とする。
(3) In the program and information storage medium according to the present invention,
A storage unit for storing the reference range corresponding to the object;
Make your computer work,
The determination unit
It is determined whether or not the value of the transparency information is within the reference range stored in the storage unit.

本発明において、オブジェクトに対応する基準情報は、オブジェクトが複数ある場合に、各オブジェクトに対応付けられて記憶される基準情報を含む。   In the present invention, the reference information corresponding to an object includes reference information stored in association with each object when there are a plurality of objects.

また本発明において、透明度情報の値が記憶部に記憶された前記基準範囲にあるか否かを判定するとは、オブジェクトに対応する透明度情報の値が当該オブジェクトに対応付けられて記憶された基準範囲にあるか否かを判定する場合を含む。   In the present invention, determining whether the value of transparency information is within the reference range stored in the storage unit means that the value of the transparency information corresponding to the object is stored in association with the object. It includes the case where it is determined whether or not.

本発明によれば、オブジェクト毎に最適な基準範囲を設定しておくことができ、適切な半透明オブジェクトの描画を行うことができる。   According to the present invention, it is possible to set an optimum reference range for each object, and it is possible to draw an appropriate translucent object.

(4)また本発明に係るプログラム及び情報記憶媒体では、
前記記憶部に記憶された前記基準範囲を変更する変更部と、
してコンピュータを機能させることを特徴とする。
(4) In the program and information storage medium according to the present invention,
A changing unit for changing the reference range stored in the storage unit;
And making the computer function.

本発明によれば、描画時の状況に応じた適切な基準範囲を設定することができ、適切な半透明オブジェクトの描画を行うことができる。   According to the present invention, it is possible to set an appropriate reference range according to the situation at the time of drawing, and to draw an appropriate translucent object.

(5)また本発明に係るプログラム及び情報記憶媒体では、
前記変更部は、
仮想カメラのオブジェクト空間における位置に基づき前記記憶部に記憶された前記基準範囲を変更することを特徴とする。
(5) In the program and information storage medium according to the present invention,
The changing unit is
The reference range stored in the storage unit is changed based on the position of the virtual camera in the object space.

本発明によれば、仮想カメラの位置に応じた適切な基準範囲を設定することができ、適切な半透明オブジェクトの描画を行うことができる。   According to the present invention, it is possible to set an appropriate reference range according to the position of the virtual camera, and to draw an appropriate translucent object.

(6)また本発明に係るプログラム及び情報記憶媒体では、
前記変更部は、
前記オブジェクトのオブジェクト空間における位置に基づき前記記憶部に記憶された前記基準範囲を変更することを特徴とする。
(6) In the program and information storage medium according to the present invention,
The changing unit is
The reference range stored in the storage unit is changed based on the position of the object in the object space.

本発明によれば、オブジェクトの位置に応じた適切な基準範囲を設定することができ、適切な半透明オブジェクトの描画を行うことができる。   According to the present invention, it is possible to set an appropriate reference range according to the position of the object, and to draw an appropriate translucent object.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   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 functional block diagram of an image generation system (game system) of the present embodiment. Note that the image generation system of the present embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.

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

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

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

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

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

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

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

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

特に本実施形態では、オブジェクトデータ記憶部176は、各オブジェクトに対応する基準範囲を記憶する。また基準範囲をオブジェクトに対応付けずに記憶するようにしてもよい。またオブジェクトデータ記憶部176は、各仮想カメラに対応する基準範囲を記憶するようにしてもよい。本実施形態では、基準範囲として、最も透明度の高い値を0とし最も透明度の低い値を1とすると、0以上1未満の任意の範囲(例えば0以上0.2以下の範囲)が設定され記憶される。   Particularly in the present embodiment, the object data storage unit 176 stores a reference range corresponding to each object. Further, the reference range may be stored without being associated with the object. The object data storage unit 176 may store a reference range corresponding to each virtual camera. In the present embodiment, if the highest transparency value is 0 and the lowest transparency value is 1 as the reference range, an arbitrary range from 0 to 1 (for example, a range from 0 to 0.2) is set and stored. Is done.

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

仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を演算して制御する処理(視点位置、視線方向あるいは画角を制御する処理)を行う。演算した仮想カメラの移動情報(位置、回転角度)は、オブジェクトデータ記憶部176に記憶される。   The virtual camera control unit 114 performs a virtual camera (viewpoint) control process for generating an image viewed from a given (arbitrary) viewpoint in the object space. Specifically, a process for controlling and calculating the position (X, Y, Z) or rotation angle (rotation angle around the X, Y, Z axes) of the virtual camera (controls the viewpoint position, the line-of-sight direction or the angle of view) Process). The calculated movement information (position, rotation angle) of the virtual camera is stored in the object data storage unit 176.

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

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

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

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

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

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

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

αブレンディング(α合成)は、α値(A値、透明度情報)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。例えば通常αブレンディングの場合には下式(1)〜(3)の処理を行う。
=(1−α)×R+α×R (1)
=(1−α)×G+α×G (2)
=(1−α)×B+α×B (3)
α blending (α synthesis) is a translucent synthesis process (usually α blending, addition α blending, subtraction α blending, or the like) based on an α value (A value, transparency information). For example, in the case of normal α blending, the following processes (1) to (3) are performed.
R Q = (1−α) × R 1 + α × R 2 (1)
G Q = (1−α) × G 1 + α × G 2 (2)
B Q = (1−α) × B 1 + α × B 2 (3)

ここで、R、G、Bは、描画バッファ174に既に描画されている画像(原画像)のRGB成分であり、R、G、Bは、描画バッファ174に描画すべき画像のRGB成分である。また、R、G、Bは、αブレンディングにより得られる画像のRGB成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、透明度情報(半透明度情報、不透明度情報と等価)、バンプ情報などとして使用できる。 Here, R 1 , G 1 , B 1 are RGB components of an image (original image) already drawn in the drawing buffer 174, and R 2 , G 2 , B 2 should be drawn in the drawing buffer 174. This is the RGB component of the image. R Q , G Q , and B Q are RGB components of an image obtained by α blending. The α value is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as mask information, transparency information (equivalent to translucency information and opacity information), bump information, and the like.

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

判定部122は、オブジェクトに対応するピクセルの透明度情報の値が所与の基準範囲にあるか否かを判定する。具体的には、描画ピクセルの透明度情報の値(α値)がオブジェクトデータ記憶部176に記憶された基準範囲にあるか否かを判定する。   The determination unit 122 determines whether the value of the transparency information of the pixel corresponding to the object is within a given reference range. Specifically, it is determined whether or not the value (α value) of the transparency information of the drawing pixel is within the reference range stored in the object data storage unit 176.

また判定部122は、オブジェクトに対応するピクセルの透明度情報の値が、オブジェクトデータ記憶部176に記憶された当該オブジェクトに対応する基準範囲にあるか否かを判定してもよい。   Further, the determination unit 122 may determine whether or not the value of the transparency information of the pixel corresponding to the object is within the reference range corresponding to the object stored in the object data storage unit 176.

また判定部122は、ピクセルの透明度情報の値が、現在の仮想カメラに対応付けて記憶された基準範囲にあるか否かを判定してもよい。   The determination unit 122 may determine whether the value of the pixel transparency information is within a reference range stored in association with the current virtual camera.

描画部120は、判定部122によって前記透明度情報の値が前記基準範囲にあると判定された場合には、描画ピクセルの奥行き情報(Z値)を描画せずに、前記透明度情報に基づき前記ピクセルの色情報を描画バッファ174に描画し、判定部122によって前記透明度情報の値が前記基準範囲にないと判定された場合には、前記ピクセルの奥行き情報をZバッファ179に描画し(Zバッファ179のZ値を前記ピクセルのZ値に更新し)、前記透明度情報に基づき前記ピクセルの色情報を描画バッファ174に描画する。   When the determination unit 122 determines that the value of the transparency information is within the reference range, the drawing unit 120 draws the pixel information based on the transparency information without drawing the depth information (Z value) of the drawing pixel. Is drawn in the drawing buffer 174, and when the determination unit 122 determines that the value of the transparency information is not within the reference range, the pixel depth information is drawn in the Z buffer 179 (Z buffer 179). The Z value of the pixel is updated to the Z value of the pixel), and the color information of the pixel is drawn in the drawing buffer 174 based on the transparency information.

基準範囲変更部(変更部)116は、オブジェクトデータ記憶部176に記憶された基準範囲を変更(更新)する。   The reference range changing unit (changing unit) 116 changes (updates) the reference range stored in the object data storage unit 176.

また基準範囲変更部116は、仮想カメラ制御部114によって演算された仮想カメラの位置(オブジェクトデータ記憶部176に記憶された仮想カメラの移動情報)に基づき、オブジェクトデータ記憶部176に記憶された基準範囲を変更してもよい。   The reference range changing unit 116 also stores the reference stored in the object data storage unit 176 based on the position of the virtual camera calculated by the virtual camera control unit 114 (virtual camera movement information stored in the object data storage unit 176). The range may be changed.

また基準範囲変更部116は、移動・動作処理部112によって演算されたオブジェクトの位置(オブジェクトデータ記憶部176に記憶されたオブジェクトの移動情報)に基づき、オブジェクトデータ記憶部176に記憶された基準範囲を変更してもよい。   The reference range changing unit 116 also stores the reference range stored in the object data storage unit 176 based on the position of the object calculated by the movement / motion processing unit 112 (object movement information stored in the object data storage unit 176). May be changed.

音生成部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は、本実施形態の処理例について説明するための図である。
2. 2. Method according to this embodiment FIG. 2 is a diagram for explaining a processing example according to this embodiment.

図2に示す例においては、画像210が既に描画バッファ174に描画されており、この上に画像220における領域222(ポリゴン)を描画し、さらにその上に画像240における領域242(ポリゴン)を描画する処理を行っている。   In the example shown in FIG. 2, the image 210 is already drawn in the drawing buffer 174, and the region 222 (polygon) in the image 220 is drawn thereon, and further the region 242 (polygon) in the image 240 is drawn thereon. Processing to do.

ここで領域222における領域224のα値(透明度情報)は0.0〜0.2(値0.0に近いほどより透明になり、値1.0に近いほどより不透明になる)の範囲の値であり、領域222における領域226のα値は0.2〜1.0の範囲の値であり、領域212、242のα値は1.0である。   Here, the α value (transparency information) of the region 224 in the region 222 is in the range of 0.0 to 0.2 (the closer to the value 0.0, the more transparent, the closer to the value 1.0, the more opaque). The α value of the region 226 in the region 222 is a value in the range of 0.2 to 1.0, and the α value of the regions 212 and 242 is 1.0.

また領域212のZ値(奥行き情報)は1.0(値0.0に近いほどより手前に位置し、値1.0に近いほどより奥に位置する)であり、領域242のZ値は0.5であり、領域222のZ値は0.0である。すなわちオブジェクト空間において、仮想カメラからみて奥から領域212、領域242、領域222の順で各領域が位置している。またこの例では、α値の基準範囲として0.0〜0.2(0.2以下)の範囲が設定されている。   Further, the Z value (depth information) of the area 212 is 1.0 (the closer to the value 0.0, the closer to the value, the closer to the value 1.0, the deeper the position), and the Z value of the area 242 is 0.5 and the Z value of region 222 is 0.0. That is, in the object space, the respective regions are located in the order of the region 212, the region 242, and the region 222 from the back as viewed from the virtual camera. In this example, a range of 0.0 to 0.2 (0.2 or less) is set as the reference range of the α value.

画像230は、描画バッファ174に描画された画像210に対して領域222を描画したときに得られる画像である。ここでは領域222のZ値が、画像210における領域212のZ値よりも小さいため、領域212と重なる部分において領域222の色が画像210に対して描画されている。但し領域222における領域224のα値が小さい(透明度が高い)ためα値に基づく半透明合成処理の結果、領域224の色として領域212の色(に近い色)が画像210に対して描画されている。また領域224のα値は上記基準範囲内であるため、領域224のZ値は画像210に対して描画されず、領域226のZ値のみが画像210に対して描画される。すなわち画像230における領域232のZ値は0.0であり、領域234(領域232以外の領域)のZ値は1.0である。   The image 230 is an image obtained when the area 222 is drawn on the image 210 drawn in the drawing buffer 174. Here, since the Z value of the region 222 is smaller than the Z value of the region 212 in the image 210, the color of the region 222 is drawn on the image 210 in a portion overlapping the region 212. However, since the α value of the region 224 in the region 222 is small (high transparency), the color of the region 212 (close color) is drawn on the image 210 as the color of the region 224 as a result of the semi-transparent composition processing based on the α value. ing. Further, since the α value of the area 224 is within the reference range, the Z value of the area 224 is not drawn on the image 210, and only the Z value of the area 226 is drawn on the image 210. That is, the Z value of the region 232 in the image 230 is 0.0, and the Z value of the region 234 (region other than the region 232) is 1.0.

画像250は、描画バッファ174に描画された画像230に対して領域242を描画したときに得られる画像である。ここでは領域242のZ値が、画像230における領域234のZ値よりも小さく、領域232のZ値よりも大きいため、領域234と重なる部分においては領域242の色が画像230に対して描画され、領域232と重なる部分においては領域242の色は描画されない。   The image 250 is an image obtained when the region 242 is drawn on the image 230 drawn in the drawing buffer 174. Here, since the Z value of the region 242 is smaller than the Z value of the region 234 in the image 230 and larger than the Z value of the region 232, the color of the region 242 is drawn on the image 230 in a portion overlapping the region 234. The color of the area 242 is not drawn in a portion overlapping the area 232.

このように本実施形態では、半透明の領域を含むポリゴン(オブジェクト)を描画する場合に、当該領域のα値が基準範囲にあるか否かを判定して、基準範囲にない場合には色情報とZ値とを描画する第1の描画モードで描画し、基準範囲にある場合にはZ値を描画せずに色情報を描画する第2の描画モードで描画する。   As described above, in the present embodiment, when drawing a polygon (object) including a translucent area, it is determined whether or not the α value of the area is in the reference range. Drawing is performed in the first drawing mode for drawing the information and the Z value, and if it is within the reference range, drawing is performed in the second drawing mode for drawing the color information without drawing the Z value.

図3は、本実施形態の処理例と比較するための処理例である。   FIG. 3 is a processing example for comparison with the processing example of the present embodiment.

画像330は、描画バッファ174に描画された画像210に対して画像220における領域222を第1の描画モード(色情報とZ値とを描画するモード)のみで描画したときに得られる画像である。ここでは領域222における領域224のZ値は領域226のZ値と同様に画像210に対して描画される。すなわち画像230における領域332のZ値は0.0であり、領域332以外の領域のZ値は1.0である。   The image 330 is an image obtained when the area 222 in the image 220 is drawn with respect to the image 210 drawn in the drawing buffer 174 only in the first drawing mode (a mode in which color information and a Z value are drawn). . Here, the Z value of the region 224 in the region 222 is drawn on the image 210 in the same manner as the Z value of the region 226. That is, the Z value of the area 332 in the image 230 is 0.0, and the Z value of the area other than the area 332 is 1.0.

画像350は、描画バッファ174に描画された画像330に対して画像240における領域242を描画したときに得られる画像である。ここでは領域242のZ値が、画像330における領域332のZ値よりも大きいため、領域332と重なる部分において領域242の色は画像330に対して描画されない。従って画像350においては、領域352に領域242の色が描画されずに、領域242よりも奥にあるはずの領域212の色が残ってしまい、図2に示した画像250と比較して見た目上不自然な画像となってしまう。   The image 350 is an image obtained when the region 242 in the image 240 is drawn with respect to the image 330 drawn in the drawing buffer 174. Here, since the Z value of the area 242 is larger than the Z value of the area 332 in the image 330, the color of the area 242 is not drawn on the image 330 in a portion overlapping the area 332. Therefore, in the image 350, the color of the region 242 is not drawn in the region 352, and the color of the region 212 that should be deeper than the region 242 remains, and is visually compared with the image 250 illustrated in FIG. 2. The image becomes unnatural.

このように半透明の領域を含むオブジェクト(画像220における領域222)を描画した後に、当該オブジェクトよりも仮想カメラから見て奥に位置するオブジェクト(画像240における領域242)を描画した場合に見た目に不自然な画像となってしまう場合があるが、本実施形態によればこのような場合であっても、オブジェクトを奥に位置するオブジェクトから順にソートする処理を行ってから描画する等の処理負担をかけずに適切な描画処理を行うことができる。   Thus, after drawing an object including a translucent area (area 222 in the image 220) and then drawing an object (area 242 in the image 240) located behind the virtual camera as viewed from the virtual camera, Although this may result in an unnatural image, according to the present embodiment, even in such a case, the processing load such as drawing after performing the process of sorting the objects in order from the object located at the back Appropriate drawing processing can be performed without applying.

次に、本実施形態の処理によって得られた画像(元画像)に対して、元画像のZ値(奥行き情報)を用いたポストエフェクト処理を行う場合について説明する。ここでは半透明の領域を含むオブジェクト(画像220における領域222)を描画して得られた図2に示す画像230(元画像)に対して被写界深度処理を行う場合について説明する。   Next, a case where post-effect processing using the Z value (depth information) of the original image is performed on the image (original image) obtained by the processing of the present embodiment will be described. Here, a case where depth-of-field processing is performed on an image 230 (original image) shown in FIG. 2 obtained by drawing an object including a translucent region (region 222 in the image 220) will be described.

被写界深度処理を行う場合には、まず元画像に対してぼかし処理を行ってぼかし画像を生成する。次に元画像のZ値に基づきぼかし画像を合成する範囲を決定し、元画像の決定した範囲にぼかし画像を合成する処理を行う。このときZ値が大きい(奥に位置する)範囲がぼかし画像を合成する範囲として決定される。   When performing the depth of field process, first, the blurred image is generated by performing the blurring process on the original image. Next, a range for combining the blurred image is determined based on the Z value of the original image, and a process for combining the blurred image with the determined range of the original image is performed. At this time, a range in which the Z value is large (located in the back) is determined as a range in which the blurred image is synthesized.

図2に示す画像230においては、領域232のZ値が小さく(値0.0)、領域234のZ値が大きい(値1.0)ので、ぼかし画像を合成する範囲として領域234(領域232以外の領域)が決定される。従って図2に示す画像230に対して被写界深度処理を行った場合には、画像230の領域234(領域232以外の領域)にぼかし画像が合成されることになり、より手前に位置する領域232がはっきり見え、より奥に位置する領域234がぼけて見える画像が生成される。   In the image 230 shown in FIG. 2, since the Z value of the region 232 is small (value 0.0) and the Z value of the region 234 is large (value 1.0), the region 234 (region 232) is used as a range for synthesizing the blurred image. Other areas) are determined. Therefore, when depth-of-field processing is performed on the image 230 shown in FIG. 2, the blurred image is combined with the region 234 (region other than the region 232) of the image 230, and is positioned closer to the front. An image is generated in which the region 232 is clearly visible and the region 234 located in the back is blurred.

一方、半透明の領域を含むオブジェクト(画像220における領域222)を第1の描画モード(色情報とZ値とを描画するモード)のみで描画して得られた図3に示す画像330においては、領域332のZ値が小さく(値0.0)、領域332以外の領域のZ値が大きい(値1.0)ので、ぼかし画像を合成する範囲として領域332以外の領域が決定される。従って図3に示す画像330に対して被写界深度処理を行った場合には、画像330の領域332以外の領域にぼかし画像が合成されることになり、領域332がはっきり見え、領域332以外の領域がぼけて見える画像が生成される。従って画像330における領域212(領域222よりも奥に位置する領域)の色が描画された部分のうち、領域332に含まれない部分についてのみぼけて見え、領域332に含まれる部分についえてははっきり見える画像が生成されてしまい、図2に示す画像250に対して被写界深度処理を行う場合と比較して見た目上不自然な画像となってしまう。   On the other hand, in the image 330 shown in FIG. 3 obtained by drawing the object including the translucent area (the area 222 in the image 220) only in the first drawing mode (the mode for drawing the color information and the Z value). Since the Z value of the region 332 is small (value 0.0) and the Z value of the region other than the region 332 is large (value 1.0), the region other than the region 332 is determined as a range in which the blurred image is synthesized. Therefore, when depth-of-field processing is performed on the image 330 shown in FIG. 3, the blurred image is synthesized in an area other than the area 332 of the image 330, so that the area 332 can be clearly seen and other than the area 332. An image in which the area is blurred is generated. Accordingly, only the portion that is not included in the region 332 of the portion of the image 330 in which the color of the region 212 (the region that is located behind the region 222) is drawn appears to be blurred, and the portion that is included in the region 332 is clearly visible. A visible image is generated, resulting in an unnatural image compared to the case where the depth of field processing is performed on the image 250 shown in FIG.

このように本実施形態によれば、半透明の領域を含むオブジェクト(画像220における領域222)が描画された元画像に対して、元画像のZ値を用いたポストエフェクト処理を行う場合にも、適切な描画処理を行うことができる。   As described above, according to the present embodiment, the post-effect process using the Z value of the original image is performed on the original image on which the object including the translucent area (the area 222 in the image 220) is drawn. Appropriate drawing processing can be performed.

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

まず描画するオブジェクトを選択し、当該オブジェクトが半透明オブジェクトであるか否かを判定する(ステップS10)。具体的には記憶部に各オブジェクトに対応付けて半透明オブジェクトであるか否かを示す情報が記憶され、当該情報を参照して上記判定を行う。   First, an object to be drawn is selected, and it is determined whether or not the object is a translucent object (step S10). Specifically, information indicating whether or not the object is a semi-transparent object is stored in the storage unit in association with each object, and the determination is performed with reference to the information.

ステップS10において、描画するオブジェクトが半透明オブジェクトであると判定された場合には、当該オブジェクトに対応するピクセルのうち1のピクセルを選択し、当該ピクセルのZ値とZバッファに格納されたZ値とを比較して、当該ピクセルのZ値が手前側となるZ値か否かを判定する(ステップS12)。   If it is determined in step S10 that the object to be drawn is a translucent object, one pixel among the pixels corresponding to the object is selected, and the Z value of the pixel and the Z value stored in the Z buffer are selected. To determine whether or not the Z value of the pixel is the Z value on the near side (step S12).

ステップS12において、当該ピクセルのZ値が手前側となるZ値であると判定した場合には、記憶部に記憶された基準範囲を参照して、当該ピクセルのα値が当該基準範囲にあるか否かを判断する(ステップS14)。このとき描画しているオブジェクトに対応付けられた基準範囲を参照するようにしてもよいし、描画で使用している仮想カメラに対応付けられた基準範囲を参照するようにしてもよい。またオブジェクトの位置、仮想カメラの位置等に基づき変更された基準範囲を参照し、上記判断を行ってもよい。   If it is determined in step S12 that the Z value of the pixel is the near side Z value, whether the α value of the pixel is in the reference range with reference to the reference range stored in the storage unit It is determined whether or not (step S14). At this time, the reference range associated with the object being drawn may be referred to, or the reference range associated with the virtual camera used for drawing may be referred to. Further, the above determination may be made with reference to the reference range changed based on the position of the object, the position of the virtual camera, or the like.

ステップS14において、当該ピクセルのα値が基準範囲にあると判定した場合には、ステップS16の処理を行わず、ステップS18の処理に進む。またステップS14において、当該ピクセルのα値が基準範囲にないと判定した場合には、当該ピクセルのZ値をZバッファに描画する(ZバッファのZ値を当該ピクセルの値に更新する)(ステップS16)。   If it is determined in step S14 that the α value of the pixel is within the reference range, the process proceeds to step S18 without performing the process in step S16. If it is determined in step S14 that the α value of the pixel is not in the reference range, the Z value of the pixel is drawn in the Z buffer (the Z value of the Z buffer is updated to the value of the pixel) (step S16).

次に、当該ピクセルのα値に基づきαブレンディング処理を行い、得られた色情報を描画バッファに描画する(ステップS18)。ここで色情報と当該ピクセルのα値を描画バッファに描画するようにしてもよい。   Next, α blending processing is performed based on the α value of the pixel, and the obtained color information is drawn in the drawing buffer (step S18). Here, the color information and the α value of the pixel may be drawn in the drawing buffer.

次に、描画しているオブジェクトに対応する全てのピクセルについて処理を行ったか否かを判断し(ステップS20)、全てのピクセルについて処理を行っていない場合にはステップS12に戻り、当該オブジェクトに対応する次のピクセルを選択し、当該オブジェクトに対応する全てのピクセルについて処理が終了するまでステップS12以下の処理を繰り返す。   Next, it is determined whether or not processing has been performed for all pixels corresponding to the object being drawn (step S20), and if processing has not been performed for all pixels, the processing returns to step S12 and corresponds to the object. The next pixel to be selected is selected, and the processing from step S12 is repeated until the processing is completed for all the pixels corresponding to the object.

ステップS20において、全てのピクセルについて処理を行ったと判断した場合には、描画すべき全てのオブジェクトについて処理を行ったか否かを判断し(ステップS22)、全てのオブジェクトついて処理を行っていない場合にはステップS10に戻り、描画する次のオブジェクトを選択し、全てのオブジェクトについて処理が終了するまでステップS12以下の処理を繰り返す。   If it is determined in step S20 that processing has been performed for all pixels, it is determined whether processing has been performed for all objects to be rendered (step S22), and processing has not been performed for all objects. Returns to step S10, selects the next object to be drawn, and repeats the processing from step S12 onward until the processing is completed for all objects.

ステップS10において、選択したオブジェクトが半透明オブジェクトでないと判断した場合には、当該オブジェクトに対応するピクセルのうち1のピクセルを選択し、当該ピクセルのZ値とZバッファに格納されたZ値とを比較して、当該ピクセルのZ値が手前側となるZ値か否かを判定する(ステップS24)。   If it is determined in step S10 that the selected object is not a translucent object, one of the pixels corresponding to the object is selected, and the Z value of the pixel and the Z value stored in the Z buffer are obtained. In comparison, it is determined whether or not the Z value of the pixel is the Z value on the near side (step S24).

ステップS24において、当該ピクセルのZ値が手前側となるZ値であると判定した場合には、当該ピクセルのα値に基づきαブレンディング処理を行い、得られた色情報を描画バッファに描画するとともに当該ピクセルのZ値をZバッファに描画する(ZバッファのZ値を当該ピクセルの値に更新する)。   If it is determined in step S24 that the Z value of the pixel is the near Z value, α blending processing is performed based on the α value of the pixel, and the obtained color information is drawn in the drawing buffer. The Z value of the pixel is drawn in the Z buffer (the Z value of the Z buffer is updated to the value of the pixel).

次に、描画しているオブジェクトに対応する全てのピクセルについて処理を行ったか否かを判断し(ステップS28)、全てのピクセルについて処理を行っていない場合にはステップS24に戻り、当該オブジェクトに対応する次のピクセルを選択し、全てのピクセルについて処理が終了するまでステップS24以下の処理を繰り返す。全てのピクセルについて処理を行ったと判断した場合には、ステップS22に進む。   Next, it is determined whether or not processing has been performed for all the pixels corresponding to the object being drawn (step S28). If processing has not been performed for all the pixels, the processing returns to step S24 and corresponds to the object. The next pixel to be selected is selected, and the processes in and after step S24 are repeated until the processing is completed for all the pixels. If it is determined that all pixels have been processed, the process proceeds to step S22.

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

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

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 本実施形態の手法の説明図。Explanatory drawing of the method of this embodiment. 本実施形態の手法の説明図。Explanatory drawing of the method of this embodiment. 本実施形態のゲーム装置の処理例を示すフローチャート。The flowchart which shows the process example of the game device of this embodiment.

符号の説明Explanation of symbols

10 ゲーム装置
100 処理部
110 オブジェクト空間設定部
112 移動・動作処理部
114 仮想カメラ制御部
116 基準範囲変更部
120 描画部
122 判定部
140 音生成部
160 操作部
170 記憶部
180 情報記憶媒体
190 表示部
192 音出力部
194 携帯型情報記憶装置
196 通信部
10 game device 100 processing unit 110 object space setting unit 112 movement / motion processing unit 114 virtual camera control unit 116 reference range changing unit 120 drawing unit 122 determination unit 140 sound generation unit 160 operation unit 170 storage unit 180 information storage medium 190 display unit 192 Sound output unit 194 Portable information storage device 196 Communication unit

Claims (8)

オブジェクト空間において仮想カメラから見える画像を生成するためのプログラムであって、
オブジェクト空間にオブジェクトを設定するオブジェクト空間設定部と、
前記オブジェクトに対応するピクセルの透明度情報の値が所与の基準範囲にあるか否かを判定する判定部と、
前記透明度情報の値が前記基準範囲にあると判定された場合には、前記ピクセルの奥行き情報を描画せずに、前記透明度情報に基づき前記ピクセルの色情報を描画し、
前記透明度情報の値が前記基準範囲にないと判定された場合には、前記ピクセルの奥行き情報を描画し、前記透明度情報に基づき前記ピクセルの色情報を描画する描画部と、
してコンピュータを機能させることを特徴とするプログラム。
A program for generating an image visible from a virtual camera in an object space,
An object space setting section for setting an object in the object space;
A determination unit that determines whether or not a value of transparency information of a pixel corresponding to the object is in a given reference range;
When it is determined that the value of the transparency information is within the reference range, the pixel color information is drawn based on the transparency information without drawing the depth information of the pixel,
When it is determined that the value of the transparency information is not within the reference range, a drawing unit that draws the depth information of the pixel and draws the color information of the pixel based on the transparency information;
A program that causes a computer to function.
請求項1において、
前記基準範囲が、最も透明度の高い値を含む範囲であり、且つ最も透明度の低い値を含まない範囲であることを特徴とするプログラム。
In claim 1,
The program according to claim 1, wherein the reference range is a range including a value having the highest transparency and not including a value having the lowest transparency.
請求項1又は2において、
前記オブジェクトに対応する前記基準範囲を記憶する記憶部と、
してコンピュータを機能させ、
前記判定部は、
前記透明度情報の値が、前記記憶部に記憶された前記基準範囲にあるか否かを判定することを特徴とするプログラム。
In claim 1 or 2,
A storage unit for storing the reference range corresponding to the object;
Make your computer work,
The determination unit
A program for determining whether or not a value of the transparency information is within the reference range stored in the storage unit.
請求項3において、
前記記憶部に記憶された前記基準範囲を変更する変更部と、
してコンピュータを機能させることを特徴とするプログラム。
In claim 3,
A changing unit for changing the reference range stored in the storage unit;
A program that causes a computer to function.
請求項4において、
前記変更部は、
仮想カメラのオブジェクト空間における位置に基づき前記記憶部に記憶された前記基準範囲を変更することを特徴とするプログラム。
In claim 4,
The changing unit is
A program for changing the reference range stored in the storage unit based on a position of a virtual camera in an object space.
請求項4において、
前記変更部は、
前記オブジェクトのオブジェクト空間における位置に基づき前記記憶部に記憶された前記基準範囲を変更することを特徴とするプログラム。
In claim 4,
The changing unit is
A program for changing the reference range stored in the storage unit based on a position of the object in an object space.
コンピュータ読み取り可能な情報記憶媒体であって、請求項1乃至6のいずれかのプログラムを記録したことを特徴とする情報記憶媒体。   A computer-readable information storage medium, wherein the program according to any one of claims 1 to 6 is recorded. オブジェクト空間において仮想カメラから見える画像を生成するための画像生成システムであって、
オブジェクト空間にオブジェクトを設定するオブジェクト空間設定部と、
前記オブジェクトに対応するピクセルの透明度情報の値が所与の基準範囲にあるか否かを判定する判定部と、
前記透明度情報の値が前記基準範囲にあると判定された場合には、前記ピクセルの奥行き情報を描画せずに、前記透明度情報に基づき前記ピクセルの色情報を描画し、
前記透明度情報の値が前記基準範囲にないと判定された場合には、前記ピクセルの奥行き情報を描画し、前記透明度情報に基づき前記ピクセルの色情報を描画する描画部と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image visible from a virtual camera in an object space,
An object space setting section for setting an object in the object space;
A determination unit that determines whether or not a value of transparency information of a pixel corresponding to the object is in a given reference range;
When it is determined that the value of the transparency information is within the reference range, the pixel color information is drawn based on the transparency information without drawing the depth information of the pixel,
When it is determined that the value of the transparency information is not within the reference range, a drawing unit that draws the depth information of the pixel and draws the color information of the pixel based on the transparency information;
An image generation system comprising:
JP2007154707A 2007-06-12 2007-06-12 Image generation system, program and information storage medium Withdrawn JP2008310377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007154707A JP2008310377A (en) 2007-06-12 2007-06-12 Image generation system, program and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007154707A JP2008310377A (en) 2007-06-12 2007-06-12 Image generation system, program and information storage medium

Publications (1)

Publication Number Publication Date
JP2008310377A true JP2008310377A (en) 2008-12-25

Family

ID=40237951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007154707A Withdrawn JP2008310377A (en) 2007-06-12 2007-06-12 Image generation system, program and information storage medium

Country Status (1)

Country Link
JP (1) JP2008310377A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022500792A (en) * 2018-10-30 2022-01-04 シェンチェン センスタイム テクノロジー カンパニー リミテッドShenzhen Sensetime Technology Co., Ltd Image processing methods and devices, electronic devices and storage media

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022500792A (en) * 2018-10-30 2022-01-04 シェンチェン センスタイム テクノロジー カンパニー リミテッドShenzhen Sensetime Technology Co., Ltd Image processing methods and devices, electronic devices and storage media

Similar Documents

Publication Publication Date Title
JP4804120B2 (en) Program, information storage medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP4305903B2 (en) Image generation system, program, and information storage medium
JP2006195882A (en) Program, information storage medium and image generation system
JP4651527B2 (en) Program, information storage medium, and image generation system
JP4749198B2 (en) Program, information storage medium, and image generation system
JP4868586B2 (en) Image generation system, program, and information storage medium
JP4743770B2 (en) Image generation system, program, and information storage medium
JP4754384B2 (en) Program, information recording medium, and image generation system
JP2006252426A (en) Program, information storage medium, and image generation system
JP2001143099A (en) Image-forming system and information storage medium
JP4632855B2 (en) Program, information storage medium, and image generation system
JP4528008B2 (en) Program, information storage medium, and image generation system
JP4913399B2 (en) Program, information storage medium, and image generation system
JP2005209217A (en) Game system and information storage medium
JP4592087B2 (en) Image generation system, program, and information storage medium
JP2008310377A (en) Image generation system, program and information storage medium
JP2005275795A (en) Program, information storage medium and image generation system
JP4476040B2 (en) Program, information storage medium, and image generation system
JP2010231364A (en) Image generation system, program and information recording medium
JP2006252423A (en) Program, information storage medium and image generation system
JP2007164736A (en) Image generation system, program and information storage medium
JP4521811B2 (en) Program, information storage medium, and image generation system
JP2008077406A (en) Image generation system, program, and information storage medium
JP2007272389A (en) Program, information storage medium and image generation system

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100907