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

Image generation system, program and information storage medium

Info

Publication number
JP2003109035A
JP2003109035A JP2001303046A JP2001303046A JP2003109035A JP 2003109035 A JP2003109035 A JP 2003109035A JP 2001303046 A JP2001303046 A JP 2001303046A JP 2001303046 A JP2001303046 A JP 2001303046A JP 2003109035 A JP2003109035 A JP 2003109035A
Authority
JP
Japan
Prior art keywords
light source
shadow
object space
given
primitive surface
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
JP2001303046A
Other languages
Japanese (ja)
Inventor
Yasuo Oba
康雄 大場
Naohiro Saito
直宏 斉藤
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.)
Namco Ltd
Original Assignee
Namco Ltd
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 Ltd filed Critical Namco Ltd
Priority to JP2001303046A priority Critical patent/JP2003109035A/en
Publication of JP2003109035A publication Critical patent/JP2003109035A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image generation system capable of generating an image to which a real shadow is projected with little processing addition without performing complicated management of objects which makes a shadow and onto which the shadow is made, a program and an information storage medium. SOLUTION: This system generates an image. The system performs processing that calculates depth data of an object space seen from a light source in a pixel unit shadow image generation processing that uses the depth data of the object space seen from the light source to specify a shadow area made by the object space on a given primitive surface constituting the object space and generates a shadow image corresponding to the given primitive surface on the basis of the shadow area, and processing that maps the shadow image onto a corresponding primitive surface and generates an image in the object space seen from a given viewpoint.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、画像生成システ
ム、画像生成方法、プログラム及び情報記憶媒体に関す
る。
TECHNICAL FIELD The present invention relates to an image generation system, an image generation method, a program, and an information storage medium.

【0002】[0002]

【背景技術及び発明が解決しようとする課題】従来より
影を表現する手法として、影を作り出すオブジェクトを
光源方向からみた形状をレンダリングして影テクスチャ
を生成し、影の影響を受けるオブジェクトに影テクスチ
ャをマッピングするシャドウマップという手法がある。
2. Description of the Related Art Conventionally, as a method for expressing a shadow, a shadow texture is generated by rendering a shape of an object that produces a shadow as viewed from the light source direction, and a shadow texture is applied to an object affected by the shadow. There is a method called shadow map for mapping.

【0003】図22はシャドウマップを行う際に生成す
る影テクスチャについて説明するための図である。シャ
ドウマップを行う際には、同図に示すように、椅子オブ
ジェクト810を光線ベクトル820の方向に投影して
影テクスチャ領域840に椅子オブジェクトの影テクス
チャ830を生成する。
FIG. 22 is a diagram for explaining a shadow texture generated when performing a shadow map. When performing the shadow map, as shown in the figure, the chair object 810 is projected in the direction of the ray vector 820 to generate the shadow texture 830 of the chair object in the shadow texture region 840.

【0004】図23はシャドウマップの手法により椅子
オブジェクトの影を床壁オブジェクトにつける場合につ
いて説明するための図である。
FIG. 23 is a diagram for explaining a case where a shadow of a chair object is added to a floor wall object by the shadow map method.

【0005】810は椅子オブジェクトであり、850
は床壁オブジェクトである。また830は椅子オブジェ
クト810を光線ベクトル820の方向に投影して生成
した影テクスチャである。
Reference numeral 810 is a chair object, and 850
Is a floor wall object. Reference numeral 830 is a shadow texture generated by projecting the chair object 810 in the direction of the ray vector 820.

【0006】同図に示すように影テクスチャ830を床
壁オブジェクト850にマッピングすることにより、椅
子オブジェクトの影がマッピングされた床壁オブジェク
ト850’の画像を生成することができる。
By mapping the shadow texture 830 onto the floor wall object 850 as shown in the figure, an image of the floor wall object 850 'onto which the shadow of the chair object is mapped can be generated.

【0007】このようにあるオブジェクトの影が他のオ
ブジェクトに映っている画像を生成する場合にはシャド
ウマップは有効な方法であった。
The shadow map is an effective method for generating an image in which the shadow of one object is reflected in another object.

【0008】しかしかかるシャドウマップの手法では、
影を落とす側と落とされる側のオブジェクトの管理が必
要であったため、処理が煩雑になるという問題点があっ
た。
However, in such a shadow map method,
Since it is necessary to manage the objects on the side where the shadow is cast and the side where the shadow is cast, there is a problem that the processing becomes complicated.

【0009】またあるオブジェクトの影が自分自身に落
ちている場合の画像をシャドウマップの手法を用いて生
成しようとすると以下のような不都合が生じてしまう。
図24はシャドウマップの手法を用いてあるオブジェク
トの影を自分自身につける場合の様子を示した図であ
る。810’はシャドウマップの手法を用いて生成した
椅子オブジェクトの影テクスチャ830を椅子オブジェ
クト810にマッピングした場合の画像である。
Further, if an image of a shadow of a certain object falling on itself is to be generated using the shadow map method, the following inconvenience occurs.
FIG. 24 is a diagram showing a state in which a shadow of an object is added to oneself using the shadow map method. Reference numeral 810 ′ is an image when the chair object shadow texture 830 generated by using the shadow map method is mapped to the chair object 810.

【0010】このようにシャドウマップの手法では、影
を作り出すオブジェクト自身に影の投影を行うと、その
オブジェクト全てに影が落ちてしまうため、影を自己投
影させた画像をリアルタイムに生成することが困難であ
った。そのため自分自身によって光がさえぎられて自分
自身に影ができるような表現ができず、リアリティを欠
いた画像になってしまっていた。
As described above, in the shadow map method, when a shadow is projected on an object that produces a shadow, the shadow is cast on all the objects. Therefore, an image in which the shadow is self-projected can be generated in real time. It was difficult. As a result, I couldn't express myself as if the light was blocked by myself and a shadow was cast on myself, resulting in an image that lacked reality.

【0011】本発明は、以上のような課題に鑑みてなさ
れたものであり、その目的とするところは、影を落とす
側と落とされる側のオブジェクトの煩雑な管理を行うこ
となしに少ない処理付加でリアルな影が投影された画像
を生成可能な画像生成システム、画像生成方法、プログ
ラム及び情報記憶媒体を提供することである。
The present invention has been made in view of the above problems, and an object of the present invention is to add a small amount of processing without performing complicated management of objects on the shadow casting side and the shadow side. An image generation system, an image generation method, a program, and an information storage medium capable of generating an image on which a realistic shadow is projected.

【0012】また本発明の他の目的は、リアルな影が自
己投影された画像を生成可能な画像生成システム、画像
生成方法、プログラム及び情報記憶媒体を提供すること
である。
Another object of the present invention is to provide an image generating system, an image generating method, a program and an information storage medium capable of generating an image in which a realistic shadow is self-projected.

【0013】[0013]

【課題を解決するための手段】(1)本発明は、画像生
成を行うシステムであって、光源からみたオブジェクト
空間のデプスデータをピクセル単位に求める手段と、オ
ブジェクト空間を構成する所与のプリミティブ面にオブ
ジェクト空間によって落とされる影エリアを、光源から
みたオブジェクト空間のデプスデータを用いて特定し、
当該影エリアに基づいて所与のプリミティブ面に対応し
た影画像を生成する影画像生成処理手段と、前記影画像
を対応するプリミティブ面にマッピングして、所与の視
点からみたオブジェクト空間の画像を生成する処理を行
う手段と、を含むことを特徴とする。
(1) The present invention is a system for generating an image, and means for obtaining depth data of an object space viewed from a light source on a pixel-by-pixel basis and a given primitive forming the object space. The shadow area cast by the object space on the surface is specified using the depth data of the object space viewed from the light source,
Shadow image generation processing means for generating a shadow image corresponding to a given primitive surface based on the shadow area, and mapping the shadow image to the corresponding primitive surface to generate an image of the object space viewed from a given viewpoint. And means for performing a process of generating.

【0014】また本発明にかかるプログラムは、コンピ
ュータにより使用可能なプログラム(情報記憶媒体又は
搬送波に具現化されるプログラム)であって、上記手段
をコンピュータに実現させることを特徴とする。また本
発明にかかる情報記憶媒体は、コンピュータにより使用
可能な情報記憶媒体、上記手段をコンピュータに実現さ
せるためのプログラムを含むことを特徴とする。
A program according to the present invention is a program that can be used by a computer (a program embodied in an information storage medium or a carrier wave), and is characterized by causing the computer to implement the above means. An information storage medium according to the present invention is characterized by including an information storage medium usable by a computer and a program for causing the computer to realize the above means.

【0015】また本発明にかかる画像生成方法は、上記
手段をコンピュータに実現させるステップを含むことを
特徴とする。
An image generating method according to the present invention is characterized by including a step of causing a computer to implement the above means.

【0016】光源からみたオブジェクト空間のデプスデ
ータとは、光源からオブジェクト空間をみたシーンのデ
プスデータであり、光源からみて透視または投影変換し
たオブジェクト空間の奥行き情報(例えばZ値)であ
る。例えば光源が平行光源である場合には投影変換を行
った場合のデプスデータであり、例えば光源が点光源ま
たはスポット光源である場合には、光源を視点として透
視変換を行った場合のデプスデータである。
The depth data of the object space viewed from the light source is the depth data of the scene viewed from the light source to the object space, and is the depth information (for example, Z value) of the object space viewed or projected from the light source. For example, when the light source is a parallel light source, it is the depth data when projection conversion is performed.For example, when the light source is a point light source or spot light source, it is the depth data when perspective conversion is performed with the light source as the viewpoint. is there.

【0017】光源からみたオブジェクト空間のデプスデ
ータは、例えばオブジェクト空間の光源からみた状態を
描画することで得ることができる。
The depth data of the object space viewed from the light source can be obtained, for example, by drawing the state viewed from the light source of the object space.

【0018】影エリアの特定は、例えばデプスデータと
プリミティブ面の構成点に基づいてデプステスト(例え
ばZテスト)の所与の判定法を用いて行うようにしても
よい。
The shadow area may be specified by using a given determination method of a depth test (for example, Z test) based on the depth data and the constituent points of the primitive surface.

【0019】前記所与のプリミティブ面は例えばポリゴ
ンで構成されている場合でもよいし、自由曲面等で構成
されている場合でもよい。
The given primitive surface may be formed of, for example, a polygon or a free-form surface.

【0020】本発明によれば、オブジェクト空間を構成
する各プリミティブについてオブジェクト空間によって
落とされる影エリアを、光源からみたオブジェクト空間
のデプスデータを用いて特定し、当該影エリアに基づい
て各プリミティブ面に対応した影画像を生成することが
できる。
According to the present invention, the shadow area dropped by the object space for each primitive forming the object space is specified by using the depth data of the object space viewed from the light source, and each primitive surface is identified based on the shadow area. A corresponding shadow image can be generated.

【0021】従って、本発明によれば影を落とす側と落
とされる側のオブジェクトの煩雑な管理を行う必要がな
く、影画像生成処理の管理付加や処理付加を大幅に軽減
することができる。
Therefore, according to the present invention, it is not necessary to perform complicated management of the object on the side where the shadow is cast and the object on the side where the shadow is cast, and management addition and processing addition of the shadow image generation processing can be greatly reduced.

【0022】また本発明によればオブジェクト空間全体
がオブジェクト空間を構成する各プリミティブ面に落と
す影を生成することができるので、特別な処理を行わな
くても各オブジェクトについて当該オブジェクトが及ぼ
す影である自己投影を自動的に実現することができる。
Further, according to the present invention, it is possible to generate a shadow cast on each of the primitive surfaces forming the object space, so that the shadow of each object is given by each object without any special processing. Self-projection can be realized automatically.

【0023】(2)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、影画像生成処理手
段が、光源からみた所与のプリミティブ面に関連して与
えられるデプス値と光源からオブジェクト空間をみたシ
ーンのデプス値を比較して、光源からみた所与のプリミ
ティブ面の描画領域のなかで、オブジェクト空間に存在
するオブジェクトによって光源からの光が遮られる領域
を判定して、前記所与のプリミティブ面にオブジェクト
空間によって落とされる影エリアを特定する処理を行う
ことを特徴とする。
(2) Further, in the image generation system, program and information storage medium according to the present invention, the shadow image generation processing means gives a depth value given in relation to a given primitive surface viewed from the light source and an object space from the light source. The scene depth values are compared to determine the area within the drawing area of the given primitive surface viewed from the light source where the light from the light source is blocked by the object existing in the object space, and the given area is determined. It is characterized by performing a process of identifying a shadow area cast on the primitive surface by the object space.

【0024】(3)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、光源からみたオブ
ジェクト空間のデプスデータとは、オブジェクト空間を
光源からみて透視または投影変換したシーンのデプスデ
ータであり、光源からみて透視変換または投影変換した
後の所与のプリミティブ面の構成点のデプス値と光源か
らみたオブジェクト空間のデプスデータに基づいて所与
の判定法を用いたデプステストを行い所与のプリミティ
ブ面に対応した影画像を生成することを特徴とする。
(3) Further, in the image generation system, program and information storage medium according to the present invention, the depth data of the object space viewed from the light source is the depth data of the scene obtained by perspective or projection conversion of the object space viewed from the light source. , Given a depth test using a given decision method based on the depth values of the constituent points of a given primitive surface after perspective transformation or projection transformation seen from the light source and the depth data of the object space seen from the light source. The feature is that a shadow image corresponding to the primitive surface is generated.

【0025】ここにおいて行うデプステストは、光源か
ら透視または投影変換したプリミティブ面の描画領域の
なかで他のオブジェクトによって光源からの光が遮られ
る領域(オブジェクト空間に存在するオブジェクトの影
になる領域)を判定できるものである。すなわち光源か
らみたシーンに対してより奥に位置する部分を描画でき
るデプステストであることが好ましい。
The depth test performed here is an area (a shadow area of an object existing in the object space) in which the light from the light source is blocked by another object in the drawing area of the primitive surface perspectively or projected from the light source. Can be determined. That is, it is preferable that the depth test is capable of drawing a portion located deeper in the scene viewed from the light source.

【0026】投影変換とは、例えば光源から平行投影し
た場合、平行光源の場合に光線方向に投影変換した場合
である。
The projection conversion is, for example, a case of parallel projection from a light source, or a case of projection conversion in the light ray direction in the case of a parallel light source.

【0027】ここにおいてデプス値とは、例えば奥行き
情報やZ値である。
Here, the depth value is, for example, depth information or Z value.

【0028】例えば光源からみたオブジェクト空間のデ
プスデータが、オブジェクト空間を光源からみて透視変
換したシーンのデプスデータである場合には、光源から
みて透視変換した後の所与のプリミティブ面の頂点のデ
プス値と光源からみてオブジェクト空間のデプスデータ
に基づいて所与の判定法を用いたデプステストを行い所
与のプリミティブ面に対応した影画像を生成する。
For example, when the depth data of the object space viewed from the light source is the depth data of the scene perspective-transformed from the light source, the depth of the vertex of a given primitive surface after the perspective conversion viewed from the light source. A depth test using a given judgment method is performed based on the depth data in the object space in terms of the value and the light source, and a shadow image corresponding to a given primitive surface is generated.

【0029】また光源からみたオブジェクト空間のデプ
スデータが、オブジェクト空間を光源からみて投影変換
したシーンのデプスデータである場合には、光源からみ
て投影変換した後の所与のプリミティブ面の頂点のデプ
ス値と光源からみてオブジェクト空間のデプスデータに
基づいて所与の判定法を用いたデプステストを行い所与
のプリミティブ面に対応した影画像を生成する。
When the depth data of the object space viewed from the light source is the depth data of the scene obtained by projecting and converting the object space from the light source, the depth of the vertex of a given primitive surface after the projection conversion from the light source. A depth test using a given judgment method is performed based on the depth data in the object space in terms of the value and the light source, and a shadow image corresponding to a given primitive surface is generated.

【0030】(4)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、光源からみて透視
変換または投影変換した後の所与のプリミティブ面の構
成点の座標に基づき、前記影画像を対応するプリミティ
ブ面にマッピングする際のテクスチャコーディネート座
標を決定してマッピング処理を行うことを特徴とする。
(4) The image generation system, program and information storage medium according to the present invention generate the shadow image based on the coordinates of the constituent points of a given primitive surface after perspective transformation or projection transformation as seen from the light source. A feature of the present invention is that the texture coordinate coordinates when mapping to the corresponding primitive surface are determined and the mapping processing is performed.

