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

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

Info

Publication number
JP2006252425A
JP2006252425A JP2005071060A JP2005071060A JP2006252425A JP 2006252425 A JP2006252425 A JP 2006252425A JP 2005071060 A JP2005071060 A JP 2005071060A JP 2005071060 A JP2005071060 A JP 2005071060A JP 2006252425 A JP2006252425 A JP 2006252425A
Authority
JP
Japan
Prior art keywords
color
image
blending
value
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
JP2005071060A
Other languages
Japanese (ja)
Inventor
Shigeru Kikko
繁 橘高
Akinari Kaneko
晃也 金子
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 JP2005071060A priority Critical patent/JP2006252425A/en
Publication of JP2006252425A publication Critical patent/JP2006252425A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, an information storage medium and an image generation system for generating a display image by adding effects to an original image without damaging the texture of an original image. <P>SOLUTION: An original image Pic(Org) and an effect image Pic(Eff) corresponding to the original image Pic(Org) are plotted for a visual field image where an object space is viewed from a point of view. The respective pixels of the effect image Pic(Eff) are plotted by color distribution with the given reference color as the center of distribution. As for the pixels brighter than the reference color in the effect image Pic(Eff), color information corresponding to a difference between the color of the pixel and the reference color is added to the color information of the corresponding pixel of the original image Pic(Org) according to an α value by addition α blending. As for the pixel darker than the reference color in the effect image Pic(Eff), the color information corresponding to the difference between the color of the pixel and the reference color is subtracted from the color information of the corresponding pixel of the original image Pic(Org) according to the α value by subtraction α blending. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

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

従来より、仮想的な3次元空間であるオブジェクト空間内において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。ロールプレイングゲーム(RPG)を楽しむことができる画像生成システムを例にとれば、プレーヤは、自身の分身であるキャラクタ(オブジェクト)を操作してオブジェクト空間内のマップ上で移動させ、敵キャラクタと対戦したり、他のキャラクタと対話したり、様々な町を町を訪れたりすることでゲームを楽しむ。   Conventionally, an image generation system (game system) that generates an image that can be seen from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known. Popular. Taking an image generation system capable of enjoying a role-playing game (RPG) as an example, a player operates a character (object), which is his or her own character, and moves it on a map in the object space to play against an enemy character. Play games by interacting with other characters or visiting various towns.

さて、このような画像生成システムでは、陰影(シェード)や影(シャドウ)などのエフェクトを施すことにより画像に立体感を与える表現手法が用いられている。例えば、視界画像に通常のテクスチャマッピングを施した元画像と元画像に対応する陰影表現用のエフェクト画像とを合成(ブレンディング)して立体感を与える手法がある。このような画像を合成する表現手法では、元画像とエフェクト画像とを単純に合成しただけでは、エフェクト画像の色の影響が元画像の全体に強く表れてしまい、元画像の質感を損なってしまう。特に、スクリーントーンと呼ばれる漫画やアニメーション等で用いられているパターン(例えば、メッシュ、グリッド、ハッチングなど。)を表すパターン画像をエフェクト表現用のテクスチャとして用いる場合には、その傾向が強くなる。   Now, in such an image generation system, an expression technique that gives a stereoscopic effect to an image by applying an effect such as a shade or a shadow is used. For example, there is a method of providing a stereoscopic effect by synthesizing (blending) an original image obtained by performing normal texture mapping on a view field image and an effect image for shadow expression corresponding to the original image. In such an expression method for combining images, simply combining the original image and the effect image causes the effect of the color of the effect image to appear strongly in the entire original image, thereby impairing the texture of the original image. . In particular, when a pattern image representing a pattern (for example, mesh, grid, hatching, etc.) used in a comic or animation called a screen tone is used as a texture for effect expression, the tendency becomes strong.

本発明は、上記事情に鑑みてなされたものであり、その目的は、元画像の質感を損なわずに、元画像にエフェクトを施した画像を生成することができるプログラム、情報記憶媒体及び画像生成システムを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a program, an information storage medium, and image generation capable of generating an image obtained by applying an effect to the original image without impairing the texture of the original image. To provide a system.

本発明は、画像を生成するための画像生成システムであって、オブジェクト空間を所与の視点から見た視界画像について元画像と該元画像に対応するエフェクト画像とを描画する描画部と、前記元画像と前記エフェクト画像とをαブレンディングするαブレンディング部と、を含み、前記エフェクト画像の各ピクセルは、所与の基準色を分布中心とした色分布で描画されており、前記αブレンディング部が、前記エフェクト画像における前記基準色より明るい色のピクセルについては、該ピクセルの色と前記基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報に所与のα値に応じて加算される加算αブレンディングと、前記エフェクト画像における前記基準色より暗い色のピクセルについては、該ピクセルの色と基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報から所与のα値に応じて減算される減算αブレンディングと、を行う画像生成システムに関係する。また、本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また、本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。   The present invention is an image generation system for generating an image, wherein a rendering unit that renders an original image and an effect image corresponding to the original image with respect to a view field image obtained by viewing the object space from a given viewpoint; An alpha blending unit that alpha blends the original image and the effect image, and each pixel of the effect image is drawn with a color distribution centered on a given reference color, and the α blending unit For a pixel having a lighter color than the reference color in the effect image, color information corresponding to the difference between the color of the pixel and the reference color corresponds to a given α value in the color information of the corresponding pixel in the original image. The addition α blending added for each pixel and the difference between the color of the pixel and the reference color for pixels darker than the reference color in the effect image Is related to an image generation system that performs subtraction α blending in which color information corresponding to is subtracted from color information of corresponding pixels of the original image in accordance with a given α value. The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to an information storage medium that can be read by a computer and stores (records) a program that causes the computer to function as each of the above-described units.

本発明では、元画像とエフェクト画像とを合成する際に、エフェクト画像を構成するピクセルの色の基準色に対する明暗に応じて加算αブレンディングと減算αブレンディングとを選択的に行って元画像に対して画像エフェクトを付加する。普通の加算αブレンディング、あるいは減算αブレンディングのどちらか一方だけだと全体が明るくなったり、暗くなったりするだけで偏ったフィルタリング効果しか得られないが、本発明によれば、一枚の元画像に対して基準色との差分に応じて明るくなる部分と暗くなる部分が生じるため、画像合成によるフィルタリング効果が一方向に偏らずに元画像の質感を損なわずして画像エフェクトを付加することができるようになる。   In the present invention, when the original image and the effect image are combined, the addition α blending and the subtraction α blending are selectively performed according to the lightness and darkness of the pixel colors constituting the effect image with respect to the reference color. To add image effects. If only one of normal addition α blending or subtraction α blending is used, only a biased filtering effect can be obtained simply by making the whole brighter or darker, but according to the present invention, one original image is obtained. In contrast, a brighter portion and a darker portion are generated depending on the difference from the reference color, so that an image effect can be added without impairing the texture of the original image without biasing the filtering effect by image synthesis in one direction. become able to.

また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記αブレンディング部が、前記エフェクト画像のピクセルの色情報から前記基準色で描画された基準色画像の対応ピクセルの色情報を減算する第1の差分抽出ブレンディングを行って、第1の色差分画像を生成し、前記基準色画像のピクセルの色情報から前記エフェクト画像の対応ピクセルの色情報を減算する第2の差分抽出ブレンディングを行って、第2の色差分画像を生成し、前記元画像のピクセルの色情報に前記第1の色差分画像の対応ピクセルの色情報を加算することにより前記加算αブレンディングを行い、前記元画像のピクセルの色情報から前記第2の色差分画像の対応ピクセルの色情報を減算することにより前記減算αブレンディングを行うようにしてもよい。このようにすれば、第1の差分抽出αブレンディングでは、エフェクト画像のピクセルのうち基準色より明るい色のピクセルの色と基準色との差分のみを抽出することができ、第2の差分抽出αブレンディングでは、エフェクト画像のピクセルのうち基準色より暗い色のピクセルの色と基準色との差分のみを抽出することができ、元画像に加算すべき色情報と、元画像から減算すべき色情報とをエフェクト画像から個別に抽出することができるようになる。   In the image generation system, the program, and the information storage medium of the present invention, the α blending unit subtracts the color information of the corresponding pixel of the reference color image drawn with the reference color from the color information of the pixel of the effect image. The first difference extraction blending is performed to generate a first color difference image, and the second difference extraction blending is performed to subtract the color information of the corresponding pixel of the effect image from the color information of the pixel of the reference color image. Generating a second color difference image, adding the color information of the corresponding pixel of the first color difference image to the color information of the pixel of the original image, and performing the addition α blending to obtain the pixel of the original image The subtraction α blending may be performed by subtracting the color information of the corresponding pixel of the second color difference image from the color information of the second color difference image. . In this way, in the first difference extraction α blending, it is possible to extract only the difference between the color of the pixels of the effect image that are brighter than the reference color and the reference color, and the second difference extraction α Blending can extract only the difference between the color of the pixels of the effect image that are darker than the reference color and the reference color. Color information to be added to the original image and color information to be subtracted from the original image Can be individually extracted from the effect image.

また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記基準色を構成する各色成分の輝度値が、同じ値に設定されていてもよく、また前記基準色を構成する各色成分の輝度値が、元画像のピクセルの各色成分について設定可能な輝度値の最小値と最大値との中間値に設定されていてもよい。例えば、前記基準色は、グレー(中間色)に設定されていてもよい。   In the image generation system, the program, and the information storage medium of the present invention, the luminance value of each color component constituting the reference color may be set to the same value, and the luminance value of each color component constituting the reference color May be set to an intermediate value between the minimum value and the maximum value of the luminance value that can be set for each color component of the pixel of the original image. For example, the reference color may be set to gray (intermediate color).

また本発明の画像生成システムでは、前記元画像をグレースケール画像に変換するグレースケール変換部と、前記元画像から変換されたグレースケール画像の各ピクセルの色情報に基づいて前記加算αブレンディング用のα値及び前記減算αブレンディング用のα値を設定するα値設定部と、を含むようにしてもよい。また本発明のプログラム及び情報記憶媒体では、上記グレースケール変換部及びα値設定部としてコンピュータを機能させてもよい。このようにすれば、元画像がグレースケール変換されて、元画像の暗いところと明るいところに応じたα値が設定される。このため、元画像の暗いところほど、画像エフェクトの効果がはっきりと出るように元画像とエフェクト画像とを合成して、例えば、水彩調の絵画に特有の色にじみなどの特性を持った陰影表現を行うことができる。   In the image generation system of the present invention, a grayscale conversion unit that converts the original image into a grayscale image, and the addition α blending based on color information of each pixel of the grayscale image converted from the original image. and an α value setting unit for setting an α value and an α value for the subtractive α blending. In the program and information storage medium of the present invention, the computer may function as the gray scale conversion unit and the α value setting unit. In this way, the original image is subjected to grayscale conversion, and α values corresponding to the dark and bright portions of the original image are set. For this reason, the original image and the effect image are synthesized so that the darker the original image, the more clearly the effect of the image effect, and for example, a shadow expression with characteristics such as a color blur characteristic of watercolor paintings. It can be performed.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   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 (player character operated by the player), and the function is realized by a lever, a button, a steering, a microphone, a touch panel display, or a casing. it can. The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by a RAM (VRAM) or the like.

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

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

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

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

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

処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、スクリーン座標取得部116、テクスチャ座標演算部118、画像生成部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 screen coordinate acquisition unit 116, a texture coordinate calculation unit 118, an image generation unit 120, and a sound generation unit 130. Note that some of these may be omitted.

