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

Image generation system, program and information storage medium Download PDF

Info

Publication number
JP2010033301A
JP2010033301A JP2008194225A JP2008194225A JP2010033301A JP 2010033301 A JP2010033301 A JP 2010033301A JP 2008194225 A JP2008194225 A JP 2008194225A JP 2008194225 A JP2008194225 A JP 2008194225A JP 2010033301 A JP2010033301 A JP 2010033301A
Authority
JP
Japan
Prior art keywords
color
image
value
pixel
original image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2008194225A
Other languages
Japanese (ja)
Inventor
Yasuyuki Kobori
寧之 小堀
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 JP2008194225A priority Critical patent/JP2010033301A/en
Publication of JP2010033301A publication Critical patent/JP2010033301A/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 which can reflect image effects according to the characteristics of color components in an image. <P>SOLUTION: This image generation system for processing an original image in which the colors of pixels are designated by the color values of a plurality of types of color components is provided with: a first color processing part 122 for searching a first color value as a difference between a gray scale value obtained by converting the color values of the plurality of types of color components of each of pixels configuring the original image and a first threshold; a second color processing part 124 for searching a second color value as a difference between the color value of a prescribed color component configuring the color of each pixel configuring the original image and a second threshold; a shaded image generation part 126 for generating a shaded image based on the first color value and the second color value; and a composition processing part 128 for compounding the original image with the shaded image. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

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

従来より、仮想的な3次元空間であるオブジェクト空間において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。格闘ゲームを楽しむことができる画像生成システムを例に取れば、プレーヤは、操作部(ゲームコントローラ等)を用いて移動体(キャラクタ等)に関する操作(攻撃操作、防御操作、移動操作等)を行い、他のプレーヤ(コンピュータプレーヤも含まれる)の移動体と格闘するゲームを楽しむ。   Conventionally, an image generation system (game system) that generates an image that can be viewed from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known, and is popular as a so-called virtual reality experience. Is expensive. Taking an image generation system capable of enjoying a fighting game as an example, a player performs operations (attack operation, defense operation, movement operation, etc.) related to a moving body (character, etc.) using an operation unit (game controller, etc.). Enjoy a game of fighting with the moving bodies of other players (including computer players).

ところで、上述した画像生成システムに関して、一度描画した画像(原画像)に対して更なる処理を施して、原画像とは異なる雰囲気の画像を作成することができるフィルタ手法が開発されている。例えば、バッファに描画した原画像から所定の色情報を抽出してフィルタ画像を生成し、フィルタ画像を原画像に合成することで、視線方向に入射する強い光のにじみを表現するフィルタ手法などが提案されている(特許文献1参照)。
特開2003−85578号公報
By the way, regarding the above-described image generation system, a filter technique has been developed that can further process an image (original image) once drawn to create an image having an atmosphere different from that of the original image. For example, there is a filter method that extracts a predetermined color information from an original image drawn in a buffer to generate a filter image, and synthesizes the filter image with the original image to express a blur of strong light incident in the line-of-sight direction. It has been proposed (see Patent Document 1).
Japanese Patent Laid-Open No. 2003-85578

しかしながら、従来から提案されているフィルタ手法では、画像における色成分の特性に関わらず一定の色情報を抽出して中間画像を生成していたため、画像における色成分の特性によっては、フィルタ手法による画像効果を反映させたい領域に画像効果が反映されない場合があるという問題があった。   However, in the conventionally proposed filter method, an intermediate image is generated by extracting certain color information regardless of the characteristics of the color components in the image. Therefore, depending on the characteristics of the color components in the image, the image by the filter method may be used. There is a problem that the image effect may not be reflected in a region where the effect is to be reflected.

本出願は上記事情に鑑みてなされたものであり、その目的は、画像における色成分の特性に応じて画像効果を反映させることができるようにした画像生成システム、プログラム及び情報記憶媒体を提供することにある。   The present application has been made in view of the above circumstances, and an object thereof is to provide an image generation system, a program, and an information storage medium capable of reflecting an image effect according to the characteristics of color components in an image. There is.

(1)本発明は、
複数種類の色成分の色値によって画素の色が指定される原画像を加工するための画像生成システムであって、
前記原画像を構成する各画素の前記複数種類の色成分の色値を変換したグレースケール値と第1のしきい値との差分である第1の色値を求める第1の色処理部と、
前記原画像を構成する各画素の色を構成する所定の色成分の色値と第2のしきい値との差分である第2の色値を求める第2の色処理部と、
前記第1の色値と前記第2の色値とに基づいてぼかし画像を生成するぼかし画像生成部と、
前記原画像と前記ぼかし画像とを合成する合成処理部とを含むことを特徴とする画像生成システムに関するものである。また本発明は、上記各部としてコンピュータを機能させるプログラム及びそのようなプログラムを記憶するコンピュータが読み取り可能な情報記憶媒体に関するものである。
(1) The present invention
An image generation system for processing an original image in which pixel colors are designated by color values of a plurality of types of color components,
A first color processing unit that obtains a first color value that is a difference between a gray scale value obtained by converting color values of the plurality of types of color components of each pixel constituting the original image and a first threshold value; ,
A second color processing unit for obtaining a second color value that is a difference between a color value of a predetermined color component constituting the color of each pixel constituting the original image and a second threshold value;
A blurred image generating unit that generates a blurred image based on the first color value and the second color value;
The present invention relates to an image generation system including a synthesis processing unit that synthesizes the original image and the blurred image. The present invention also relates to a program that causes a computer to function as each of the above-described units, and a computer-readable information storage medium that stores such a program.

本発明によれば、グレースケール値に基づく第1の色値と、所定の色成分の色値に基づく第2の色値とによってぼかし画像を生成することができるので、画像における色成分の特性に合わせてぼかし画像を生成するようにすることができる。   According to the present invention, the blurred image can be generated by the first color value based on the gray scale value and the second color value based on the color value of the predetermined color component. It is possible to generate a blurred image in accordance with.

(2)また本発明の画像生成システム、プログラム及び情報記憶媒体では、
前記合成処理部が、
前記原画像の各画素の色値に対して前記ぼかし画像の各画素の色値を加算するようにしてもよい。
(2) In the image generation system, program, and information storage medium of the present invention,
The synthesis processing unit
The color value of each pixel of the blurred image may be added to the color value of each pixel of the original image.

このようにすれば、ぼかし画像に応じた領域の色値が高くなるので、ぼかし画像に応じた領域が輝くような画像効果を反映させることができる。   In this way, since the color value of the area corresponding to the blurred image is increased, an image effect that the area corresponding to the blurred image shines can be reflected.

(3)また本発明の画像生成システム、プログラム及び情報記憶媒体では、
前記原画像は、オブジェクト空間に配置された光源の色をオブジェクトに反映させるシェーディングを施した画像であって、
前記第2の色処理部が、
前記光源の色を構成する複数種類の色成分のうち最も色値が高い色成分を前記所定の色成分として、前記第2の色値を求めるようにしてもよい。
(3) In the image generation system, program, and information storage medium of the present invention,
The original image is an image subjected to shading that reflects on the object the color of the light source arranged in the object space,
The second color processing unit is
The second color value may be obtained using the color component having the highest color value among the plurality of types of color components constituting the color of the light source as the predetermined color component.

ここで「光源の色をオブジェクトに反映させる」とは、光源計算の結果の色をオブジェクトに反映させるものとすることができる。   Here, “reflect the color of the light source on the object” can reflect the color of the light source calculation result on the object.

このようにすれば、傾向として、光源の色成分の特性に合わせて画像効果を反映させるようにすることができる。   In this way, it is possible to reflect the image effect in accordance with the characteristics of the color components of the light source as a tendency.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   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(メインメモリ172)、VRAM(ビデオメモリ174)などにより実現できる。   The operation unit 160 is for the player to input operation data of a player object (an example of a moving object, a player character operated by the player, etc.), and its functions are lever, button, steering, microphone, touch panel type. It can be realized by a display or a housing. The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its functions can be realized by a RAM (main memory 172), a VRAM (video memory 174), 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のメインメモリ172)に配信してもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含めることができる。   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 included in the host device (server) via the network and communication unit 196 (or the main memory of the storage unit 170). 172). 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(メインプロセッサ)、GPU(描画プロセッサ)、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 memory 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 (main processor), GPU (drawing processor), DSP, etc.), ASIC (gate array, etc.), and programs.