【0031】ここにおいて所与のプリミティブ面がポリ
ゴンで構成されている場合には、光源からみて透視変換
または投影変換した後のポリゴンの頂点の座標に基づ
き、前記影画像を対応するポリゴンにマッピングする際
のテクスチャコーディネート座標を決定してマッピング
処理を行う。
When a given primitive surface is composed of polygons, the shadow image is mapped to the corresponding polygon based on the coordinates of the vertices of the polygon after perspective transformation or projection transformation as seen from the light source. The texture coordinate coordinates at that time are determined and mapping processing is performed.

【0032】デプステストを行う際に、所与のプリミテ
ィブ面の構成点について光源からみて透視変換または投
影変換した後の座標を得ることができる。従って当該座
標をUV座標やST座標等のテクスチャコーディネート
座標として用いることにより、効率よく処理を行うこと
ができる。
When performing the depth test, it is possible to obtain the coordinates after perspective transformation or projection transformation of the constituent points of a given primitive surface as seen from the light source. Therefore, the processing can be efficiently performed by using the coordinates as texture coordinate coordinates such as UV coordinates and ST coordinates.

【0033】(5)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、影画像生成処理手
段が、透視変換または投影変換した後の所与のプリミテ
ィブ面の構成点のデプス値を反転させる処理を行う手段
と、光源からみたオブジェクト空間のデプスデータを保
持するZバッファを反転させるZバッファ反転処理手段
と、構成点のデプス値が反転された所与のプリミティブ
面について、前記Zバッファ反転処理が施されたZバッ
ファを用いて、デプステストの所定の判定法を用いて描
画処理を行う手段とを含むことを特徴とする。
(5) In the image generation system, program and information storage medium according to the present invention, the shadow image generation processing means inverts the depth value of the constituent point of a given primitive surface after perspective transformation or projection transformation. Means for performing the processing, Z buffer inversion processing means for inverting the Z buffer holding the depth data of the object space viewed from the light source, and Z buffer inversion for a given primitive surface in which the depth values of constituent points are inverted. Means for performing a drawing process using a predetermined determination method of the depth test, using the processed Z buffer.

【0034】ここにおいてZバッファとはピクセル単位
のZ値、奥行き値、デプス値等の視点からの前後関係に
関する値を保持するバッファのことであり、たとえばデ
プスバッファ等の名称で呼ばれるバッファでもよい。
Here, the Z buffer is a buffer that holds values relating to the context from the viewpoint such as Z value, depth value, depth value, etc. in pixel units, and may be a buffer called by the name of depth buffer, for example.

【0035】またデプス値は、光源からみて透視変換ま
たは投影変換した後の光源からの前後関係に関する値を
表すもので、Z値やデプス値と呼ばれるものでもよい。
The depth value represents a value relating to the context of the light source after perspective conversion or projection conversion as viewed from the light source, and may be called Z value or depth value.

【0036】ここにおいて反転とは現在のデプス値の大
小関係を逆転させる処理であり、たとえばビット反転等
でもよいし、他の手法によりデプス値の大小関係を逆転
させる場合でもよい。
Here, the inversion is a process of reversing the magnitude relation of the current depth value, and may be, for example, bit inversion or the like, and may be the case of reversing the magnitude relation of the depth value by another method.

【0037】デプステストとは描画するピクセルの判定
方法であり、新たにプリミティブを描画しようとする場
合に、Zバッファを使って前に描画したプリミティブと
今から描画するプリミティブのデプス値ピクセル毎に比
較することであり、例えばZテストとよばれるものでも
よい。
The depth test is a method for determining a pixel to be drawn. When a new primitive is to be drawn, the depth value of the primitive drawn using the Z buffer and the depth value of the primitive drawn now are compared for each pixel. What is called a Z test, for example.

【0038】デプステストの所定の判定法とは、前に描
画したプリミティブと今から描画するプリミティブのデ
プス値の大小関係に関する判定法であり、例えばGRE
ATER判定やLESS判定やGREATEREQUA
L判定やLESSEQUAL判定と呼ばれているもので
あるが、名称はこれに限られない。
The predetermined determination method of the depth test is a determination method regarding the magnitude relationship between the depth value of the primitive drawn before and the depth value of the primitive drawn now, for example GRE.
ATER judgment, LESS judgment and GREAT REQUA
It is called L determination or LESEQUUAL determination, but the name is not limited to this.

【0039】例えばZバッファのデプス値をA、これか
ら描画するプリミティブのデプス値をBとすると、GR
EATER判定とはこれから描画するプリミティブのデ
プス値(A)がZバッファのデプス値(B)より大きい
場合描画する判定法(A>Bの時描画成功)であり、G
REATEREQUAL判定とはこれから描画するプリ
ミティブのデプス値(A)がZバッファのデプス値
(B)より大きい場合または同じ場合に描画する判定法
(A≧Bの時描画成功)であり、LESS判定とはこれ
から描画するプリミティブのデプス値(A)がZバッフ
ァのデプス値(B)より小さい場合描画する判定法(A
<Bの時描画成功)であり、LESSEQUAL判定と
はこれから描画するプリミティブのデプス値(A)がZ
バッファのデプス値(B)より小さい場合または同じ場
合に描画する判定法(A≦Bの時描画成功)である。こ
こにおいてデプス値A、Bは例えば奥行き方向に離れる
にしたがって値が小さくなる場合でもよいし、奥行き方
向に離れるにしたがって値が大きくなる場合でもよい。
For example, if the depth value of the Z buffer is A and the depth value of the primitive to be drawn is B, GR
The EATER judgment is a judgment method (drawing is successful when A> B) when the depth value (A) of the primitive to be drawn is larger than the depth value (B) of the Z buffer.
The REATEREQUAL judgment is a judgment method (drawing is successful when A ≧ B) when the depth value (A) of the primitive to be drawn is greater than or equal to the depth value (B) of the Z buffer, and the LESS judgment is If the depth value (A) of the primitive to be drawn is smaller than the depth value (B) of the Z buffer, the determination method (A
<Drawing succeeds when B), and the LESSEQUAL judgment is that the depth value (A) of the primitive to be drawn is Z
This is a determination method of drawing when the depth value of the buffer is smaller than or equal to the depth value (B) (drawing success when A ≦ B). Here, the depth values A and B may be smaller in the depth direction or may be larger in the depth direction.

【0040】本発明によれば、頂点のデプス値を反転さ
せた透視変換または投影変換した後の所与のプリミティ
ブと前記Zバッファ反転処理が施されたZバッファを用
いて描画処理が行われる。
According to the present invention, drawing processing is performed using a given primitive after perspective transformation or projection transformation in which the depth value of the vertex is inverted and the Z buffer subjected to the Z buffer inversion processing.

【0041】このときGREATER判定によるデプス
テストを行って描画処理を行うと、頂点のZ値が反転さ
れていない(通常の)透視変換または投影変換した後の
所与のプリミティブと前記Zバッファ反転処理が施され
ていない(通常の)Zバッファを用いてLESS判定に
よるデプステストを行って描画処理を行う場合と同様の
結果をえることができる。
At this time, when the depth test based on the GREETER determination is performed and the drawing process is performed, the Z value of the vertex is not inverted (normal) The given primitive after the perspective transformation or the projection transformation and the Z buffer inversion processing are performed. It is possible to obtain the same result as when the drawing process is performed by performing the depth test by the LESS determination using the (normal) Z buffer which is not processed.

【0042】従って、たとえばGREATER判定のみ
でLESS判定ができないハードウエアを用いて画像生
成を行う場合でも、本発明の手法を用いることによりL
ESS判定によるデプステストを擬似的に行うことがで
きる。
Therefore, for example, even when the image is generated by using the hardware which cannot make the LESS judgment only by the GREETER judgment, by using the method of the present invention, the L
The depth test based on the ESS judgment can be simulated.

【0043】なお最近のハードウエアは、透視変換後の
プリミティブ面を描画する際にプリミティブ面の頂点間
のピクセルのZ値を自動的に補間する機能を有している
場合が多い。このようなハードウエアを用いる場合に
は、反転させた頂点のデプス値を用いて補間が行われる
ため、頂点間の補間されたピクセルのデプス値も反転さ
れた値となる。従って、プリミティブ面の構成点のみを
反転させてGREATER判定を行うことにより、プリ
ミティブ面の各画素について自動的に補間されLESS
判定と同様の結果をえることが可能となる。
Note that recent hardware often has a function of automatically interpolating the Z value of pixels between the vertices of the primitive surface when drawing the primitive surface after perspective transformation. When such hardware is used, since the interpolation is performed using the depth values of the inverted vertices, the depth values of the interpolated pixels between the vertices are also inverted values. Therefore, by inverting only the constituent points of the primitive surface and performing the GREATER determination, the LESS is automatically interpolated for each pixel of the primitive surface.
It is possible to obtain the same result as the judgment.

【0044】従って本発明によれば、GREATER判
定のみでLESS判定ができないハードウエアを用いて
画像生成を行う場合でも、ハードの提供するデプステス
トの機能を利用して影エリアを特定することができる。
Therefore, according to the present invention, the shadow area can be specified by utilizing the depth test function provided by the hardware even when the image is generated by using the hardware which cannot perform the LESS judgment only by the GREATER judgment. .

【0045】(6)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、所与のプリミティ
ブ面がポリゴンとして構成されている場合に、所与の拡
大処理を施して拡大したポリゴンを用いて所与のプリミ
ティブ面に対応した影画像を生成する処理を行うことを
特徴とする。
(6) The image generation system, program, and information storage medium according to the present invention use a polygon enlarged by a given enlargement process when a given primitive surface is formed as a polygon. And performing a process of generating a shadow image corresponding to a given primitive surface.

【0046】本発明によれば本来より拡大させたポリゴ
ンを用いて影画像を生成することができるので、各ポリ
ゴンに付いて通常よりも大きい影画像を生成することが
できる。従って各ポリゴンについて通常よりも大きい影
画像を用いてマッピングを行うため、本来生じるポリゴ
ン間の隙間を埋めることが可能である。
According to the present invention, since a shadow image can be generated by using a polygon which is originally enlarged, a shadow image larger than usual can be generated for each polygon. Therefore, since mapping is performed using a shadow image larger than usual for each polygon, it is possible to fill the gap between polygons that originally occurs.

【0047】このため本発明によればある種のハードが
ポリゴンの右辺と下辺を描画しない性質を持っているこ
とで、影画像において右辺、下辺の描画されなかった部
分が隙間として現れる不具合を解消することができる。
Therefore, according to the present invention, a certain hardware has the property of not drawing the right side and the lower side of a polygon, thereby eliminating the problem that the undrawn parts of the right side and the lower side of a shadow image appear as gaps. can do.

【0048】(7)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、前記ポリゴンの頂
点を当該ポリゴンの重心から所与のスケールで拡大した
点にずらすことでポリゴンを拡大させることを特徴とす
る。
(7) Further, the image generation system, program and information storage medium according to the present invention enlarge the polygon by shifting the apex of the polygon from the centroid of the polygon to a point enlarged by a given scale. Characterize.

【0049】(8)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、所与のプリミティ
ブ面がポリゴンとして構成されている場合に、ポリゴン
の向きと光源の光線の向きによって、影画像生成処理の
対象となるプリミティブ面を判定し、処理対象となるプ
リミティブ面についてのみ影画像生成処理を行うことを
特徴とする。
(8) Further, in the image generating system, program and information storage medium according to the present invention, when a given primitive surface is configured as a polygon, a shadow image is formed depending on the direction of the polygon and the direction of the light beam of the light source. The feature is that a primitive surface that is a target of generation processing is determined, and a shadow image generation processing is performed only for the primitive surface that is a processing target.

【0050】ポリゴンの向きは例えば法線ベクトルの向
きにより特定することができる。また光線の向きは平行
光源の場合には光線の向きであり、点光源またはスポッ
ト光源の場合には光源とポリゴンを結ぶ向きでもよい。
The direction of the polygon can be specified by the direction of the normal vector, for example. The direction of the light ray is the direction of the light ray in the case of the parallel light source, and may be the direction connecting the light source and the polygon in the case of the point light source or the spot light source.

【0051】本発明によればポリゴンの向きと光源の光
線の向きによって、所与のポリゴンが、完全に影になる
ポリゴンか否かを判別することができる。
According to the present invention, it is possible to determine whether or not a given polygon is a polygon that completely shades, based on the direction of the polygon and the direction of the light beam of the light source.

【0052】例えば光源の光線の向きとポリゴンの法線
の向きが同じ方向を指した場合、このポリゴンは影であ
ると判断する。
For example, if the direction of the light ray of the light source and the direction of the normal of the polygon point in the same direction, it is determined that this polygon is a shadow.

【0053】また、光源の光線の向きとポリゴンの法線
の向きが逆方向を指した場合、このポリゴンは影でない
と判断する。但しこのような状態にオブジェクト空間を
構成するオブジェクトの影が発生する為、この場合には
影画像生成処理を行う。
When the direction of the light ray of the light source and the direction of the normal of the polygon point in opposite directions, it is determined that this polygon is not a shadow. However, since a shadow of an object forming the object space is generated in such a state, a shadow image generation process is performed in this case.

【0054】このような処理を行うことにより処理対象
となるポリゴンを絞り込むことができるので処理付加を
軽減し、画像のノイズを減少させることできる。
By performing such processing, the polygons to be processed can be narrowed down, so that the processing load can be reduced and the noise in the image can be reduced.

【0055】(9)また本発明に係る画像生成システ
ム、プログラム及び情報記憶媒体は、オブジェクト空間
を構成するオブジェクトが所与のバウンディングボック
スに収まるように構成することを特徴とする。
(9) Further, the image generation system, program and information storage medium according to the present invention are characterized in that the objects forming the object space are contained in a given bounding box.

【0056】このようにすると光源からみたオブジェク
ト空間のデプスデータを予定のバッファサイズ内に描画
し収めることができる。
By doing so, the depth data of the object space viewed from the light source can be drawn and accommodated within the predetermined buffer size.

【0057】[0057]

【発明の実施の形態】以下、本発明の好適な実施形態に
ついて図面を用いて説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Preferred embodiments of the present invention will be described below with reference to the drawings.

【0058】1.構成 図1に、本実施形態のブロック図の一例を示す。なお同
図において本実施形態は、少なくとも処理部100を含
めばよく、それ以外のブロックについては、任意の構成
要素とすることができる。
1. Configuration FIG. 1 shows an example of a block diagram of this embodiment. It should be noted that in the figure, this embodiment only needs to include at least the processing unit 100, and the other blocks can be arbitrary constituent elements.

【0059】ここで処理部100は、システム全体の制
御、システム内の各ブロックへの命令の指示、ゲーム処
理、画像処理、音処理などの各種の処理を行うものであ
り、その機能は、各種プロセッサ(CPU、DSP
等)、或いはASIC(ゲートアレイ等)などのハード
ウェアや、所与のプログラム(ゲームプログラム)によ
り実現できる。
Here, the processing section 100 performs various kinds of processing such as control of the entire system, instruction of instructions to each block in the system, game processing, image processing, sound processing, etc., and its functions are various. Processor (CPU, DSP
Etc.) or hardware such as ASIC (gate array etc.) or a given program (game program).

【0060】操作部160は、プレーヤが操作データを
入力するためのものであり、その機能は、レバー、ボタ
ン、筺体などのハードウェアにより実現できる。
The operation section 160 is for the player to input operation data, and its function can be realized by hardware such as a lever, a button, and a housing.

【0061】記憶部170は、処理部100や通信部1
96などのワーク領域となるもので、メインメモリ17
2、フレームバッファ174(第1のフレームバッフ
ァ、第2のフレームバッファ)として機能し、RAMな
どのハードウェアにより実現できる。
The storage unit 170 includes the processing unit 100 and the communication unit 1.
It is a work area such as 96, and the main memory 17
2. It functions as the frame buffer 174 (first frame buffer, second frame buffer) and can be realized by hardware such as RAM.