オブジェクト空間設定部110は、キャラクタ、建物、球場、車、樹木、柱、壁、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブ面で構成されるパーツオブジェクト、あるいは複数のパーツオブジェクトで構成されるモデルオブジェクトなど)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。   The object space setting unit 110 includes various objects (primitive surfaces such as polygons, free-form surfaces, and subdivision surfaces) representing display objects such as characters, buildings, stadiums, cars, trees, columns, walls, and maps (terrain). A part object or a model object composed of a plurality of part objects) 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.

移動・動作処理部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, a simulation process for sequentially obtaining object movement information (position, rotation angle, speed, or acceleration) and motion information (position or rotation angle of each part object) every frame (1/60 second). I do. 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, a process for controlling the position (X, Y, Z) or the rotation angle (rotation angle about the X, Y, Z axes) of the virtual camera (process for controlling the viewpoint position and the line-of-sight direction) is performed.

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

スクリーン座標取得部116は、オブジェクトにエフェクト表現用テクスチャ(陰影テクスチャ、パターン画像)をマッピングするためのテクスチャ座標(U,V座標)に変換されるスクリーン座標(X,Y座標)を取得する処理を行う。具体的には、ジオメトリ処理された(スクリーン座標系への透視投影により座標変換された)オブジェクトの各頂点のスクリーン座標を、頂点スクリーン座標として取得する。   The screen coordinate acquisition unit 116 acquires a screen coordinate (X, Y coordinate) that is converted into a texture coordinate (U, V coordinate) for mapping an effect expression texture (shadow texture, pattern image) to an object. Do. Specifically, the screen coordinates of each vertex of the object subjected to geometry processing (coordinate-transformed by perspective projection onto the screen coordinate system) are acquired as vertex screen coordinates.

テクスチャ座標演算部118は、オブジェクトにマッピングされるテクスチャのテクスチャ座標を求める処理を行う。具体的には、スクリーン座標取得部116において取得された頂点スクリーン座標と基準点スクリーン座標とについて差分処理を行って、エフェクト表現用テクスチャのマッピング対象となるオブジェクトの各頂点についてテクスチャ座標を求める。基準点スクリーン座標は、オブジェクト(モデルオブジェクトあるいはパーツオブジェクト)ごとに設定された基準点のスクリーン座標である。オブジェクトを構成する頂点の一つを基準点として設定してもよい。   The texture coordinate calculation unit 118 performs processing for obtaining the texture coordinates of the texture mapped to the object. Specifically, the difference processing is performed on the vertex screen coordinates and the reference point screen coordinates acquired by the screen coordinate acquisition unit 116, and the texture coordinates are obtained for each vertex of the object to which the effect expression texture is to be mapped. The reference point screen coordinates are the screen coordinates of the reference point set for each object (model object or part object). One vertex constituting the object may be set as a reference point.

またテクスチャ座標演算部118は、オブジェクトの各頂点と前記基準点とのカメラ座標系(視点座標系)またはスクリーン座標系における奥行き方向の距離差に応じてテクスチャ座標を補正する処理を行う。具体的には、基準点から奥行き方向の距離が近い頂点ほど補正量(補正度合い)が小さくなり、基準点から奥行き方向の距離が遠い頂点ほど補正量が大きくなるように、テクスチャ座標について補正演算を行う。この場合、頂点と基準点との間の奥行き方向の距離差を考慮するためにパースペクティブ除算値を用いることができ、例えばオブジェクトの各頂点のパースペクティブ除算値と基準点のパースペクティブ除算値との比に基づいてテクスチャ座標を補正することができる。   In addition, the texture coordinate calculation unit 118 performs a process of correcting the texture coordinates in accordance with the distance difference in the depth direction in the camera coordinate system (viewpoint coordinate system) or the screen coordinate system between each vertex of the object and the reference point. Specifically, the correction amount (correction degree) is smaller for vertices that are closer to the depth in the depth direction from the reference point, and the correction calculation is performed on the texture coordinates so that the correction amount is larger for vertices that are farther in the depth direction from the reference point. I do. In this case, the perspective division value can be used to take into account the distance in the depth direction between the vertex and the reference point.For example, the ratio between the perspective division value of each vertex of the object and the perspective division value of the reference point Based on this, texture coordinates can be corrected.

またテクスチャ座標演算部118は、ランダムまたは周期的に変化する動き補正値(変数)を、テクスチャ座標に対して加算処理してエフェクト表現用テクスチャをマッピングするためのテクスチャ座標を変化させる処理を行う。   Further, the texture coordinate calculation unit 118 performs a process of changing the texture coordinates for mapping the effect expression texture by adding a motion correction value (variable) that changes randomly or periodically to the texture coordinates.

またテクスチャ座標演算部118は、テクスチャ座標に対して、オブジェクトの各頂点についての法線ベクトル情報(ノーマルベクトル情報)の加算または減算処理をする形状補正処理を行う。例えばカメラ座標系又はスクリーン座標系でのオブジェクトの各頂点の法線ベクトル(面の向きを表す法線ベクトル。オブジェクトの頂点に設定された法線ベクトル)の座標成分(X,Y座標成分)を絶対値化(例えば、値域(−1.0〜1.0)が値域(0.0〜1.0)になる)して、その絶対値に対して所与の補正係数を乗算処理したものを法線ベクトル情報とすることができる。なお、スクリーン座標系での法線ベクトルの座標成分を用いる場合には、透視変換後の法線ベクトルの長さを単位ベクトル化することが望ましい。このように法線ベクトルの座標成分を絶対値化しておけば、補正係数の符号の正負によって加算あるいは減算処理を行わせることができ、形状補正の度合いを簡便に制御することができるようになる。   The texture coordinate calculation unit 118 performs shape correction processing for adding or subtracting normal vector information (normal vector information) for each vertex of the object to the texture coordinates. For example, the coordinate component (X, Y coordinate component) of the normal vector of each vertex of the object in the camera coordinate system or the screen coordinate system (normal vector representing the orientation of the surface; the normal vector set to the vertex of the object) An absolute value (for example, a value range (-1.0 to 1.0) becomes a value range (0.0 to 1.0)), and the absolute value is multiplied by a given correction coefficient. Can be used as normal vector information. When using the coordinate component of the normal vector in the screen coordinate system, it is desirable to convert the length of the normal vector after perspective transformation into a unit vector. If the coordinate component of the normal vector is converted into an absolute value in this way, addition or subtraction processing can be performed depending on the sign of the correction coefficient, and the degree of shape correction can be easily controlled. .

画像生成部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まず、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、或いは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、描画データ(プリミティブ面の頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)が作成される。そして、この描画データ(オブジェクトデータ)に基づいて、透視変換後(ジオメトリ処理後)のオブジェクト(1又は複数プリミティブ面)を描画バッファ174(フレームバッファ、中間バッファ等。ピクセル単位で画像情報を記憶できるバッファ。VRAM)に描画する。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として1画面に表示できるように生成する。   The image generation unit 120 performs drawing processing based on the results of various processes (game processing) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. In the case of generating a so-called three-dimensional game image, first, geometric processing such as coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, or perspective transformation is performed, and drawing data ( The position coordinates, texture coordinates, color data, normal vector, α value, etc.) of the vertexes of the primitive surface are created. Then, based on the drawing data (object data), an object (one or a plurality of primitive surfaces) after perspective transformation (after geometry processing) can be stored in a drawing buffer 174 (frame buffer, intermediate buffer, etc.) and image information can be stored in units of pixels. Draw in the buffer (VRAM). Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated. When there are a plurality of virtual cameras (viewpoints), an image that can be seen from each virtual camera is generated as a divided image so that it can be displayed on one screen.

画像生成部120は、ジオメトリ処理部121、テクスチャマッピング部122、グレースケール変換部123、α値設定部124、αブレンディング部125、描画部126を含む。   The image generation unit 120 includes a geometry processing unit 121, a texture mapping unit 122, a gray scale conversion unit 123, an α value setting unit 124, an α blending unit 125, and a drawing unit 126.

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

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

グレースケール変換部123は、元画像をグレースケール画像に変換する処理を行う。例えば、ルックアップテーブル記憶部176に記憶されたカラールックアップテーブル(CLUT;Color Look Up Table)を用いた画像情報の変換処理により元画像をグレースケール画像に変換することができる。具体的には、各色に対するグレースケール変換色とインデックス番号とを対応づけたカラールックアップテーブルを用意し、インデックス番号に基づいて各ピクセルの色を変換する。各ピクセルの色(R,G,B)は、下式(1)に従って、グレースケール変換される。   The gray scale conversion unit 123 performs processing for converting the original image into a gray scale image. For example, the original image can be converted into a grayscale image by a conversion process of image information using a color look-up table (CLUT) stored in the look-up table storage unit 176. Specifically, a color look-up table in which gray scale conversion colors and index numbers are associated with each color is prepared, and the color of each pixel is converted based on the index number. The color (R, G, B) of each pixel is grayscale converted according to the following equation (1).

g=0.299*R+0.587*G+0.114*B (1)
(「g」はグレースケール画像(g,g,g)を構成するピクセルの輝度値)
α値設定部124は、グレースケール変換部123で変換された元画像のグレースケール画像の色情報に基づき、元画像とエフェクト画像とをαブレンディングするためのα値を設定する処理を行う。具体的には、元画像から変換されたグレースケール画像を構成する各ピクセルの輝度値についてガンマ補正(広義には、べき乗補正)を行った値をα値として設定することができる。ガンマ補正では、例えば、Gamma2.2補正(値を2.2乗する補正)をすることができる。またα値は、元画像から変換されたグレースケール画像において輝度値の高い部分については、α値が小さくなり、輝度値の低い部分については、α値が大きくなるようにα値を設定することができる。すなわち、元画像のうち明るい部分についてはα値が小さくなり、元画像のうち暗い部分についてはα値が大きくなるようにα値を設定することができる。このようにすれば、エフェクト表現用テクスチャを用いて陰影表現を行う場合などに、元画像の暗い部分ほどパターンが強調されて、水彩調の絵画に特有の自然な色のにじみを表現することができる。α値は、例えば、Gamma2.2式に基づいて補正した場合には、下式(2)に従って設定することができる。なお、「g」は、先に述べたグレースケール画像を構成するピクセルの輝度値である。また輝度値は、0〜1の範囲で指定するものと仮定する。すなわち0が輝度値の最小値であり、1が輝度値の最大値である。そして「1−g」は、輝度値の最大値“1”からグレースケール画像のピクセルの輝度値“g”を減算した値である。以下においても同様である。
g = 0.299 * R + 0.587 * G + 0.114 * B (1)
(“G” is the luminance value of the pixels constituting the grayscale image (g, g, g))
The α value setting unit 124 performs processing for setting an α value for α blending of the original image and the effect image based on the color information of the gray scale image of the original image converted by the gray scale conversion unit 123. Specifically, a value obtained by performing gamma correction (power correction in a broad sense) on the luminance value of each pixel constituting the grayscale image converted from the original image can be set as the α value. In the gamma correction, for example, Gamma2.2 correction (correction to raise the value to the power of 2.2) can be performed. In addition, the α value is set so that the α value is small for a portion with a high luminance value in the grayscale image converted from the original image, and the α value is large for a portion with a low luminance value. Can do. That is, it is possible to set the α value so that the α value is small for a bright portion of the original image and the α value is large for a dark portion of the original image. In this way, when performing shadow expression using textures for effect expression, the darker part of the original image emphasizes the pattern and expresses the natural color blur unique to watercolor paintings. it can. For example, when the α value is corrected based on the Gamma 2.2 equation, the α value can be set according to the following equation (2). Note that “g” is a luminance value of the pixels constituting the gray scale image described above. The luminance value is assumed to be specified in the range of 0-1. That is, 0 is the minimum luminance value, and 1 is the maximum luminance value. “1-g” is a value obtained by subtracting the luminance value “g” of the pixel of the grayscale image from the maximum luminance value “1”. The same applies to the following.