処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、描画部120、フィルタ処理部121、音生成部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 drawing unit 120, a filter processing unit 121, and a sound generation unit 130. Note that some of these may be omitted.

オブジェクト空間設定部110は、オブジェクトデータ記憶部172に記憶されているオブジェクトデータに基づいて、キャラクタ、車、建物、樹木、柱、壁、コース(道路)、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブで構成されるオブジェクト)や、光が進行する方向や強さや色を示す光源をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、決定された位置(X、Y、Z)に決定された回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトや光源を配置する。   The object space setting unit 110 represents display objects such as a character, a car, a building, a tree, a pillar, a wall, a course (road), and a map (terrain) based on the object data stored in the object data storage unit 172. Various kinds of objects (objects composed of primitives such as polygons, free-form surfaces or subdivision surfaces) and light sources indicating the direction, intensity and color of light travel are set in the object space. That is, the position and rotation angle (synonymous with direction and direction) of the object in the world coordinate system are determined, and the determined rotation angle (about the X, Y, and Z axes) is determined at the determined position (X, Y, Z). Rotate the object and light source.

移動・動作処理部112は、オブジェクト(キャラクタ、車、又は飛行機等)の移動・動作演算(移動・動作シミュレーション)を行う。すなわち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクトをオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させる処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(オブジェクトを構成する各パーツの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。   The movement / motion processing unit 112 performs a movement / motion calculation (movement / motion simulation) of an object (such as a character, a car, or an airplane). 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). ) Is performed. 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.

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

例えば仮想カメラによりオブジェクト(例えばキャラクタ、車)を後方から撮影する場合には、オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部112で得られたオブジェクトの位置、回転角度又は速度などの情報(所定の制御情報の一例)に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させたりする制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータ(所定の制御情報の一例)に基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。   For example, when an object (for example, a character or a car) is photographed from behind with a virtual camera, the position or rotation angle (the direction of the virtual camera) of the virtual camera is set so that the virtual camera follows changes in the position or rotation of the object. Control. In this case, the virtual camera can be controlled based on information (an example of predetermined control information) such as the position, rotation angle, or speed of the object obtained by the movement / motion processing unit 112. Alternatively, control may be performed such that the virtual camera is rotated at a predetermined rotation angle or moved along a predetermined movement path. In this case, the virtual camera is controlled based on virtual camera data (an example of predetermined control information) 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次元ゲーム画像を生成する場合には、まずオブジェクト(モデル)の各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含むオブジェクトデータ(モデルデータ)がオブジェクトデータ記憶部172Bから入力され、入力されたオブジェクトデータに含まれる頂点データに基づいて、頂点処理(頂点シェーダによるシェーディング)が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。頂点処理では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセル(画素)とが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)が行われる。ピクセル処理では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色をレンダリングターゲット(ピクセル単位で画像情報を記憶できるバッファ。メインメモリ172のフレームバッファ172B、ビデオメモリ174のワークバッファ174Cやフレームバッファ174D)に出力(描画)する。すなわち、ピクセル処理では、画像情報(色(色値、輝度値)、法線、α値等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として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 from the object data storage unit 172B, 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 (pixel). Subsequent to rasterization, pixel processing (shading or fragment processing by a pixel shader) for drawing pixels (fragments forming a display screen) constituting an image is performed. In pixel processing, according to a pixel processing program (pixel shader program, second shader program), various processes such as texture reading (texture mapping), color data setting / change, translucent composition, anti-aliasing, etc. are performed, and an image is processed. The final drawing color of the constituent pixels is determined, and the drawing color of the perspective-transformed object is rendered as a rendering target (buffer capable of storing image information in units of pixels. Frame buffer 172B of main memory 172, work buffer 174C of video memory 174 And output (draw) to the frame buffer 174D). That is, in pixel processing, per-pixel processing for setting or changing image information (color (color value, luminance value), normal, α value, etc.) in units of pixels is performed. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated. Note that when there are a plurality of virtual cameras (viewpoints), an image can be generated so that an image seen from each virtual camera can be displayed as a divided image on one screen.

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

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

ジオメトリ処理では、オブジェクトに対して、座標変換、クリッピング処理、透視投影変換、或いは光源計算等の処理が行われる。そして、ジオメトリ処理後(透視投影変換後)のオブジェクトデータ(オブジェクトの頂点の位置座標、テクスチャ座標、色データ(輝度データ)、法線ベクトル、或いはα値等)は、メインメモリ172のオブジェクトデータ記憶部172Aに保存される。   In the geometry processing, processing such as coordinate conversion, clipping processing, perspective projection conversion, or light source calculation is performed on the object. The 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 in the main memory 172. Stored in the part 172A.

テクスチャマッピングは、ビデオメモリ174のデカールテクスチャ記憶部174Aに記憶されるデカールテクスチャ(テクセル値)をオブジェクトにマッピングするための処理である。具体的には、オブジェクトの頂点に設定(付与)されるテクスチャ座標等を用いてビデオメモリ174のデカールテクスチャ記憶部174Aからテクスチャ(色(RGB)、α値などの表面プロパティ)を読み出す。そして、2次元の画像であるテクスチャをオブジェクトにマッピングする。この場合に、ピクセルとテクセルとを対応づける処理や、テクセルの補間としてバイリニア補間、トライリニア補間などを行う。   Texture mapping is a process for mapping a decal texture (texel value) stored in the decal texture storage unit 174A of the video memory 174 to an object. Specifically, the texture (surface properties such as color (RGB) and α value) is read from the decal texture storage unit 174A of the video memory 174 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, trilinear interpolation, etc. are performed as texel interpolation.

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

αブレンディングとしては、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)を行う。例えば通常αブレンディングの場合には下式(1)〜(3)の処理を行う。   As the α blending, a translucent synthesis process (usually α blending, addition α blending, subtraction α blending, or the like) based on the α value (A value) is performed. For example, in the case of normal α blending, the following processes (1) to (3) are performed.

RQ=(1−α)×R1+α×R2 (1)
GQ=(1−α)×G1+α×G2 (2)
BQ=(1−α)×B1+α×B2 (3)
また、加算αブレンディングの場合には下式(4)〜(6)の処理を行う。なお単純加算の場合はα=1として下式(4)〜(6)の処理を行う。
RQ = (1−α) × R1 + α × R2 (1)
GQ = (1−α) × G1 + α × G2 (2)
BQ = (1−α) × B1 + α × B2 (3)
In addition, in the case of addition α blending, the following expressions (4) to (6) are performed. In the case of simple addition, α = 1 and the following formulas (4) to (6) are performed.

RQ=R1+α×R2 (4)
GQ=G1+α×G2 (5)
BQ=B1+α×B2 (6)
また、減算αブレンディングの場合には下式(7)〜(9)の処理を行う。なお単純減算の場合はα=1として下式(7)〜(9)の処理を行う。
RQ = R1 + α × R2 (4)
GQ = G1 + α × G2 (5)
BQ = B1 + α × B2 (6)
In the case of subtractive α blending, the processing of the following equations (7) to (9) is performed. In the case of simple subtraction, α = 1 and the following formulas (7) to (9) are processed.

RQ=R1−α×R2 (7)
GQ=G1−α×G2 (8)
BQ=B1−α×B2 (9)
ここで、R1、G1、B1は、フレームバッファ172Bあるいはフレームバッファ174Dに既に描画されている画像(原画像)のRGB成分であり、R2、G2、B2は、フレームバッファ172Bあるいはフレームバッファ174Dに描画すべき画像のRGB成分である。また、RQ、GQ、BQは、αブレンディングにより得られる画像のRGB成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。
RQ = R1-α × R2 (7)
GQ = G1-α × G2 (8)
BQ = B1-α × B2 (9)
Here, R1, G1, and B1 are RGB components of an image (original image) already drawn in the frame buffer 172B or the frame buffer 174D, and R2, G2, and B2 are drawn in the frame buffer 172B or the frame buffer 174D. This is the RGB component of the image to be processed. RQ, GQ, and BQ 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, translucency (equivalent to transparency and opacity), bump information, and the like.