【0062】情報記憶媒体(コンピュータにより使用可
能な記憶媒体)180は、プログラムやデータなどの情
報を格納するものであり、その機能は、光ディスク(C
D、DVD)、光磁気ディスク(MO)、磁気ディス
ク、ハードディスク、磁気テープ、或いはメモリ(RO
M)などのハードウェアにより実現できる。処理部10
0は、この情報記憶媒体180に格納される情報に基づ
いて本発明(本実施形態)の種々の処理を行う。即ち情
報記憶媒体180には、本発明(本実施形態)の手段
(特に処理部100に含まれるブロック)を実行するた
めの情報(プログラム或いはデータ)が格納される。
An information storage medium (storage medium usable by a computer) 180 stores information such as programs and data, and its function is that of an optical disc (C
D, DVD), magneto-optical disk (MO), magnetic disk, hard disk, magnetic tape, or memory (RO
It can be realized by hardware such as M). Processing unit 10
0 performs various processes of the present invention (this embodiment) based on the information stored in the information storage medium 180. That is, the information storage medium 180 stores information (program or data) for executing the means of the present invention (the present embodiment) (particularly the block included in the processing unit 100).

【0063】なお、情報記憶媒体180に格納される情
報の一部又は全部は、システムへの電源投入時等に記憶
部170に転送されることになる。また情報記憶媒体1
80に記憶される情報は、本発明の処理を行うためのプ
ログラムコード、画像データ、音データ、表示物の形状
データ、テーブルデータ、リストデータ、本発明の処理
を指示するための情報、その指示に従って処理を行うた
めの情報等の少なくとも1つを含むものである。
A part or all of the information stored in the information storage medium 180 is transferred to the storage section 170 when the system is powered on. The information storage medium 1
Information stored in 80 is a program code for performing the process of the present invention, image data, sound data, shape data of a display object, table data, list data, information for instructing the process of the present invention, and instructions thereof. The information includes at least one of the information for performing the processing according to the above.

【0064】表示部190は、本実施形態により生成さ
れた画像を出力するものであり、その機能は、CRT、
LCD、或いはHMD(ヘッドマウントディスプレイ)
などのハードウェアにより実現できる。
The display unit 190 outputs the image generated by the present embodiment, and its function is CRT,
LCD or HMD (head mounted display)
It can be realized by hardware such as.

【0065】音出力部192は、本実施形態により生成
された音を出力するものであり、その機能は、スピーカ
などのハードウェアにより実現できる。
The sound output unit 192 outputs the sound generated by this embodiment, and its function can be realized by hardware such as a speaker.

【0066】セーブ用情報記憶装置194は、プレーヤ
の個人データ(セーブデータ)などが記憶されるもので
あり、このセーブ用情報記憶装置194としては、メモ
リカードや携帯型ゲーム装置などを考えることができ
る。
The save information storage device 194 stores the player's personal data (save data) and the like. As the save information storage device 194, a memory card, a portable game device or the like may be considered. it can.

【0067】通信部196は、外部(例えばホスト装置
や他のゲームシステム)との間で通信を行うための各種
の制御を行うものであり、その機能は、各種プロセッ
サ、或いは通信用ASICなどのハードウェアや、プロ
グラムなどにより実現できる。
The communication unit 196 performs various controls for communicating with the outside (for example, a host device or another game system), and its function is that of various processors or communication ASICs. It can be realized by hardware or programs.

【0068】なお本発明(本実施形態)の手段を実行す
るためのプログラム或いはデータは、ホスト装置(サー
バー)が有する情報記憶媒体からネットワーク及び通信
部196を介して情報記憶媒体180に配信するように
してもよい。このようなホスト装置(サーバー)の情報
記憶媒体の使用も本発明の範囲内に含まれる。
The program or data for executing the means of the present invention (this embodiment) is distributed from the information storage medium of the host device (server) to the information storage medium 180 via the network and the communication unit 196. You may Use of such an information storage medium of the host device (server) is also included in the scope of the present invention.

【0069】処理部100は、ゲーム処理部110、画
像生成部130、音生成部150を含む。
The processing section 100 includes a game processing section 110, an image generating section 130, and a sound generating section 150.

