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

Image generation system, program and information storage medium Download PDF

Info

Publication number
JP2007164736A
JP2007164736A JP2005364106A JP2005364106A JP2007164736A JP 2007164736 A JP2007164736 A JP 2007164736A JP 2005364106 A JP2005364106 A JP 2005364106A JP 2005364106 A JP2005364106 A JP 2005364106A JP 2007164736 A JP2007164736 A JP 2007164736A
Authority
JP
Japan
Prior art keywords
effect expression
light effect
expression object
vector
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005364106A
Other languages
Japanese (ja)
Inventor
Kenichiro Hidaka
健一郎 日高
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 JP2005364106A priority Critical patent/JP2007164736A/en
Publication of JP2007164736A publication Critical patent/JP2007164736A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To effectively express view of a rainbow, which is changing according to the various factors of a natural field with a small processing load. <P>SOLUTION: This program for generating an image to be viewed from a virtual camera in an object space makes a computer function as an optical effect expression object setting part 116 for changing at least one of the shape, size and appearing position of an optical effect expression object based on the light source position and the optical vector direction and a plotting part 120 for plotting an image in which the object space where the optical effect expression object has been arranged from a virtual camera. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

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

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

さてこのようなゲームシステムでは、プレーヤの仮想現実向上のために、よりリアルな画像を生成することが重要な技術的課題になっている。
特開平11−306391号公報
Now, in such a game system, it is an important technical problem to generate a more realistic image in order to improve the player's virtual reality.
JP-A-11-306391

例えば虹は空気中の水滴に光が反射するときに、色(光の波長)によって光の屈折率が異なることによって発生するものであり、光源からの光線の角度や空気の状態等の自然界の様々な要因によりその現れ方は変化する。   For example, a rainbow is generated when the light is reflected by water droplets in the air, due to the difference in the refractive index of light depending on the color (wavelength of light), and in the natural world such as the angle of light from the light source and the air condition. The appearance changes depending on various factors.

ところがゲーム空間にかかる虹を表現する場合、通常は予め用意された虹オブジェクトを配置して描画するという単純な構成で実現するため、いつも同じ虹が表示されていた。従って自然描写としては単調であり、自然描写を楽しむという要素が強いゲームには、物足りないものであった。   However, when expressing a rainbow in the game space, the same rainbow is always displayed because it is usually realized by a simple configuration in which a rainbow object prepared in advance is arranged and drawn. Therefore, it is monotonous as a natural depiction, and it is unsatisfactory for a game with a strong element of enjoying natural depiction.

しかし自然界の様々な要因が絡みあって変化する虹の見え方を厳密にシミュレーションすると演算付加が増大し、限られたハードウエア資源でリアルタイムに画像生成を行うことが必要なゲーム装置等では処理が困難であるという問題点があった。   However, rigorously simulating the changing appearance of the rainbow, which is caused by various factors in the natural world, adds to the computation, and processing is difficult for game devices that require real-time image generation with limited hardware resources. There was a problem that it was difficult.

本発明は、以上のような課題に鑑みてなされたものであり、その目的とするところは、自然界の様々な要因によって変化する虹の見え方を少ない処理付加で効果的に表現することが可能な画像生成システム、プログラム及び情報記憶媒体を提供することにある。   The present invention has been made in view of the above-described problems, and the object of the present invention is to effectively represent the appearance of the rainbow that changes due to various factors in the natural world with a small amount of processing. An image generation system, a program, and an information storage medium are provided.

(1)本発明は、
オブジェクト空間において仮想カメラから見える画像を生成するための画像生成装置であって、
光源位置または光線ベクトルの方向に基づき、光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ変化させる光効果表現オブジェクト設定部と、
光効果表現オブジェクトが配置されたオブジェクト空間を仮想カメラから見た画像を描画する描画部と、
とを含む画像生成システムに関係する。
(1) The present invention
An image generation device for generating an image visible from a virtual camera in an object space,
A light effect expression object setting unit that changes at least one of the shape, size, and appearance position of the light effect expression object based on the light source position or the direction of the light vector;
A drawing unit that draws an image of an object space in which a light effect expression object is arranged viewed from a virtual camera;
Related to an image generation system.

また本発明は、上記各部としてコンピュータを機能させるプログラムに関係する。また本発明は、コンピュータ読み取り可能な情報記憶媒体であって、上記各部としてコンピュータを機能させるプログラムを記憶(記録)した情報記憶媒体に関係する。   The present invention also relates to a program that causes a computer to function as each of the above-described units. The present invention also relates to a computer-readable information storage medium that stores (records) a program that causes a computer to function as each unit.

光効果表現物オブジェクトとは、例えば虹でもよいし、光の反射、屈折、発光等によって引き起こされる様々な現象を表現するためのオブジェクトでも良いし、その他オーロラ、雲、蜃気楼等でもよい。   The light effect expression object may be, for example, a rainbow, an object for expressing various phenomena caused by light reflection, refraction, light emission, or the like, or an aurora, a cloud, a mirage, or the like.

また現実世界には存在しない光の現象を表現する場合も本発明の範囲内である。   In addition, the case of expressing a light phenomenon that does not exist in the real world is also within the scope of the present invention.

光線ベクトルとは並行光源の光線ベクトルでもよい。また点光源でもオブジェクト空間から遠く離れた場所に設定される場合には光線ベクトルはほぼ並行になるため、点光源の光線ベクトルでもよい。   The ray vector may be a ray vector of a parallel light source. Further, when the point light source is set at a location far away from the object space, the ray vectors are almost parallel, and therefore the ray vector of the point light source may be used.

光源位置又は光線ベクトルの方向に基づき、光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを含む光効果表現オブジェクト設定情報を決定するとは、例えば光源位置又は光線ベクトルの方向(例えば光線ベクトルの入射角や地平円とのなす角度や反射角等)と光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つの対応付けを予めテーブルデータ等として設定しておき、当該テーブルデータに基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを決定する構成でもよい。   The light effect expression object setting information including at least one of the shape, size, and appearance position of the light effect expression object is determined based on the light source position or the direction of the light vector. The correspondence between at least one of the incident angle of the vector, the angle formed by the horizontal circle, the reflection angle, etc.) and the shape, size, and appearance position of the light effect expression object is set in advance as table data or the like. A configuration may be used in which at least one of the shape, size, and appearance position of the light effect expression object is determined based on this.

また光源位置又は光線ベクトルの方向を変数として光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを求める関数を設定しておき、当該関数に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを決定する構成でもよい。   Further, a function for obtaining at least one of the shape, size, and appearance position of the light effect expression object is set using the light source position or the direction of the light vector as a variable, and the shape, size, and It may be configured to determine at least one of the appearance positions.

また光源位置又は光線ベクトルの方向にもとづき視点位置に所定のベクトルVを設定して、所定のベクトルVで所定の仮想投影面に円弧を描いた時の円弧に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを求めるアルゴリズムを設定しておき、当該アルゴリズムに基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを決定する構成でもよい。   The shape and size of the light effect expression object are set based on the arc when a predetermined vector V is set at the viewpoint position based on the light source position or the direction of the light vector, and an arc is drawn on the predetermined virtual projection plane with the predetermined vector V. Alternatively, an algorithm for determining at least one of the height and the appearance position may be set, and at least one of the shape, size, and appearance position of the light effect expression object may be determined based on the algorithm.

光効果表現オブジェクトは空気中の水滴に太陽光線が反射する事によっておこるため、太陽の位置がことなると光効果表現オブジェクトのできる位置や大きさも異なってくる。   Since the light effect expression object is caused by the reflection of sunlight into the water droplets in the air, the position and size of the light effect expression object differ depending on the position of the sun.

本発明によれば、光源位置や光線ベクトルの方向に基づき形状、大きさ及び出現位置の少なくとも1つが異なる光効果表現オブジェクトの画像を生成することができる。従って太陽の位置によって変化する虹等の光効果表現物の見え方を厳密にシミュレーション演算を行うことなしに、少ない演算負荷で効果的な光効果表現物の表現を行うことができる。   According to the present invention, it is possible to generate an image of a light effect expression object in which at least one of the shape, size, and appearance position differs based on the light source position and the direction of the light vector. Therefore, an effective light effect expression can be expressed with a small calculation load without strictly performing a simulation calculation on the appearance of a light effect expression such as a rainbow that changes depending on the position of the sun.

(2)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
ゲーム時刻の変化に従って光源位置または光線ベクトルの方向を変化させる光源制御部を含むことを特徴とする。
(2) In the image generation system, program, and information storage medium according to the present invention,
It includes a light source control unit that changes a light source position or a direction of a light vector according to a change in game time.

現実世界の時刻に応じて太陽の位置が変化する様子(例えば朝東から上り昼間に南の空に登り夕刻に西に沈む)をモデルにしてゲーム時刻に応じて光源位置または光線ベクトルの方向を変化させるようにしてもよい。   Model the situation where the position of the sun changes according to the time of the real world (for example, climbing from the morning east to the south in the daytime and sinking to the west in the evening), and the light source position or the direction of the light vector according to the game time It may be changed.