α=(1−g)^2.2 (2)
αブレンディング部125はα値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)を行う。例えば通常αブレンディングの場合には下式(3)〜(5)の処理を行う。
α = (1-g) ^ 2.2 (2)
The α blending unit 125 performs translucent synthesis processing (normal α blending, addition α blending, subtraction α blending, or the like) based on the α value (A value). For example, in the case of normal α blending, the following processes (3) to (5) are performed.

=(1−α)×R+α×R (3)
=(1−α)×G+α×G (4)
=(1−α)×B+α×B (5)
また、加算αブレンディングの場合には下式(6)〜(8)の処理を行う。
R Q = (1−α) × R 1 + α × R 2 (3)
G Q = (1−α) × G 1 + α × G 2 (4)
B Q = (1−α) × B 1 + α × B 2 (5)
In addition, in the case of addition α blending, the following formulas (6) to (8) are processed.

=R+α×R (6)
=G+α×G (7)
=B+α×B (8)
また、減算αブレンディングの場合には下式(9)〜(11)の処理を行う。
R Q = R 1 + α × R 2 (6)
G Q = G 1 + α × G 2 (7)
B Q = B 1 + α × B 2 (8)
In the case of subtractive α blending, the processing of the following equations (9) to (11) is performed.

=R−α×R (9)
=G−α×G (10)
=B−α×B (11)
ここで、R、G、Bは、描画バッファ174に既に描画されている画像(元画像)のRGB成分であり、R、G、Bは、描画バッファ174に描画すべき画像(エフェクト画像)のRGB成分である。また、R、G、Bは、αブレンディングにより得られる画像のRGB成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。
R Q = R 1 −α × R 2 (9)
G Q = G 1 −α × G 2 (10)
B Q = B 1 −α × B 2 (11)
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. It is an RGB component of an image (effect 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, translucency (equivalent to transparency and opacity), bump information, and the like.

またαブレンディング部125は、通常のテクスチャがマッピングされた画像(元画像)とエフェクト表現用テクスチャがマッピングされた画像(エフェクト画像)とをαブレンディングする処理を行う。   The α blending unit 125 performs a process of α blending an image (original image) mapped with a normal texture and an image (effect image) mapped with an effect expression texture.

具体的には、まずエフェクト画像を構成するピクセルの輝度値から所定の色を基準色として、基準色で作成された基準色画像を構成するピクセルの輝度値を減算する第1の差分抽出ブレンディングをした第1の色差分画像と、基準色画像を構成するピクセルの輝度値からエフェクト画像を構成するピクセルの輝度値を減算する第2の差分抽出ブレンディングをした第2の色差分画像とを作成する。そして、元画像と第1の色差分画像とを加算αブレンディングし、加算αブレンディング後の画像から第2の色差分画像を減算αブレンディングすることにより、元画像とエフェクト画像とを合成する。すなわち、エフェクト画像において、基準色より明るい色のピクセルについては色情報が加算され、基準色より暗い色のピクセルについては色情報が減算されることになる。これにより、エフェクト表現用テクスチャのパターンの影響が元画像の各色成分に強く出過ぎず、手書き調の絵の質感を表現することができる。またこのようにすれば、オブジェクト毎の光源計算を厳密に行わなくても光源計算が行われているような質感を元画像に付与することができる。   Specifically, the first difference extraction blending for subtracting the luminance value of the pixel constituting the reference color image created with the reference color from the luminance value of the pixel constituting the effect image as a reference color is first performed. The first color difference image and the second color difference image subjected to the second difference extraction blending for subtracting the luminance value of the pixel constituting the effect image from the luminance value of the pixel constituting the reference color image are created. . Then, the original image and the first color difference image are subjected to addition α blending, and the second color difference image is subtracted α blending from the image after the addition α blending, thereby synthesizing the original image and the effect image. That is, in the effect image, color information is added to pixels that are lighter than the reference color, and color information is subtracted from pixels that are darker than the reference color. Thereby, the effect of the texture pattern for effect expression is not excessively exerted on each color component of the original image, and the texture of the handwritten picture can be expressed. Further, in this way, it is possible to give the original image a texture as if the light source calculation is performed without strictly performing the light source calculation for each object.

この場合においては、基準色として、各色成分の輝度値が等しくかつ、輝度値が設定しうる最大値と最小値との中間の値となる中間色(例えばグレー。(R,G,B)=(0.5,0.5,0.5))を用いることができる。このような中間色を基準色として設定しておけば、明るい部分と暗い部分とについてバランスよく差分を抽出することができる。   In this case, as a reference color, an intermediate color (for example, gray. (R, G, B) = (for example, gray) where the luminance value of each color component is equal and the luminance value is an intermediate value between the maximum and minimum values that can be set. 0.5, 0.5, 0.5)) can be used. If such an intermediate color is set as a reference color, a difference can be extracted in a balanced manner between a bright part and a dark part.

描画部126は、オブジェクトの描画処理を行う。具体的には、ジオメトリ処理により作成された描画データ(プリミティブ面データ)に基づいて、透視変換後(スクリーン座標変換後)のオブジェクト(1又は複数のプリミティブ面)を描画バッファ174(フレームバッファ、ワークバッファ(中間バッファ)等)に描画する。これにより、オブジェクト空間内において仮想カメラから見える画像を生成する。描画部126は、オブジェクトに対して通常のテクスチャをマッピングした元画像をフレームバッファに描画し、元画像に対して画像エフェクトを付加するために、オブジェクトに対してエフェクト表現用テクスチャをマッピングしたエフェクト画像をワークバッファ等のフレームバッファとは異なる記憶バッファに描画する。なおエフェクト画像は、エフェクト画像を描画するための専用の記憶バッファに描画してもよい。   The drawing unit 126 performs an object drawing process. Specifically, based on drawing data (primitive surface data) created by geometry processing, an object (one or a plurality of primitive surfaces) after perspective transformation (after screen coordinate transformation) is drawn into a drawing buffer 174 (frame buffer, work piece). Draw in a buffer (intermediate buffer). Thus, an image that can be seen from the virtual camera in the object space is generated. The drawing unit 126 draws an original image in which a normal texture is mapped to an object in a frame buffer, and an effect image in which an effect expression texture is mapped to the object in order to add an image effect to the original image. Are drawn in a storage buffer different from a frame buffer such as a work buffer. The effect image may be drawn in a dedicated storage buffer for drawing the effect 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.本実施形態の手法
次に本実施形態の手法について図面を用いて説明する。なお以下では、オブジェクトの陰影を表現する際に本実施形態の手法を採用した場合について主に説明するが、本実施形態の手法は、このような陰影の表現のみならず、種々の画像表現に適用できる。
2. Next, the method of this embodiment will be described with reference to the drawings. In the following, the case where the method of the present embodiment is adopted when expressing the shadow of an object will be mainly described. However, the method of the present embodiment is not limited to such a representation of a shadow, but various image representations. Applicable.

2.1 元画像とエフェクト画像との合成手法
本実施形態では、図2に示すように、オブジェクト空間を仮想カメラVC(所与の視点)から見た視界画像についての元画像と元画像に対応する画像であって、元画像に陰影(シェード)や影(シャドウ)等の画像エフェクトを付加するためのエフェクト画像(陰影画像、影画像)とをαブレンディング(半透明合成)を用いて合成する。すなわち、元画像とエフェクト画像とのαブレンディングによって視界に入るオブジェクトOBについてシェーディングやシャドウイング等の画像エフェクトを付加する処理を行う。
2.1 Method of Combining Original Image and Effect Image In this embodiment, as shown in FIG. 2, the original image and the original image for the view image when the object space is viewed from the virtual camera VC (given viewpoint) are supported. An effect image (shadow image, shadow image) for adding image effects such as shadows and shadows to the original image is synthesized using α blending (translucent composition). . That is, processing for adding an image effect such as shading or shadowing is performed on the object OB entering the field of view by α blending of the original image and the effect image.

本実施形態では画像を合成する際に行われるαブレンディングの手法に特徴を有し、エフェクト画像を構成するピクセルの色が基準色(所与の色)より明るいか暗いかに応じて、加算αブレンディングと減算αブレンディングとを切り替えて行う。具体的には、エフェクト画像における基準色より明るい色のピクセルについては、ピクセルの色と基準色との差分に相当する色情報(広義には、第1の色差分情報)が、元画像の対応ピクセルの色情報にα値に応じて加算される加算αブレンディングを行う。また、エフェクト画像における基準色より暗い色のピクセルについては、ピクセルの色と基準色との差分に相当する色情報(広義には、第2の色差分情報)が、元画像の対応ピクセルの色情報からα値に応じて減算される減算αブレンディングを行う。このように、基準色に対する明暗に応じて加算αブレンディングと減算αブレンディングとを切り替えて行うことにより、元画像の質感を維持したまま画像エフェクトを元画像に付加することができる。   The present embodiment is characterized by an α blending method performed when images are combined, and an additive α blending is performed depending on whether the color of a pixel constituting an effect image is brighter or darker than a reference color (given color). And subtracting α blending. Specifically, for pixels having a lighter color than the reference color in the effect image, the color information corresponding to the difference between the pixel color and the reference color (first color difference information in a broad sense) corresponds to the original image. Addition α blending that is added to the pixel color information according to the α value is performed. In addition, for pixels darker than the reference color in the effect image, color information corresponding to the difference between the pixel color and the reference color (second color difference information in a broad sense) is the color of the corresponding pixel in the original image. Subtraction α blending, which is subtracted according to the α value from the information, is performed. In this way, by switching between addition α blending and subtraction α blending according to the brightness of the reference color, an image effect can be added to the original image while maintaining the texture of the original image.

また本実施形態では、エフェクト画像を構成するピクセルの色と基準色との差分を抽出するために、エフェクト画像が基準色を分布中心とした色分布で作成されている。例えば、図3(A)に示すように、各色成分の輝度値の分布においてピクセル数が多くなる輝度値の色が基準色となるような色分布で作成される。なお、エフェクト画像の色分布の分布中心となる基準色は、図3(B)に示すように、採りうる輝度の中間値に対して低輝度側に設定されていてもよいし、図3(C)に示すように、採りうる輝度の中間値に対して高輝度側に設定されていてもよい。   In this embodiment, in order to extract the difference between the color of the pixels constituting the effect image and the reference color, the effect image is created with a color distribution centered on the reference color. For example, as shown in FIG. 3A, the color distribution is created in such a manner that the color of the luminance value having a larger number of pixels becomes the reference color in the luminance value distribution of each color component. As shown in FIG. 3B, the reference color that becomes the distribution center of the color distribution of the effect image may be set on the low luminance side with respect to the intermediate value of the luminance that can be taken. As shown in C), it may be set on the high luminance side with respect to the intermediate luminance value that can be taken.