【0070】ここでゲーム処理部110は、コイン(代
価)の受け付け処理、各種モードの設定処理、ゲームの
進行処理、選択画面の設定処理、オブジェクト(1又は
複数のプリミティブ面)の位置や回転角度(X、Y又は
Z軸回り回転角度)を求める処理、オブジェクトを動作
させる処理(モーション処理)、視点の位置(仮想カメ
ラの位置)や視線角度(仮想カメラの回転角度)を求め
る処理、マップオブジェクトなどのオブジェクトをオブ
ジェクト空間へ配置するための処理、ヒットチェック処
理、ゲーム結果(成果、成績)を演算する処理、複数の
プレーヤが共通のゲーム空間でプレイするための処理、
或いはゲームオーバー処理などの種々のゲーム処理を、
操作部160からの操作データや、セーブ用情報記憶装
置194からの個人データや、ゲームプログラムなどに
基づいて行う。
Here, the game processing unit 110 accepts coins (price), sets various modes, progresses the game, sets selection screens, and positions and rotation angles of objects (one or more primitive surfaces). (Process for obtaining (rotation angle around X, Y or Z axis), process for moving object (motion process), process for obtaining viewpoint position (position of virtual camera) and line-of-sight angle (rotation angle of virtual camera), map object Such as arranging objects in the object space, hit check processing, processing for calculating game results (results, achievements), processing for allowing multiple players to play in a common game space,
Alternatively, various game processing such as game over processing,
This is performed based on operation data from the operation unit 160, personal data from the save information storage device 194, a game program, and the like.

【0071】画像生成部130は、ゲーム処理部110
からの指示等にしたがって例えば座標変換、クリッピン
グ処理、透視変換、或いは光源計算などの種々のジオメ
トリ処理(3次元演算)やジオメトリ処理後のオブジェ
クト(モデル)を、フレームバッファ174に描画する
ための描画処理等の各種の画像処理を行い、オブジェク
ト空間内で仮想カメラ(視点)から見える画像を生成し
て、表示部190に出力する。
The image generating section 130 includes a game processing section 110.
Drawing for drawing various geometry processing (three-dimensional computation) such as coordinate transformation, clipping processing, perspective transformation, or light source calculation, or an object (model) after geometry processing in the frame buffer 174 according to instructions from Various types of image processing such as processing are performed to generate an image viewed from the virtual camera (viewpoint) in the object space and output to the display unit 190.

【0072】画像生成部130は、セルフシャドー処理
部140を含む。
The image generating section 130 includes a self shadow processing section 140.

【0073】セルフシャドー処理部140は、光源から
みたオブジェクト空間のデプスデータをピクセル単位に
求める処理と、オブジェクト空間を構成する所与のプリ
ミティブ面にオブジェクト空間によって落とされる影エ
リアを、光源からみたオブジェクト空間のデプスデータ
を用いて特定し、当該影エリアに基づいて所与のプリミ
ティブ面に対応した影画像を生成する影画像生成処理
と、前記影画像を対応するプリミティブ面にマッピング
して、所与の視点からみたオブジェクト空間の画像を生
成する処理を行う。
The self-shadow processing unit 140 obtains the depth data of the object space viewed from the light source in pixel units, and the shadow area cast by the object space on a given primitive surface forming the object space. A shadow image generation process for identifying a shadow image corresponding to a given primitive surface based on the shadow area, using the depth data of the space, and mapping the shadow image to the corresponding primitive surface, Performs processing to generate an image of the object space viewed from the viewpoint.

【0074】また影画像生成処理として、光源からみた
所与のプリミティブ面に関連して与えられるデプス値と
光源からオブジェクト空間をみたシーンのデプス値を比
較して、光源からみた所与のプリミティブ面の描画領域
のなかで、オブジェクト空間に存在するオブジェクトに
よって光源からの光が遮られる領域を判定して、前記所
与のプリミティブ面にオブジェクト空間によって落とさ
れる影エリアを特定する処理を行うようにしてもよい。
As the shadow image generation process, the depth value given in relation to the given primitive surface seen from the light source is compared with the depth value of the scene seen from the light source to the object space to give the given primitive surface seen from the light source. In the drawing area of, the area in which the light from the light source is blocked by the object existing in the object space is determined, and the shadow area cast by the object space on the given primitive surface is specified. Good.

【0075】また光源からみたオブジェクト空間のデプ
スデータとは、オブジェクト空間を光源からみて透視ま
たは投影変換したシーンのデプスデータであり、光源か
らみて透視変換または投影変換した後の所与のプリミテ
ィブ面の構成点のデプス値と光源からみたオブジェクト
空間のデプスデータに基づいて所与の判定法を用いたデ
プステストを行い所与のプリミティブ面に対応した影画
像を生成するようにしてもよい。
The depth data of the object space viewed from the light source is the depth data of the scene that is perspective-projected or converted from the light source in the object space, and is the depth data of the given primitive surface after perspective conversion or projection conversion viewed from the light source. A depth test using a given determination method may be performed based on the depth values of the constituent points and the depth data of the object space viewed from the light source, and a shadow image corresponding to a given primitive surface may be generated.

【0076】また光源からみて透視変換または投影変換
した後の所与のプリミティブ面の構成点の座標に基づ
き、前記影画像を対応するプリミティブ面にマッピング
する際のテクスチャコーディネート座標を決定してマッ
ピング処理を行うようにしてもよい。
Further, based on the coordinates of the constituent points of a given primitive surface after perspective transformation or projection transformation as seen from the light source, the texture coordinate coordinates for mapping the shadow image to the corresponding primitive surface are determined and the mapping processing is performed. May be performed.

【0077】また影画像生成処理として、透視変換また
は投影変換した後の所与のプリミティブ面の構成点のデ
プス値を反転させる処理と、光源からみたオブジェクト
空間のデプスデータを保持するZバッファを反転させる
Zバッファ反転処理と、構成点のデプス値が反転された
所与のプリミティブ面について、前記Zバッファ反転処
理が施されたZバッファを用いて、デプステストの所定
の判定法を用いて描画処理を行うようにしてもよい。
As the shadow image generation processing, processing for inverting the depth values of the constituent points of a given primitive surface after perspective transformation or projection transformation, and inverting the Z buffer holding the depth data of the object space viewed from the light source. Z buffer reversal processing to be performed and drawing processing for a given primitive surface in which the depth values of the constituent points are reversed by using the Z buffer subjected to the Z buffer reversal processing by using a predetermined determination method of the depth test. May be performed.

【0078】また所与のプリミティブ面がポリゴンとし
て構成されている場合に、所与の拡大処理を施して拡大
したポリゴンを用いて所与のプリミティブ面に対応した
影画像を生成する処理を行うようにしてもよい。例えば
前記ポリゴンの頂点を当該ポリゴンの重心から所与のス
ケールで拡大した点にずらすことでポリゴンを拡大させ
る用にしてもよい。
When a given primitive surface is configured as a polygon, a given enlargement processing is performed to generate a shadow image corresponding to the given primitive surface using the enlarged polygon. You may For example, the polygon may be enlarged by shifting the vertex of the polygon from the center of gravity of the polygon to a point enlarged by a given scale.

【0079】所与のプリミティブ面がポリゴンとして構
成されている場合に、ポリゴンの向きと光源の光線の向
きによって、影画像生成処理の対象となるプリミティブ
面を判定し、処理対象となるプリミティブ面についての
み影画像生成処理を行う用にしてもよい。
When a given primitive surface is configured as a polygon, the primitive surface that is the target of the shadow image generation processing is determined based on the direction of the polygon and the direction of the light ray of the light source. Only the shadow image generation processing may be performed.

【0080】また、音生成部150は、ゲーム処理部1
10からの指示等にしたがって各種の音処理を行い、B
GM、効果音、音声などの音を生成し、音出力部192
に出力する。
Further, the sound generator 150 is equivalent to the game processor 1
Perform various sound processing according to the instructions from 10.
Sounds such as GM, sound effects, and voice are generated, and the sound output unit 192 is generated.
Output to.

【0081】なお、ゲーム処理部110、画像生成部1
30、音生成部150の機能は、その全てをハードウェ
アにより実現してもよいし、その全てをプログラムによ
り実現してもよい。或いは、ハードウェアとプログラム
の両方により実現してもよい。
The game processor 110 and the image generator 1
All of the functions of the sound generation unit 150 and the sound generation unit 150 may be realized by hardware, or all of them may be realized by a program. Alternatively, it may be realized by both hardware and a program.

【0082】なお、本実施形態のゲームシステムは、1
人のプレーヤのみがプレイできるシングルプレーヤモー
ド専用のシステムにしてもよいし、このようなシングル
プレーヤモードのみならず、複数のプレーヤがプレイで
きるマルチプレーヤモードも備えるシステムにしてもよ
い。
The game system of this embodiment is
It may be a system dedicated to the single player mode in which only human players can play, or a system having not only such a single player mode but also a multiplayer mode in which a plurality of players can play.

【0083】また複数のプレーヤがプレイする場合に、
これらの複数のプレーヤに提供するゲーム画像やゲーム
音を、1つの端末を用いて生成してもよいし、ネットワ
ーク(伝送ライン、通信回線)などで接続された複数の
端末を用いて生成してもよい。
When a plurality of players play,
The game images and game sounds to be provided to the plurality of players may be generated using one terminal, or may be generated using a plurality of terminals connected by a network (transmission line, communication line) or the like. Good.

【0084】2.本実施形態の特徴 本実施の形態の特徴を図面を用いて説明する。2. Features of this embodiment The features of this embodiment will be described with reference to the drawings.

【0085】図2は本実施の形態のセルフシャドウ処理
が施された画像の一例である。
FIG. 2 shows an example of an image which has been subjected to the self-shadowing process of this embodiment.

【0086】同図に示すように、オブジェクト空間の平
面上に立方体オブジェクト210が配置され、当該立方
体オブジェクト210の後方上部に平行光源220が設
定されている。230はセルフシャドウ処理によって生
成された影である。
As shown in the figure, a cube object 210 is arranged on the plane of the object space, and a parallel light source 220 is set in the upper rear part of the cube object 210. Reference numeral 230 is a shadow generated by the self-shadowing process.

【0087】図3は、セルフシャドウ処理を行う際に使
用するVRAMの作業用バッファについて説明するため
の図である。
FIG. 3 is a diagram for explaining the work buffer of the VRAM used when performing the self-shadowing process.

【0088】セルフシャドウ処理を行う際に、VRAM
上に図3に示すような作業用バッファを確保するように
してもよい。
When performing the self-shadowing process, the VRAM
You may make it secure the work buffer as shown in FIG. 3 above.

【0089】Frame Buffer(ODD)240、Frame Buffe
r(EVEN)250、Z Buffer260は影付きのシーンを
描画するためのVRAMの作業用バッファである。
Frame Buffer (ODD) 240, Frame Buffe
The r (EVEN) 250 and the Z Buffer 260 are VRAM work buffers for drawing shadowed scenes.

【0090】Work Effect Buffer260は、「デプスデ
ータのLESS化」を行う一時的な作業バッファと、ポ
リゴン毎の「影マップ」を生成するためのVRAMの作
業用バッファである。またWork Z Buffer280は、光
源からみたオブジェクト空間のシーン全体を描画した
「デプスデータ」の一時格納と、「LESS化されたデ
プスデータ」を格納ためのVRAMの作業用バッファで
ある。
The Work Effect Buffer 260 is a temporary work buffer for performing "LESS conversion of depth data" and a VRAM work buffer for generating a "shadow map" for each polygon. The Work Z Buffer 280 is a VRAM work buffer for temporarily storing “depth data” in which the entire scene of the object space viewed from the light source is drawn and storing “less depth data”.

【0091】次に図4〜図6でデプスデータを用いて影
画像を生成する処理の一例について説明する。
Next, an example of processing for generating a shadow image using depth data will be described with reference to FIGS.

【0092】図4(A)(B)は光源からみたオブジェ
クト空間のデプスデータ(シーン全体のデプスデータ)
について説明するための模式的な図である。
4A and 4B are depth data of the object space viewed from the light source (depth data of the entire scene).
It is a schematic diagram for explaining about.

【0093】図4(A)の310は、光源から見たシー
ン全体をWork Z Bufferに対して描画した場合のWork Z
Bufferの内容を模式的に表した図である。ここで312
が光源から見たシーン全体デプスデータ(オブジェクト
空間のデプスデータ)であり、説明のため色の濃淡でデ
プス値を示している。すなわち色が濃いほうのデプスデ
ータ(Z値)が光源に対してより手前に位置することを
示している。ここではオブジェクトが置かれた平面自体
についてのデプスデータの取り扱いについては省略す
る。
Reference numeral 310 in FIG. 4A shows Work Z when the entire scene viewed from the light source is drawn in the Work Z Buffer.
It is the figure which represented the content of Buffer typically. 312 here
Is the whole scene depth data (depth data in the object space) viewed from the light source, and the depth value is indicated by the shade of color for the sake of explanation. That is, it indicates that the depth data (Z value) of the darker color is located closer to the light source. Here, the handling of the depth data about the plane itself on which the object is placed is omitted.

【0094】図4(B)の320は、図4(A)のシー
ン全体デプスデータ322の内容を反転させたものであ
る。この反転により、次の操作から、Work Z Bufferが
LESS判定を行える状態になり、ポリゴン毎の影部分
を生成するためのステンシルになる。このデプスデータ
の内容をLESS化したデプスデータ(Zバッファ反転
処理が施されたZバッファのデプスデータ)とする。デ
プスデータの反転方法の詳細は後述する。
Reference numeral 320 in FIG. 4 (B) is an inversion of the contents of the entire scene depth data 322 in FIG. 4 (A). By this inversion, the Work Z Buffer is ready for the LESS determination from the next operation, and becomes a stencil for generating a shadow part for each polygon. The contents of this depth data are LESS-ized depth data (Z buffer depth data subjected to Z buffer inversion processing). Details of the depth data inverting method will be described later.

【0095】本実施の形態では図4(A)のデプスデー
タまたは図4(B)のLESS化されたデプスデータを
用いてオブジェクト空間が各プリミティブ面に落とす影
を付けるための各プリミティブ面に対応した影マップを
生成することができる。
In this embodiment, the depth data of FIG. 4 (A) or the depth data of FIG. 4 (B) is used to correspond to each primitive surface for creating a shadow cast on each primitive surface by the object space. A shadow map can be generated.

【0096】図5(A)〜(D)は、デプスデータまた
はLESS化したデプスデータを用いてオブジェクト空
間を構成する所与のプリミティブ面に対応した影マップ
を生成する処理について説明するための図である。
FIGS. 5A to 5D are views for explaining the process of generating a shadow map corresponding to a given primitive surface forming the object space by using the depth data or the LESS-ized depth data. Is.

【0097】ここではプリミティブ面がポリゴンで構成
されている場合を例にとり説明する。
Here, a case where the primitive surface is composed of polygons will be described as an example.

【0098】まず図5(A)に示すようにWork Effect
Buffer330の内容をクリアする。Work Effect Buffer
330には、図4(A)の310に示すようなデプスデ
ータまたは図4(B)の320に示すようなLESS化
したデプスデータに対して、ポリゴン毎にデプステスト
を行いその結果を書き込む。従ってデプステストを行う
際に、Work Effect Bufferの内容を予めクリアしてお
く。尚、この操作は最初のポリゴンのみの操作で、次の
ポリゴンからは、図5(B)に示すように前回のデプス
テストで使用したポリゴンをクリア(BG)色でバッフ
ァに上書きするようにしてもよい。
First, as shown in FIG. 5A, Work Effect
Clear the contents of Buffer 330. Work Effect Buffer
A depth test is performed for each polygon on the depth data indicated by 310 in FIG. 4A or the LESS-ized depth data indicated by 320 in FIG. 4B, and the result is written in 330. Therefore, when performing the depth test, clear the contents of the Work Effect Buffer in advance. This operation is for the first polygon only. From the next polygon, the polygon used in the previous depth test is overwritten in the buffer with the clear (BG) color as shown in FIG. 5B. Good.

【0099】またデプステストの対象となるポリゴンの
各頂点座標については図4(A)(B)の光源からみた
オブジェクト空間のデプスデータ(シーン全体のデプス
データ)を生成したときと同様の投影変換を施す。
Further, with respect to each vertex coordinate of the polygon to be subjected to the depth test, the same projection conversion as when the depth data of the object space (depth data of the entire scene) viewed from the light source of FIGS. 4A and 4B is generated. Give.

【0100】そして図5(C)に示すように、Work Z B
uffer332のデプスデータまたはLESS化したデプ
スデータに対して、ポリゴン340毎に所定の判定法に
よりデプステストを行い、その結果をWork Effect Buff
erに描画する。
Then, as shown in FIG. 5 (C), Work ZB
A depth test is performed on the depth data of the uffer 332 or the depth data converted into the LESS by a predetermined determination method for each polygon 340, and the result is a Work Effect Buff
draw on er.

【0101】ここにおいて行うデプステストは、光源か
ら平行投影したポリゴンの描画領域のなかで他のオブジ
ェクトによって光源からの光が遮られる領域(オブジェ
クト空間に存在するオブジェクトの影になる領域)を判
定できるものでなければならない。すなわち光源からみ
たシーンに対してより奥に位置する部分を描画できるデ
プステストであることが好ましい。
In the depth test performed here, it is possible to determine the area where the light from the light source is blocked by another object in the drawing area of the polygon projected in parallel from the light source (area which becomes the shadow of the object existing in the object space). Must be one. That is, it is preferable that the depth test is capable of drawing a portion located deeper in the scene viewed from the light source.

【0102】例えば後に説明するLESS判定が可能な
ハードで処理を行う場合には、デプスデータと投影変換
後のポリゴンの頂点座標を用いてLESS判定によるデ
プステストを行うことにより、当該ポリゴンについて、
光源からみたシーンに対してより奥に位置する部分を描
画できる。
For example, in the case of performing processing by hardware capable of LESS determination described later, by performing a depth test by LESS determination using depth data and vertex coordinates of polygons after projection conversion,
It is possible to draw a part located farther from the scene viewed from the light source.

【0103】このようにしてデプステストを行うと、そ
の結果がWork Effect Bufferに描画され、図5(D)の
350に示すような影画像が生成される。この影画像は
光源からみたシーンに対してより奥に位置する部分が描
画されたものである。そしてこの影画像350を用いて
各ポリゴン毎の影マップを生成する。
When the depth test is performed in this way, the result is drawn in the Work Effect Buffer, and a shadow image as shown at 350 in FIG. 5D is generated. In this shadow image, a portion located deeper than the scene viewed from the light source is drawn. Then, a shadow map for each polygon is generated using this shadow image 350.

【0104】なおこのWork Effect Bufferに書き込む際
の色(例えば図5(D)の影画像350の色)を、光源
の色と合わせることでカラーライトによる影の表現も可
能になる。
It is also possible to represent a shadow by a color light by matching the color (for example, the color of the shadow image 350 in FIG. 5D) when writing to the work effect buffer with the color of the light source.

【0105】次に生成された影マップを用いて視点座標
系からみたポリゴンをFrame Bufferに描画する処理を行
う図6は生成した影マップを使い、Frame Bufferにポリ
ゴンを描画する様子を説明するための図である。
Next, the polygon map viewed from the viewpoint coordinate system is drawn using the generated shadow map. FIG. 6 is for explaining how to draw the polygon in the frame buffer using the generated shadow map. FIG.

【0106】図6に示すように視点から透視変換された
ポリゴン370をFrame Buffer360に対して描画する
際に、当該ポリゴンに対応する影マップ(図5(D)の
350)をマッピングする処理を行う。これによりポリ
ゴン370に落ちた影380を表現することができる。
As shown in FIG. 6, when a polygon 370 perspectively transformed from the viewpoint is drawn in the frame buffer 360, a shadow map (350 in FIG. 5D) corresponding to the polygon is mapped. . This makes it possible to represent the shadow 380 that has fallen on the polygon 370.

【0107】このようにオブジェクト空間を構成する各
ポリゴンに対して図5(A)〜(D)により影マップを
生成して、当該影マップを用いて、オブジェクト空間を
構成する各ポリゴンに対して図6で説明した処理を行う
ことでオブジェクト空間を構成する各ポリゴンに落ちた
影を表現することができる。
Thus, a shadow map is generated for each polygon forming the object space as shown in FIGS. 5A to 5D, and the shadow map is used for each polygon forming the object space. By performing the processing described with reference to FIG. 6, the shadow cast on each polygon forming the object space can be expressed.

【0108】図7はオブジェクト空間に配置された2枚
のポリゴンを視点座標系からみた完成図である。同図に
はオブジェクト空間を構成するオブジェクトである2枚
のポリゴンP1、P2の真上の平行光源によってポリゴ
ンP2のP2−1領域に影が落ちている様子が示されて
いる。
FIG. 7 is a completed view of the two polygons arranged in the object space as viewed from the viewpoint coordinate system. The figure shows a state in which a shadow is cast on the P2-1 area of the polygon P2 by the parallel light source directly above the two polygons P1 and P2 which are objects forming the object space.

【0109】図8(A)(B)は、Work Z BufferとWor
k Effect BufferとFrame Bufferの関係を説明するため
の模式的な図である。
FIGS. 8A and 8B show Work Z Buffer and Wor.
It is a schematic diagram for explaining the relationship between k Effect Buffer and Frame Buffer.

【0110】図8(A)はポリゴンP1を描画する過程
のWork Z Buffer420−1、WorkEffect Buffer430
−1、Frame Buffer440−1の様子を表している。
FIG. 8A shows Work Z Buffer 420-1 and Work Effect Buffer 430 in the process of drawing polygon P1.
-1, and the state of Frame Buffer 440-1 is shown.

【0111】Work Z Buffer420−1には光源方向か
ら投影変換した2枚のポリゴンについての光源からみた
シーンのデプスデータの様子を表している。Z1はポリ
ゴンP1により生成されたデプスデータが格納されてお
り、Z2にはポリゴンP2により生成されたデプスデー
タが格納されている。
The Work Z Buffer 420-1 shows the state of the depth data of the scene as viewed from the light source for the two polygons projected and converted from the light source direction. Z1 stores the depth data generated by the polygon P1, and Z2 stores the depth data generated by the polygon P2.

【0112】そしてWork Z Buffer420−1のデプス
データを用いてポリゴンP1についてデプステストを行
ってWork Effect Buffer430−1にポリゴンP1につ
いての影マップを生成する。ここにおいてポリゴンP1
は光源からみたシーンのデプスデータに対して最も手前
(光源側)にあるので、影画像は描画されない(430
−1参照)。従ってFrame Buffer440−1には影の落
ちていないポリゴンP1の画像が描画される。
Then, a depth test is performed on the polygon P1 using the depth data of the Work Z Buffer 420-1, and a shadow map for the polygon P1 is generated in the Work Effect Buffer 430-1. Here, the polygon P1
Is on the most front side (on the light source side) with respect to the depth data of the scene viewed from the light source, so a shadow image is not drawn (430
-1). Therefore, the image of the polygon P1 without a shadow is drawn in the Frame Buffer 440-1.

【0113】図8(B)はポリゴンP2を描画する過程
のWork Z Buffer420−2、WorkEffect Buffer430
−2、Frame Buffer440−2の様子を表している。
FIG. 8B shows Work Z Buffer 420-2 and Work Effect Buffer 430 in the process of drawing polygon P2.
-2, the state of the Frame Buffer 440-2 is shown.

【0114】Work Z Buffer420−2はWork Z Buffer
420−1と同様である。Work Z Bufferの内容は、全
ポリゴンのデプステストを行うためのステンシルとなる
ため、デプステストによる更新は行わない。
Work Z Buffer 420-2 is Work Z Buffer
It is similar to 420-1. The contents of Work Z Buffer is a stencil for performing the depth test of all polygons, so it is not updated by the depth test.

【0115】そして430−1の状態にあるWork Effec
t Bufferを一端クリアして、Work ZBuffer420−2の
デプスデータを用いてポリゴンP2についてデプステス
トを行ってWork Effect BufferにポリゴンP1について
の影マップを生成する(430−2参照)。ここにおい
てポリゴンP2のP2−1(図7参照)の領域は光源か
らみたシーンのデプスデータよりの奥にあるので影画像
Z2が生成される。これに対しポリゴンP2のP2−2
(図7参照)の領域は光源に対して最も手前(光源側)
にあるので、光源からみたシーンに対してより奥に位置
する部分に描画される影画像は描画されない。このよう
にしてWork Effect Buffer430−2にはポリゴンP2
に対応した影マップが生成される。
Work Effec in the state of 430-1
The t Buffer is once cleared, a depth test is performed on the polygon P2 using the depth data of the Work ZBuffer 420-2, and a shadow map for the polygon P1 is generated in the Work Effect Buffer (see 430-2). Here, since the area P2-1 (see FIG. 7) of the polygon P2 is deeper than the depth data of the scene as seen from the light source, the shadow image Z2 is generated. On the other hand, P2-2 of polygon P2
The area (see Fig. 7) is closest to the light source (light source side)
Therefore, the shadow image drawn in a portion located farther from the scene viewed from the light source is not drawn. In this way, the polygon P2 is stored in the Work Effect Buffer 430-2.
A shadow map corresponding to is generated.

【0116】そして視点座標系からみたポリゴンP2を
Frame Buffer440−2に描画する際に、当該影マップ
をテクスチャとしてマッピングすることにより、Frame
Buffer440−2には影の落ちたポリゴンP2の画像が
描画される。
Then, the polygon P2 viewed from the viewpoint coordinate system is
When drawing in the Frame Buffer 440-2, by mapping the shadow map as a texture,
An image of a polygon P2 with a shadow cast is drawn in the Buffer 440-2.

【0117】図9は影マップを視点から見た物体に貼り
付けるためプロジェクションマッピングについて説明す
るための図である。
FIG. 9 is a diagram for explaining the projection mapping for attaching the shadow map to the object viewed from the viewpoint.

【0118】影マップを視点から見た物体に貼り付ける
ためには、光源から見た物体のポリゴン毎にプロジェク
ションマッピングを行う必要がある。すなわち影マップ
を生成するデプステストを行う際に、ポリゴン投影変換
後の頂点座標(XY)をST座標に変換してテクスチャ
コーディネートデータとして利用する。
In order to attach the shadow map to the object viewed from the viewpoint, it is necessary to perform projection mapping for each polygon of the object viewed from the light source. That is, when performing a depth test for generating a shadow map, the vertex coordinates (XY) after polygon projection conversion is converted into ST coordinates and used as texture coordinate data.

【0119】例えばWork Effect Buffer430における
ポリゴンPの頂点座標TV1、TV2、TV3、保持し
ておき、Work Effect Buffer430をテクスチャとして
テクスチャマッピングを行う際にそれぞれV1、V2、
V3に対応したテクスチャコーディネート座標として用
いることができる。
For example, the vertex coordinates TV1, TV2, TV3 of the polygon P in the Work Effect Buffer 430 are held, and V1, V2, and V2 are used when texture mapping is performed using the Work Effect Buffer 430 as a texture, respectively.
It can be used as texture coordinate coordinates corresponding to V3.

【0120】3.デプステスト デプステストとは、例えばZテスト等の描画するピクセ
ルの判定方法であり、新たにポリゴンを描画しようとす
る場合に、Zバッファを使って前に描画したポリゴンと
今から描画するポリゴンのZ値をピクセル毎に比較して
描画対象となるピクセルの判定を行うテストのことであ
る。
3. Depth test The depth test is a method for determining a pixel to be drawn, such as a Z test. When a new polygon is to be drawn, the Z buffer of the previously drawn polygon and the Z of the polygon to be drawn are used. It is a test that compares the values pixel by pixel to determine the pixel to be drawn.

【0121】ここでデプステストを行う際の判定法は、
前に描画したポリゴンと今から描画するポリゴンのZ値
の大小関係に関する判定法であり、例えばGREATE
R判定やLESS判定等が知られている。
Here, the judgment method when performing the depth test is as follows:
This is a judgment method regarding the magnitude relationship between the Z values of the polygon drawn before and the polygon drawn from now on.
R determination, LESS determination, and the like are known.

【0122】図10(A)(B)はGREATER判定
とLESS判定について説明するための模式的な図であ
る。
FIGS. 10A and 10B are schematic diagrams for explaining the GREATER determination and the LESS determination.

【0123】例えばZバッファのZ値をA、これから描
画するポリゴンのZ値をBとすると、GREATER判
定とはこれから描画するポリゴンのZ値(A)がZバッ
ファのZ値(B)より大きい場合描画する判定法(A>
Bの時描画成功)であり、LESS判定とはこれから描
画するポリゴンのZ値(A)がZバッファのZ値(B)
より小さい場合描画する判定法(A<Bの時描画成功)
である。
For example, assuming that the Z value of the Z buffer is A and the Z value of the polygon to be drawn is B, the GREETER determination is that the Z value (A) of the polygon to be drawn is greater than the Z value (B) of the Z buffer. Judgment method for drawing (A>
B is a drawing success), and the LESS judgment is that the Z value (A) of the polygon to be drawn is the Z value (B) of the Z buffer.
The judgment method to draw when it is smaller (drawing is successful when A <B)
Is.

【0124】説明を簡単にするために例えば現在のZバ
ッファのすべてのピクセルのZの値がZkであると仮定
する。図10(A)のポリゴン500は透視変換後のポ
リゴンであり、V1、V2、V3の3頂点から構成され
ている。各頂点V1、V2、V3のZ値の値をZ1、Z
2、Z3とする。このときZ3<Zk<Z2<Z1であ
るとすれば、510がGREATER判定で選択される
エリアであり(図10(A)参照)、520がLESS
判定で選択されるエリアである(図10(B)参照)。
For simplicity of explanation, assume that the value of Z of all pixels in the current Z buffer is Zk. A polygon 500 in FIG. 10A is a polygon after perspective transformation, and is composed of three vertices V1, V2, and V3. The value of Z value of each vertex V1, V2, V3 is Z1, Z
2 and Z3. If Z3 <Zk <Z2 <Z1 at this time, 510 is the area selected by the GREETER determination (see FIG. 10A), and 520 is the LESS.
This is the area selected by the determination (see FIG. 10B).

【0125】前述したように処理を行うハードウエアが
LESS判定よるデプステストについてサポートしてい
る場合には、図5(C)の処理において、デプスデータ
にたいして、ポリゴン毎にLESS判定によるデプステ
ストを行うことで影マップを生成することができる。
When the hardware for performing the processing as described above supports the depth test by the LESS determination, the depth data is subjected to the LESS determination for each polygon in the processing of FIG. 5C. This makes it possible to generate a shadow map.

【0126】しかしGREATER法はサポートしてい
るがLESS法はサポートしていないハードウエアを用
いて処理を行う場合には以下に説明するような疑似LE
SS判定処理を行う。
However, when processing is performed using hardware that supports the GREETER method but does not support the LESS method, the pseudo LE as described below is used.
Perform SS determination processing.

【0127】図4(B)のようなLESS化されたデプ
スデータを生成するためには、Zバッファの内容を反転
させる際にVRAM上に一時利用するバッファ(Work E
ffect Buffer)を確保する。
In order to generate the LESS-ized depth data as shown in FIG. 4B, a buffer (Work E) which is temporarily used in the VRAM when the contents of the Z buffer is inverted.
secure a ffect buffer).