本発明によれば、光効果表現オブジェクトが出現するゲーム時刻がことなれば、形状、大きさ及び出現位置の少なくとも1つの異なる光効果表現オブジェクトの画像を生成することができる。   According to the present invention, if the game time at which the light effect expression object appears is different, an image of the light effect expression object having at least one different shape, size, and appearance position can be generated.

従ってゲーム時刻によって異なる形状、大きさ及び出現位置の少なくとも1つの異なる光効果表現オブジェクトの画像が生成されるので、単調でない深みのある虹の表現を行うことができるとともに、ゲーム空間の時間の流れも感じさせることができる。   Accordingly, since an image of at least one different light effect expression object having a different shape, size, and appearance position is generated depending on the game time, it is possible to express a rainbow with a depth that is not monotonous and the flow of time in the game space Can also feel.

(3)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、
前記光線ベクトルの方向に対して所定角度だけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度だけずらして第2の方向ベクトルV2を設定し、第1の方向ベクトルV1、第2の方向ベクトルV2を視点位置を始点として前記仮想投影面にむけてのばし、第1の方向ベクトルV1、第2の方向ベクトルV2の延長線と前記仮想投影面の交点に基づいて光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを設定することを特徴とする。
(3) In the image generation system, the program, and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
Set a virtual projection plane at a point away from the viewpoint position by a predetermined distance in the direction opposite to the light source,
The first direction vector V1 is set by shifting by a predetermined angle with respect to the direction of the ray vector, the second direction vector V2 is set by shifting by a slight angle with respect to the first direction vector V1, and the first direction The vector V1 and the second direction vector V2 are extended toward the virtual projection plane starting from the viewpoint position, and based on the intersection of the first direction vector V1 and the extension line of the second direction vector V2 and the virtual projection plane. At least one of a shape, a size, and an appearance position of the light effect expression object is set.

仮想投影面は視点から遠方に設定すればよいので、所定の距離は視点から遠方であれば、適宜設定可能である。   Since the virtual projection plane may be set far from the viewpoint, the predetermined distance can be appropriately set as long as it is far from the viewpoint.

第1の方向ベクトルV1と第2の方向ベクトルV2は微少角度だけずれたベクトルである。微少角度は、光の波長による屈折率の違いを反映させるように設定することができる。例えば赤の反射光と紫の反射光のなす角に基づき設定してもよい。   The first direction vector V1 and the second direction vector V2 are vectors shifted by a minute angle. The minute angle can be set so as to reflect the difference in refractive index depending on the wavelength of light. For example, it may be set based on an angle formed by red reflected light and purple reflected light.

このようにすると光線ベクトルの方向に基づき光効果表現オブジェクトの、形状、大きさ及び出現位置の少なくとも1つを決定することができるので、リアルな虹の画像を生成することができる。   In this way, since at least one of the shape, size, and appearance position of the light effect expression object can be determined based on the direction of the light vector, a realistic rainbow image can be generated.

(4)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、
前記光線ベクトルの方向に対して所定角度だけずらして得られる方向ベクトルVを視点位置から前記仮想投影面にむけてのばし、方向ベクトルVの延長線と前記仮想投影面の交点である第1の交点と、光線ベクトルを視点位置から前記仮想投影面にむけてのばし光線ベクトルの延長線と前記仮想投影面の交点である第2の交点を求め、第1の交点と第2の交点に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ設定することを特徴とする。
(4) In the image generation system, the program, and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
Set a virtual projection plane at a point away from the viewpoint position by a predetermined distance in the direction opposite to the light source,
A direction vector V obtained by shifting by a predetermined angle with respect to the direction of the ray vector is extended from the viewpoint position to the virtual projection plane, and a first intersection that is an intersection of the extension line of the direction vector V and the virtual projection plane. And extending a ray vector from the viewpoint position toward the virtual projection plane, obtaining a second intersection that is an intersection of the extension line of the ray vector and the virtual projection plane, and producing a light effect based on the first intersection and the second intersection At least one of the shape, size, and appearance position of the expression object is set.

仮想投影面は視点から遠方に設定すればよいので、所定の距離は視点から遠方であれば、適宜設定可能である。   Since the virtual projection plane may be set far from the viewpoint, the predetermined distance can be appropriately set as long as it is far from the viewpoint.

第1の交点と第2の交点に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ設定することとは、例えば第1の交点と第2の交点に基づき、円の半径を特定し、特定された半径を有する円に基づき光効果表現オブジェクトの形状を設定する場合でもよい。   Setting at least one of the shape, size, and appearance position of the light effect expression object based on the first intersection and the second intersection means, for example, that the radius of the circle is set based on the first intersection and the second intersection. The shape of the light effect expression object may be set based on the specified circle having the specified radius.

また第2の交点に基づき、光効果表現オブジェクトの位置を決定する場合(例えば、第2の交点に光効果表現オブジェクトの設定位置とする)でもよい。   Further, the position of the light effect expression object may be determined based on the second intersection point (for example, the setting position of the light effect expression object is set at the second intersection point).

本発明によれば光線ベクトルの方向に応じて光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ変更することができる。   According to the present invention, at least one of the shape, size, and appearance position of the light effect expression object can be changed according to the direction of the light vector.

例えば光線ベクトルの方向が垂直に近いほど、又は光源の位置が高いほど半径の大きな円に基づいて光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを決定することができる。   For example, at least one of the shape, size, and appearance position of the light effect expression object can be determined based on a circle having a larger radius as the direction of the light vector is closer to the vertical or the position of the light source is higher.

(5)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトとして、円環状のオブジェクトを設定することを特徴とする。
(5) In the image generation system, the program, and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
An annular object is set as the light effect expression object.

円環状の光効果表現オブジェクトの上半分を用いるようにしてもよい。   The upper half of the annular light effect expression object may be used.

前記円環状の光効果表現オブジェクトに対し、光効果表現オブジェクトの模様の虹テクスチャ(例えば七色の光の帯の模様)をマッピングして虹の画像を生成するようにしてもよい。   A rainbow image may be generated by mapping a rainbow texture (for example, a seven-color light band pattern) of the light effect expression object pattern to the annular light effect expression object.

(6)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトを、所与のタイミングで所定時間配置するように設定することを特徴とする。
(6) In the image generation system, the program, and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
The light effect expression object is set to be arranged for a predetermined time at a given timing.

(7)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトを、配置開始から所定期間に光効果表現オブジェクトをフェードイン表示させるための設定処理、及び配置終了前の所定期間に光効果表現オブジェクトをフェードアウト表示させるための設定処理の少なくとも1つを行うことを特徴とする。
(7) In the image generation system, the program, and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
At least one of a setting process for causing the light effect expression object to fade-in and displaying the light effect expression object in a predetermined period from the start of arrangement, and a setting process for causing the light effect expression object to fade out and display in a predetermined period before the arrangement ends. It is characterized by performing.

フェードイン処理とは光効果表現オブジェクトが見えない状態(透明の状態)から徐徐に濃くなって(だんだん透明度が低くなってくる)はっきり見える状態に、時間の経過に従って光効果表現オブジェクトの表示状態を変化させる処理である。   The fade-in process changes the display state of the light effect expression object over time from the state where the light effect expression object is not visible (transparent state) to the state where it gradually becomes dark (transparency gradually decreases). It is a process to change.

フェードアウト処理とは光効果表現オブジェクトがはっきり見える状態から徐徐に薄くなって(だんだん透明度が高くなる)見えない状態(透明度0の状態)に、時間の経過に従って光効果表現オブジェクトの表示状態を変化させる処理である。   The fade-out process changes the display state of the light effect expression object over time from a state where the light effect expression object is clearly visible to a state where the light effect expression object gradually becomes thinner (transparency increases gradually) and is not visible (transparency is 0). It is processing.

光効果表現オブジェクト画像をフェードイン表示させるための表示制御や光効果表現オブジェクト画像をフェードアウト表示させるための表示制御は、光効果表現オブジェクトのα値を変化させ、光効果表現オブジェクトを加算半透明で描画させることにより実現してもよい。   The display control for fading in the light effect expression object image and the display control for fading out the light effect expression object image can be done by changing the alpha value of the light effect expression object and adding the light effect expression object semitransparent. It may be realized by drawing.

例えば光効果表現オブジェクトの基準値または光効果表現オブジェクトに設定されていた値をα、あるゲーム時刻における値をα’として、光効果表現オブジェクト配置開始からの経過時間tに応じた制御パラメータkを求め、α’=kαとなるα’を求めるようにしてもよい。   For example, the reference value of the light effect expression object or the value set in the light effect expression object is α, the value at a certain game time is α ′, and the control parameter k corresponding to the elapsed time t from the start of the light effect expression object arrangement is set. Alternatively, α ′ satisfying α ′ = kα may be obtained.

α値はオブジェクト単位に設定されていてもよいし、ポリゴンの頂点単位に設定されていてもよいし、画素単位に設定されていてもよい。   The α value may be set for each object, may be set for each vertex of the polygon, or may be set for each pixel.