基準色は、色を構成する各色成分(R、G、B)の輝度値が、同じ値に設定されていてもよく、また色を構成する各色成分の輝度値が、元画像のピクセルの各色成分について設定可能な輝度値の最小値と最大値との中間値に設定されていてもよい。例えば、基準色は、グレー(中間色)に設定されていてもよい。基準色をグレーに設定しておけば、基準色より明るい分と暗い分とからバランスよく色情報の差分を抽出することができる。なお基準色は、グレーであることが必ずしも必要であるわけではなく、所定の色(任意の色)であればよい。また基準色は、各色成分の輝度値が同じ値であることは必要ない。   For the reference color, the luminance value of each color component (R, G, B) constituting the color may be set to the same value, and the luminance value of each color component constituting the color is the color of each pixel of the original image You may set to the intermediate value of the minimum value and the maximum value of the luminance value which can be set about a component. For example, the reference color may be set to gray (intermediate color). If the reference color is set to gray, the difference in color information can be extracted in a balanced manner from the lighter and darker parts than the reference color. Note that the reference color is not necessarily gray, but may be a predetermined color (arbitrary color). The reference color does not need to have the same luminance value for each color component.

またエフェクト画像のピクセルの色と基準色との差分を抽出するために、本実施形態では、基準色のみで描画された基準色画像を用意する。基準色画像は、表示画面サイズ、表示画面を分割した分割画面サイズあるいはモデルオブジェクトに対応したサイズ(モデルサイズ)のポリゴン(スプライト)を基準色で塗りつぶしたものによって作成しておくことができる。   In order to extract the difference between the pixel color of the effect image and the reference color, in this embodiment, a reference color image drawn only with the reference color is prepared. The reference color image can be created by filling a display screen size, a divided screen size obtained by dividing the display screen, or a polygon (sprite) having a size corresponding to a model object (model size) with a reference color.

そして、図4(A)に示すように、基準色画像のピクセルの色成分に対するエフェクト画像のピクセルの色成分の差分を減算αブレンディングにより抽出する。   Then, as shown in FIG. 4A, the difference of the color component of the pixel of the effect image with respect to the color component of the pixel of the reference color image is extracted by subtraction α blending.

具体的には、基準色より明るい色成分の差分を抽出する第1の差分抽出(第1の差分抽出ブレンディング)は、エフェクト画像Pic(Eff)を構成するピクセルの色の輝度値から基準色画像Pic(Std)を構成するピクセルの色(基準色)の輝度値を減算することによって行い、下式(1A)に従って第1の色差分画像Pic(Brt)が作成される。   Specifically, the first difference extraction (first difference extraction blending) for extracting the difference between the color components brighter than the reference color is performed based on the luminance value of the color of the pixels constituting the effect image Pic (Eff). The first color difference image Pic (Brt) is created according to the following equation (1A) by subtracting the luminance value of the color (reference color) of the pixels constituting Pic (Std).

Pic(Brt)=Pic(Eff)−Pic(Std) (1A)
この第1の差分抽出では、図4(B)に示すように、基準色より明るい色(基準色より輝度の高い色)で塗られたピクセルについての色差分情報(第1の色差分情報)のみが得られる。すなわち、基準色より暗い色(基準色より輝度の低い色)で塗られたピクセルについては、所与の値(例えば、0;最小の輝度値)にクランプされる。
Pic (Brt) = Pic (Eff) −Pic (Std) (1A)
In the first difference extraction, as shown in FIG. 4B, color difference information (first color difference information) for pixels painted with a color brighter than the reference color (a color with higher brightness than the reference color). Only can be obtained. That is, a pixel painted with a color darker than the reference color (a color lower in luminance than the reference color) is clamped to a given value (for example, 0; minimum luminance value).

また基準色より暗い色成分の差分抽出(第2の差分抽出ブレンディング)は、基準色画像Pic(Std)を構成するピクセルの色(基準色)の輝度値からエフェクト画像Pic(Eff)を構成するピクセルの色の輝度値を減算することによって行い、下式(2A)に従って第2の色差分画像Pic(Drk)が作成される。   Further, the difference extraction (second difference extraction blending) of the color component darker than the reference color forms the effect image Pic (Eff) from the luminance value of the color of the pixel (reference color) constituting the reference color image Pic (Std). The second color difference image Pic (Drk) is created according to the following equation (2A) by subtracting the luminance value of the color of the pixel.

Pic(Drk)=Pic(Std)−Pic(Eff) (2A)
そして本実施の形態では、Pic(Brt)とPic(Drk)とを元画像Pic(Org)にαブレンディングすることで、元画像Pic(Org)に画像エフェクトを付加することができるが、Pic(Brt)は、加算αブレンディングによって合成され、Pic(Drk)は、減算αブレンディングによって合成される。加算αブレンディングと減算αブレンディングとはどちらを先に行ってもよい。すなわち。加算αブレンディングを行ってから減算αブレンディングを行ってもよいし、減算αブレンディングを行ってから加算αブレンディングを行ってもよい。
Pic (Drk) = Pic (Std) −Pic (Eff) (2A)
In this embodiment, Pic (Brt) and Pic (Drk) are α-blended with the original image Pic (Org) to add an image effect to the original image Pic (Org). Brt) is synthesized by addition α blending, and Pic (Drk) is synthesized by subtraction α blending. Either addition α blending or subtraction α blending may be performed first. That is. Subtraction α blending may be performed after performing addition α blending, or addition α blending may be performed after performing subtraction α blending.

前者の場合には、下式(3A)及び(4A)の処理を行う。すなわち、先に加算αブレンディングを行って、中間合成画像Pic(Bld)を作成し、その後に減算αブレンディングを行って合成フレーム画像Pic(Frm)を得る。   In the former case, the processing of the following expressions (3A) and (4A) is performed. That is, addition α blending is first performed to create an intermediate composite image Pic (Bld), and then subtraction α blending is performed to obtain a composite frame image Pic (Frm).

Pic(Bld)=Pic(Org)+αPic(Brt) (3A)
Pic(Frm)=Pic(Bld)−αPic(Drk) (4A)
一方、後者の場合には、下式(5A)及び(6A)の処理を行う。すなわち、先に減算αブレンディングを行って、中間合成画像Pic(Bld)を作成し、その後に加算αブレンディングを行って合成フレーム画像Pic(Frm)を得る。
Pic (Bld) = Pic (Org) + αPic (Brt) (3A)
Pic (Frm) = Pic (Bld) −αPic (Drk) (4A)
On the other hand, in the latter case, the processing of the following expressions (5A) and (6A) is performed. That is, subtraction α blending is first performed to create an intermediate composite image Pic (Bld), and then addition α blending is performed to obtain a composite frame image Pic (Frm).

Pic(Bld)=Pic(Org)−αPic(Drk) (5A)
Pic(Frm)=Pic(Bld)+αPic(Brt) (6A)
このように加算αブレンディングと減算αブレンディングとをエフェクト画像を構成する色の輝度に応じて選択的に行う手法によれば、加算αブレンディングあるいは減算αブレンディングの一方しか行わずに、元画像とエフェクト画像とを合成した場合に比べて、元画像に対して画像エフェクトの付加により明るくなる部分と暗くなる部分とが生じることによって、水彩調の絵画に特有の色のにじみを元画像の質感を維持したまま表現することができる。
Pic (Bld) = Pic (Org) −αPic (Drk) (5A)
Pic (Frm) = Pic (Bld) + αPic (Brt) (6A)
In this way, according to the method of selectively performing addition α blending and subtraction α blending according to the luminance of the color constituting the effect image, only the addition α blending or the subtraction α blending is performed, and the original image and the effect are performed. Compared to the case where the image is combined with the original image, the original image has texture that is brighter and darker due to the addition of image effects. It can be expressed as is.

2.2 α値の設定手法
本実施形態のαブレンディング手法では、元画像の画像情報から元画像とエフェクト画像とを合成する際の合成比率であるα値を設定する手法を採用する。具体的には、図6に示すように、元画像をグレースケール変換して、グレースケール画像のピクセルの輝度値に基づいて、α値を設定する。元画像をグレースケール変換する際には、カラールックアップテーブル(CLUT;Color Look Up Table)を用いて、ピクセルの色をグレースケール変換(モノクロ変換)することができる。
2.2 α Value Setting Method The α blending method of the present embodiment employs a method of setting an α value that is a combination ratio when combining an original image and an effect image from image information of the original image. Specifically, as shown in FIG. 6, the original image is subjected to gray scale conversion, and an α value is set based on the luminance value of the pixel of the gray scale image. When the original image is converted to grayscale, the color of the pixel can be converted to grayscale (monochrome conversion) using a color look-up table (CLUT).

さらに本実施形態では、α値を求める際に、図6に示すように、所与の補正係数を用いたガンマ補正(広義には、べき乗補正)を行って、そのガンマ補正の結果得られた値を、元画像とエフェクト画像とをαブレンディングするためのα値として設定する手法を採用する。ガンマ補正についてもカラールックアップテーブルを用いてグレースケール画像の輝度値をα値に変換することができる。このとき、α値は、元画像の暗い部分においてα値が大きくなり、元画像の明るい部分においてα値が小さくなるように求めることが望ましい。言い換えれば、元画像の暗い部分においてエフェクト画像との合成比率が強くなるようにα値を設定することが望ましい。また上述したガンマ補正は、例えば、ディスプレイ(表示部190)の明度特性式であるGammaX.Y式を用いて行うことができ、グレースケール画像の輝度値をgとすると、α値は、下式(7A)で設定される。   Furthermore, in the present embodiment, when obtaining the α value, as shown in FIG. 6, gamma correction using a given correction coefficient (power correction in a broad sense) is performed, and the result of the gamma correction is obtained. A method of setting a value as an α value for α blending the original image and the effect image is adopted. For gamma correction, the luminance value of the gray scale image can be converted into an α value using a color lookup table. At this time, it is desirable to obtain the α value so that the α value increases in a dark portion of the original image and decreases in a bright portion of the original image. In other words, it is desirable to set the α value so that the composition ratio with the effect image becomes strong in the dark part of the original image. The above-described gamma correction is performed by, for example, GammaX. The α value can be set by the following equation (7A), where g is the luminance value of the grayscale image.

α=(1−g)^X.Y (7A)
そして、このガンマ補正によって得られたα値を用いて、図6に示すように元画像とエフェクト画像とを上記合成手法に従ってαブレンディングすることにより、元画像に表されたオブジェクトに対して陰影(シェード)や影(シャドウ)などの画像エフェクトを元画像に対して付加した合成フレーム画像を得ることができる。このようにすれば、元画像の暗い部分に画像エフェクト(陰影や影)の影響が強く出た合成フレーム画像を作成することができるようになる。
α = (1-g) ^ X. Y (7A)
Then, using the α value obtained by this gamma correction, the original image and the effect image are α-blended according to the above synthesis method as shown in FIG. A composite frame image obtained by adding image effects such as shades and shadows to the original image can be obtained. In this way, it is possible to create a composite frame image in which the influence of image effects (shadows and shadows) is strong in the dark part of the original image.

2.3 エフェクト画像の作成手法
本実施形態では、エフェクト画像として、オブジェクトの陰影を所定のパターン画像で作成したエフェクト表現用テクスチャをスクリーン座標を基準に設定したテクスチャ座標に基づいてテクスチャマッピングすることにより元画像に画像エフェクトを付加するためのエフェクト画像を作成する手法を採用する。
2.3 Effect Image Creation Method In this embodiment, an effect expression texture in which an object shadow is created with a predetermined pattern image is texture-mapped as an effect image based on texture coordinates set based on screen coordinates. A method of creating an effect image for adding an image effect to the original image is adopted.