【0128】そして任意のデプスデータ(Work Z Buffe
r)をRGB画像として扱い、0xff,0xff,0xff,0xff(RGB
A)でクリアされたWork Effect Bufferに、任意のαブレ
ンディング式で合成を行う。これによりWork Effect Bu
fferにWork Z Bufferの画像をネガ反転した画像を生成
することができるので、これを、元のバッファ(WorkZ
Buffer)にRGB画像からデプスデータに変換とコピー
を行い、LESS化したデプスデータが作成される。
Then, any depth data (Work Z Buffe
r) is treated as an RGB image, and 0xff, 0xff, 0xff, 0xff (RGB
The Work Effect Buffer cleared in A) is synthesized with an arbitrary α blending formula. This makes Work Effect Bu
It is possible to generate a negative image of the Work Z Buffer image on the ffer.
The RGB image is converted to depth data and copied to the Buffer) to create LESS depth data.

【0129】図11はLESS化されたデプスデータを
生成する処理について説明するための模式的な図であ
る。
FIG. 11 is a schematic diagram for explaining a process for generating LESS-ized depth data.

【0130】まず予めWork Effect Buffer560を0xf
f,0xff,0xff,0xff(RGBA)でクリアする。
First, set Work Effect Buffer 560 to 0xf in advance.
Clear with f, 0xff, 0xff, 0xff (RGBA).

【0131】そしてWork Z Buffer550の内容(デプ
スデータ)をテクスチャとし、WorkEffect Buffer56
0全域のポリゴンを描画する。この動作の際に、αブレ
ンディングを行う。ここで例えばαブレンディングの式
としてCv=(A−B)×C>>7+Dを用いる場合に
は、A,B,C,Dのそれぞれの係数に、「A=C
d」、「B=Cs」、「C=0x80」、「D=0」を
設定する。これにより、0xffffffffの状態を保つWork E
ffect Buffer560に、上記の式を考慮したαブレンデ
ィングを行いながらポリゴンを描画することで、、Work
Z Bufferを反転した状態の画像(イメージデータ)が
生成される(560参照)。
Then, the contents (depth data) of Work Z Buffer 550 are used as textures, and Work Effect Buffer 56
Draw polygons in 0 area. In this operation, α blending is performed. Here, for example, when Cv = (A−B) × C >> 7 + D is used as the α blending equation, the coefficient of each of A, B, C, and D is represented by “A = C”.
“D”, “B = Cs”, “C = 0x80”, and “D = 0” are set. This allows Work E to maintain the 0xffffffff state.
By drawing a polygon in the ffect Buffer 560 while performing α blending considering the above formula,
An image (image data) with the Z buffer inverted is generated (see 560).

【0132】そしてWork Effect Buffer560の内容
(イメージデータ)を、テクスチャマップ素材とし、Wo
rk Z Bufferの領域を埋めるポリゴンを描画する。この
動作の際に、前記αブレンディング処理を行う。ここで
「A=Cs」、「B=0」、「C=0x80」、「D=
0」を設定することにより、Work Effect Buffer560
の内容を、Work Z Buffer570にデプスデータとして
コピーすることができる。
Then, the contents (image data) of the Work Effect Buffer 560 are used as a texture map material and Wo
Draw a polygon that fills the area of rk Z Buffer. At the time of this operation, the α blending process is performed. Here, “A = Cs”, “B = 0”, “C = 0x80”, “D =
By setting "0", Work Effect Buffer 560
The contents of can be copied to Work Z Buffer 570 as depth data.

【0133】図12はα減算処理を用いてWork Z Buffe
rの内容を反転させる処理について説明するための模式
的な図である。
FIG. 12 shows Work Z Buffe using α subtraction processing.
FIG. 9 is a schematic diagram for explaining a process of inverting the content of r.

【0134】600はLESS化前のWork Z Bufferの
様子を模式的に示したものであり、610はクリアされ
たWork Effect Bufferでありであり、610’はα減算
処理後のWork Effect Bufferである。
Reference numeral 600 is a schematic representation of the state of the Work Z Buffer before conversion to LESS, 610 is the cleared Work Effect Buffer, and 610 'is the Work Effect Buffer after α subtraction processing. .

【0135】ここでZ1はLESS化前のWork Z Buffer
600のピクセルであり、P1はクリアされたWork Effe
ct Buffer610上のピクセルであってZ1に対応するピ
クセルである。またZ1’はα減算処理後のWork Effect
BufferにおけるピクセルであってZ1に対応するピクセ
ルである。
Z 1 is Work Z Buffer before LESS conversion
600 pixels, P 1 cleared Work Effe
It is a pixel on the ct Buffer 610 and corresponds to Z 1 . Z 1 'is Work Effect after α subtraction
It is the pixel in the buffer that corresponds to Z 1 .

【0136】本実施の形態では、LESS化前のWork Z
Buffer600を色情報バッファ(テクスチャバッフ
ァ)と見なして、クリアされたWork Effect Buffer61
0にアルファ減算により描画する。
In this embodiment, Work Z before conversion to LESS is performed.
Buffer 600 is regarded as a color information buffer (texture buffer), and the cleared Work Effect Buffer 61
Draw to 0 by alpha subtraction.

【0137】ここでLESS化前のWork Z Buffer60
0を色情報バッファと見なすとは、例えば632,63
4,636、638に示すようにピクセルZ1のZ値の
値630の0〜7ビット(638)までをAの値Zaと
みなし、8〜15ビット(636)までをRの値Zrと
みなし、16〜23ビット(634)までをGの値Zg
と見なし、24〜31ビット(632)までをGの値Z
gと見なすことを意味する。
Here, Work Z Buffer 60 before LESS conversion
Considering 0 as a color information buffer is, for example, 632,63.
4, 636 and 638, 0 to 7 bits (638) of the Z value 630 of the pixel Z 1 are regarded as the A value Za, and 8 to 15 bits (636) are regarded as the R value Zr. , 16 to 23 bits (634) are G values Zg
The value of G is 24 to 31 bits (632).
Means to consider g.

【0138】またクリアされたWork Effect Buffer61
0上の各ピクセルの値には642〜648に示すように
「0xff0xff0xff0xff」が設定されてお
り、ここで0〜7ビット(648)までの「0xff」
がAの値、8〜15ビット(636)までの「0xf
f」がRの値、15〜23ビット(634)までの「0
xff」がGの値、24〜31ビット(632)までの
「0xff」がBの値となる。
Work Effect Buffer 61 cleared
"0xff0xff0xff0xff" is set to the value of each pixel on 0 as shown by 642-648, and here, "0xff" of 0 to 7 bits (648).
Is the value of A, 8 to 15 bits (636) "0xf
f ”is the value of R, and is 0 to 15 to 23 bits (634).
“Xff” is the G value, and “0xff” up to 24-31 bits (632) is the B value.

【0139】α減算処理後のWork Effect Buffer61
0’におけZb、Zg、Zr、Zaに対応する値をZ
a’、Zr’、Zg’、Zb’(0xff>Za、0x
ff>Zr、0xff>Zg、0xff>Zb)とする
とすると以下の式で与えられる。
Work Effect Buffer 61 after α subtraction processing
The value corresponding to Zb, Zg, Zr, and Za at 0'is set to Z.
a ', Zr', Zg ', Zb'(0xff> Za, 0x
ff> Zr, 0xff> Zg, 0xff> Zb), the following formula is given.

【0140】Za’=0xff‐Za ・・・(1) Zr’=0xff‐Zr ・・・(2) Zg’=0xff‐Zg ・・・(3) Zb’=0xff‐Zb ・・・(4) (1)〜(4)はZa’、Zr’、Zg’、Zb’はZ
a、Zr、Zg、Zbの反転された値であることを示し
ている。これはピクセルZ1’のZ値650が、ピクセ
ルZ1のZ値630の反転された値であることを示して
いる。
Za '= 0xff-Za (1) Zr' = 0xff-Zr (2) Zg '= 0xff-Zg (3) Zb' = 0xff-Zb (4) ) (1) to (4) are Za ', Zr', Zg 'and Zb' are Z
It is shown that they are the inverted values of a, Zr, Zg, and Zb. This indicates that the Z value 650 of pixel Z1 ′ is the inverted value of the Z value 630 of pixel Z1.

【0141】なお(1)〜(4)のアルファ減算処理
は、例えば描画プロセッサが有している半透明演算機能
を用いて行うようにしてもよい。
Note that the alpha subtraction processing of (1) to (4) may be performed using the semitransparent calculation function of the drawing processor, for example.

【0142】図13は、光源からみた投影変換を行った
所与のポリゴンの頂点のZ値を反転させる処理について
説明するための図である。
FIG. 13 is a diagram for explaining the process of inverting the Z value of the apex of a given polygon that has undergone projection conversion as seen from the light source.

【0143】680は頂点のZ値を反転させる前のポリ
ゴンの様子を模式的に示したものであり、680’は頂
点のZ値を反転させたあとのポリゴンの様子を模式的に
示したものである。
Reference numeral 680 schematically shows the state of the polygon before the Z value of the vertex is inverted, and 680 'shows the state of the polygon after the Z value of the vertex is inverted. Is.

【0144】ポリゴン680の各頂点V1、V2、V3
に対応するのはポリゴン680’の各頂点V1’、V
2’、V3’である。ここでポリゴン680の各頂点V
1、V2、V3のZ値の値をZ1、Z2、Z3、ポリゴ
ン680’の各頂点V1’、V2’、V3’のZ値の値
をZ1’、Z2’、Z3’とすると、Z1’、Z2’、
Z3’は以下のように与えられる。
Each vertex V1, V2, V3 of the polygon 680
Corresponds to the vertices V1 ′ and V1 of the polygon 680 ′.
2 ', V3'. Here, each vertex V of the polygon 680
If Z values of 1, V2, and V3 are Z1, Z2, and Z3, and Z values of vertices V1 ′, V2 ′, and V3 ′ of the polygon 680 ′ are Z1 ′, Z2 ′, and Z3 ′, Z1 ′. , Z2 ',
Z3 'is given as follows.

【0145】Z1’=0xff‐Z1 ・・・(5) Z2’=0xff‐Z2 ・・・(6) Z3’=0xff‐Z3 ・・・(7) (5)〜(7)はZ1’、Z2’、Z3’が、Z1、Z
2、Z3の反転された値であることを示している。
Z1 '= 0xff-Z1 (5) Z2' = 0xff-Z2 (6) Z3 '= 0xff-Z3 (7) (5) to (7) are Z1', Z2 'and Z3' are Z1 and Z
2 and Z3 are shown as inverted values.

【0146】なお(5)〜(7)の反転処理は、例えば
CPU(メインプロセッサ)が反転処理用のプログラム
を実行することにより実現してもよい。
The inversion processing of (5) to (7) may be realized by, for example, the CPU (main processor) executing a program for the inversion processing.

【0147】図14(A)(B)は描画時のZテストに
よって選択されるエリアについて説明するための図であ
る。
FIGS. 14A and 14B are views for explaining the areas selected by the Z test at the time of drawing.

【0148】ここで図14(A)は図10(B)と同様
に、描画時のZテストのLESS判定で選択されるエリ
アについて模式的に表した図である。そして図14
(B)は、頂点のZ値を反転させた所与のポリゴンにつ
いて、前記Zバッファ反転処理が施されてLESS化さ
れたデプスデータを用いて、描画処理を行う際にZテス
トのGREATER判定法により選択されるエリアを模
式的に表している。
Here, FIG. 14A is a diagram schematically showing the areas selected by the LESS judgment of the Z test at the time of drawing, similarly to FIG. 10B. And FIG.
(B) is a GREETER determination method of Z test when performing drawing processing by using the depth data LESS-processed by performing the Z buffer inversion processing on a given polygon in which the Z value of the vertex is inverted. The area selected by is schematically shown.

【0149】ここでポリゴン700は頂点のZ値を反転
させたポリゴンであり、Z1’、Z2’、Z3’は、図
10(A)のZ1、Z2、Z3に対して前記(5)〜
(7)式を用いて与えられたものである。
Here, the polygon 700 is a polygon in which the Z value of the apex is inverted, and Z1 ', Z2' and Z3 'are the same as those in (5) to (3) above with respect to Z1, Z2 and Z3 in FIG.
It is given by using the equation (7).

【0150】このため図14(B)のZ軸710’の向
きは、図14(A)のZ軸の向き710とは反対方向に
なっている。
Therefore, the direction of the Z axis 710 'in FIG. 14 (B) is opposite to the direction 710 of the Z axis in FIG. 14 (A).