フィルタ処理部121は、仮想カメラから見たオブジェクト空間を描画した原画像に対してフィルタ画像を生成して、原画像とフィルタ画像とを合成するフィルタ処理を行う。本実施形態ではフィルタ処理部121は、第1の色処理部122、第2の色処理部124、中間画像生成部125、ぼかし画像生成部126、合成処理部128を含む。   The filter processing unit 121 generates a filter image for the original image in which the object space viewed from the virtual camera is drawn, and performs a filter process for synthesizing the original image and the filter image. In the present embodiment, the filter processing unit 121 includes a first color processing unit 122, a second color processing unit 124, an intermediate image generation unit 125, a blurred image generation unit 126, and a synthesis processing unit 128.

第1の色処理部122は、原画像を構成する各画素(ピクセル)のRGB成分(複数種類の色成分の一例)の輝度値(色値の一例)を変換したグレースケール値と、第1のしきい値との差分である第1の輝度値を求める。本実施形態では第1の色処理部122は、原画像を構成する各画素のグレースケール値から第1のしきい値を減算することによって、第1のしきい値よりも輝度値が高い画素について第1のしきい値を超える輝度値を抽出する。   The first color processing unit 122 converts a gray scale value obtained by converting a luminance value (an example of a color value) of an RGB component (an example of a plurality of types of color components) of each pixel (pixel) constituting the original image, A first luminance value that is a difference from the threshold value is obtained. In the present embodiment, the first color processing unit 122 subtracts the first threshold value from the grayscale value of each pixel that constitutes the original image, so that the pixel having a higher luminance value than the first threshold value. A luminance value exceeding a first threshold is extracted for.

第2の色処理部124は、原画像を構成する各画素の色を構成する所定の色成分の輝度値と、第2のしきい値との差分である第2の輝度値を求める。本実施形態では第2の色処理部124は、原画像を構成する各画素のR成分(赤成分、所定の色成分の一例)の輝度値から第2のしきい値を減算することによって、第2のしきい値よりもR成分の輝度値が高い画素について第2のしきい値を超えるR成分の輝度値を抽出する。   The second color processing unit 124 obtains a second luminance value that is a difference between the luminance value of a predetermined color component constituting the color of each pixel constituting the original image and the second threshold value. In the present embodiment, the second color processing unit 124 subtracts the second threshold value from the luminance value of the R component (red component, an example of a predetermined color component) of each pixel constituting the original image, For a pixel having an R component luminance value higher than the second threshold value, an R component luminance value exceeding the second threshold value is extracted.

ここで本実施形態では、原画像は、オブジェクト空間に配置された光源の色をオブジェクトに反映させるシェーディングが施された画像となっているが、本実施形態の光源は、光源の色を構成するRGB成分のうち、R成分の輝度値が最も高くなっている。そこで第2の色処理部124は、このような光源の色を構成するRGB成分のうち、最も輝度値が高いR成分を所定の色成分として、第2の色値を求めている。これにより第2の色処理部124は、原画像のうち光源の色が多く反映された画素の輝度値を抽出することができる。   Here, in this embodiment, the original image is an image subjected to shading that reflects the color of the light source arranged in the object space on the object, but the light source of this embodiment constitutes the color of the light source. Among RGB components, the luminance value of the R component is the highest. Therefore, the second color processing unit 124 obtains the second color value by setting the R component having the highest luminance value among the RGB components constituting the color of such a light source as a predetermined color component. Accordingly, the second color processing unit 124 can extract the luminance value of the pixel in which many light source colors are reflected from the original image.

なお、第1のしきい値と第2のしきい値とは、同一の値であってもよいし、異なる値であってもよく、光源の強さや、仮想カメラから見えるシーン(ビューボリューム内)に多く分布する色などの、画像における色成分の特性に応じて任意の値を設定することができる。また、所定の色成分は、G成分(緑成分)やB成分(青成分)のようにR成分以外の色成分としてもよく、これも画像における色成分の特性に応じて任意の色成分を所定の色成分として設定することができる。   The first threshold value and the second threshold value may be the same value or different values. The intensity of the light source and the scene (view volume in the view volume) seen from the virtual camera may be used. Any value can be set in accordance with the characteristics of the color components in the image, such as colors distributed in a large amount. The predetermined color component may be a color component other than the R component, such as a G component (green component) or a B component (blue component), and any color component may be selected depending on the characteristics of the color component in the image. It can be set as a predetermined color component.

中間画像生成部125は、上述のようにして求めた第1の輝度値と第2の輝度値とに基づいて中間画像(フィルタ画像の一例)を生成する。本実施形態では中間画像生成部125は、原画像を構成する各画素について、第1の輝度値をRGBそれぞれの色成分の輝度値とした第1の色(第1のカラーベクトル、グレー)と、第2の輝度値をR成分の輝度値とし0をその他の色成分(G成分およびB成分)の輝度値とした第2の色(第2のカラーベクトル、赤)とを加算して加算色を求める。そして中間画像生成部125は、各画素の加算色を累乗したり、各画素の加算色に所定の係数を乗算することにより、各画素の加算色を伸長しながら描画して、加算色が伸長された中間画像を生成する。   The intermediate image generation unit 125 generates an intermediate image (an example of a filter image) based on the first luminance value and the second luminance value obtained as described above. In the present embodiment, the intermediate image generation unit 125 uses, for each pixel constituting the original image, a first color (first color vector, gray) having the first luminance value as the luminance value of each color component of RGB. , Adding and adding the second color (second color vector, red) with the second luminance value as the R component luminance value and 0 as the luminance value of the other color components (G component and B component) Find the color. Then, the intermediate image generation unit 125 draws the added color of each pixel by extending the added color of each pixel or multiplying the added color of each pixel by a predetermined coefficient, thereby expanding the added color. Generated intermediate image is generated.

ぼかし画像生成部126は、中間画像に対して、画素の色を周辺画素の色と平滑化するバイリニア補間を利用したぼかし処理や、画素の色を周辺画素の色と入れ替えるぼかし処理を施しながら各画素の色を描画して、ぼかし画像(フィルタ画像の一例)を生成する。   The blurred image generation unit 126 performs a blurring process using bilinear interpolation that smoothes the pixel color with the peripheral pixel color and a blurring process that replaces the pixel color with the peripheral pixel color, while performing the blurring process on the intermediate image. The color of the pixel is drawn to generate a blurred image (an example of a filter image).

合成処理部128は、原画像とぼかし画像とを合成する。本実施形態では合成処理部128は、原画像の各画素の輝度値に対してぼかし画像の各画素の輝度値を加算する。   The composition processing unit 128 synthesizes the original image and the blurred image. In the present embodiment, the composition processing unit 128 adds the luminance value of each pixel of the blurred image to the luminance value of each pixel of the original image.

音生成部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.本実施形態の手法
次に本実施形態の手法について図面を用いて説明する。本実施形態では、画像における眩しさや輝き(グレア)を表現するために、原画像を構成する各画素のうち明るい画素の輝度値が抽出されて中間画像が生成され、この中間画像に基づいて原画像が加工されることにより、原画像の明るい画素とその周囲の画素とが更に明るくされた画像が生成される。特に本実施形態では、原画像を構成する各画素のRGB成分の輝度値を変換したグレースケール値と第1のしきい値との差分である第1の輝度値と、原画像を構成する各画素のR成分の輝度値と第2のしきい値との差分である第2の輝度値とに基づいて、中間画像が生成される。これにより本実施形態では、画像における色成分の特性に合わせて中間画像が生成されるようにしている。
2. Next, the method of this embodiment will be described with reference to the drawings. In the present embodiment, in order to express glare and glare in the image, luminance values of bright pixels are extracted from the pixels constituting the original image to generate an intermediate image, and the original image is generated based on the intermediate image. By processing the image, an image in which bright pixels of the original image and surrounding pixels are further brightened is generated. In particular, in the present embodiment, the first luminance value, which is the difference between the gray scale value obtained by converting the luminance value of the RGB component of each pixel constituting the original image, and the first threshold value, and each constituting the original image An intermediate image is generated based on the luminance value of the R component of the pixel and the second luminance value that is the difference between the second threshold value. Thereby, in the present embodiment, an intermediate image is generated in accordance with the characteristics of the color components in the image.

