JP2007052758A - Ambient light mapping circuit - Google Patents

Ambient light mapping circuit Download PDF

Info

Publication number
JP2007052758A
JP2007052758A JP2005267621A JP2005267621A JP2007052758A JP 2007052758 A JP2007052758 A JP 2007052758A JP 2005267621 A JP2005267621 A JP 2005267621A JP 2005267621 A JP2005267621 A JP 2005267621A JP 2007052758 A JP2007052758 A JP 2007052758A
Authority
JP
Japan
Prior art keywords
cube
luminance
light
polygon
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005267621A
Other languages
Japanese (ja)
Inventor
Tsuneo Ikedo
恒雄 池戸
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.)
KAADEIKKU CORP KK
Original Assignee
KAADEIKKU CORP KK
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 KAADEIKKU CORP KK filed Critical KAADEIKKU CORP KK
Priority to JP2005267621A priority Critical patent/JP2007052758A/en
Publication of JP2007052758A publication Critical patent/JP2007052758A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To determine reflection luminance distribution, with consideration given to a light-shielding object against ambient light and the distance between a mapping point and a light source, and to determine a diffuse reflection component from the entire rendering space in real time. <P>SOLUTION: A light source distributed in a global space is projected onto six faces of an ambient cube to store the distribution luminance, and a visual line reflection vector is calculated from interpolation of a polygon to determine a point intersecting the cube faces. Then, the luminance is read from the cube memory and an object in a space in the cube is projected onto each of the six faces of the cube. There is provided a cube shadow polygon buffer for storing the distance of the object from the cube faces by using a hidden surface removal method. Presence of a light-shielding object between the interpolation point and the cube faces is determined, luminance from the cube faces is masked, cube face luminance is scaled by using the distance from the cube faces and the light-shielding object to the interpolation point, a plurality of reference points are defined on the cube faces, and a diffused light component is determined by totalizing the luminance from the reference points at the interpolation point. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、コンピュータグラフィックス映像技術に関し、周辺光の照射による物体表面の反射輝度をレンダリングするアルゴリズムと、そのアルゴリズムを実装するための回路技術および装置分野に属する。  The present invention relates to computer graphics video technology, and belongs to the field of an algorithm for rendering the reflected luminance of an object surface by irradiation of ambient light, and a circuit technology and apparatus for implementing the algorithm.

コンピュータグラフィックスにおいて、物体固有の反射特性を考慮したグローバルな照明モデルの実装は、リアリティーの高い映像を表現する上で重要な課題である。今日コンピュータグラフィックスによる映像が実写映像と比較して、しばしば現実感を損っている大きな要因は、実時間描画の主流であるポリゴン内挿補間レンダリング法がグローバル照明(周辺光による反射)に原理的に適していないことによる。ポリゴンレンダリング法においてグローバル照明効果を得る唯一の処理として、従来から環境マッピング法があるが、これは鏡面反射特性をもつ物体に対し、その物体を取り囲む環境キューブ(6面体)を設定し、キューブの中心を投影中心として、それぞれの6面にキューブ外部の周辺映像を投影し、投影図をテキスチャーパターン化した後、このパターンを物体にマッピングするものである。現実世界においては、例えば室内では天井の蛍光灯、壁窓、間接反射光をもつ壁などがあり、これらの直接あるいは間接光が、室内の全ての物体表面の輝度に影響を及ぼしている。これを表現する手段として、従来からの前記環境キューブマッピング法を適用し、環境キューブに周辺物体映像ではなく光源(輝度)分布パターンを描き、これを描画物体にマッピングする方法が考えられる。しかしこの方式は2つの致命的な問題がある。1つは、物体に反射される光の一部には、反射位置が視点方向に伴って移動するものがある。従来の環境マッピング・アルゴリズムでは、投影中心をすべてキューブ中心とし視線反射点の位置を考慮していないため、マッピング位置に関して幾何学的な精度を保持することができない。2つ目の問題として、グローバル照明による影響は特定の物体にではなく、すべての物体が対象となり、それぞれの物体毎に環境キューブを定義する従来の方式では、キューブパターンを記憶するメモリ容量が非現実的なサイズとなる。後者の問題に対応する手段として、環境キューブを全体空間に1つ定義して、これをすべての物体に適用することが考えられる。この場合の問題は、物体間同士の遮光関係を1つの環境キューブからだけでは判断できないことにある。このような背景から、今日まで環境光に対して遮光物体をも考慮し、また全ての物体は何らかの周辺光に対する反射特性を持つものとして、ポリゴンレンダリング法でのグローバル照明の実時間処理の実装例を見ることができない。  In computer graphics, the implementation of a global lighting model that takes into account the reflection characteristics unique to an object is an important issue in expressing highly realistic images. The big factor that often impairs the reality of computer graphics images compared to live-action images today is the principle of global interpolation (reflection by ambient light), which is the mainstream of real-time rendering. Because it is not suitable. The only process for obtaining the global lighting effect in the polygon rendering method is the environment mapping method, which sets an environment cube (hexahedron) surrounding the object for an object having specular reflection characteristics. With the center as the projection center, peripheral images outside the cube are projected onto each of the six surfaces, the projection view is converted into a texture pattern, and then this pattern is mapped to an object. In the real world, there are, for example, ceiling fluorescent lamps, wall windows, and walls with indirect reflected light, and these direct or indirect lights affect the luminance of all object surfaces in the room. As a means for expressing this, there is a method in which the conventional environment cube mapping method is applied, a light source (luminance) distribution pattern is drawn on the environment cube instead of a peripheral object image, and this is mapped to a drawing object. However, this method has two fatal problems. One is a part of the light reflected by the object in which the reflection position moves with the viewpoint direction. In the conventional environment mapping algorithm, since the projection centers are all the cube centers and the position of the line-of-sight reflection point is not considered, it is impossible to maintain the geometric accuracy with respect to the mapping position. The second problem is that the influence of global lighting is not on specific objects but on all objects, and the conventional method of defining an environmental cube for each object has a small memory capacity for storing cube patterns. Realistic size. As a means to deal with the latter problem, it is conceivable to define one environment cube in the entire space and apply it to all objects. The problem in this case is that the light shielding relationship between objects cannot be determined from only one environmental cube. From this background, to date, environmental light is considered as well, and all objects have reflection characteristics with respect to some ambient light. Can't see.

本発明は、輝度分布を環境キューブパターンとするグローバルな1つの環境光キューブを定義して、これをキューブ内空間の物体にマッピングする手段を用いて、前記  The present invention defines a global environmental light cube having a luminance distribution as an environmental cube pattern, and uses the means for mapping the cube to an object in the space in the cube.

の記載のそれぞれの問題を解決するため、内挿点(描画点あるいはレンダリング点ともいう)に対する遮光物体の判定手段と、内挿点の位置を考慮したキューブ面からの照明輝度を決定するそれぞれの手段を実現することを本発明の課題とする。In order to solve each of the problems described above, the light-shielding object determination means for the interpolation point (also referred to as a drawing point or a rendering point) and the illumination luminance from the cube plane taking into account the position of the interpolation point are determined. It is an object of the present invention to realize the means.