上記透明度の制御は描画部が行うピクセル処理(シェーディング言語によって記述されたシェーダプログラムによって、ポリゴン(プリミティブ)の描画処理をプログラム可能にするハードウェア、いわゆるプログラマブルシェーダ(頂点シェーダやピクセルシェーダ)により実現してもよい。   The above transparency control is realized by pixel processing performed by the rendering unit (hardware that enables polygon (primitive) rendering processing to be programmed by a shader program described in a shading language), so-called programmable shaders (vertex shaders and pixel shaders). May be.

またテクスチャマッピングにより実現してもよい。この場合には、光効果表現オブジェクトに対してマッピングするテクスチャの色分布やα値の分布(テクセルパターン)をフェードイン、フェードアウトに合わせて動的に変化させるようにしてもよい。   Moreover, you may implement | achieve by texture mapping. In this case, the texture color distribution and α value distribution (texel pattern) to be mapped to the light effect expression object may be dynamically changed in accordance with fade-in and fade-out.

この場合において、色分布やα値の分布が異なるテクスチャを動的に生成してもよいし、色分布やα値の分布が異なる複数のテクスチャを予め用意しておき、使用するテクスチャを動的に切り替えるようにしてもよい。またオブジェクト単位でテクスチャの色分布を変化させてもよいし、オブジェクト単位でテクスチャの色分布を変化させるようにしてもよい。   In this case, textures having different color distributions or α value distributions may be dynamically generated, or a plurality of textures having different color distributions or α value distributions are prepared in advance, and the textures to be used are dynamically generated. You may make it switch to. The texture color distribution may be changed in units of objects, or the texture color distribution may be changed in units of objects.

本発明によれば、光効果表現オブジェクトの見え始めはうすく、だんだんはっきり見えてきて、また次第に薄くなって消えていく光効果表現オブジェクトの出現から消滅の様子を画像で表現することができる。   According to the present invention, the appearance of a light effect expression object can be represented by an image, with the appearance of the light effect expression object appearing faint, gradually becoming clearer, and gradually fading and disappearing.

(8)また本発明に係る画像生成システム、プログラム及び情報記憶媒体では、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトの表示範囲を制御するための表示範囲制御情報を設定し、表示範囲制御情報に基づき表示範囲外に当たる部分については光効果表現オブジェクトが表示されないように設定することを特徴とする。
(8) In the image generation system, the program and the information storage medium according to the present invention,
The light effect expression object setting unit includes:
The display range control information for controlling the display range of the light effect expression object is set, and the light effect expression object is set so as not to be displayed for a portion that falls outside the display range based on the display range control information.

表示範囲制御情報として例えば表示範囲となる領域を規定し、当該表示範囲となる領域に属するか否か判定し、光効果表現オブジェクトの当該表示範囲となる領域に属しない部分については表示されないようにしてもよい。   As the display range control information, for example, a region to be a display range is defined, it is determined whether or not it belongs to the region to be the display range, and a portion not belonging to the region to be the display range of the light effect expression object is not displayed. May be.

例えば仮想投影面上に光効果表現オブジェクトを設定すると仮定して、仮想平面上で光効果表現オブジェクトの現れるエリアを設定するようにしてもよいし、光効果表現オブジェクトの現れない非表示領域を設定する場合も本発明の範囲内である。仮想投影面は例えば始点座標系においてZ軸と直交するYX平面として設定することができる。   For example, assuming that a light effect expression object is set on the virtual projection plane, an area where the light effect expression object appears on the virtual plane may be set, or a non-display area where the light effect expression object does not appear is set. This is also within the scope of the present invention. The virtual projection plane can be set, for example, as a YX plane orthogonal to the Z axis in the starting point coordinate system.

そして仮想投影面上のX、Yの値で光効果表現オブジェクト表示領域を定義するようにしてもよい。   The light effect expression object display area may be defined by X and Y values on the virtual projection plane.

なお表示/非表示領域の設定はランダムに行っても良いし、例えばオブジェクト空間の大気の状態(水蒸気の状態)等に応じて設定するようにしてもよい。   The display / non-display area may be set at random, or may be set according to the atmospheric state (water vapor state) of the object space, for example.

表示/非表示の制御は、例えばオブジェクト自体は存在して、オブジェクトの表示領域に属する部分についてのみ表示し、非表示領域に属する部分については表示しないように制御する場合でもよい。この場合、非表示領域の透明度(例えばα値)を高くして透明にすることで表示されないように制御してもよい。   The display / non-display control may be, for example, a case where the object itself exists and only the part belonging to the display area of the object is displayed and the part belonging to the non-display area is not displayed. In this case, it may be controlled so that the non-display area is not displayed by increasing transparency (for example, α value).

また表示領域については光効果表現オブジェクトを切り取るようにしてもよいし、表示領域に対応する部分のみ光効果表現オブジェクトを生成するようにしてもよい。   For the display area, the light effect expression object may be cut out, or the light effect expression object may be generated only in a portion corresponding to the display area.

本発明によれば、大気の状態等を反映して多様な見え方をする虹等の光効果表現物の画像表現を行うことができる。   According to the present invention, it is possible to perform image representation of a light effect expression such as a rainbow that reflects various conditions such as atmospheric conditions.

以下、本実施形態について説明する。   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 this embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.

操作部160は、プレーヤが操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、マイク、タッチパネル型ディスプレイ、或いは筺体などにより実現できる。   The operation unit 160 is for a player to input operation data, and the function can be realized by a lever, a button, a steering, a microphone, a touch panel display, a housing, or the like.

記憶部170は、描画バッファ172やZバッファ174やテクスチャ記憶部176を含み、処理部100や通信部196などのワーク領域となるもので、その機能はRAMなどにより実現できる。   The storage unit 170 includes a drawing buffer 172, a Z buffer 174, and a texture storage unit 176, and serves as a work area for the processing unit 100, the communication unit 196, and the like, and its functions can be realized by a RAM 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 (records and stores) a program for causing the computer to function as each unit of the present embodiment (a program for causing the 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としては、メモリカードや携帯型ゲーム装置などがある。   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.

通信部196は、外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種の制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。   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 a communication ASIC, It can be realized by a program.

なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180(記憶部170)に配信するようにしてもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含めることができる。   Note that a program (data) for causing a computer to function as each unit of this embodiment is distributed from the information storage medium of the host device (server) to the information storage medium 180 (storage unit 170) via the network and the communication unit 196. You may do it. 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をワーク領域として各種処理を行う。処理部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 storage unit 170 as a work area. The functions of the processing unit 100 can be realized by hardware such as various processors (CPU, DSP, etc.), ASIC (gate array, etc.), and programs.

処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、光効果表現オブジェクト設定部116、光源制御部118、描画部120、音生成部130を含む。なおこれらの一部を省略してもよい。   The processing unit 100 includes an object space setting unit 110, a movement / motion processing unit 112, a virtual camera control unit 114, a light effect expression object setting unit 116, a light source control unit 118, a drawing unit 120, and a sound generation unit 130. Some of these may be omitted.

オブジェクト空間設定部110は、キャラクタ、樹木、車、柱、壁、建物、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブ面で構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。即ちワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、その位置(X、Y、Z)にその回転角度(X、Y、Z軸回りでの回転角度)でオブジェクトを配置する。   The object space setting unit 110 is a variety of objects (objects composed of primitive surfaces such as polygons, free-form surfaces or subdivision surfaces) representing display objects such as characters, trees, cars, columns, walls, buildings, and maps (terrain). The process of setting the placement in the object space is performed. In other words, the position and rotation angle of the object in the world coordinate system (synonymous with direction and direction) are determined, and the rotation angle (rotation angle around the X, Y, and Z axes) is determined at that position (X, Y, Z). Arrange objects.

移動・動作処理部112は、オブジェクト(車、飛行機、又はキャラクタ等)の移動・動作演算(移動・動作シミュレーション)を行う。即ち、操作部160によりプレーヤが入力した操作データ、プログラム(移動・動作アルゴリズム)、或いは各種データ(モーションデータ)などに基づいて、オブジェクト(移動オブジェクト)をオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させる処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(各パーツオブジェクトの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。ここでフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。   The movement / motion processing unit 112 performs a movement / motion calculation (movement / motion simulation) of an object (such as a car, an airplane, or a character). In other words, an object (moving object) is moved in the object space or an object is moved based on operation data, a program (movement / motion algorithm), or various data (motion data) input by the player through the operation unit 160. Perform processing (motion, animation). Specifically, a simulation process for sequentially obtaining object movement information (position, rotation angle, speed, or acceleration) and motion information (position or rotation angle of each part object) every frame (1/60 second). I do. Here, the frame is a unit of time for performing object movement / motion processing (simulation processing) and image generation processing.

仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点での画像を生成するための仮想カメラを制御する処理を行う。即ち、仮想カメラの位置(X、Y、Z)又は回転角度(X、Y、Z軸回りでの回転角度)を制御する処理(視点位置や視線方向を制御する処理)を行う。   The virtual camera control unit 114 performs a process of controlling the virtual camera for generating an image at a given (arbitrary) viewpoint in the object space. That is, 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 is photographed from behind using a virtual camera, the position or rotation angle (direction of the virtual camera) of the virtual camera is controlled so that the virtual camera follows changes in the position or rotation of the object. 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 rotated at a predetermined rotation angle while being moved along a predetermined movement route. In this case, the virtual camera is controlled based on virtual camera data for specifying the position (movement path) and rotation angle of the virtual camera.

光効果表現オブジェクト設定部116は、光源位置または光線ベクトルの方向に基づき、光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ変化させる処理を行う。   The light effect expression object setting unit 116 performs a process of changing at least one of the shape, size, and appearance position of the light effect expression object based on the light source position or the direction of the light vector.

光効果表現オブジェクト設定部116は、視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、前記光線ベクトルの方向に対して所定角度だけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度だけずらして第2の方向ベクトルV2を設定し、第1の方向ベクトルV1、第2の方向ベクトルV2を視点位置を始点として前記仮想投影面にむけてのばし、第1の方向ベクトルV1、第2の方向ベクトルV2の延長線と前記仮想投影面の交点に基づいて光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを設定するようにしてもよい。   The light effect expression object setting unit 116 sets a virtual projection plane at a point away from the viewpoint position by a predetermined distance in the opposite direction to the light source, and shifts the first direction by shifting the predetermined direction with respect to the direction of the light vector. A vector V1 is set, and a second direction vector V2 is set by shifting the first direction vector V1 by a slight angle, and the first direction vector V1 and the second direction vector V2 are used as the starting point for the virtual position. Extending toward the projection plane, at least one of the shape, size, and appearance position of the light effect expression object is determined based on the intersection of the first direction vector V1 and the extension line of the second direction vector V2 and the virtual projection plane. You may make it set.

前記光効果表現オブジェクト設定部116は、視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、前記光線ベクトルの方向に対して所定角度だけずらして得られる方向ベクトルVを視点位置から前記仮想投影面にむけてのばし、方向ベクトルVの延長線と前記仮想投影面の交点である第1の交点と、光線ベクトルを視点位置から前記仮想投影面にむけてのばし光線ベクトルの延長線と前記仮想投影面の交点である第2の交点を求め、第1の交点と第2の交点に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ設定するようにしてもよい。   The light effect expression object setting unit 116 sets a virtual projection plane at a predetermined distance away from the viewpoint position in a direction opposite to the light source, and a direction obtained by shifting the virtual projection plane by a predetermined angle with respect to the direction of the light vector. The vector V is extended from the viewpoint position toward the virtual projection plane, the first intersection point of the extension line of the direction vector V and the virtual projection plane, and the ray vector is extended from the viewpoint position toward the virtual projection plane. A second intersection that is an intersection of the ray vector extension line and the virtual projection plane is obtained, and at least one of the shape, size, and appearance position of the light effect expression object is set based on the first intersection and the second intersection. You may do it.

前記光効果表現オブジェクト設定部116は、光効果表現オブジェクトとして、円環状のオブジェクトを設定するようにしてもよい。   The light effect expression object setting unit 116 may set an annular object as the light effect expression object.

前記光効果表現オブジェクト設定部116は、光効果表現オブジェクトを、所与のタイミングで所定時間配置するように設定するようにしてもよい。   The light effect expression object setting unit 116 may set the light effect expression object to be arranged for a predetermined time at a given timing.

前記光効果表現オブジェクト設定部116は、光効果表現オブジェクトを、配置開始から所定期間に光効果表現オブジェクトをフェードイン表示させるための設定処理、及び配置終了前の所定期間に光効果表現オブジェクトをフェードアウト表示させるための設定処理の少なくとも1つを行うようにしてもよい。   The light effect expression object setting unit 116 fades out the light effect expression object in a predetermined period before the arrangement ends, and a setting process for fading in and displaying the light effect expression object in a predetermined period from the start of the arrangement. You may make it perform at least 1 of the setting processing for displaying.

前記光効果表現オブジェクト設定部116は、光効果表現オブジェクトの表示範囲を制御するための表示範囲制御情報を設定し、表示範囲制御情報に基づき表示範囲外に当たる部分については光効果表現オブジェクトが表示されないように設定するようにしてもよい。   The light effect expression object setting unit 116 sets display range control information for controlling the display range of the light effect expression object, and no light effect expression object is displayed for a portion that falls outside the display range based on the display range control information. You may make it set as follows.

光源制御部118は、ゲーム時刻の変化に従って光源位置または光線ベクトルの方向を変化させる処理を行う。   The light source control unit 118 performs a process of changing the light source position or the direction of the light vector according to the change of the game time.

描画部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。   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.

描画部120は、光効果表現オブジェクトが配置されたオブジェクト空間を仮想カメラから見た画像を描画する。   The drawing unit 120 draws an image obtained by viewing the object space in which the light effect expression object is arranged from the virtual camera.

描画部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まずオブジェクト(モデル)の各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含むオブジェクトデータ(モデルデータ)が入力され、入力されたオブジェクトデータに含まれる頂点データに基づいて、頂点処理が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。頂点処理では、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、透視変換、あるいは光源処理等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点データを変更(更新、調整)する。そして、頂点処理後の頂点データに基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(フラグメント処理)が行われる。ピクセル処理では、テクスチャの読出し(テクスチャマッピング)、色データの設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色を描画バッファ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 generating a so-called three-dimensional game image, first, object data (model data) including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object (model) ) Is input, and vertex processing is performed based on the vertex data included in the input object data. When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary. In vertex processing, geometry processing such as vertex movement processing, coordinate transformation (world coordinate transformation, camera coordinate transformation), clipping processing, perspective transformation, or light source processing is performed, and an object is configured based on the processing result. Change (update, adjust) the vertex data given for the vertex group. 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. Subsequent to rasterization, pixel processing (fragment processing) for drawing pixels constituting an image (fragments constituting a display screen) is performed. In pixel processing, various processes such as texture reading (texture mapping), color data setting / changing, translucent composition, anti-aliasing, etc. are performed to determine the final drawing color of the pixels that make up the image, and perspective transformation is performed. The drawing color of the object is output (drawn) to the drawing buffer 174 (buffer that can store image information in units of pixels; VRAM, rendering target). 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) set in the object space is generated. Note that when there are a plurality of virtual cameras (viewpoints), an image can be generated so that an image seen from each virtual camera can be displayed as a divided image on one screen.

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

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

特に本実施形態では、光効果表現オブジェクトを描画する際に、例えば虹等を表現するための光効果表現用のテクスチャをマッピングする処理を行うようにしてもよい。この場合には、光効果表現オブジェクトに対してマッピングされるテクスチャの色分布(テクセルパターン)を動的に変化させるようにしてもよい。 この場合において、色分布が異なるテクスチャを動的に生成してもよいし、複数の色分布が異なるテクスチャを予め用意しておき、使用するテクスチャを動的に切り替えるようにしてもよい。またオブジェクト単位でテクスチャの色分布を変化させてもよいし、オブジェクト単位でテクスチャの色分布を変化させるようにしてもよい。   In particular, in the present embodiment, when drawing a light effect expression object, for example, a process of mapping a light effect expression texture for expressing a rainbow or the like may be performed. In this case, the texture color distribution (texel pattern) mapped to the light effect expression object may be dynamically changed. In this case, textures having different color distributions may be dynamically generated, or a plurality of textures having different color distributions may be prepared in advance and the texture to be used may be dynamically switched. The texture color distribution may be changed in units of objects, or the texture color distribution may be changed in units of objects.

隠面消去処理としては、描画ピクセルの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値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)のことである。例えば、通常αブレンディングでは、α値を合成の強さとして線形補間を行うことにより2つの色を合成した色を求める処理を行う。   α 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 normal α blending, a process for obtaining a color obtained by combining two colors by performing linear interpolation with the α value as the strength of synthesis is performed.

