JP2007087031A - Program, information storage medium and image creation system - Google Patents

Program, information storage medium and image creation system Download PDF

Info

Publication number
JP2007087031A
JP2007087031A JP2005274092A JP2005274092A JP2007087031A JP 2007087031 A JP2007087031 A JP 2007087031A JP 2005274092 A JP2005274092 A JP 2005274092A JP 2005274092 A JP2005274092 A JP 2005274092A JP 2007087031 A JP2007087031 A JP 2007087031A
Authority
JP
Japan
Prior art keywords
texture
joint
normal
coordinate
vertex
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.)
Granted
Application number
JP2005274092A
Other languages
Japanese (ja)
Other versions
JP4662260B2 (en
Inventor
Katsuyuki Shijiyo
勝行 氏縄
Masahiro Yoshida
政弘 吉田
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 JP2005274092A priority Critical patent/JP4662260B2/en
Publication of JP2007087031A publication Critical patent/JP2007087031A/en
Application granted granted Critical
Publication of JP4662260B2 publication Critical patent/JP4662260B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program, an information storage medium and an image creation system, in which an image expressing wrinkles corresponding to a motion of an object can be created. <P>SOLUTION: A normal texture having a normal vector set to texels is prepared, a texture coordinate corresponding to each apex is determined based on a joint angle parameter of the object changing the angle of a joint by motion control and a joint effect parameter changed according to the distance between each apex constituting the object and the joint, and normal mapping of mapping the normal texture on the object is performed based on the determined texture coordinate. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

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

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

このような画像生成システムでは、プレーヤの仮想現実感を高めるために、例えば服のしわなどのように複雑な凹凸についてもリアルに表現できることが望ましい。しかしながら従来の技術では、様々なモーション(動作)を行うオブジェクトの関節の動きなどに追従するべき服のしわをリアルタイムに表現することが困難であった。
特開平9−265548号公報
In such an image generation system, in order to increase the player's virtual reality, it is desirable that a complex unevenness such as a wrinkle of clothes can be expressed realistically. However, with the conventional technology, it is difficult to express in real time wrinkles of clothes that should follow the movements of the joints of objects that perform various motions (motions).
JP-A-9-265548

本発明は、上記事情に鑑みてなされたものであり、その目的は、オブジェクトのモーションに合わせたしわが表現された画像を生成することができるプログラム、情報記憶媒体及び画像生成システムを提供することにある。   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 capable of generating an image in which wrinkles according to the motion of an object are expressed. It is in.

(1)本発明は、画像を生成するための画像生成システムであって、テクセルに法線ベクトルが設定された法線テクスチャを記憶するテクスチャ記憶部と、モーション制御によって関節の角度が変更されるオブジェクトの関節角度パラメータと、該オブジェクトを構成する各頂点と関節との距離に応じて変化する関節影響度パラメータとに基づいて、該各頂点に対応するテクスチャ座標を求めるテクスチャ座標演算部と、求められたテクスチャ座標に基づいて、前記法線テクスチャを前記オブジェクトにマッピングする法線マッピングを行う法線マッピング部として、を含む画像生成システムに関係する。また本発明は、上記各部としてコンピュータを機能させることを特徴とするプログラム、あるいはそのプログラムを記憶する情報記憶媒体に関係する。   (1) The present invention is an image generation system for generating an image, and a texture storage unit that stores a normal texture in which a normal vector is set in a texel, and a joint angle is changed by motion control. A texture coordinate calculation unit that obtains a texture coordinate corresponding to each vertex based on a joint angle parameter of the object and a joint influence parameter that changes according to the distance between each vertex constituting the object and the joint; And a normal mapping unit that performs normal mapping for mapping the normal texture to the object based on the texture coordinates. The present invention also relates to a program characterized by causing a computer to function as each of the above sections, or an information storage medium storing the program.

関節角度パラメータは、関節の角度そのものであってもよいし、関節の角度に応じて変化する関数で表されるパラメータあってもよい。関節影響度パラメータは、関節と頂点との距離そのものであってもよいし、関節と頂点との距離に応じて変化する関数で表されるパラメータであってもよい。   The joint angle parameter may be the joint angle itself, or may be a parameter represented by a function that changes according to the joint angle. The joint influence degree parameter may be the distance between the joint and the vertex itself, or may be a parameter represented by a function that changes according to the distance between the joint and the vertex.

本発明では、オブジェクトのモーション変化に応じて変化する関節の角度や関節までの距離に応じてオブジェクトの頂点に対応づけられるテクセルの座標を求める。このテクセルには、オブジェクトのライティングに必要な法線ベクトルが設定されており、この法線ベクトルに応じたシェーディングによりオブジェクトの表面の凹凸が表現される。従って、本発明によれば、オブジェクトのモーション変化にリアルタイムに追従するしわを表現することができる。   In the present invention, the coordinates of the texel associated with the vertex of the object are obtained according to the joint angle and the distance to the joint which change according to the motion change of the object. In this texel, a normal vector necessary for lighting of the object is set, and unevenness on the surface of the object is expressed by shading according to the normal vector. Therefore, according to the present invention, it is possible to express wrinkles that follow a change in motion of an object in real time.

(2)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記オブジェクトは、複数のボーンが前記関節で連結されたモデルを用いてモーション制御され、前記テクスチャ座標演算部が、前記各ボーン間のなす角度に応じて変化するパラメータを前記関節角度パラメータとし、かつ前記各頂点に対して設定された前記各ボーンのウェイト値の乗算結果を含むパラメータを前記関節影響度パラメータとして、前記法線テクスチャのテクスチャ座標を求めるようにしてもよい。このようにすれば、関節周りのオブジェクトの曲がり具合やねじれ具合と関節への近さとに応じた適切な法線ベクトルをオブジェクトの構成頂点に対応づけることができるようになる。   (2) In the image generation system, the program, and the information storage medium of the present invention, the object is motion-controlled using a model in which a plurality of bones are connected by the joints, and the texture coordinate calculation unit is connected between the bones. The normal texture is a parameter that changes according to the angle formed by the joint angle parameter, and a parameter that includes a result of multiplying the weight value of each bone set for each vertex is the joint effect parameter. The texture coordinates may be obtained. In this way, it is possible to associate an appropriate normal vector according to the degree of bending or twisting of the object around the joint and the proximity to the joint with the constituent vertex of the object.

なお、ここでいうモデルとは、オブジェクトをモーションさせるための演算に用いられるシミュレーションモデルを意味し、ジョイント(関節)で連結された少なくとも2つ以上のボーン(骨)で構成されるモデルを一般的にはスケルトンシステムと呼ぶ。スケルトンシステムでは、関節で連結されたボーンを内包するようにオブジェクトの表面(スキン)を構成する頂点群が存在する。   In addition, the model here means a simulation model used for calculation for moving an object, and a model composed of at least two bones (bones) connected by joints (joints) is generally used. Called the skeleton system. In the skeleton system, there are vertices that constitute the surface (skin) of an object so as to contain bones connected by joints.

(3)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャのテクスチャ座標は、第1の座標成分と第2の座標成分とを含み、前記テクスチャ座標演算部が、前記関節の曲がり具合に応じて変化する前記関節角度パラメータと前記関節影響度パラメータとに基づいて、前記テクスチャ座標の第1の座標成分を求めるようにしてもよい。   (3) In the image generation system, the program, and the information storage medium of the present invention, the texture coordinate of the normal texture includes a first coordinate component and a second coordinate component, and the texture coordinate calculation unit includes the joint The first coordinate component of the texture coordinates may be obtained based on the joint angle parameter and the joint influence parameter that change according to the degree of bending.

(4)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャは、テクスチャ空間の一端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が高く、該テクスチャ空間の他端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が低いテクセル値パターンを有し、前記テクスチャ座標演算部が、前記関節の曲がり具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第1の座標成分を求めるようにしてもよい。このようにすれば、関節周りのオブジェクトの曲がり具合が大きいほどしわが多くなっている様子や、関節に近い部分ほどしわが多くなっている様子をリアルに表現することができる。   (4) In the image generation system, the program, and the information storage medium of the present invention, the normal texture has a high frequency in which the normal vector set in the texel on one end side of the texture space is directed in the same direction. The normal vector set in the texel on the other end side has a texel value pattern that is less frequently oriented in the same direction, and the texture coordinate calculation unit has a greater degree of bending of the joint or a vertex closer to the joint. The first coordinate component of the texture coordinate of the normal texture may be obtained so that the texel on the other end side of the texture space is associated. In this way, it is possible to realistically represent a state in which wrinkles increase as the degree of bending of the object around the joint increases, and a state in which wrinkles increase as the portion is closer to the joint.

(5)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャは、テクスチャ空間の一端側において隣接するテクセル同士の色差が小さく、該テクスチャ空間の他端側において隣接するテクセル同士の色差が大きいテクセル値パターンを有し、前記テクスチャ座標演算部が、前記関節の曲がり具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第1の座標成分を求めるようにしてもよい。このようにすれば、関節周りのオブジェクトの曲がり具合が大きいほどしわが深くなっている様子や、関節に近い部分ほどしわが深くなっている様子をリアルに表現することができる。   (5) In the image generation system, program and information storage medium of the present invention, the normal texture has a small color difference between adjacent texels on one end side of the texture space, and adjacent texels on the other end side of the texture space. The texture coordinate calculation unit associates the texel on the other end side of the texture space with a greater degree of bending of the joint or a vertex closer to the joint. The first coordinate component of the texture coordinate of the normal texture may be obtained. In this way, it is possible to realistically represent a state in which the wrinkle is deeper as the degree of bending of the object around the joint is larger, and a state in which the wrinkle is deeper as the portion is closer to the joint.

(6)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャのテクスチャ座標は、第1の座標成分と第2の座標成分とを含み、前記テクスチャ座標演算部が、前記関節のねじれ具合に応じて変化する前記関節角度パラメータと前記関節影響度パラメータとに基づいて、前記テクスチャ座標の第2の座標成分を求めるようにしてもよい。   (6) In the image generation system, the program, and the information storage medium of the present invention, the texture coordinates of the normal texture include a first coordinate component and a second coordinate component, and the texture coordinate calculation unit includes the joint The second coordinate component of the texture coordinate may be obtained based on the joint angle parameter and the joint influence parameter that change according to the degree of twist.

(7)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャは、テクスチャ空間の一端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が高く、該テクスチャ空間の他端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が低いテクセル値パターンを有し、前記テクスチャ座標演算部が、前記関節のねじれ具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第2の座標成分を求めるようにしてもよい。このようにすれば、関節周りのオブジェクトのねじれ具合が大きいほどしわが多くなっている様子や、関節に近い部分ほどしわが多くなっている様子をリアルに表現することができる。   (7) In the image generation system, the program, and the information storage medium of the present invention, the normal texture has a high frequency in which the normal vector set in the texel is oriented in the same direction on one end side of the texture space. The normal vector set in the texel on the other end side has a texel value pattern that is less likely to face in the same direction, and the texture coordinate calculation unit has a greater degree of twist of the joint or a vertex closer to the joint. The second coordinate component of the texture coordinate of the normal texture may be obtained so that the texel on the other end side of the texture space is associated. In this way, it is possible to realistically represent a state in which wrinkles increase as the degree of twist of the object around the joint increases, and a state in which wrinkles increase as the portion is closer to the joint.

(8)本発明の画像生成システム、プログラムおよび情報記憶媒体では、前記法線テクスチャは、テクスチャ空間の一端側において隣接するテクセル同士の色差が小さく、該テクスチャ空間の他端側において隣接するテクセル同士の色差が大きいテクセル値パターンを有し、前記テクスチャ座標演算部が、前記関節のねじれ具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第2の座標成分を求めるようにしてもよい。このようにすれば、関節周りのオブジェクトのねじれ具合が大きいほどしわが深くなっている様子や、関節に近い部分ほどしわが深くなっている様子をリアルに表現することができる。   (8) In the image generation system, program, and information storage medium of the present invention, the normal texture has a small color difference between adjacent texels on one end side of the texture space, and adjacent texels on the other end side of the texture space. The texture coordinate calculation unit associates the texel on the other end side of the texture space with a greater degree of twist of the joint or a vertex closer to the joint. The second coordinate component of the texture coordinate of the normal texture may be obtained. In this way, it is possible to realistically represent a state in which the wrinkle is deeper as the twisted state of the object around the joint is larger, and a state in which the wrinkle is deeper as the portion is closer to the joint.

以下、本実施形態について説明する。なお、以下に説明する本実施形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   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は、プレーヤがオブジェクト(例えば、プレーヤキャラクタ)の操作データを入力するためのものである。操作部160は、例えば、レバー、ボタン、ステアリング、タッチパネル型ディスプレイなどにより実現できる。またプレーヤの入力インターフェースとして、例えば、マイク(マイクロフォン)など音検出部が設けられていてもよい。記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM(VRAM)などにより実現できる。   The operation unit 160 is for a player to input operation data of an object (for example, a player character). The operation unit 160 can be realized by, for example, a lever, a button, a steering, a touch panel display, or the like. Further, as an input interface of the player, for example, a sound detection unit such as a microphone (microphone) may be provided. The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by a RAM (VRAM) or the like.

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

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

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

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

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

処理部100は、メイン処理部110、描画部120、および音生成部130を含む。なおこれらの一部を省略する構成としてもよい。   The processing unit 100 includes a main processing unit 110, a drawing unit 120, and a sound generation unit 130. Note that some of these may be omitted.

メイン処理部110は、オブジェクト空間設定部112、移動・動作処理部114、仮想カメラ制御部116を含む。   The main processing unit 110 includes an object space setting unit 112, a movement / motion processing unit 114, and a virtual camera control unit 116.

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

移動・動作処理部114は、オブジェクト(キャラクタ、車、又は飛行機等)の移動・動作演算(移動・動作シミュレーション)を行う。即ち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクトをオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させる処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(パーツオブジェクトの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。なお移動・動作演算を行う場合には、関節でボーンを連結したモデルを用いることができる。このようなシミュレーションモデルはスケルトンシステムと呼ばれるものであって、関節周りののボーンの角度変化やボーンの位置変化などをシミュレートして、シミュレーション結果に応じてオブジェクトを移動させたり、動作させたりするモーション制御を行うことができる。   The movement / motion processing unit 114 performs a movement / motion calculation (movement / motion simulation) of an object (such as a character, a car, or an airplane). That is, based on operation data input by the player through the operation unit 160, a program (movement / motion algorithm), various data (motion data), etc., the object is moved in the object space, or the object is moved (motion, animation). ) Is performed. Specifically, a simulation process for sequentially obtaining object movement information (position, rotation angle, speed, or acceleration) and motion information (part object position or rotation angle) every frame (1/60 second). Do. A frame is a unit of time for performing object movement / motion processing (simulation processing) and image generation processing. When performing movement / motion calculation, a model in which bones are connected by joints can be used. Such a simulation model is called a skeleton system, which simulates changes in the angle of the bone around the joint or changes in the position of the bone, and moves or moves the object according to the simulation result. Motion control can be performed.

仮想カメラ制御部116は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置や視線方向を制御する処理)を行う。   The virtual camera control unit 116 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, a process for controlling the position (X, Y, Z) or the rotation angle (rotation angle about the X, Y, Z axes) of the virtual camera (process for controlling the viewpoint position and the line-of-sight direction) is performed.

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

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

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

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

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

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

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