前記課題に対し、本発明ではグローバル空間上の輝度を環境光キューブ6面に射影パターン化し、そのパターンをメモリ(以下キューブメモリと呼ぶ)に記憶する。本発明でいう環境光マッピングあるいは環境光キューブと、従来の環境マッピングあるいは環境キューブのそれぞれとの表現の違いは、本発明が環境キューブに記憶する情報を物体形状ではなく輝度分布とすることである。グローバル空間にある光源の分布パターンは、室内では天井の蛍光灯や窓からの採光などによるものが主な対象となり、それらが照らす輝度分布がキューブメモリに記憶される。室外では天空や街灯等による輝度となる。ポリゴンレンダリング法を用いる本発明では、物体は多数の多角形面集合として描画し、それぞれの多角形頂点には頂点座標値、テキスチャー座標値、光源入射ベクトル、面法線、視線ベクトル(視点と多角形頂点を結ぶ方向)などを定義する。これら頂点定義変数を内挿補間することによって、多角形内部の点それぞれにおいて前記頂点定義変数のそれぞれを得、その内、面法線と視線ベクトルから視線の反射ベクトルを求め、反射点(内挿点)の座標値、さらにキューブの辺(室内の場合は室内空間)の大きさから、反射ベクトルがキューブ面と交差する点を求め、さらにキューブメモリから輝度を読出し、この輝度を内挿点にマッピングすることによって周辺光を得ることができる。マッピングの際、パターンの輝度と物体の表面属性を用いた物体輝度との線形合成や、キューブメモリの輝度に対してスケーリングを行うことによって物体表面での環境光による照りの度合いを調整することができる。  In the present invention, the brightness in the global space is projected onto the six surfaces of the ambient light cube, and the pattern is stored in a memory (hereinafter referred to as cube memory). The difference in the expression between the ambient light mapping or ambient light cube in the present invention and the conventional environment mapping or environment cube is that the information stored in the environment cube is not the object shape but the luminance distribution. . The distribution pattern of light sources in the global space is mainly targeted for indoor fluorescent lamps and lighting from windows, and the luminance distribution illuminated by these is stored in cube memory. Outside the room, the brightness is due to the sky or streetlight. In the present invention using the polygon rendering method, an object is drawn as a set of a large number of polygonal surfaces, and vertex coordinates, texture coordinate values, light source incident vectors, surface normals, and line-of-sight vectors (viewpoints and multipoints) are assigned to each polygon vertex. Define the direction that connects the corner vertices). By interpolating these vertex definition variables, each of the vertex definition variables is obtained at each point inside the polygon, and the reflection vector of the line of sight is obtained from the surface normal and the line-of-sight vector, and the reflection point (interpolation) The point where the reflection vector intersects the cube surface is obtained from the coordinate value of the point) and the size of the side of the cube (or indoor space in the case of indoors), and the luminance is read from the cube memory, and this luminance is used as the interpolation point. Ambient light can be obtained by mapping. When mapping, it is possible to adjust the degree of illumination by ambient light on the object surface by linearly synthesizing the brightness of the pattern and the object brightness using the surface attribute of the object, or by scaling the brightness of the cube memory it can.

一方、上記の方法だけでは、  On the other hand, with the above method alone,

に記載した遮光物体による問題を解決していない。遮光物体が内挿点と、視点反射ベクトルのキューブ面交差点との間に存在した場合、内挿点へのキューブ面からの照明はその距離が小さくなればなるほど減衰する筈である。遮光物体の有無を判断可能とするため本発明では、2パス方式の影の生成と同様に、第1パスにおいてそれぞれのキューブ面を投影面(視点はキューブ面に垂直なキューブ空間外部の軸上)として、キューブ空間内の物体を、隠面消去法を用いて描画し、キューブ面に最も近い物体のキューブ面までの距離(以下デプス値という)をシャドウポリゴンバッファに記憶する。この結果、シャドウポリゴンバッファはキューブ6面に対して6組必要となる。本発明ではこのシャドウポリゴンバッファをキューブ・シャドウポリゴンバッファ(以下CSPB)と呼ぶ。実際の実装ではグローバル光源と物体との関係は通常、物体の大半が、その位置および形状において幾何学的な移動は少ないと考えられるため、それぞれのCSPBは、1度求めればよいことから6面分あっても実用的には描画性能には大きな影響は与えない。これはキューブメモリも同様である。もし物体が動的に移動する場合では、遮光関係を正確に判断するためには移動毎にCSPBをリフレッシュする必要があるが、動的に変化する場合には、実装上の技法として、直接光による影の生成が平行して処理されているため、その期間中はグローバル照明の更新をペンディングし、静止後再開する方法もある。多くのアプリケーションにおいてはこのような対応で十分である。It does not solve the problem caused by the light shielding object described in. When the light-shielding object exists between the interpolation point and the cube plane intersection of the viewpoint reflection vector, the illumination from the cube surface to the interpolation point should be attenuated as the distance decreases. In the present invention, in order to make it possible to determine the presence or absence of a light-shielding object, each cube plane is projected on the projection plane (the viewpoint is on an axis outside the cube space perpendicular to the cube plane in the first pass, as in the case of generating a two-pass shadow. ), The object in the cube space is drawn using the hidden surface elimination method, and the distance (hereinafter referred to as the depth value) to the cube surface of the object closest to the cube surface is stored in the shadow polygon buffer. As a result, six sets of shadow polygon buffers are required for six cube surfaces. In the present invention, this shadow polygon buffer is called a cube shadow polygon buffer (hereinafter referred to as CSPB). In the actual implementation, the relationship between the global light source and the object is usually considered that the majority of the object has little geometrical movement in its position and shape. Even if it is known, it does not have a big influence on drawing performance practically. The same applies to the cube memory. If the object moves dynamically, it is necessary to refresh the CSPB for each movement in order to accurately determine the light-shielding relationship. Since the shadow generation by is processed in parallel, there is also a method in which the update of the global illumination is pending during that period and is resumed after being stationary. Such a response is sufficient for many applications.

CSPBへの描画が終了すると、第2パスにおいて視点座標系で環境キューブ空間内の物体の描画を行う。この際、ポリゴン頂点の面法線Nと視点ベクトルVと、視線反射点の座標値Pから、反射ベクトルRが(1)式で求まり、またキューブとの交点Pcrossは(2)式で求まる。これらの式は四則演算器で実装できる。(2)式の直線式のパラメータtは交差面、反射点座標値およびキューブの大きさから決定される。キューブ面と反射ベクトルとの交点計算は、平面と直線式の一般的な交差計算であり、いろいろな高速アルゴリズムが考えられるが、交点計算アルゴリズム自体は本発明の範囲とはしない。
R=2N(N・V)−V (1)
Pcross=P+Rt (2)
When drawing on the CSPB is completed, an object in the environment cube space is drawn in the viewpoint coordinate system in the second pass. At this time, the reflection vector R is obtained by the equation (1) from the surface normal N of the polygon vertex, the viewpoint vector V, and the coordinate value P 0 of the line-of-sight reflection point, and the intersection Pcross with the cube is obtained by the equation (2). . These equations can be implemented with four arithmetic units. The linear parameter t in equation (2) is determined from the intersection plane, the reflection point coordinate value, and the size of the cube. The intersection calculation between the cube surface and the reflection vector is a general intersection calculation between a plane and a straight line, and various high-speed algorithms can be considered, but the intersection calculation algorithm itself is not within the scope of the present invention.
R = 2N (N · V) −V (1)
Pcross = P 0 + Rt (2)