RQ=(1−α)×R1+α×R2 (1)
GQ=(1−α)×G1+α×G2 (2)
BQ=(1−α)×B1+α×B2 (3)
また合成処理が加算αブレンディングである場合を例にとれば、色合成部126は下式に従ったα合成処理を行う。
RQ = (1−α) × R1 + α × R2 (1)
GQ = (1−α) × G1 + α × G2 (2)
BQ = (1−α) × B1 + α × B2 (3)
Taking the case where the synthesis process is addition α blending as an example, the color synthesis unit 126 performs the α synthesis process according to the following equation.

RQ=R1+α×R2 (4)
GQ=G1+α×G2 (5)
BQ=B1+α×B2 (6)
また合成処理がα乗算である場合を例にとれば、色合成部126は下式に従ったα合成処理を行う。
RQ = R1 + α × R2 (4)
GQ = G1 + α × G2 (5)
BQ = B1 + α × B2 (6)
Taking the case where the composition processing is α multiplication as an example, the color composition unit 126 performs the α composition processing according to the following equation.

RQ=α×R1 (7)
GQ=α×G1 (8)
BQ=α×B1 (9)
また合成処理がα乗加算である場合を例にとれば、色合成部126は下式に従ったα合成処理を行う。
RQ = α × R1 (7)
GQ = α × G1 (8)
BQ = α × B1 (9)
Taking the case where the synthesis process is addition of α power as an example, the color synthesis unit 126 performs the α synthesis process according to the following equation.