αブレンディング(α合成)は、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。例えば通常αブレンディングの場合には下式(1)〜(3)の処理が行われる。   α blending (α synthesis) is a translucent synthesis 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 formulas (1) to (3) are performed.

=(1−α)×R+α×R (1)
=(1−α)×G+α×G (2)
=(1−α)×B+α×B (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 processes (4) to (6) are performed.

=R+α×R (4)
=G+α×G (5)
=B+α×B (6)
また、減算αブレンディングの場合には下式(7)〜(9)の処理が行われる。
R Q = R 1 + α × R 2 (4)
G Q = G 1 + α × G 2 (5)
B Q = B 1 + α × B 2 (6)
Further, in the case of subtraction α blending, the following formulas (7) to (9) are performed.

=R−α×R (7)
=G−α×G (8)
=B−α×B (9)
ここで、R、G、Bは、描画バッファ174に既に描画されている画像(元画像)のRGB成分であり、R、G、Bは、描画バッファ174に描画すべき画像のRGB成分である。また、R、G、Bは、αブレンディングにより得られる画像の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 drawing buffer 174, and R 2 , G 2 , B 2 should be drawn in the drawing buffer 174. This is the RGB component of the image. R Q , G Q , and B Q are RGB components of an image obtained by α blending. The α value is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as mask information, translucency (equivalent to transparency and opacity), bump information, and the like.

さらに描画部120は、テクスチャ座標演算部122、法線マッピング部124を含む。なお、メイン処理部110側でテクスチャ座標演算を行って、その結果を用いて描画部120側で法線マッピングをするようにしてもよい。   Furthermore, the drawing unit 120 includes a texture coordinate calculation unit 122 and a normal mapping unit 124. Alternatively, texture coordinate calculation may be performed on the main processing unit 110 side, and normal mapping may be performed on the drawing unit 120 side using the result.

テクスチャ座標演算部122は、モーション制御によって関節の角度が変更されるオブジェクトの関節角度パラメータと、オブジェクトを構成する各頂点と関節との距離に応じて変化する関節影響度パラメータとに基づいて、各頂点に対応するテクスチャ座標を求める処理を行う。   The texture coordinate calculation unit 122 is based on the joint angle parameter of the object whose joint angle is changed by motion control and the joint influence parameter that changes according to the distance between each vertex constituting the object and the joint. Processing for obtaining texture coordinates corresponding to the vertex is performed.

テクスチャ座標を求める処理としては、例えば、オブジェクトのシミュレーションモデルを構成する複数のボーンを連結する関節(連結点)におけるオブジェクトの曲がり具合やねじれ具合に応じてテクスチャ座標の所与の座標成分が変化するようにテクセルと頂点を対応づけるための計算を行う。この場合、オブジェクトの関節の曲がり具合に応じて変化するパラメータ(関節角度パラメータの一例)等に基づいて第1の座標成分(例えば、UV座標系のU座標成分)を求めて、オブジェクトの関節のねじれ具合に応じて変化するパラメータ(関節角度パラメータの他の一例)等に基づいて第2の座標成分(例えば、UV座標系のV座標成分)を求めることができる。また各頂点の関節からの近さを影響度として考慮することによって、関節に近い頂点ほど凹凸が激しく変化するような法線ベクトル情報を付与することができる。言い換えれば、関節に近い頂点ほどしわが多く、しわの凹凸が深くなるような法線情報を与えることができるということである。関節からの近さに応じて定まる影響度としては、頂点毎に付与されるボーンのウェイト値の乗算結果を含むパラメータ(関節影響度パラメータの一例)を用いることができる。このようにすれば、オブジェクトのモーション状態に応じたしわの出来具合をダイナミックに制御することができる。またテクスチャ座標の第1の座標成分あるいは第2の座標成分の一方は、予め頂点毎に決めておくことができる。例えば、モデル座標系での頂点位置に応じた重み付けをしておくことによって、いずれか一方の座標成分を求めることで、一義的に各頂点に対応づけられるテクスチャ座標が求められるようにしておいてもよい。例えば、関節の内側にある頂点と関節の外側にある頂点とにおいて重み付けが異なるようにしておいてもよい。   As processing for obtaining texture coordinates, for example, a given coordinate component of texture coordinates changes depending on how the object bends or twists at a joint (connecting point) that connects a plurality of bones constituting the simulation model of the object. The calculation for associating the texel with the vertex is performed. In this case, a first coordinate component (for example, a U coordinate component of the UV coordinate system) is obtained based on a parameter (an example of a joint angle parameter) that changes according to the degree of bending of the joint of the object, and the like. The second coordinate component (for example, the V coordinate component of the UV coordinate system) can be obtained based on a parameter (another example of the joint angle parameter) that changes according to the degree of twist. Also, by considering the proximity of each vertex from the joint as the degree of influence, it is possible to provide normal vector information such that the concavo-convex changes dramatically as the vertex is closer to the joint. In other words, normal information can be given so that the vertex closer to the joint has more wrinkles and deeper wrinkles. As the influence degree determined according to the proximity from the joint, a parameter (an example of a joint influence degree parameter) including a multiplication result of bone weight values given to each vertex can be used. In this way, it is possible to dynamically control the degree of wrinkle according to the motion state of the object. In addition, one of the first coordinate component and the second coordinate component of the texture coordinate can be determined in advance for each vertex. For example, by assigning a weight according to the vertex position in the model coordinate system, by obtaining one of the coordinate components, texture coordinates that are uniquely associated with each vertex are obtained. Also good. For example, the vertices inside the joint and the vertices outside the joint may be weighted differently.

このとき記憶部170のテクスチャ記憶部176に格納しておく法線テクスチャの作り方にも工夫が必要となる。例えば、第1の座標成分(あるいは第2の座標成分)の一端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が高く、同座標成分の他端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が低くなるようにテクスチャ空間の各テクセルに法線ベクトルを設定しておくことができる。またある基準面(平坦な面)の方向を基準方向とした場合に、テクスチャ空間の一端側(例えば、座標成分の最小値側)では基準方向を向く法線ベクトルの設定頻度が高く、他端側(例えば、座標成分の最大値側)では基準方向を向く法線ベクトルの設定頻度が低くなるようにすることができる。例えば、U座標成分が大きくなるにつれて法線ベクトルが頻繁に変化するようなテクセル値パターンの法線テクスチャを用意しておくことができる。なおV座標成分が大きくなるにつれて法線ベクトルが頻繁に変化するようなテクセル値パターンの法線テクスチャを用意しておいてもよい。このようにすれば基準方向に向く法線ベクトルの頻度が高い領域では、オブジェクトの表面にしわが少ない様子を表現することができ、基準方向に向く法線ベクトルの頻度が低い領域では、オブジェクトの表面にしわが多い様子を表現することができる。   At this time, it is necessary to devise how to create a normal texture stored in the texture storage unit 176 of the storage unit 170. For example, the normal vector set in the texel on one end side of the first coordinate component (or the second coordinate component) is frequently directed in the same direction, and the method set in the texel on the other end side of the coordinate component. A normal vector can be set for each texel in the texture space so that the frequency with which the line vector points in the same direction is low. In addition, when the direction of a certain reference surface (flat surface) is set as the reference direction, the normal vector that faces the reference direction is frequently set on one end side of the texture space (for example, the minimum value side of the coordinate component), and the other end. On the side (for example, the maximum value side of the coordinate component), the setting frequency of the normal vector that faces the reference direction can be lowered. For example, it is possible to prepare a normal texture of a texel value pattern in which the normal vector frequently changes as the U coordinate component increases. Note that a normal texture of a texel value pattern in which the normal vector frequently changes as the V coordinate component increases may be prepared. In this way, it is possible to express the surface of the object with less wrinkles in the region where the normal vector facing the reference direction is high, and in the region where the frequency of the normal vector facing the reference direction is low, the surface of the object Can express wrinkles.

また例えば、法線テクスチャをテクスチャ空間の一端側(例えば、座標成分の最小値側)において隣接するテクセル同士の色差が小さく、他端側(例えば、座標成分の最大値側)において隣接するテクセル同士の色差が大きくなるように作りこんでおくことができる。このようにすれば、隣接テクセル間の色差が小さい領域では、オブジェクトの表面に浅いしわがある様子を表現することができ、また隣接テクセル間の色差が大きい領域では、オブジェクトの表面に深いしわがある様子を表現することができる。   Also, for example, the normal texture has a small color difference between adjacent texels on one end side of the texture space (for example, the minimum value side of the coordinate component), and adjacent texels on the other end side (for example, the maximum value side of the coordinate component) It can be built in such a way that the color difference between is large. In this way, it is possible to express the appearance of shallow wrinkles on the surface of the object in a region where the color difference between adjacent texels is small, and deep wrinkles on the surface of the object in a region where the color difference between adjacent texels is large. A certain state can be expressed.

法線マッピング部124は、テクスチャ座標演算部122で求められたテクスチャ座標に基づいて、法線テクスチャをオブジェクトにマッピングする法線マッピングを行う。法線マッピングとは、頂点とテクセルとの対応関係から、描画ピクセルに与えられた法線ベクトルの向きを計算して、各描画ピクセルに対する法線ベクトルを設定するテクスチャマッピングの一種である。本実施の形態では、法線マッピング124で各頂点と対応づけた法線ベクトル情報に基づいてオブジェクトのシェーディング(陰影付け)を行うことによって、服等のしわの凹凸感をリアルに表現することができる。   The normal mapping unit 124 performs normal mapping that maps a normal texture to an object based on the texture coordinates obtained by the texture coordinate calculation unit 122. Normal mapping is a type of texture mapping that sets the normal vector for each drawing pixel by calculating the direction of the normal vector given to the drawing pixel from the correspondence between vertices and texels. In this embodiment, by performing shading (shading) of an object based on the normal vector information associated with each vertex in the normal mapping 124, it is possible to realistically express the wrinkle unevenness of clothes and the like. it can.

音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192に出力する。   The sound generation unit 130 performs sound processing based on the results of various processes performed by the processing unit 100, generates game sounds such as BGM, sound effects, or sounds, and outputs the game sounds to the sound output unit 192.

なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて分散処理により生成してもよい。   Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or may be a system having a multiplayer mode in which a plurality of players can play. Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated by distributed processing using a plurality of terminals (game machine, mobile phone).

2.本実施形態の手法
本実施の形態では、複数のボーンを関節で連結したモデルのボーン間の角度に応じて変化するパラメータと、関節からの近さに応じて変化するパラメータとに基づいて、各頂点に対応づける法線テクスチャ用のテクスチャ座標を求める手法を採用している。すなわち以下に示す手法では、法線マッピングのUV座標成分をオブジェクトのモーション状態に応じて動的に調整することができる。
2. Method of this embodiment In this embodiment, based on a parameter that changes according to the angle between bones of a model in which a plurality of bones are connected by joints, and a parameter that changes according to the proximity from the joint, A technique for obtaining texture coordinates for a normal texture associated with a vertex is adopted. That is, in the method described below, the UV coordinate component of normal mapping can be dynamically adjusted according to the motion state of the object.

まずしわ表現用の法線テクスチャ(ノーマルマップテクスチャ)について説明する。以下では、テクスチャのR、G、Bの各色成分の値(輝度値)を法線ベクトルのX軸成分、Y軸成分、Z軸成分として利用する場合を例にとり説明する。なお本発明は、以下に説明する例に限定されるものではない。   First, the normal texture (normal map texture) for wrinkle expression will be described. In the following, a case will be described as an example where the values (luminance values) of the R, G, and B color components of the texture are used as the X-axis component, Y-axis component, and Z-axis component of the normal vector. Note that the present invention is not limited to the examples described below.

法線マッピング用のテクスチャ(法線テクスチャ)として、図2に示すような片側(一端側)はほとんど色差がなく、逆側(他端側)にいくほど色が激しく変化する画像を用意する。法線マッピング(ノーマルマッピング)を行うと、色の変化量が多いほど凹凸が深くなり、変化する距離が近いほど凹凸が細かくなるので、図2ではU軸が0(U座標成分の最小値)から1.0(U座標成分の最大値)に近づくにつれ深くて細かい「しわ」を表現することができる。すなわち図2に示すテクスチャでは、U座標成分が大きくなるほどしわの密度が濃く、しわが深い様子が表現できるといえる。   As a texture for normal mapping (normal texture), an image is prepared in which one side (one end side) has almost no color difference as shown in FIG. 2 and the color changes drastically toward the other side (the other end side). When normal mapping (normal mapping) is performed, the unevenness becomes deeper as the amount of color change increases, and the unevenness becomes finer as the changing distance becomes shorter, so in FIG. 2, the U axis is 0 (the minimum value of the U coordinate component). As the value approaches 1.0 (the maximum value of the U coordinate component), a deeper and finer “wrinkle” can be expressed. That is, in the texture shown in FIG. 2, it can be said that the larger the U coordinate component, the deeper the wrinkle density and the deeper the wrinkle can be expressed.

次に、法線マッピングの対象オブジェクトを簡単に説明し、各頂点に対する法線テクスチャのテクスチャ座標の求め方を説明する。   Next, the normal mapping target object will be briefly described, and how to obtain the texture coordinates of the normal texture for each vertex will be described.

まず法線マッピングの対象オブジェクトを図3に示すように仮定することにする。このオブジェクトは、関節Kで連結された2本のボーンB1、B2と、それを内包するモデル表面上の頂点V1〜V6を含む。なおオブジェクトを構成する頂点として、図3に示された以外の多数の頂点が存在しているが、説明の便宜上省略している。各頂点V1〜V6には、ボーンB1、B2の影響度を示すウェイト値が設定されている。W11、W12、W13、W14、W15、W16は、各頂点V1〜V6に対するボーンB1の影響度を示すウェイト値であり、W21、W22、W23、W24、W25、W26は、各頂点V1〜V6に対するボーンB2の影響度を示すウェイト値である。   First, the target object of normal mapping is assumed as shown in FIG. This object includes two bones B1 and B2 connected by a joint K, and vertices V1 to V6 on the model surface including the bones. Although there are many vertices other than those shown in FIG. 3 as vertices constituting the object, they are omitted for convenience of explanation. A weight value indicating the degree of influence of the bones B1 and B2 is set for each vertex V1 to V6. W11, W12, W13, W14, W15, and W16 are weight values indicating the degree of influence of the bone B1 on the vertices V1 to V6, and W21, W22, W23, W24, W25, and W26 are for the vertices V1 to V6. This is a weight value indicating the degree of influence of bone B2.

このようなオブジェクトにおいてボーンB1、B2のなす角θの余弦は、ボーンB1、B2に平行なベクトルの内積によって求められ、
cosθ=(VB1・VB2)/(|VB1|・|VB2|) (1A)
で求められる(ただしθの取りうる範囲は0〜π)。すなわち角θが0に近いほど深く曲がっているといえる。図2に示す法線テクスチャにおいて、角θに対するU座標成分のパラメータU(θ)(関節角度パラメータ)は、以下のように求めることができる。
In such an object, the cosine of the angle θ formed by the bones B1 and B2 is obtained by the inner product of vectors parallel to the bones B1 and B2.
cos θ = (VB1 · VB2) / (| VB1 | · | VB2 |) (1A)
(However, the possible range of θ is 0 to π). In other words, the closer the angle θ is to 0, the deeper the curve. In the normal texture shown in FIG. 2, the parameter U (θ) (joint angle parameter) of the U coordinate component with respect to the angle θ can be obtained as follows.

U(θ)=(π−θ)/π (2A)
(2A)式より角θが0に近いほど、関節Kを屈曲点とするオブジェクトの曲がり具合が大きく、深いしわができやすくなるといえる。また(2A)式と等価なパラメータU(θ)を、以下のように求めることもできる。
U (θ) = (π−θ) / π (2A)
From the equation (2A), it can be said that the closer the angle θ is to 0, the greater the degree of bending of the object having the joint K as the bending point, and the easier the formation of deep wrinkles. Further, the parameter U (θ) equivalent to the expression (2A) can be obtained as follows.

U(θ)=(1+cosθ)/2=cos2(θ/2) (2A´)
なお図4に示すように角θを設定した場合にも、上記(1A)式で角θの余弦を求めることができる。しかしながら、このように角θを設定する場合には、以下のようにパラメータU(θ)を求めることができる。
U (θ) = (1 + cos θ) / 2 = cos 2 (θ / 2) (2A ′)
Even when the angle θ is set as shown in FIG. 4, the cosine of the angle θ can be obtained by the above equation (1A). However, when the angle θ is set in this way, the parameter U (θ) can be obtained as follows.

U(θ)=θ/π (2B)
あるいは、U(θ)=sin(θ/2) (2B´)
次に、頂点V1〜V6の位置に応じたしわのできやすさの影響度を考える。本実施形態では、ボーンに対する追従度がウェイト値として各頂点に設定され、関節で連結されたボーンの動きに対する影響度をウェイト値に基づいて求めている。なおこのような影響度の求め方は、本発明の実施形態の一例に過ぎず、関節からの距離に応じて変化するパラメータを適宜設定することにより同様の影響度を求めることができる。
U (θ) = θ / π (2B)
Alternatively, U (θ) = sin (θ / 2) (2B ′)
Next, the degree of influence of the ease of wrinkling according to the positions of the vertices V1 to V6 will be considered. In the present embodiment, the degree of follow-up to the bone is set at each vertex as a weight value, and the degree of influence on the motion of the bone connected by the joint is obtained based on the weight value. Note that this method of determining the degree of influence is merely an example of an embodiment of the present invention, and a similar degree of influence can be obtained by appropriately setting a parameter that changes according to the distance from the joint.

まずしわを表現する場合、関節Kに近い位置にある頂点ほどしわが多く、かつ深くなりやすい。このため図2に示す法線テクスチャをしわのでき具合に応じて適切に貼り付けるためには、関節K(連結点)から近い頂点ほどU座標成分が1・0に近づく必要がある。言い換えれば、関節Kから遠い頂点ほどU座標成分が0に近づく必要がある。   First, when expressing wrinkles, the vertices closer to the joint K tend to have more wrinkles and become deeper. For this reason, in order to appropriately paste the normal texture shown in FIG. 2 according to the degree of wrinkles, the U-coordinate component needs to be closer to 1.0 as the vertex is closer to the joint K (connection point). In other words, it is necessary that the U coordinate component approaches 0 as the vertex is farther from the joint K.

そして各頂点に設定されるボーンB1、B2のウェイト値の取りうる範囲を0〜100とした場合、2本のボーンB1、B2のウェイト値を掛け合わせた時の最大値は2500(50×50)となる。そこで、ある頂点Vに対するボーンB1、B2のウェイト値をW1、W2とした場合、関節Kからの距離による影響度L(関節影響度パラメータ)は、以下のように求めることができる。   When the range of possible weight values of the bones B1 and B2 set at each vertex is 0 to 100, the maximum value when the weight values of the two bones B1 and B2 are multiplied is 2500 (50 × 50). ) Therefore, when the weight values of the bones B1 and B2 with respect to a certain vertex V are W1 and W2, the influence degree L (joint influence degree parameter) due to the distance from the joint K can be obtained as follows.