*テクスチャ座標の演算手法
本実施の形態では、オブジェクトにマッピングされるエフェクト表現用テクスチャのテクスチャ座標を、オブジェクトの各頂点のスクリーン座標(頂点スクリーン座標)と、オブジェクトに対して設定される基準点のスクリーン座標(基準点スクリーン座標)とを用いて求めている。「オブジェクトに対して設定される基準点」とは、プリミティブ単位、複数のプリミティブから構成されるパーツオブジェクト単位、あるいは複数のパーツオブジェクトから構成されるモデルオブジェクト単位で設定される任意の点であり、プリミティブ、パーツオブジェクト、あるいはモデルオブジェクトの1頂点を基準点としてもよい。
* Texture Coordinate Calculation Method In this embodiment, the texture coordinates of the texture for effect expression mapped to the object are the screen coordinates of each vertex of the object (vertex screen coordinates) and the reference point set for the object. It is determined using screen coordinates (reference point screen coordinates). The “reference point set for an object” is an arbitrary point set in a primitive unit, a part object unit composed of a plurality of primitives, or a model object unit composed of a plurality of part objects. One vertex of a primitive, part object, or model object may be used as a reference point.

例えば、図7(A)に示すようなハッチングパターンのエフェクト表現用テクスチャ(テクスチャサイズ;128ピクセル×128ピクセル)を図7(B)に示すスクリーン位置に投影された頂点P1,P2,P3からなるプリミティブ面にマッピングする場合を考える。   For example, the effect expression texture (texture size: 128 pixels × 128 pixels) of the hatching pattern as shown in FIG. 7A is composed of vertices P1, P2, and P3 projected onto the screen position shown in FIG. 7B. Consider the case of mapping to a primitive surface.

図7(B)に示すように、各頂点P1,P2,P3のスクリーン座標は、それぞれ(128,64)、(64,192)、および(192,192)である。本実施の形態では、この各頂点P1〜P3のうち頂点P1を基準点Bとして、基準点を含む各頂点のスクリーン座標とエフェクト表現用テクスチャのテクスチャサイズ(広義には、ピクセル情報)とに基づいて、図7(A)に示すエフェクト表現用テクスチャをマッピングするためのテクスチャ座標を求める。具体的には、下式(1B)に従ってテクスチャ座標を求める。例えば、頂点スクリーン座標をP(x,y)、基準点スクリーン座標をB(bx,by)、エフェクト表現用テクスチャのテクスチャサイズ(ピクセル情報)を(tx×ty)とした場合、頂点スクリーン座標Pについて求められるテクスチャ座標A(ax,ay)は、下式のように表現できる。   As shown in FIG. 7B, the screen coordinates of the vertices P1, P2, and P3 are (128, 64), (64, 192), and (192, 192), respectively. In the present embodiment, of the vertices P1 to P3, the vertex P1 is the reference point B, and based on the screen coordinates of each vertex including the reference point and the texture size of the texture for effect expression (pixel information in a broad sense). Thus, texture coordinates for mapping the texture for effect expression shown in FIG. Specifically, the texture coordinates are obtained according to the following expression (1B). For example, when the vertex screen coordinates are P (x, y), the reference point screen coordinates are B (bx, by), and the texture size (pixel information) of the texture for effect expression is (tx × ty), the vertex screen coordinates P The texture coordinates A (ax, ay) obtained for can be expressed as follows:

A(ax,ay)=((x-bx)/tx,(y-by)/ty) (1B)
すると、図7(C)に示すように、基準点Bとなる頂点P1のテクスチャ座標が(0,0)に設定され、頂点P2,P3のテクスチャ座標が(−0.5,1)、(0.5、1)に設定される。
A (ax, ay) = ((x-bx) / tx, (y-by) / ty) (1B)
Then, as shown in FIG. 7C, the texture coordinates of the vertex P1 serving as the reference point B are set to (0, 0), and the texture coordinates of the vertices P2 and P3 are (−0.5, 1), ( 0.5, 1).

このように設定されたテクスチャ座標に基づきテクスチャマッピングを行うとき、エフェクト表現用テクスチャは、図8(A)に示すように、基準点B(頂点P1)を原点としてスクリーン座標系に繰返して貼り付けられることを意味し、プリミティブ面PRには、頂点P1〜P3に囲まれた部分のパターンが反映され、図8(B)に示すようにエフェクト表現用テクスチャがマッピングされる。   When texture mapping is performed based on the texture coordinates set in this way, the texture for effect expression is repeatedly pasted to the screen coordinate system with the reference point B (vertex P1) as the origin, as shown in FIG. In the primitive plane PR, the pattern of the portion surrounded by the vertices P1 to P3 is reflected, and the texture for effect expression is mapped as shown in FIG. 8B.

ここで、仮想カメラがスクリーン座標系のX軸方向に平行移動した場合を考える。このとき図9(A)に示すように、プリミティブ面PRのスクリーン座標は変更されるが、基準点Bは頂点P1に設定されている。このため、仮想カメラの移動によって各頂点のスクリーン座標が変更されても、テクスチャ座標は変更されることがなく、図9(B)に示すように、図8(B)の場合と同一のパターンがマッピングされることになる。   Here, consider a case where the virtual camera is translated in the X-axis direction of the screen coordinate system. At this time, as shown in FIG. 9A, the screen coordinates of the primitive surface PR are changed, but the reference point B is set at the vertex P1. For this reason, even if the screen coordinates of each vertex are changed by the movement of the virtual camera, the texture coordinates are not changed, and as shown in FIG. 9B, the same pattern as in FIG. Will be mapped.

これに対して、スクリーン座標系の1点(例えば原点)を基準点としてテクスチャ座標を求める場合を比較例として検討すると、図10(A)に示すように、仮想カメラが平行移動すると、各頂点のスクリーン座標の変更に伴って、テクスチャ座標も変更されてしまう。これは、仮想カメラが移動したにもかかわらず原点は変更されていないため、基準点と各頂点との相対的な位置関係が変更されてしまうためである。この場合、求められたテクスチャ座標に基づいて、エフェクト表現用テクスチャをマッピングすると、図10(B)に示すように、マッピングされたパターンが仮想カメラの移動に伴って流れるように変化してしまい、生成画像に不自然さが生じる。   On the other hand, when a texture coordinate is obtained using one point (for example, the origin) of the screen coordinate system as a reference point as a comparative example, as shown in FIG. As the screen coordinates are changed, the texture coordinates are also changed. This is because the relative positional relationship between the reference point and each vertex is changed because the origin is not changed despite the movement of the virtual camera. In this case, when the texture for effect expression is mapped based on the obtained texture coordinates, as shown in FIG. 10B, the mapped pattern changes so as to flow along with the movement of the virtual camera. Unnaturalness occurs in the generated image.

従って、本実施の形態の手法を用いれば、図9(B)に示すように仮想カメラが平行移動してもオブジェクトにマッピングされるエフェクト表現用テクスチャのパターンが流れることがなく高品質な画像表現を実現することができる。そして、例えば、手書き調の画像表現をする場合などにおいて、高品質な陰影表現を実現することができる。   Therefore, by using the method of the present embodiment, even if the virtual camera moves in parallel as shown in FIG. 9B, the texture pattern for effect expression mapped to the object does not flow, and high-quality image expression is achieved. Can be realized. For example, high-quality shadow expression can be realized in the case of handwritten image expression.

*テクスチャ座標の距離補正手法
オブジェクト空間に配置されたオブジェクトの各頂点は、図11に示すように、カメラ座標系(視点座標系)におけるZ軸方向(奥行き方向)において距離差がある。そのため、基準点Bよりも手前側に位置するオブジェクトの頂点P1はスクリーン座標系での動きが大きくなり、基準点Bよりも奥側に位置するオブジェクトの頂点P2はスクリーン座標系での動きが小さくなる。すなわち、基準点Bからの距離差に応じてオブジェクトの各頂点P1,P2間に動きの差が出てしまう。このため、一様に基準点Bからの差分に応じてエフェクト表現用テクスチャをマッピングするためのテクスチャ座標を求めてしまうと、例えば、パターンの伸び縮みなど、表示変化の度合いにズレが生じ、画像に不自然さ生じやすくなる。
* Texture Coordinate Distance Correction Method As shown in FIG. 11, each vertex of an object arranged in the object space has a distance difference in the Z-axis direction (depth direction) in the camera coordinate system (viewpoint coordinate system). Therefore, the vertex P1 of the object located in front of the reference point B has a large movement in the screen coordinate system, and the vertex P2 of the object located in the back side of the reference point B has a small movement in the screen coordinate system. Become. That is, a difference in motion occurs between the vertices P1 and P2 of the object according to the distance difference from the reference point B. For this reason, if the texture coordinates for mapping the texture for effect expression are uniformly determined according to the difference from the reference point B, a deviation occurs in the degree of display change such as pattern expansion / contraction, for example. It tends to cause unnaturalness.

そこで、本実施の形態では、上述したようにオブジェクトの各頂点P1,P2と基準点Bとの奥行き方向の距離差に応じてスクリーン座標系での動きが異なることに着目し、当該距離差に応じて、テクスチャ座標を補正する距離補正手法を採用する。具体的には、エフェクト表現用テクスチャのマッピング対象のオブジェクトの頂点毎に基準点との奥行き方向の距離差に応じて、基準点スクリーン座標を補正し、補正後の基準点スクリーン座標との差分に基づいて、各頂点についてテクスチャ座標を補正することができる。すなわち、この手法ではマッピング対象のオブジェクトの各頂点ごとに仮想の基準点を設定することになる。   Therefore, in the present embodiment, focusing on the fact that the movement in the screen coordinate system differs according to the distance difference in the depth direction between each vertex P1, P2 of the object and the reference point B as described above, Accordingly, a distance correction method for correcting the texture coordinates is adopted. Specifically, the reference point screen coordinates are corrected according to the distance difference in the depth direction from the reference point for each vertex of the object to which the effect expression texture is mapped, and the difference from the corrected reference point screen coordinates is obtained. Based on this, the texture coordinates can be corrected for each vertex. That is, in this method, a virtual reference point is set for each vertex of the object to be mapped.

このとき、基準点Bから奥行き方向の距離が近い頂点ほど補正量(補正の度合い)が小さくなり、基準点Bから奥行き方向の距離が遠い頂点ほど補正量が大きくなるように、各頂点についてのテクスチャ座標を補正する。この補正量を決定する距離補正値dは、基準点Bと各頂点P1,P2の奥行き方向の距離差がテクスチャ座標に反映されるように、例えば、各頂点P1,P2と基準点Bとのパースペクティブ除算値の比に基づいて求めることができる。   At this time, the correction amount (degree of correction) is smaller as the vertex is closer to the depth direction from the reference point B, and the correction amount is larger as the vertex is farther from the reference point B in the depth direction. Correct the texture coordinates. The distance correction value d for determining the correction amount is, for example, between each vertex P1, P2 and the reference point B so that the distance difference in the depth direction between the reference point B and each vertex P1, P2 is reflected in the texture coordinates. It can be determined based on the ratio of the perspective division values.

例えば、オブジェクトの頂点および基準点のパースペクティブ除算値をそれぞれ1/w、1/bwとすると、テクスチャ座標Aの距離補正値dならびに補正後のテクスチャ座標A1(ax1,ay1)は下式のように求められる。   For example, if the perspective division values of the vertex and reference point of the object are 1 / w and 1 / bw, respectively, the distance correction value d of the texture coordinate A and the corrected texture coordinate A1 (ax1, ay1) are Desired.