RQ=α×R1+R2 (7)
GQ=α×G1+G2 (8)
BQ=α×B1+B2 (9)
ここで、R1、G1、B1は、描画バッファ172に既に描画されている画像(背景画像)の色(輝度)のR、G、B成分であり、R2、G2、B2は、描画バッファ172に描画するオブジェクト(プリミティブ)の色のR、G、B成分である。また、RQ、GQ、BQは、αブレンディングにより得られる画像の色のR、G、B成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。
RQ = α × R1 + R2 (7)
GQ = α × G1 + G2 (8)
BQ = α × B1 + B2 (9)
Here, R1, G1, and B1 are R, G, and B components of the color (luminance) of an image (background image) that has already been drawn in the drawing buffer 172, and R2, G2, and B2 are in the drawing buffer 172. The R, G, and B components of the color of the object (primitive) to be drawn. RQ, GQ, and BQ are R, G, and B components of the color 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.

なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えばRGBの各色成分の輝度を表す色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。   The α value is information that can be stored in association with each pixel (texel, dot), and is, for example, plus alpha information other than color information indicating the luminance of each RGB color component. The α value can be used as mask information, translucency (equivalent to transparency and opacity), bump information, and the like.

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

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

2.虹オブジェクトの設定制御
以下、光効果表現オブジェクトの一例である虹オブジェクトを用いて虹の画像を生成する場合の虹オブジェクトの設定処理について説明する
図2は光線ベクトルに基づき設定される第1の方向ベクトルV1、第2の方向ベクトルV2について説明するための図である。
2. Rainbow Object Setting Control Hereinafter, a rainbow object setting process when a rainbow image is generated using a rainbow object which is an example of a light effect expression object will be described. FIG. 2 shows a first direction set based on a light vector. It is a figure for demonstrating the vector V1 and the 2nd direction vector V2.

同図はオブジェクト空間をX軸方向に見た図(YZ平面)である。   This figure is a view (YZ plane) of the object space viewed in the X-axis direction.

ここで210は平行光源であり、LVは光線ベクトルである。平行光源を用いる場合にはオブジェクト空間内の光線ベクトルLVはどの地点でも同方向となる
230は、オブジェクト空間内に仮想的に想定した仮想投影面である。本実施の形態では、この仮想投影面に虹が写っているか仮定して虹の画像を生成する。虹は視点(仮想カメラの位置)に対して光源と反対側にできるので、仮想投影面230は、視点250に対して仮想投影面と反対側の視点から離れた地点に水平面260に対して垂直に仮想的におかれた面として設定される。
Here, 210 is a parallel light source, and LV is a light vector. When a parallel light source is used, the light vector LV in the object space has the same direction at any point 230 is a virtual projection plane virtually assumed in the object space. In the present embodiment, a rainbow image is generated on the assumption that a rainbow is reflected on the virtual projection plane. Since the rainbow can be opposite to the light source with respect to the viewpoint (the position of the virtual camera), the virtual projection plane 230 is perpendicular to the horizontal plane 260 at a point away from the viewpoint opposite to the virtual projection plane with respect to the viewpoint 250. Is set as a virtually placed surface.

前記光線ベクトルLVの方向に対して所定角度だけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度だけずらして第2の方向ベクトルV2を設定する。   The first direction vector V1 is set by shifting it by a predetermined angle with respect to the direction of the light vector LV, and the second direction vector V2 is set by shifting by a minute angle with respect to the first direction vector V1.

光線ベクトルの方向に対して所定角度θだけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度Δθだけずらして第2の方向ベクトルV2を設定する。   The first direction vector V1 is set by shifting by a predetermined angle θ with respect to the direction of the light vector, and the second direction vector V2 is set by shifting by a minute angle Δθ with respect to the first direction vector V1.

図3は、第1の方向ベクトルV1と第2の方向ベクトルV2に基づき虹オブジェクトの設定を行う手法について説明するための図である。   FIG. 3 is a diagram for explaining a method of setting a rainbow object based on the first direction vector V1 and the second direction vector V2.

視点位置250から光源210とは逆方向に仮想投影面230を設定し、第1の方向ベクトルV1、第2の方向ベクトルV2を視点位置を始点として仮想投影面230にむけてのばし、第1の方向ベクトルV1、第2の方向ベクトルV2の延長線と前記仮想投影面230の交点P1、P2に基づいて虹オブジェクト300の位置と大きさを決定する。   The virtual projection plane 230 is set from the viewpoint position 250 in the opposite direction to the light source 210, and the first direction vector V1 and the second direction vector V2 are extended from the viewpoint position to the virtual projection plane 230, and the first The position and size of the rainbow object 300 are determined based on the extension lines of the direction vector V1 and the second direction vector V2 and the intersection points P1 and P2 of the virtual projection plane 230.

図4は虹オブジェクトの円環オブジェクトの形状設定手法について説明するための図である。   FIG. 4 is a diagram for explaining a method for setting the shape of a ring object of a rainbow object.

視点位置250から光源210とは逆方向に仮想投影面230を設定する。   The virtual projection plane 230 is set in the direction opposite to the light source 210 from the viewpoint position 250.

光線ベクトルLVの方向に対して所定角度だけずらして得られる方向ベクトルVを視点位置から前記仮想投影面にむけてのばし、方向ベクトルVの延長線と前記仮想投影面の交点である第1の交点Pを求める。    A direction vector V obtained by shifting by a predetermined angle with respect to the direction of the light vector LV is extended from the viewpoint position to the virtual projection plane, and a first intersection that is an intersection of the extension line of the direction vector V and the virtual projection plane. Find P.

また光線ベクトルLVを視点位置250から仮想投影面にむけてのばし光線ベクトルの延長線と前記仮想投影面の交点である第2の交点Qを求める。   Further, a second intersection point Q which is an intersection point of the extension line of the ray vector extending from the viewpoint position 250 toward the virtual projection plane and the virtual projection plane is obtained.

交点Qを光効果表現オブジェクトである円環オブジェクトの円の中心として設定するようにしてもよい。   The intersection point Q may be set as the center of a circle of an annular object that is a light effect expression object.

そして第1の交点Pと第2の交点Qに基づき光効果表現オブジェクトである円環オブジェクトの半径rを決定するようにしてもよい。   Then, based on the first intersection P and the second intersection Q, the radius r of the annular object that is the light effect expression object may be determined.

Qを中心として半径rの円を仮想的に設定し、かかる円の円周320にそって虹オブジェクトを設定するようにしてもよい。例えば、円に沿って虹オブジェクトの位置を決定する場合(この場合円の位置と虹オブジェクトの位置が重なるように虹オブジェクトを設定している。虹オブジェクトの最高点と円の最高点が重なるように虹オブジェクトの位置を決定している)や、円の大きさに応じて虹オブジェクトの大きさを決定する場合(例えば虹オブジェクトの円弧の半
径を決定する場合)を含む。
A circle with a radius r centering on Q may be set virtually, and a rainbow object may be set along the circumference 320 of the circle. For example, when determining the position of a rainbow object along a circle (in this case, the rainbow object is set so that the position of the circle and the position of the rainbow object overlap. The highest point of the rainbow object and the highest point of the circle overlap) The position of the rainbow object is determined), and the size of the rainbow object is determined according to the size of the circle (for example, the radius of the arc of the rainbow object is determined).

図5は、光源位置(光源の高さ)と設定される虹オブジェクトの大きさや位置の関係について説明するための図である。   FIG. 5 is a diagram for explaining the relationship between the light source position (light source height) and the size and position of the set rainbow object.

例えば210−1に光源がある場合には、光線ベクトルLV−1に対して第1の方向ベクトルV1−1、第2の方向ベクトルV2−1が設定され、視点位置250を始点として、第1の方向ベクトルV1−1、第2の方向ベクトルV2−1を仮想投影面の方向にのばしたときの仮想投影面との交点P1−1、P2−1によって、虹オブジェクト400−1が設定される。   For example, when there is a light source at 210-1, a first direction vector V1-1 and a second direction vector V2-1 are set for the light vector LV-1, and the first position vector 250-1 is set as the first point. The rainbow object 400-1 is set by intersections P1-1 and P2-1 with the virtual projection plane when the direction vector V1-1 and the second direction vector V2-1 are extended in the direction of the virtual projection plane. The