図2は、本実施形態に特徴的な中間画像の生成手法を説明するための図である。図2のa1に示すように本実施形態では、まず、第1ワークバッファに描画された原画像の第1番目の画素P1のRGB成分それぞれの輝度値から、その画素のグレースケール値AがA=0.3R+0.6G+0.1Bのようにして求められる。そして、求められたグレースケール値Aからしきい値として輝度値200(第1のしきい値の一例)が減算されて第1の輝度値C1が求められる。すなわち本実施形態では、原画像を構成する各画素のグレースケール値Aがその画素の明るさを示す基準として用いられ、このグレースケール値Aがしきい値よりも高い場合に、しきい値を超える第1の輝度値C1が抽出される。   FIG. 2 is a diagram for explaining an intermediate image generation method characteristic of the present embodiment. As shown by a1 in FIG. 2, in this embodiment, first, the grayscale value A of the pixel is calculated from the luminance values of the RGB components of the first pixel P1 of the original image drawn in the first work buffer. = 0.3R + 0.6G + 0.1B. Then, a luminance value 200 (an example of a first threshold value) is subtracted from the obtained gray scale value A as a threshold value to obtain a first luminance value C1. That is, in this embodiment, the gray scale value A of each pixel constituting the original image is used as a reference indicating the brightness of the pixel, and when this gray scale value A is higher than the threshold value, the threshold value is set. The first luminance value C1 that exceeds is extracted.

ここで本実施形態では、このグレースケール値Aは、RGBそれぞれの人の目による見え方を考慮した重み付けにより、A=0.3R+0.6G+0.1Bとして算出されている。すなわちRGBそれぞれの輝度値が同一であっても、青(B)は最も暗く見えるためB成分の影響度が弱く(0.1)、赤(R)は青(B)の次に暗く見えるためR成分の影響度が次に弱く(0.3)、緑(G)は最も明るく見えるためG成分の影響度が最も強く(0.6)なるようにグレースケール値が算出される。従って本実施形態では、人の目に見える明るさの見え方に沿って、原画像を構成する画素のうち明るい画素の輝度値が抽出されるようにすることができる。   Here, in the present embodiment, the gray scale value A is calculated as A = 0.3R + 0.6G + 0.1B by weighting in consideration of how each RGB color is viewed by human eyes. That is, even if the luminance values of RGB are the same, blue (B) looks darkest, so the influence of the B component is weak (0.1), and red (R) appears darker than blue (B). Since the influence level of the R component is the next weakest (0.3) and green (G) looks brightest, the gray scale value is calculated so that the influence level of the G component is the strongest (0.6). Therefore, in the present embodiment, it is possible to extract the luminance value of the bright pixel among the pixels constituting the original image along the way the brightness is visible to the human eye.

また本実施形態では、オブジェクト空間に光源が配置されることにより、光源からの光が反射している領域に対応する画素については、光の反射率に応じて輝度値が高くされる処理が行われている。本実施形態ではかかる光源として、R成分の輝度値が最も高く設定された赤色ないし黄色の光源が配置されているため、光源からの光が反射している領域に対応する画素については、その領域の光の反射率に応じてR成分の輝度値が高くされる処理が行われる。従って本実施形態では、グレアを表現する画像効果が反映されるべき画素は、R成分の輝度値が高くなっている場合が多い。   Further, in the present embodiment, by arranging the light source in the object space, a process for increasing the luminance value according to the reflectance of the light is performed on the pixel corresponding to the region where the light from the light source is reflected. ing. In the present embodiment, a red or yellow light source having the highest luminance value of the R component is disposed as such a light source. Therefore, for a pixel corresponding to a region where light from the light source is reflected, the region A process for increasing the luminance value of the R component according to the reflectance of the light is performed. Therefore, in the present embodiment, the luminance value of the R component is often high for the pixel to which the image effect expressing the glare is to be reflected.

しかし本実施形態では、画素の明るさを示す基準としてグレースケール値Aが用いられているため、R成分の輝度値が高い画素であっても、その画素のグレースケール値AはR成分の重み付けが小さいために(0.3)輝度値が低くなってしまい、暗い画素として扱われてしまう場合がある。例えば、R成分の輝度値が200以上の画素であっても、図2のa1においてグレースケール値Aが200以下となることにより、しきい値を超える第1の輝度値C1が抽出されない(第1の輝度値C1=0となる)場合がある。   However, in this embodiment, since the gray scale value A is used as a reference indicating the brightness of the pixel, even if the luminance value of the R component is high, the gray scale value A of the pixel is weighted by the R component. Is small (0.3), the luminance value becomes low, and may be treated as a dark pixel. For example, even if the luminance value of the R component is 200 or more, the first luminance value C1 exceeding the threshold is not extracted because the gray scale value A is 200 or less in a1 of FIG. 1 luminance value C1 = 0).

ここで、このような画素に関しても第1の輝度値C1が抽出されるようにしきい値を低くすると、グレアを表現する画像効果が反映されるべき画素でなくとも、しきい値を超える第1の輝度値C1が抽出されてしまう場合がある。特に、G成分の輝度値が高い画素はグレースケール値Aの重み付けが大きく(0.6)グレースケール値Aの輝度値が比較的高くなるため、グレアを表現する画像効果が反映されるべき画素でなくとも、しきい値を超える第1の輝度値C1が抽出されてしまう。   Here, if the threshold value is lowered so that the first luminance value C1 is extracted even for such a pixel, the first exceeding the threshold value is not a pixel that should reflect the image effect expressing the glare. Luminance value C1 may be extracted. Particularly, a pixel having a high luminance value of the G component has a large weighting of the gray scale value A (0.6), and the luminance value of the gray scale value A is relatively high. If not, the first luminance value C1 exceeding the threshold value is extracted.

そこで本実施形態では、図2のa1に示すように第1の輝度値C1を抽出するとともに、図2のa2に示すように、原画像の第1番目の画素P1のR成分の輝度値からしきい値として輝度値200(第2のしきい値の一例、本実施形態では第1のしきい値と第2のしきい値とが同一)が減算されて、第2の輝度値C2が求められる。すなわち本実施形態では、原画像を構成する各画素のR成分の輝度値もその画素の明るさを示す基準として用いられ、このR成分の輝度値がしきい値よりも高い場合に、しきい値を超える第2の輝度値C2が抽出される。   Therefore, in the present embodiment, the first luminance value C1 is extracted as indicated by a1 in FIG. 2, and the luminance value of the R component of the first pixel P1 of the original image is extracted as indicated by a2 in FIG. A luminance value 200 (an example of a second threshold value, which is the same as the first threshold value and the second threshold value in this embodiment) is subtracted as a threshold value to obtain a second luminance value C2. Desired. That is, in this embodiment, the luminance value of the R component of each pixel constituting the original image is also used as a reference indicating the brightness of the pixel, and the threshold value is obtained when the luminance value of the R component is higher than the threshold value. A second luminance value C2 exceeding the value is extracted.

これにより本実施形態では、画素の明るさを示す基準としてグレースケール値Aが用いられることにより、人の目に見える明るさの見え方に沿って原画像を構成する画素のうち明るい画素の輝度値が抽出されるようにしつつ、画素の明るさを示す基準としてR成分の輝度値も用いられることにより、しきい値を低くせずに、光源からの光が反射している領域に対応する画素の輝度値が抽出されるようにすることができる。すなわち本実施形態では、光源の色に応じて、グレアを表現する画像効果が反映されるべき画素の輝度値が適切に抽出されるようにすることができる。   Thus, in this embodiment, the grayscale value A is used as a reference indicating the brightness of the pixel, so that the brightness of the bright pixel among the pixels constituting the original image along the way the brightness is visible to the human eye. While the value is extracted, the luminance value of the R component is also used as a reference indicating the brightness of the pixel, so that it corresponds to the region where the light from the light source is reflected without lowering the threshold value. The luminance value of the pixel can be extracted. That is, in the present embodiment, the luminance value of the pixel that should reflect the image effect expressing the glare can be appropriately extracted according to the color of the light source.

そして図2のa3に示すように、グレースケール値Aから輝度値200を減算した結果が0〜1.0の値にクランプされて第1の輝度値C1が求められる。すると、図2のa4に示すように、輝度値C1がその画素のRGB成分それぞれの輝度値に乗算されて、第1の色情報(C1×R,C1×G,C1×B)に変換される。また図2のa5に示すように、R成分の輝度値から輝度値200を減算した結果が0〜1.0の値にクランプされて第2の輝度値C2が求められる。   Then, as indicated by a3 in FIG. 2, the result of subtracting the luminance value 200 from the gray scale value A is clamped to a value of 0 to 1.0, and the first luminance value C1 is obtained. Then, as shown by a4 in FIG. 2, the luminance value C1 is multiplied by the luminance value of each of the RGB components of the pixel to be converted into the first color information (C1 × R, C1 × G, C1 × B). The Further, as indicated by a5 in FIG. 2, the result of subtracting the luminance value 200 from the luminance value of the R component is clamped to a value of 0 to 1.0 to obtain the second luminance value C2.