d=(1/bw)/(1/w)=w/bw (2B)
A1(ax1,ay1)=((x-bx*d)/tx,(y-by*d)/ty) (3B)
このようにすると、図11に示す例では、基準点Bより仮想カメラ(視点)から近い頂点P1については距離補正値dが小さくなり(d<1)、基準点Bより仮想カメラから遠い頂点P2については距離補正値dが大きくなる(d>1)。このようにすることで、仮想カメラが移動した場合における基準点Bと各頂点P1,P2との動きの差によるテクスチャの表示変化の度合いのズレが低減され、テクスチャの表示変化の度合いが仮想カメラの移動に適切に追従して高質な画像表現を実現することができる。
d = (1 / bw) / (1 / w) = w / bw (2B)
A1 (ax1, ay1) = ((x-bx * d) / tx, (y-by * d) / ty) (3B)
In this way, in the example shown in FIG. 11, the distance correction value d is smaller for the vertex P1 closer to the virtual camera (viewpoint) than the reference point B (d <1), and the vertex P2 farther from the virtual camera than the reference point B is reached. For, the distance correction value d increases (d> 1). By doing so, the deviation in the degree of change in the texture display due to the difference in motion between the reference point B and each of the vertices P1 and P2 when the virtual camera moves is reduced, and the degree of the change in the texture display is the virtual camera. High-quality image expression can be realized by appropriately following the movement of the image.

*手書きアニメーション調の表現手法
例えば、手書きアニメーションではフレーム画像をアニメータが手書きで作成するため、各フレーム画像間で線画の微妙なズレが生じる。本実施の形態では、このような手書きアニメーションのフレーム画像に特有の線画のズレを表現するために、エフェクト表現用テクスチャをマッピングするためのテクスチャ座標にランダムあるいは周期的に値が変化する動き補正値(変数)を加えてテクスチャ座標をランダムあるいは周期的に変化させて、手書き調の質感を表現することができる。
* Method for expressing handwritten animation style For example, in handwritten animation, an animator creates a frame image by handwriting, which causes a slight shift in line drawing between frame images. In the present embodiment, in order to express the shift of the line drawing peculiar to the frame image of such handwritten animation, a motion correction value whose value changes randomly or periodically in the texture coordinates for mapping the texture for effect expression By adding (variables), texture coordinates can be changed randomly or periodically to express handwritten texture.

例えば、動き補正値をm(mx,my)とすると、動き補正処理がされたテクスチャ座標A2(ax2,ay2)は下式のように求められる。   For example, if the motion correction value is m (mx, my), the texture coordinates A2 (ax2, ay2) subjected to the motion correction process are obtained as follows.

A2(ax2,ay2)=(mx+(x-bx*d)/tx,my+(y-by*d)/ty) (4B)
動き補正値は、例えば、時間、視点の移動情報及びゲームイベントの少なくとも一つに応じて変化させることができる。特に、視点が移動したときにはフレーム画像が大きく変わるため、視点の移動情報に応じて値が変化する動き補正値を加算してテクスチャ座標を変化させることで、手書きアニメーション調の質感をコンピュータグラフィックスでも十分に表現することができる。
A2 (ax2, ay2) = (mx + (x-bx * d) / tx, my + (y-by * d) / ty) (4B)
The motion correction value can be changed according to at least one of time, viewpoint movement information, and a game event, for example. In particular, when the viewpoint moves, the frame image changes greatly, so by adding a motion correction value that changes in value according to the movement information of the viewpoint and changing the texture coordinates, the texture of the handwritten animation tone can be changed even with computer graphics. It can be expressed sufficiently.

*テクスチャ座標の形状補正手法
手書きによって画像を作成する場合、例えば、球体の陰影(シェード)を手書きアニメーションで用いるとき、作成者は陰影を表すための線画を球体に沿うように表現するはずである。しかしながら、上述の手法のみでは、例えば、直線的なパターンで作成されたエフェクト表現用テクスチャを陰影表現のためにオブジェクトにマッピングすると、手書きの質感や曲面の立体感を十分に表現することができない。
* Shape correction method for texture coordinates When creating an image by handwriting, for example, when using a shadow of a sphere in handwritten animation, the creator should represent a line drawing to represent the shadow along the sphere. . However, with the above-described method alone, for example, if an effect expression texture created with a linear pattern is mapped to an object for shadow expression, a handwritten texture or a three-dimensional effect on a curved surface cannot be sufficiently expressed.

そこで、本実施の形態では、オブジェクトの形状に沿うようにエフェクト表現用テクスチャのパターンを変形させてマッピングする手法を採用する。特に本実施の形態では、オブジェクトの頂点の法線ベクトル(ノーマルベクトル)に着目した。オブジェクトの各頂点の法線ベクトルは、頂点間の傾きを表しており、この情報をテクスチャ座標の演算に用いることにより、図12に示すように、オブジェクトの面の形状に関連づけてエフェクト表現用テクスチャのパターンを法線ベクトルの方向成分と長さ成分に従って変形させることができるようになる。   Therefore, in the present embodiment, a technique is adopted in which the effect expression texture pattern is deformed and mapped so as to follow the shape of the object. In particular, the present embodiment focuses on the normal vector (normal vector) of the vertex of the object. The normal vector of each vertex of the object represents the inclination between the vertices. By using this information for calculating the texture coordinates, as shown in FIG. 12, the texture for effect expression is associated with the shape of the surface of the object. This pattern can be deformed in accordance with the direction component and length component of the normal vector.

例えば、頂点の法線ベクトルの座標成分をN(Nx,Ny,Nz)とし、補正係数をM(Mx,My)とすると、形状補正処理後のテクスチャ座標A3(ax3,ay3)は下式のように求められる。   For example, if the coordinate component of the normal vector of the vertex is N (Nx, Ny, Nz) and the correction coefficient is M (Mx, My), the texture coordinates A3 (ax3, ay3) after the shape correction process are Asking.

A3(ax3,ay3)=(mx+(x-bx*d)/tx+(|Nx|*Mx),my+(y-by*d)/ty+(|Ny|*My)) (5B)
すなわち、法線ベクトルの座標成分の絶対値(長さ成分の値域を−1.0〜1.0から0.0〜1.0に変換した値)に任意の調整値を乗算した値を加算処理あるいは減算処理してテクスチャ座標を求める。なお、加算処理をする場合には、調整値を正の値とし、減算処理をする場合には、調整値を負の値とすればよい。ここで、法線ベクトルの座標成分を絶対値化するのは、−1.0〜1.0という値域を取りうる法線ベクトルの長さ成分をそのままエフェクト表現用テクスチャのパターンの変形に適用すると、陰影表現の場合にはパターンの変形度合いが大きすぎるからである。このようにすると、エフェクト表現用テクスチャのパターンが法線ベクトルの方向に対して大きく変形され、オブジェクトにより表現される物体の形状に沿ったパターンでエフェクト表現用テクスチャがマッピングされ、オブジェクトの立体感を十分に表現することができる。
A3 (ax3, ay3) = (mx + (x-bx * d) / tx + (| Nx | * Mx), my + (y-by * d) / ty + (| Ny | * My)) (5B)
In other words, the absolute value of the coordinate component of the normal vector (the value obtained by converting the range of the length component from -1.0 to 1.0 to 0.0 to 1.0) is multiplied by an arbitrary adjustment value. The texture coordinates are obtained by processing or subtraction. In addition, what is necessary is just to make an adjustment value into a positive value when performing an addition process, and making an adjustment value into a negative value when performing a subtraction process. Here, the coordinate component of the normal vector is converted into an absolute value when the length component of the normal vector that can take a range of −1.0 to 1.0 is directly applied to the deformation of the effect expression texture pattern. This is because the degree of deformation of the pattern is too large in the case of shadow expression. In this way, the texture pattern for effect expression is greatly deformed with respect to the direction of the normal vector, and the texture for effect expression is mapped with a pattern along the shape of the object represented by the object, so that the three-dimensional effect of the object is increased. It can be expressed sufficiently.

2.4 本実施形態の手法を用いた実施例
図13(A)に通常のテクスチャをテクスチャマッピングして描画した元画像の例を示す。また図13(B)に本実施形態のテクスチャ座標の演算手法でテクスチャ座標を設定してエフェクト表現用テクスチャをテクスチャマッピングして描画したエフェクト画像の例を示す。そして、図13(A)に示す元画像と図13(B)に示すエフェクト画像とを、本実施形態のα値の設定手法に従って設定したα値を用いて本実施形態の合成手法により加算αブレンディングと減算αブレンディングとを切り替えて行った合成フレーム画像を図14に示す。図14に示す合成フレーム画像では、元画像の暗い部分に対してエフェクト表現用テクスチャの影響が強くなった陰影や影が元画像の質感を維持したまま表現されている。
2.4 Examples Using the Technique of the Present Embodiment FIG. 13A shows an example of an original image drawn by texture mapping a normal texture. FIG. 13B shows an example of an effect image drawn by texture mapping using the texture coordinate calculation method of the present embodiment and texture mapping of the effect expression texture. Then, the original image shown in FIG. 13A and the effect image shown in FIG. 13B are added by the synthesis method of this embodiment using the α value set according to the α value setting method of this embodiment. FIG. 14 shows a composite frame image obtained by switching between blending and subtraction α blending. In the synthesized frame image shown in FIG. 14, shadows and shadows in which the effect expression texture has a strong influence on the dark portion of the original image are expressed while maintaining the texture of the original image.

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

まず本実施の形態の手法を適用するための前提処理としてオブジェクトの頂点データ群をある程度の頂点数の頂点リスト群に分割しておくことが好ましい。例えば、24頂点を1組とした頂点リストを作成する。各頂点リストには、エフェクト表現用テクスチャをマッピングする際にテクスチャ座標を求めるための基準点が含まれる。   First, as a premise process for applying the method of the present embodiment, it is preferable to divide the vertex data group of the object into a vertex list group of a certain number of vertices. For example, a vertex list with 24 vertices as one set is created. Each vertex list includes a reference point for obtaining texture coordinates when mapping the texture for effect expression.

そして、本実施の形態の手法では、頂点リスト単位で図15に示す処理ルーチンを実行して元画像とエフェクト画像とを描画する。   In the method according to the present embodiment, the processing routine shown in FIG. 15 is executed for each vertex list to draw the original image and the effect image.

(1)まず、頂点リストに含まれる各頂点と基準点とについてジオメトリ処理を行う(ステップS10)。すなわち、頂点および基準点をスクリーン座標系に透視投影変換する。   (1) First, geometry processing is performed for each vertex and reference point included in the vertex list (step S10). That is, perspective projection conversion is performed on the vertex and the reference point in the screen coordinate system.

(2)次に、ジオメトリ処理後の頂点のスクリーン座標(頂点スクリーン座標)と基準点のスクリーン座標(基準点スクリーン座標)とを取得する(ステップS11)。   (2) Next, the screen coordinates (vertex screen coordinates) of the vertices after the geometry processing and the screen coordinates (reference point screen coordinates) of the reference points are acquired (step S11).

(3)次に、頂点リスト内の各頂点について通常描画を行う(ステップS12)。すなわち、頂点リストに含まれる各頂点について通常のシェーディング処理、通常のテクスチャマッピング処理を行う。すなわち、元画像をフレームバッファに描画する処理を行う。   (3) Next, normal drawing is performed for each vertex in the vertex list (step S12). That is, normal shading processing and normal texture mapping processing are performed for each vertex included in the vertex list. That is, a process of drawing the original image in the frame buffer is performed.