また例えば210−2に光源がある場合には、光線ベクトルLV−2に対して第1の方向ベクトルV1−2、第2の方向ベクトルV2−2が設定され、視点位置250を始点として、第1の方向ベクトルV1−2、第2の方向ベクトルV2−2を仮想投影面の方向にのばしたときの仮想投影面との交点P1−2、P2−2によって、虹オブジェクト400−2が設定される。   For example, when the light source is 210-2, the first direction vector V1-2 and the second direction vector V2-2 are set with respect to the light vector LV-2, and the viewpoint position 250 is the starting point. The rainbow object 400-2 is set by intersections P1-2 and P2-2 with the virtual projection plane when the one direction vector V1-2 and the second direction vector V2-2 are extended in the direction of the virtual projection plane. Is done.

本実施の形態では、ゲーム時刻の変化に従って光源位置または平行光源の光線ベクトルの向きを変化させるので、光源位置や光線ベクトルの向きを反映して、大きさやかかる位置の異なる虹画像が生成される。   In the present embodiment, the light source position or the direction of the light vector of the parallel light source is changed according to the change of the game time, so that a rainbow image with a different size and such position is generated reflecting the light source position and the direction of the light vector. .

図6は(A)(B)は、本実施の形態の虹オブジェクトの表示範囲の制御について説明するための図である。   FIGS. 6A and 6B are diagrams for explaining the control of the display range of the rainbow object according to the present embodiment.

本実施の形態では仮想投影面上に虹オブジェクトが設定されるが、このとき虹オブジェクトの現れるエリアを設定することができる。仮想投影面は例えば視点座標系においてZ軸と直交するYX平面として設定することができる。   In this embodiment, a rainbow object is set on the virtual projection plane. At this time, an area where the rainbow object appears can be set. The virtual projection plane can be set, for example, as a YX plane orthogonal to the Z axis in the viewpoint coordinate system.

図6(A)は、仮想投影面上のX>aの領域を虹オブジェクトの表示領域として設定した場合である。この場合、仮想投影面の550−1が表示領域、560−1が非表示領域となる。そして虹オブジェクト510のなかで、表示領域に属する部分510−2が表示され、非表領域に属する部分510−1、510−3は表示されない。   FIG. 6A shows a case where an area of X> a on the virtual projection plane is set as the display area of the rainbow object. In this case, 550-1 of the virtual projection plane is a display area, and 560-1 is a non-display area. In the rainbow object 510, the part 510-2 belonging to the display area is displayed, and the parts 510-1 and 510-3 belonging to the non-surface area are not displayed.

図6(B)は、仮想投影面上のX>bかつY>cの領域を虹オブジェクトの表示領域として設定した場合である。この場合、仮想投影面の550−2が表示領域、560−2が非表示領域となる。そして虹オブジェクト510のなかで、表示領域に属する部分510−2’が表示され、非表領域に属する部分510−1’、510−3’は表示されない。   FIG. 6B shows a case where an area of X> b and Y> c on the virtual projection plane is set as the display area of the rainbow object. In this case, the virtual projection plane 550-2 is a display area, and 560-2 is a non-display area. In the rainbow object 510, the part 510-2 'belonging to the display area is displayed, and the parts 510-1' and 510-3 'belonging to the non-surface area are not displayed.

なお表示/非表示領域の設定はランダムに行っても良いし、例えばオブジェクト空間の大気の状態(水蒸気の状態)等に応じて設定するようにしておよい。   The display / non-display area may be set at random, or may be set according to the atmospheric state (water vapor state) of the object space, for example.

表示/非表示の制御は、例えばオブジェクト自体は存在して、オブジェクトの表示領域に属する部分についてのみ表示し、非表示領域に属する部分については表示しないように制御する場合でもよい。この場合、非表示領域の透明度(例えばα値)を高くして透明にすることで表示されないように制御してもよい。   The display / non-display control may be, for example, a case where the object itself exists and only the part belonging to the display area of the object is displayed and the part belonging to the non-display area is not displayed. In this case, it may be controlled so that the non-display area is not displayed by increasing transparency (for example, α value).

また表示領域については虹オブジェクトを切り取るようにしてもよいし、表示領域に対応する部分のみ虹オブジェクトを生成するようにしてもよい。   As for the display area, a rainbow object may be cut out, or a rainbow object may be generated only in a portion corresponding to the display area.

図7は本実施の形態の虹のフェードイン/フェードアウト処理について説明するための図である。   FIG. 7 is a diagram for explaining the rainbow fade-in / fade-out process of the present embodiment.

本実施の形態では、所与のタイミングで所定時間の間、虹オブジェクトを配置する。すなわち虹が出現してから消滅するまでの間(t0〜t3)虹オブジェクトが設定される。   In the present embodiment, the rainbow object is arranged for a predetermined time at a given timing. That is, a rainbow object is set from the time when the rainbow appears until it disappears (t0 to t3).

例えば所与のタイミングt0で虹オブジェクトが出現する場合、配置開始t0から所定期間(t0〜t1の間)の間はフェードイン期間610となりフェードイン処理が行われる。   For example, when a rainbow object appears at a given timing t0, a fade-in process is performed during a predetermined period (between t0 and t1) from the arrangement start t0 during the fade-in period 610.

フェードイン処理とは虹オブジェクトが見えない状態(透明の状態)から徐徐に濃くなって(だんだん透明度が低くなってくる)はっきり見える状態になるように、時間の経過に従って虹オブジェクトの表示状態を変化させる処理である。   The fade-in process changes the display state of the rainbow object over time so that the rainbow object is gradually visible (transparent state) and gradually becomes darker (transparency becomes lower). It is a process to make.

t1の状態で虹オブジェクトははっきり見える状態となり、配置終了前の所定期間(t2〜t3)はフェードアウト期間620となり、フェードアウト処理が行われる。   The rainbow object is clearly visible in the state of t1, and a predetermined period (t2 to t3) before the arrangement ends is a fade-out period 620, and a fade-out process is performed.

フェードアウト処理とは虹オブジェクトがはっきり見える状態から徐徐に薄くなって(だんだん透明度が高くなる)見えない状態(透明度0の状態)になるように、時間の経過に従って虹オブジェクトの表示状態を変化させる処理である。   The fade-out process is a process of changing the display state of the rainbow object over time so that the rainbow object is gradually thinned (increased in transparency) and invisible (transparency is 0). It is.

図8は経過時間とα値の関係について示した図である。   FIG. 8 is a diagram showing the relationship between the elapsed time and the α value.

横軸は虹オブジェクトの出現からの経過時間t、縦軸は虹オブジェクトを加算半透明で描画する場合の透明度情報(α値)である。本実施の形態は虹オブジェクトの出現t0から虹オブジェクトの消滅t3までの所定時間の間、虹オブジェクトの設定を行う。   The horizontal axis represents the elapsed time t from the appearance of the rainbow object, and the vertical axis represents the transparency information (α value) when the rainbow object is drawn with additive semi-transparency. In this embodiment, the rainbow object is set for a predetermined time from the appearance t0 of the rainbow object to the disappearance t3 of the rainbow object.

虹オブジェクトを加算半透明で描画する場合、α値が0の時に虹オブジェクトは透明となり、α値が1の時に虹オブジェクトははっきり見える状態になる。   When a rainbow object is drawn with additive semi-transparency, the rainbow object is transparent when the α value is 0, and the rainbow object is clearly visible when the α value is 1.

虹オブジェクトが出現した時点(t0の時点)で、α値を0にして、その後フェードイン期間610の間α値が徐徐に高くなりt1の時点でα値を1になるように制御する。   When the rainbow object appears (time t0), the α value is set to 0, and thereafter the α value is gradually increased during the fade-in period 610, and the α value is controlled to 1 at the time t1.

そしてt2のあとフェードアウト期間620の間α値が徐徐に低くなりt3の時点でα値を0になるように制御する。   Then, control is performed so that the α value gradually decreases during the fade-out period 620 after t2, and the α value becomes 0 at the time t3.

このようにすると、t0の時点から徐徐に虹オブジェクトが見え始め、t1の時点ではっきり見えるようになり、t3の時点から再び薄くなってt4の時点で虹オブジェクトが見えなくなる様子を画像で表現することができる。   In this way, the rainbow object begins to gradually appear from the time point t0, becomes clearly visible at the time point t1, becomes thin again from the time point t3, and shows that the rainbow object becomes invisible at the time point t4. be able to.

なお虹オブジェクトのα値を変化させ、虹オブジェクトを加算半透明で描画させることにより虹のフェードイン/フェードアウトを実現する場合、例えば基準値または設定値をα、虹オブジェクトの出現からの経過時間tとして、経過時間tに基づき所定の関数f(t)=αに基づき直接αを制御する場合でもよい。   When the rainbow fade-in / fade-out is realized by changing the α value of the rainbow object and rendering the rainbow object semi-transparently, for example, the reference value or set value is α, and the elapsed time t from the appearance of the rainbow object Alternatively, α may be directly controlled based on the predetermined function f (t) = α based on the elapsed time t.

また経過時間tにおけるα値をα’として、経過時間tに基づき所定の関数f’(t)=kでα’=kαとなるkの値を求めるようにしてもよい。   Alternatively, the α value at the elapsed time t may be α ′, and a value of k that satisfies α ′ = kα with a predetermined function f ′ (t) = k may be obtained based on the elapsed time t.