L=(W1×W2)/2500 (3A)
3A式より例えば、ある頂点に対して設定されたボーンB1、B2のウェイト値が50/50という配分であるとしわの多い領域のテクスチャ座標が指定されやすくなり、例えば、ウェイト値が90/10という配分だと50/50の場合に比べてしわの少ない領域のテクスチャ座標が指定されやすくなる
またオブジェクトを構成する頂点が関節の内側にあるか、関節の外側にあるかによってしわの成否を決めておくことが好ましい。具体的には、関節の内側に近いほどしわが深くできやすく、関節の外側に近いほどしわがなくなっていく。すなわち肘や膝といった部位のように、オブジェクトの曲がる方向(屈曲方向)が限定されている場合には、あらかじめ頂点ごとに重み付け(内外影響度)を用意しておくことができる。図2に示す法線テクスチャをマッピングする場合を例にすると、関節の内側に近い頂点ほど深いしわができやすいようにU座標成分の値が大きなテクスチャ座標が求められるようにし、また関節の外側に近い頂点ほどしわがないようにU座標成分の値が小さなテクスチャ座標が求められるようにすることができる。この内外影響度をA1とすると、テクスチャ座標のU座標成分は、以下のようにして求めることができる。
L = (W1 × W2) / 2500 (3A)
From the expression 3A, for example, it becomes easier to specify texture coordinates of a wrinkled region assuming that the weight values of the bones B1 and B2 set for a certain vertex are 50/50. For example, the weight value is 90/10. This makes it easier to specify texture coordinates for areas with less wrinkles compared to 50/50. Also, the success or failure of wrinkles is determined by whether the vertices that make up the object are inside or outside the joints. It is preferable to keep it. Specifically, the closer to the inside of the joint, the easier the wrinkle can be made, and the closer to the outside of the joint, the less the wrinkle. That is, when the direction in which the object bends (bending direction) is limited as in the case of a part such as an elbow or knee, a weight (internal / external influence degree) can be prepared for each vertex in advance. For example, in the case of mapping the normal texture shown in FIG. 2, texture coordinates having a large U-coordinate component value are obtained so that vertices closer to the inner side of the joint are more prone to wrinkles, and on the outer side of the joint. It is possible to obtain a texture coordinate having a smaller value of the U coordinate component so that the closer vertex is not wrinkled. If the inside / outside influence is A1, the U coordinate component of the texture coordinates can be obtained as follows.