(4)次に、エフェクト表現用テクスチャをマッピングするためのテクスチャ座標を求める(ステップS13)。具体的には、各頂点のスクリーン上の座標からテクスチャ座標A1を求める。このとき、頂点スクリーン座標と基準点スクリーン座標との差分および各頂点と基準点とのカメラ座標系における奥行き差を考慮して座標A1を求める。   (4) Next, texture coordinates for mapping the texture for effect expression are obtained (step S13). Specifically, the texture coordinate A1 is obtained from the coordinates on the screen of each vertex. At this time, the coordinate A1 is obtained in consideration of the difference between the vertex screen coordinates and the reference point screen coordinates and the depth difference in the camera coordinate system between each vertex and the reference point.

(5)次に、テクスチャ座標を変化(移動)させる動き調整値を座標A1に加える処理を行い、座標A2を算出する(ステップS14)。具体的には、テクスチャ座標をランダムや周期的に変化(移動)させることで、手書きアニメ風の表現を実現する。   (5) Next, a process of adding a motion adjustment value for changing (moving) the texture coordinates to the coordinates A1 is performed to calculate the coordinates A2 (step S14). Specifically, handwritten animation-like expression is realized by changing (moving) the texture coordinates randomly or periodically.

(6)次に、エフェクト表現用テクスチャをマッピング対象のオブジェクトの表面形状に合わせて変化させる処理を行う(ステップS15)。具体的には、エフェクト表現用テクスチャに表されたパターン(模様)をオブジェクトの表面形状に沿うように変形させるために、テクスチャ座標を各頂点のカメラ座標系(視点座標系)での法線ベクトルで重み付けする。より具体的には、各頂点のカメラ座標系の法線ベクトルを求めて、法線ベクトルの座標成分のX,Y要素の絶対値に任意の倍率(調整値、補正係数)を乗算処理し、これをテクスチャ座標A2に加えて座標A3とする。なおテクスチャ座標A3を求める場合に加算処理をする際は、法線ベクトルの座標成分のX,Y要素の絶対値に乗算処理される任意の倍率(調整値、補正係数)を正の値とする。一方でテクスチャ座標A3を求める場合に減算処理をする際は、法線ベクトルの座標成分のX,Y要素の絶対値に乗算処理される任意の倍率(調整値、補正係数)を負の値とする。   (6) Next, a process for changing the texture for effect expression in accordance with the surface shape of the object to be mapped is performed (step S15). Specifically, in order to transform the pattern (pattern) shown in the texture for effect expression so as to follow the surface shape of the object, the texture coordinate is a normal vector in the camera coordinate system (viewpoint coordinate system) of each vertex. Weight with. More specifically, the normal vector of the camera coordinate system of each vertex is obtained, and the absolute value of the X and Y elements of the coordinate component of the normal vector is multiplied by an arbitrary magnification (adjustment value, correction coefficient), This is added to the texture coordinate A2 to be the coordinate A3. In addition, when the addition processing is performed when obtaining the texture coordinate A3, an arbitrary magnification (adjustment value, correction coefficient) multiplied by the absolute value of the X and Y elements of the coordinate component of the normal vector is set as a positive value. . On the other hand, when subtraction processing is performed when obtaining the texture coordinate A3, an arbitrary magnification (adjustment value, correction coefficient) multiplied by the absolute value of the X and Y elements of the coordinate component of the normal vector is set as a negative value. To do.

(7)次に、求められたテクスチャ座標A3に基づき、エフェクト表現用テクスチャをオブジェクトにマッピングする(ステップS16)。このとき、エフェクト表現用テクスチャをマッピングした画像をステップS12の描画処理で通常のテクスチャがマッピングされた元画像とは異なる専用のバッファ(フレームバッファとは異なるバッファ)に描画する。   (7) Next, the texture for effect expression is mapped to the object based on the obtained texture coordinates A3 (step S16). At this time, the image to which the texture for effect expression is mapped is drawn in a dedicated buffer (buffer different from the frame buffer) different from the original image to which the normal texture is mapped in the drawing process in step S12.

(8)頂点リスト内の頂点を全て描画したか判断する(ステップS17)。全ての頂点についての描画処理が済んでいない場合には(ステップS17でN)、ステップS13〜ステップS16の処理を繰り返し行う。   (8) It is determined whether all the vertices in the vertex list have been drawn (step S17). If the drawing processing for all the vertices has not been completed (N in step S17), the processing in steps S13 to S16 is repeated.

(9)最終的には、全ての頂点リストについて描画したことを条件に(ステップS18でY)、処理を終了する。   (9) Eventually, the process is terminated on condition that all vertex lists have been drawn (Y in step S18).

次に、図16に示すフローチャートに従って、元画像とエフェクト画像とを合成する。   Next, the original image and the effect image are synthesized according to the flowchart shown in FIG.

(1)まず、元画像とエフェクト画像との描画処理が行われる(ステップS20;図15のフローチャートを参照)。   (1) First, drawing processing of an original image and an effect image is performed (step S20; see the flowchart of FIG. 15).

(2)次に、α値の設定を行う(ステップS21、S22)。具体的には、フレームバッファに描画された元画像をカラールックアップテーブルを用いてグレースケール画像に変換する(ステップS21)。これにより元画像の明るい部分と暗い部分とをはっきりさせる。続いて、同じようにカラールックアップテーブルを用いて元画像から変換されたグレースケール画像の輝度値に基づいてα値を設定し、フレームバッファのαプレーンに求められたα値を代入する(ステップS22)。このとき元画像の暗い部分においてα値が大きくなるように値を求める。またガンマ補正を行ってディスプレイの明度特性に合わせてα値を調整することができる。   (2) Next, the α value is set (steps S21 and S22). Specifically, the original image drawn in the frame buffer is converted into a grayscale image using a color lookup table (step S21). This makes the bright and dark portions of the original image clear. Subsequently, the α value is set based on the luminance value of the grayscale image converted from the original image using the color look-up table in the same manner, and the obtained α value is substituted into the α plane of the frame buffer (step S22). At this time, a value is obtained so that the α value becomes large in a dark portion of the original image. Further, gamma correction can be performed to adjust the α value according to the brightness characteristic of the display.

(3)次に、エフェクト画像の色情報から基準色画像の色情報を減算する第1の差分抽出ブレンディングによって色差分の抽出を行う。(ステップS23)。すなわちエフェクト画像を描画したバッファから描画データをワークバッファにコピーしておき、ワークバッファにおいて第1の差分抽出ブレンディングを行って、ワークバッファに第1の色差分画像を描画する。   (3) Next, the color difference is extracted by the first difference extraction blending that subtracts the color information of the reference color image from the color information of the effect image. (Step S23). That is, the drawing data is copied from the buffer in which the effect image is drawn to the work buffer, the first difference extraction blending is performed in the work buffer, and the first color difference image is drawn in the work buffer.

(4)次に、元画像と第1の色差分画像とを加算αブレンディングする(ステップS24)。すなわち、フレームバッファにワークバッファの描画データを加算αブレンディングして中間合成画像をフレームバッファに描画する。このときα値は、フレームバッファのαプレーンを参照して取得する。この後、ワークバッファを初期化して基準色画像をワークバッファに描画しておく。   (4) Next, the original image and the first color difference image are subjected to addition α blending (step S24). In other words, the drawing data of the work buffer is added to the frame buffer, and the intermediate composite image is drawn on the frame buffer. At this time, the α value is obtained by referring to the α plane of the frame buffer. Thereafter, the work buffer is initialized and the reference color image is drawn in the work buffer.

(5)次に、基準色画像の色情報からエフェクト画像の色情報を減算する第2の差分抽出ブレンディングによって色差分の抽出を行う(ステップS25)。すなわちワークバッファにおいて第2の差分抽出ブレンディングを行って、ワークバッファに第2の色差分画像を描画する。   (5) Next, the color difference is extracted by the second difference extraction blending in which the color information of the effect image is subtracted from the color information of the reference color image (step S25). That is, the second difference extraction blending is performed in the work buffer, and the second color difference image is drawn in the work buffer.

(6)最終的には、中間合成画像と第2の色差分画像とを減算αブレンディングする(ステップS26)。すなわち、フレームバッファにワークバッファの描画データを減算αブレンディングして合成フレーム画像をフレームバッファに描画する。このときのα値も、フレームバッファのαプレーンを参照して取得する。   (6) Finally, the intermediate composite image and the second color difference image are subjected to subtraction α blending (step S26). That is, the drawing data of the work buffer is subtracted α blending to the frame buffer to draw the composite frame image in the frame buffer. The α value at this time is also acquired with reference to the α plane of the frame buffer.

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

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

描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明合成処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行う。1フレーム分の画像がフレームバッファ922に書き込まれるとその画像(フレーム画像)はディスプレイ912に表示される。   The drawing processor 910 executes drawing (rendering) processing of an object composed of primitive surfaces such as polygons and curved surfaces. When drawing an object, the main processor 900 uses the DMA controller 970 to pass the drawing data to the drawing processor 910 and, if necessary, transfers the texture to the texture storage unit 924. Then, the drawing processor 910 draws the object in the frame buffer 922 while performing hidden surface removal using a Z buffer or the like based on the drawing data and texture. The rendering processor 910 also performs α blending (translucent synthesis processing), depth cueing, mip mapping, fog processing, bilinear filtering, trilinear filtering, anti-aliasing, shading processing, and the like. When an image for one frame is written in the frame buffer 922, the image (frame image) is displayed on the display 912.

サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などのゲーム音を生成し、スピーカ932を介して出力する。ゲームコントローラ942やメモリカード944からのデータはシリアルインターフェース940を介して入力される。   The sound processor 930 includes a multi-channel ADPCM sound source and the like, generates game sounds such as BGM, sound effects, and sounds, and outputs them through the speaker 932. Data from the game controller 942 and the memory card 944 is input via the serial interface 940.

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

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

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

なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書又は図面中の記載において広義や同義な用語(エフェクト画像、仮想カメラ、αブレンディング、ガンマ補正など)として引用された用語(陰影画像/影画像、視点、半透明合成処理、べき乗補正など)は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。   The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms (shadow image / shadow image, viewpoint, translucent compositing process, power correction) cited as broad or synonymous terms (effect image, virtual camera, α blending, gamma correction, etc.) in the description or drawings And the like can be replaced with terms having a broad meaning or the same meaning in other descriptions in the specification or the drawings.

