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

Program, information storage medium and image generation system Download PDF

Info

Publication number
JP2011095937A
JP2011095937A JP2009248308A JP2009248308A JP2011095937A JP 2011095937 A JP2011095937 A JP 2011095937A JP 2009248308 A JP2009248308 A JP 2009248308A JP 2009248308 A JP2009248308 A JP 2009248308A JP 2011095937 A JP2011095937 A JP 2011095937A
Authority
JP
Japan
Prior art keywords
texture
shading
fur
value
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009248308A
Other languages
Japanese (ja)
Inventor
Kei Kudo
径 工藤
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 JP2009248308A priority Critical patent/JP2011095937A/en
Publication of JP2011095937A publication Critical patent/JP2011095937A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, an information storage medium, and an image generation system, or the like, allowing fur shading processing by a pixel shader. <P>SOLUTION: The image generation system includes a texture storage portion; and an image generation portion for generating an image viewed from a virtual camera in an object space, by performing pixel shading processing using a texture. The texture storage portion stores a texture for fur shading. The image generation portion fetches a texel value of the texture for the fur shading while sequentially shifting texture coordinates in a texture space, in a direction specified by a normal vector of a drawing target pixel, and sets the composition value of a plurality of texel values, obtained by the fetch to a pixel value of the drawing target pixel to generate a fur shading image. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

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

従来より、キャラクタ等のモデルオブジェクトが配置設定されるオブジェクト空間内(仮想的な3次元空間)において仮想カメラ(所与の視点)から見える画像を生成する画像生成システム(ゲームシステム)が知られており、いわゆる仮想現実を体験できるものとして人気が高い。格闘ゲームを楽しむことができる画像生成システムを例にとれば、プレーヤは、操作部(ゲームコントローラ)を用いてキャラクタ(モデルオブジェクト)を操作し、相手プレーヤやコンピュータが操作する他キャラクタ(敵キャラクタ)と対戦することでゲームを楽しむ。   Conventionally, there has been known 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 (virtual three-dimensional space) in which model objects such as characters are arranged and set. It is popular as a place to experience so-called virtual reality. Taking an image generation system capable of enjoying a fighting game as an example, a player operates a character (model object) using an operation unit (game controller), and another character (enemy character) operated by the opponent player or the computer. Enjoy the game by playing against.

このような画像生成システムでは、例えばキャラクタに生える毛や、キャラクタが着る毛皮の洋服などについてもリアルに表現できることが望ましい。このような毛質表現を実現するファーシェーディング(fur shading)に関する従来技術としては、例えば特許文献1に開示される技術がある。   In such an image generation system, it is desirable to be able to realistically represent, for example, the hair that grows on the character and the fur clothes that the character wears. As a conventional technique related to fur shading that realizes such hair expression, there is a technique disclosed in Patent Document 1, for example.

しかしながら、これまでのファーシェーディングでは、使用ポリゴン数の増加などが原因となって処理負荷が重くなるなどの課題があった。また、いわゆるピクセルシェーダによりファーシェーディングを実現する手法については提案されていなかった。   However, conventional fur shading has a problem such as a heavy processing load due to an increase in the number of polygons used. In addition, a method for realizing fur shading using a so-called pixel shader has not been proposed.

特開2000−36058号公報JP 2000-36058 A

本発明の幾つかの態様によれば、ピクセルシェーダによるファーシェーディング処理を実現できるプログラム、情報記憶媒体、画像生成システム等を提供できる。   According to some aspects of the present invention, it is possible to provide a program, an information storage medium, an image generation system, and the like that can realize a fur shading process using a pixel shader.

本発明の一態様は、テクスチャを記憶するテクスチャ記憶部と、前記テクスチャを用いたピクセルシェーダ処理を行うことで、オブジェクト空間において仮想カメラから見える画像を生成する画像生成部とを含み、前記テクスチャ記憶部は、ファーシェーディング用テクスチャを記憶し、前記画像生成部は、描画対象ピクセルの法線ベクトルにより特定される方向に、テクスチャ空間でのテクスチャ座標を順次シフトしながら、前記ファーシェーディング用テクスチャのテクセル値をフェッチし、フェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定することで、ファーシェーディング画像を生成する画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させるプログラム、又は該プログラムを記憶したコンピュータ読み取り可能な情報記憶媒体に関係する。   One aspect of the present invention includes a texture storage unit that stores a texture, and an image generation unit that generates an image seen from a virtual camera in the object space by performing pixel shader processing using the texture, and the texture storage unit Unit stores the texture for fur shading, and the image generation unit sequentially shifts texture coordinates in the texture space in the direction specified by the normal vector of the drawing target pixel, The present invention relates to an image generation system that generates a fur shading image by fetching a value and setting a composite value of a plurality of texel values obtained by the fetch to a pixel value of a drawing target pixel. The present invention also relates to a program that causes a computer to function as each of the above-described units, or a computer-readable information storage medium that stores the program.

本発明の一態様によれば、テクスチャ記憶部にはファーシェーディング用テクスチャが記憶される。そして、描画対象ピクセルの法線ベクトルにより特定される方向に、テクスチャ座標が順次シフトされながら、ファーシェーディング用テクスチャのテクセル値がフェッチされる。そしてフェッチされた複数のテクセル値の合成値が、描画対象ピクセルのピクセル値に設定されて、ファーシェーディング画像が生成される。このようにすれば、ピクセルシェーダによりファーシェーディング処理を実現することが可能になり、シェル法等に比べて少ない処理負荷やデータ量でファーシェーディング画像を生成できるようになる。   According to one aspect of the present invention, the texture for fur shading is stored in the texture storage unit. Then, the texel values of the texture for fur shading are fetched while the texture coordinates are sequentially shifted in the direction specified by the normal vector of the drawing target pixel. Then, the combined value of the plurality of fetched texel values is set to the pixel value of the drawing target pixel, and a fur shading image is generated. In this way, it is possible to realize the fur shading process with the pixel shader, and it is possible to generate a fur shading image with a smaller processing load and data amount than with the shell method or the like.

また本発明の一態様では、前記仮想カメラのカメラ座標系において前記仮想カメラの視線方向に沿った座標軸をZ軸とし、前記Z軸に直交する座標軸をX軸、Y軸とした場合に、前記画像生成部は、描画対象ピクセルの前記法線ベクトルをXY平面に投影した投影法線ベクトルの方向の逆方向により特定される方向に、前記テクスチャ空間でのテクスチャ座標(U、V)を順次シフトしながら、前記ファーシェーディング用テクスチャのテクセル値をフェッチしてもよい。   In one aspect of the present invention, in the camera coordinate system of the virtual camera, when the coordinate axis along the viewing direction of the virtual camera is the Z axis, and the coordinate axis orthogonal to the Z axis is the X axis and the Y axis, The image generation unit sequentially shifts the texture coordinates (U, V) in the texture space in a direction specified by a direction opposite to the direction of the projection normal vector obtained by projecting the normal vector of the drawing target pixel onto the XY plane. However, the texel value of the fur shading texture may be fetched.

このようにすれば、投影法線ベクトルの方向により、テクスチャ座標(U、V)のシフト方向を特定し、ファーシェーディング用テクスチャのテクセル値をフェッチして、ファーシェーディング画像を生成できるようになる。従って、投影法線ベクトルを用いた簡素な処理でテクスチャ座標のシフト方向を設定して、テクセル値をフェッチできるようになる。   In this way, it is possible to specify the shift direction of the texture coordinates (U, V) based on the direction of the projection normal vector, fetch the texel value of the texture for fur shading, and generate a fur shading image. Therefore, the texel value can be fetched by setting the shift direction of the texture coordinates by a simple process using the projection normal vector.

また本発明の一態様では、前記画像生成部は、第1のフェッチ処理においてテクセル値C1=TEX(U1、V1)をフェッチし、第2のフェッチ処理においてテクセル値C2=TEX(U2、V2)をフェッチし・・・・第Nのフェッチ処理においてテクセル値CN=TEX(UN、VN)をフェッチし、フェッチされたテクセル値C1〜CNの合成処理を行うことで得られた合成値を、描画対象ピクセルのピクセル値に設定し、前記投影法線ベクトルの方向の逆方向は、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)へと向かう方向であり、前記投影法線ベクトルの長さが長くなるほど、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)への距離が長くなるようにしてもよい。   In the aspect of the invention, the image generation unit fetches the texel value C1 = TEX (U1, V1) in the first fetch process, and the texel value C2 = TEX (U2, V2) in the second fetch process. ... In the Nth fetch process, the texel value CN = TEX (UN, VN) is fetched, and the combined value obtained by combining the fetched texel values C1 to CN is rendered. The pixel value of the target pixel is set, and the direction opposite to the direction of the projection normal vector is a direction from the texture coordinates (U1, V1) to the texture coordinates (UN, VN), and the length of the projection normal vector The longer the distance, the longer the distance from the texture coordinates (U1, V1) to the texture coordinates (UN, VN).

このようにすれば、テクスチャ座標のシフト方向やシフト量を簡素な処理で得ることが可能になる。   In this way, the texture coordinate shift direction and shift amount can be obtained by simple processing.

また本発明の一態様では、前記画像生成部は、K1×C1+K2×C2+・・・・+KN×CNの合成処理を行って合成値を取得し、ウェイト値Ki+1はウェイト値Ki(1≦i<N)よりも小さい値であってもよい。   Also, in one aspect of the present invention, the image generation unit obtains a composite value by performing a composite process of K1 × C1 + K2 × C2 +... + KN × CN, and the weight value Ki + 1 is a weight value Ki (1 ≦ i < N) may be a smaller value.

このようなウェイト値を設ければ、ファーシェーディングの毛根や毛先の表現等が可能になる。   By providing such weight values, fur shading hair roots and hair ends can be expressed.

また本発明の一態様では、前記画像生成部は、モデルオブジェクトの第1の部分については、テクスチャがマッピングされた複数の積層されたポリゴンを用いたシェル法により、ファーシェーディング画像を生成し、前記モデルオブジェクトの第2の部分については、前記ファーシェーディング用テクスチャのフェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定することで、ファーシェーディング画像を生成してもよい。   In one aspect of the present invention, the image generation unit generates a fur shading image for the first part of the model object by a shell method using a plurality of stacked polygons to which textures are mapped, For the second part of the model object, a fur shading image may be generated by setting a composite value of a plurality of texel values obtained by fetching the fur shading texture to a pixel value of a drawing target pixel. .

このようにすれば、リアルな毛質表現と処理負荷の軽減を両立できるようになる。   In this way, it is possible to achieve both realistic hair expression and reduction in processing load.