【0151】また一般にポリゴンを描画する場合には、
ポリゴンの頂点座標(x、y、z)のみが描画プロセッ
サに与えられ、ポリゴン間の各ピクセル(ポリゴン70
0の稜線及び内部の各ピクセル)の頂点座標(x’、
y’、z’)は補間により求められる。ここでzは、反
転された値であるため、これに基づき補間されたz’の
値も反転された値として求められる。すなわち図14
(B)のポリゴン700の稜線及び内部の各ピクセルの
Z値は反転された値となっている。
Generally, when drawing a polygon,
Only the vertex coordinates (x, y, z) of the polygon are given to the drawing processor, and each pixel between the polygons (polygon 70
Vertex coordinates (x ', edge of 0 and each pixel inside)
y ', z') is calculated by interpolation. Here, since z is an inverted value, the value of z ′ interpolated based on this is also obtained as an inverted value. That is, FIG.
The ridge line of the polygon 700 in (B) and the Z value of each internal pixel are inverted values.

【0152】従ってここで基準値Zkに対してZテスト
のGREATER判定を行うと、図14(B)の斜線領
域720’(疑似LESS判定で選択されるエリア)が
選択される。これは、図10(A)に示すようにLES
S判定で選択されるエリアと一致する。
Therefore, if the GREATER judgment of the Z test is performed with respect to the reference value Zk, the shaded area 720 '(the area selected by the pseudo LESS judgment) in FIG. 14B is selected. This is LES as shown in FIG.
It matches the area selected by S judgment.

【0153】このように本実施の形態ではZテストのG
REATER判定の結果を利用して、LESS判定で選
択されるエリア520と同様のエリア720’を選択可
能である。
As described above, in this embodiment, the Z test G
An area 720 ′ similar to the area 520 selected by the LESS determination can be selected using the result of the REATER determination.

【0154】4.本実施の形態の処理 図15は本実施の形態のセルフシャドウ処理の一例につ
いて説明するためのフローチャート図である。
4. Processing of this Embodiment FIG. 15 is a flow chart for explaining an example of the self-shadowing processing of this embodiment.

【0155】まず、光源から見たシーン全体をWork Zbu
fferに対して描画する。(ステップS10)。
First, the whole scene viewed from the light source is Work Zbu
draw on ffer. (Step S10).

【0156】ここにおいてバウンディングボックスを利
用したシーンの設定を行うようにしてもよい。すなわち
全てのオブジェクトのセルフシャドーを行うためには、
シーン内の全てのオブジェクトが、バッファサイズ内に
描画し収まる必要がある。そこでオブジェクト全体のバ
ウンディングボックスを求め、平行光源による平行投影
変換を、画面全域にオブジェクトが収まるように操作す
るようにしてもよい。
Here, the scene may be set using the bounding box. That is, in order to perform self shadow of all objects,
All objects in the scene need to draw and fit within the buffer size. Therefore, the bounding box of the entire object may be obtained, and the parallel projection conversion by the parallel light source may be operated so that the object fits in the entire screen.

【0157】次にWork Z Bufferの内容をWork Effect B
ufferを利用して、反転したデータに変換する(ステッ
プS20)。例えば図11,12で説明したような処理
を行いLESS化したデプスデータを生成する。
Next, the contents of Work Z Buffer are changed to Work Effect B
It is converted into the inverted data by using the uffer (step S20). For example, the processing described with reference to FIGS. 11 and 12 is performed to generate LESS depth data.

【0158】次にWork Effect Bufferをクリアする。
(ステップS30)次にポリゴンをカウントするための
インデックス変数Iの初期設定を行う(ステップS4
0)。
Next, the Work Effect Buffer is cleared.
(Step S30) Next, an index variable I for counting polygons is initialized (step S4).
0).

【0159】次にすべてのポリゴンについて処理が終了
するまで、ステップS50からS100までの処理を行
う。
Next, the processes from steps S50 to S100 are performed until the processes are completed for all the polygons.

【0160】まずインデックス変数Iのインクリメント
を行う(ステップS50)。
First, the index variable I is incremented (step S50).

【0161】次にI≧2の場合には、ポリゴン(I−
1)を、Work Effect Bufferに0xff,0xff,0xff,0xff(RG
BA)で描画する(ステップS60)。これにより前回デ
プステストを行ったポリゴンの描画対象領域を描画の有
無に関わらずクリアすることができる。
Next, when I ≧ 2, the polygon (I-
1) to 0xff, 0xff, 0xff, 0xff (RG
Draw with (BA) (step S60). As a result, the drawing target area of the polygon for which the depth test was performed last time can be cleared regardless of whether or not there is drawing.

【0162】次にポリゴン(I)の光線方向への投影変
換後の各頂点を求め、Z値を0xffffffから引き配列Vの
各要素(XYZ)に代入する(ステップS70)。
Next, each vertex of the polygon (I) after projection conversion in the ray direction is obtained, and the Z value is subtracted from 0xffffff and substituted into each element (XYZ) of the array V (step S70).

【0163】次にWork Z Bufferに対して、GREATER方法
のデプステストにより、配列Vを用いてポリゴンを描画
する(ステップS80)。デプステストにより、真だっ
たピクセルは、Work Effect Bufferに書き込まれること
になる。これにより、図5(D)で説明したような当該
ポリゴンについての影マップが生成される。
Next, a polygon is drawn on the Work Z Buffer using the array V by the depth test of the GREATER method (step S80). Pixels that were true by the depth test will be written to the Work Effect Buffer. As a result, a shadow map for the polygon as described with reference to FIG. 5D is generated.

【0164】次にWork Effect Bufferに書き込まれたデ
ータを、ポリゴン(I)のテクスチャマップとして、視
点から見た視野座標系で、Frame Bufferに対して、ポリ
ゴン(I)を描画する。(ステップS90)。
Next, using the data written in the Work Effect Buffer as a texture map of the polygon (I), the polygon (I) is drawn in the frame buffer in the visual field coordinate system seen from the viewpoint. (Step S90).

【0165】そしてI≧ポリゴン数であれば処理を終了
する(ステップS100)。
If I ≧ the number of polygons, the process ends (step S100).

【0166】5.ポリゴンの拡大処理 図16(A)(B)はある種のハードを用いてセルフシ
ャドウ処理を行う場合に生じる問題点について説明する
ための図である。
5. Polygon Enlargement Processing FIGS. 16 (A) and 16 (B) are diagrams for explaining problems that occur when the self-shadowing processing is performed using a certain type of hardware.

【0167】本来であれば図16(A)のような画像が
生成されるべきところが、ある種のハードを用いてセル
フシャドウ処理を行うと図16(B)に示すような画像
が生成されてしまうという問題点があった。すなわちあ
る種のハードを用いてセルフシャドウ処理を行うと、影
画像のポリゴンとポリゴンの境界部分に隙間750−1
〜750−8が生じてしまう場合があった。
Originally, an image as shown in FIG. 16 (A) should be generated, but if self-shadow processing is performed using some kind of hardware, an image as shown in FIG. 16 (B) is generated. There was a problem that it would end up. That is, when self-shadow processing is performed using a certain kind of hardware, a gap 750-1 is formed at the boundary between polygons in the shadow image.
˜750-8 may occur.

【0168】原因を究明した結果、ある種のハードがポ
リゴンの右辺と下辺を描画しない性質を持っていること
で、右辺、下辺の描画されなかった部分が隙間として現
れていることがわかった。
As a result of investigating the cause, it has been found that a certain kind of hardware has a property of not drawing the right side and the lower side of the polygon, so that the undrawn parts of the right side and the lower side appear as gaps.

【0169】図17(A)(B)はポリゴンの拡大処理
(Fat処理)について説明するための図である。
17A and 17B are diagrams for explaining the polygon enlargement processing (Fat processing).

【0170】図17(A)は、通常のポリゴン760を
用いて、図5(C)で説明したデプステストを行い影マ
ップ766を生成した場合の図である。
FIG. 17A is a diagram showing a case where a shadow map 766 is generated by performing the depth test described with reference to FIG. 5C using a normal polygon 760.

【0171】これに対し図17(B)は、通常のポリゴ
ン760に対して太らせた(拡大した)ポリゴン762
を設定して、当該太らせた(拡大した)ポリゴン762
を用いて、図5(C)で説明したデプステストを行い影
マップ764を生成した場合の図である。図17(B)
の手法によって生成された影マップ764は図17
(A)の手法によって生成された影マップ766に比
べ、より拡大した領域を有している(太った影マップ7
64となっている)。
On the other hand, FIG. 17B shows a polygon 762 that is thicker (enlarged) than the normal polygon 760.
Is set, and the thickened (enlarged) polygon 762 is set.
FIG. 6 is a diagram showing a case where a shadow map 764 is generated by performing the depth test described with reference to FIG. FIG. 17 (B)
The shadow map 764 generated by the method of FIG.
Compared to the shadow map 766 generated by the method (A), it has a larger area (the thick shadow map 7
64).

【0172】本実施の形態では、図17(B)の手法に
より生成した太った影マップ764を用いてプロジェク
ションマッピングを行うため、本来生じるポリゴン間の
隙間を埋めることが可能である。
In this embodiment, since projection mapping is performed using the thick shadow map 764 generated by the method of FIG. 17B, it is possible to fill the gap between polygons that originally occurs.

【0173】図18は、ポリゴンの拡大処理の具体例に
ついて説明するための図である。
FIG. 18 is a diagram for explaining a specific example of polygon enlargement processing.

【0174】通常のポリゴン762の頂点をV1、V
2、V3とすると、通常のポリゴンの重心Gに対して、
前記各頂点V1、V2、V3を所定のスケールで拡大し
た点に新たなV1’、V2’、V3’を設定してこれを
太らせた(拡大した)ポリゴン762の頂点とする。
The vertices of a normal polygon 762 are V1, V
2 and V3, with respect to the center of gravity G of a normal polygon,
New V1 ', V2', and V3 'are set to the points obtained by enlarging each of the vertices V1, V2, and V3 by a predetermined scale, and set as the vertices of the thickened (enlarged) polygon 762.

【0175】図19(A)(B)はセルフシャドウ処理
の対象としないポリゴンを選別する処理について説明す
るための図である。
FIGS. 19A and 19B are views for explaining the processing for selecting polygons which are not the object of self-shadowing processing.

【0176】本実施の形態では予め光源と光源の向きに
よるベクトルと、各ポリゴンの法線ベクトルとを考慮
し、完全に影になるポリゴンか否かを判別する処理を行
う。
In the present embodiment, a process for determining whether or not the polygon is a shadow completely by considering the light source and the vector according to the direction of the light source and the normal vector of each polygon in advance.

【0177】図19(A)のように光源の向き780と
ポリゴン770の法線790の向きが同じ方向を指した
場合、このポリゴン770は影であると判断する。すな
わちポリゴンの法線がたっている面がポリゴンの表面で
あるため、ポリゴン770自体は全面影になっていると
判断する。
When the direction of the light source 780 and the direction of the normal line 790 of the polygon 770 point in the same direction as shown in FIG. 19A, it is determined that the polygon 770 is a shadow. That is, since the surface on which the normal line of the polygon is formed is the surface of the polygon, it is determined that the polygon 770 itself is a full shadow.

【0178】また図19(B)のように、光源の向き7
82とポリゴンの法線の向き792がが役方向を指した
場合、このポリゴン772は影でないと判断する。但
し、オブジェクト空間のシーンによるセルフシャドーの
影は、このような状態に影が発生する為、この判断の時
だけセルフシャドーの処理を行う。
In addition, as shown in FIG.
When 82 and the direction 792 of the normal line of the polygon point to the winning combination direction, it is determined that the polygon 772 is not a shadow. However, since the shadow of the self shadow due to the scene in the object space is generated in such a state, the self shadow processing is performed only at this determination.

【0179】このような処理を行うことによりセルフシ
ャドー処理に伴う処理付加を軽減し、画像のノイズを減
少させることできる。
By performing such processing, it is possible to reduce the processing addition accompanying the self-shadow processing and reduce the noise of the image.

【0180】6.ハードウェア構成 次に、本実施形態を実現できるハードウェアの構成の一
例について図20を用いて説明する。
6. Hardware Configuration Next, an example of a hardware configuration capable of realizing the present embodiment will be described with reference to FIG.

【0181】メインプロセッサ900は、CD982
(情報記憶媒体)に格納されたプログラム、通信インタ
ーフェース990を介して転送されたプログラム、或い
はROM950(情報記憶媒体の1つ)に格納されたプ
ログラムなどに基づき動作し、ゲーム処理、画像処理、
音処理などの種々の処理を実行する。
The main processor 900 is a CD982.
It operates based on a program stored in the (information storage medium), a program transferred via the communication interface 990, a program stored in the ROM 950 (one of the information storage media), game processing, image processing,
Various processing such as sound processing is executed.

【0182】コプロセッサ902は、メインプロセッサ
900の処理を補助するものであり、高速並列演算が可
能な積和算器や除算器を有し、マトリクス演算(ベクト
ル演算)を高速に実行する。例えば、オブジェクトを移
動させたり動作(モーション)させるための物理シミュ
レーションに、マトリクス演算などの処理が必要な場合
には、メインプロセッサ900上で動作するプログラム
が、その処理をコプロセッサ902に指示(依頼)す
る。
The coprocessor 902 assists the processing of the main processor 900, has a product-sum calculator and a divider capable of high-speed parallel calculation, and executes matrix calculation (vector calculation) at high speed. For example, when a physical simulation for moving or moving an object requires a process such as a matrix calculation, a program operating on the main processor 900 instructs (requests) the coprocessor 902 to perform the process. ) Do.

【0183】ジオメトリプロセッサ904は、座標変
換、透視変換、光源計算、曲面生成などのジオメトリ処
理を行うものであり、高速並列演算が可能な積和算器や
除算器を有し、マトリクス演算(ベクトル演算)を高速
に実行する。例えば、座標変換、透視変換、光源計算な
どの処理を行う場合には、メインプロセッサ900で動
作するプログラムが、その処理をジオメトリプロセッサ
904に指示する。
The geometry processor 904 performs geometry processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation, has a product-sum calculator and a divider capable of high-speed parallel calculation, and performs matrix calculation (vector calculation). Calculation) is executed at high speed. For example, when processing such as coordinate transformation, perspective transformation, and light source calculation is performed, the program running on the main processor 900 instructs the geometry processor 904 to perform the processing.

【0184】データ伸張プロセッサ906は、圧縮され
た画像データや音データを伸張するデコード処理を行っ
たり、メインプロセッサ900のデコード処理をアクセ
レートする処理を行う。これにより、オープニング画
面、インターミッション画面、エンディング画面、或い
はゲーム画面などにおいて、所与の画像圧縮方式で圧縮
された動画像を表示できるようになる。なお、デコード
処理の対象となる画像データや音データは、ROM95
0、CD982に格納されたり、或いは通信インターフ
ェース990を介して外部から転送される。
The data decompression processor 906 performs a decoding process for decompressing the compressed image data and sound data, and a process for accelerating the decoding process of the main processor 900. Accordingly, a moving image compressed by a given image compression method can be displayed on the opening screen, the intermission screen, the ending screen, the game screen, or the like. The image data and sound data to be decoded are stored in the ROM 95.
0, stored in the CD 982, or transferred from outside via the communication interface 990.

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

【0186】サウンドプロセッサ930は、多チャンネ
ルのADPCM音源などを内蔵し、BGM、効果音、音
声などの高品位のゲーム音を生成する。生成されたゲー
ム音は、スピーカ932から出力される。
The sound processor 930 incorporates a multi-channel ADPCM sound source and the like and generates high-quality game sounds such as BGM, sound effects, and voice. The generated game sound is output from the speaker 932.

【0187】ゲームコントローラ942からの操作デー
タや、メモリカード944からのセーブデータ、個人デ
ータは、シリアルインターフェース940を介してデー
タ転送される。
The operation data from the game controller 942, save data from the memory card 944, and personal data are transferred via the serial interface 940.

【0188】ROM950にはシステムプログラムなど
が格納される。なお、業務用ゲームシステムの場合に
は、ROM950が情報記憶媒体として機能し、ROM
950に各種プログラムが格納されることになる。な
お、ROM950の代わりにハードディスクを利用する
ようにしてもよい。
The ROM 950 stores system programs and the like. In the case of the arcade game system, the ROM 950 functions as an information storage medium,
Various programs are stored in 950. A hard disk may be used instead of the ROM 950.

【0189】RAM960は、各種プロセッサの作業領
域として用いられる。
The RAM 960 is used as a work area for various processors.

【0190】DMAコントローラ970は、プロセッ
サ、メモリ(RAM、VRAM、ROM等)間でのDM
A転送を制御するものである。
The DMA controller 970 is a DM between processors and memories (RAM, VRAM, ROM, etc.).
It controls the A transfer.

【0191】CDドライブ980は、プログラム、画像
データ、或いは音データなどが格納されるCD982
(情報記憶媒体)を駆動し、これらのプログラム、デー
タへのアクセスを可能にする。
The CD drive 980 is a CD 982 for storing programs, image data, sound data and the like.
(Information storage medium) is driven to enable access to these programs and data.

【0192】通信インターフェース990は、ネットワ
ークを介して外部との間でデータ転送を行うためのイン
ターフェースである。この場合に、通信インターフェー
ス990に接続されるネットワークとしては、通信回線
(アナログ電話回線、ISDN)、高速シリアルバスな
どを考えることができる。そして、通信回線を利用する
ことでインターネットを介したデータ転送が可能にな
る。また、高速シリアルバスを利用することで、他のゲ
ームシステム、他のゲームシステムとの間でのデータ転
送が可能になる。
The communication interface 990 is an interface for transferring data with the outside through the network. In this case, a communication line (analog telephone line, ISDN), high-speed serial bus, or the like can be considered as the network connected to the communication interface 990. Then, by using the communication line, data transfer via the Internet becomes possible. Further, by using the high-speed serial bus, it becomes possible to transfer data to / from another game system or another game system.