第2パスにおいて視点座標系で物体をレンダリングし、内挿補間値を用いて(1)および(2)式により視線反射ベクトルが交差するキューブ面と、その面内の交差点座標値を得るが、内挿点(X,Y,Z)座標は交差するキューブ面が判断されると、その面の座標系(Xl,Yl,Zl)に変換する。次に座標(Xl,Yl)と該当する面のCSPBから距離Zdを読出し、これと前記Zlとを比較して、ZlがZdより面に近い場合(およびZd=Zl)には、キューブメモリから輝度を読出して内挿点にマッピングし、Zlが遠方に位置する場合には、内挿点は遮光物体の後方に位置するものとしてマスク(マッピングを行わない)する。なお、内挿点のキューブ面座標値(Xl,Yl,Zl)への変換は、第2パスおいて頂点に視点座標値と共にあらかじめ6つのキューブ面座標値を定義することで省略することも可能である。  Rendering the object in the viewpoint coordinate system in the second pass, and using the interpolated interpolation value, the cube surface where the line-of-sight reflection vector intersects by the equations (1) and (2), and the intersection coordinate value in the surface are obtained. When the intersecting cube plane is determined, the interpolation point (X, Y, Z) coordinates are converted into the coordinate system (Xl, Yl, Zl) of the plane. Next, the distance Zd is read from the coordinate (Xl, Yl) and the CSPB of the corresponding surface, and this is compared with Zl. If Zl is closer to the surface than Zd (and Zd = Zl), then from the cube memory When the luminance is read out and mapped to the interpolation point, and Zl is located far away, the interpolation point is masked (not mapped) as being located behind the light-shielding object. Note that the conversion of the interpolation points into cube plane coordinate values (Xl, Yl, Zl) can be omitted by defining six cube plane coordinate values together with the viewpoint coordinate values at the vertices in the second pass. It is.

前記の交差点の輝度を内挿点にマッピングする場合、本発明では交差点輝度とマッピングされる物体自身の輝度との合成を行う。物体の輝度とは環境マッピングと異なるプロセスに基づく照明モデル(例えばBRDFモデル)によって得る物体表面の輝度であり、これをIとし、またキューブメモリから読出された輝度をIとすると、物体に固有に定義された合成係数αを用いて(3)式による輝度Iを決定する。When mapping the luminance of the intersection to the interpolation point, the present invention combines the luminance of the intersection with the luminance of the object to be mapped. The brightness of the object is the brightness of the object surface obtained by an illumination model (for example, BRDF model) based on a process different from environment mapping. If this is I b, and the brightness read from the cube memory is I c , The luminance I p according to the equation (3) is determined using the uniquely defined synthesis coefficient α.

また本発明では内挿点と遮光物体がなす距離(Zl−Zd)がポリゴンの内挿補間毎に計算可能なため、この距離が所定の値を超える場合、  In the present invention, since the distance (Zl−Zd) between the interpolation point and the light shielding object can be calculated for each interpolation interpolation of the polygon, when this distance exceeds a predetermined value,

で記載した遮光物体存在時でのマスクを行わないで、距離スケール関数(例えば距離がゼロに近づくと0に近づき、離れると1に向かう関数。但しZl=Zdでは同一物体と見なし1とする)を定義して、この関数値をキューブメモリの輝度に乗算する。この乗算値を内挿点のキューブ面からの輝度とする手段も提供する。この距離スケール関数は内挿点が遮光物体の直後に位置すれば影となり、遠く離れれば遮光物体の影響を受けないものとした環境光の回り込み特性を表現する。A distance scale function (for example, a function that approaches 0 when the distance approaches zero and moves toward 1 when the distance approaches zero, but is regarded as the same object when Zl = Zd, and is set to 1). And the cube memory brightness is multiplied by this function value. Means for making this multiplication value the luminance from the cube plane of the interpolation point is also provided. This distance scale function expresses a wraparound characteristic of ambient light that is assumed to be a shadow if the interpolation point is located immediately after the light-shielding object and is not affected by the light-shielding object if it is far away.

一方、内挿点とキューブ輝度面との距離が大きくなればなるほど通常、光源の面積や形により、内挿点での輝度パターン分布は薄く拡散する現象が現実世界にはある。これを表現する手段として、1つは前記の天井や壁の光源形状を比較的明瞭に表現したものと、他はこれをフィタリングしてぼかした2つのパターンを作成しこれをキューブメモリに記憶する。すなわち、本発明では比較的光源の存在あるいは形状(局所性)を明確に表現したもの(面に近い距離のもの)と、ぼかしたもの(面から離れたもの)の2つの光分布パターンIc0とIc1を、それぞれキューブ面パターンとしてもち、物体を描画する際、これら2つのパターンを同時に読み出し、内挿点とキューブ面交差点間の距離Dを用いて、2つのパターン間の重み付けを(4)式によって行い、その輝度Iをキューブ輝度とするものである。

Figure 2007052758
(4)式のkは係数である。この結果、本発明ではキューブ面からの距離が遠い視線反射点では、近い点に比較し輝度分布がボケて広がる表現が可能となる。(4)式のβは1例を示したものであるが、1/(1+kxD+kxD)など現実の環境光の影響に類似した関数(kはそれぞれ係数)を設定することもできる。On the other hand, as the distance between the interpolation point and the cube luminance surface becomes larger, there is usually a phenomenon in the real world where the luminance pattern distribution at the interpolation point is thinly diffused depending on the area and shape of the light source. As a means for expressing this, one creates a relatively clear representation of the light source shape of the ceiling or wall, and the other creates two blurred patterns by filtering this and stores them in the cube memory. . That is, in the present invention, two light distribution patterns I c0, one that clearly expresses the presence or shape (locality) of the light source (one that is close to the surface) and one that is blurred (one that is away from the surface). And I c1 as cube plane patterns, respectively, and when drawing an object, these two patterns are read simultaneously, and the weight D between the two patterns is calculated using the distance D between the interpolation point and the cube plane intersection (4 ) And the luminance I c is set as cube luminance.
Figure 2007052758
In equation (4), k is a coefficient. As a result, in the present invention, it is possible to express that the luminance distribution is blurred and widened at the line-of-sight reflection point that is far from the cube surface as compared to the near point. Β in Equation (4) shows an example, but a function (k 0 , 1 is a coefficient) similar to the effect of actual ambient light such as 1 / (1 + k 0 xD + k 1 xD 2 ) is set. You can also.

に記載した2つのパターン間で輝度を補間する手段は、一般に行われているテキスチャーマッピングのミップマッピング法とは異なる。ミップマップは、映像は同じであるがサイズの具なる複数のパターンを用意し、物体の拡大縮小に伴う最適なサイズ2つを選択し、拡大縮小率を用いてそれらの間を補間し画質の保証を行うものである。本発明ではミップマップのようにサイズの具なるパターン間を補間するのではなく、映像の異なるパターンを用意し、それらを光源(キューブ面)からの距離を用いて補間を行うものである。The means for interpolating the luminance between the two patterns described in 1) is different from the mip mapping method of texture mapping that is generally performed. The mipmap prepares multiple patterns of the same size but with the same size, selects two optimal sizes for the scaling of the object, and interpolates between them using the scaling ratio to improve the image quality. It is a guarantee. In the present invention, instead of interpolating between patterns having different sizes as in a mipmap, different patterns of video are prepared and interpolated using distances from a light source (cube surface).

本発明の前記それぞれの手段は、視線方向によってマッピング位置が変化する鏡面反射成分を生成するものであったが、本発明では視線に依存しない反射成分を求める手段も実装する。この手段として本発明ではキューブ6面上に、複数の参照点とそれぞれの参照点での輝度を定義する。第2パスにおいて、前記  Each of the means of the present invention generates a specular reflection component whose mapping position changes depending on the line-of-sight direction, but the present invention also implements a means for obtaining a reflection component that does not depend on the line-of-sight. As a means for this, the present invention defines a plurality of reference points and the luminance at each reference point on the cube 6 surface. In the second pass, the