また本発明の一態様では、前記第1の部分は、前記モデルオブジェクトの前面側に設定された領域であり、前記第2の部分は、前記モデルオブジェクトの背面側に設定された領域であってもよい。   In the aspect of the invention, the first part is an area set on the front side of the model object, and the second part is an area set on the back side of the model object. Also good.

また本発明の一態様では、前記画像生成部は、合成対象となるテクセル値の個数を可変に設定してもよい。   In the aspect of the invention, the image generation unit may variably set the number of texel values to be combined.

このようにすれば、例えば処理負荷や処理時間に応じて、合成対象となるテクセル値の個数を可変に設定(フェッチ回数を可変に設定)して、複数のテクセル値を合成できるようになる。   In this way, it is possible to synthesize a plurality of texel values by variably setting the number of texel values to be combined (setting the number of fetches variably) according to the processing load and processing time, for example.

本実施形態の画像生成システムの構成例。1 is a configuration example of an image generation system according to the present embodiment. 図2(A)〜図2(C)はシェル法によるファーシェーディングの説明図。FIG. 2A to FIG. 2C are explanatory diagrams of fur shading by the shell method. シェル法によるファーシェーディングの説明図。Explanatory drawing of fur shading by a shell method. 図4(A)〜図4(E)はピクセルシェーダによるファーシェーディング手法の説明図。4A to 4E are explanatory diagrams of a fur shading method using a pixel shader. ファーシェーディング用テクスチャの例。An example of fur shading texture. 本実施形態のファーシェーディング手法を説明するフローチャート。The flowchart explaining the fur shading method of this embodiment. 図7(A)、図7(B)はオブジェクト及びオブジェクトに設定される法線ベクトルの説明図。7A and 7B are explanatory diagrams of objects and normal vectors set for the objects. 図8(A)、図8(B)は仮想カメラと法線ベクトルの関係の説明図。8A and 8B are explanatory diagrams of the relationship between the virtual camera and the normal vector. 図9(A)〜図9(C)は本実施形態のファーシェーディング手法の説明図。FIG. 9A to FIG. 9C are explanatory diagrams of the fur shading method of the present embodiment. 図10(A)〜図10(C)は本実施形態のファーシェーディング手法の説明図。FIG. 10A to FIG. 10C are explanatory diagrams of the fur shading method of the present embodiment. 図11(A)〜図11(C)は本実施形態のファーシェーディング手法の説明図。FIG. 11A to FIG. 11C are explanatory diagrams of the fur shading method of the present embodiment. 図12(A)、図12(B)はモデルオブジェクトの各部分に応じて異なるファーシェーディング手法を適用する手法の説明図。FIGS. 12A and 12B are explanatory diagrams of a method of applying a different fur shading method depending on each part of the model object. 本実施形態の全体的な処理のフローチャート。The flowchart of the whole process of this embodiment. 図14(A)、図14(B)は画像生成システムのハードウェア構成例。14A and 14B show examples of the hardware configuration of the image generation system.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   Hereinafter, this embodiment will be described. In addition, this embodiment demonstrated below does not unduly limit the content of this invention described in the claim. In addition, all the configurations described in the present embodiment are not necessarily essential configuration requirements of the present invention.

1.構成
図1に本実施形態の画像生成システム(ゲームシステム)のブロック図の例を示す。なお、本実施形態の画像生成システムの構成は図1に限定されず、その構成要素(各部)の一部を省略したり、他の構成要素を追加するなどの種々の変形実施が可能である。
1. Configuration FIG. 1 shows an example of a block diagram of an image generation system (game system) of the present embodiment. Note that the configuration of the image generation system of the present embodiment is not limited to that shown in FIG. 1, and various modifications may be made such as omitting some of the components (each unit) or adding other components. .

操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、方向指示キー、操作ボタン、アナログスティック、レバー、各種センサ(角速度センサ、加速度センサ等)、マイク、或いはタッチパネル型ディスプレイなどにより実現できる。   The operation unit 160 is for a player to input operation data, and functions thereof are direction instruction keys, operation buttons, analog sticks, levers, various sensors (such as an angular velocity sensor and an acceleration sensor), a microphone, or a touch panel type. This can be realized with a display.

記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM(DRAM、VRAM)などにより実現できる。そしてゲームプログラムや、ゲームプログラムの実行に必要なゲームデータは、この記憶部170に保持される。   The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by a RAM (DRAM, VRAM) or the like. Then, the game program and game data necessary for executing the game program are held in the storage unit 170.

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

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

補助記憶装置194(補助メモリ、2次メモリ)は、記憶部170の容量を補うために使用される記憶装置であり、SDメモリーカード、マルチメディアカードなどのメモリーカードなどにより実現できる。   The auxiliary storage device 194 (auxiliary memory, secondary memory) is a storage device used to supplement the capacity of the storage unit 170, and can be realized by a memory card such as an SD memory card or a multimedia card.

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

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

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

処理部100は、ゲーム演算部102、オブジェクト空間設定部104、移動処理部106、モーション処理部107、仮想カメラ制御部108、画像生成部120、音生成部130を含む。なおこれらの一部の構成要素を省略したり、他の構成要素を追加するなどの種々の変形実施が可能である。   The processing unit 100 includes a game calculation unit 102, an object space setting unit 104, a movement processing unit 106, a motion processing unit 107, a virtual camera control unit 108, an image generation unit 120, and a sound generation unit 130. Various modifications may be made such as omitting some of these components or adding other components.

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

オブジェクト空間設定部104は、移動体(人、ロボット、車、戦闘機、ミサイル、弾等)、マップ(地形)、建物、コース(道路)、樹木、壁などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェイスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。具体的には、記憶部170のオブジェクトデータ記憶部172には、オブジェクト(パーツオブジェクト)の位置、回転角度、移動速度、移動方向等のデータであるオブジェクトデータがオブジェクト番号に対応づけて記憶される。   The object space setting unit 104 displays various objects (polygons) representing display objects such as moving objects (people, robots, cars, fighters, missiles, bullets, etc.), maps (terrain), buildings, courses (roads), trees, and walls. , An object configured with a primitive surface such as a free-form surface or a subdivision surface) is set in the object space. That is, the position and rotation angle (synonymous with direction and direction) of the object in the world coordinate system are determined, and the rotation angle (rotation angle around the X, Y, and Z axes) is determined at that position (X, Y, Z). Arrange objects. Specifically, the object data storage unit 172 of the storage unit 170 stores object data such as the position, rotation angle, moving speed, moving direction, etc. of the object (part object) in association with the object number. .

移動処理部106は、モデルオブジェクト等の移動オブジェクトを移動させる処理を行う。例えば操作部160によりプレーヤが入力した操作データや、プログラム(移動アルゴリズム)や、各種データなどに基づいて、移動オブジェクトをオブジェクト空間内で移動させる。具体的には、移動オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、移動処理やモーション処理や画像生成処理を行う時間の単位である。   The movement processing unit 106 performs a process of moving a moving object such as a model object. For example, the moving object is moved in the object space based on operation data input by the player through the operation unit 160, a program (movement algorithm), various data, and the like. Specifically, a simulation process for sequentially obtaining movement information (position, rotation angle, speed, or acceleration) of the moving object for each frame (1/60 second) is performed. Note that a frame is a unit of time for performing a movement process, a motion process, and an image generation process.

モーション処理部107は、キャラクタ等のモデルオブジェクトにモーション(アニメーション)を行わせるモーション処理(モーション再生、モーション生成)を行う。このモーション処理は、モデルオブジェクトのモーションを、モーションデータ記憶部173に記憶されているモーションデータに基づいて再生することなどで実現できる。   The motion processing unit 107 performs motion processing (motion reproduction, motion generation) for causing a model object such as a character to perform motion (animation). This motion processing can be realized by reproducing the motion of the model object based on the motion data stored in the motion data storage unit 173.

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

例えば仮想カメラによりキャラクタ、車などのモデルオブジェクト(移動体)を後方から撮影する場合には、モデルオブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動処理部106で得られたモデルオブジェクトの位置、回転角度又は速度などの情報に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させる制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータに基づいて仮想カメラを制御する。   For example, when a model object (moving body) such as a character or a car is photographed from behind using a virtual camera, the virtual camera position or rotation angle (virtual angle) is set so that the virtual camera follows changes in the position or rotation of the model object. Control camera orientation). In this case, the virtual camera can be controlled based on information such as the position, rotation angle, or speed of the model object obtained by the movement processing unit 106. Alternatively, the virtual camera may be controlled to rotate at a predetermined rotation angle or to move along a predetermined movement path. In this case, the virtual camera is controlled based on the virtual camera data for specifying the position (movement path) or rotation angle of the virtual camera.

画像生成部120は、処理部100で行われる種々の処理(ゲーム処理、シミュレーション処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。具体的には、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、透視変換、或いは光源処理等のジオメトリ処理が行われ、その処理結果に基づいて、描画データ(プリミティブ面の頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)が作成される。そして、この描画データ(プリミティブ面データ)に基づいて、透視変換後(ジオメトリ処理後)のオブジェクト(1又は複数プリミティブ面)を、描画バッファ176(フレームバッファ、ワークバッファ等のピクセル単位で画像情報を記憶できるバッファ)に描画する。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。   The image generation unit 120 performs drawing processing based on the results of various processing (game processing and simulation processing) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. Specifically, geometric processing such as coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, perspective transformation, or light source processing is performed. Based on the processing result, drawing data (the position of the vertex of the primitive surface) Coordinates, texture coordinates, color data, normal vector, α value, etc.) are created. Then, based on the drawing data (primitive surface data), the perspective transformation (geometry processing) object (one or a plurality of primitive surfaces) is converted into image data in units of pixels such as a drawing buffer 176 (frame buffer, work buffer, etc.). Draw in a buffer that can be stored. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated.

例えば画像生成部120は、頂点処理部122、ピクセル処理部124を含むことができる。   For example, the image generation unit 120 can include a vertex processing unit 122 and a pixel processing unit 124.

頂点処理部122(頂点シェーダ、ジオメトリーシェーダ)は頂点処理を行う。具体的には、オブジェクトの頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)に基づいて、頂点処理(頂点シェーダによるシェーディング)を行う。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。   The vertex processing unit 122 (vertex shader, geometry shader) performs vertex processing. Specifically, vertex processing (shading by a vertex shader) is performed based on vertex data of the object (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.). When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary.

頂点処理では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。   In the vertex processing, according to the vertex processing program (vertex shader program, first shader program), vertex movement processing, coordinate conversion (world coordinate conversion, camera coordinate conversion), clipping processing, perspective processing, and other geometric processing are performed. On the basis of the processing result, the vertex data given to the vertex group constituting the object is changed (updated or adjusted). Then, rasterization (scan conversion) is performed based on the vertex data after the vertex processing, and the surface of the polygon (primitive) is associated with the pixel.