そして図2のa6に示すように、第1の色情報のR成分であるC1×Rと、第2の輝度値C2とが比較され、第1の色情報のR成分であるC1×Rの方が大きい場合には(Y)、図2のa7に示すように第1の色情報(C1×R,C1×G,C1×B)が選択され、第2の輝度値C2の方が大きい場合には(N)、図2のa8に示すように第1の色情報のR成分が第2の輝度値C2とされた第2の色情報(C1×R,C1×G,C1×B)が選択される。すなわち、第1の色情報のR成分であるC1×Rと、第2の輝度値C2のいずれか大きい方の値がR成分の輝度値として選択される。   Then, as shown by a6 in FIG. 2, the C1 × R which is the R component of the first color information is compared with the second luminance value C2, and the C1 × R which is the R component of the first color information is compared. If it is larger (Y), the first color information (C1 × R, C1 × G, C1 × B) is selected as shown by a7 in FIG. 2, and the second luminance value C2 is larger. In this case (N), the second color information (C1 × R, C1 × G, C1 × B) in which the R component of the first color information is set to the second luminance value C2 as indicated by a8 in FIG. ) Is selected. That is, the larger one of C1 × R which is the R component of the first color information and the second luminance value C2 is selected as the luminance value of the R component.

そして、第1の色情報(C1×R,C1×G,C1×B)が選択された場合には、図2のa9に示すように、第1の色情報(C1×R,C1×G,C1×B)の各色成分の輝度値が所定の指数xにより累乗され、輝度値の階調差が明確となるように伸長される。そして図2のa11に示すように、伸長後の第1の色情報が第2ワークバッファの第1の画素PP1に出力される。一方、第2の色情報(C1×R,C1×G,C1×B)が選択された場合には、図2のa10に示すように、第2の色情報(C1×R,C1×G,C1×B)の各色成分の輝度値が所定の指数xにより累乗され、輝度値の階調差が明確となるように伸長される。そして図2のa11に示すように、伸長後の第2の色情報が第2ワークバッファの第1の画素PP1に出力される。   When the first color information (C1 × R, C1 × G, C1 × B) is selected, the first color information (C1 × R, C1 × G) is displayed as indicated by a9 in FIG. , C1 × B), the luminance value of each color component is raised to a power of a predetermined index x, and is expanded so that the gradation difference of the luminance value becomes clear. Then, as indicated by a11 in FIG. 2, the first color information after expansion is output to the first pixel PP1 of the second work buffer. On the other hand, when the second color information (C1 × R, C1 × G, C1 × B) is selected, the second color information (C1 × R, C1 × G) is displayed as indicated by a10 in FIG. , C1 × B), the luminance value of each color component is raised to a power of a predetermined index x, and is expanded so that the gradation difference of the luminance value becomes clear. Then, as indicated by a11 in FIG. 2, the decompressed second color information is output to the first pixel PP1 of the second work buffer.

そしてa1〜a11の処理が原画像の全てのピクセルについて行われ、伸長後の色情報による中間画像が描画される。   Then, the processing of a1 to a11 is performed for all the pixels of the original image, and an intermediate image based on the decompressed color information is drawn.

こうして本実施形態では、原画像に加算されると、原画像を構成する画素のうち明るい画素をより明るくし、赤い画素をより赤くするような中間画像が生成されるようにすることができる。   In this way, in this embodiment, when added to the original image, an intermediate image can be generated in which bright pixels among the pixels constituting the original image are brightened and red pixels are reddish.

図3は、中間画像をぼかしたぼかし画像の生成手法を説明するための図である。図3のb1に示すように、本実施形態では、上述のようにして第2ワークバッファに描画された中間画像に対して、バイリニアフィルタ方式を利用して中間画像の各ピクセルの色を平滑化するぼかし処理が行われ、第3ワークバッファにぼかし画像が生成される。   FIG. 3 is a diagram for explaining a generation method of a blurred image obtained by blurring an intermediate image. As shown in b1 of FIG. 3, in this embodiment, the color of each pixel of the intermediate image is smoothed using the bilinear filter method for the intermediate image drawn in the second work buffer as described above. The blurring process is performed, and a blurred image is generated in the third work buffer.

ぼかし処理としては、画像の縮小・拡大を繰り返すことによりバイリニアフィルタ方式で各ピクセルの色が周辺ピクセルの色を取り込んで平滑化(補間)されることにより画像をぼかす手法や、テクスチャ座標をずらしながらバイリニアフィルタ方式で描画を行うことで各ピクセルの色を周辺ピクセルの色と平滑化させて画像をぼかす手法などがある。ぼかし処理の手法は、上記のものには限られず、種々の手法を採用することができる。   As blurring processing, by repeatedly reducing and enlarging the image, the color of each pixel is smoothed (interpolated) by taking in the color of the surrounding pixels using the bilinear filter method, and while shifting the texture coordinates There is a technique of blurring an image by smoothing the color of each pixel with the color of surrounding pixels by drawing with the bilinear filter method. The blurring processing method is not limited to the above, and various methods can be employed.

図4は、ぼかし画像と原画像とを合成する手法を説明するための図である。図4のc1に示すように、本実施形態では、上述のようにして第3ワークバッファに生成されたぼかし画像と第1ワークバッファに生成された原画像とが、各画素の輝度値が加算されることにより合成される。こうして本実施形態では、原画像のうち明るい領域がより明るくされ、赤い領域がより赤くされることにより、R成分の輝度値が最も高く設定された赤色ないし黄色の光源が配置されている場合でも、グレアを表現する画像効果が反映されるべき領域に適切に光源の色に応じたグレアを表現する画像効果が反映されるようにすることができる。   FIG. 4 is a diagram for explaining a method of synthesizing the blurred image and the original image. As shown in c1 of FIG. 4, in the present embodiment, the brightness value of each pixel is added to the blurred image generated in the third work buffer as described above and the original image generated in the first work buffer. Is synthesized. Thus, in the present embodiment, the bright area of the original image is made brighter and the red area is made red, so that even when a red or yellow light source set with the highest luminance value of the R component is arranged, It is possible to appropriately reflect the image effect expressing the glare according to the color of the light source in the region where the image effect expressing the glare is to be reflected.

3.本実施形態の処理
次に、本実施形態の詳細な処理例についてフローチャートを用いて説明する。図5は、フレーム毎に行われる処理の概略を示すフローチャートである。図5に示すように、本実施形態では、まず、シェーダ処理が行われ(ステップS10)、オブジェクト空間内に配置された仮想カメラから見えるシーン(ビューボリューム内)に存在するオブジェクトがスクリーンに透視投影され、透視投影されたオブジェクトがフレームバッファに描画されて原画像が生成される。すると、原画像にグレアを表現する画像効果を反映させるフィルタ処理が行われる(ステップS12)。
3. Processing of this embodiment Next, a detailed processing example of this embodiment will be described using a flowchart. FIG. 5 is a flowchart showing an outline of processing performed for each frame. As shown in FIG. 5, in this embodiment, first, shader processing is performed (step S10), and an object existing in a scene (in a view volume) seen from a virtual camera arranged in the object space is projected onto the screen. Then, the perspectively projected object is drawn in the frame buffer to generate an original image. Then, a filter process for reflecting an image effect expressing glare in the original image is performed (step S12).

図6は、図5のステップS12で行われるフィルタ処理の詳細を示すフローチャートである。フィルタ処理では、まず、中間画像を生成する中間画像生成処理が行われ(ステップS20)、中間画像に基づいてぼかし画像を生成するぼかし画像生成処理が行われ(ステップS22)、原画像とぼかし画像とを加算合成するぼかし画像合成処理が行われる(ステップS24)。   FIG. 6 is a flowchart showing details of the filter processing performed in step S12 of FIG. In the filter process, first, an intermediate image generation process for generating an intermediate image is performed (step S20), and a blurred image generation process for generating a blurred image based on the intermediate image is performed (step S22). A blurred image composition process is performed to add and compose (step S24).

