JP2006277488A - Program, information storage medium, and image generation system - Google Patents
Program, information storage medium, and image generation system Download PDFInfo
- Publication number
- JP2006277488A JP2006277488A JP2005097537A JP2005097537A JP2006277488A JP 2006277488 A JP2006277488 A JP 2006277488A JP 2005097537 A JP2005097537 A JP 2005097537A JP 2005097537 A JP2005097537 A JP 2005097537A JP 2006277488 A JP2006277488 A JP 2006277488A
- Authority
- JP
- Japan
- Prior art keywords
- color
- shadow
- image
- original
- component
- 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
Links
Images
Landscapes
- Image Generation (AREA)
Abstract
【課題】 手書きの絵画のように陰影や影を表現することができるプログラム、情報記憶媒体及び画像生成システムを提供する。
【解決手段】 透視変換後のオブジェクトを描画して元画像を生成し、元画像の各ピクセルの色である元色(Rw、Gw、Bw)に基づいて、元色に対応する影色(Rc、Gc、Bc)を設定し、オブジェクトの陰影情報を求めて、元色と、元色に対応する影色とを、陰影情報に基づいて合成する。
【選択図】 図3PROBLEM TO BE SOLVED: To provide a program, an information storage medium, and an image generation system capable of expressing shadows and shadows like a hand-drawn picture.
An original image is generated by drawing an object after perspective transformation, and a shadow color (Rc) corresponding to the original color is based on the original colors (Rw, Gw, Bw) that are the colors of each pixel of the original image. , Gc, Bc), the shadow information of the object is obtained, and the original color and the shadow color corresponding to the original color are combined based on the shadow information.
[Selection] Figure 3
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 viewed from a virtual camera (a given viewpoint) in an object space that is a virtual three-dimensional space is known. 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.
また近年、仮想現実感を追求した画像を生成するフォトリアルレンダリングに対して、例えばトゥーンシェーディングなどのような漫画や絵画を模した手書き調の画像を生成するノンフォトリアリスティックレンダリング(NPR)が注目されており、さまざまな画像生成手法が開発されている。 In recent years, non-photorealistic rendering (NPR) that generates hand-drawn images simulating cartoons and paintings such as toon shading has attracted attention, in contrast to photoreal rendering that generates images that pursue virtual reality. Various image generation methods have been developed.
このような画像生成手法において、例えば、キャラクタや背景の画像を生成する場合に、陰(シェード;Shade)や影(シャドウ;Shadow)をオブジェクトに付与した際に、オブジェクトを表現する色が黒色などの特定の色方向に減色した色で偏って表現されていた。特に手書き調の表現を行おうとする場合、陰の色や影の色を決定するプロセスは人間の視覚特性によるところが大きく、従来の考え方では、このような特性に基づく色表現を実現する手法が見出されていなかった。 In such an image generation method, for example, when generating an image of a character or a background, when a shade or shadow is given to an object, the color representing the object is black or the like. It was expressed with a biased color in a specific color direction. The process of determining shades and shadows depends largely on human visual characteristics, especially when trying to create hand-drawn expressions, and conventional methods have found methods that realize color expression based on these characteristics. It was not put out.
本発明は、上記事情に鑑みてなされたものであり、その目的は、手書きの絵画のように陰影や影を表現することができるプログラム、情報記憶媒体及び画像生成システムを提供することにある。 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 an image generation system that can express shadows and shadows like a hand-drawn picture.
本発明は、オブジェクト空間を所与の視点から見た画像を生成するための画像生成システムであって、透視変換後のオブジェクトを描画して元画像を生成する描画部と、前記元画像の各ピクセルの色である元色に基づいて、該元色に対応する影色を設定する影色設定部と、前記オブジェクトの陰影情報を求める陰影情報演算部と、前記元色と、該元色に対応する前記影色とを、前記陰影情報に基づいて合成する色合成部と、を含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータにより読取可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。 The present invention is an image generation system for generating an image in which an object space is viewed from a given viewpoint, a drawing unit that draws an object after perspective transformation to generate an original image, and each of the original images Based on an original color that is a pixel color, a shadow color setting unit that sets a shadow color corresponding to the original color, a shadow information calculation unit that obtains shadow information of the object, the original color, and the original color The present invention relates to an image generation system including a color composition unit that composes the corresponding shadow color based on the shadow information. 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.
陰影情報は、オブジェクト空間にオブジェクトを配置したときに、光源からの光線とオブジェクトのなす角度に応じて、そのオブジェクト自体に現れる陰(シェード)の部分の輝度や、そのオブジェクトの影響を受けて他のオブジェクトに現れる影(シャドウ)の部分の輝度に基づいて求められる情報である。従って、本明細書では、陰影という場合、陰(シェード)と影(シャドウ)とを含む用語として用いる。 Shading information depends on the brightness of the shaded part that appears in the object itself and the influence of the object, depending on the angle between the light beam from the light source and the object when the object is placed in the object space. This information is obtained based on the brightness of the shadow portion appearing in the object. Accordingly, in this specification, the term “shadow” is used as a term including a shade and a shadow.
本発明によれば、元色(元画像のピクセルの描画色)に対応した影色が設定される。影色は、元色を単調減色したものではなく、元色の明るさに応じて色ごとに設定される色である。そして、本発明では、光源計算などによって求められたオブジェクトの陰影情報に基づき、元色と影色とを合成することによって、オブジェクトに対して、手書きの絵画のように陰影を施した画像を生成することができる。 According to the present invention, the shadow color corresponding to the original color (the drawing color of the pixels of the original image) is set. The shadow color is not a monotonous color reduction of the original color but a color set for each color according to the brightness of the original color. In the present invention, based on the shadow information of the object obtained by light source calculation or the like, the original color and the shadow color are combined to generate an image in which the object is shaded like a hand-drawn picture. can do.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影色設定部が、前記元色を構成するRGB表色系の各色成分に所与の変換係数を乗算する処理を行って前記影色を設定し、R成分に乗算される前記変換係数をKr、G成分に乗算される前記変換係数をKg、B成分に乗算される前記変換係数をKbとすると、Kb>Kr>Kgの関係を有していてもよい。また影色は、上記影色設定手法に基づいて求められていてもよい。このようにすれば、RGB表色系の色成分において、人が色の明るさの変化を敏感に感じやすいG成分ほど大きく減色されるようになり、あたかも人間の感性に基づいて選択されたかのような影色を設定することができる。 In the image generation system, the program, and the information storage medium according to the present invention, the shadow color setting unit performs a process of multiplying each color component of the RGB color system constituting the original color by a given conversion coefficient to perform the shadow color setting. When a color is set and the conversion coefficient to be multiplied by the R component is Kr, the conversion coefficient to be multiplied by the G component is Kg, and the conversion coefficient to be multiplied by the B component is Kb, the relationship of Kb> Kr> Kg You may have. The shadow color may be obtained based on the shadow color setting method. In this way, in the color components of the RGB color system, the G component that is more sensitive to humans' sensitivity to color brightness is reduced more greatly, as if it was selected based on human sensitivity. A simple shadow color can be set.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影色設定部が、前記変換係数を乗算して求められた各色成分の値に対して、さらに所与の補正係数Br、Bg、Bbを累乗する累乗補正をして、累乗補正後の各色成分の値に基づき、前記影色を設定するようにしてもよい。また影色は、上記影色設定手法に基づいて求められていてもよい。元色の明るさに応じて影色を設定しても、全ての元色に対して適切な影色が設定できるわけではなく、ごく一部の元色に対しては不自然な影色が設定されてしまうことがある。しかし、変換後の値に補正係数を累乗するようにすれば、不自然な色で設定されてしまうおそれのある色についても人間の視覚特性に応じた自然な色合いに影色を補正することができる。 In the image generation system, the program, and the information storage medium of the present invention, the shadow color setting unit further applies given correction coefficients Br, Bg, and B to the values of the respective color components obtained by multiplying the conversion coefficients. The shadow color may be set based on the value of each color component after the power correction by correcting the power to a power of Bb. The shadow color may be obtained based on the shadow color setting method. Even if the shadow color is set according to the brightness of the original color, it is not possible to set an appropriate shadow color for all the original colors, and an unnatural shadow color for a small part of the original colors. It may be set. However, if the correction coefficient is raised to the power of the converted value, the shadow color can be corrected to a natural color according to human visual characteristics even for a color that may be set with an unnatural color. it can.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影色設定部が、前記変換係数を乗算して求められた各色成分の値と、前記累乗補正後の各色成分の値とを、前記元色の明度に応じて設定される所与の補間パラメータLに基づいて線形補間し、線形補間後の値に基づき前記影色を設定するようにしてもよい。また影色は、上記影色設定手法に基づいて求められていてもよい。このようにすれば、元色が明るい色であるほど累乗補正の効果を強くすることができ、自然な色合いの影色を設定することができるようになる。 In the image generation system, the program, and the information storage medium of the present invention, the shadow color setting unit calculates the value of each color component obtained by multiplying the conversion coefficient and the value of each color component after the power correction, Linear interpolation may be performed based on a given interpolation parameter L set according to the lightness of the original color, and the shadow color may be set based on a value after linear interpolation. The shadow color may be obtained based on the shadow color setting method. In this way, the brighter the original color, the stronger the effect of power correction, and the natural shaded shadow color can be set.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影色設定部が、前記元色を構成するRGB表色系の各色成分の最大値及び最小値に基づいて前記補間パラメータLを求めるようにしてもよい。また影色は、上記影色設定手法に基づいて求められていてもよい。このようにすれば、元色の明度に応じて値が変化する補間パラメータLを求めることができる。 In the image generation system, program, and information storage medium of the present invention, the shadow color setting unit obtains the interpolation parameter L based on the maximum value and the minimum value of each color component of the RGB color system constituting the original color. You may do it. The shadow color may be obtained based on the shadow color setting method. In this way, the interpolation parameter L whose value changes according to the lightness of the original color can be obtained.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記影色設定部が、前記変換係数を乗算して求められた色成分からなる色変換画像と、前記色変換画像のピクセルの色成分を累乗補正した色成分からなる色補正画像とを、前記補間パラメータLをα値としてαブレンディングするようにしてもよい。また影色は、上記影色設定手法に基づいて求められていてもよい。このようにすれば、αブレンディングという簡便な処理で元色に対応する適切な影色を設定することができる。 In the image generation system, the program, and the information storage medium of the present invention, the shadow color setting unit includes a color conversion image including color components obtained by multiplying the conversion coefficient, and color components of pixels of the color conversion image. A color-corrected image made up of color components obtained by correcting the power of may be α-blended using the interpolation parameter L as an α value. The shadow color may be obtained based on the shadow color setting method. In this way, an appropriate shadow color corresponding to the original color can be set by a simple process called α blending.
また本発明の画像生成システム、プログラム及び情報記憶媒体では、前記色合成部が、前記元画像と、前記元画像の各ピクセルを前記影色で描画した影色画像とを、前記陰影情報から得られるα値を用いてαブレンディングするようにしてもよい。このようにすれば、αブレンディングという簡便な処理で影色による陰影や影を施したオブジェクトを表現した画像を生成することができる。 In the image generation system, the program, and the information storage medium of the present invention, the color composition unit obtains the original image and a shadow color image in which each pixel of the original image is drawn with the shadow color from the shadow information. Α blending may be performed using the obtained α value. In this way, it is possible to generate an image that expresses a shadow or shadowed object by a shadow color by a simple process called α blending.
また本発明は、オブジェクト空間を所与の視点から見た画像を生成するための画像生成システムであって、透視変換後のオブジェクトにテクスチャをマッピングするテクスチャマッピング部と、前記テクスチャがマッピングされたオブジェクトを描画して画像を生成する描画部と、を含み、前記テクスチャマッピング部が、所与の元色を用いて生成された前記オブジェクトの元画像と、前記元色に対応する影色を用いて生成された前記オブジェクトの影色画像とを、前記オブジェクトの陰影情報に基づいて、αブレンディングすることにより生成された前記テクスチャをテクスチャマッピングする画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータにより読取可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。本発明によれば、オブジェクトに対して、手書きの絵画のように陰影を施した画像を生成することができる。 The present invention also relates to an image generation system for generating an image of an object space viewed from a given viewpoint, a texture mapping unit that maps a texture to a perspective-transformed object, and an object to which the texture is mapped A drawing unit that generates an image by drawing the image, the texture mapping unit using an original image of the object generated using a given original color and a shadow color corresponding to the original color The present invention relates to an image generation system that texture-maps the texture generated by subjecting the generated shadow color image of the object to α blending based on the shadow information of the object. 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. According to the present invention, it is possible to generate an image in which an object is shaded like a hand-drawn picture.
以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。 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
情報記憶媒体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
表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などにより実現できる。音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどにより実現できる。
The
携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などがある。通信部196は外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。
The portable
なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部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
処理部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
処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、画像生成部120、音生成部130を含む。なおこれらの一部を省略する構成としてもよい。
The
オブジェクト空間設定部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 /
仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置や視線方向を制御する処理)を行う。
The virtual
例えば仮想カメラによりオブジェクト(例えばキャラクタ、ボール、車)を後方から撮影する場合には、オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部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 /
画像生成部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まず、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、透視変換、或いは光源計算等のジオメトリ処理が行われ、その処理結果に基づいて、描画データ(オブジェクトの頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)が作成される。描画データは、主記憶部172に保存される。そして、この描画データ(オブジェクトデータ)に基づいて、透視変換後(ジオメトリ処理後)のオブジェクト(1又は複数プリミティブ面)を描画バッファ174(フレームバッファ、ワークバッファ(中間バッファ)等。ピクセル単位で画像情報を記憶できるバッファ。VRAM)に描画する。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として1画面に表示できるように生成する。
The
画像生成部120は、頂点シェーダ120VSおよびピクセルシェーダ120PSを含む。
The
頂点シェーダ120VSは、オブジェクトの各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含む頂点リストが入力され、入力された頂点リストに含まれる頂点データに基づいて、頂点シェーディング(広義には、頂点処理)を行う。なお頂点シェーディングを行う際に、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。また頂点シェーディングでは、頂点シェーダプログラム(広義には、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データが変更(更新、調整)される。そして、頂点シェーディング後の頂点データに基づいてラスタライズ(走査変換)が行われる。 The vertex shader 120VS receives a vertex list including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object, and vertex data included in the input vertex list Based on this, vertex shading (vertex processing in a broad sense) is performed. When performing vertex shading, vertex generation processing (tessellation, curved surface division, polygon division) for subdividing a polygon may be performed as necessary. In vertex shading, according to a vertex shader program (first shader program in a broad sense), vertex movement processing, coordinate conversion (world coordinate conversion, camera coordinate conversion), clipping processing, or geometric processing such as perspective conversion are performed. Based on the processing result, the vertex data given to the vertex group constituting the object is changed (updated or adjusted). Then, rasterization (scan conversion) is performed based on the vertex data after the vertex shading.
ピクセルシェーダ120PSは、画像を構成するピクセル(画面を構成するフラグメント)を描画するピクセルシェーディング(広義には、ピクセル処理、フラグメント処理)を行う。ピクセルシェーディングでは、ピクセルシェーダプログラム(第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色データ(輝度値、α値)の設定/変更、αブレンディング(半透明合成)、アンチエイリアス等の各種処理を行って、最終的な表示画像のピクセルの描画色を決定し、透視変換されたオブジェクトの描画色を描画バッファ174(フレームバッファやワークバッファ(中間バッファ)などのピクセル単位で画像情報を記憶できるバッファ。VRAM)に出力(描画)する。すなわち、ピクセルシェーディングでは、ピクセル単位で画像情報(色、法線、輝度、α値等)を設定あるいは変更する処理を行う。 The pixel shader 120PS performs pixel shading (pixel processing and fragment processing in a broad sense) that draws pixels (fragments that configure a screen) that configure an image. In pixel shading, according to the pixel shader program (second shader program), texture reading (texture mapping), setting / changing of color data (luminance value, α value), α blending (translucent composition), anti-aliasing, etc. Processing is performed to determine the pixel drawing color of the final display image, and the drawing color of the perspective-converted object is stored in pixel units such as the drawing buffer 174 (frame buffer or work buffer (intermediate buffer)). Output (drawing) to a VRAM. That is, in pixel shading, processing for setting or changing image information (color, normal, luminance, α value, etc.) is performed in units of pixels.
ピクセルシェーダ120PSは、陰影情報演算部121、影色設定部123、色合成部125、描画部127を含む。
The pixel shader 120PS includes a shadow
陰影情報演算部121は、頂点シェーダ120VSで行われた光源計算の結果得られる頂点ごとの陰影情報に基づいて、オブジェクトの描画ピクセルごとの陰影情報を演算する処理を行う。具体的には、輝度情報(広義には、色情報)や法線ベクトル情報を走査線情報に基づいて線形補間処理するなどして、ピクセル単位での陰影情報を求めることができる。
The shadow
影色設定部123は、元色(元画像の各ピクセルの色)に基づいて、元色に対応する影色を設定する処理を行う。具体的には、元色を構成するRGB成分についての色情報(輝度情報)に所与の変換係数を乗算する処理を行って、影色を構成するRGB成分についての色情報(輝度情報)を求める処理を行う。変換係数は、R成分(広義には、第1の色成分)、G成分(広義には、第2の色成分)、B成分(広義には、第3の色成分)の各色成分に対して固有の係数Kr,Kg,Kbを与えることができる。また影色を設定する際には、上記変換係数を乗算したRGB成分の値に対して、さらに所与の補正係数を累乗する累乗補正を行ってもよい。補正係数は、R成分、G成分、B成分の各色成分に対して固有の係数Br,Bg,Bbを与えることができる。また上記変換係数を乗算したRGB成分の値と、上記累乗補正後のRGB成分の値とを、所与の補間パラメータLに基づいて線形補間することにより、影色を構成するRGB成分の色情報を求めるようにしてもよい。線形補間は、上記補間パラメータLをα値としたαブレンディングによって実現することができる。補間パラメータLは、例えば、元色の明度に応じた値とすることができる。
The shadow
色合成部125は、ピクセルシェーダ120PSのαブレンディング機能を利用して、元画像と元画像の各ピクセルを影色で描画した影色画像とを陰影情報に基づいて合成する。すなわち、色合成部125は、陰影情報から得られるα値を用いて、元画像のピクセルの色である元色と、影色画像のピクセルの色である影色とをピクセル単位で合成する色合成処理を行う。なお、ここでいう「色を合成する」という概念は、元画像におけるオブジェクトの陰影部分に対応する描画ピクセルを元色に対応する影色に入れ替えることも含むものとする。すなわち、α値に基づいて、元色と影色とを合成する場合に、描画ピクセルへの一方の色の適用率が0%であっても、「合成」という用語を用いるものとする。
The
なおαブレンディングとは、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。例えば通常αブレンディングの場合には下式(1)〜(3)の処理を行う。 Note that α blending is a translucent composition process (usually α blending, addition α blending, subtraction α blending, or the like) based on an α value (A value). For example, in the case of normal α blending, the following processes (1) to (3) are performed.
RQ=(1−α)*R1+α*R2 (1)
GQ=(1−α)*G1+α*G2 (2)
BQ=(1−α)*B1+α*B2 (3)
また、加算αブレンディングの場合には下式(4)〜(6)の処理を行う。
R Q = (1−α) * R 1 + α * R 2 (1)
G Q = (1−α) * G 1 + α * G 2 (2)
B Q = (1−α) * B 1 + α * B 2 (3)
In addition, in the case of addition α blending, the following expressions (4) to (6) are performed.
RQ=R1+α*R2 (4)
GQ=G1+α*G2 (5)
BQ=B1+α*B2 (6)
また、減算αブレンディングの場合には下式(7)〜(9)の処理を行う。
R Q = R 1 + α * R 2 (4)
G Q = G 1 + α * G 2 (5)
B Q = B 1 + α * B 2 (6)
In the case of subtractive α blending, the processing of the following equations (7) to (9) is performed.
RQ=R1−α*R2 (7)
GQ=G1−α*G2 (8)
BQ=B1−α*B2 (9)
ここで、R1、G1、B1は、描画バッファ174に既に描画されている画像(元画像)のRGB成分であり、R2、G2、B2は、描画バッファ174に描画すべき画像(影色画像)のRGB成分である。また、RQ、GQ、BQは、αブレンディングにより得られる画像のRGB成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。
R Q = R 1 −α * R 2 (7)
G Q = G 1 −α * G 2 (8)
B Q = B 1 −α * B 2 (9)
Here, R 1 , G 1 , B 1 are RGB components of an image (original image) already drawn in the
描画部127は、オブジェクトの描画処理を行う。具体的には、ジオメトリ処理により作成された描画データ(プリミティブ面データ)に基づいて、透視変換後(スクリーン座標変換後)のオブジェクト(1又は複数のプリミティブ面)を描画バッファ174(フレームバッファ、ワークバッファ(中間バッファ)等)に描画する。これにより、オブジェクト空間内において仮想カメラから見える画像を生成する。描画部126は、オブジェクトに対して通常のテクスチャをマッピングした元画像をフレームバッファに描画する。
The
音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。
The
なお、本実施形態の画像生成システムは、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に本実施形態の画像生成システムの機能ブロックの変形例を示す。図1の機能ブロックは、リアルタイムに(フレーム更新ごとに)オブジェクトの陰影情報を計算して、影色を設定する手法に適しているが、図2に示すシステムでは、予め元色で作成された画像と元色に対応する影色で作成された画像とをオブジェクトの陰影情報に基づいて合成することにより作成したテクスチャを透視変換されたオブジェクトにテクスチャマッピングすることによって、画像を生成する。元色で作成した画像と影色で作成した画像とを合成したテクスチャは、テクスチャ記憶部176に格納しておく。この図2に示される画像生成システムは、例えば、光源位置が固定された背景の画像を作成する際に、背景オブジェクトにマッピングされるテクスチャを予め作成しておく場合等に適している。なおキャラクタオブジェクトに対してマッピングされるテクスチャに適用してもよい。以下、図1に示す機能ブロックとの主要な相違点について説明する。具体的には、画像生成部120の機能について説明する。なお描画部127については、図1に示す画像生成システムと同様の機能を有するため、詳細な説明は省略する。
FIG. 2 shows a modification of the functional block of the image generation system of this embodiment. The function block of FIG. 1 is suitable for a method of calculating shadow information of an object and setting a shadow color in real time (every frame update). However, in the system shown in FIG. An image is generated by texture-mapping a texture created by combining an image and an image created with a shadow color corresponding to the original color based on the shadow information of the object onto a perspective-transformed object. The texture obtained by combining the image created with the original color and the image created with the shadow color is stored in the
図2に示される画像生成システムでは、画像生成部120が、ジオメトリ処理部122、テクスチャマッピング部124、描画部127を含む。すなわちジオメトリ処理部122が、オブジェクトをスクリーン座標系に透視変換し、テクスチャマッピング部124が、透視変換されたオブジェクトに所与のテクスチャをマッピングする。描画部127は、テクスチャがマッピングされたオブジェクトの画像を描画バッファ174に描画する。
In the image generation system illustrated in FIG. 2, the
ジオメトリ処理部122は、オブジェクトに対してジオメトリ処理を行う。より具体的には、座標変換、クリッピング処理、透視変換、或いは光源計算等のジオメトリ処理を行う。そして、ジオメトリ処理後(透視変換後)のオブジェクトデータ(オブジェクトの頂点の位置座標、テクスチャ座標、色データ、法線ベクトル、或いはα値等)は、記憶部170の主記憶部172に保存される。
The
テクスチャマッピング部124は、テクスチャ記憶部176に記憶されるテクスチャ(テクセル値)をオブジェクトにマッピングするための処理を行う。具体的には、オブジェクトの頂点に設定(付与)されるテクスチャ座標等を用いてテクスチャ記憶部176からテクスチャ(色、α値などの表面プロパティ)を読み出す。そして、2次元の画像であるテクスチャをオブジェクトにマッピングする。この場合に、ピクセルとテクセルとを対応づける処理やバイリニア補間(テクセル補間)などを行う。図2に示される画像生成システムでは、テクスチャ記憶部176に、元色と元色に対応する影色を用いて、シェーディングやシャドウイングが施されたオブジェクトを表現するためのテクスチャが記憶されている。
The
2.本実施形態の手法
次に本実施形態の手法について図面を用いて説明する。
2. Next, the method of this embodiment will be described with reference to the drawings.
2.1 影色を用いた色合成手法
本実施形態では、元画像のピクセルの描画色ごとに設定される影色を用いて、元画像のピクセルの描画色とその色に対応する影色とをオブジェクトの陰影情報に基づいて合成する色合成手法を採用する。以下、図3を用いて、具体的に説明する。
2.1 Color Composition Method Using Shadow Color In this embodiment, the shadow color set for each pixel drawing color of the original image is used to determine the pixel drawing color of the original image and the shadow color corresponding to that color. A color composition method is employed to synthesize the image based on the shadow information of the object. Hereinafter, this will be specifically described with reference to FIG.
まず元画像としてオブジェクトに模様のみのテクスチャをマッピングした画像を作成する。「模様のみ」というのは、シェーディング(陰影付け)やシャドウイング(影付け)を行っていないということである。この元画像の各ピクセルの色を元色とする。また、元画像のαプレーンには、オブジェクトに対して光源計算の結果得られた陰影情報をα値として設定した陰影画像を作成する。なお、元画像および陰影画像はフレームバッファに描画しておくことができる。なお必要に応じて、ワークバッファに描画してもよい。この陰影画像は、光源計算の結果明るい部分であるほど値が高く(1に近づく)、暗い部分であるほど値が低く(0に近づく)なるようにα値を設定したグレースケール画像である。なお、陰影情報は、元色及び影色の適用率を決めるパラメータであるので、極端な例としては、2値化されていてもよく、陰影部分(α=0)、非陰影部分(α=1)としてもよい。このようにした場合には、元色で描画されたピクセルと影色で描画されたピクセルとの入れ替え処理により最終画像が作成される。 First, an image in which a texture with only a pattern is mapped to an object is created as an original image. “Pattern only” means that no shading or shadowing is performed. The color of each pixel of this original image is the original color. Further, a shadow image in which the shadow information obtained as a result of light source calculation for the object is set as an α value is created on the α plane of the original image. The original image and the shadow image can be drawn in the frame buffer. If necessary, it may be drawn in the work buffer. This shaded image is a grayscale image in which the α value is set so that the brighter the result of light source calculation, the higher the value (closer to 1) and the darker the value (closer to 0). Since the shadow information is a parameter that determines the application rate of the original color and the shadow color, as an extreme example, it may be binarized, and a shadow part (α = 0), a non-shadow part (α = 1). In this case, a final image is created by a process of replacing pixels drawn with the original color and pixels drawn with the shadow color.
次に、元画像から影色画像を作成するために、元画像のコピー画像を作成しておく。コピー画像は、フレームバッファとは異なるワークバッファに描画しておくことができる。そして、元画像のコピー画像の描画ピクセルの色に対応する影色を求めて、影色画像を作成する。影色画像は、元画像のコピー画像を描画したワークバッファに重ねて描画してもよいし、別のワークバッファに描画してもよい。 Next, in order to create a shadow color image from the original image, a copy image of the original image is created. The copy image can be drawn in a work buffer different from the frame buffer. Then, a shadow color corresponding to the color of the drawing pixel of the copy image of the original image is obtained to create a shadow color image. The shadow color image may be drawn over a work buffer in which a copy image of the original image is drawn, or may be drawn in another work buffer.
次に、元画像と影色画像とを、元画像のαプレーンに描かれた陰影画像の陰影情報を参照して、αブレンディングによりピクセル単位で合成していき、オブジェクトの陰影部分が元色と影色との合成色で描画された画像を生成することができる。具体的には、元画像の色情報を(Rw,Gw,Bw)とし、影色画像の色情報を(Rc、Gc、Bc)とすると、最終的に得られるオブジェクトの画像の色情報(Rn、Gn、Bn)は下式(A1)〜(A3)により求められる。 Next, referring to the shadow information of the shadow image drawn on the α plane of the original image, the original image and the shadow color image are synthesized in units of pixels by α blending. An image drawn with a composite color with the shadow color can be generated. Specifically, assuming that the color information of the original image is (Rw, Gw, Bw) and the color information of the shadow color image is (Rc, Gc, Bc), the color information (Rn) of the finally obtained object image , Gn, Bn) are determined by the following formulas (A1) to (A3).
Rn=Rw*α+Rc*(1−α) (A1)
Gn=Gw*α+Gc*(1−α) (A2)
Bn=Bw*α+Bc*(1−α) (A3)
従来の考え方で陰影表現を行うと、単純に元画像の色(元色)と陰影画像の色(グレースケール色)とを掛け合わせる処理となるため、オブジェクトに施される陰影はきれいな陰影の色にならず、全体的に黒っぽく落ち込んだ色となってしまう。しかしながら、本実施形態の色合成手法によれば、元色を単調減色したものではなく、元色の明るさに応じて色ごとに設定され影色を用いた陰影表現が可能となる。そして、本実施形態の色合成手法によれば、光源計算などによって求められたオブジェクトの陰影情報に基づき、元画像と影色画像とのαブレンディングを利用して元色と影色とを合成するという簡便な処理によって、オブジェクトに対して、手書きの絵画のように陰影を施した画像を生成することができる。
Rn = Rw * α + Rc * (1-α) (A1)
Gn = Gw * α + Gc * (1−α) (A2)
Bn = Bw * α + Bc * (1−α) (A3)
When shadow expression is performed according to the conventional concept, the process simply multiplies the color of the original image (original color) and the color of the shadow image (grayscale color). Instead, the overall color becomes dark and dark. However, according to the color composition method of the present embodiment, the original color is not monotonously reduced, and shadow expression using a shadow color set for each color according to the brightness of the original color is possible. Then, according to the color composition method of the present embodiment, based on the shadow information of the object obtained by light source calculation or the like, the original color and the shadow color are synthesized by using α blending of the original image and the shadow color image. With this simple process, it is possible to generate an image in which the object is shaded like a hand-drawn picture.
2.2 影色の設定手法
また本実施形態では、影色(Rc、Gc、Bc)を元画像の描画ピクセルの色(元色(Rw、Gw、Bw))から求める影色設定手法を採用する。
2.2 Shadow Color Setting Method In this embodiment, a shadow color setting method for determining the shadow color (Rc, Gc, Bc) from the color of the drawing pixel of the original image (original color (Rw, Gw, Bw)) is adopted. To do.
具体的には、図4に示すように、元色を構成するRGB表色系の各色成分に所与の変換係数Kr,Kg,Kbを乗算する処理を行って影色を設定することができる。すなわち、第1のワークバッファに描画された元画像のコピー画像(Rw、Gw、Bw)に基づいて色変換画像(R1、G1、B1)を作成する。この色変換画像は、元画像のコピー画像とは異なるバッファ(第2のワークバッファ)に描画しておくことができる。この場合、元色のR成分(Rw)に乗算される変換係数をKr、元色のG成分(Gw)に乗算される変換係数をKg、元色のB成分(Bw)に乗算される変換係数をKbとすると、Kb>Kr>Kgの関係を有するような変換係数を元画像のピクセルのRGB成分についての色情報(輝度情報)に乗算する。例えば、RGB成分をグレースケール変換する際の変換式における各成分に乗算される係数をGr(〜0.299)、Gg(〜0.587)、Gb(〜0.114)とすると、これらの係数Gr、Gg、Gbに基づき、変換係数Kr、Kg、Kbを求めることができる。具体的には、Kr=1−Gr(〜0.701)、Kg=1−Gg(〜0.413)、Kb=1−Gb(〜0.886)とすることができる。 Specifically, as shown in FIG. 4, a shadow color can be set by performing a process of multiplying each color component of the RGB color system constituting the original color by a given conversion coefficient Kr, Kg, Kb. . That is, the color conversion image (R1, G1, B1) is created based on the copy image (Rw, Gw, Bw) of the original image drawn in the first work buffer. This color-converted image can be drawn in a buffer (second work buffer) different from the copy image of the original image. In this case, the conversion coefficient multiplied by the R component (Rw) of the original color is Kr, the conversion coefficient multiplied by the G component (Gw) of the original color is Kg, and the conversion is multiplied by the B component (Bw) of the original color. Assuming that the coefficient is Kb, color information (luminance information) about the RGB components of the pixels of the original image is multiplied by a conversion coefficient having a relationship of Kb> Kr> Kg. For example, if the coefficients multiplied by the respective components in the conversion formula when converting the RGB components to gray scale are Gr (˜0.299), Gg (˜0.587), and Gb (˜0.114), Based on the coefficients Gr, Gg, and Gb, conversion coefficients Kr, Kg, and Kb can be obtained. Specifically, Kr = 1−Gr (˜0.701), Kg = 1−Gg (˜0.413), and Kb = 1−Gb (˜0.886).
このようにグレースケール変換時に各色成分に乗算される係数の割合に応じて、各色成分の減色の度合いを決定するようにしたのは、以下の理由からである。 The reason for determining the degree of color reduction of each color component in accordance with the ratio of the coefficient multiplied to each color component at the time of gray scale conversion is as follows.
まず手書きの絵画では、例えば、元色が白色である場合には、その部分に表される陰影は必ずしも黒色や灰色ではなく赤みがかった色や、青みがかった色で表現されることが多い。また元色が肌色である場合には、陰影の色は、肌色を単純に黒方向に減色した色ではなく、赤みがかった色で表現されることが多い。これは例えば、物体が壁際にあるときの影の色は、光が壁に反射してあたる光を受けていて、反射光は、壁の色、例えば赤い色の壁であればその赤色の影響を受けた色の影が見えるというのが現実の世界での現象に近いと考えられる。また例えば、机の上にある物体については、机の色の影響を受けた影の色が見えるはずである。このように陰影の色表現は作者の感性、すなわち人間の視覚特性に依存するところが大きいため、本願発明者らは、手書きの絵画では、作者の画風によって陰影の色表現に法則性があるであろうと考えた。またグレースケール画像では、元色の明るさに応じてグレースケール変換色の輝度が設定される。また人間の視覚特性は、一般に色味の変化よりも明るさの変化に対して敏感である。これらの事実から、本願発明者らは、RGB表色系の各色成分において、G成分が最も元色の明るさに影響を与えており、R成分、B成分と順に元色の明るさへの寄与度が少ないと考えた。そして、元色のRGB成分の各色成分をグレースケール変換係数の値の大きさに応じて減色させると、実際に人間が元色に対応する影色として選択するであろう色を設定できるのではないかと考察した。すなわち、元色を減色する(輝度を下げる)に際して、色の明るさに関して影響の少ない色成分は人の感性においても影色を決定する場合に影響度が低いという考え方である。そこで、本手法のように、元色の各色成分に乗算される変換係数Kr,Kg,KbをKb>Kr>Kgの関係を有するように設定することにより、元色のG成分が最も減色され、G成分、R成分、B成分の順に減色の度合いが小さくなり、適切な影色を設定することができ、画像の質感を飛躍的に向上させることができる。 First, in hand-drawn paintings, for example, when the original color is white, the shadow represented in that part is often expressed in a reddish or bluish color instead of black or gray. When the original color is a skin color, the shadow color is often expressed as a reddish color rather than a color obtained by simply reducing the skin color in the black direction. This is because, for example, the shadow color when the object is near the wall receives the light reflected by the wall, and the reflected light is affected by the red color of the wall color, for example, a red wall. It is thought that it is close to the phenomenon in the real world that the shadow of the received color can be seen. For example, for an object on a desk, a shadow color affected by the color of the desk should be visible. In this way, the color expression of the shadow largely depends on the sensibility of the author, that is, the visual characteristics of the human being.Therefore, in the handwritten painting, the inventors of the present invention have a law in the color expression of the shadow depending on the style of the author. I thought about it. In the gray scale image, the brightness of the gray scale conversion color is set according to the brightness of the original color. Human visual characteristics are generally more sensitive to changes in brightness than to changes in color. From these facts, the inventors of the present invention have the G component that most influences the brightness of the original color in each color component of the RGB color system, and the brightness of the original color in order of the R component and the B component. We thought that there was little contribution. If each color component of the RGB components of the original color is reduced according to the value of the gray scale conversion coefficient, it is possible to set a color that a human will actually select as a shadow color corresponding to the original color. I considered it. That is, when reducing the original color (decreasing luminance), the color component that has little influence on the brightness of the color has a low influence when determining the shadow color in human sensitivity. Therefore, as in this method, by setting the conversion coefficients Kr, Kg, and Kb multiplied by the respective color components of the original color so as to have a relationship of Kb> Kr> Kg, the G component of the original color is most reduced. , G component, R component, and B component are reduced in the order of color reduction, an appropriate shadow color can be set, and the texture of the image can be drastically improved.
しかしながら、上記のようにRGB表色系の各色成分の明るさへの影響度に応じて元色に対応する影色を画一的に求めたのでは、一部の元色については適切な影色とならない場合がある。そこで、影色が明るい色であるほどその補正量が大きくなるように色補正をするようにしてもよい。具体的には、図4に示すように、上記変換係数Kr,Kg,Kbを乗算したRGB色成分の値(R1、G1、B1)に対して、さらに所与の補正係数Br,Bg,Bbを累乗する累乗補正を行ってもよい。すなわち、第2のワークバッファに描画された色変換画像(R1、G1、B1)に基づいて色補正画像(R2、G2、B2)を作成する。この色補正画像は、色変換画像とは異なるバッファ(第1のワークバッファ)に描画しておくことができる。このようにすれば、不自然な色で設定されてしまうおそれのある色についても人間の視覚特性に応じた自然な色合いに影色を補正することができる。なお累乗補正を行う場合には、例えば、R成分の値(R1)やB成分の値(B1)がG成分の値(G1)に比べて大きく補正されるようにBr,Bg、Bbを設定することができる。 However, if the shadow color corresponding to the original color is uniformly determined according to the influence of the brightness of each color component of the RGB color system as described above, an appropriate shadow is obtained for some of the original colors. It may not be a color. Therefore, color correction may be performed so that the lighter the shadow color, the larger the correction amount. Specifically, as shown in FIG. 4, given correction coefficients Br, Bg, Bb are further added to the RGB color component values (R1, G1, B1) multiplied by the conversion coefficients Kr, Kg, Kb. Power correction that raises to a power may be performed. That is, the color correction image (R2, G2, B2) is created based on the color conversion image (R1, G1, B1) drawn in the second work buffer. This color correction image can be drawn in a different buffer (first work buffer) from the color conversion image. In this way, the shadow color can be corrected to a natural hue according to human visual characteristics even for a color that may be set with an unnatural color. When power correction is performed, for example, Br, Bg, and Bb are set so that the R component value (R1) and the B component value (B1) are corrected to be larger than the G component value (G1). can do.
また影色を設定する際には、図4に示すように、変換係数Kr,Kg,Kbを乗算して求められた各色成分の値(R1、G1、B1)と、累乗補正後の各色成分の値(R2、G2、B2)とを、元色(元画像を構成する各ピクセルの描画色)の明度に応じて設定される所与の補間パラメータLに基づいて線形補間(例えば、αブレンディング)するようにしてもよい。この場合、線形補間後の値(Rc、Gc、Bc)に基づき影色が設定される。なお補間パラメータLは、元画像を構成する各ピクセルの色を構成する各色成分の最大値及び最小値に基づいて求められる。例えば、RGB表色系の色成分をHLS表色系の色成分に変換する処理を行えば、HLS表色系のL成分(明度)を補間パラメータLとして算出することができる。この補間パラメータLを設定した画像(補間パラメータ設定画像)は、色補正画像のαプレーン(第1のワークバッファのαプレーン)に描画することができる。すなわち、元画像の各ピクセルの最も明るい色と最も暗い色との平均から元画像の明度を求めて、この明度に応じて累乗補正の適用率を元画像の色に応じて変更させることにより、図4に示すようなα合成処理(広義には、線形補間処理)によって、影色(Rc、Gc、Bc)を求めることができる。具体的には、影色の色情報(Rc、Bc、Gc)は下式(B1)〜(B3)により求められる。 Further, when setting the shadow color, as shown in FIG. 4, the values (R1, G1, B1) of the respective color components obtained by multiplying the conversion coefficients Kr, Kg, Kb, and the respective color components after the power correction. (R2, G2, B2) and linear interpolation (for example, α blending) based on a given interpolation parameter L set according to the lightness of the original color (drawing color of each pixel constituting the original image) ). In this case, the shadow color is set based on the values (Rc, Gc, Bc) after linear interpolation. The interpolation parameter L is obtained based on the maximum value and the minimum value of each color component constituting the color of each pixel constituting the original image. For example, if a process of converting RGB color system color components into HLS color system color components is performed, the L component (brightness) of the HLS color system can be calculated as the interpolation parameter L. The image in which the interpolation parameter L is set (interpolation parameter setting image) can be drawn on the α plane of the color correction image (the α plane of the first work buffer). That is, by obtaining the brightness of the original image from the average of the brightest and darkest colors of each pixel of the original image, and changing the application rate of the power correction according to the brightness according to the color of the original image, Shadow colors (Rc, Gc, Bc) can be obtained by an α synthesis process (linear interpolation process in a broad sense) as shown in FIG. Specifically, the color information (Rc, Bc, Gc) of the shadow color is obtained by the following formulas (B1) to (B3).
Rc=R1*(1−L)+R2*L (B1)
Gc=G1*(1−L)+G2*L (B2)
Bc=B1*(1−L)+B2*L (B3)
このようにすれば、元色が明るい色であるほど累乗補正の効果を強くすることができ、さらにαブレンディングという簡便な処理で元色に対応する適切な影色を設定することができる。なお、補間パラメータLは、元画像をグレースケール変換して、元色をグレースケール変換して求めた輝度情報から得ることもできる。
Rc = R1 * (1-L) + R2 * L (B1)
Gc = G1 * (1-L) + G2 * L (B2)
Bc = B1 * (1-L) + B2 * L (B3)
In this way, the brighter the original color, the stronger the power correction effect can be made, and an appropriate shadow color corresponding to the original color can be set by a simple process called α blending. The interpolation parameter L can also be obtained from luminance information obtained by performing gray scale conversion on the original image and performing gray scale conversion on the original color.
3.本実施形態の処理
次に、本実施形態の詳細な処理例について図5及び図6のフローチャートを用いて説明する。
3. Processing of this embodiment Next, a detailed processing example of this embodiment will be described with reference to the flowcharts of FIGS.
図5に示すように、まずフレーム更新(1/60秒)更新のタイミングか否かを判断する(ステップS10)。そしてフレーム更新のタイミングである場合には(ステップS10でYES)、ゲーム演算処理を行う(ステップS11)。すなわち、プレーヤの操作入力に応じて、オブジェクトの配置設定処理、オブジェクトの移動・動作処理、仮想カメラの制御処理等を行う。 As shown in FIG. 5, it is first determined whether or not it is a frame update (1/60 second) update timing (step S10). If it is the frame update timing (YES in step S10), a game calculation process is performed (step S11). That is, an object arrangement setting process, an object movement / motion process, a virtual camera control process, and the like are performed in accordance with an operation input from the player.
次に、頂点シェーダ用及びピクセルシェーダ用のシェーダプログラムの転送とシェーダプログラムを実行して描画処理行うために必要な各種パラメータの設定及び転送を行う(ステップS12、S13)。そして、オブジェクトの頂点リストを頂点シェーダへ転送し(ステップS14)、ステップS13で転送した頂点シェーダプログラム及びピクセルシェーダプログラムを順次を実行する(ステップS15、S16)。 Next, the shader program for the vertex shader and the pixel shader is transferred, and various parameters necessary for executing the rendering process by executing the shader program are set and transferred (steps S12 and S13). Then, the vertex list of the object is transferred to the vertex shader (step S14), and the vertex shader program and the pixel shader program transferred in step S13 are sequentially executed (steps S15 and S16).
頂点シェーダおよびピクセルシェーダでは、図6のフローチャートに従ってシェーダプログラムを実行する。まず、フレームバッファにオブジェクトを描画して元画像を生成する(ステップS20)。次に、オブジェクトの陰影情報をα値として、フレームバッファのαプレーンに陰影画像を描画する(ステップS21)。このとき明るい部分ほど0に近づき、暗い部分ほど1に近づくように、α値をオブジェクトの陰影情報に基づいて設定する。次に第1のワークバッファにフレームバッファの元画像をコピーする(ステップS22)。このコピーされた元画像に基づいて、図4に示すように、影色画像を作成していく。 In the vertex shader and the pixel shader, the shader program is executed according to the flowchart of FIG. First, an original image is generated by drawing an object in the frame buffer (step S20). Next, a shadow image is drawn on the α plane of the frame buffer using the shadow information of the object as an α value (step S21). At this time, the α value is set based on the shadow information of the object so that the brighter part approaches 0 and the darker part approaches 1. Next, the original image of the frame buffer is copied to the first work buffer (step S22). Based on the copied original image, a shadow color image is created as shown in FIG.
まず、第1のワークバッファにコピーされた元画像を色変換画像に変換して第2のワークバッファに描画する(ステップS23)。すなわち、元画像のピクセルの各色成分の輝度値に変換係数Kr、Kg、Kbを乗算する処理を行って、色変換画像のピクセルの色成分の輝度値が求められる。次に、第1のワークバッファにコピーされた元画像の色から補間パラメータLを求めて、第1のワークバッファのαプレーンに代入する(ステップS24)。すなわち、元画像の全ピクセルのRGB成分の輝度値の最大値及び最小値に基づいて、元画像の明度を算出し、この明度を補間パラメータLとすることができる。次に、第2のワークバッファの色変換画像に対して、累乗補正を行った色補正画像を第1のワークバッファに描画する(ステップS25)。そして、第2のワークバッファの色変換画像と、第1のワークバッファの色補正画像とを、第1のワークバッファのαプレーンを参照してα合成(αブレンディング)し、合成された影色画像を第2のワークバッファに描画する(ステップS26)。 First, the original image copied to the first work buffer is converted into a color-converted image and drawn in the second work buffer (step S23). That is, the luminance value of each color component of the pixel of the original image is multiplied by the conversion coefficients Kr, Kg, and Kb to obtain the luminance value of the color component of the pixel of the color converted image. Next, the interpolation parameter L is obtained from the color of the original image copied to the first work buffer, and is substituted into the α plane of the first work buffer (step S24). That is, the brightness of the original image can be calculated based on the maximum and minimum luminance values of the RGB components of all pixels of the original image, and this brightness can be used as the interpolation parameter L. Next, a color corrected image obtained by performing power correction on the color converted image in the second work buffer is drawn in the first work buffer (step S25). Then, the color conversion image of the second work buffer and the color correction image of the first work buffer are subjected to α composition (α blending) with reference to the α plane of the first work buffer, and the combined shadow color The image is drawn in the second work buffer (step S26).
最終的には、フレームバッファの元画像と第2のワークバッファの影色画像とをフレームバッファのαプレーンを参照してα合成(αブレンディング)する(ステップS27)。すなわち、オブジェクトの陰影情報を合成比率として、元画像と影色画像とを合成する。 Finally, the original image of the frame buffer and the shadow color image of the second work buffer are subjected to α synthesis (α blending) with reference to the α plane of the frame buffer (step S27). That is, the original image and the shadow color image are combined using the shadow information of the object as a combining ratio.
4.ハードウェア構成
図7に本実施形態を実現できるハードウェア構成の例を示す。メインプロセッサ900は、DVD982(情報記憶媒体。CDでもよい。)に格納されたプログラム、通信インターフェース990を介してダウンロードされたプログラム、或いはROM950に格納されたプログラムなどに基づき動作し、ゲーム処理、画像処理、音処理などを実行する。コプロセッサ902は、メインプロセッサ900の処理を補助するものであり、マトリクス演算(ベクトル演算)を高速に実行する。例えばオブジェクトを移動させたり動作(モーション)させる物理シミュレーションに、マトリクス演算処理が必要な場合には、メインプロセッサ900上で動作するプログラムが、その処理をコプロセッサ902に指示(依頼)する。
4). Hardware Configuration FIG. 7 shows an example of a hardware configuration capable of realizing this embodiment. The
ジオメトリプロセッサ904は、メインプロセッサ900上で動作するプログラムからの指示に基づいて、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、マトリクス演算を高速に実行する。データ伸張プロセッサ906は、圧縮された画像データや音データのデコード処理を行ったり、メインプロセッサ900のデコード処理をアクセラレートする。これにより、オープニング画面やゲーム画面において、MPEG方式等で圧縮された動画像を表示できる。
The
描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データ(頂点データや他のパラメータ)を描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行う。頂点シェーダやピクセルシェーダなどのプログラマブルシェーダも描画プロセッサ910に実装されており、本実施形態の手法を実現するシェーダプログラムに従って、頂点データの作成・変更(更新)やピクセル(あるいはフラグメント)の描画色の決定を行う。1フレーム分の画像がフレームバッファ922に書き込まれるとその画像はディスプレイ912に表示される。
The drawing
サウンドプロセッサ930は、多チャンネルのADPCM音源などを内蔵し、BGM、効果音、音声などのゲーム音を生成し、スピーカ932を介して出力する。ゲームコントローラ942やメモリカード944からのデータはシリアルインターフェース940を介して入力される。
The
ROM950にはシステムプログラムなどが格納される。業務用ゲームシステムの場合にはROM950が情報記憶媒体として機能し、ROM950に各種プログラムが格納される。なおROM950の代わりにハードディスクを利用してもよい。RAM960は各種プロセッサの作業領域となる。DMAコントローラ970は、プロセッサ、メモリ間でのDMA転送を制御する。DVDドライブ980(CDドライブでもよい。)は、プログラム、画像データ、或いは音データなどが格納されるDVD982(CDでもよい。)にアクセスする。通信インターフェース990はネットワーク(通信回線、高速シリアルバス)を介して外部との間でデータ転送を行う。
The
なお本実施形態の各部(各手段)の処理は、その全てをハードウェアのみにより実現してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。 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
なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書又は図面中の記載において広義や同義な用語(元色、R成分、G成分、B成分など)として引用された用語(元画像の各ピクセルの色、第1の色成分、第2の色成分、第3の色成分など)は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。また色合成手法や影色設定手法等は、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。 The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms (original color, R component, G component, B component, etc.) cited as broad or synonymous terms in the description or drawings (original pixel color, first color component, first color component, The second color component, the third color component, etc.) can be replaced with terms having a broad meaning or the same meaning in other descriptions in the specification or the drawings. Further, the color composition method, the shadow color setting method, and the like are not limited to those described in the present embodiment, and methods equivalent to these methods are also included in the scope of the present invention.
また本実施の形態では、オブジェクトに対して陰影を施す場合を例に採り説明したが、本発明はこれに限定されず、例えば、オブジェクトのハイライト表現をする場合にも用いることもできる。この場合には、陰影情報の代わりにハイライト情報(鏡面反射情報)を求めて、元色(Rc、Gc、Bc)から鏡面反射色(スペキュラー。(Rw、Gw、Bw))を求めることができる。すなわち、上記で説明した影色を元色として、元色より明るい鏡面反射色を求めるようにすることができる。 In the present embodiment, the case where a shadow is applied to an object has been described as an example. However, the present invention is not limited to this, and for example, the object can also be used for highlight expression. In this case, highlight information (specular reflection information) is obtained instead of shadow information, and a specular reflection color (specular. (Rw, Gw, Bw)) is obtained from the original color (Rc, Gc, Bc). it can. That is, it is possible to obtain a specular reflection color brighter than the original color using the shadow color described above as the original color.
また本発明は種々のゲーム(格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々の画像生成システムに適用できる。 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.
100 処理部、
110 オブジェクト空間設定部、112 移動・動作処理部、
114 仮想カメラ制御部、
120 画像生成部、120VS 頂点シェーダ、120PS ピクセルシェーダ、
121 陰影情報演算部、123 影色設定部、125 色合成部、
122 ジオメトリ処理部、124 テクスチャマッピング部、127 描画部、
130 音生成部、160 操作部、
170 記憶部、172 主記憶部、174 描画バッファ、
176 テクスチャ記憶部、180 情報記憶媒体、194 携帯型情報記憶装置、
190 表示部、192 音出力部、196 通信部
100 processing unit,
110 Object space setting unit, 112 Movement / motion processing unit,
114 virtual camera control unit,
120 image generator, 120VS vertex shader, 120PS pixel shader,
121 shadow information calculation unit, 123 shadow color setting unit, 125 color composition unit,
122 geometry processing unit, 124 texture mapping unit, 127 drawing unit,
130 sound generation unit, 160 operation unit,
170 storage unit, 172 main storage unit, 174 drawing buffer,
176 texture storage unit, 180 information storage medium, 194 portable information storage device,
190 Display unit, 192 Sound output unit, 196 Communication unit
Claims (15)
透視変換後のオブジェクトを描画して元画像を生成する描画部と、
前記元画像の各ピクセルの色である元色に基づいて、該元色に対応する影色を設定する影色設定部と、
前記オブジェクトの陰影情報を求める陰影情報演算部と、
前記元色と、該元色に対応する前記影色とを、前記陰影情報に基づいて合成する色合成部として、
コンピュータを機能させることを特徴とするプログラム。 A program for generating an image of an object space viewed from a given viewpoint,
A drawing unit for drawing an object after perspective transformation to generate an original image;
A shadow color setting unit that sets a shadow color corresponding to the original color based on the original color that is the color of each pixel of the original image;
A shadow information calculation unit for obtaining shadow information of the object;
As a color synthesis unit that synthesizes the original color and the shadow color corresponding to the original color based on the shadow information,
A program characterized by causing a computer to function.
前記影色設定部が、
前記元色を構成するRGB表色系の各色成分に所与の変換係数を乗算する処理を行って前記影色を設定し、
R成分に乗算される前記変換係数をKr、G成分に乗算される前記変換係数をKg、B成分に乗算される前記変換係数をKbとすると、Kb>Kr>Kgの関係を有することを特徴とするプログラム。 In claim 1,
The shadow color setting unit is
The shadow color is set by performing a process of multiplying each color component of the RGB color system constituting the original color by a given conversion coefficient,
The relationship is Kb>Kr> Kg, where Kr is the transform coefficient multiplied by the R component, Kg is the transform coefficient multiplied by the G component, and Kb is the transform coefficient multiplied by the B component. Program.
前記影色設定部が、
前記変換係数を乗算して求められた各色成分の値に対して、さらに所与の補正係数Br、Bg、Bbを累乗する累乗補正をして、累乗補正後の各色成分の値に基づき、前記影色を設定することを特徴とするプログラム。 In claim 2,
The shadow color setting unit is
The value of each color component obtained by multiplying the conversion coefficient is further subjected to power correction by raising a given correction coefficient Br, Bg, Bb to the power, and based on the value of each color component after power correction, A program characterized by setting a shadow color.
前記影色設定部が、
前記変換係数を乗算して求められた各色成分の値と、前記累乗補正後の各色成分の値とを、前記元色の明度に応じて設定される所与の補間パラメータLに基づいて線形補間し、線形補間後の値に基づき前記影色を設定することを特徴とするプログラム。 In claim 3,
The shadow color setting unit is
Linear interpolation is performed on the value of each color component obtained by multiplying the conversion coefficient and the value of each color component after the power correction based on a given interpolation parameter L set according to the brightness of the original color. And the shadow color is set based on the value after linear interpolation.
前記影色設定部が、
前記元色を構成するRGB表色系の各色成分の最大値及び最小値に基づいて前記補間パラメータLを求めることを特徴とするプログラム。 In claim 4,
The shadow color setting unit is
A program characterized in that the interpolation parameter L is obtained based on the maximum value and the minimum value of each color component of the RGB color system constituting the original color.
前記影色設定部が、
前記変換係数を乗算して求められた色成分からなる色変換画像と、前記色変換画像のピクセルの色成分を累乗補正した色成分からなる色補正画像とを、前記補間パラメータLをα値としてαブレンディングすることを特徴とするプログラム。 In claim 4 or 5,
The shadow color setting unit is
A color-converted image composed of color components obtained by multiplying the conversion coefficients, a color-corrected image composed of color components obtained by correcting the color components of pixels of the color-converted image to a power, and the interpolation parameter L as an α value A program characterized by alpha blending.
前記色合成部が、
前記元画像と、前記元画像の各ピクセルを前記影色で描画した影色画像とを、前記陰影情報から得られるα値を用いてαブレンディングすることを特徴とするプログラム。 In any one of Claims 1-6,
The color composition unit
A program characterized in that the original image and a shadow color image obtained by drawing each pixel of the original image with the shadow color are α-blended using an α value obtained from the shadow information.
透視変換後のオブジェクトにテクスチャをマッピングするテクスチャマッピング部と、
前記テクスチャがマッピングされたオブジェクトを描画して画像を生成する描画部として、
コンピュータを機能させ、
前記テクスチャマッピング部が、
所与の元色を用いて生成された前記オブジェクトの元画像と、前記元色に対応する影色を用いて生成された前記オブジェクトの影色画像とを、前記オブジェクトの陰影情報に基づいて、αブレンディングすることにより生成された前記テクスチャをテクスチャマッピングすることを特徴とするプログラム。 A program for generating an image of an object space viewed from a given viewpoint,
A texture mapping unit for mapping a texture to an object after perspective transformation;
As a drawing unit that draws an object to which the texture is mapped and generates an image,
Make the computer work,
The texture mapping unit is
Based on the shadow information of the object, an original image of the object generated using a given original color and a shadow color image of the object generated using a shadow color corresponding to the original color, A program characterized by texture-mapping the texture generated by α blending.
前記影色は、前記元色を構成するRGB表色系の各色成分に対して所与の変換係数を乗算して求められており、
R成分に乗算される前記変換係数をKr、G成分に乗算される前記変換係数をKg、B成分に乗算される前記変換係数をKbとすると、Kb>Kr>Kgの関係を有することを特徴とするプログラム。 In claim 8,
The shadow color is obtained by multiplying each color component of the RGB color system constituting the original color by a given conversion coefficient,
The relationship is Kb>Kr> Kg, where Kr is the transform coefficient multiplied by the R component, Kg is the transform coefficient multiplied by the G component, and Kb is the transform coefficient multiplied by the B component. Program.
前記影色は、前記変換係数を乗算して求められた各色成分の値に対して、さらに所与の補正係数Br、Bg、Bbを累乗する累乗補正をして求められていることを特徴とするプログラム。 In claim 9,
The shadow color is obtained by performing a power correction to a power of a given correction coefficient Br, Bg, Bb on the value of each color component obtained by multiplying the conversion coefficient. Program to do.
前記影色は、前記変換係数を乗算して求められた各色成分の値と、前記累乗補正後の各色成分の値とを、前記元色の明度に応じて設定される所与の補間パラメータLに基づいて線形補間して求められていることを特徴とするプログラム。 In claim 10,
The shadow color is obtained by multiplying the value of each color component obtained by multiplying the conversion coefficient and the value of each color component after the power correction by a given interpolation parameter L set according to the lightness of the original color. A program characterized by being obtained by linear interpolation based on the above.
前記補間パラメータLは、前記元色を構成するRGB表色系の各色成分の最大値及び最小値に基づいて求められていることを特徴とするプログラム。 In claim 11,
The program according to claim 1, wherein the interpolation parameter L is obtained based on a maximum value and a minimum value of each color component of the RGB color system constituting the original color.
透視変換後のオブジェクトを描画して元画像を生成する描画部と、
前記元画像の各ピクセルの色である元色に基づいて、該元色に対応する影色を設定する影色設定部と、
前記オブジェクトの陰影情報を求める陰影情報演算部と、
前記元色と、該元色に対応する前記影色とを、前記陰影情報に基づいて合成する色合成部と、
を含むことを特徴とする画像生成システム。 An image generation system for generating an image of an object space viewed from a given viewpoint,
A drawing unit for drawing an object after perspective transformation to generate an original image;
A shadow color setting unit that sets a shadow color corresponding to the original color based on the original color that is the color of each pixel of the original image;
A shadow information calculation unit for obtaining shadow information of the object;
A color synthesis unit that synthesizes the original color and the shadow color corresponding to the original color based on the shadow information;
An image generation system comprising:
透視変換後のオブジェクトにテクスチャをマッピングするテクスチャマッピング部と、
前記テクスチャがマッピングされたオブジェクトを描画して画像を生成する描画部と、
を含み、
前記テクスチャマッピング部が、
所与の元色を用いて生成された前記オブジェクトの元画像と、前記元色に対応する影色を用いて生成された前記オブジェクトの影色画像とを、前記オブジェクトの陰影情報に基づいて、αブレンディングすることにより生成された前記テクスチャをテクスチャマッピングすることを特徴とする画像生成システム。 An image generation system for generating an image of an object space viewed from a given viewpoint,
A texture mapping unit for mapping a texture to an object after perspective transformation;
A drawing unit that draws an object to which the texture is mapped to generate an image;
Including
The texture mapping unit is
Based on the shadow information of the object, an original image of the object generated using a given original color and a shadow color image of the object generated using a shadow color corresponding to the original color, An image generation system, wherein texture mapping is performed on the texture generated by α blending.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005097537A JP2006277488A (en) | 2005-03-30 | 2005-03-30 | Program, information storage medium, and image generation system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005097537A JP2006277488A (en) | 2005-03-30 | 2005-03-30 | Program, information storage medium, and image generation system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2006277488A true JP2006277488A (en) | 2006-10-12 |
Family
ID=37212165
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005097537A Withdrawn JP2006277488A (en) | 2005-03-30 | 2005-03-30 | Program, information storage medium, and image generation system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2006277488A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008275538A (en) * | 2007-05-02 | 2008-11-13 | Olympus Corp | Three-dimensional profiler and sample image forming apparatus |
| JP2010033285A (en) * | 2008-07-28 | 2010-02-12 | Namco Bandai Games Inc | Program, information storage medium, and image generation system |
-
2005
- 2005-03-30 JP JP2005097537A patent/JP2006277488A/en not_active Withdrawn
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008275538A (en) * | 2007-05-02 | 2008-11-13 | Olympus Corp | Three-dimensional profiler and sample image forming apparatus |
| JP2010033285A (en) * | 2008-07-28 | 2010-02-12 | Namco Bandai Games Inc | Program, information storage medium, and image generation system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4749198B2 (en) | Program, information storage medium, and image generation system | |
| JP4827250B2 (en) | Program, information storage medium, and image generation system | |
| JP4824514B2 (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 | |
| JP4743770B2 (en) | Image generation system, program, and information storage medium | |
| JP2010033297A (en) | Program, information storage medium, and image generation system | |
| JP4651527B2 (en) | Program, information storage medium, and image generation system | |
| JP4073031B2 (en) | Program, information storage medium, and image generation system | |
| JP2006252426A (en) | Program, information storage medium, and image generation system | |
| JP2008077406A (en) | Image generation system, program, and information storage medium | |
| JP2011215724A (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 | |
| JP4632855B2 (en) | Program, information storage medium, and image generation system | |
| JP2010033302A (en) | Image generation system, program and information storage medium | |
| JP4641831B2 (en) | Program, information storage medium, and image generation system | |
| JP2010033253A (en) | Program, information storage medium, and image generation system | |
| JP4596551B2 (en) | Image generation system, program, and information storage medium | |
| JP2010033295A (en) | Image generation system, program and information storage medium | |
| JP2008310377A (en) | Image generation system, program, and information storage medium | |
| JP2010033301A (en) | Image generation system, program and information storage medium | |
| JP2006252423A (en) | Program, information storage medium, and image generation system | |
| JP2006252425A (en) | Program, information storage medium, and image generation system | |
| JP4521811B2 (en) | Program, information storage medium, and image generation system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080603 |