ピクセル処理部124(ピクセルシェーダ)はピクセル処理を行う。具体的には、ラスタライズ後に、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)を行う。   The pixel processing unit 124 (pixel shader) performs pixel processing. More specifically, after rasterization, pixel processing (shading or fragment processing by a pixel shader) for drawing pixels (fragments forming a display screen) constituting an image is performed.

ピクセル処理では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャ記憶部175からのテクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色を描画バッファ174に出力(描画)する。即ち、ピクセル処理では、画像情報(色、法線、輝度、α値等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。   In pixel processing, according to a pixel processing program (pixel shader program, second shader program), various processes such as texture reading from the texture storage unit 175 (texture mapping), color data setting / changing, translucent composition, anti-aliasing, etc. The final drawing color of the pixels constituting the image is determined, and the drawing color of the perspective-transformed object is output (drawn) to the drawing buffer 174. That is, in pixel processing, per-pixel processing for setting or changing image information (color, normal, luminance, α value, etc.) in units of pixels is performed. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated.

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

また画像生成部120はテクスチャマッピング処理等を行う。テクスチャマッピング処理(テクスチャフェッチ・テクスチャサンプリング処理)は、テクスチャ記憶部175に記憶されるテクスチャ(テクセル値)をオブジェクトにマッピングする処理である。具体的には、オブジェクト(プリミティブ面)の頂点等に設定(付与)されるテクスチャ座標等を用いてテクスチャ記憶部175からテクスチャ(色、α値などの表面プロパティ)を読み出す。そして、2次元の画像又はパターンであるテクスチャをオブジェクトにマッピングする。   The image generation unit 120 performs texture mapping processing and the like. The texture mapping process (texture fetch / texture sampling process) is a process for mapping the texture (texel value) stored in the texture storage unit 175 to the object. Specifically, the texture (surface properties such as color and α value) is read from the texture storage unit 175 using the texture coordinates or the like set (given) to the vertex or the like of the object (primitive surface). Then, a texture that is a two-dimensional image or pattern is mapped to the object.

音生成部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.

そして本実施形態では、テクスチャ記憶部175は、ファーシェーディング用テクスチャを記憶する。そして画像生成部120は、ファーシェーディング用テクスチャなどのテクスチャを用いたピクセルシェーダ処理を行うことで、オブジェクト空間において仮想カメラから見える画像を生成する。   In the present embodiment, the texture storage unit 175 stores fur shading texture. Then, the image generation unit 120 generates an image that can be viewed from the virtual camera in the object space by performing pixel shader processing using a texture such as a fur shading texture.

具体的には画像生成部120(ピクセル処理部124)は、描画対象ピクセル(ピクセルシェーダ処理の対象となるピクセル)の法線ベクトルにより特定される方向(例えば投影法線ベクトルの方向の逆方向、或いはその逆方向と所定パラメータ等により特定される方向)に、テクスチャ空間でのテクスチャ座標を順次シフトしながら、テクスチャ記憶部175のファーシェーディング用テクスチャのテクセル値(カラー値)をフェッチ(サンプリング)する。そしてフェッチにより得られた複数のテクセル値の合成値(合成カラー値)を描画対象ピクセルのピクセル値に設定(描画)することで、ファーシェーディング画像を生成する。なお描画対象ピクセルの法線ベクトルは、オブジェクトの頂点の法線ベクトルを補間することなどにより取得できる。   Specifically, the image generation unit 120 (pixel processing unit 124) is a direction specified by a normal vector of a drawing target pixel (pixel to be subjected to pixel shader processing) (for example, a direction opposite to the direction of the projection normal vector, Alternatively, the texture coordinates in the texture storage unit 175 are fetched (sampled) while the texture coordinates in the texture space are sequentially shifted in the opposite direction and the direction specified by a predetermined parameter or the like). . Then, a far shading image is generated by setting (drawing) a composite value (composite color value) of a plurality of texel values obtained by fetching to a pixel value of a drawing target pixel. The normal vector of the drawing target pixel can be acquired by interpolating the normal vector of the vertex of the object.

また仮想カメラのカメラ座標系(視点座標系)において仮想カメラの視線方向に沿った座標軸をZ軸(第3の座標軸)とし、Z軸に直交する座標軸をX軸、Y軸(第1、第2の座標軸)としたとする。この場合に画像生成部120は、描画対象ピクセルの法線ベクトルをXY平面(X軸、Y軸を含む平面。第1、第2の座標軸を含む平面)に投影した投影法線ベクトルの方向の逆方向により特定される方向(投影法線ベクトルの方向の逆方向と所定パラメータ等により特定される方向)に、テクスチャ空間でのテクスチャ座標(U、V)を順次シフト(移動)しながら、ファーシェーディング用テクスチャのテクセル値をフェッチする。そしてフェッチされた複数のテクセル値を合成することで、描画対象ピクセルのピクセル値を取得する。   Also, in the camera coordinate system (viewpoint coordinate system) of the virtual camera, the coordinate axis along the viewing direction of the virtual camera is the Z axis (third coordinate axis), the coordinate axis orthogonal to the Z axis is the X axis, and the Y axis (first and first axes). 2 coordinate axes). In this case, the image generation unit 120 projects the normal vector of the drawing target pixel onto the XY plane (the plane including the X axis and the Y axis. The plane including the first and second coordinate axes). While the texture coordinates (U, V) in the texture space are sequentially shifted (moved) in the direction specified by the reverse direction (the direction specified by the reverse direction of the direction of the projection normal vector and the predetermined parameter, etc.) Fetch texel value of shading texture. And the pixel value of a drawing object pixel is acquired by synthesize | combining several fetched texel values.

更に具体的には画像生成部120は、第1のフェッチ処理においてテクセル値C1=TEX(U1、V1)をフェッチし、第2のフェッチ処理においてテクセル値C2=TEX(U2、V2)をフェッチする。同様にして第iのフェッチ処理(1≦i<N)においてテクセル値Ci=TEX(Ui、Vi)をフェッチし、最後に第Nのフェッチ処理においてテクセル値CN=TEX(UN、VN)をフェッチする。そして、フェッチされたこれらのテクセル値C1〜CNの合成処理を行うことで得られた合成値を、描画対象ピクセルにピクセル値として書き込む。   More specifically, the image generation unit 120 fetches the texel value C1 = TEX (U1, V1) in the first fetch process, and fetches the texel value C2 = TEX (U2, V2) in the second fetch process. . Similarly, the texel value Ci = TEX (Ui, Vi) is fetched in the i-th fetch process (1 ≦ i <N), and finally the texel value CN = TEX (UN, VN) is fetched in the N-th fetch process. To do. Then, the combined value obtained by performing the combining process of these fetched texel values C1 to CN is written as a pixel value in the drawing target pixel.

この場合、各描画対象ピクセルの法線ベクトルをカメラ座標系のXY平面に投影した投影法線ベクトルの方向の逆方向(逆方向に対応する方向)が、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)へと向かう方向になる。そして投影法線ベクトルの長さが長くなるほど、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)への距離が長くなる。このようにすることで、法線ベクトルを用いたピクセルシェーダによるファーシェーディング処理を実現できる。   In this case, the reverse direction (direction corresponding to the reverse direction) of the projection normal vector obtained by projecting the normal vector of each drawing target pixel onto the XY plane of the camera coordinate system is changed from the texture coordinate (U1, V1) to the texture coordinate. The direction is (UN, VN). As the length of the projection normal vector increases, the distance from the texture coordinates (U1, V1) to the texture coordinates (UN, VN) increases. By doing in this way, the fur shading process by the pixel shader using a normal vector is realizable.

また画像生成部120は、K1×C1+K2×C2+・・・・+KN×CNの合成処理を行って合成値を取得する。この場合に、ウェイト値Ki+1がウェイト値Ki(1≦i<N)よりも小さい値になることが望ましい。このようにすれば、仮想カメラの視点から見た場合に、毛根から毛先に向かって太くなって見える毛の画像表現を実現できる。   Further, the image generation unit 120 performs a combination process of K1 × C1 + K2 × C2 +... + KN × CN to obtain a combined value. In this case, it is desirable that the weight value Ki + 1 is smaller than the weight value Ki (1 ≦ i <N). In this way, when viewed from the viewpoint of the virtual camera, it is possible to realize an image representation of hair that appears thicker from the hair root toward the hair tip.

またモデルオブジェクトの各部分について、適用するファーシェーディングの手法を異ならせてもよい。具体的には、画像生成部120は、キャラクタや服などのモデルオブジェクトの第1の部分については、テクスチャがマッピングされた複数の積層されたポリゴンを用いたシェル法により、ファーシェーディング画像を生成する。即ち、毛の断面図を表すテクスチャが各ポリゴンにマッピングされた複数のポリゴンを積層し、これらの複数のポリゴンを描画することでファーシェーディング画像を生成する。一方、モデルオブジェクトの第2の部分については、ファーシェーディング用テクスチャのフェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定する手法により、ファーシェーディング画像を生成する。   Further, the method of fur shading to be applied may be different for each part of the model object. Specifically, for the first part of the model object such as a character or clothes, the image generation unit 120 generates a fur shading image by a shell method using a plurality of stacked polygons to which textures are mapped. . That is, a plurality of polygons in which a texture representing a hair cross-sectional view is mapped to each polygon are stacked, and a fur shading image is generated by drawing these plurality of polygons. On the other hand, for the second part of the model object, a fur shading image is generated by a method of setting a composite value of a plurality of texel values obtained by fetching the fur shading texture as the pixel value of the drawing target pixel.

ここで第1の部分は、例えばゲーム等において仮想カメラが注視する可能性或いは頻度が高い領域である。具体的には、例えばモデルオブジェクトの前面側に設定された領域である。更に具体的には、キャラクタの顔に近い領域である。この第1の部分については、シェル法のファーシェーディング手法により画像を生成することで、よりリアルな毛質表現を実現する。なお第1の部分に対して、フィン法等の他のファーシェーディング手法を適用してもよい。   Here, the first portion is an area where the virtual camera is likely to be watched or the frequency is high, for example, in a game or the like. Specifically, it is an area set on the front side of the model object, for example. More specifically, the region is close to the character's face. About this 1st part, a more realistic hair quality expression is implement | achieved by producing | generating an image by the fur shading method of a shell method. Note that another fur shading method such as a fin method may be applied to the first portion.