と同様な処理で内挿点をキューブ面座標系に変換し、キューブ6面のそれぞれのCSPBのZdと比較する。もし内挿点のZlが、CSPBのZd値よりも遠方にある場合には、そのキューブ面からの影響は無いものと見なし、またキューブ面に近い場合には、参照点の輝度Liと参照点Sから内挿点Pまでの距離(S−P)を用いて(5)式の関係から内挿点における輝度を決定する。ここで関数Dは一般に距離に反比例する、距離の1次あるいは2次減衰関数となる。輝度Liと減衰関数Dとの乗算を6面全ての参照点(i点数分)に対して行い、乗算結果を加算してキューブ空間内の拡散光Idとして内挿点にマッピングする。ここで参照点の座標値Sと輝度Lは予めレジスタ等に記憶して置き、内挿点Pが得られた時点で、このレジスタから参照点座標値を読み出し2点間の距離を求める。

Figure 2007052758
The interpolated point is converted into a cube plane coordinate system by the same processing as in Fig. 6, and is compared with Zd of each CSPB of the cube 6 plane. If the interpolation point Zl is far from the CSPB Zd value, it is considered that there is no influence from the cube surface, and if it is close to the cube surface, the reference point luminance Li and the reference point Using the distance (S i −P 0 ) from S i to the interpolation point P 0 , the luminance at the interpolation point is determined from the relationship of equation (5). Here, the function D is a first-order or second-order attenuation function of the distance, which is generally inversely proportional to the distance. Multiplication of the luminance Li and the attenuation function D is performed on all six reference points (for i points), and the multiplication results are added and mapped to the interpolation point as diffused light Id in the cube space. Here, the reference point coordinate value S i and the luminance L i are stored in advance in a register or the like, and when the interpolation point P 0 is obtained, the reference point coordinate value is read from this register and the distance between the two points is calculated. Ask.
Figure 2007052758

CSPBに記憶されたデプス値は、キューブ面中央に直交する軸上を投影中心として描画したものであるため、それぞれの参照点と内挿点を結ぶ線上周辺にある遮光物体のシルエット境界は正確に判定することができない。しかし求めているものがキューブ面がもつ面輝度を対象としている関係上、遮光物体のポリゴン境界を厳密に判定する必要はない。  The depth value stored in CSPB is drawn with the axis perpendicular to the center of the cube plane as the projection center, so the silhouette boundary of the shading object around the line connecting each reference point and the interpolation point is accurate. Cannot judge. However, since what is being sought is the surface brightness of the cube surface, it is not necessary to strictly determine the polygon boundary of the light shielding object.

本発明では  In the present invention

で定義した環境光回り込み処理と同様に、参照点からの輝度に関しても、遮光物体がある場合、その面の輝度をマスクする手段だけでなく、(5)式に前記の距離スケール関数値を乗算して内挿点の輝度とする。As with the ambient light sneaking process defined in (5), when there is a light-shielding object, not only a means for masking the brightness of the surface but also the formula (5) above is multiplied by the distance scale function value as to the brightness from the reference point. Then, it is set as the luminance of the interpolation point.

本発明では、負荷の大きな処理は第1パスにおけるキューブ・シャドウポリゴンの生成である。しかし、キューブ内のそれぞれの物体に幾何学的な変化が頻繁に発生しない場合では、シャドウポリゴンの計算は、物体が変化した時点にのみ行えばよい。この手法を取れば、通常のシーンにおいては、必ずしも第1パスが実時間描画に大きな障害となることはない。さらに本発明では、キューブ空間内の物体がそれぞれキューブ空間の大きさに対して小さな場合は、遮光物体の直接の影響以上に、環境光の回りこみの影響が強いため、キューブ・シャドウポリゴンの計算を省略する手法も選択可能とする。このように第1パスにおいては、物体形状に応じて選択的な処理をすることによって高速化を図ることが可能となる。  In the present invention, the processing with a large load is the generation of cubes and shadow polygons in the first pass. However, if geometric changes do not occur frequently in each object in the cube, the calculation of the shadow polygon need only be performed when the object changes. With this method, the first pass does not necessarily become a major obstacle to real-time drawing in a normal scene. Furthermore, in the present invention, when the objects in the cube space are small relative to the size of the cube space, the influence of the ambient light is stronger than the direct influence of the light-shielding object. It is also possible to select a method that omits. Thus, in the first pass, it is possible to increase the speed by performing selective processing according to the object shape.

内挿点からキューブ参照点までの距離を、内挿点毎に参照点数分求める処理に関して、本発明では、頂点と参照点を結ぶ距離と参照点輝度から求めたそれぞれの照射光を、予めそれぞれの物体のポリゴン頂点に定義しておき、この照射光をポリゴン内部で線形補間することにより、直接内挿点の反射光を得る手段も選択可能とする。キューブ面毎に求めた照射光は、頂点毎に6つ定義される。補間された照射光は、キューグ面ごとに  Regarding the process of obtaining the distance from the interpolation point to the cube reference point by the number of reference points for each interpolation point, in the present invention, each irradiation light obtained from the distance connecting the vertex and the reference point and the reference point luminance is previously set. It is possible to select a means for directly obtaining reflected light at the interpolation point by linearly interpolating the irradiation light inside the polygon. Six irradiation lights obtained for each cube surface are defined for each vertex. Interpolated irradiation light is applied to each cue surface.

の手段で遮光物体の有無を判定して、遮光物体がある面ではマスクし、遮光物体のない面では面毎に加算する手段を設ける。また頂点には6つの照射光ではなく、すべての面からの照射光を加算した1つの照射光成分だけを定義することも、キューブ内空間の物体の大きさ等から可能(物体が空間に比べて小さい)な場合がある。この場合は遮光物体による判定は行わない。本発明では前記いずれの方式も、映像の現実感(Level of Detail)と実時間性の関係から、選択的に適用可能とする。The means for determining whether or not there is a light-shielding object is masked on the surface with the light-shielding object, and is added for each surface on the surface without the light-shielding object. It is also possible to define only one irradiation light component that is the sum of the irradiation light from all surfaces, not the six irradiation light at the apex, based on the size of the object in the cube space (the object is smaller than the space) May be small). In this case, the determination by the light shielding object is not performed. In the present invention, any of the above methods can be selectively applied from the relationship between the realism of the video and the real time property.