U=U(θ)×L×A1 (4A)
ここで内外影響度A1は、関節の内側に近い頂点ほど関節の外側に近い頂点に比べて大きな値が設定されることが好ましい。
U = U (θ) × L × A1 (4A)
Here, as the inside / outside influence degree A1, it is preferable that a value closer to the vertex closer to the inside of the joint is set to be larger than the vertex closer to the outside of the joint.

ところで、股関節(太ももの付け根部分の関節)や肩関節のように関節の回転自由度が高く、あらゆる方向にオブジェクトが曲がる可能性があるような場合には、いずれの方向にどのくらい曲がっているのかをオブジェクトのモーション状態に応じて考慮する必要がある。すなわちいずれの頂点も関節の内側、外側になる可能性があるため、各頂点ごとにあらかじめ重み付け(内外影響度)を設定することができないからである。この場合には、以下のようにしてテクスチャ座標のU座標成分を求めることができる。   By the way, if there is a high degree of rotational freedom of the joint, such as the hip joint (joint at the base of the thigh) or the shoulder joint, and the object may bend in any direction, how much is bent in which direction? Must be considered according to the motion state of the object. That is, since any vertex may be inside or outside the joint, weighting (internal / external influence degree) cannot be set in advance for each vertex. In this case, the U coordinate component of the texture coordinates can be obtained as follows.