一方、第2の部分は、ゲーム等において仮想カメラが注視する可能性或いは頻度が低い領域である。具体的には、第2の部分は、モデルオブジェクトの背面側に設定された領域である。或いはモデルオブジェクトの前面側の領域であっても、仮想カメラが注視する可能性或いは頻度が低い領域は、第2の部分に設定できる。この第2の部分については、ピクセルシェーダを用いた本実施形態のファーシェーディング手法により画像を生成することで、少ない処理負荷で毛質表現を実現する。このようにすれば、シェル法のファーシェーディング手法を全ての領域に適用すると処理負荷が重くなりすぎる場合に、第1の部分よりも広い第2の部分に対してピクセルシェーダを用いた本実施形態のファーシェーディング手法を適用することで、リアルな毛質表現と処理負荷の軽減を両立できるようになる。   On the other hand, the second part is an area where the possibility or frequency of the virtual camera in the game or the like is low. Specifically, the second part is an area set on the back side of the model object. Alternatively, even in the area on the front side of the model object, an area where the virtual camera is less likely to be watched or the frequency is low can be set as the second portion. About this 2nd part, a hair quality expression is implement | achieved by a small processing load by producing | generating an image with the fur shading method of this embodiment using a pixel shader. In this manner, when the processing load becomes too heavy when the fur shading method of the shell method is applied to all regions, the present embodiment using the pixel shader for the second portion wider than the first portion. By applying the fur shading method, it is possible to achieve both realistic hair expression and reduction of processing load.

また画像生成部120は、合成対象となるテクセル値の個数(テクセル値のフェッチ回数)を可変に設定にしてもよい。例えば処理負荷が重かったり処理時間が足りなかった場合には、合成対象となるテクセル値の個数を少なくする。これにより、処理負荷を軽減したり、処理時間を節約できる。一方、処理負荷や処理時間に余裕がある場合には、合成対象となるテクセル値の個数を多くする。これにより、合成対象となるテクセル値の個数を増やして、より品質の高いファーシェーディング画像を生成できるようになる。   The image generation unit 120 may variably set the number of texel values to be combined (the number of texel value fetches). For example, when the processing load is heavy or the processing time is insufficient, the number of texel values to be combined is reduced. Thereby, processing load can be reduced and processing time can be saved. On the other hand, when there is a margin in processing load and processing time, the number of texel values to be combined is increased. As a result, the number of texel values to be combined can be increased to generate a fur shading image with higher quality.

例えば合成対象となるテクセル値の個数(フェッチ回数)は、処理部(CPU)の処理能力に応じて変更してもよい。即ち、処理能力が高い場合には、合成対象となるテクセル値の個数を多くし、処理能力が低い場合には、合成対象となるテクセル値の個数を少なくする。   For example, the number of texel values to be combined (number of fetches) may be changed according to the processing capability of the processing unit (CPU). That is, when the processing capability is high, the number of texel values to be combined is increased, and when the processing capability is low, the number of texel values to be combined is decreased.

2.本実施形態の手法
2.1 ファーシェーディング
まず図2(A)〜図2(C)を用いて、シェル法によるファーシェーディングについて説明する。このシェル法では、図2(A)に示すような毛を表現するために、図2(B)に示すように毛を横方向に輪切りにしたような毛の断面図のテクスチャを用意する。そして図2(C)に示すように、例えばモデルオブジェクトの法線方向に一定の間隔を空けて複数のポリゴンを配置し、これらの複数のポリゴンの各ポリゴンに対して、図2(B)のテクスチャをマッピングする。すると、断面図のテクスチャが毛の方向に重なることで、仮想カメラの視点から見ると、オブジェクトの表面に毛が生えて見えるような表現になる。なお図2(B)のテクスチャに対して半透明処理用のα値等を設定することで、毛の透き通った質感等も表現できるようになる。
2. 2. Method of this Embodiment 2.1 Fur Shading First, the fur shading by the shell method will be described with reference to FIGS. 2 (A) to 2 (C). In this shell method, in order to express the hair as shown in FIG. 2A, a texture of a cross-sectional view of the hair is prepared, as shown in FIG. 2B. Then, as shown in FIG. 2C, for example, a plurality of polygons are arranged at regular intervals in the normal direction of the model object, and for each of these polygons, the polygon of FIG. Map the texture. Then, since the texture of the cross-sectional view overlaps with the direction of the hair, when viewed from the viewpoint of the virtual camera, the expression appears such that the hair appears on the surface of the object. Note that by setting an α value for translucent processing or the like for the texture of FIG.

さて図2(A)〜図2(C)のシェル法によるファーシェーディングでは、モデルオブジェクトの毛質を表現したい部分に、例えば4〜8枚のポリゴンを積層して配置する必要がある。例えば図3の毛皮のコートのモデルオブジェクトのE1やE2に示す領域にファーシェーディングを施す場合には、これらの領域に対して複数のポリゴンを積層して配置する必要がある。このため、モデルオブジェクトを構成するポリゴンの枚数が増えてしまい、処理負荷やデータ量が増加してしまう。特に、モデルオブジェクトの全ての部分にシェル法によるファーシェーディングを適用すると、モデルオブジェクトを構成するポリゴンの枚数が数倍になるおそれがある。この場合に、いわゆるジオメトリシェーダにより、積層されるポリゴンをリアルタイムに動的に生成する手法も考えれるが、この手法も処理負荷の増加につながると共に、このようなジオメトリシェーダを有しない画像生成システムでは、この手法を採用できないという問題がある。   In the fur shading based on the shell method shown in FIGS. 2A to 2C, for example, 4 to 8 polygons need to be stacked and arranged in a portion where the hair of the model object is to be expressed. For example, when fur shading is applied to the areas indicated by E1 and E2 of the model object of the fur coat in FIG. 3, it is necessary to stack a plurality of polygons on these areas. For this reason, the number of polygons constituting the model object increases, and the processing load and data amount increase. In particular, if fur shading by the shell method is applied to all parts of the model object, the number of polygons constituting the model object may increase several times. In this case, a method of dynamically generating polygons to be stacked in real time using a so-called geometry shader can be considered, but this method also leads to an increase in processing load, and in an image generation system that does not have such a geometry shader. There is a problem that this method cannot be adopted.

そこで本実施形態では、ピクセルシェーダを利用したファーシェーディング手法を採用している。即ち仮想カメラ(画面)に対する法線の傾きでテクスチャのマルチサンプリングを行うことで、擬似的なファーシェーディングを実現する。   Therefore, in this embodiment, a fur shading method using a pixel shader is adopted. In other words, pseudo far shading is realized by performing multi-sampling of the texture with the inclination of the normal to the virtual camera (screen).

例えば図4(A)〜図4(E)において、PIXは、ピクセルシェーダの描画対象(処理対象)となるピクセルである。そしてFUR1は描画対象ピクセルPIXから生えている毛である。そして毛FUR1の画像は、毛根では太く、毛先に行くにしたがって細くなる画像になっている。このような毛FUR1の画像を生成する場合に、ピクセルシェーダではピクセル単位でしか描画ができないため、毛FUR1の画像を一度の描画で生成することはできない。そこで本実施形態では、テクスチャのマルチサンプリングにより、このような毛画像を生成する手法を採用する。   For example, in FIGS. 4A to 4E, PIX is a pixel to be rendered (processed) by the pixel shader. FUR1 is a hair growing from the drawing target pixel PIX. The image of the hair FUR1 is an image that is thick at the hair root and narrows as it goes to the hair tip. When such an image of the hair FUR1 is generated, the pixel shader can draw only in units of pixels, and thus the image of the hair FUR1 cannot be generated by one drawing. Therefore, in the present embodiment, a method for generating such a hair image by texture multi-sampling is adopted.

例えば図4(B)のFUR2は、FUR1の毛根のピクセルPIXの右隣のピクセルから生えている毛である。また図4(C)のFUR3は、FUR2の毛根の右隣のピクセルから生えている毛であり、図4(D)のFUR4は、FUR3の毛根の右隣のピクセルから生えている毛である。また図4(E)のFUR5は、FUR4の毛根の右隣のピクセルから生えている毛である。   For example, FUR2 in FIG. 4B is a hair growing from a pixel adjacent to the right of the pixel PIX of the hair root of FUR1. In addition, FUR3 in FIG. 4C is a hair growing from a pixel right next to the hair root of FUR2, and FUR4 in FIG. 4D is a hair growing from a pixel right next to the hair root of FUR3. . Moreover, FUR5 of FIG.4 (E) is the hair which has grown from the pixel on the right side of the hair root of FUR4.

前述のようにピクセルシェーダでは、ピクセル単位でしか描画ができない。このため本実施形態においては、図4(A)では、毛FUR1の毛根の画像を描画対象ピクセルPIXに描画し、図4(B)では、隣の毛FUR2の毛根から例えば1ピクセル(テクセル)分だけ毛先側の画像を、描画対象ピクセルPIXに描画し、図4(C)では、更に隣の毛FUR3の毛根から例えば2ピクセル分だけ毛先側の画像を、描画対象ピクセルPIXに描画する。そして最後の図4(E)では、毛FUR5の毛先(末端)の画像を描画する。   As described above, the pixel shader can draw only in units of pixels. Therefore, in the present embodiment, in FIG. 4A, the image of the hair root of the hair FUR1 is drawn on the drawing target pixel PIX, and in FIG. 4B, for example, one pixel (texel) from the hair root of the adjacent hair FUR2. The image on the hair end side is drawn on the drawing target pixel PIX by the amount, and in FIG. 4C, the image on the hair tip side is drawn on the drawing target pixel PIX by, for example, 2 pixels from the hair root of the adjacent hair FUR3. To do. And in the last FIG.4 (E), the image of the hair | bristle tip (terminal) of hair FUR5 is drawn.

図4(A)〜図4(E)のようにすれば、ピクセルシェーダを用いて擬似的なファーシェーディング処理を実現できる。そして図4(A)〜図4(E)の描画を実現するために、テクスチャのマルチサンプリングと、各ピクセルの法線ベクトルの情報を用いる。   4A to 4E, a pseudo fur shading process can be realized using a pixel shader. And in order to implement | achieve drawing of FIG. 4 (A)-FIG.4 (E), the multi-sampling of a texture and the normal vector information of each pixel are used.

例えば図5に本実施形態のファーシェーディング用のテクスチャの例を示す。本実施形態では、このファーシェーディング用のテクスチャのテクセル値を複数回サンプリングするマルチサンプリング手法を採用する。   For example, FIG. 5 shows an example of the texture for fur shading of this embodiment. In the present embodiment, a multi-sampling method that samples the texel value of the texture for fur shading a plurality of times is adopted.