また元画像とエフェクト画像との合成手法、α値の設定手法、エフェクト画像の作成手法等についても、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。   Further, the method for synthesizing the original image and the effect image, the method for setting the α value, the method for creating the effect image, and the like are not limited to those described in this embodiment, and methods equivalent to these are also included in the scope of the present invention. It is.

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

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 本実施形態の画像合成手法の説明図。Explanatory drawing of the image-synthesis method of this embodiment. 本実施形態の基準色画像の色分布の説明図。Explanatory drawing of the color distribution of the reference | standard color image of this embodiment. 図4(A)及び図4(B)は、本実施形態の色差分抽出手法の説明図。4A and 4B are explanatory diagrams of the color difference extraction method according to the present embodiment. 本実施形態の画像合成手法の説明図。Explanatory drawing of the image-synthesis method of this embodiment. 本実施形態のα値設定手法の説明図。Explanatory drawing of the alpha value setting method of this embodiment. 図7(A)〜図7(C)は本実施形態のエフェクト画像の作成手法の説明図。FIG. 7A to FIG. 7C are explanatory diagrams of an effect image creation method according to this embodiment. 図8(A),図8(B)は本実施形態のエフェクト画像の作成手法の説明図。FIG. 8A and FIG. 8B are explanatory diagrams of an effect image creation method according to this embodiment. 図9(A),図9(B)は本実施形態のエフェクト画像の作成手法の説明図。FIG. 9A and FIG. 9B are explanatory diagrams of an effect image creation method according to this embodiment. 図10(A),図10(B)は、比較例の手法の説明図。10A and 10B are explanatory diagrams of a method of a comparative example. 本実施形態のエフェクト画像の作成手法の説明図。Explanatory drawing of the creation method of the effect image of this embodiment. 本実施形態のエフェクト画像の作成手法の説明図。Explanatory drawing of the creation method of the effect image of this embodiment. 図13(A)は、元画像の例。図13(B)は、本実施形態の手法を用いて作成したエフェクト画像の例。FIG. 13A shows an example of an original image. FIG. 13B shows an example of an effect image created using the method of this embodiment. 図14は、本実施形態の手法を用いて合成した画像の例。FIG. 14 shows an example of an image synthesized using the method of this embodiment. 本実施形態の具体的な処理のフローチャート。The flowchart of the specific process of this embodiment. 本実施形態の具体的な処理のフローチャート。The flowchart of the specific process of this embodiment. ハードウェア構成例。Hardware configuration example.

符号の説明Explanation of symbols

OB オブジェクト、VC 仮想カメラ(視点)、
Pic(Org) 元画像、Pic(Eff) エフェクト画像、
Pic(Std) 基準色画像、Pic(Frm) 合成フレーム画像、
Pic(Brt) 第1の色差分画像、Pic(Drk) 第2の色差分画像、
100 処理部、
110 オブジェクト空間設定部、112 移動・動作処理部、
114 仮想カメラ制御部、116 スクリーン座標取得部、
118 テクスチャ座標演算部、
120 画像生成部、
121 ジオメトリ処理部、122 テクスチャマッピング部、
123 グレースケール変換部、124 α値設定部、
125 αブレンディング部、126 描画部
130 音生成部、160 操作部、
170 記憶部、
172 主記憶部、174 描画バッファ、
176 ルックアップテーブル記憶部、178 テクスチャ記憶部、
180 情報記憶媒体、194 携帯型情報記憶装置、
190 表示部、192 音出力部、196 通信部
OB object, VC virtual camera (viewpoint),
Pic (Org) original image, Pic (Eff) effect image,
Pic (Std) reference color image, Pic (Frm) composite frame image,
Pic (Brt) first color difference image, Pic (Drk) second color difference image,
100 processing unit,
110 Object space setting unit, 112 Movement / motion processing unit,
114 virtual camera control unit, 116 screen coordinate acquisition unit,
118 texture coordinate calculation unit,
120 image generation unit,
121 geometry processing unit, 122 texture mapping unit,
123 gray scale conversion unit, 124 α value setting unit,
125 α blending unit, 126 drawing unit 130 sound generation unit, 160 operation unit,
170 storage unit,
172 Main memory unit, 174 drawing buffer,
176 lookup table storage unit, 178 texture storage unit,
180 information storage medium, 194 portable information storage device,
190 Display unit, 192 Sound output unit, 196 Communication unit

Claims (8)

画像を生成するためのプログラムであって、
オブジェクト空間を所与の視点から見た視界画像について元画像と該元画像に対応するエフェクト画像とを描画する描画部と、
前記元画像と前記エフェクト画像とをαブレンディングするαブレンディング部として、
コンピュータを機能させ、
前記エフェクト画像の各ピクセルは、所与の基準色を分布中心とした色分布で描画されており、
前記αブレンディング部が、
前記エフェクト画像における前記基準色より明るい色のピクセルについては、該ピクセルの色と前記基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報に所与のα値に応じて加算される加算αブレンディングと、
前記エフェクト画像における前記基準色より暗い色のピクセルについては、該ピクセルの色と基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報から所与のα値に応じて減算される減算αブレンディングと、
を行うことを特徴とするプログラム。
A program for generating an image,
A drawing unit for drawing an original image and an effect image corresponding to the original image with respect to a view field image obtained by viewing the object space from a given viewpoint;
As an α blending unit that α blends the original image and the effect image,
Make the computer work,
Each pixel of the effect image is drawn with a color distribution centered on a given reference color,
The α blending part is
For pixels having a lighter color than the reference color in the effect image, the color information corresponding to the difference between the color of the pixel and the reference color is in accordance with the α value given to the color information of the corresponding pixel in the original image. Addition α blending to be added,
For pixels that are darker than the reference color in the effect image, the color information corresponding to the difference between the pixel color and the reference color is subtracted from the color information of the corresponding pixel in the original image according to a given α value. Subtracted alpha blending,
The program characterized by performing.
請求項1において、
前記αブレンディング部が、
前記エフェクト画像のピクセルの色情報から前記基準色で描画された基準色画像の対応ピクセルの色情報を減算する第1の差分抽出ブレンディングを行って、第1の色差分画像を生成し、
前記基準色画像のピクセルの色情報から前記エフェクト画像の対応ピクセルの色情報を減算する第2の差分抽出ブレンディングを行って、第2の色差分画像を生成し、
前記元画像のピクセルの色情報に前記第1の色差分画像の対応ピクセルの色情報を加算することにより前記加算αブレンディングを行い、
前記元画像のピクセルの色情報から前記第2の色差分画像の対応ピクセルの色情報を減算することにより前記減算αブレンディングを行うことを特徴とするプログラム。
In claim 1,
The α blending part is
Performing first difference extraction blending for subtracting color information of corresponding pixels of the reference color image drawn with the reference color from color information of pixels of the effect image to generate a first color difference image;
Performing second difference extraction blending for subtracting color information of the corresponding pixel of the effect image from color information of the pixel of the reference color image to generate a second color difference image;
Performing the addition α blending by adding the color information of the corresponding pixel of the first color difference image to the color information of the pixel of the original image,
A program characterized in that the subtractive α blending is performed by subtracting color information of corresponding pixels of the second color difference image from color information of pixels of the original image.
請求項1または2において、
前記基準色を構成する各色成分の輝度値が、同じ値に設定されていることを特徴とするプログラム。
In claim 1 or 2,
A program characterized in that the luminance value of each color component constituting the reference color is set to the same value.
請求項1〜3のいずれかにおいて、
前記基準色を構成する各色成分の輝度値が、元画像のピクセルの各色成分について設定可能な輝度値の最小値と最大値との中間の値に設定されていることを特徴とするプログラム。
In any one of Claims 1-3,
A program characterized in that the luminance value of each color component constituting the reference color is set to an intermediate value between the minimum and maximum luminance values that can be set for each color component of the pixel of the original image.
請求項1〜4のいずれかにおいて、
前記基準色が、グレーに設定されていることを特徴とするプログラム。
In any one of Claims 1-4,
A program characterized in that the reference color is set to gray.
請求項1〜5のいずれかにおいて、
前記元画像をグレースケール画像に変換するグレースケール変換部と、
前記元画像から変換されたグレースケール画像の各ピクセルの色情報に基づいて前記加算αブレンディング用のα値及び前記減算αブレンディング用のα値を設定するα値設定部として、
コンピュータを機能させることを特徴とするプログラム。
In any one of Claims 1-5,
A grayscale conversion unit for converting the original image into a grayscale image;
As an α value setting unit for setting the α value for the addition α blending and the α value for the subtraction α blending based on the color information of each pixel of the grayscale image converted from the original image,
A program characterized by causing a computer to function.
コンピュータにより読取可能な情報記憶媒体であって、請求項1〜6のいずれかに記載のプログラムを記憶することを特徴とする情報記憶媒体。   An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 6 is stored. 画像を生成するための画像生成システムであって、
オブジェクト空間を所与の視点から見た視界画像について元画像と該元画像に対応するエフェクト画像とを描画する描画部と、
前記元画像と前記エフェクト画像とをαブレンディングするαブレンディング部と、
を含み、
前記エフェクト画像の各ピクセルは、所与の基準色を分布中心とした色分布で描画されており、
前記αブレンディング部が、
前記エフェクト画像における前記基準色より明るい色のピクセルについては、該ピクセルの色と前記基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報に所与のα値に応じて加算される加算αブレンディングと、
前記エフェクト画像における前記基準色より暗い色のピクセルについては、該ピクセルの色と基準色との差分に相当する色情報が、元画像の対応ピクセルの色情報から所与のα値に応じて減算される減算αブレンディングと、
を行うことを特徴とする画像生成システム。
An image generation system for generating an image,
A drawing unit for drawing an original image and an effect image corresponding to the original image with respect to a view field image obtained by viewing the object space from a given viewpoint;
An α blending unit for α blending the original image and the effect image;
Including
Each pixel of the effect image is drawn with a color distribution centered on a given reference color,
The α blending part is
For pixels having a lighter color than the reference color in the effect image, the color information corresponding to the difference between the color of the pixel and the reference color is in accordance with the α value given to the color information of the corresponding pixel in the original image. Addition α blending to be added,
For pixels that are darker than the reference color in the effect image, the color information corresponding to the difference between the pixel color and the reference color is subtracted from the color information of the corresponding pixel in the original image according to a given α value. Subtracted alpha blending,
The image generation system characterized by performing.
JP2005071060A 2005-03-14 2005-03-14 Program, information storage medium, and image generation system Withdrawn JP2006252425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005071060A JP2006252425A (en) 2005-03-14 2005-03-14 Program, information storage medium, and image generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005071060A JP2006252425A (en) 2005-03-14 2005-03-14 Program, information storage medium, and image generation system

Publications (1)

Publication Number Publication Date
JP2006252425A true JP2006252425A (en) 2006-09-21

Family

ID=37092829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005071060A Withdrawn JP2006252425A (en) 2005-03-14 2005-03-14 Program, information storage medium, and image generation system

Country Status (1)

Country Link
JP (1) JP2006252425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100464569C (en) * 2007-04-17 2009-02-25 北京中星微电子有限公司 Method and system for adding special effects into image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100464569C (en) * 2007-04-17 2009-02-25 北京中星微电子有限公司 Method and system for adding special effects into image

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
JP4305903B2 (en) Image generation system, program, and information storage medium
JP4651527B2 (en) Program, information storage medium, and image generation system
JP2006252426A (en) Program, information storage medium, and image generation system
JP4749198B2 (en) Program, information storage medium, and image generation system
JP3280355B2 (en) Image generation system and information storage medium
JP2002279447A (en) Image generating system, program, and information storage medium
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4827250B2 (en) Program, information storage medium, and image generation system
JP4743770B2 (en) Image generation system, program, and information storage medium
JP2010055131A (en) Program, information storage medium, and image generation system
JP4632855B2 (en) Program, information storage medium, and image generation system
JP4861862B2 (en) Program, information storage medium, and image generation system
JP2006252423A (en) Program, information storage medium and image generation system
JP2007164651A (en) Program, information storage medium and image generation system
US7724255B2 (en) Program, information storage medium, and image generation system
JP2006277488A (en) Program, information storage medium and image generation system
JP2006252425A (en) Program, information storage medium, and image generation system
JP4641831B2 (en) Program, information storage medium, and image generation system
JP2010033302A (en) Image generation system, program and information storage medium
JP2004334801A (en) Image-generating system, program, and information storage medium
JP2008077406A (en) Image generation system, program, and information storage medium
JP2010033253A (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: 20080603