図7は、図6のステップS20で行われる中間画像生成処理の詳細を示すフローチャートである。中間画像生成処理では、まず、原画像の第1番目の画素P1について第1の輝度値C1を求める第1の色処理が行われ(ステップS30)、同一の画素P1について第2の輝度値C2を求める第2の色処理が行われる(ステップS32)。すると第1の色情報のR成分であるC1×Rと、第2の輝度値C2とが比較され、第1の色情報のR成分であるC1×Rの方が大きい場合には、第1の色情報(C1×R,C1×G,C1×B)が選択され、第2の輝度値C2の方が大きい場合には、第1の色情報のR成分が第2の輝度値C2とされた第2の色情報(C1×R,C1×G,C1×B)が選択される(ステップS34)。すると、選択結果の色情報を伸長する伸長処理が行われ(ステップS36)、伸長結果の色情報を第2ワークバッファに出力する(ステップS38)。そして、原画像を構成する全ての画素について色情報を出力していない場合には(ステップS40でN)、ステップS30からステップS40までの処理を繰り返し、原画像を構成する全ての画素について色情報を出力した場合には(ステップS40でY)、中間画像生成処理を終了する。   FIG. 7 is a flowchart showing details of the intermediate image generation process performed in step S20 of FIG. In the intermediate image generation processing, first, first color processing for obtaining a first luminance value C1 for the first pixel P1 of the original image is performed (step S30), and the second luminance value C2 for the same pixel P1. The second color processing for obtaining is performed (step S32). Then, C1 × R, which is the R component of the first color information, is compared with the second luminance value C2, and if C1 × R, which is the R component of the first color information, is larger, the first Color information (C1 × R, C1 × G, C1 × B) is selected, and the second luminance value C2 is larger, the R component of the first color information becomes the second luminance value C2. The second color information (C1 × R, C1 × G, C1 × B) thus selected is selected (step S34). Then, decompression processing for decompressing the color information of the selection result is performed (step S36), and the color information of the decompression result is output to the second work buffer (step S38). If the color information is not output for all the pixels constituting the original image (N in step S40), the processing from step S30 to step S40 is repeated to obtain the color information for all the pixels constituting the original image. Is output (Y in step S40), the intermediate image generation process is terminated.

図8は、図7のステップS30で行われる第1の色処理の詳細を示すフローチャートである。第1の色処理では、まず、処理対象とする画素のRGBの各色成分の輝度値に基づいてグレースケール値Aを求める(ステップS50)。そして、グレースケール値Aからしきい値を減算して第1の輝度値C1を求める(ステップS52)。そして、第1の輝度値C1をRGBそれぞれの色成分にかけた第1の色情報を求める(ステップS54)。   FIG. 8 is a flowchart showing details of the first color processing performed in step S30 of FIG. In the first color processing, first, a gray scale value A is obtained based on the luminance values of the RGB color components of the pixel to be processed (step S50). Then, the first luminance value C1 is obtained by subtracting the threshold value from the gray scale value A (step S52). Then, first color information obtained by applying the first luminance value C1 to the RGB color components is obtained (step S54).

図9は、図7のステップS32で行われる第2の色処理の詳細を示すフローチャートである。第2の色処理では、まず、処理対象とする画素のR成分の輝度値からしきい値を減算して第2の輝度値C2を求める(ステップS60)。そして、第2の輝度値C2をR成分の輝度値とする(ステップS62)。   FIG. 9 is a flowchart showing details of the second color processing performed in step S32 of FIG. In the second color processing, first, the second luminance value C2 is obtained by subtracting the threshold value from the luminance value of the R component of the pixel to be processed (step S60). Then, the second luminance value C2 is set as the luminance value of the R component (step S62).

4.ハードウェア構成例
本実施形態の画像生成システムを実現するハードウェアの構成の一例について図10を用いて説明する。なお図10では、主要な構成のみを図示しており、図10に示されていないハードウェア(メモリコントローラやスピーカなど)を必要に応じて設けることができる。
4). Hardware Configuration Example An example of a hardware configuration for realizing the image generation system according to the present embodiment will be described with reference to FIG. Note that FIG. 10 illustrates only the main configuration, and hardware (such as a memory controller and a speaker) that is not illustrated in FIG. 10 can be provided as necessary.

メインプロセッサ10は、光ディスク72(CD、DVD、ブルーレイディスク等の情報記憶媒体)に格納されたプログラム、通信インターフェース80を介して転送されたプログラム、或いはハードディスク60に格納されたプログラムなどに基づき動作し、内部バスb4を介してアクセス可能なメインメモリ40を作業領域(ワーク領域)としてゲーム処理、画像処理、音処理などの種々の処理を実行する。   The main processor 10 operates based on a program stored on the optical disc 72 (information storage medium such as CD, DVD, Blu-ray disc), a program transferred via the communication interface 80, a program stored on the hard disk 60, or the like. The main memory 40 accessible via the internal bus b4 is used as a work area (work area) to execute various processes such as game processing, image processing, and sound processing.

メインプロセッサ10は、1基のプロセッサ12と複数のベクトルプロセッサ14で構成される。プロセッサ12は、OSの実行、ハードウェアリソースの管理、ゲーム処理、ベクトルプロセッサ14の動作管理などの種々の処理を実行する。またベクトルプロセッサ14は、ベクトル演算に特化したプロセッサであり、主にジオメトリ処理、画像データや音データのコーデック処理などの処理を実行する。   The main processor 10 includes a single processor 12 and a plurality of vector processors 14. The processor 12 executes various processes such as OS execution, hardware resource management, game processing, and operation management of the vector processor 14. The vector processor 14 is a processor specialized for vector operations, and mainly executes processing such as geometry processing and codec processing of image data and sound data.

描画プロセッサ20は、内部バスb1(第1の内部バス)を介してビデオメモリ30にアクセス可能に形成されている。また描画プロセッサ20は、描画プロセッサ20とメインプロセッサ10を接続する内部バスb2(第2の内部バス)と、メインプロセッサ10内部のバスb3と、メインプロセッサ10とメインメモリ40を接続する内部バスb4を介してメインメモリ40にアクセス可能に形成されている。すなわち描画プロセッサ20はビデオメモリ30と、メインメモリ40とをレンダリングターゲットとして利用することができる。   The drawing processor 20 is configured to be accessible to the video memory 30 via the internal bus b1 (first internal bus). The drawing processor 20 also includes an internal bus b2 (second internal bus) that connects the drawing processor 20 and the main processor 10, a bus b3 inside the main processor 10, and an internal bus b4 that connects the main processor 10 and the main memory 40. The main memory 40 is configured to be accessible via the. That is, the drawing processor 20 can use the video memory 30 and the main memory 40 as rendering targets.

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

また描画プロセッサ20は、ジオメトリ処理後のオブジェクト(ポリゴンや曲面などのプリミティブ面で構成されるオブジェクト)の画像のレンダリング処理を高速に実行するものである。マルチパスレンダリング処理の際には、描画プロセッサ20は、描画データ(頂点データや他のパラメータ)等に基づいて、Zバッファ34などを利用した陰面消去を行いながら、画像をビデオメモリ30又はメインメモリ40の一方のメモリにレンダリングする。そしてビデオメモリ30又はメインメモリ40の一方のメモリに記憶された画像に基づき他方のメモリに新たな画像をレンダリングする処理を必要なレンダリングパスの回数だけ行う。描画プロセッサ20は、上記マルチパスレンダリング処理として、グレアフィルタ処理、モーションブラー処理、被写界深度処理、フォグ処理等のフィルタ処理を行うことができる。   The drawing processor 20 executes a rendering process of an image of an object after geometry processing (an object composed of a primitive surface such as a polygon or a curved surface) at high speed. In the multi-pass rendering process, the drawing processor 20 performs the hidden surface removal using the Z buffer 34 or the like based on the drawing data (vertex data and other parameters) and the like, and displays the image in the video memory 30 or the main memory. Render to one of 40 memories. Then, a process of rendering a new image in the other memory based on the image stored in one of the video memory 30 and the main memory 40 is performed as many times as necessary. The drawing processor 20 can perform filter processing such as glare filter processing, motion blur processing, depth of field processing, and fog processing as the multi-pass rendering processing.