図6に本実施形態のファーシェーディング手法を実現する処理のフローチャートを示す。まず、テクスチャ座標(U1、V1)によってサンプリングされるテクセル値C1=TEX(U1、V1)をフェッチする(ステップS11)。このテクセル値は、ファーシェーディングを行わない通常のテクスチャマッピングにおいてもフェッチされて、描画対象ピクセルPIXに書き込まれるテクセル値(色データ)であり、例えば毛の毛根の画像に対応するテクセル値(図4(A)のFUR1の毛根画像)である。   FIG. 6 shows a flowchart of processing for realizing the fur shading method of this embodiment. First, the texel value C1 = TEX (U1, V1) sampled by the texture coordinates (U1, V1) is fetched (step S11). This texel value is a texel value (color data) that is fetched even in normal texture mapping that does not perform fur shading and is written to the drawing target pixel PIX. For example, the texel value corresponding to the image of the hair follicle (FIG. 4). (A) FUR1 hair root image).

次に、テクスチャ座標を(U1、V1)から(U2、V2)にシフトさせて、テクスチャ座標(U2、V2)によってサンプリングされるテクセル値C2=TEX(U2、V2)をフェッチする(ステップS12)。このテクセル値は、隣の毛(図4(B)のFUR2)の毛根から例えば1ピクセル分だけ毛先側の画像に対応するテクセル値である。   Next, the texture coordinates are shifted from (U1, V1) to (U2, V2), and the texel value C2 = TEX (U2, V2) sampled by the texture coordinates (U2, V2) is fetched (step S12). . This texel value is a texel value corresponding to an image on the hair end side by, for example, one pixel from the root of the adjacent hair (FUR2 in FIG. 4B).

次に、テクスチャ座標を(U2、V2)から(U3、V3)にシフトさせて、テクスチャ座標(U3、V3)によってサンプリングされるテクセル値C3=TEX(U3、V3)をフェッチする(ステップS13)。このテクセル値は、更に隣の毛(図4(B)のFUR3)の毛根から例えば2ピクセル分だけ毛先側の画像に対応するテクセル値である。   Next, the texture coordinates are shifted from (U2, V2) to (U3, V3), and the texel value C3 = TEX (U3, V3) sampled by the texture coordinates (U3, V3) is fetched (step S13). . This texel value is a texel value corresponding to an image on the hair end side, for example, by 2 pixels from the hair root of the adjacent hair (FUR3 in FIG. 4B).

ステップS14、S15、S16においても、ステップS11、S12、S13と同様に、テクスチャ座標を順次シフトしながら、ファーシェーディング用テクスチャのテクセル値をフェッチする。   In steps S14, S15, and S16, as in steps S11, S12, and S13, the texture coordinates for the fur shading texture are fetched while sequentially shifting the texture coordinates.

このようにテクスチャ座標をずらしながらテクスチャのマルチサンプリングを行うことで、描画対象ピクセルPIXに対応して、複数のテクセル値C1〜C6がフェッチされる。そして、これらのフェッチされたテクセル値C1〜C6の合成処理を行う(ステップS17)。具体的には、合成値CSY=K1×C1+K2×C2+K3×C3+K4×C4+K5×C5+K6×C6を求め、求められた合成値CSYを描画対象ピクセルのピクセル値(カラー値)として出力する。   By performing texture multi-sampling while shifting texture coordinates in this way, a plurality of texel values C1 to C6 are fetched corresponding to the drawing target pixel PIX. Then, a synthesis process of these fetched texel values C1 to C6 is performed (step S17). Specifically, the composite value CSY = K1 * C1 + K2 * C2 + K3 * C3 + K4 * C4 + K5 * C5 + K6 * C6 is obtained, and the obtained composite value CSY is output as the pixel value (color value) of the drawing target pixel.

なおウェイト値K1〜K6(合成係数)では、ウェイト値Ki+1がウェイト値Ki(1≦i<N)よりも小さい値になるという関係が成り立つ。即ちK1からK6に行くに従って、ウェイト値を徐々に小さくする。こうすることで、図4(A)〜図4(E)に示すように、毛根の画像のウェイト値(K1)が最も高くなり、毛先の画像のウェイト値(K6)が最も低くなるようになる。   In the weight values K1 to K6 (combination coefficient), the relationship that the weight value Ki + 1 is smaller than the weight value Ki (1 ≦ i <N) is established. In other words, the weight value is gradually reduced as it goes from K1 to K6. By doing so, as shown in FIGS. 4A to 4E, the weight value (K1) of the hair root image is the highest and the weight value (K6) of the hair tip image is the lowest. become.

なお図6では、テクセル値のフェッチ回数N(合成対象となるテクセル値の個数)が6回である場合について示しているが、フェッチ回数Nは任意である。例えばCPUの処理能力が高い場合や処理に余裕がある場合には、フェッチ回数Nを増やし、CPUの処理能力が低い場合や処理に余裕がない場合には、フェッチ回数Nを減らせばよい。   FIG. 6 shows a case where the number of fetches N of texel values N (the number of texel values to be combined) is 6, but the number of fetches N is arbitrary. For example, when the processing capacity of the CPU is high or there is a margin in processing, the number of fetches N may be increased. When the processing capacity of the CPU is low or when there is no margin in processing, the number of fetches N may be decreased.

次にテクスチャ座標のシフト手法の詳細について説明する。図7(A)はテクスチャのマッピング対象となるオブジェクトOBの例である。ここでは説明を簡素化するために、オブジェクトOBは球形状であるとして説明を行う。   Next, details of the texture coordinate shift method will be described. FIG. 7A shows an example of an object OB that is a texture mapping target. Here, in order to simplify the description, the description will be made assuming that the object OB has a spherical shape.

図7(B)に示すように、オブジェクトOBの各頂点には法線ベクトル(法線情報)が設定されている。ピクセルシェーダ処理を行う際には、この頂点の法線ベクトルを補間することで、描画対象ピクセルPIXの法線ベクトルを取得する。   As shown in FIG. 7B, a normal vector (normal information) is set at each vertex of the object OB. When performing the pixel shader processing, the normal vector of the drawing target pixel PIX is obtained by interpolating the normal vector of the vertex.

図8(A)に、描画対象ピクセルPIXに設定される法線ベクトルN(Nx、Ny、Nz)と仮想カメラVCの関係を示す。ここで、仮想カメラVCのカメラ座標系において、仮想カメラVCの視線方向DVに沿った座標軸をZ軸(第3の座標軸)とし、Z軸に直交する座標軸をX軸、Y軸(第1、第2の座標軸)とする。すると、描画対象ピクセルPIXの法線ベクトルN(Nx、Ny、Nz)をXY平面に投影した投影法線ベクトルNP(Nx、Ny)は、図8(B)に示すようなベクトルになる。この投影法線ベクトルNPは、仮想カメラVCから見える法線ベクトルNに相当する。本実施形態では、この投影法線ベクトルNPから、フェッチすべきテクスチャのテクスチャ座標(U、V)を求める。具体的には、投影法線ベクトルNPのX座標Nx、Y座標Nyを用いた所定の演算式(或いは演算テーブル)により、テクスチャ座標(U、V)を求める。   FIG. 8A shows the relationship between the normal vector N (Nx, Ny, Nz) set for the drawing target pixel PIX and the virtual camera VC. Here, in the camera coordinate system of the virtual camera VC, the coordinate axis along the visual line direction DV of the virtual camera VC is the Z axis (third coordinate axis), the coordinate axis orthogonal to the Z axis is the X axis, and the Y axis (first, Second coordinate axis). Then, the projection normal vector NP (Nx, Ny) obtained by projecting the normal vector N (Nx, Ny, Nz) of the drawing target pixel PIX onto the XY plane becomes a vector as shown in FIG. This projection normal vector NP corresponds to the normal vector N seen from the virtual camera VC. In this embodiment, the texture coordinates (U, V) of the texture to be fetched are obtained from the projection normal vector NP. Specifically, the texture coordinates (U, V) are obtained by a predetermined calculation formula (or calculation table) using the X coordinate Nx and the Y coordinate Ny of the projection normal vector NP.

例えば図9(A)では、ピクセルシェーダの描画対象ピクセルPIXは中心点(視線方向DVと球オブジェクトOBが交わる点)に設定されている。そして描画対象ピクセルPIXの法線ベクトルNの方向は、仮想カメラVCの視線方向DVと平行になっている。即ち法線ベクトルNは仮想カメラVCの方に向いている。従って仮想カメラVCからは図9(B)のように見え、投影法線ベクトルNPのX座標Nx、Y座標Nyは共に0になる。このように図9(B)では、仮想カメラVCから見て投影法線ベクトルNPは点に見える。従ってこの場合には図9(C)に示すように、テクスチャ空間において同じ点(同じテクスチャ座標の点)を6回サンプリングしてフェッチする。   For example, in FIG. 9A, the drawing target pixel PIX of the pixel shader is set to the center point (the point where the line-of-sight direction DV and the spherical object OB intersect). The direction of the normal vector N of the drawing target pixel PIX is parallel to the visual line direction DV of the virtual camera VC. That is, the normal vector N is directed toward the virtual camera VC. Accordingly, the virtual camera VC looks as shown in FIG. 9B, and both the X coordinate Nx and the Y coordinate Ny of the projection normal vector NP are zero. In this way, in FIG. 9B, the projection normal vector NP appears as a point when viewed from the virtual camera VC. Therefore, in this case, as shown in FIG. 9C, the same point (point of the same texture coordinate) in the texture space is sampled and fetched six times.

具体的には図6のステップS11の第1のフェッチ処理では、対応点FC1のテクスチャ座標(U1、V1)によりテクセル値C1=TEX(U1、V1)がフェッチされる。ここで対応点のテクスチャ座標(U1、V1)は、通常のテクスチャマッピングにおいて描画対象ピクセルPIXに対応づけられるテクスチャ座標である。従って、ステップS11の第1のフェッチ処理FC1では、その描画対象ピクセルPIXに対応づけられるテクセル値C1=TEX(U1、V1)がフェッチされる。   Specifically, in the first fetch process of step S11 in FIG. 6, the texel value C1 = TEX (U1, V1) is fetched from the texture coordinates (U1, V1) of the corresponding point FC1. Here, the texture coordinates (U1, V1) of the corresponding points are texture coordinates associated with the drawing target pixel PIX in normal texture mapping. Accordingly, in the first fetch process FC1 in step S11, the texel value C1 = TEX (U1, V1) associated with the drawing target pixel PIX is fetched.

一方、ステップS12〜S16の第2〜第6のフェッチ処理においても、対応点FC1と同じ点FC2〜FC6のテクスチャ座標のテクセル値がフェッチされる。即ちステップS12〜S16のテクスチャ座標(U2、V2)はステップS11のテクスチャ座標(U1、V1)と等しくなり、ステップS12〜S16でフェッチされるテクセル値C2〜C6も、ステップS11でフェッチされるテクセル値C1と等しくなる。   On the other hand, also in the second to sixth fetch processes in steps S12 to S16, the texture coordinate texel values of the same points FC2 to FC6 as the corresponding points FC1 are fetched. That is, the texture coordinates (U2, V2) in steps S12 to S16 are equal to the texture coordinates (U1, V1) in step S11, and the texel values C2 to C6 fetched in steps S12 to S16 are also fetched in step S11. It becomes equal to the value C1.