まず各頂点がいずれのボーンに近い位置にあるのかを判定する。   First, it is determined to which bone each vertex is located.

例えば、図5(A)及び図5(B)に示すように、平面CPを求めて、この平面CPのいずれの側に頂点が存在しているかによって、内外影響度を求める際の基準となるボーンを定める。   For example, as shown in FIGS. 5 (A) and 5 (B), a plane CP is obtained, and it becomes a reference for obtaining the degree of internal / external influence depending on which side of the plane CP a vertex is present. Define the bone.

具体的には、ベクトルVB1とベクトルVB2との合成ベクトルであるVB12と、ベクトルVB1及びベクトルVB2の正規化ベクトルnVB1、nVB2とを求める。次に、ボーンB1、B2の交点(関節K)からベクトルnVB1、nVB2の各方向へ移動した点を結んだベクトルnVBを求める。次に、合成ベクトルVB12とベクトルnVBとに対する直交ベクトルであるVCnBを求める。そして、合成ベクトルVB12と直交ベクトルVCnBとに基づいて、これらのベクトルが成す平面CPを求めることができる。このようにすると、ボーンB1とボーンB2とは、平面CPで分断されることになるため、各頂点が平面CPに対していずれの側に存在するのかによって、基準となるボーンを決定することができる。なお、頂点が平面CP上に存在するような場合には、ボーンB1、B2のいずれを基準としてもよい。   Specifically, VB12, which is a combined vector of vector VB1 and vector VB2, and normalized vectors nVB1 and nVB2 of vector VB1 and vector VB2 are obtained. Next, a vector nVB connecting points moved in the respective directions of the vectors nVB1 and nVB2 from the intersection (joint K) of the bones B1 and B2 is obtained. Next, VCnB, which is an orthogonal vector for the combined vector VB12 and the vector nVB, is obtained. Then, based on the combined vector VB12 and the orthogonal vector VCnB, a plane CP formed by these vectors can be obtained. In this way, since the bone B1 and the bone B2 are divided by the plane CP, the reference bone can be determined depending on which side each vertex is present with respect to the plane CP. it can. If the vertex is on the plane CP, either bone B1 or B2 may be used as a reference.

そして、図5に示す例では、頂点Vは、平面CPに対してボーンB1の側に存在すると判定され、以下では、ボーンB1を基準として頂点Vに関する内外影響度を求める手法を説明する。   In the example shown in FIG. 5, it is determined that the vertex V is present on the bone B1 side with respect to the plane CP. Hereinafter, a method for obtaining the degree of internal / external influence related to the vertex V on the basis of the bone B1 will be described.