以上から本発明ではシーンに1つの環境光キューブを定義し、それぞれの面にはその環境空間がもつ輝度分布をパターン化して記憶する手段と、キューブそれぞれの面に投影されるキューブ空間内の物体の、投影面からの距離を、隠面消去処理を通してキューブ・シャドウポリゴンバッファに記憶する手段と、第2パスにおいて物体を定義するポリゴン頂点のそれぞれには、頂点座標値、法線および視線ベクトル等を定義し、ポリゴンの内挿補間によりポリゴン内部の点での前記法線および視線ベクトルから視線反射ベクトルを求め、内挿点と前記視線反射ベクトルから、前記キューブと交差する面と、キューブ面上での点の輝度を求める手段と、第2パスのポリゴン内挿補間によって得たポリゴン内の座標値を所定のキューブ面座標系に変換し、前記キューブ・シャドウポリゴンバッファに記憶された光源からの距離を読み出し、この読み出した距離と、前記変換した距離とを比較して、変換距離が読み出し距離より遠方にある場合には、ポリゴンの内挿点は遮光物体によって遮られており、キューブ面からの輝度をマスクし、一方、近くにある場合には該当する面からの輝度をマッピングする手段と、内挿点の輝度は、ポリゴンに予め設定された合成係数を用いて、ポリゴン自身の輝度とキューブ面から読み出された輝度とを合成するそれぞれの手段をもって、物体のそれぞれに環境光をマッピングする。また本発明では、キューブ面に分布する輝度パターンを鮮明なパターンと、フィルタ等によりぼかしたパターンのそれぞれを用意して、内挿点とキューブ面間の距離を用いて、前記2つのパターンを補間して得た輝度を、キューブメモリからの読出し輝度とする手段と、さらに、キューブ面の輝度が内挿点に及ぼす面照射光は、キューブ6面に1つ以上の参照点を定め、これらの点には参照点輝度を設定し、内挿点とそれぞれの参照点までの距離を用いて、内挿点に及ぼす輝度を求める手段と、さらに前記のキューブ・シャドウポリゴンバッファのデプス値と比較して、キューブ6面からの照射光成分を選択する手段と、予めポリゴンの頂点には、参照点からの距離を考慮した照射光成分を頂点変数として定義し、これを内挿補間して、直接内挿点の輝度を求める、それぞれの手段をもって環境光を物体にマッピングするものである。  As described above, in the present invention, one ambient light cube is defined in the scene, the luminance distribution of the environment space is patterned and stored on each surface, and the object in the cube space projected on each surface of the cube. Means for storing the distance from the projection plane in the cube / shadow polygon buffer through hidden surface elimination processing, and for each of the polygon vertices defining the object in the second pass, vertex coordinate values, normals, line-of-sight vectors, etc. A line-of-sight reflection vector is obtained from the normal and line-of-sight vector at a point inside the polygon by interpolation interpolation of the polygon, and the surface intersecting the cube is determined from the interpolation point and the line-of-sight reflection vector, and on the cube plane A means for determining the brightness of the point at the point, and the coordinate value in the polygon obtained by polygon interpolation in the second pass is changed to a predetermined cube plane coordinate system. Then, the distance from the light source stored in the cube / shadow polygon buffer is read, and the read distance is compared with the converted distance. The interpolation point is obstructed by a light-shielding object, masking the luminance from the cube surface, and if near, means for mapping the luminance from the corresponding surface, and the luminance of the interpolation point is the polygon The ambient light is mapped to each of the objects by using respective means for combining the luminance of the polygon itself and the luminance read from the cube surface by using a preset combination coefficient. In the present invention, a brightness pattern distributed on the cube plane is prepared in a clear pattern and a pattern blurred by a filter or the like, and the two patterns are interpolated using the distance between the interpolation point and the cube plane. The luminance obtained in this way is used as the luminance read from the cube memory, and the surface irradiation light that the luminance of the cube surface exerts on the interpolation point defines one or more reference points on the cube 6 surface. The reference point brightness is set for each point, and the distance to the interpolation point and the distance to each reference point are used to determine the brightness on the interpolation point, and further compared with the cube shadow polygon buffer depth value. Then, the means for selecting the irradiation light component from the surface of the cube 6 and the irradiation light component taking into account the distance from the reference point are defined as vertex variables in advance at the vertices of the polygon, and this is directly interpolated and interpolated. Determining the luminance of the interpolation point, it is to map the ambient light on the object with the respective means.

本発明で定義する6面体は、一般的な環境マッピング手法で定義される環境キューブと対応させるため同名で記載しているが、立方体を含む直方体であっても本発明の  The hexahedron defined in the present invention is described with the same name in order to correspond to the environment cube defined by a general environment mapping method. However, the hexahedron defined in the present invention is not limited to the rectangular parallelepiped including the cube.

に記載のすべての手段に適用できる。
以上から、本発明の手段により、天井や窓から照射される局所的な光だけでなく、グローバルな光を、遮光物体による空間的および幾何学的関係を含めて、シーンに含まれる物体表面に環境光として描画することができる。
Applicable to all means described in.
From the above, by the means of the present invention, not only the local light emitted from the ceiling or window, but also the global light is applied to the object surface included in the scene, including the spatial and geometrical relationship due to the light shielding object. Can be drawn as ambient light.

本発明により、より自然に近い現実感のある光反射効果のある映像の描画が実時間で可能となる。  According to the present invention, it is possible to draw an image having a light reflection effect with a realistic feeling close to nature in real time.

本発明の技術はLSI、プログラマブル論理回路等への実装あるいはIP(Intelligent Property)の形態で実施され、コンピュータグラフィックスプロセッサに応用される。  The technique of the present invention is implemented in an LSI, a programmable logic circuit or the like or in the form of IP (Intelligent Property), and is applied to a computer graphics processor.

本発明の環境光マッピング回路の実施例を図1に示す。ポリゴンレンダリング法では、物体の形状はポリゴン(多角形、主に3角形)の集合体で表現する。まず描画空間に環境光キューブを定義し、6面からなるキューブ面のそれぞれに対応するキューブメモリ14を設け、このメモリ14には、描画空間内外にある光源を面に射影した光源分布パターン(輝度)を予め記憶する。ここで環境光キューブは立方体を含む直方体の形状をもつものとする。第1パス(図1のPass1のバスルート)において空間内のすべてのポリゴンをそれぞれのキューブ面を投影面として描画し、投影面からポリゴン内挿点までの距離(デプス値)をキューブ・シャドウポリゴンバッファ(CSPB)15に記憶する。従来の環境キューブは投影中心をキューブ内中心点とするが、本発明のCSPBではこれとは逆に、キューブ外側で、それぞれの面の中心と垂直な軸上に投影中心を置く。第2パスにおいて、多角形の頂点には、視点座標系の頂点座標値、面法線、視線ベクトルなどを定義し、これら頂点変数をポリゴン内挿補間回路10で線形に補間し、多角形内部のそれぞれの点での頂点定義変数を求める。この内、面法線N、視線ベクトルVおよび座標値Pをそれぞれ反射ベクトル計算回路11に加え、An embodiment of the ambient light mapping circuit of the present invention is shown in FIG. In the polygon rendering method, the shape of an object is expressed by an aggregate of polygons (polygons, mainly triangles). First, an ambient light cube is defined in the drawing space, and a cube memory 14 corresponding to each of the six cube faces is provided. In this memory 14, a light source distribution pattern (brightness) obtained by projecting light sources inside and outside the drawing space onto the face is provided. ) In advance. Here, the ambient light cube is assumed to have a rectangular parallelepiped shape including a cube. In the first pass (pass route of Pass 1 in FIG. 1), all polygons in the space are drawn with their cube planes as projection planes, and the distance (depth value) from the projection plane to the polygon interpolation point is cube-shadow polygon Store in the buffer (CSPB) 15. In the conventional environment cube, the projection center is set as the center point in the cube. On the contrary, in the CSPB of the present invention, the projection center is placed on the axis perpendicular to the center of each surface outside the cube. In the second pass, the vertex coordinates of the viewpoint coordinate system, the surface normal, the line-of-sight vector, etc. are defined for the vertices of the polygon, and these vertex variables are linearly interpolated by the polygon interpolation circuit 10, and the polygon interior Find the vertex definition variables at each point. Among these, the surface normal N, the line-of-sight vector V, and the coordinate value P 0 are respectively added to the reflection vector calculation circuit 11,

の(1)式に基づき、視線反射ベクトルRを得る。また座標値PとRとからキューブ面交差計算回路12において、交差キューブ面F(5≧F≧0)と、その面内の交差点(U,V)をベクトルRの符号やThe line-of-sight reflection vector R is obtained based on the equation (1). In addition, the cube plane intersection calculation circuit 12 calculates the intersection cube plane F (5 ≧ F ≧ 0) and the intersection (U, V) in the plane from the coordinate values P 0 and R by the sign of the vector R,

の(2)式により求め、Fと(U,V)を用いて該当するキューブメモリ14から輝度Icを読み出す。一方、ポリゴン内挿補間回路10で得た座標値Pは、キューブ面座標変換回路13にて視点系座標値からキューブ面座標値(Xl,Yl,Zl)に変換し、該当するCSPB(前記F面に対応するCSPB)15からデプス値Zdを読み出す。このZdとZlとをデプス値比較回路16で比較し、Zlがキューブ面により近い場合には、点Pはキューブ交差点の輝度Icを内挿点にマッピングし、Zlが遠方にある場合には、Icをマスクする。キューブ交差点のIcを内挿点にマッピングする際、物体の輝度Ib(この輝度はシェーディングや影が考慮された物体固有の輝度)と、物体の表面特性として定義された合成係数αから、The luminance Ic is read from the corresponding cube memory 14 using F and (U, V). On the other hand, the coordinate value P 0 obtained by the polygon interpolation circuit 10 is converted from the viewpoint system coordinate value to the cube surface coordinate value (Xl, Yl, Zl) by the cube surface coordinate conversion circuit 13, and the corresponding CSPB (described above) is converted. The depth value Zd is read out from CSPB 15 corresponding to the F plane. The depth value comparison circuit 16 compares Zd and Zl. When Zl is closer to the cube surface, the point P 0 maps the luminance Ic of the cube intersection to the interpolation point, and when Zl is far away. , Ic is masked. When mapping the cube intersection Ic to the interpolation point, from the luminance Ib of the object (this luminance is specific to the object in consideration of shading and shadows) and the synthesis coefficient α defined as the surface characteristics of the object,

の(3)式に基づき、輝度合成回路17にて合成を行う。合成された輝度が内挿点、すなわち視線反射点の輝度となる。Based on the equation (3), the luminance synthesis circuit 17 performs synthesis. The synthesized luminance becomes the luminance of the interpolation point, that is, the line-of-sight reflection point.

図2は本発明に関するキューブ面からの距離を考慮して物体にマッピングする輝度を求める環境光マッピング回路を示す。図2においてキューブ面座標変換回路20およびキューブメモリ21はそれぞれ図1の13および14と同じ回路である。ただしキューブメモリ21は輝度分布パターンの具なる2つのメモリからなる。第2パスにおいてポリゴンの内挿点をキューブ面座標変換回路20でキューブ面座標僵(Xl,Yl,Zl)に変換し、その座標値(Xl,Yl)をCSPB22に与える。CSPBからはデプス値Zdを読み出し、この値とZlをデプス値比較回路23で遮光物体の有無を判定する。判定値ONは輝度合成回路25に与えられる。ON信号はZdとZlの前後関係を示すものである。キューブメモリ21の1および2からの輝度Ic0およびIc1は  FIG. 2 shows an ambient light mapping circuit for obtaining luminance to be mapped to an object in consideration of the distance from the cube surface according to the present invention. In FIG. 2, a cube plane coordinate conversion circuit 20 and a cube memory 21 are the same circuits as 13 and 14 in FIG. 1, respectively. However, the cube memory 21 is composed of two memories having a luminance distribution pattern. In the second pass, the interpolation point of the polygon is converted into cube surface coordinates 僵 (Xl, Yl, Zl) by the cube surface coordinate conversion circuit 20 and the coordinate values (Xl, Yl) are given to the CSPB 22. The depth value Zd is read from the CSPB, and this value and Zl are determined by the depth value comparison circuit 23 to determine the presence or absence of a light shielding object. The determination value ON is given to the luminance synthesis circuit 25. The ON signal indicates the front-rear relationship between Zd and Zl. The luminances Ic0 and Ic1 from 1 and 2 of the cube memory 21 are

の(4)式に基づき輝度分布パターン補間回路24において補間輝度Icを得る。(4)式のDは図2ではZlとなる。補間輝度Ic、物体の輝度Ibおよび物体の合成係数αのそれぞれから、輝度合成回路においてBased on the equation (4), the luminance distribution pattern interpolation circuit 24 obtains the interpolated luminance Ic. D in equation (4) is Zl in FIG. From each of the interpolated luminance Ic, the object luminance Ib, and the object synthesis coefficient α, the luminance synthesis circuit

の(3)式に基づき物体の内挿点の輝度が決定する。Based on the equation (3), the luminance of the interpolation point of the object is determined.

前記までの実施例では、内挿補間点へのマッピングは視線ベクトルに関係する鏡面反射を取り扱ったが、視線方向とは独立して、キューブ面輝度が内挿点に影響を与える照射光がある。環境光とはこの照射光成分が中心となる。図3には本発明の環境キューブと面照明を得るための参照点を示す。図3では環境キューブ30のそれぞれの面上の点Sと、物体31の内挿点Pとを結ぶ距離をそれぞれ求め、キューブ面上の輝度Lから(5)式に基づき拡散光成分Idを求める。図3においては、キューブ面上の参照点Sはキューブ面当たり1点を便宜上示しているが、面輝度を得るためには、より多数の参照点を設定したほうが好ましい。In the above embodiments, the mapping to the interpolation point handled the specular reflection related to the line-of-sight vector, but there is irradiation light whose cube plane luminance affects the interpolation point independently of the line-of-sight direction. . The ambient light is centered on this irradiated light component. FIG. 3 shows the reference points for obtaining the environmental cube and surface illumination of the present invention. In FIG. 3, the distances connecting the points S i on the respective surfaces of the environment cube 30 and the interpolation point P 0 of the object 31 are obtained, and the diffused light component is calculated from the luminance L i on the cube surface based on the equation (5). Id is obtained. In FIG. 3, the reference point S i on the cube surface is shown as one point per cube surface for convenience, but it is preferable to set a larger number of reference points in order to obtain surface luminance.

図4は本発明の遮光物体がある場合の内挿点との関係を示す。図4ではキューブ6面の内、2つの面40および41の参照点SとSのそれぞれを示し、物体42上の内挿点Pを、またキューブ面41と内挿点P間に遮光物体43が位置する関係を示している。遮光物体の有無の判定は6面それぞれに対して行う。図4ではキューブ面41からの照射光成分を遮光されたものとして加算しない場合と、CSPBに記憶された遮光物体のデプス値(SからQまでの距離)と内挿点Pとがなす距離を用いたFIG. 4 shows the relationship with the interpolation point when there is a light-shielding object of the present invention. FIG. 4 shows the reference points S 0 and S 1 of the two surfaces 40 and 41 of the cube 6 surface, and shows the interpolation point P 0 on the object 42 and between the cube surface 41 and the interpolation point P 0. The relationship between the positions of the light shielding objects 43 is shown in FIG. The presence / absence of the light shielding object is determined for each of the six surfaces. In FIG. 4, the case where the irradiation light component from the cube surface 41 is not added as being shielded and the depth value (distance from S 1 to Q) of the light shielding object stored in the CSPB and the interpolation point P 0 are formed. Using distance

の距離スケール関数により回り込み処理の選択が可能である。The wraparound process can be selected by the distance scale function.

図5は本発明の多角形頂点定義変数を示す。それぞれのキューブ面からそれぞれの多角形頂点までの距離と、それぞれの参照点輝度を用いて、ポリゴン50(図では3角形)の頂点C0−C2毎に予め輝度Ii0−5(0−5はキューブ6面を表す)を計算しておき、これら輝度を他のポリゴン頂点変数と共に定義した後、内挿補間して直接内挿点の照射光を求めるものである。図5ではポリゴン頂点C0−C2には頂点座標値Pi(X,Y,Z)面法線Ni(Nx,Ny,Nz)と視線ベクトルVi(Vx,Vy,Vz)が定義されている(添数iはいずれも頂点番号0−2を意味する)。Pjは内挿点を示す。内挿点での照射光成分Ij0−5が得られればそれぞれの面に対して前記  FIG. 5 shows polygon vertex definition variables of the present invention. Using the distance from each cube surface to each polygon vertex and each reference point luminance, the luminance Ii0-5 (0-5 is the cube) in advance for each vertex C0-C2 of the polygon 50 (triangle in the figure). (Representing 6 planes) is calculated in advance, and these luminance values are defined together with other polygon vertex variables, and then the interpolation light is directly obtained to obtain the irradiation light at the interpolation point. In FIG. 5, a vertex coordinate value Pi (X, Y, Z) surface normal line Ni (Nx, Ny, Nz) and a line-of-sight vector Vi (Vx, Vy, Vz) are defined for the polygon vertex C0-C2. Any number i means vertex numbers 0-2). Pj represents an interpolation point. If the irradiation light component Ij0-5 at the interpolation point is obtained, the above-described surface is obtained for each surface.

の遮光物体判定を行い、加算するか否かを決定する。一方、遮光物体を考慮しない場合は、前記Ii0−5の6面からのそれぞれの輝度をすべて合計した1つの輝度を、それぞれの頂点に定義する方法も可能である。The light-shielding object is determined, and it is determined whether or not to add. On the other hand, when a light-shielding object is not taken into account, a method of defining one luminance, which is the sum of all luminances from the six surfaces of Ii0-5, at each vertex is also possible.

本発明の回路をIP(Intelligent Property)として、あるいはグラフィックスプロセッサLSIチップに実装することによって映像製作、CGゲーム等のシステムにおいて実時間描画を可能とする。  By mounting the circuit of the present invention as an IP (Intelligent Property) or a graphics processor LSI chip, real-time drawing can be performed in a system such as video production or CG game.

「本発明の環境光マッピング回路を示す。」“Ambient light mapping circuit of the present invention is shown.” 「本発明の環境光分布補間回路を示す。」“Ambient light distribution interpolation circuit of the present invention is shown.” 「本発明のキューブ面からの拡散光定義図を示す。」“The diffused light definition diagram from the cube surface of the present invention is shown.” 「本発明の遮光物体と面輝度の関係図を示す。」“The relationship between the light shielding object of the present invention and the surface luminance is shown.” 「本発明の多角形頂点定義変数を示す。」“Shows polygon vertex definition variables of the present invention.”

符号の説明Explanation of symbols

図1
10 ポリゴン内挿補間回路
11 反射ベクトル計算回路
12 キューブ面交差計算回路
13 キューブ面座標変換回路
14 キューブメモリ
15 キューブ・シャドウポリゴンバッファ
16 デプス比較回路
17 輝度合成回路
図2
20 光源座標系変換回路
21 キューブメモリ
22 キューブ・シャドウポリゴンバッファ
23 デプス値比較回路
24 光源分布パターン補間回路
25 輝度合成回路
図3
30 キューブ
31 レンダリング物体
図4
40 キューブ面
41 キューブ面
42 レンダリング物体
43 遮光物体
図5
50 3角形頂点走義変数
FIG.
DESCRIPTION OF SYMBOLS 10 Polygon interpolation circuit 11 Reflection vector calculation circuit 12 Cube surface intersection calculation circuit 13 Cube surface coordinate conversion circuit 14 Cube memory 15 Cube shadow polygon buffer 16 Depth comparison circuit 17 Luminance synthesis circuit FIG.
DESCRIPTION OF SYMBOLS 20 Light source coordinate system conversion circuit 21 Cube memory 22 Cube shadow polygon buffer 23 Depth value comparison circuit 24 Light source distribution pattern interpolation circuit 25 Luminance synthesis circuit FIG.
30 Cube 31 Rendering object figure 4
40 Cube Surface 41 Cube Surface 42 Rendering Object 43 Shading Object Figure 5
50 Triangular vertex running variable

Claims (8)

環境光の照射による物体の反射光を求めるコンピュータグラッフィクス・レンダリング回路に関し、直方体を含む6面からなる環境キューブを、描画空間を囲む領域に定義し、前記環境キューブのそれぞれの面に対応したキューブメモリを設け、前記キューブメモリにはキューブ内空間を照射するそれぞれの面上に投射された光源輝度を記憶する手段と、前記それぞれのキューブ面を投影面として、キューブ空間内の物体を、隠面消去法を用いて物体と前記キューブ面との距離を記憶するキューブ・シャドウポリゴンバッファを設ける手段と、物体を表現するポリゴンのそれぞれの頂点には、少なくとも頂点座標値、面法線および視線ベクトルを定義し、前記頂点定義値をポリゴン内で線形に補間し、それぞれのポリゴン内挿点での前記法線および視線ベクトルから視線反射ベクトルを求め、前記視線反射ベクトルが前記キューブ面と交差するキューブ面と座標点を求めて、前記キューブメモリに記憶された前記輝度を読取る手段と、前記ポリゴン内挿点座標値を、前記視線反射ベクトルが交差する面の投影座標系に変換すると共に、該当する面に対応する前記キューブ・シャドウポリゴンバッファを選択して、前記変換座標値から前記キューブ・シャドウポリゴンバッファに記憶された距離を読み出し、この距離と、前記変換座標値の投影面からの距離(以下デプス値という)とを比較して、前記デプス値がキューブ・シャドウポリゴンバッファの距離より遠方にある場合には、ポリゴンの内挿点は遮光物体によって遮られているものとして前記キューブメモリから読み出した輝度をマスクし、一方、近くにある場合には内挿点にマッピングする手段を有する手段と、内挿点のレンダリング輝度はポリゴン自身の輝度と前記光源分布パターンの輝度を物体に予め設定された輝度合成係数を用いて線形に合成するそれぞれの手段をもって、物体表面の環境光を決定する環境光マッピング回路。  A computer graphics rendering circuit for obtaining reflected light of an object by irradiation of ambient light. An environment cube consisting of six faces including a rectangular parallelepiped is defined in a region surrounding a drawing space, and the cube corresponding to each face of the environment cube. A memory is provided, and the cube memory stores means for storing light source luminances projected on the respective surfaces that irradiate the space in the cube, and the objects in the cube space are hidden surfaces by using the respective cube surfaces as projection surfaces. Means for providing a cube / shadow polygon buffer for storing the distance between the object and the cube surface using an erasure method; and at least vertex coordinate values, surface normals and line-of-sight vectors for each vertex of the polygon representing the object And define the vertex definition value linearly in the polygon, and the normal at each polygon interpolation point. A line-of-sight vector from the line-of-sight vector, a cube plane and a coordinate point where the line-of-sight reflection vector intersects the cube plane, and means for reading the luminance stored in the cube memory; and the polygon interpolation point coordinates The value is converted into the projected coordinate system of the surface where the line-of-sight reflection vector intersects, and the cube / shadow polygon buffer corresponding to the corresponding surface is selected and stored in the cube / shadow polygon buffer from the converted coordinate value. If the depth value is farther than the distance of the cube / shadow polygon buffer, this distance is compared with the distance from the projection plane of the converted coordinate value (hereinafter referred to as the depth value). The interpolation point of the polygon is read from the cube memory assuming that it is obstructed by the light shielding object. On the other hand, means having a means for mapping to the interpolation point when it is close, and the rendering luminance of the interpolation point is a luminance set in advance for the object itself with the luminance of the polygon itself and the luminance of the light source distribution pattern. An ambient light mapping circuit that determines ambient light on the surface of an object with each means for linearly synthesizing using a synthesis coefficient. 請求項1の回路において、ポリゴン内挿点と視線反射ベクトルが交差するキューブ面との間に遮光物体がある場合、前記内挿点と遮光物体とのなす距離を求める手段と、この距離がゼロに近づくに従って最小値に、また離れるに従って最大値となる距離スケール関数を定義し、前記関数値を交差面となるキューブメモリからの読出し輝度に乗算し、この結果得た輝度を交差面からの輝度とする環境光マッピング回路。  2. The circuit according to claim 1, wherein when there is a light-shielding object between a polygon interpolation point and a cube surface where the line-of-sight reflection vector intersects, means for obtaining a distance between the interpolation point and the light-shielding object, and this distance is zero. The distance scale function is defined as the minimum value as it approaches and the maximum value as it moves away, and the function value is multiplied by the readout luminance from the cube memory that is the intersection plane, and the resulting luminance is the luminance from the intersection plane. Ambient light mapping circuit. 請求項1の回路において、キューブメモリに記憶する輝度分布パターンに関し、鮮明な分布形状と、前記分布形状をフィルタリングによってぼかした2つのパターンを用意する手段と、ポリゴン内挿点と前記視線反射ベクトルが交差するキューブ面とのなす距離を用いて、前記2つのパターン間を補間して得た輝度を該当するキューブ面の輝度と見なす、それぞれの手段をもつ環境光マッピング回路。  2. The circuit according to claim 1, wherein a brightness distribution pattern stored in the cube memory is provided with a sharp distribution shape, means for preparing two patterns obtained by filtering the distribution shape by filtering, a polygon interpolation point, and the line-of-sight reflection vector. An ambient light mapping circuit having respective means for regarding a luminance obtained by interpolating between the two patterns as a luminance of a corresponding cube surface by using a distance formed between intersecting cube surfaces. 請求項1の回路において、それぞれのキューブ面の光原分布パターン輝度が内挿点に及ぼす面反射光に関して、キューブ6面のそれぞれに1つ以上の参照点を定め、前記参照点と内挿点との距離を変数とするそれぞれの距離減衰関数値を定義して、この関数値と該当する面それぞれの参照点の輝度とを乗算した値をキューブ面毎に加算する手段と、前記加算値が内挿点に対して影響を与えるか否かを判断する手段として、請求項1の遮光物体の有無判定の結果をそれぞれのキューブ面に対して行い、遮光物体がある場合には該当するキューブ面の前記加算値をマスクし、遮光物体がない場合には、該当する面それぞれの加算値を面毎に累積し、この累積値をもって内挿点のキューブ面からの面輝度とする環境光マッピング回路。  2. The circuit according to claim 1, wherein one or more reference points are defined on each of the six surfaces of the cube with respect to the surface reflected light that the photon distribution pattern luminance of each cube surface exerts on the interpolation point. Each distance attenuation function value using the distance to the variable as a variable, and means for adding the value obtained by multiplying the function value by the luminance of the reference point of each corresponding surface for each cube surface; and As a means for determining whether or not the interpolation point is affected, the result of the presence / absence determination of the light shielding object according to claim 1 is performed on each cube surface, and if there is a light shielding object, the corresponding cube surface In the case where there is no light-shielding object, the ambient light mapping circuit that accumulates the addition value of each corresponding surface for each surface and uses this accumulated value as the surface luminance from the cube surface of the interpolation point is masked. . 請求項1および4の回路において、参照点毎に距離減衰関数値と輝度を乗算した値をキューブ面毎に合計し、この合計値をポリゴン頂点に頂点変数として定義して内挿補間し、直接キューブ面毎の面輝度を得る環境光マッピング回路。  5. The circuit according to claim 1, wherein a value obtained by multiplying a distance attenuation function value and luminance for each reference point is summed for each cube surface, and the sum value is defined as a vertex variable at a polygon vertex and interpolated. An ambient light mapping circuit that obtains surface brightness for each cube surface. 請求項1および4の回路において、6面すべてに関し参照点毎に距離減衰関数値と輝度を乗算した値を加算し、この加算値をポリゴン頂点に頂点変数として定義して内挿補間し、直接すべてのキューブ面からの面輝度を得る環境光マッピング回路。  5. The circuit according to claim 1 or 4, wherein a value obtained by multiplying a distance attenuation function value and luminance for each reference point is added for all six planes, and the added value is defined as a vertex variable at a polygon vertex and interpolated directly. Ambient light mapping circuit that obtains surface brightness from all cube surfaces. 請求項1、2および5の回路において、請求項5で求めるキューブ面毎の参照点加算輝度の内挿点輝度に対して、請求項2の距離スケール関数値を乗算した値をキューブ面毎の面輝度とする環境光マッピング回路。6. The circuit according to claim 1, 2 and 5, wherein a value obtained by multiplying the interpolated point luminance of the reference point added luminance for each cube plane obtained in claim 5 by the distance scale function value of claim 2 is calculated for each cube plane. Ambient light mapping circuit for surface brightness. 請求項1から7までに記載の環境光マッピング回路を用いたコンピュータグラフィックス画像装置。  A computer graphics image device using the ambient light mapping circuit according to claim 1.
JP2005267621A 2005-08-18 2005-08-18 Ambient light mapping circuit Pending JP2007052758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005267621A JP2007052758A (en) 2005-08-18 2005-08-18 Ambient light mapping circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005267621A JP2007052758A (en) 2005-08-18 2005-08-18 Ambient light mapping circuit

Publications (1)

Publication Number Publication Date
JP2007052758A true JP2007052758A (en) 2007-03-01

Family

ID=37917137

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005267621A Pending JP2007052758A (en) 2005-08-18 2005-08-18 Ambient light mapping circuit

Country Status (1)

Country Link
JP (1) JP2007052758A (en)

Similar Documents

Publication Publication Date Title
US11328472B2 (en) Watertight ray triangle intersection
US8803879B1 (en) Omnidirectional shadow texture mapping
US7212207B2 (en) Method and apparatus for real-time global illumination incorporating stream processor based hybrid ray tracing
US8018453B2 (en) Deferred acceleration data structure optimization for improved performance
JP7344267B2 (en) Importance sampling to determine light map
CN114581589A (en) Image processing method and related device
US7158133B2 (en) System and method for shadow rendering
WO2023185262A1 (en) Illumination rendering method and apparatus, computer device, and storage medium
US8102389B2 (en) Box casting using an integrated acceleration data structure
JP2011138445A (en) Transparent object display circuit
Moreau et al. Importance sampling of many lights on the GPU
JP2008282171A (en) Graphics processor, and method for rendering processing
Hormann et al. A quadrilateral rendering primitive
KR101118597B1 (en) Method and System for Rendering Mobile Computer Graphic
Gruen Ray-guided volumetric water caustics in single scattering media with dxr
JP2007052758A (en) Ambient light mapping circuit
JP2008502979A (en) Inverse texture mapping 3D graphics system
CN117058301B (en) Knitted fabric real-time rendering method based on delayed coloring
JP2009163469A (en) Global illumination circuit
Simion et al. Practical gpu and voxel-based indirect illumination for real time computer games
EP4371076A1 (en) System and method for real-time ray tracing in a 3d environment
Bailey et al. Computer graphics shaders using OpenGL 4. X
Rahman Shadow rendering techniques: hard and soft
Singh et al. Virtual tour
Kiguta Investigation into the feasibility of shadow generation on mobile graphic cards