なおα値はオブジェクト単位に設定されていてもよいし、ポリゴンの頂点単位に設定されていてもよいし、画素単位に設定されていてもよい。   The α value may be set for each object, may be set for each vertex of the polygon, or may be set for each pixel.

3.本実施形態の処理
図9は、本実施の形態の虹オブジェクトの画像生成処理の流れを示すフローチャート図である。
3. Processing of this Embodiment FIG. 9 is a flowchart showing a flow of rainbow object image generation processing of this embodiment.

虹オブジェクト表示イベントの発生を検出すると以下の処理を行う(ステップS10)。   When the occurrence of a rainbow object display event is detected, the following processing is performed (step S10).

まず、視点位置に対し光源と反対方向に仮想投影面を設定する(ステップS20)。   First, a virtual projection plane is set in a direction opposite to the light source with respect to the viewpoint position (step S20).

光線ベクトルの方向に対して所定角度だけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度だけずらして第2の方向ベクトルV2を設定し、V1ベクトル、V2ベクトルを視点位置を始点として前記仮想投影面にむけてのばし、V1ベクトル、V2ベクトルの延長線と前記前記仮想投影面の交点P1、P2を取得する(ステップS30)。   The first direction vector V1 is set by shifting it by a predetermined angle with respect to the direction of the light vector, the second direction vector V2 is set by shifting by a slight angle with respect to the first direction vector V1, and the V1 vector and V2 vector are set. To the virtual projection plane starting from the viewpoint position, and the intersections P1 and P2 of the V1 vector and V2 vector extensions and the virtual projection plane are obtained (step S30).

次に光線ベクトルを視点位置から前記仮想投影面にむけてのばし光線ベクトルの延長線と前記仮想投影面の交点を求めて円の中心Oとし、中心Oと交点P1、P2に基づき円の半径を決定し、決定された円に基づき虹オブジェクトの位置と大きさを決定して虹オブジェクトを設定する(ステップS40)。   Next, extending the ray vector from the viewpoint position toward the virtual projection plane, the intersection of the extension line of the ray vector and the virtual projection plane is obtained as the center O of the circle, and the radius of the circle is determined based on the center O and the intersections P1 and P2. The rainbow object is set by determining the position and size of the rainbow object based on the determined circle (step S40).

次に虹オブジェクトの仮想投影面に設定された表示領域以外の部分を透明にするようにα値の制御情報を生成する(ステップS50)。   Next, α value control information is generated so that the portion other than the display area set on the virtual projection plane of the rainbow object is transparent (step S50).

次に虹オブジェクト表示開始からの経過時間tに基づきフェードイン期間内又はフェードアウト期間内か否か判定する(ステップS60)
そしてフェードイン期間内であれば、経過時間tに基づき虹オブジェクトがフェードアウトするようにα値の制御情報を生成する(ステップS70、S80)。
Next, based on the elapsed time t from the start of the rainbow object display, it is determined whether it is within the fade-in period or the fade-out period (step S60).
If it is within the fade-in period, control information for the α value is generated so that the rainbow object fades out based on the elapsed time t (steps S70 and S80).

またフェードアウト期間内であれば、経過時間tに基づき虹オブジェクトがフェードアウトするようにα値の制御情報を生成する(ステップS90、S100)。   If it is within the fade-out period, α value control information is generated so that the rainbow object fades out based on the elapsed time t (steps S90 and S100).

次に設定された虹オブジェクトを透視変換する(ステップS110)。   Next, the set rainbow object is perspective-transformed (step S110).

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

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

描画プロセッサ910は、ポリゴンや曲面などのプリミティブ面で構成されるオブジェクトの描画(レンダリング)処理を実行する。オブジェクトの描画の際には、メインプロセッサ900は、DMAコントローラ970を利用して、描画データを描画プロセッサ910に渡すと共に、必要であればテクスチャ記憶部924にテクスチャを転送する。すると描画プロセッサ910は、描画データやテクスチャに基づいて、Zバッファなどを利用した隠面消去を行いながら、オブジェクトをフレームバッファ922に描画する。また描画プロセッサ910は、αブレンディング(半透明処理)、デプスキューイング、ミップマッピング、フォグ処理、バイリニア・フィルタリング、トライリニア・フィルタリング、アンチエリアシング、シェーディング処理なども行う。1フレーム分の画像がフレームバッファ922に書き込まれるとその画像はディスプレイ912に表示される。   The drawing processor 910 executes drawing (rendering) processing of an object composed of primitive surfaces such as polygons and curved surfaces. When drawing an object, the main processor 900 uses the DMA controller 970 to pass the drawing data to the drawing processor 910 and, if necessary, transfers the texture to the texture storage unit 924. Then, the drawing processor 910 draws the object in the frame buffer 922 while performing hidden surface removal using a Z buffer or the like based on the drawing data and texture. The 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 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転送を制御する。CDドライブ980は、プログラム、画像データ、或いは音データなどが格納されるCD982にアクセスする。通信インターフェース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 CD drive 980 accesses a CD 982 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 (α values / luminance, gradient patterns, polygons, etc.) cited as broad or synonymous terms (texel values, texel value patterns, primitive surfaces, etc.) in the description or drawings are described in the specification or In other descriptions in the drawings, terms can be replaced with terms having a broad meaning or the same meaning.

また、本発明のうち従属請求項に係る発明においては、従属先の請求項の構成要件の一部を省略する構成とすることもできる。また、本発明の1の独立請求項に係る発明の要部を、他の独立請求項に従属させることもできる。   In the invention according to the dependent claims of the present invention, a part of the constituent features of the dependent claims can be omitted. Moreover, the principal part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.

またテクスチャのマッピング処理も、本実施形態で説明したものに限定されず、これらと均等な変換処理も本発明の範囲に含まれる。また本発明は種々のゲームに適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯端末等の種々の画像生成システムに適用できる。   Also, the texture mapping process is not limited to that described in the present embodiment, and a conversion process equivalent to these is also included in the scope of the present invention. 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 a game image, and a portable terminal. it can.

本実施形態の画像生成システムの機能ブロック図。The functional block diagram of the image generation system of this embodiment. 図2は光線ベクトルに基づき設定される第1の方向ベクトルV1、第2の方向ベクトルV2について説明するための図。FIG. 2 is a diagram for explaining the first direction vector V1 and the second direction vector V2 set based on the light vector. 第1の方向ベクトルV1と第2の方向ベクトルV2に基づき虹オブジェクトの設定を行う手法について説明するための図。The figure for demonstrating the method of setting a rainbow object based on the 1st direction vector V1 and the 2nd direction vector V2. 虹オブジェクトの円環オブジェクトの形状設定手法について説明するための図。The figure for demonstrating the shape setting method of the ring object of a rainbow object. 光源位置(光源の高さ)と設定される虹オブジェクトの大きさや位置の関係について説明するための図である。光源位置(光源の高さ)と設定される虹オブジェクトの大きさや位置の関係について説明するための図。It is a figure for demonstrating the relationship between the magnitude | size and position of a rainbow object set with a light source position (light source height). The figure for demonstrating the relationship between the size and position of the rainbow object set with a light source position (light source height). 図6は(A)(B)は、本実施の形態の虹オブジェクトの表示範囲の制御について説明するための図。6A and 6B are diagrams for explaining control of the display range of the rainbow object according to the present embodiment. 本実施の形態の虹オブジェクトのフェードイン/フェードアウト処理について説明するための図。The figure for demonstrating the fade-in / fade-out process of the rainbow object of this Embodiment. 経過時間とα値の関係について示した図である。It is the figure shown about the relationship between elapsed time and (alpha) value. 本実施の形態の虹オブジェクトの画像生成処理の流れを示すフローチャート図。The flowchart figure which shows the flow of the image generation process of the rainbow object of this Embodiment. ハードウェア構成例である。It is a hardware structural example.

符号の説明Explanation of symbols

100 処理部、110 オブジェクト空間設定部、112 移動・動作処理部、114 仮想カメラ制御部、116 虹オブジェクト設定部、118 光源制御部、120 描画部、122 隠面消去部、124 テクスチャマッピング部、126 α合成部、130 音生成部、160 操作部、170 記憶部、172 描画バッファ、174 Zバッファ、176 テクスチャ記憶部、180 情報記憶媒体、190 表示部、192 音出力部、194 携帯型情報記憶装置、196 通信部 100 processing unit, 110 object space setting unit, 112 movement / motion processing unit, 114 virtual camera control unit, 116 rainbow object setting unit, 118 light source control unit, 120 drawing unit, 122 hidden surface removal unit, 124 texture mapping unit, 126 Alpha synthesis unit, 130 sound generation unit, 160 operation unit, 170 storage unit, 172 drawing buffer, 174 Z buffer, 176 texture storage unit, 180 information storage medium, 190 display unit, 192 sound output unit, 194 portable information storage device 196 Communication Department

Claims (10)