【0193】なお、本発明の各手段は、その全てを、ハ
ードウェアのみにより実行してもよいし、情報記憶媒体
に格納されるプログラムや通信インターフェースを介し
て配信されるプログラムのみにより実行してもよい。或
いは、ハードウェアとプログラムの両方により実行して
もよい。
Note that each of the means of the present invention may be executed entirely by hardware or only by a program stored in an information storage medium or a program distributed via a communication interface. Good. Alternatively, it may be executed by both hardware and a program.

【0194】そして、本発明の各手段をハードウェアと
プログラムの両方により実行する場合には、情報記憶媒
体には、本発明の各手段をハードウェアを利用して実行
するためのプログラムが格納されることになる。より具
体的には、上記プログラムが、ハードウェアである各プ
ロセッサ902、904、906、910、930等に
処理を指示すると共に、必要であればデータを渡す。そ
して、各プロセッサ902、904、906、910、
930等は、その指示と渡されたデータとに基づいて、
本発明の各手段を実行することになる。
When each means of the present invention is executed by both hardware and a program, the information storage medium stores a program for executing each means of the present invention using hardware. Will be. More specifically, the program instructs each processor 902, 904, 906, 910, 930, which is hardware, to perform processing, and passes data if necessary. Then, each processor 902, 904, 906, 910,
930 etc., based on the instruction and the passed data,
Each means of the present invention will be implemented.

【0195】図21(A)に、本実施形態を業務用ゲー
ムシステムに適用した場合の例を示す。プレーヤは、デ
ィスプレイ1100上に映し出されたゲーム画像を見な
がら、レバー1102、ボタン1104等を操作してゲ
ームを楽しむ。内蔵されるシステムボード(サーキット
ボード)1106には、各種プロセッサ、各種メモリな
どが実装される。そして、本発明の各手段を実行するた
めの情報(プログラム又はデータ)は、システムボード
1106上の情報記憶媒体であるメモリ1108に格納
される。以下、この情報を格納情報と呼ぶ。
FIG. 21A shows an example in which this embodiment is applied to an arcade game system. The player enjoys the game by operating the lever 1102, the buttons 1104, etc. while watching the game image displayed on the display 1100. Various processors, various memories, etc. are mounted on the built-in system board (circuit board) 1106. Information (program or data) for executing each unit of the present invention is stored in the memory 1108 which is an information storage medium on the system board 1106. Hereinafter, this information will be referred to as stored information.

【0196】図21(B)に、本実施形態を家庭用のゲ
ームシステムに適用した場合の例を示す。プレーヤはデ
ィスプレイ1200に映し出されたゲーム画像を見なが
ら、ゲームコントローラ1202、1204を操作して
ゲームを楽しむ。この場合、上記格納情報は、本体シス
テムに着脱自在な情報記憶媒体であるCD1206、或
いはメモリカード1208、1209等に格納されてい
る。
FIG. 21B shows an example in which this embodiment is applied to a home game system. While watching the game image displayed on the display 1200, the player operates the game controllers 1202 and 1204 to enjoy the game. In this case, the above-mentioned stored information is stored in the CD 1206 or the memory cards 1208, 1209, which is an information storage medium that can be detachably attached to the main body system.

【0197】図21(C)に、ホスト装置1300と、
このホスト装置1300とネットワーク1302(LA
Nのような小規模ネットワークや、インターネットのよ
うな広域ネットワーク)を介して接続される端末130
4-1〜1304-nとを含むシステムに本実施形態を適用
した場合の例を示す。この場合、上記格納情報は、例え
ばホスト装置1300が制御可能な磁気ディスク装置、
磁気テープ装置、メモリ等の情報記憶媒体1306に格
納されている。端末1304-1〜1304-nが、スタン
ドアロンでゲーム画像、ゲーム音を生成できるものであ
る場合には、ホスト装置1300からは、ゲーム画像、
ゲーム音を生成するためのゲームプログラム等が端末1
304-1〜1304-nに配送される。一方、スタンドア
ロンで生成できない場合には、ホスト装置1300がゲ
ーム画像、ゲーム音を生成し、これを端末1304-1〜
1304-nに伝送し端末において出力することになる。
FIG. 21C shows a host device 1300,
This host device 1300 and network 1302 (LA
A terminal 130 connected via a small network such as N or a wide area network such as the Internet)
An example in which the present embodiment is applied to a system including 4-1 to 1304-n will be described. In this case, the stored information is, for example, a magnetic disk device that can be controlled by the host device 1300,
It is stored in an information storage medium 1306 such as a magnetic tape device or a memory. When the terminals 1304-1 to 1304-n are capable of standalone generation of game images and game sounds, the host device 1300 sends game images,
A game program or the like for generating a game sound is provided on the terminal 1
It is delivered to 304-1 to 1304-n. On the other hand, when it cannot be generated standalone, the host device 1300 generates a game image and a game sound, and the terminal device 1304-1 ...
It will be transmitted to 1304-n and output at the terminal.

【0198】なお、図21(C)の構成の場合に、本発
明の各手段を、ホスト装置(サーバー)と端末とで分散
して実行するようにしてもよい。また、本発明の各手段
を実行するための上記格納情報を、ホスト装置(サーバ
ー)の情報記憶媒体と端末の情報記憶媒体に分散して格
納するようにしてもよい。
In the case of the configuration of FIG. 21C, each means of the present invention may be distributed and executed by the host device (server) and the terminal. Further, the above stored information for executing each means of the present invention may be distributed and stored in the information storage medium of the host device (server) and the information storage medium of the terminal.

【0199】またネットワークに接続する端末は、家庭
用ゲームシステムであってもよいし業務用ゲームシステ
ムであってもよい。そして、業務用ゲームシステムをネ
ットワークに接続する場合には、業務用ゲームシステム
との間で情報のやり取りが可能であると共に家庭用ゲー
ムシステムとの間でも情報のやり取りが可能なセーブ用
情報記憶装置(メモリカード、携帯型ゲーム装置)を用
いることが望ましい。
The terminal connected to the network may be a home game system or an arcade game system. When the arcade game system is connected to a network, a save information storage device is capable of exchanging information with the arcade game system and also with the home game system. (Memory card, portable game device) is preferably used.

【0200】なお本発明は、上記実施形態で説明したも
のに限らず、種々の変形実施が可能である。
The present invention is not limited to that described in the above embodiment, and various modifications can be made.

【0201】例えば、本発明のうち従属請求項に係る発
明においては、従属先の請求項の構成要件の一部を省略
する構成とすることもできる。また、本発明の1の独立
請求項に係る発明の要部を、他の独立請求項に従属させ
ることもできる。
For example, in an invention according to a dependent claim in the present invention, it is possible to omit a part of the constituent elements of the claim on which the invention is dependent. Further, a main part of the invention according to one independent claim of the present invention can be made dependent on another independent claim.

【0202】また本実施の形態では、光源からみたシー
ンを生成する場合に光源が平行光源であり、光源からの
光線方向に投影変換を行う場合を例にとり説明したがこ
れに限られない。例えば光源が点光源またはスポット光
源である場合に、光源を視点として透視変換を行う場合
でもよい。
In the present embodiment, the case where the light source is a parallel light source when the scene viewed from the light source is generated and the projection conversion is performed in the light ray direction from the light source has been described as an example, but the present invention is not limited to this. For example, when the light source is a point light source or a spot light source, perspective transformation may be performed with the light source as the viewpoint.

【0203】また本実施の形態では、Zバッファ反転処
理をアルファ減算処理を利用した描画処理を行い実現す
る場合を例にとり説明したがこれに限られない。例えば
他の手法によりZバッファのZ値を反転させる場合でも
よい。
In the present embodiment, the case where the Z buffer inversion process is realized by performing the drawing process using the alpha subtraction process has been described as an example, but the present invention is not limited to this. For example, the Z value of the Z buffer may be inverted by another method.

【0204】また本実施の形態では、Zテストの判定手
法としてLESS判定及びGREATER判定という名
称を用いたが、異なる名称であっても同様の機能を実現
する判定手法であればよい。
Further, in the present embodiment, the names LESS judgment and GREATER judgment are used as the Z test judgment method, but different judgment names may be used as long as the same functions are realized.

【0205】また本実施の形態では、視点に近いほどZ
値の値が大きく視点から離れるほどZ値が小さくなる場
合を例にとり説明したがこれに限られない。例えば視点
に近いほどZ値の値が小さく視点から離れるほどZ値が
大きくなる場合でもよい。
Further, in this embodiment, the closer to the viewpoint, the Z
The case has been described as an example in which the Z value decreases as the value increases and the distance from the viewpoint increases, but the present invention is not limited to this. For example, the Z value may be smaller as it is closer to the viewpoint, and may be larger as it is farther from the viewpoint.

【0206】また本発明は、業務用ゲームシステム、家
庭用ゲームシステム、多数のプレーヤが参加する大型ア
トラクションシステム、シミュレータ、マルチメディア
端末、ゲーム画像を生成するシステムボード等の種々の
ゲームシステムに適用できる。
Further, the present invention can be applied to various game systems such as an arcade game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, and a system board for generating a game image. .

【図面の簡単な説明】[Brief description of drawings]

【図1】本実施形態のブロック図の一例である。FIG. 1 is an example of a block diagram of the present embodiment.

【図2】本実施の形態のセルフシャドウ処理が施された
画像の一例である。
FIG. 2 is an example of an image subjected to self-shadowing according to the present embodiment.

【図3】セルフシャドウ処理を行う際に使用するVRA
Mの作業用バッファについて説明するための図である。
FIG. 3 is a VRA used when performing a self-shadowing process.
It is a figure for demonstrating the work buffer of M.

【図4】図4(A)(B)は光源からみたオブジェクト
空間のデプスデータ(シーン全体のデプスデータ)につ
いて説明するための図である。
4A and 4B are diagrams for explaining depth data of an object space viewed from a light source (depth data of an entire scene).

【図5】図5(A)〜(D)は、デプスデータまたはL
ESS化したデプスデータ(奥行き情報)を用いてオブ
ジェクト空間を構成する所与のプリミティブ面に対応し
た影マップを生成する処理について説明するための図で
ある。
5 (A) to (D) are depth data or L. FIG.
It is a figure for demonstrating the process which produces | generates the shadow map corresponding to the given primitive surface which comprises an object space using the ESS-ized depth data (depth information).

【図6】生成した影マップを使い、Frame Bufferにポリ
ゴンを描画する様子を説明するための図である。
FIG. 6 is a diagram for explaining how to draw a polygon in a frame buffer using the generated shadow map.

【図7】オブジェクト空間に配置された2枚のポリゴン
を視点座標系からみた完成図である。
FIG. 7 is a completed view of two polygons arranged in an object space as viewed from a viewpoint coordinate system.

【図8】図8(A)(B)は、Work Z BufferとWork Ef
fect BufferとFrame Bufferの関係を説明するための模
式的な図である。
8A and 8B show Work Z Buffer and Work Ef.
It is a schematic diagram for explaining the relationship between fect buffer and frame buffer.

【図9】影マップを視点から見た物体に貼り付けるため
プロジェクションマッピングについて説明するための図
である。
FIG. 9 is a diagram illustrating projection mapping for attaching a shadow map to an object viewed from a viewpoint.

【図10】図10(A)(B)はGREATER判定と
LESS判定について説明するための模式的な図であ
る。
10A and 10B are schematic diagrams for explaining a GREATER determination and a LESS determination.

【図11】LESS化されたデプスデータを生成処理に
ついて説明するための模式的な図である。
FIG. 11 is a schematic diagram for explaining a process of generating LESS-ized depth data.

【図12】α減算処理を用いてWork Z Bufferの内容を
反転させる処理について説明するための模式的な図であ
る。
FIG. 12 is a schematic diagram for explaining a process of inverting the contents of Work Z Buffer using α subtraction processing.

【図13】光源からみた投影変換を行った所与のポリゴ
ンの頂点のZ値を反転させる処理について説明するため
の図である。
FIG. 13 is a diagram for explaining a process of inverting the Z value of the apex of a given polygon that has undergone projection conversion as seen from the light source.

【図14】図14(A)(B)は描画時のZテストによ
って選択されるエリアについて説明するための図であ
る。
14A and 14B are diagrams for explaining an area selected by a Z test at the time of drawing.

【図15】図15は本実施の形態のセルフシャドウ処理
の一例について説明するためのフローチャート図であ
る。
FIG. 15 is a flowchart for explaining an example of self-shadowing processing according to the present embodiment.

【図16】図16(A)(B)はある種のハードを用い
てセルフシャドウ処理を行う場合に生じる問題点につい
て説明するための図である。
16 (A) and 16 (B) are views for explaining a problem that occurs when self-shadow processing is performed using a certain type of hardware.

【図17】図17(A)(B)はポリゴンのFat処理
について説明するための図である。
17A and 17B are diagrams for explaining the Fat process for polygons.

【図18】本実施の形態のポリゴンの拡大処理の具体例
について説明するための図である。
FIG. 18 is a diagram for explaining a specific example of polygon enlargement processing according to the present embodiment.

【図19】図19(A)(B)はセルフシャドウ処理の
対象としないポリゴンを選別する処理について説明する
ための図である。
19A and 19B are diagrams for explaining a process of selecting polygons that are not the target of the self-shadowing process.

【図20】本実施形態のハードウェアの構成の一例につ
いて説明するための図である。
FIG. 20 is a diagram for explaining an example of a hardware configuration of the present embodiment.

【図21】図21(A)、(B)、(C)は、本実施形
態が適用される種々の形態のシステムの例を示す図であ
る。
21 (A), (B), and (C) are diagrams showing examples of various types of systems to which the present embodiment is applied.

【図22】シャドウマップを行う際に生成する影テクス
チャについて説明するための図である。
FIG. 22 is a diagram for explaining a shadow texture generated when performing a shadow map.

【図23】シャドウマップの手法により椅子オブジェク
トの影を床壁オブジェクトにつける場合について説明す
るための図である。
FIG. 23 is a diagram for explaining a case where a shadow of a chair object is added to a floor wall object by a shadow map method.

【図24】シャドウマップの手法を用いてあるオブジェ
クトの影を自分自身につける場合の様子を示した図であ
る。
FIG. 24 is a diagram showing a state in which a shadow of an object is added to oneself using a shadow map method.

【符号の説明】[Explanation of symbols]