具体的には、図6(A)及び図6(B)に示すように、ボーンB1に直交する平面をP1、ボーンB1と平面P1との交点をBP1、頂点Vを平面P1に投影した点をVP1、ボーンB2上のボーンB1と接していない点を平面P1に投影した点をBB1、VP1−BP1−BB1の成す角をαとしたとき、内外影響度をA2とすると、A2は以下のように求められる。   Specifically, as shown in FIGS. 6A and 6B, the plane orthogonal to the bone B1 is projected on P1, the intersection of the bone B1 and the plane P1 is projected on BP1, and the vertex V is projected on the plane P1. VP1 and the point formed by projecting a point on the plane P1 that is not in contact with the bone B1 on the bone B2 is α and the angle formed by BB1 and VP1-BP1-BB1 is α. Asking.

A2=cos(α/2) (5A)
以上より、頂点Vに対応づけられる法線テクスチャのU座標成分は、
U=Umax×L×A2 (6A)
で求められる。
A2 = cos (α / 2) (5A)
From the above, the U coordinate component of the normal texture associated with the vertex V is
U = Umax × L × A2 (6A)
Is required.

以上では頂点に対応づけられるテクセルのU座標成分を求めるようにすればよく、V座標成分は、あらかじめ頂点ごとに定めておくことができる。例えば図7に示すようなボーンの周りを回転する方向に沿ってV座標成分の0〜1.0の値を割り当てておくことができる。   In the above, the U coordinate component of the texel associated with the vertex may be obtained, and the V coordinate component can be determined for each vertex in advance. For example, a value of 0 to 1.0 of the V coordinate component can be assigned along the direction of rotation around the bone as shown in FIG.

また法線テクスチャのV座標成分においてもしわの量や深さを変化させてもよい。この場合、例えば、腕のねじれ具合等によるしわを表現することができるようになる。すなわち図8に示すようなボーン同士のねじれ角ωと、関節からの近さを表すウェイト値(例えば、W11、W21)の乗算結果とをパラメータとしてテクスチャ座標のV座標成分を求めるようにしてもよい。このときテクスチャ空間のV座標成分の一端側(例えば、0:V座標成分の最小値)から他端側(例えば、1.0:V座標成分の最大値)にかけてテクセル値パターンを以下のように変化させた法線テクスチャを用意しておくことが好ましい。   Also, the amount and depth of wrinkles may be changed in the V coordinate component of the normal texture. In this case, for example, wrinkles due to the twisted state of the arm can be expressed. That is, the V coordinate component of the texture coordinate may be obtained using the twist angle ω between the bones as shown in FIG. 8 and the multiplication result of the weight values (for example, W11 and W21) representing the proximity from the joint as parameters. Good. At this time, the texel value pattern from one end side (for example, 0: minimum value of V coordinate component) to the other end side (for example, 1.0: maximum value of V coordinate component) of the texture space is as follows. It is preferable to prepare a changed normal texture.

・一端側において法線ベクトルが同じ方向を向く頻度が高く、他端側において法線ベクトルが同じ方向を向く頻度が低い。   The frequency that the normal vector points in the same direction on one end side is high, and the frequency that the normal vector points in the same direction on the other end side is low.

・一端側において基準方向(平面を示す方向)を向いた法線ベクトルの頻度が高く、他端側において基準方向を向いた法線ベクトルの頻度が低い。   The frequency of normal vectors facing the reference direction (direction indicating the plane) on one end side is high, and the frequency of normal vectors facing the reference direction on the other end side is low.

・一端側において隣接テクセル同士の色差が小さく、他端側において隣接テクセル同士の色差が大きい。   -The color difference between adjacent texels is small on one end side, and the color difference between adjacent texels is large on the other end side.

以上に述べたように本実施形態の手法によれば、関節の角度と頂点に与えられたウェイト値に応じて法線マッピング用のテクスチャ座標を割り当てて、それに基づいてマッピングされた法線ベクトルの効果でしわの凸凹感を表現することができる。すなわち本実施形態の手法によれば、法線マッピングを行うことによって、モデルのモーション変化に応じてしわの量や深さを追従させた品質の高い画像を生成することができる。   As described above, according to the method of the present embodiment, texture coordinates for normal mapping are assigned according to the joint angle and the weight value given to the vertex, and the normal vector mapped based on the texture coordinates is mapped. The effect can express wrinkled unevenness. That is, according to the method of the present embodiment, by performing normal mapping, it is possible to generate a high-quality image that follows the amount and depth of wrinkles in accordance with changes in model motion.

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

メイン処理部では、図9に示すように、まずフレーム更新(1/60秒)のタイミングか否かを判断する(ステップS10)。そしてフレーム更新のタイミングである場合には(ステップS10でYES)、オブジェクトのモーション処理を行う(ステップS11)。すなわち、シミュレーション演算を行ってボーン毎にマトリクスを求める。この演算によりボーン間の角度も求めることができる。次に、頂点シェーダ用及びピクセルシェーダ用のシェーダプログラムの転送とシェーダプログラムを実行して描画処理を行うために必要な各種パラメータの設定及び転送を行う(ステップS12、S13、S14)。なおステップS14において、メイン処理部から描画部へ送るパラメータには、シミュレーション演算の結果得られるボーン間の角度が含まれる。そして、モデルの頂点リストを頂点シェーダへ転送し(ステップS15)、ステップS12で転送した頂点シェーダプログラム及びステップS13で転送したピクセルシェーダプログラムを順次描画部に実行させる(ステップS17、S18)。   As shown in FIG. 9, the main processing unit first determines whether or not it is a frame update (1/60 second) timing (step S10). If it is time to update the frame (YES in step S10), object motion processing is performed (step S11). That is, a simulation calculation is performed to obtain a matrix for each bone. The angle between bones can also be obtained by this calculation. Next, the shader program for the vertex shader and the pixel shader is transferred, and various parameters necessary for performing the rendering process by executing the shader program are set (steps S12, S13, S14). In step S14, the parameters sent from the main processing unit to the drawing unit include an angle between bones obtained as a result of the simulation calculation. Then, the vertex list of the model is transferred to the vertex shader (step S15), and the vertex shader program transferred in step S12 and the pixel shader program transferred in step S13 are sequentially executed by the drawing unit (steps S17 and S18).

頂点シェーダでは、図10に示すフローチャートのS20〜S22に従って頂点シェーディングを行う。具体的には、処理対象の頂点が関節の内側・外側のいずれに存在するかを判定して内外影響度を求めてから(ステップS20)、ボーンB1、B2のなす角θと頂点に設定されたボーンB1、B2のウェイト値と内外影響度に基づいてテクスチャ座標を求める(ステップS21)。すなわち処理対象の頂点に対応する法線テクスチャのUV座標を指定する。次に、UV座標データを含む頂点データをピクセルシェーダ側に転送する(ステップS22)。   The vertex shader performs vertex shading according to S20 to S22 of the flowchart shown in FIG. Specifically, after determining whether the vertex to be processed exists inside or outside the joint and obtaining the degree of internal / external influence (step S20), the angle θ and the vertex formed by the bones B1 and B2 are set. Texture coordinates are obtained based on the weight values of the bones B1 and B2 and the degree of influence inside and outside (step S21). That is, the UV coordinate of the normal texture corresponding to the vertex to be processed is designated. Next, the vertex data including the UV coordinate data is transferred to the pixel shader side (step S22).