そして、最後のレンダリングパスで画像がビデオメモリ30に設けられたフレームバッファ32にレンダリングされると、その画像をディスプレイ50に出力する。また最後のレンダリングパスで画像がメインメモリ40にレンダリングされた場合には当該画像をフレームバッファ32にコピー(書き込み)した上でディスプレイ50に出力する。   When the image is rendered in the frame buffer 32 provided in the video memory 30 in the final rendering pass, the image is output to the display 50. When an image is rendered in the main memory 40 in the final rendering pass, the image is copied (written) to the frame buffer 32 and output to the display 50.

ハードディスク60にはシステムプログラム、セーブデータ、個人データなどが格納される。   The hard disk 60 stores system programs, save data, personal data, and the like.

光学ドライブ70は、プログラム、画像データ、或いは音データなどが格納される光ディスク72(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。   The optical drive 70 drives an optical disc 72 (information storage medium) that stores programs, image data, sound data, and the like, and enables access to these programs and data.

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

上述したように本実施形態の画像生成システム(コンピュータ)は、内部バスb1(第1の内部バス)を介してビデオメモリ30にアクセス可能であるとともに、内部バスb2(第2の内部バス)を介してメインメモリ40にアクセス可能である描画プロセッサ20を含んで構成されており、描画プロセッサ20をフィルタ処理部121として機能させるシェーダプログラムが光ディスク72(情報記憶媒体の一例)あるいはハードディスク60(情報記憶媒体の一例)に格納されている。   As described above, the image generation system (computer) according to the present embodiment can access the video memory 30 via the internal bus b1 (first internal bus) and also uses the internal bus b2 (second internal bus). A shader program that allows the drawing processor 20 to function as the filter processing unit 121 is an optical disk 72 (an example of an information storage medium) or a hard disk 60 (information storage medium). Stored in an example medium).

そして本実施形態の画像生成システムでは、上記シェーダプログラムによってフィルタ処理部121として機能する描画プロセッサ20が、原画像が生成されたビデオメモリ30又はメインメモリ40の一方のメモリとは異なる他方のメモリにフィルタ画像を生成し、他方のメモリに生成されたフィルタ画像を一方のメモリに生成された原画像に加算合成する処理を行う。   In the image generation system of the present embodiment, the rendering processor 20 functioning as the filter processing unit 121 by the shader program is stored in the other memory different from the one memory of the video memory 30 or the main memory 40 in which the original image is generated. A filter image is generated, and the filter image generated in the other memory is added and combined with the original image generated in one memory.

このようにすれば、描画プロセッサ20が画像データをメモリ(ビデオメモリ30又はメインメモリ40)に書き込んだり、描画プロセッサ20が画像データをメモリ(ビデオメモリ30又はメインメモリ40)から読み出したりする際における内部バスb1,b2に対する負荷を分散することができるため、内部バスb1,b2の帯域の利用効率を高めることができる。特に本実施形態の画像生成システムでは、描画プロセッサ20が、Zバッファ34を用いた隠面消去処理において、膨大なデータを格納するZバッファ34からZ値を読み込んだり、Z値を書き込んだりすることによってビデオメモリ30にアクセスする内部バスb1を頻繁に使用するため、原画像を生成するバッファとフィルタ画像を生成するバッファとを分散することによって内部バスb1の帯域使用率の高さがボトルネックとなって処理が遅延することを防止することができる。   In this way, the drawing processor 20 writes image data into the memory (video memory 30 or main memory 40), or the drawing processor 20 reads image data from the memory (video memory 30 or main memory 40). Since the load on the internal buses b1 and b2 can be distributed, the use efficiency of the bandwidth of the internal buses b1 and b2 can be increased. In particular, in the image generation system of this embodiment, the rendering processor 20 reads a Z value from the Z buffer 34 that stores a large amount of data or writes a Z value in the hidden surface removal process using the Z buffer 34. Since the internal bus b1 that accesses the video memory 30 is frequently used, the bandwidth of the internal bus b1 becomes a bottleneck by distributing the buffer that generates the original image and the buffer that generates the filter image. Thus, it is possible to prevent the processing from being delayed.

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

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

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

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

また上記実施形態では、グレースケール値AがA=0.3R+0.6G+0.1Bのようにして求められる例を挙げて説明したが、グレースケール値AがA=(R+G+B)/3のようにして求められるようにしてもよい。   In the above embodiment, the gray scale value A is described as an example in which A = 0.3R + 0.6G + 0.1B is obtained, but the gray scale value A is set to A = (R + G + B) / 3. It may be required.

また上記実施形態では、画素毎に第1の色情報と第2の色情報とが求められ、加算、伸長処理が行われることにより、中間画像を構成する各画素の色情報が画素毎に第2ワークバッファに出力される例を挙げて説明したが、原画像の各画素の色情報が第1の色情報に変換された第1の色情報画像と、原画像の各画素の色情報が第2の色情報に変換された第2の色情報画像とが生成され、第1の色情報画像と第2の色情報画像とが加算されて伸長されることにより中間画像が生成されるようにしてもよい。   Further, in the above embodiment, the first color information and the second color information are obtained for each pixel, and the addition and expansion processing is performed, so that the color information of each pixel constituting the intermediate image is changed for each pixel. As described above with reference to an example of output to two work buffers, the first color information image obtained by converting the color information of each pixel of the original image into the first color information and the color information of each pixel of the original image The second color information image converted into the second color information is generated, and the first color information image and the second color information image are added and expanded to generate an intermediate image. It may be.

図11は、このような例の中間画像の生成手法を説明するための図である。この実施形態では、図11のd1に示すように、まず、第1ワークバッファに描画された原画像の各画素のRGB成分それぞれの輝度値が、A=0.3R+0.6G+0.1Bのようにして求められるグレースケール値Aに変換されたグレースケール値A画像が生成される。すると図11のd2に示すように、グレースケール値A画像から、各画素の各色成分の輝度値が200とされた単色の第1のしきい値画像が減算され、各画素の各色成分の輝度値が第1の輝度値C1とされることにより各画素の色情報が第1の色情報とされた第1の色情報画像が生成される。   FIG. 11 is a diagram for explaining an intermediate image generation method of such an example. In this embodiment, as indicated by d1 in FIG. 11, first, the luminance value of each RGB component of each pixel of the original image drawn in the first work buffer is set to A = 0.3R + 0.6G + 0.1B. Thus, a gray scale value A image converted into the gray scale value A obtained in this way is generated. Then, as shown in d2 of FIG. 11, the monochrome first threshold image in which the luminance value of each color component of each pixel is 200 is subtracted from the grayscale value A image, and the luminance of each color component of each pixel is subtracted. By setting the value to the first luminance value C1, a first color information image in which the color information of each pixel is the first color information is generated.

それとともに、図11のd3に示すように、第1ワークバッファに描画された原画像が、原画像の各画素のR成分の輝度値がR成分の輝度値とされ、0がG成分とB成分の輝度値とされたR成分画像が生成される。すると図11のd4に示すように、R成分画像から、各画素のR成分の輝度値が200とされG成分とB成分の輝度値が0とされた赤色の第2のしきい値画像が減算され、各画素のR成分の輝度値が第2の輝度値C2とされG成分とB成分の輝度値が0とされることにより各画素の色情報が第2の色情報とされた第2の色情報画像が生成される。   At the same time, as indicated by d3 in FIG. 11, the original image drawn in the first work buffer has the R component luminance value of each pixel of the original image as the R component luminance value, and 0 is the G component and B component. An R component image having the luminance value of the component is generated. Then, as shown by d4 in FIG. 11, a red second threshold image in which the luminance value of the R component of each pixel is set to 200 and the luminance values of the G component and the B component are set to 0 is obtained from the R component image. By subtracting, the luminance value of the R component of each pixel is set to the second luminance value C2, and the luminance values of the G component and B component are set to 0, whereby the color information of each pixel is set to the second color information. Two color information images are generated.

すると図11のd5に示すように、第1の色情報画像と第2の色情報画像とが加算合成されて加算色情報画像が生成され、図11のd6に示すように、加算色情報画像の各画素の各色成分の輝度値が所定の指数xにより累乗されて伸長されることにより、伸長後の加算色情報による中間画像が生成される。   Then, as shown in d5 of FIG. 11, the first color information image and the second color information image are added and synthesized to generate an added color information image. As shown in d6 of FIG. 11, the added color information image The luminance value of each color component of each pixel is raised to a power of a predetermined index x and expanded to generate an intermediate image based on the added color information after expansion.

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 本実施形態の中間画像を生成する手法の説明図。Explanatory drawing of the method of producing | generating the intermediate image of this embodiment. 本実施形態のぼかし画像を生成する手法の説明図。Explanatory drawing of the method of producing | generating the blurred image of this embodiment. 本実施形態のフレーム画像を生成する手法の説明図。Explanatory drawing of the method of producing | generating the frame image of this embodiment. 本実施形態の処理の流れを示すフローチャート。The flowchart which shows the flow of the process of this embodiment. 本実施形態の処理の流れを示すフローチャート。The flowchart which shows the flow of the process of this embodiment. 本実施形態の処理の流れを示すフローチャート。The flowchart which shows the flow of the process of this embodiment. 本実施形態の処理の流れを示すフローチャート。The flowchart which shows the flow of the process of this embodiment. 本実施形態の処理の流れを示すフローチャート。The flowchart which shows the flow of the process of this embodiment. 本実施形態の画像生成システムのハードウェア構成例。2 is a hardware configuration example of an image generation system according to the present embodiment. 変形実施形態の中間画像を生成する手法の説明図。Explanatory drawing of the method of producing | generating the intermediate image of deformation | transformation embodiment.

符号の説明Explanation of symbols

100 処理部、110 オブジェクト空間設定部、112 移動・動作処理部、
114 仮想カメラ制御部、120 描画部、121 フィルタ処理部、
122 第1の色処理部、124 第2の色処理部、125 中間画像生成部、
126 ぼかし画像生成部、128 合成処理部
130 音生成部、160 操作部、170 記憶部、172 メインメモリ、
172A オブジェクトデータ記憶部、172B フレームバッファ、
174 ビデオメモリ、174A デカールテクスチャ記憶部、174B Zバッファ、
174C ワークバッファ、174D フレームバッファ、
180 情報記憶媒体、190 表示部、192 音出力部、
194 携帯型情報記憶装置、196 通信部
100 processing unit, 110 object space setting unit, 112 movement / motion processing unit,
114 virtual camera control unit, 120 drawing unit, 121 filter processing unit,
122 first color processing unit, 124 second color processing unit, 125 intermediate image generation unit,
126 blur image generation unit, 128 synthesis processing unit 130 sound generation unit, 160 operation unit, 170 storage unit, 172 main memory,
172A object data storage unit, 172B frame buffer,
174 video memory, 174A decal texture storage, 174B Z buffer,
174C work buffer, 174D frame buffer,
180 information storage medium, 190 display unit, 192 sound output unit,
194 Portable information storage device, 196 communication unit

Claims (5)

複数種類の色成分の色値によって画素の色が指定される原画像を加工するためのプログラムであって、
前記原画像を構成する各画素の前記複数種類の色成分の色値を変換したグレースケール値と第1のしきい値との差分である第1の色値を求める第1の色処理部と、
前記原画像を構成する各画素の色を構成する所定の色成分の色値と第2のしきい値との差分である第2の色値を求める第2の色処理部と、
前記第1の色値と前記第2の色値とに基づいてぼかし画像を生成するぼかし画像生成部と、
前記原画像と前記ぼかし画像とを合成する合成処理部としてコンピュータを機能させることを特徴とするプログラム。
A program for processing an original image in which pixel colors are specified by color values of a plurality of types of color components,
A first color processing unit that obtains a first color value that is a difference between a gray scale value obtained by converting color values of the plurality of types of color components of each pixel constituting the original image and a first threshold value; ,
A second color processing unit for obtaining a second color value that is a difference between a color value of a predetermined color component constituting the color of each pixel constituting the original image and a second threshold value;
A blurred image generating unit that generates a blurred image based on the first color value and the second color value;
A program that causes a computer to function as a synthesis processing unit that synthesizes the original image and the blurred image.
請求項1において、
前記合成処理部が、
前記原画像の各画素の色値に対して前記ぼかし画像の各画素の色値を加算することを特徴とするプログラム。
In claim 1,
The synthesis processing unit
A program that adds the color value of each pixel of the blurred image to the color value of each pixel of the original image.
請求項1または2において、
前記原画像は、オブジェクト空間に配置された光源の色をオブジェクトに反映させるシェーディングを施した画像であって、
前記第2の色処理部が、
前記光源の色を構成する複数種類の色成分のうち最も色値が高い色成分を前記所定の色成分として、前記第2の色値を求めることを特徴とするプログラム。
In claim 1 or 2,
The original image is an image subjected to shading that reflects on the object the color of the light source arranged in the object space,
The second color processing unit is
A program for obtaining the second color value by using, as the predetermined color component, a color component having the highest color value among a plurality of types of color components constituting the color of the light source.
コンピュータにより読み取り可能な情報記憶媒体であって、請求項1〜3のいずれかに記載されたプログラムを記憶することを特徴とする情報記憶媒体。   An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 3 is stored. 複数種類の色成分の色値によって画素の色が指定される原画像を加工するための画像生成システムであって、
前記原画像を構成する各画素の前記複数種類の色成分の色値を変換したグレースケール値と第1のしきい値との差分である第1の色値を求める第1の色処理部と、
前記原画像を構成する各画素の色を構成する所定の色成分の色値と第2のしきい値との差分である第2の色値を求める第2の色処理部と、
前記第1の色値と前記第2の色値とに基づいてぼかし画像を生成するぼかし画像生成部と、
前記原画像と前記ぼかし画像とを合成する合成処理部とを含むことを特徴とする画像生成システム。
An image generation system for processing an original image in which pixel colors are designated by color values of a plurality of types of color components,
A first color processing unit that obtains a first color value that is a difference between a gray scale value obtained by converting color values of the plurality of types of color components of each pixel constituting the original image and a first threshold value; ,
A second color processing unit for obtaining a second color value that is a difference between a color value of a predetermined color component constituting the color of each pixel constituting the original image and a second threshold value;
A blurred image generating unit that generates a blurred image based on the first color value and the second color value;
An image generation system comprising: a synthesis processing unit that synthesizes the original image and the blurred image.
JP2008194225A 2008-07-28 2008-07-28 Image generation system, program and information storage medium Withdrawn JP2010033301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008194225A JP2010033301A (en) 2008-07-28 2008-07-28 Image generation system, program and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008194225A JP2010033301A (en) 2008-07-28 2008-07-28 Image generation system, program and information storage medium

Publications (1)

Publication Number Publication Date
JP2010033301A true JP2010033301A (en) 2010-02-12

Family

ID=41737702

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008194225A Withdrawn JP2010033301A (en) 2008-07-28 2008-07-28 Image generation system, program and information storage medium

Country Status (1)

Country Link
JP (1) JP2010033301A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020010331A (en) * 2018-07-03 2020-01-16 株式会社ユビタス Method for improving image quality

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020010331A (en) * 2018-07-03 2020-01-16 株式会社ユビタス Method for improving image quality
JP7448178B2 (en) 2018-07-03 2024-03-12 株式会社ユビタス How to improve image quality

Similar Documents

Publication Publication Date Title
JP2006318389A (en) Program, information storage medium, and image generation system
JP4804120B2 (en) Program, information storage medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP2006195882A (en) Program, information storage medium and image generation system
JP4651527B2 (en) Program, information storage medium, and image generation system
JP2004334661A (en) Image generating system, program, and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP4827250B2 (en) Program, information storage medium, and image generation system
JP2001143099A (en) Image-forming system and information storage medium
JP2006011539A (en) Program, information storage medium, and image generating system
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4632855B2 (en) Program, information storage medium, and image generation system
JP2008077408A (en) Program, information storage medium, and image generation system
JP4704615B2 (en) Image generation system, program, and information storage medium
JP2010033288A (en) Image generation system, program and information storage medium
JP2010033299A (en) Image generation system, program and information storage medium
US7724255B2 (en) Program, information storage medium, and image generation system
JP2010033302A (en) Image generation system, program and information storage medium
JP2010033301A (en) Image generation system, program and information storage medium
JP2008077406A (en) Image generation system, program, and information storage medium
JP2006277488A (en) Program, information storage medium and image generation system
JP2010033295A (en) Image generation system, program and information storage medium
JP2010033253A (en) Program, information storage medium, and image generation system
JP2006252423A (en) Program, information storage medium and image generation system
JP4521811B2 (en) Program, information storage medium, and image generation system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111004