そして、ステップS11〜S16でフェッチされた同じ値のテクセル値(=C1)が、ステップS17で合成され、合成値CSY=(K1+K2+K3+K4+K5+K6)×C1が描画対象ピクセルPIXに描画される。   Then, the same texel values (= C1) fetched in steps S11 to S16 are combined in step S17, and the combined value CSY = (K1 + K2 + K3 + K4 + K5 + K6) × C1 is drawn on the drawing target pixel PIX.

図10(A)では、描画対象ピクセルPIXは中心点(視線方向DVと球オブジェクトOBが交わる点)よりも左側にあり、法線ベクトルNの方向は図9(A)に比べて左向きになっている。従って仮想カメラVCからは図10(B)のように見え、投影法線ベクトルNPのX座標Nxは負の値になり、Y座標Nyは0になる。このように図10(B)では、仮想カメラVCから見て投影法線ベクトルNPの向きは左方向になる。従ってこの場合には図10(C)に示すように、対応点FC1から右方向(NPの方向と逆方向)に6回サンプリングしてフェッチする。   In FIG. 10A, the drawing target pixel PIX is on the left side of the center point (the point where the line-of-sight direction DV and the sphere object OB intersect), and the direction of the normal vector N is leftward compared to FIG. 9A. ing. Accordingly, the virtual camera VC looks as shown in FIG. 10B, the X coordinate Nx of the projection normal vector NP becomes a negative value, and the Y coordinate Ny becomes zero. Thus, in FIG. 10B, the direction of the projection normal vector NP is the left direction when viewed from the virtual camera VC. Therefore, in this case, as shown in FIG. 10C, sampling is fetched six times in the right direction (opposite to the NP direction) from the corresponding point FC1.

具体的には図6のステップS11の第1のフェッチ処理では、対応点FC1のテクスチャ座標(U1、V1)によりテクセル値C1=TEX(U1、V1)がフェッチされる。次のステップS12の第2のフェッチ処理では、FC1の右方向の点FC2のテクスチャ座標(U2、V2)によりテクセル値C2=TEX(U2、V2)がフェッチされる。次のステップS13の第3のフェッチ処理では、FC2の右方向の点FC3のテクスチャ座標(U3、V3)によりテクセル値C3=TEX(U3、V3)がフェッチされる。ステップS14〜S16の第4〜第6のフェッチ処理も同様である。   Specifically, in the first fetch process of step S11 in FIG. 6, the texel value C1 = TEX (U1, V1) is fetched from the texture coordinates (U1, V1) of the corresponding point FC1. In the second fetch process in the next step S12, the texel value C2 = TEX (U2, V2) is fetched from the texture coordinates (U2, V2) of the point FC2 in the right direction of FC1. In the third fetch process in the next step S13, the texel value C3 = TEX (U3, V3) is fetched from the texture coordinates (U3, V3) of the point FC3 in the right direction of FC2. The same applies to the fourth to sixth fetch processes in steps S14 to S16.

そして、ステップS11〜S16でフェッチされたテクセル値C1〜C6がステップS17で合成され、合成値CSY=K1×C1+K2×C2+K3×C3+K4×C4+K5×C5+K6×C6が、描画対象ピクセルPIXに描画される。   Then, the texel values C1 to C6 fetched in steps S11 to S16 are combined in step S17, and the combined value CSY = K1 × C1 + K2 × C2 + K3 × C3 + K4 × C4 + K5 × C5 + K6 × C6 is drawn on the drawing target pixel PIX.

即ち図10(C)において、点FC1のウェイト値K1は最も大きくなっており、点FC6のウェイト値K6は最も小さくなっている。そして、点FC1でフェッチされるテクセル値C1により得られるK1×C1は、図4(A)の毛FUR1の毛根の画像に相当し、点FC6でフェッチされるテクセル値C6により得られるK6×C6は、図4(E)の毛FUR5の毛先の画像に相当する。つまり図10(C)のようにテクセル値C1〜C6をフェッチして、合成値CSY=K1×C1+K2×C2+K3×C3+K4×C4+K5×C5+K6×C6を描画対象ピクセルPIXに描画することは、図4(A)〜図4(E)での描画対象ピクセルPIXへの描画に相当する。   That is, in FIG. 10C, the weight value K1 at the point FC1 is the largest, and the weight value K6 at the point FC6 is the smallest. K1 × C1 obtained from the texel value C1 fetched at the point FC1 corresponds to the image of the hair follicle of the hair FUR1 in FIG. 4A, and K6 × C6 obtained from the texel value C6 fetched at the point FC6. Corresponds to the image of the hair tip of the hair FUR5 in FIG. That is, fetching the texel values C1 to C6 as shown in FIG. 10C and drawing the combined value CSY = K1 × C1 + K2 × C2 + K3 × C3 + K4 × C4 + K5 × C5 + K6 × C6 on the drawing target pixel PIX is shown in FIG. This corresponds to drawing on the drawing target pixel PIX in (A) to (E) of FIG.

図11(A)では、描画対象ピクセルPIXは中心点よりも右上にあり、法線ベクトルNの方向は図9(A)に比べて右上向きになっている。従って仮想カメラVCからは図11(B)のように見え、投影法線ベクトルNPのX座標Nx、Y座標Nyは共に正の値になる。このように図11(B)では、仮想カメラVCから見て投影法線ベクトルNPの向きは右上方向になる。従ってこの場合には図11(C)に示すように、対応点FC1から左下方向(NPの方向と逆方向)に6回サンプリングしてフェッチする。   In FIG. 11A, the drawing target pixel PIX is on the upper right side with respect to the center point, and the direction of the normal vector N is on the upper right side as compared with FIG. 9A. Accordingly, the virtual camera VC looks as shown in FIG. 11B, and both the X coordinate Nx and the Y coordinate Ny of the projection normal vector NP are positive values. Thus, in FIG. 11B, the direction of the projection normal vector NP is the upper right direction when viewed from the virtual camera VC. Therefore, in this case, as shown in FIG. 11C, sampling is fetched six times from the corresponding point FC1 in the lower left direction (opposite to the NP direction).

具体的には図6のステップS11の第1のフェッチ処理では、対応点FC1のテクスチャ座標(U1、V1)によりテクセル値C1=TEX(U1、V1)がフェッチされる。次のステップS12の第2のフェッチ処理では、FC1の左下方向の点FC2のテクスチャ座標(U2、V2)によりテクセル値C2=TEX(U2、V2)がフェッチされる。次のステップS13の第3のフェッチ処理では、FC2の左下方向の点FC3のテクスチャ座標(U3、V3)によりテクセル値C3=TEX(U3、V3)がフェッチされる。ステップS14〜S16の第4〜第6のフェッチ処理も同様である。   Specifically, in the first fetch process of step S11 in FIG. 6, the texel value C1 = TEX (U1, V1) is fetched from the texture coordinates (U1, V1) of the corresponding point FC1. In the second fetch process in the next step S12, the texel value C2 = TEX (U2, V2) is fetched from the texture coordinates (U2, V2) of the point FC2 in the lower left direction of FC1. In the third fetch process of the next step S13, the texel value C3 = TEX (U3, V3) is fetched from the texture coordinates (U3, V3) of the point FC3 in the lower left direction of FC2. The same applies to the fourth to sixth fetch processes in steps S14 to S16.

そして、ステップS11〜S16でフェッチされたテクセル値C1〜C6がステップS17で合成され、合成値CSY=K1×C1+K2×C2+K3×C3+K4×C4+K5×C5+K6×C6が、描画対象ピクセルPIXに描画される。   Then, the texel values C1 to C6 fetched in steps S11 to S16 are combined in step S17, and the combined value CSY = K1 × C1 + K2 × C2 + K3 × C3 + K4 × C4 + K5 × C5 + K6 × C6 is drawn on the drawing target pixel PIX.

以上のように本実施形態では、投影法線ベクトルNPの方向の逆方向により特定される方向に、テクスチャ座標(U、V)を順次シフトしながらファーシェーディング用テクスチャのテクセル値がフェッチされる。   As described above, in this embodiment, the texel value of the texture for fur shading is fetched while sequentially shifting the texture coordinates (U, V) in the direction specified by the direction opposite to the direction of the projection normal vector NP.

例えば図10(B)では、投影法線ベクトルNPの方向は左方向である。従ってこの場合には、図10(C)の点FC1〜FC6に示すように、投影法線ベクトルNPの方向と逆方向の右方向に、テクスチャ座標(U、V)を順次シフトしながらテクセル値がフェッチされる。また図11(B)では、投影法線ベクトルNPの方向は右上方向である。従ってこの場合には、図11(C)の点FC1〜FC6に示すように、投影法線ベクトルNPの方向と逆方向の左下方向に、テクスチャ座標(U、V)を順次シフトしながらテクセル値がフェッチされる。   For example, in FIG. 10B, the direction of the projection normal vector NP is the left direction. Therefore, in this case, as shown by points FC1 to FC6 in FIG. 10C, the texel values are sequentially shifted while the texture coordinates (U, V) are sequentially shifted in the right direction opposite to the direction of the projection normal vector NP. Is fetched. In FIG. 11B, the direction of the projection normal vector NP is the upper right direction. Accordingly, in this case, as shown by points FC1 to FC6 in FIG. 11C, the texel values are sequentially shifted in the texture coordinates (U, V) in the lower left direction opposite to the direction of the projection normal vector NP. Is fetched.

また本実施形態では、投影法線ベクトルNPの方向の逆方向は、図6、図10(C)、図11(C)に示すように、テクスチャ座標(U1、V1)からテクスチャ座標(U6、V6)(広義にはテクスチャ座標(UN、VN))へと向かう方向である。そして投影法線ベクトルNPの長さが長くなるほど、テクスチャ座標(U1、V1)からテクスチャ座標(U6、V6)への距離が長くなる。   In the present embodiment, the reverse direction of the direction of the projection normal vector NP is changed from the texture coordinates (U1, V1) to the texture coordinates (U6, V1) as shown in FIGS. 6, 10C, and 11C. V6) (direction in a broad sense, texture coordinates (UN, VN)). As the length of the projection normal vector NP increases, the distance from the texture coordinates (U1, V1) to the texture coordinates (U6, V6) increases.