オブジェクト空間において仮想カメラから見える画像を生成するためのプログラムであって、
光源位置または光線ベクトルの方向に基づき、光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ変化させる光効果表現オブジェクト設定部と、
光効果表現オブジェクトが配置されたオブジェクト空間を仮想カメラから見た画像を描画する描画部と、
してコンピュータを機能させることを特徴とするプログラム。
A program for generating an image visible from a virtual camera in an object space,
A light effect expression object setting unit that changes at least one of the shape, size, and appearance position of the light effect expression object based on the light source position or the direction of the light vector;
A drawing unit that draws an image of an object space in which a light effect expression object is arranged viewed from a virtual camera;
A program that causes a computer to function.
請求項1において、
ゲーム時刻の変化に従って光源位置または光線ベクトルの方向を変化させる光源制御部を含むことを特徴とするプログラム。
In claim 1,
A program comprising a light source control unit that changes a light source position or a direction of a light vector according to a change in game time.
請求項1乃至2のいずれかにおいて、
前記光効果表現オブジェクト設定部は、
視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、
前記光線ベクトルの方向に対して所定角度だけずらして第1の方向ベクトルV1を設定し、第1の方向ベクトルV1に対し微少角度だけずらして第2の方向ベクトルV2を設定し、第1の方向ベクトルV1、第2の方向ベクトルV2を視点位置を始点として前記仮想投影面にむけてのばし、第1の方向ベクトルV1、第2の方向ベクトルV2の延長線と前記仮想投影面の交点に基づいて光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つを設定することを特徴とするプログラム。
In any one of Claims 1 thru | or 2.
The light effect expression object setting unit includes:
Set a virtual projection plane at a point away from the viewpoint position by a predetermined distance in the direction opposite to the light source,
The first direction vector V1 is set by shifting by a predetermined angle with respect to the direction of the ray vector, the second direction vector V2 is set by shifting by a slight angle with respect to the first direction vector V1, and the first direction The vector V1 and the second direction vector V2 are extended toward the virtual projection plane starting from the viewpoint position, and based on the intersection of the first direction vector V1 and the extension line of the second direction vector V2 and the virtual projection plane. A program that sets at least one of a shape, a size, and an appearance position of a light effect expression object.
請求項1乃至3のいずれかにおいて、
前記光効果表現オブジェクト設定部は、
視点位置から光源とは逆方向に所定の距離だけ離れた地点に仮想投影面を設定し、
前記光線ベクトルの方向に対して所定角度だけずらして得られる方向ベクトルVを視点位置から前記仮想投影面にむけてのばし、方向ベクトルVの延長線と前記仮想投影面の交点である第1の交点と、光線ベクトルを視点位置から前記仮想投影面にむけてのばし光線ベクトルの延長線と前記仮想投影面の交点である第2の交点を求め、第1の交点と第2の交点に基づき光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ設定することを特徴とするプログラム。
In any one of Claims 1 thru | or 3,
The light effect expression object setting unit includes:
Set a virtual projection plane at a point away from the viewpoint position by a predetermined distance in the direction opposite to the light source,
A direction vector V obtained by shifting by a predetermined angle with respect to the direction of the ray vector is extended from the viewpoint position to the virtual projection plane, and a first intersection that is an intersection of the extension line of the direction vector V and the virtual projection plane. And extending a ray vector from the viewpoint position toward the virtual projection plane, obtaining a second intersection that is an intersection of the extension line of the ray vector and the virtual projection plane, and producing a light effect based on the first intersection and the second intersection A program characterized in that at least one of the shape, size, and appearance position of an expression object is set.
請求項1乃至4のいずれかにおいて、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトとして、円環状のオブジェクトを設定することを特徴とするプログラム。
In any one of Claims 1 thru | or 4,
The light effect expression object setting unit includes:
A program characterized by setting an annular object as a light effect expression object.
請求項1乃至5のいずれかにおいて、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトを、所与のタイミングで所定時間配置するように設定することを特徴とするプログラム。
In any one of Claims 1 thru | or 5,
The light effect expression object setting unit includes:
A program characterized in that a light effect expression object is set to be arranged for a predetermined time at a given timing.
請求項6において、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトを、配置開始から所定期間に光効果表現オブジェクトをフェードイン表示させるための設定処理、及び配置終了前の所定期間に光効果表現オブジェクトをフェードアウト表示させるための設定処理の少なくとも1つを行うことを特徴とするプログラム。
In claim 6,
The light effect expression object setting unit includes:
At least one of a setting process for causing the light effect expression object to fade-in and displaying the light effect expression object in a predetermined period from the start of arrangement, and a setting process for causing the light effect expression object to fade out and display in a predetermined period before the arrangement ends. The program characterized by performing.
請求項1乃至7のいずれかにおいて、
前記光効果表現オブジェクト設定部は、
光効果表現オブジェクトの表示範囲を制御するための表示範囲制御情報を設定し、表示範囲制御情報に基づき表示範囲外に当たる部分については光効果表現オブジェクトが表示されないように設定する処理を行うことを特徴とするプログラム。
In any one of Claims 1 thru | or 7,
The light effect expression object setting unit includes:
The display range control information for controlling the display range of the light effect expression object is set, and a process for setting the light effect expression object so that the portion outside the display range is not displayed based on the display range control information is performed. Program.
コンピュータ読み取り可能な情報記憶媒体であって、請求項1乃至8のいずれかのプログラムを記憶することを特徴とする情報記憶媒体。   A computer-readable information storage medium, wherein the program according to any one of claims 1 to 8 is stored. オブジェクト空間において仮想カメラから見える画像を生成する画像生成システムであって、
光源位置または光線ベクトルの方向に基づき、光効果表現オブジェクトの形状、大きさ及び出現位置の少なくとも1つ変化させる光効果表現オブジェクト設定部と、
光効果表現オブジェクトが配置されたオブジェクト空間を仮想カメラから見た画像を描画する描画部と、
含むことを特徴とする画像生成システム。
An image generation system for generating an image visible from a virtual camera in an object space,
A light effect expression object setting unit that changes at least one of the shape, size, and appearance position of the light effect expression object based on the light source position or the direction of the light vector;
A drawing unit that draws an image of an object space in which a light effect expression object is arranged viewed from a virtual camera;
An image generation system comprising:
JP2005364106A 2005-12-16 2005-12-16 Image generation system, program and information storage medium Withdrawn JP2007164736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005364106A JP2007164736A (en) 2005-12-16 2005-12-16 Image generation system, program and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005364106A JP2007164736A (en) 2005-12-16 2005-12-16 Image generation system, program and information storage medium

Publications (1)

Publication Number Publication Date
JP2007164736A true JP2007164736A (en) 2007-06-28

Family

ID=38247524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005364106A Withdrawn JP2007164736A (en) 2005-12-16 2005-12-16 Image generation system, program and information storage medium

Country Status (1)

Country Link
JP (1) JP2007164736A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844662A (en) * 2016-03-14 2016-08-10 西安电子科技大学 Aurora motion direction determining method based on hydrodynamics
KR20190058336A (en) * 2017-11-21 2019-05-29 캐논 가부시끼가이샤 Display controlling apparatus, display controlling method, and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844662A (en) * 2016-03-14 2016-08-10 西安电子科技大学 Aurora motion direction determining method based on hydrodynamics
KR20190058336A (en) * 2017-11-21 2019-05-29 캐논 가부시끼가이샤 Display controlling apparatus, display controlling method, and storage medium
KR102488930B1 (en) * 2017-11-21 2023-01-16 캐논 가부시끼가이샤 Display controlling apparatus, display controlling method, and storage medium

Similar Documents

Publication Publication Date Title
JP4804122B2 (en) Program, texture data structure, information storage medium, and image generation system
JP2007026112A (en) Program, information storage medium and image generation system
JP4305903B2 (en) Image generation system, program, and information storage medium
JP4651527B2 (en) Program, information storage medium, and image generation system
JP2001070633A (en) Image forming system and information recording medium
JP2006285511A (en) Program, information storage medium and image generation system
JP2006323512A (en) Image generation system, program, and information storage medium
JP4754384B2 (en) Program, information recording medium, and image generation system
JP4743770B2 (en) Image generation system, program, and information storage medium
JP4528008B2 (en) Program, information storage medium, and image generation system
JP4721476B2 (en) Image generation system and information storage medium
JP4913399B2 (en) Program, information storage medium, and image generation system
JP4488346B2 (en) Program, information storage medium, and image generation system
JP2004341570A (en) Image generation system, program and information storage medium
JP2005209217A (en) Game system and information storage medium
JP2007164736A (en) Image generation system, program and information storage medium
JP4574058B2 (en) Image generation system, program, and information storage medium
JP4592087B2 (en) Image generation system, program, and information storage medium
JP4394211B2 (en) Image generation system and information storage medium
JP2007164728A (en) Image generation system and program and information storage medium
JP2002092640A (en) Game system and information storage medium
JP2005275795A (en) Program, information storage medium and image generation system
JP4476040B2 (en) Program, information storage medium, and image generation system
JP2010033295A (en) Image generation system, program and information storage medium
JP2008077406A (en) Image generation system, program, and information storage medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090303