100 処理部 110 ゲーム処理部 130 画像生成部 140 セルフシャドー処理部 160 操作部 170 記憶部 172 メインメモリ 174 フレームバッファ 180 情報記憶媒体 190 表示部 192 音出力部 194 セーブ用情報記憶装置 196 通信部 100 processing unit 110 Game processing unit 130 Image generator 140 Self-shadow processing section 160 Operation part 170 storage 172 main memory 174 frame buffer 180 Information storage medium 190 Display 192 sound output section 194 Information storage device for saving 196 Communications Department

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2C001 BA03 BA05 BA06 BC05 BC08 CA02 CB01 CB02 CB04 CB06 CB08 CC01 CC08 DA04 5B050 BA09 BA18 EA12 EA28 EA30 FA02 5B080 AA13 BA04 BA07 CA01 CA05 CA07 GA02 GA22    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 2C001 BA03 BA05 BA06 BC05 BC08                       CA02 CB01 CB02 CB04 CB06                       CB08 CC01 CC08 DA04                 5B050 BA09 BA18 EA12 EA28 EA30                       FA02                 5B080 AA13 BA04 BA07 CA01 CA05                       CA07 GA02 GA22

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】 画像生成を行うシステムであって、 光源からみたオブジェクト空間のデプスデータをピクセ
ル単位に求める手段と、 オブジェクト空間を構成する所与のプリミティブ面にオ
ブジェクト空間によって落とされる影エリアを、光源か
らみたオブジェクト空間のデプスデータを用いて特定
し、当該影エリアに基づいて所与のプリミティブ面に対
応した影画像を生成する影画像生成処理手段と、 前記影画像を対応するプリミティブ面にマッピングし
て、所与の視点からみたオブジェクト空間の画像を生成
する処理を行う手段と、 を含むことを特徴とする画像生成システム。
1. A system for generating an image, comprising means for obtaining depth data of an object space as seen from a light source in pixel units, and a shadow area cast by the object space on a given primitive surface forming the object space. Shadow image generation processing means for generating a shadow image corresponding to a given primitive surface based on the shadow area, which is specified by using depth data of the object space viewed from the light source, and the shadow image is mapped to the corresponding primitive surface. And a means for performing a process for generating an image of the object space viewed from a given viewpoint, and an image generation system characterized by the following.
【請求項2】 請求項1において、 影画像生成処理手段は、 光源からみた所与のプリミティブ面に関連して与えられ
るデプス値と光源からオブジェクト空間をみたシーンの
デプス値を比較して、光源からみた所与のプリミティブ
面の描画領域のなかで、オブジェクト空間に存在するオ
ブジェクトによって光源からの光が遮られる領域を判定
して、前記所与のプリミティブ面にオブジェクト空間に
よって落とされる影エリアを特定する処理を行うことを
特徴とする画像生成システム。
2. The shadow image generation processing means according to claim 1, wherein the depth value given in relation to a given primitive surface viewed from the light source is compared with the depth value of the scene viewed from the light source to the object space, and the light source is compared. In the drawing area of the given primitive surface viewed, the area in which the light from the light source is blocked by the object existing in the object space is determined, and the shadow area cast by the object space on the given primitive surface is specified. An image generation system characterized by performing a process.
【請求項3】 請求項1または2のいずれかにおいて、 光源からみたオブジェクト空間のデプスデータとは、オ
ブジェクト空間を光源からみて透視または投影変換した
シーンのデプスデータであり、 光源からみて透視変換または投影変換した後の所与のプ
リミティブ面の構成点のデプス値と光源からみたオブジ
ェクト空間のデプスデータに基づいて所与の判定法を用
いたデプステストを行い所与のプリミティブ面に対応し
た影画像を生成することを特徴とする画像生成システ
ム。
3. The depth data of the object space as seen from the light source according to claim 1, is the depth data of a scene perspectively or projectively transformed from the light source of the object space. A shadow image corresponding to a given primitive surface is subjected to a depth test using a given judgment method based on the depth values of the constituent points of the given primitive surface after projection conversion and the depth data of the object space viewed from the light source. An image generation system characterized by generating.
【請求項4】 請求項1乃至3のいずれかにおいて、 光源からみて透視変換または投影変換した後の所与のプ
リミティブ面の構成点の座標に基づき、前記影画像を対
応するプリミティブ面にマッピングする際のテクスチャ
コーディネート座標を決定してマッピング処理を行うこ
とを特徴とする画像生成システム。
4. The shadow image according to any one of claims 1 to 3, wherein the shadow image is mapped to a corresponding primitive surface based on the coordinates of the constituent points of a given primitive surface after perspective transformation or projection transformation viewed from the light source. An image generation system characterized by performing texture mapping processing by determining texture coordinate coordinates.
【請求項5】 請求項1乃至4のいずれかにおいて、 影画像生成処理手段は、 透視変換または投影変換した後の所与のプリミティブ面
の構成点のデプス値を反転させる処理を行う手段と、 光源からみたオブジェクト空間のデプスデータを保持す
るZバッファを反転させるZバッファ反転処理手段と、 構成点のデプス値が反転された所与のプリミティブ面に
ついて、前記Zバッファ反転処理が施されたZバッファ
を用いて、デプステストの所定の判定法を用いて描画処
理を行う手段とを含むことを特徴とする画像生成システ
ム。
5. The shadow image generation processing means according to claim 1, wherein the shadow image generation processing means performs processing of inverting the depth value of a constituent point of a given primitive surface after perspective transformation or projection transformation, Z buffer inversion processing means for inverting the Z buffer holding the depth data of the object space viewed from the light source, and Z buffer subjected to the Z buffer inversion processing for a given primitive surface in which the depth values of constituent points are inverted. And a means for performing a drawing process by using a predetermined determination method of the depth test.
【請求項6】 請求項1乃至5のいずれかにおいて、 所与のプリミティブ面がポリゴンとして構成されている
場合に、所与の拡大処理を施して拡大したポリゴンを用
いて所与のプリミティブ面に対応した影画像を生成する
処理を行うことを特徴とする画像生成システム。
6. The polygon according to any one of claims 1 to 5, wherein when a given primitive surface is configured as a polygon, the given primitive surface is added to the given primitive surface by using the polygon enlarged by a given enlargement process. An image generation system characterized by performing a process of generating a corresponding shadow image.
【請求項7】 請求項6において、 前記ポリゴンの頂点を当該ポリゴンの重心から所与のス
ケールで拡大した点にずらすことでポリゴンを拡大させ
ることを特徴とする画像生成システム。
7. The image generation system according to claim 6, wherein the polygon is enlarged by shifting the vertex of the polygon from a center of gravity of the polygon to a point enlarged by a given scale.
【請求項8】 請求項1乃至7のいずれかにおいて、 所与のプリミティブ面がポリゴンとして構成されている
場合に、ポリゴンの向きと光源の光線の向きによって、
影画像生成処理の対象となるプリミティブ面を判定し、
処理対象となるプリミティブ面についてのみ影画像生成
処理を行うことを特徴とする画像生成システム。
8. The method according to claim 1, wherein when a given primitive surface is configured as a polygon, depending on the direction of the polygon and the direction of the ray of the light source,
Determine the primitive surface that is the target of shadow image generation processing,
An image generation system characterized by performing a shadow image generation process only on a primitive surface to be processed.
【請求項9】 請求項1乃至8のいずれかにおいて、 オブジェクト空間を構成するオブジェクトが所与のバウ
ンディングボックスに収まるように構成することを特徴
とする画像生成システム。
9. The image generation system according to claim 1, wherein the objects forming the object space are configured to fit in a given bounding box.
【請求項10】 コンピュータが実行可能なプログラム
であって、 光源からみたオブジェクト空間のデプスデータをピクセ
ル単位に求める手段と、 オブジェクト空間を構成する所与のプリミティブ面にオ
ブジェクト空間によって落とされる影エリアを、光源か
らみたオブジェクト空間のデプスデータを用いて特定
し、当該影エリアに基づいて所与のプリミティブ面に対
応した影画像を生成する影画像生成処理手段と、 前記影画像を対応するプリミティブ面にマッピングし
て、所与の視点からみたオブジェクト空間の画像を生成
する処理を行う手段と、 をコンピュータに実現させることを特徴とするプログラ
ム。
10. A computer-executable program for obtaining depth data of an object space viewed from a light source in pixel units, and a shadow area cast by the object space on a given primitive surface forming the object space. , Shadow image generation processing means for generating a shadow image corresponding to a given primitive surface based on the shadow area, which is specified using the depth data of the object space viewed from the light source, and the shadow image to the corresponding primitive surface. A program for causing a computer to realize means for performing a process of performing mapping to generate an image of an object space viewed from a given viewpoint.
【請求項11】 請求項10において、 光源からみた所与のプリミティブ面に関連して与えられ
るデプス値と光源からオブジェクト空間をみたシーンの
デプス値を比較して、光源からみた所与のプリミティブ
面の描画領域のなかで、オブジェクト空間に存在するオ
ブジェクトによって光源からの光が遮られる領域を判定
して、前記所与のプリミティブ面にオブジェクト空間に
よって落とされる影エリアを特定する処理を行うことを
特徴とするプログラム。
11. The given primitive surface viewed from the light source according to claim 10, wherein the depth value given in relation to the given primitive surface viewed from the light source is compared with the depth value of the scene viewed from the light source to the object space. Among the drawing areas of, the area in which the light from the light source is blocked by the object existing in the object space is determined, and the shadow area cast by the object space on the given primitive surface is specified. And the program.
【請求項12】 請求項10または11のいずれかにお
いて、 光源からみたオブジェクト空間のデプスデータとは、オ
ブジェクト空間を光源からみて透視または投影変換した
シーンのデプスデータであり、 光源からみて透視変換または投影変換した後の所与のプ
リミティブ面の構成点のデプス値と光源からみたオブジ
ェクト空間のデプスデータに基づいて所与の判定法を用
いたデプステストを行い所与のプリミティブ面に対応し
た影画像を生成することを特徴とするプログラム。
12. The depth data of an object space as viewed from a light source according to claim 10, wherein the depth data of a scene is a perspective view or a projection conversion of the object space viewed from the light source, and the perspective data is A shadow image corresponding to a given primitive surface is subjected to a depth test using a given judgment method based on the depth values of the constituent points of the given primitive surface after projection conversion and the depth data of the object space viewed from the light source. A program characterized by generating.
【請求項13】 請求項10乃至12のいずれかにおい
て、 光源からみて透視変換または投影変換した後の所与のプ
リミティブ面の構成点の座標に基づき、前記影画像を対
応するプリミティブ面にマッピングする際のテクスチャ
コーディネート座標を決定してマッピング処理を行うこ
とを特徴とするプログラム。
13. The shadow image according to claim 10, wherein the shadow image is mapped to a corresponding primitive surface based on coordinates of constituent points of a given primitive surface after perspective transformation or projection transformation viewed from a light source. A program characterized by determining texture coordinate coordinates at the time and performing mapping processing.
【請求項14】 請求項10乃至13のいずれかにおい
て、 影画像生成処理手段として、 透視変換または投影変換した後の所与のプリミティブ面
の構成点のデプス値を反転させる処理を行う手段と、 光源からみたオブジェクト空間のデプスデータを保持す
るZバッファを反転させるZバッファ反転処理手段と、 構成点のデプス値が反転された所与のプリミティブ面に
ついて、前記Zバッファ反転処理が施されたZバッファ
を用いて、デプステストの所定の判定法を用いて描画処
理を行う手段とをコンピュータに実現させることを特徴
とするプログラム。
14. The shadow image generation processing means according to claim 10, wherein the shadow image generation processing means is means for inverting the depth values of the constituent points of a given primitive surface after perspective transformation or projection transformation, Z buffer inversion processing means for inverting the Z buffer holding the depth data of the object space viewed from the light source, and Z buffer subjected to the Z buffer inversion processing for a given primitive surface in which the depth values of constituent points are inverted. A program for causing a computer to realize a means for performing a drawing process using a predetermined determination method of a depth test by using the computer.
【請求項15】 請求項10乃至14のいずれかにおい
て、 所与のプリミティブ面がポリゴンとして構成されている
場合に、所与の拡大処理を施して拡大したポリゴンを用
いて所与のプリミティブ面に対応した影画像を生成する
処理を行うことを特徴とするプログラム。
15. The polygon according to claim 10, wherein, when a given primitive surface is configured as a polygon, a polygon enlarged by a given enlargement process is used to form a given primitive surface. A program that performs a process of generating a corresponding shadow image.
【請求項16】 請求項15において、 前記ポリゴンの頂点を当該ポリゴンの重心から所与のス
ケールで拡大した点にずらすことでポリゴンを拡大させ
ることを特徴とするプログラム。
16. The program according to claim 15, wherein the polygon is enlarged by shifting a vertex of the polygon from a center of gravity of the polygon to a point enlarged by a given scale.
【請求項17】 請求項10乃至16のいずれかにおい
て、 所与のプリミティブ面がポリゴンとして構成されている
場合に、ポリゴンの向きと光源の光線の向きによって、
影画像生成処理の対象となるプリミティブ面を判定し、
処理対象となるプリミティブ面についてのみ影画像生成
処理を行うことを特徴とするプログラム。
17. The method according to claim 10, wherein when a given primitive surface is configured as a polygon, depending on the direction of the polygon and the direction of the ray of the light source,
Determine the primitive surface that is the target of shadow image generation processing,
A program characterized by performing a shadow image generation process only on a primitive surface to be processed.
【請求項18】 請求項10乃至17のいずれかにおい
て、 オブジェクト空間を構成するオブジェクトが所与のバウ
ンディングボックスに収まるように構成することを特徴
とするプログラム。
18. A program according to any one of claims 10 to 17, characterized in that an object forming an object space is contained in a given bounding box.
【請求項19】 コンピュータにより読みとり可能な情
報記憶媒体であって、請求項10乃至18のいずれかの
プログラムを含むことを特徴とする情報記憶媒体。
19. An information storage medium readable by a computer, comprising the program according to any one of claims 10 to 18.
【請求項20】 画像生成を行う方法であって、 光源からみたオブジェクト空間のデプスデータをピクセ
ル単位に求めるステップと、 オブジェクト空間を構成する所与のプリミティブ面にオ
ブジェクト空間によって落とされる影エリアを、光源か
らみたオブジェクト空間のデプスデータを用いて特定
し、当該影エリアに基づいて所与のプリミティブ面に対
応した影画像を生成するステップと、 前記影画像を対応するプリミティブ面にマッピングし
て、所与の視点からみたオブジェクト空間の画像を生成
する処理を行うステップと、 を含むことを特徴とする画像生成方法。
20. A method of generating an image, comprising the steps of obtaining depth data of an object space viewed from a light source in pixel units, and a shadow area cast by the object space on a given primitive surface forming the object space. Identifying using the depth data of the object space viewed from the light source, generating a shadow image corresponding to a given primitive surface based on the shadow area, and mapping the shadow image to the corresponding primitive surface, An image generation method comprising: a process of generating an image of an object space viewed from a given viewpoint.
JP2001303046A 2001-09-28 2001-09-28 Image generation system, program and information storage medium Withdrawn JP2003109035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001303046A JP2003109035A (en) 2001-09-28 2001-09-28 Image generation system, program and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001303046A JP2003109035A (en) 2001-09-28 2001-09-28 Image generation system, program and information storage medium

Publications (1)

Publication Number Publication Date
JP2003109035A true JP2003109035A (en) 2003-04-11

Family

ID=19123192

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001303046A Withdrawn JP2003109035A (en) 2001-09-28 2001-09-28 Image generation system, program and information storage medium

Country Status (1)

Country Link
JP (1) JP2003109035A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346417A (en) * 2004-06-03 2005-12-15 Sega Corp Method for controlling display of object image by virtual three-dimensional coordinate polygon and image display device using the method
JP2008234473A (en) * 2007-03-22 2008-10-02 Canon Inc Image processor and its control method
CN112316420A (en) * 2020-11-05 2021-02-05 网易(杭州)网络有限公司 Model rendering method, device, equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346417A (en) * 2004-06-03 2005-12-15 Sega Corp Method for controlling display of object image by virtual three-dimensional coordinate polygon and image display device using the method
JP4513423B2 (en) * 2004-06-03 2010-07-28 株式会社セガ Object image display control method using virtual three-dimensional coordinate polygon and image display apparatus using the same
JP2008234473A (en) * 2007-03-22 2008-10-02 Canon Inc Image processor and its control method
US8243061B2 (en) 2007-03-22 2012-08-14 Canon Kabushiki Kaisha Image processing apparatus and method of controlling operation of same
CN112316420A (en) * 2020-11-05 2021-02-05 网易(杭州)网络有限公司 Model rendering method, device, equipment and storage medium
CN112316420B (en) * 2020-11-05 2024-03-22 网易(杭州)网络有限公司 Model rendering method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US6580430B1 (en) Method and apparatus for providing improved fog effects in a graphics system
JP3538393B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP2001319244A (en) Game system and information storage medium
JP3748451B1 (en) Program, information storage medium, and image generation system
JP3280355B2 (en) Image generation system and information storage medium
JP4749198B2 (en) Program, information storage medium, and image generation system
JP2004334661A (en) Image generating system, program, and information storage medium
JP3350655B2 (en) Game system and information storage medium
JP3413383B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2002092633A (en) Game system and information storage medium
JP4073031B2 (en) Program, information storage medium, and image generation system
JP4754384B2 (en) Program, information recording medium, and image generation system
JP2004070670A (en) Image generation system, program and information storage medium
JP2006252426A (en) Program, information storage medium, and image generation system
JP3467259B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP4245356B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2005209217A (en) Game system and information storage medium
JP2003109035A (en) Image generation system, program and information storage medium
JP4632855B2 (en) Program, information storage medium, and image generation system
JP3538394B2 (en) GAME SYSTEM, PROGRAM, AND INFORMATION STORAGE MEDIUM
JP4704615B2 (en) Image generation system, program, and information storage medium
JP3254195B2 (en) Image generation system and information storage medium
JP2004070669A (en) Image generation system, program and information storage medium
JP4754385B2 (en) Program, information recording medium, and image generation system
JP2010134671A (en) Image generating 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: 20081202