すると、ラスタライザが頂点シェーダから転送された頂点データに従って、オブジェクトの描画ピクセルを決定する処理(ラスタライズ)を行い(ステップS23)、ピクセルシェーダでは、図10に示すフローチャートのS24以降に従ってピクセルシェーディングを行う。具体的には、頂点のテクスチャ座標から読み出されるテクセルに設定された法線ベクトルに基づいて、オブジェクトに対して法線マッピングを行う(ステップS24)。すなわちオブジェクトの描画ピクセル毎に法線ベクトルを求める処理を行う。そして、描画ピクセルに与えられた法線ベクトルに基づいてシェーディング(陰影付け)が行われたオブジェクトを描画する(ステップS25)。すなわち描画バッファにピクセルの色情報を書き込む処理を行う。このようにして服等のしわがオブジェクトのモーション状態に応じて動的に変化する様子を表現することができる。   Then, the rasterizer performs processing (rasterization) for determining the drawing pixel of the object according to the vertex data transferred from the vertex shader (step S23), and the pixel shader performs pixel shading according to S24 and subsequent steps in the flowchart shown in FIG. Specifically, normal mapping is performed on the object based on the normal vector set in the texel read from the texture coordinates of the vertex (step S24). That is, a process for obtaining a normal vector for each drawing pixel of the object is performed. Then, the object subjected to shading (shading) is drawn based on the normal vector given to the drawing pixel (step S25). That is, a process of writing pixel color information into the drawing buffer is performed. In this way, it is possible to express how the wrinkles of clothes and the like dynamically change according to the motion state of the object.

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

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

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

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

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

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

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

なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書又は図面中の記載において広義や同義な用語(関節、法線テクスチャ、法線マッピング、基準方向など)として引用された用語(連結点、ノーマルマップテクスチャ、ノーマルマッピング、平面を示す方向など)は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。また接触痕跡の表現手法も、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。   The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms (link points, normal map texture, normal mapping, plane direction) cited as broad or synonymous terms (joint, normal texture, normal mapping, reference direction, etc.) in the description or drawings And the like can be replaced with terms having a broad meaning or the same meaning in other descriptions in the specification or the drawings. Further, the method of expressing the contact trace is not limited to that described in the present embodiment, and a method equivalent to these is also included in the scope of the present invention.

また本実施の形態では、テクスチャ座標の第1の座標成分をUV座標系のU座標成分に対応づけ、テクスチャ座標の第2の座標成分をUV座標系のV座標成分に対応づけて説明をしたが、第1の座標成分をV座標成分とし、第2の座標成分をU座標成分として実施してもよい。   In this embodiment, the first coordinate component of the texture coordinate is associated with the U coordinate component of the UV coordinate system, and the second coordinate component of the texture coordinate is associated with the V coordinate component of the UV coordinate system. However, the first coordinate component may be set as the V coordinate component, and the second coordinate component may be set as the U coordinate component.

また本実施形態では、テクスチャ空間の一端側を座標成分の最小値側とし、テクスチャ空間の他端側を座標成分の最大値側として説明をしたが、一端側を座標成分の最大値側とし、他端側を座標成分の最小値側としてもよい。この場合には、テクスチャ座標の指定が本実施形態の手法と逆になるように演算すればよい。   Further, in the present embodiment, one end side of the texture space is described as the minimum value side of the coordinate component, and the other end side of the texture space is described as the maximum value side of the coordinate component. The other end side may be the minimum value side of the coordinate component. In this case, calculation may be performed so that the designation of the texture coordinates is opposite to the method of the present embodiment.

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

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 法線テクスチャの一例を示す図。The figure which shows an example of a normal texture. 本実施形態の手法の説明図。Explanatory drawing of the method of this embodiment. 本実施形態の他の手法の説明図。Explanatory drawing of the other method of this embodiment. 図5(A)(B)は、本実施形態の手法の説明図。5A and 5B are explanatory diagrams of the method of the present embodiment. 図6(A)(B)は、本実施形態の手法の説明図。6A and 6B are explanatory diagrams of the method of the present embodiment. 本実施形態の手法の説明図。Explanatory drawing of the method of this embodiment. 本実施形態の他の手法の説明図。Explanatory drawing of the other method of this embodiment. 本実施形態の具体的な処理例を示すフローチャート。The flowchart which shows the specific process example of this embodiment. 本実施形態の具体的な処理例を示すフローチャート。The flowchart which shows the specific process example of this embodiment. ハードウェア構成例。Hardware configuration example.

符号の説明Explanation of symbols

100 処理部、
110 メイン処理部、
112 オブジェクト空間設定部、114 移動・動作処理部、
114 仮想カメラ制御部、
120 描画部、
122 テクスチャ座標演算部、124 法線マッピング部、
130 音生成部、
160 操作部、170 記憶部、
172 主記憶部、174 描画バッファ、176 テクスチャ記憶部、
180 情報記憶媒体、190 表示部、192 音出力部、
194 携帯型情報記憶装置、196 通信部
100 processing unit,
110 Main processing unit,
112 object space setting unit, 114 movement / motion processing unit,
114 virtual camera control unit,
120 drawing part,
122 texture coordinate calculation unit, 124 normal mapping unit,
130 sound generator,
160 operation unit, 170 storage unit,
172 Main storage unit, 174 drawing buffer, 176 texture storage unit,
180 information storage medium, 190 display unit, 192 sound output unit,
194 Portable information storage device, 196 communication unit

Claims (11)