例えば図10(B)に比べて図11(B)の方が、投影法線ベクトルNPの長さが長い。従って、図10(C)に比べて図11(C)の方が、FC1からFC6への距離であるテクスチャ座標(U1、V1)からテクスチャ座標(U6、V6)への距離が長くなる。このようにすれば、例えば球オブジェクトOBの中心点では、毛の長さが最も短くなり、境界に近づくにつれて毛が長くなるように見えるファーシェーディングを実現できる。   For example, the length of the projection normal vector NP is longer in FIG. 11B than in FIG. 10B. Therefore, in FIG. 11C, the distance from the texture coordinates (U1, V1) to the texture coordinates (U6, V6), which is the distance from FC1 to FC6, is longer than in FIG. In this way, for example, fur shading can be realized in which the length of the hair is the shortest at the center point of the sphere object OB, and the hair looks longer as it approaches the boundary.

以上のように本実施形態では、例えば図6に示すように、ピクセルシェーダによる複数回のテクセル値のフェッチ処理と、得られたテクセル値の合成処理を行うだけで、ファーシェーディング処理を実現できる。従って、シェル法等に比べて少ない処理負荷でファーシェーディング画像を生成することが可能になる。   As described above, in the present embodiment, for example, as shown in FIG. 6, the far shading process can be realized only by performing a plurality of texel value fetch processes by the pixel shader and the synthesis process of the obtained texel values. Therefore, it is possible to generate a fur shading image with a smaller processing load than the shell method or the like.

なお図10(A)〜図11(C)は、テクスチャ座標をシフトさせる方向(FC1からFC6への向かう方向)が、投影法線ベクトルNPの方向の逆方向である場合を例にとり説明したが、本実施形態はこれに限定されない。例えばパラメータの調整により、テクスチャ座標をシフトさせる方向を、投影法線ベクトルNPの逆方向から変化させてもよい。例えば方向調整パラメータを用いて、投影法線ベクトルNPを回転させる処理を行うことで、テクスチャ座標をシフトさせる方向を変化させる。このようにすることで、いわゆる毛の寝る方向(毛並みの方向)を調整できるようになる。   Note that FIGS. 10A to 11C have been described by taking as an example the case where the direction in which the texture coordinates are shifted (the direction from FC1 to FC6) is opposite to the direction of the projection normal vector NP. The present embodiment is not limited to this. For example, the direction in which the texture coordinates are shifted may be changed from the direction opposite to the projection normal vector NP by adjusting parameters. For example, the direction in which the texture coordinates are shifted is changed by performing a process of rotating the projection normal vector NP using the direction adjustment parameter. By doing in this way, it becomes possible to adjust the so-called hair lying direction (direction of fur).

或いは、テクスチャ座標のシフト距離FC1からFC6への距離)も、パラメータにより調整してもよい。例えば長さ調整パラメータを用いて、投影法線ベクトルNPの長さを長くしたり、短くする。このようにすることで、ファーシェーディングにおける毛の長さを調整できるようになる。   Alternatively, the texture coordinate shift distance FC1 to FC6) may be adjusted by a parameter. For example, using the length adjustment parameter, the length of the projection normal vector NP is increased or decreased. In this way, the hair length in fur shading can be adjusted.

2.2 ファーシェーディング手法の使い分け
本実施形態では、モデルオブジェクトの各部分毎に、適用するファーシェーディングの手法を異ならせてもよい。例えば図12(A)、図12(B)は、毛皮のコートに対するファーシェーディング処理の例である。
2.2 Different Use of Fur Shading Technique In this embodiment, the applied fur shading technique may be different for each part of the model object. For example, FIGS. 12A and 12B are examples of fur shading processing for a fur coat.

図12(A)に示すように、毛皮のコートでは、襟の部分や肩の部分については、仮想カメラにより頻繁に写され、目立つ部分である。また、襟の部分や肩の部分では、毛皮の立体的なふさふさ感を表現することが望ましい。従って、このような襟の部分や肩の部分(広義には第1の部分、前面側)では、図2(A)〜図2(C)で説明したシェル法によるファーシェーディング手法によりファーシェーディング画像を生成する。即ち、この部分には、テクスチャがマッピングされた複数のポリゴンを積層し、これらの複数のポリゴンを用いたシェル法により、ファーシェーディング画像を生成する。このように、毛皮のコートやキャラクタなどのモデルオブジェクトの前面側では、シェル法によるファーシェーディング処理を行う。   As shown in FIG. 12A, in the fur coat, the collar portion and the shoulder portion are frequently captured by a virtual camera and are conspicuous portions. Also, it is desirable to express the three-dimensional feeling of fur in the collar and shoulder. Therefore, in such a collar portion and shoulder portion (first portion in the broad sense, front side), a fur shading image is obtained by the fur shading method based on the shell method described in FIGS. 2 (A) to 2 (C). Is generated. That is, a plurality of polygons to which textures are mapped are stacked in this portion, and a fur shading image is generated by a shell method using the plurality of polygons. In this way, fur shading processing by the shell method is performed on the front side of model objects such as fur coats and characters.

一方、図12(B)に示すように、毛皮の背中側(背面側)は、仮想カメラによりあまり写されない領域であり、目立たない領域である。そして、このような広い範囲の背中の領域に対して、シェル法によるファーシェーディング処理を施すと、ポリゴン数が増えてしまい,処理負荷が増大する。従って、このような背中側(広義には第2の部分、背面側)では、図6で説明したように、複数のテクセル値をフェッチし、フェッチされた複数のテクセル値の合成値をピクセル値に設定するファーシェーディング手法により、ファーシェーディング画像を生成する。このようにすれば、シェル法を全ての領域に適用すると処理負荷が重くなりすぎる場合に、背中側(或いは前面側の目立たない領域)に対してピクセルシェーダを用いた本実施形態のファーシェーディング手法を適用することで、リアルな毛質表現と処理負荷の軽減を両立できるようになる。   On the other hand, as shown in FIG. 12B, the back side (rear side) of the fur is a region that is not so well captured by the virtual camera, and is an inconspicuous region. When such a wide back region is subjected to the fur shading process by the shell method, the number of polygons increases and the processing load increases. Therefore, on such a back side (second portion in a broad sense, the back side), as described in FIG. 6, a plurality of texel values are fetched, and a composite value of the fetched plurality of texel values is set as a pixel value. A fur shading image is generated by the fur shading method set to. In this way, when the shell method is applied to all regions, the processing load becomes too heavy, and the fur shading method of the present embodiment using the pixel shader for the back side (or the inconspicuous region on the front side). By applying, it becomes possible to achieve both realistic hair quality expression and reduction of processing load.

3.処理例
次に本実施形態の処理例について図13のフローチャートを用いて説明する。図13は画像生成システムの全体的な処理の例を表すフローチャートである。
3. Processing Example Next, a processing example of this embodiment will be described with reference to the flowchart of FIG. FIG. 13 is a flowchart showing an example of the overall processing of the image generation system.

まず、モデルオブジェクトなどの複数のオブジェクトをオブジェクト空間に配置設定するオブジェクト空間設定処理を行う(ステップS1)。そして、モデルオブジェクトなどの移動体をオブジェクト空間内で移動させる移動処理や、モデルオブジェクトの動きを表現するモーション処理などを行う(ステップS2、S3)。具体的には、操作部からの操作データ等に基づいてモデルオブジェクトを移動させる移動処理を行ったり、モデルオブジェクトのスケルトンを構成する各骨を、モーションデータに基づいて動かすモーション処理を行う。   First, an object space setting process for arranging and setting a plurality of objects such as model objects in the object space is performed (step S1). Then, movement processing for moving a moving object such as a model object in the object space, motion processing for expressing the movement of the model object, and the like are performed (steps S2 and S3). Specifically, a movement process for moving the model object based on operation data from the operation unit, or a motion process for moving each bone constituting the skeleton of the model object based on the motion data is performed.

次に頂点シェーダプログラムによる頂点シェーダ処理を行う(ステップS4)。この頂点シェーダ処理(頂点処理)では、頂点単位での座標変換処理(ローカル座標系からワールド座標系への変換等)、頂点単位での陰影処理(シェーディング処理)、頂点単位での光源処理(ライティング処理)、テクスチャ座標の演算処理などが行われる。例えばモーション処理後のモデルオブジェクトの頂点位置を求める処理を、この頂点シェーダ処理により実現してもよい。そして、この頂点シェーダ処理により得られた頂点座標、視線ベクトル、光源ベクトル、法線ベクトル等は、出力レジスタに格納され、ピクセルシェーダ処理に渡される。   Next, the vertex shader process by the vertex shader program is performed (step S4). In this vertex shader processing (vertex processing), coordinate conversion processing in units of vertices (such as conversion from the local coordinate system to the world coordinate system), shading processing in units of vertices (shading processing), light source processing in units of vertices (lighting) Processing), texture coordinate calculation processing, and the like are performed. For example, the processing for obtaining the vertex position of the model object after the motion processing may be realized by this vertex shader processing. The vertex coordinates, line-of-sight vector, light source vector, normal vector, etc. obtained by this vertex shader processing are stored in the output register and passed to the pixel shader processing.

次に、ピクセルシェーダプログラムによるピクセルシェーダ処理を開始する(ステップS5)。このピクセルシェーダ処理では、ラスタライズ後にピクセル単位の様々な処理が行われる。具体的には、ピクセル単位での陰影処理(シェーディング処理)、テクスチャマッピング処理、半透明処理などが行われる。これにより、表示部に表示される最終的な画像(ゲーム画像)が生成される。   Next, pixel shader processing by the pixel shader program is started (step S5). In this pixel shader process, various processes in units of pixels are performed after rasterization. Specifically, shading processing (shading processing), texture mapping processing, translucent processing, and the like are performed on a pixel basis. Thereby, a final image (game image) displayed on the display unit is generated.

図6で説明した本実施形態のファーシェーディング処理は図13のステップS5で実行できる。これによりピクセルシェーダを用いたファーシェーディング画像が生成されるようになる。   The fur shading process of the present embodiment described in FIG. 6 can be executed in step S5 of FIG. As a result, a fur shading image using a pixel shader is generated.

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

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

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

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

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

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

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

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

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語(第1の部分、第2の部分等)と共に記載された用語(前面側、背面側等)は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。また、法線ベクトルの方向の取得処理、テクスチャ座標のシフト処理、テクセル値のフェッチ処理、テクセル値の合成処理等も本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。また本発明は種々のゲームに適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレイヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々の画像生成システムに適用できる。   Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, in the specification or the drawings, terms (front side, back side, etc.) that are described at least once together with different terms having a broader meaning or the same meaning (first portion, second portion, etc.) It can be replaced by the different terms at any point. Further, the normal vector direction acquisition processing, texture coordinate shift processing, texel value fetch processing, texel value synthesis processing, and the like are not limited to those described in this embodiment, and techniques equivalent to these are also included in the present invention. Included in the range. The present invention can be applied to various games. Further, the present invention is applied to various image generation systems such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, a system board for generating game images, and a mobile phone. it can.

OB オブジェクト、PIX 描画対象ピクセル、N 法線ベクトル、
NP 投影法線ベクトル、VC 仮想カメラ、DV 視線方向、
100 処理部、102 ゲーム演算部、104 オブジェクト空間設定部、
106 移動処理部、107 モーション処理部、108 仮想カメラ制御部、
120 画像生成部、122 頂点処理部、124 ピクセル処理部、
130 音生成部、160 操作部、170 記憶部、
172 オブジェクトデータ記憶部、173 モーションデータ記憶部、
174 モデルデータ記憶部、175 テクスチャ記憶部、176 描画バッファ、
180 情報記憶媒体、190 表示部、192 音出力部、194 補助記憶装置、
196 通信部
OB object, PIX drawing target pixel, N normal vector,
NP projection normal vector, VC virtual camera, DV gaze direction,
100 processing unit, 102 game calculation unit, 104 object space setting unit,
106 movement processing unit, 107 motion processing unit, 108 virtual camera control unit,
120 image generation units, 122 vertex processing units, 124 pixel processing units,
130 sound generation unit, 160 operation unit, 170 storage unit,
172 Object data storage unit, 173 Motion data storage unit,
174 Model data storage unit, 175 texture storage unit, 176 drawing buffer,
180 information storage medium, 190 display unit, 192 sound output unit, 194 auxiliary storage device,
196 Communication Department

Claims (9)

テクスチャを記憶するテクスチャ記憶部と、
前記テクスチャを用いたピクセルシェーダ処理を行うことで、オブジェクト空間において仮想カメラから見える画像を生成する画像生成部として、
コンピュータを機能させ、
前記テクスチャ記憶部は、ファーシェーディング用テクスチャを記憶し、
前記画像生成部は、
描画対象ピクセルの法線ベクトルにより特定される方向に、テクスチャ空間でのテクスチャ座標を順次シフトしながら、前記ファーシェーディング用テクスチャのテクセル値をフェッチし、フェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定することで、ファーシェーディング画像を生成することを特徴とするプログラム。
A texture storage unit for storing textures;
By performing pixel shader processing using the texture, an image generation unit that generates an image seen from a virtual camera in the object space,
Make the computer work,
The texture storage unit stores a texture for fur shading,
The image generation unit
The texture coordinates in the texture space are sequentially shifted in the direction specified by the normal vector of the drawing target pixel, the texel values of the texture for fur shading are fetched, and the composite value of a plurality of texel values obtained by the fetching A program for generating a fur shading image by setting to the pixel value of the drawing target pixel.
請求項1において、
前記仮想カメラのカメラ座標系において前記仮想カメラの視線方向に沿った座標軸をZ軸とし、前記Z軸に直交する座標軸をX軸、Y軸とした場合に、
前記画像生成部は、
描画対象ピクセルの前記法線ベクトルをXY平面に投影した投影法線ベクトルの方向の逆方向により特定される方向に、前記テクスチャ空間でのテクスチャ座標(U、V)を順次シフトしながら、前記ファーシェーディング用テクスチャのテクセル値をフェッチすることを特徴とするプログラム。
In claim 1,
In the camera coordinate system of the virtual camera, when the coordinate axis along the viewing direction of the virtual camera is the Z axis, and the coordinate axis orthogonal to the Z axis is the X axis and the Y axis,
The image generation unit
While the texture coordinates (U, V) in the texture space are sequentially shifted in the direction specified by the direction opposite to the direction of the projection normal vector obtained by projecting the normal vector of the drawing target pixel onto the XY plane, A program that fetches a texel value of a texture for shading.
請求項2において、
前記画像生成部は、
第1のフェッチ処理においてテクセル値C1=TEX(U1、V1)をフェッチし、第2のフェッチ処理においてテクセル値C2=TEX(U2、V2)をフェッチし・・・・第Nのフェッチ処理においてテクセル値CN=TEX(UN、VN)をフェッチし、フェッチされたテクセル値C1〜CNの合成処理を行うことで得られた合成値を、描画対象ピクセルのピクセル値に設定し、
前記投影法線ベクトルの方向の逆方向は、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)へと向かう方向であり、前記投影法線ベクトルの長さが長くなるほど、テクスチャ座標(U1、V1)からテクスチャ座標(UN、VN)への距離が長くなることを特徴とするプログラム。
In claim 2,
The image generation unit
The texel value C1 = TEX (U1, V1) is fetched in the first fetch process, and the texel value C2 = TEX (U2, V2) is fetched in the second fetch process .... the texel in the Nth fetch process The value CN = TEX (UN, VN) is fetched, and the synthesized value obtained by synthesizing the fetched texel values C1 to CN is set as the pixel value of the drawing target pixel.
The direction opposite to the direction of the projection normal vector is a direction from the texture coordinates (U1, V1) to the texture coordinates (UN, VN). The longer the length of the projection normal vector, the more the texture coordinates (U1 , V1) to the texture coordinates (UN, VN) is long.
請求項3において、
前記画像生成部は、
K1×C1+K2×C2+・・・・+KN×CNの合成処理を行って合成値を取得し、
ウェイト値Ki+1はウェイト値Ki(1≦i<N)よりも小さい値であることを特徴とするプログラム。
In claim 3,
The image generation unit
K1 × C1 + K2 × C2 +... + KN × CN is combined to obtain a combined value,
The program is characterized in that the weight value Ki + 1 is smaller than the weight value Ki (1 ≦ i <N).
請求項1乃至4のいずれかにおいて、
前記画像生成部は、
モデルオブジェクトの第1の部分については、テクスチャがマッピングされた複数の積層されたポリゴンを用いたシェル法により、ファーシェーディング画像を生成し、
前記モデルオブジェクトの第2の部分については、前記ファーシェーディング用テクスチャのフェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定することで、ファーシェーディング画像を生成することを特徴とするプログラム。
In any one of Claims 1 thru | or 4,
The image generation unit
For the first part of the model object, a fur shading image is generated by a shell method using a plurality of stacked polygons to which textures are mapped,
For the second part of the model object, a fur shading image is generated by setting a composite value of a plurality of texel values obtained by fetching the fur shading texture to a pixel value of a drawing target pixel. A featured program.
請求項5において、
前記第1の部分は、前記モデルオブジェクトの前面側に設定された領域であり、前記第2の部分は、前記モデルオブジェクトの背面側に設定された領域であることを特徴とするプログラム。
In claim 5,
The program according to claim 1, wherein the first part is an area set on the front side of the model object, and the second part is an area set on the back side of the model object.
請求項1乃至6のいずれかにおいて、
前記画像生成部は、
合成対象となるテクセル値の個数を可変に設定することを特徴とするプログラム。
In any one of Claims 1 thru | or 6.
The image generation unit
A program characterized by variably setting the number of texel values to be synthesized.
コンピュータ読み取り可能な情報記憶媒体であって、請求項1乃至7のいずれかに記載のプログラムを記憶したことを特徴とする情報記憶媒体。   A computer-readable information storage medium, wherein the program according to any one of claims 1 to 7 is stored. テクスチャを記憶するテクスチャ記憶部と、
前記テクスチャを用いたピクセルシェーディング処理を行うことで、オブジェクト空間において仮想カメラから見える画像を生成する画像生成部とを含み、
前記テクスチャ記憶部は、ファーシェーディング用テクスチャを記憶し、
前記画像生成部は、
描画対象ピクセルの法線ベクトルにより特定される方向に、テクスチャ空間でのテクスチャ座標を順次シフトしながら、前記ファーシェーディング用テクスチャのテクセル値をフェッチし、フェッチにより得られた複数のテクセル値の合成値を描画対象ピクセルのピクセル値に設定することで、ファーシェーディング画像を生成することを特徴とする画像生成システム。
A texture storage unit for storing textures;
An image generation unit that generates an image seen from a virtual camera in the object space by performing pixel shading processing using the texture;
The texture storage unit stores a texture for fur shading,
The image generation unit
The texture coordinates in the texture space are sequentially shifted in the direction specified by the normal vector of the drawing target pixel, the texel values of the texture for fur shading are fetched, and the composite value of a plurality of texel values obtained by the fetching A fur-shaded image is generated by setting to the pixel value of the drawing target pixel.
JP2009248308A 2009-10-28 2009-10-28 Program, information storage medium and image generation system Pending JP2011095937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009248308A JP2011095937A (en) 2009-10-28 2009-10-28 Program, information storage medium and image generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009248308A JP2011095937A (en) 2009-10-28 2009-10-28 Program, information storage medium and image generation system

Publications (1)

Publication Number Publication Date
JP2011095937A true JP2011095937A (en) 2011-05-12

Family

ID=44112785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009248308A Pending JP2011095937A (en) 2009-10-28 2009-10-28 Program, information storage medium and image generation system

Country Status (1)

Country Link
JP (1) JP2011095937A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768488A (en) * 2020-07-07 2020-10-13 网易(杭州)网络有限公司 Processing method and device for virtual character face model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768488A (en) * 2020-07-07 2020-10-13 网易(杭州)网络有限公司 Processing method and device for virtual character face model
CN111768488B (en) * 2020-07-07 2023-12-29 网易(杭州)网络有限公司 Virtual character face model processing method and device

Similar Documents

Publication Publication Date Title
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP4305903B2 (en) Image generation system, program, and information storage medium
JP2011053737A (en) Program, information storage medium and image generation device
JP4824514B2 (en) Program, information storage medium, and image generation system
JP4749198B2 (en) Program, information storage medium, and image generation system
JP4868586B2 (en) Image generation system, program, and information storage medium
JP2008077410A (en) Program, information storage medium, and image generation system
JP2004298375A (en) Image generating system, program, and information storage medium
JP2006323512A (en) Image generation system, program, and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP4743770B2 (en) Image generation system, program, and information storage medium
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4913399B2 (en) Program, information storage medium, and image generation system
JP2011095937A (en) Program, information storage medium and image generation system
JP2010134798A (en) Program, information storage medium, game device, and game system
JP4865471B2 (en) Program, information storage medium, and image generation system
JP2006252423A (en) Program, information storage medium and image generation system
JP2008077406A (en) Image generation system, program, and information storage medium
JP2009140371A (en) Program, information storage medium, and image generation system
JP2010033253A (en) Program, information storage medium, and image generation system
JP2010033295A (en) Image generation system, program and information storage medium
JP2007164736A (en) Image generation system, program and information storage medium
JP2007272355A (en) Program, information storage medium and image generation system
JP4641831B2 (en) Program, information storage medium, and image generation system
JP2010277407A (en) Program, information storage medium, and image generation system