画像を生成するためのプログラムであって、
テクセルに法線ベクトルが設定された法線テクスチャを記憶するテクスチャ記憶部と、
モーション制御によって関節の角度が変更されるオブジェクトの関節角度パラメータと、該オブジェクトを構成する各頂点と関節との距離に応じて変化する関節影響度パラメータとに基づいて、該各頂点に対応するテクスチャ座標を求めるテクスチャ座標演算部と、
求められたテクスチャ座標に基づいて、前記法線テクスチャを前記オブジェクトにマッピングする法線マッピングを行う法線マッピング部として、
コンピュータを機能させることを特徴とするプログラム。
A program for generating an image,
A texture storage unit for storing a normal texture in which a normal vector is set in the texel;
The texture corresponding to each vertex based on the joint angle parameter of the object whose joint angle is changed by the motion control and the joint influence parameter that changes according to the distance between each vertex constituting the object and the joint. A texture coordinate calculation unit for obtaining coordinates;
As a normal mapping unit that performs normal mapping for mapping the normal texture to the object based on the obtained texture coordinates,
A program characterized by causing a computer to function.
請求項1において、
前記オブジェクトは、複数のボーンが前記関節で連結されたモデルを用いてモーション制御され、
前記テクスチャ座標演算部が、
前記各ボーン間のなす角度に応じて変化するパラメータを前記関節角度パラメータとし、かつ前記各頂点に対して設定された前記各ボーンのウェイト値の乗算結果を含むパラメータを前記関節影響度パラメータとして、前記法線テクスチャのテクスチャ座標を求めることを特徴とするプログラム。
In claim 1,
The object is motion-controlled using a model in which a plurality of bones are connected by the joints,
The texture coordinate calculation unit is
A parameter that changes according to an angle formed between the bones is the joint angle parameter, and a parameter including a multiplication result of the weight value of each bone set for each vertex is the joint influence parameter. A program for obtaining texture coordinates of the normal texture.
請求項1または2において、
前記法線テクスチャのテクスチャ座標は、第1の座標成分と第2の座標成分とを含み、
前記テクスチャ座標演算部が、
前記関節の曲がり具合に応じて変化する前記関節角度パラメータと前記関節影響度パラメータとに基づいて、前記テクスチャ座標の第1の座標成分を求めることを特徴とするプログラム。
In claim 1 or 2,
The texture coordinates of the normal texture include a first coordinate component and a second coordinate component,
The texture coordinate calculation unit is
A program for obtaining a first coordinate component of the texture coordinate based on the joint angle parameter and the joint influence parameter that change according to the degree of bending of the joint.
請求項3において、
前記法線テクスチャは、テクスチャ空間の一端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が高く、該テクスチャ空間の他端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が低いテクセル値パターンを有し、
前記テクスチャ座標演算部が、
前記関節の曲がり具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第1の座標成分を求めることを特徴とするプログラム。
In claim 3,
In the normal texture, the normal vector set to the texel on one end side of the texture space is frequently directed in the same direction, and the normal vector set to the texel on the other end side of the texture space is directed to the same direction. Having a texel value pattern that is less frequent,
The texture coordinate calculation unit is
Obtaining the first coordinate component of the texture coordinate of the normal texture so that the texel on the other end side of the texture space is associated with the greater the degree of bending of the joint or the vertex closer to the joint. A featured program.
請求項3または4において、
前記法線テクスチャは、テクスチャ空間の一端側において隣接するテクセル同士の色差が小さく、該テクスチャ空間の他端側において隣接するテクセル同士の色差が大きいテクセル値パターンを有し、
前記テクスチャ座標演算部が、
前記関節の曲がり具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第1の座標成分を求めることを特徴とするプログラム。
In claim 3 or 4,
The normal texture has a texel value pattern in which the color difference between adjacent texels is small on one end side of the texture space, and the color difference between adjacent texels is large on the other end side of the texture space;
The texture coordinate calculation unit is
Obtaining the first coordinate component of the texture coordinate of the normal texture so that the texel on the other end side of the texture space is associated with the greater the degree of bending of the joint or the vertex closer to the joint. A featured program.
請求項1〜5のいずれかにおいて、
前記法線テクスチャのテクスチャ座標は、第1の座標成分と第2の座標成分とを含み、
前記テクスチャ座標演算部が、
前記関節のねじれ具合に応じて変化する前記関節角度パラメータと前記関節影響度パラメータとに基づいて、前記テクスチャ座標の第2の座標成分を求めることを特徴とするプログラム。
In any one of Claims 1-5,
The texture coordinates of the normal texture include a first coordinate component and a second coordinate component,
The texture coordinate calculation unit is
A program for obtaining a second coordinate component of the texture coordinate based on the joint angle parameter and the joint influence parameter that change in accordance with the degree of twist of the joint.
請求項6において、
前記法線テクスチャは、テクスチャ空間の一端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が高く、該テクスチャ空間の他端側においてテクセルに設定された法線ベクトルが同じ方向を向く頻度が低いテクセル値パターンを有し、
前記テクスチャ座標演算部が、
前記関節のねじれ具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第2の座標成分を求めることを特徴とするプログラム。
In claim 6,
In the normal texture, the normal vector set to the texel on one end side of the texture space is frequently directed in the same direction, and the normal vector set to the texel on the other end side of the texture space is directed to the same direction. Having a texel value pattern that is less frequent,
The texture coordinate calculation unit is
Obtaining the second coordinate component of the texture coordinate of the normal texture so that the texel on the other end side of the texture space is associated with the greater the degree of twist of the joint or the vertex closer to the joint. A featured program.
請求項6または7において、
前記法線テクスチャは、テクスチャ空間の一端側において隣接するテクセル同士の色差が小さく、該テクスチャ空間の他端側において隣接するテクセル同士の色差が大きいテクセル値パターンを有し、
前記テクスチャ座標演算部が、
前記関節のねじれ具合が大きいほど、あるいは前記関節に近い頂点ほど、前記テクスチャ空間の他端側のテクセルが対応づけられるように、前記法線テクスチャのテクスチャ座標の第2の座標成分を求めることを特徴とするプログラム。
In claim 6 or 7,
The normal texture has a texel value pattern in which the color difference between adjacent texels is small on one end side of the texture space, and the color difference between adjacent texels is large on the other end side of the texture space;
The texture coordinate calculation unit is
Obtaining the second coordinate component of the texture coordinate of the normal texture so that the texel on the other end side of the texture space is associated with the greater the degree of twist of the joint or the vertex closer to the joint. A featured program.
請求項1〜8のいずれかにおいて、
前記法線テクスチャは、しわの凹凸を表現するためのテクスチャであることを特徴とするプログラム。
In any one of Claims 1-8,
The program, wherein the normal texture is a texture for expressing wrinkle irregularities.
コンピュータが読み取り可能な情報記憶媒体であって、請求項1〜9のいずれかに記載のプログラムを記憶することを特徴とする情報記憶媒体。   An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 9 is stored. 画像を生成するための画像生成システムであって、
テクセルに法線ベクトルが設定された法線テクスチャを記憶するテクスチャ記憶部と、
モーション制御によって関節の角度が変更されるオブジェクトの関節角度パラメータと、該オブジェクトを構成する各頂点と関節との距離に応じて変化する関節影響度パラメータとに基づいて、該各頂点に対応するテクスチャ座標を求めるテクスチャ座標演算部と、
求められたテクスチャ座標に基づいて、前記法線テクスチャを前記オブジェクトにマッピングする法線マッピングを行う法線マッピング部と、
を含むことを特徴とする画像生成システム。
An image generation system for generating an image,
A texture storage unit for storing a normal texture in which a normal vector is set in the texel;
The texture corresponding to each vertex based on the joint angle parameter of the object whose joint angle is changed by the motion control and the joint influence parameter that changes according to the distance between each vertex constituting the object and the joint. A texture coordinate calculation unit for obtaining coordinates;
A normal mapping unit that performs normal mapping for mapping the normal texture to the object based on the obtained texture coordinates;
An image generation system comprising:
JP2005274092A 2005-09-21 2005-09-21 Program, information storage medium, and image generation system Expired - Fee Related JP4662260B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005274092A JP4662260B2 (en) 2005-09-21 2005-09-21 Program, information storage medium, and image generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005274092A JP4662260B2 (en) 2005-09-21 2005-09-21 Program, information storage medium, and image generation system

Publications (2)

Publication Number Publication Date
JP2007087031A true JP2007087031A (en) 2007-04-05
JP4662260B2 JP4662260B2 (en) 2011-03-30

Family

ID=37973963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005274092A Expired - Fee Related JP4662260B2 (en) 2005-09-21 2005-09-21 Program, information storage medium, and image generation system

Country Status (1)

Country Link
JP (1) JP4662260B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092378A (en) * 2008-10-10 2010-04-22 Sega Corp Image processing program and image processing apparatus
CN109453519A (en) * 2018-11-09 2019-03-12 网易(杭州)网络有限公司 A kind of creation method and device of landform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11250284A (en) * 1998-02-26 1999-09-17 Dainippon Printing Co Ltd Method for preparing cg of human body
WO2002023484A1 (en) * 2000-09-13 2002-03-21 Center For Advanced Science And Technology Incubation, Ltd. Texture mapping method and rendering device
JP2007527054A (en) * 2003-05-14 2007-09-20 ピクサー Rig baking

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11250284A (en) * 1998-02-26 1999-09-17 Dainippon Printing Co Ltd Method for preparing cg of human body
WO2002023484A1 (en) * 2000-09-13 2002-03-21 Center For Advanced Science And Technology Incubation, Ltd. Texture mapping method and rendering device
JP2007527054A (en) * 2003-05-14 2007-09-20 ピクサー Rig baking

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092378A (en) * 2008-10-10 2010-04-22 Sega Corp Image processing program and image processing apparatus
CN109453519A (en) * 2018-11-09 2019-03-12 网易(杭州)网络有限公司 A kind of creation method and device of landform
CN109453519B (en) * 2018-11-09 2022-02-22 网易(杭州)网络有限公司 Terrain creating method and device

Also Published As

Publication number Publication date
JP4662260B2 (en) 2011-03-30

Similar Documents

Publication Publication Date Title
JP4651435B2 (en) Program, information storage medium, and image generation system
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP4305903B2 (en) Image generation system, program, and information storage medium
JP3748451B1 (en) Program, information storage medium, and image generation system
JP4776017B2 (en) Program, information storage medium, and image generation system
JP2007164557A (en) Program, information recording medium and image generation system
JP4743770B2 (en) Image generation system, program, and information storage medium
JP4754384B2 (en) Program, information recording medium, and image generation system
JP2006323512A (en) Image generation system, program, and information storage medium
JP4662260B2 (en) Program, information storage medium, and image generation system
JP2006252426A (en) Program, information storage medium, and image generation system
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4528008B2 (en) Program, information storage medium, and image generation system
JP2001229403A (en) Game system and information storage medium
JP4786389B2 (en) Program, information storage medium, and image generation system
JP2010033288A (en) Image generation system, program and information storage medium
JP4574058B2 (en) Image generation system, program, and information storage medium
JP4229317B2 (en) Image generation system, program, and information storage medium
JP2010033299A (en) Image generation system, program and information storage medium
JP4159060B2 (en) Image generating apparatus and information storage medium
JP4754385B2 (en) Program, information recording medium, and image generation system
JP4592087B2 (en) Image generation system, program, and information storage medium
JP2006252423A (en) Program, information storage medium and image generation system
JP2006252291A (en) Program, information storage medium and image generation system
JP4865471B2 (en) Program, information storage medium, and image generation system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101213

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101222

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101224

R150 Certificate of patent or registration of utility model

Ref document number: 4662260

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140114

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140114

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees