JP2011138445A - Transparent object display circuit - Google Patents

Transparent object display circuit Download PDF

Info

Publication number
JP2011138445A
JP2011138445A JP2009299608A JP2009299608A JP2011138445A JP 2011138445 A JP2011138445 A JP 2011138445A JP 2009299608 A JP2009299608 A JP 2009299608A JP 2009299608 A JP2009299608 A JP 2009299608A JP 2011138445 A JP2011138445 A JP 2011138445A
Authority
JP
Japan
Prior art keywords
space
point
vector
refraction
intersection
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
JP2009299608A
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 JP2009299608A priority Critical patent/JP2011138445A/en
Publication of JP2011138445A publication Critical patent/JP2011138445A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide: a drawing means of videos involving refraction reflected on a transparent object such as glass; and a logical circuit implementation of the means, concerning a computer graphic drawing technology. <P>SOLUTION: An environmental cube surrounding the transparent object and an object space are provided, and the object space is further divided into smaller spaces. A refractive vector T is determined by a refraction calculation circuit 40 from a visual line vector V and a surface-normal N at the drawing point of the transparent object, and a linear expression is determined at a linear expression generation circuit 41. A crossing test of the line and the divided spaces is performed at the circuit 41 and a circuit 42, and if they form a surface crossing space, predetermined polygon data is read out. The polygon data is used to determine a crossing point coordinate value in the circuit 41 and a crossing calculation circuit 45. The crossing point coordinate value and the surface-normal are given to the refractive calculation circuit 40, and a vector projecting from the object is determined and testing of the next crossing point and crossing calculation are repeated. A crossing point with the environmental cube is determined using a vector reaching the outlying of the object space in the circuit 41, and the brightness thereof is used as the brightness of the initial drawing point. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

この発明は コンピュータグラフィックスにおいて、ガラス等の透明物体に映し出される屈折を伴う映像の描画手段と、その手段の論理回路実装の技術分野に関する。  The present invention relates to a computer graphics and a technical field of image drawing means with refraction projected on a transparent object such as glass and a logic circuit mounting of the means.

コンピュータグラフィックスにおいて透明物体上に映し出される映像表現は、描画点での視線ベクトルが物体に入射屈折し、さらにその物体から抜け出た視線ベクトルがその先にある映像と交差する点の輝度(映像)を求め、これを物体上(描画点)の輝度とすることで表現できる。従来描画点における輝度を決定する手段としてレイトレーシング法が比較的正確に映像を表現できる点で高細密な映像表現に用いられてきたが、この手法はコンピュータ負荷が重く実時間処理には適していない。実時間性を重視するポリゴンレンダリング法においては、描画点での物体の法線と、視線ベクトルおよび物体の屈折率から物体内部を通過する屈折ベクトルを求め、このベクトルがその延長線上にある物体外部の映像と交差する点の輝度を求め、これを描画点の輝度とする最初の物体上の1次屈折のみを考慮した方法が提案されている。屈折ベクトルが最後に交わる交点は、予め6面の環境キューブを設け、キューブ中心を投影中心とした6面に投影される映像を記憶し、キューブ面との交点計算で得ている。この方法は透明物体から屈折ベクトルが抜け出す際の2次屈折を考慮していないため実態とは大きく異なる映像となる。一方、屈折ベクトルの1次屈折で得られるキューブ面上の交差位置と、描画点座標値を延長したキューブ面の交点それぞれの位置から、そのおよそ中間となる位置を屈折ベクトルの新たな交点として、一次屈折のもつ誤差を少なくする手法も提案されている。しかしいずれの方法であっても、物体内部の屈折ベクトルが再び物体から抜け出す正しい位置とその際の2次屈折作用を考慮しない限り、より現実的な映像表現を得ることはできない。
本発明では、屈折ベクトルが物体から抜け出る2次屈折点の位置を正確に求め、その点における屈折を計算し、さらに複雑な形状をもつ物体で生じる多次の屈折も可能な実時間に適した描画手段とそのアルゴリズムの実装回路を提案するものである。
In computer graphics, the video expression projected on a transparent object is the brightness (video) of the point where the line-of-sight vector at the drawing point is incident on the object and refracted, and the line-of-sight vector that exits the object intersects the image ahead of it. And this can be expressed as the luminance on the object (drawing point). Conventionally, the ray tracing method has been used for high-definition video representation as a means to determine the luminance at the drawing point relatively accurately, but this method has a heavy computer load and is suitable for real-time processing. Absent. In the polygon rendering method that emphasizes real-time characteristics, a refraction vector that passes through the inside of an object is obtained from the normal of the object at the drawing point, the line-of-sight vector, and the refractive index of the object, and this vector is outside the object on the extension line. A method has been proposed in which the luminance of a point that intersects with the image is obtained, and only the first-order refraction on the first object is considered as the luminance of the drawing point. The intersection at which the refraction vector finally intersects is obtained by calculating an intersection with the cube plane by providing six environmental cubes in advance, storing images projected on the six planes with the cube center as the projection center. Since this method does not consider the second-order refraction when the refraction vector escapes from the transparent object, the image is significantly different from the actual situation. On the other hand, from the position of the intersection on the cube surface obtained by the first-order refraction of the refraction vector and the position of the intersection of the cube surface obtained by extending the drawing point coordinate value, a position approximately in the middle is set as a new intersection of the refraction vector. A method for reducing the error of first-order refraction has also been proposed. However, in any method, a more realistic image expression cannot be obtained unless the correct position where the refraction vector inside the object comes out of the object again and the secondary refraction action at that time are taken into consideration.
In the present invention, the position of the second-order refraction point where the refraction vector exits from the object is accurately obtained, the refraction at that point is calculated, and further suitable for the real time in which multi-order refraction occurring in an object having a complicated shape is possible. We propose an implementation circuit for drawing means and its algorithm.

本発明は、透明物体の多次屈折を考慮した描画を実時間で実行するアルゴリズムとそのハードウエア実装を課題としている。  An object of the present invention is to implement an algorithm for executing drawing in consideration of multi-order refraction of a transparent object in real time and its hardware implementation.

ポリゴンデータで定義された透明物体の描画においては、描画点情報として視線ベクトルと面法線がポリゴン頂点データから補間され求められる。また透明物体の透過率も前もって定義されていることから物体内部における視線ベクトル(以下屈折ベクトルという)を求めることができる。屈折ベクトルが物体のどの位置と交差し、再び物体から抜け出るかが最も計算負荷が重く、これまでの技術では実時間処理では得られていない。本発明では、透明物体の描画について、前処理と描画処理の2つに分ける。前処理は物体の変形が無い限り再計算は発生しないため、描画速度には影響を与えない。これを前提に本発明では物体を取り囲む直方体の空間(以下物体空間という)を定義し、この物体空間を任意の大きさで空間分割する。分割されたそれぞれの物体空間(以下分割空間という)には物体面が交差する分割空間、物体の完全内部および物体の完全外部となる3つの状態をもつ分割空間がそれぞれ含まれる。分割空間の座標値に対応したアドレスをもつバッファをそれぞれ設けて、分割空間情報を記憶する。すなわちx、y、z座標に対しmxnxpの分割(それぞれ任意の値)であれば、m、n、pを単純にビットフィールドに配列したアドレス構造でもよい。よってその分割数分のアドレス数とアドレス当たり所定の大きさのワード数からなるバッファとなる。本発明では、前記3つの状態の分割空間を、例えば外部ではA、内部ではB、また物体面を含む空間をCのフラグ情報として、前記の対応するアドレスのバッファ内に記憶する。  In drawing a transparent object defined by polygon data, a line-of-sight vector and a surface normal are interpolated from polygon vertex data as drawing point information. Further, since the transmittance of the transparent object is also defined in advance, a line-of-sight vector (hereinafter referred to as a refraction vector) inside the object can be obtained. The position where the refraction vector intersects and exits from the object is the most computationally intensive and has not been obtained by real-time processing with conventional techniques. In the present invention, drawing of a transparent object is divided into two processes: preprocessing and drawing processing. Since the pre-processing does not occur unless the object is deformed, the drawing speed is not affected. Based on this assumption, in the present invention, a rectangular parallelepiped space (hereinafter referred to as an object space) surrounding an object is defined, and this object space is divided into spaces of an arbitrary size. Each divided object space (hereinafter referred to as a divided space) includes a divided space where the object planes intersect each other, and a divided space having three states that are completely inside the object and completely outside the object. Each buffer having an address corresponding to the coordinate value of the divided space is provided to store the divided space information. That is, an address structure in which m, n, and p are simply arranged in a bit field may be used as long as they are mxnxp divisions (arbitrary values) with respect to the x, y, and z coordinates. Therefore, the buffer is composed of the number of addresses corresponding to the number of divisions and the number of words of a predetermined size per address. In the present invention, the divided space in the three states is stored in the buffer at the corresponding address as flag information of, for example, A outside, B inside, and C including the object plane.

一方、物体面を含む分割空間には、その空間に含まれるポリゴン情報を記憶する。これは対応するアドレスのバッファに、ポリゴン情報を記憶した別のバッファのアドレスにリンクするためのアドレスを記憶しておき、A,Bならば無視、Cのフラグがあれば、さらにリンクアドレスを読み出して、その先にあるポリゴン情報を読み出す方法である。一つの分割空間には複数のポリゴンが記憶されることや、同じポリゴンが複数の分割空間を跨ぐ場合には複数の分割空間に同一ポリゴンが記憶されることもある。分割空間当たりのポリゴン数は分割サイズに依存し、空間分割が前処理で行われることから最適化を図ることができる。  On the other hand, polygon information included in the space is stored in the divided space including the object plane. This stores the address for linking to the address of another buffer that stores polygon information in the corresponding address buffer, ignores if A and B, and reads the link address if there is a C flag. This is a method of reading the polygon information ahead. A plurality of polygons may be stored in one divided space, or the same polygon may be stored in a plurality of divided spaces when the same polygon straddles a plurality of divided spaces. The number of polygons per division space depends on the division size, and optimization can be achieved because space division is performed by preprocessing.

描画実行中において描画点(1次屈折点)の屈折ベクトルを求め、本発明では描画点座標値と屈折ベクトルから直線式を立て、その直線と交差する分割空間のみを検索する。直線の歩進は、3次元座標系の内、直線が長軸(直線の傾きの最も大きな軸)となる座標軸を基軸に、分割空間の辺長を単位として3軸それぞれの直線式に代入して得た点を含む分割空間のみをテストすれば良い。このテストとは前記[004]のA,B,Cのフラグをバッファから読み出して調べることであり、A、Bであればスキップしさらに歩進を進め、フラグCを検出することである。フラグCが検出されれば、所定のリンクアドレスからポリゴン情報を読み出し、直線式とポリゴン面との交差計算を行う。直線と面との交点計算は既知の数式的処理で可能である。  During the execution of drawing, the refraction vector of the drawing point (primary refraction point) is obtained. In the present invention, a straight line expression is established from the drawing point coordinate value and the refraction vector, and only the divided space intersecting with the straight line is searched. Straight line stepping is assigned to the linear expression of each of the three axes using the coordinate axis in which the straight line is the long axis (the axis with the greatest inclination of the straight line) in the three-dimensional coordinate system and the side length of the divided space as a unit. It is sufficient to test only the partition space that contains the points obtained. This test is to read and check the A, B, and C flags of [004] from the buffer, and if A and B, skip and further advance to detect the flag C. If the flag C is detected, polygon information is read from a predetermined link address, and intersection calculation between the straight line type and the polygon surface is performed. The intersection calculation between the straight line and the surface can be performed by a known mathematical process.

本発明ではポリゴン情報として3角形の頂点データと共に頂点における属性情報も定義する。それらは面法線、屈折率、透過率、減衰率、テキスチャーアドレスとなる。3角形面が多面体の一部である場合、それぞれの頂点における面法線は異なるため、交差点における面法線は、屈折ベクトルとポリゴン面との交差点座標値からそれぞれのポリゴン頂点に定義された3つの法線による3点補間法を用いる。これは透明物体の表面加工により透過率や減衰率が異なり、ポリゴン頂点にそれぞれ異なる前記の透過率や減衰率が定義されている場合も同様な補間法で対応できる。一方これらが頂点属性ではなくマップ方式で定義されている場合には交点のテキスチャー座標からそれらを求める方法もある。また3点補間法は直線と面との交差計算と同様に四則演算で求められるため補間処理の回路化により高速処理が可能である。  In the present invention, attribute information at the vertices is defined together with the vertex data of the triangle as polygon information. They are the surface normal, the refractive index, the transmittance, the attenuation factor, and the texture address. When the triangular surface is a part of a polyhedron, the surface normal at each vertex is different. Therefore, the surface normal at the intersection is defined as 3 in each polygon vertex from the intersection coordinate value of the refraction vector and the polygon surface. A three-point interpolation method with two normals is used. This can be dealt with by the same interpolation method even when the transmittance and attenuation rate differ depending on the surface processing of the transparent object, and the aforementioned transmittance and attenuation rate are defined differently at the vertex of the polygon. On the other hand, when these are defined by the map method instead of the vertex attribute, there is a method of obtaining them from the texture coordinates of the intersection. Further, since the three-point interpolation method is obtained by four arithmetic operations in the same manner as the intersection calculation between a straight line and a surface, high-speed processing can be performed by circuitizing the interpolation processing.

屈折ベクトルの交差点(2次屈折点)での座標値と面法線および屈折率とから、透明物体から抜け出る屈折ベクトル(以下出力視線ベクトルという)が求まる。この出力点と出力視線ベクトルを用いて、透明物体をさらに囲む環境キューブ面との交点を求め、この面の輝度を描画点(1次屈折点)の輝度とする。所定の点から環境キューブ面との交差計算方式は、(反射ベクトル)位置依存型の環境キューブ描画技術で既知の方式であり、本発明の新規範囲には含まれないので詳細は省略する。  From the coordinate value at the intersection (secondary refraction point) of the refraction vector, the surface normal, and the refractive index, a refraction vector (hereinafter referred to as an output line-of-sight vector) that exits from the transparent object is obtained. Using this output point and the output line-of-sight vector, an intersection point with the environment cube surface further surrounding the transparent object is obtained, and the luminance of this surface is set as the luminance of the drawing point (first-order refraction point). The method of calculating the intersection with the environment cube surface from a predetermined point is a method known in the (reflection vector) position-dependent environment cube drawing technique, and is not included in the new scope of the present invention, so that details are omitted.

屈折計算において屈折率と入力視線ベクトルあるいは屈折ベクトルと法線との関係から全反射が生じることがある。物体外部面での全反射であれば、視線ベクトルと面法線から反射ベクトルを求め、全反射点を新たな始点とし[006]と同様な手段で引き続き分割空間をテストし次の交点を求める。分割空間が物体空間の外郭分割空間となった場合は、反射ベクトルの延長線上にある環境キューブ面との交差する点を求めることとなる。内部での全反射の場合も同様に[006]の手段で引き続き分割空間をテストし、次の交点を求める。内部において全反射が繰り返されるループとなり、環境キューブへ到達しない場合も考えられる。この場合は屈折次数の上限を定め、それを超える場合は打ち切り、予め定義した輝度に設定することが必要となる。  In refraction calculation, total reflection may occur due to the relationship between the refractive index and the input line-of-sight vector or the refraction vector and the normal. If it is total reflection on the external surface of the object, the reflection vector is obtained from the line-of-sight vector and the surface normal, the total reflection point is set as a new start point, and the divided space is continuously tested by the same means as [006] to obtain the next intersection. . When the divided space becomes the outer divided space of the object space, a point intersecting with the environment cube surface on the extension line of the reflection vector is obtained. Similarly, in the case of total internal reflection, the divided space is continuously tested by means of [006] to obtain the next intersection. There may be a case in which total reflection is repeated inside and the environment cube is not reached. In this case, it is necessary to set an upper limit of the refraction order, and when it exceeds the upper limit, it is aborted and set to a predetermined brightness.

直線と分割空間を[006]においてテストする際、2次元では直線式に代入して得た座標値あたり2つ、3次元では4つの分割空間が直線とポリゴン面とのテスト空間となる。Cの分割空間が検出されれば、前記[007][008]と同様な手段で交点(2次屈折点)を求める。もし交点が無ければ、さらに交点が検出されるまで直線式を進める。凹面をもつ物体では最初に交点が検出された場合は[008]に提案した環境キューブとの交点を直ちに求めることはできない。この場合、それぞれの屈折点毎に直線式を求めて、直線が物体空間の外面に到着するまで続ける必要がある。  When testing a straight line and a divided space in [006], two coordinate values obtained by substituting into a linear equation in two dimensions, and four divided spaces in three dimensions become a test space for a straight line and a polygon surface. If a C divided space is detected, an intersection (secondary refraction point) is obtained by the same means as [007] [008]. If there are no intersections, the linear equation is advanced until further intersections are detected. When an intersection is first detected for an object having a concave surface, the intersection with the environment cube proposed in [008] cannot be obtained immediately. In this case, it is necessary to obtain a linear equation for each refraction point and continue until the straight line reaches the outer surface of the object space.

本発明では凹面形状においては、描画点(1次屈折点)での情報を保存すると同時に2次屈折点での出力視線ベクトルを求め、2次屈折点を起点として再び[006]の処理に入る。これを透明物体の物体空間の外面に到達するまで実行する。この結果、例えば最後のn次屈折点とそのn次出力視線ベクトルとなった場合は、それらを用いて前記環境キューブとの交点計算に入る。前記保存された情報は最終的な輝度の決定に用いられる。  In the present invention, in the concave shape, the information at the drawing point (first-order refraction point) is saved, and at the same time, the output line-of-sight vector at the second-order refraction point is obtained, and the process of [006] is started again from the second-order refraction point. . This is executed until the outer surface of the object space of the transparent object is reached. As a result, for example, when the last nth-order refraction point and its nth-order output line-of-sight vector are obtained, the intersection calculation with the environmental cube is started using them. The stored information is used for final luminance determination.

屈折計算において、物体内を通過する屈折ベクトル、あるいは出力視線ベクトルが次の表面と交差し再び物体内を透過してゆく際、一部に不透明物質が混じる場合、あるいは物体表面が塗装されている場合もある。これらを表現するには、すべての交点で入力視点ベクトルから始まったベクトルのそれぞれが、交点毎に屈折か反射ベクトル(反射にも鏡面性および鏡面性を持たないものがある)のいずれになるかをテストし、決定されたベクトルの方向で次の交点をテストする必要がある。  In refraction calculation, when the refraction vector that passes through the object or the output line-of-sight vector crosses the next surface and passes through the object again, if some opaque material is mixed or the object surface is painted In some cases. To represent them, each vector starting from the input viewpoint vector at every intersection is either a refraction or a reflection vector at each intersection (some reflections have neither specularity nor specularity) And test the next intersection in the determined vector direction.

本発明では[007]の属性がポリゴン情報として定義される。ここで減衰率は物体内の屈折ベクトルの通過長(1次屈折から交点までの距離)により環境キューブから得られる輝度を減衰する輝度減衰スケール値となる。また透過率は透過率が高ければ透明感が強いもの、透明率が低い場合は不透明となりテキスチャー座標値から交点におけるテキスチャー輝度を求める。
この場合、屈折ベクトルは不透明面に交差したことになりそれ以上の屈折・反射処理は打ち切りとなる。よってテキスチャーの色が1次屈折点(描画点)の色となり、屈折ベクトルは物体空間内にあっても描画点当たりの処理は終了する。
In the present invention, the attribute [007] is defined as polygon information. Here, the attenuation rate is a luminance attenuation scale value that attenuates the luminance obtained from the environment cube by the passage length of the refraction vector in the object (distance from the first-order refraction to the intersection). The transmittance is high when the transmittance is high, and the transparency is strong. When the transmittance is low, the transmittance is opaque, and the texture luminance at the intersection is obtained from the texture coordinate value.
In this case, the refraction vector intersects the opaque surface, and further refraction / reflection processing is aborted. Therefore, the texture color becomes the color of the primary refraction point (drawing point), and the processing per drawing point ends even if the refraction vector is in the object space.

本発明により、透明物体上に透過して映る多次屈折映像を高速に描画でき、実時間コンピュータグラフィックス映像において現実感を高めることができる。  According to the present invention, a multi-order refraction image that is transmitted through a transparent object can be drawn at a high speed, and the realism can be enhanced in a real-time computer graphics image.

本発明の手段は組み込みソフトウエアあるいは回路としてグラフィックスLSIに実装するか、IP(Intelligent Property)としての形態で実施される。  The means of the present invention is implemented in a graphics LSI as embedded software or a circuit, or is implemented in the form of IP (Intelligent Property).

以下、本発明の実施例を説明する。図1には本発明に係わる透明物体を囲む空間を格子状に分割したもので、透明物体12を囲む空間11を表す。透明物体上の描画点Pでの輝度を決定するに当たり視点10の視線ベクトルVと描画点の面法線Npとから物体点Pでの屈折(1次屈折)を求め屈折ベクトルTの経路13を得る。物体空間11は予め任意のサイズに空間分割してリスト化し、物体面12が交差する分割空間をCのフラグを付け、物体の完全に外にある空間をA、物体の完全内部をBとする。分割空間の番号をxおよびy軸上においたアドレス(x、y)で表現すると図1の例においては、P点は(1,4)にあり(2,4)、(3,4)、(4,3)を通り(5,3)の点Qにおいて物体面と交差する。実際の物体は立体の3次元であり分割空間のアドレスはz軸を含めた3軸となるが便宜上以下2次元で説明する。  Examples of the present invention will be described below. FIG. 1 shows a space 11 surrounding a transparent object 12 by dividing a space surrounding a transparent object according to the present invention into a lattice shape. In determining the luminance at the drawing point P on the transparent object, the refraction (first-order refraction) at the object point P is obtained from the line-of-sight vector V of the viewpoint 10 and the surface normal Np of the drawing point, and the path 13 of the refraction vector T is obtained. obtain. The object space 11 is preliminarily divided into an arbitrary size and listed, and the divided space where the object plane 12 intersects is flagged as C, the space completely outside the object is A, and the complete interior of the object is B. . When the number of the divided space is expressed by an address (x, y) on the x and y axes, in the example of FIG. 1, the P point is at (1, 4) (2, 4), (3,4), Crosses the object plane at point Q of (5, 3) through (4, 3). The actual object is three-dimensional in three dimensions, and the address of the divided space is three axes including the z axis.

屈折ベクトルTの経路13は(1,4)(4,3)および(5,3)において分割空間のフラグCを通過する。この分割空間では物体面があることを示したフラグとなるため、リストに登録された物体面のポリゴンとそれぞれ交差計算を行う。この交差計算は点Pと屈折ベクトルとから直線を導出し、この直線と登録されたポリゴン平面との一般的に知られた交差テストを行うものである。交差計算によって、交点Qが求まれば、点Qでの屈折計算(2次屈折)を行い、物体外部に出る出力視線ベクトル14を求める。このベクトル14は(5,3)と(6,3)を通過するが、アドレス(6,3)は物体空間Cの外郭空間であり、このアドレスに交差面がなければ出力視線ベクトル14は物体外部に出たことになり、物体との屈折交差計算は終了する。この後は透明物体を含む環境マッピングによって出力視線ベクトル14が交差する環境キューブ面の輝度を求め、これに表面属性効果を付加して点Pの輝度とすることで、屈折による映像が表現できる。  The path 13 of the refraction vector T passes through the split space flag C at (1, 4) (4, 3) and (5, 3). Since this divided space is a flag indicating that there is an object surface, the intersection calculation with each polygon of the object surface registered in the list is performed. In this intersection calculation, a straight line is derived from the point P and the refraction vector, and a generally known intersection test between this straight line and the registered polygon plane is performed. When the intersection point Q is obtained by the intersection calculation, the refraction calculation (second-order refraction) at the point Q is performed to obtain the output line-of-sight vector 14 that goes out of the object. This vector 14 passes through (5, 3) and (6, 3), but the address (6, 3) is the outer space of the object space C. If there is no intersection plane at this address, the output line-of-sight vector 14 is the object. The calculation of the refraction intersection with the object is completed because it has gone outside. Thereafter, the luminance of the environment cube surface where the output line-of-sight vector 14 intersects is obtained by environment mapping including a transparent object, and the surface attribute effect is added to this to obtain the luminance of the point P, whereby a refraction image can be expressed.

図2は本発明に係わる屈折ベクトルの通過する分割空間を決定する関係を示す。物体空間には屈折ベクトルの通過域とは無関係な分割空間が多数存在する。交差テストでは関係する分割空間のみを高速に検出し、記憶されたフラグをテストすることが必要である。本発明では屈折ベクトルTと視点の物体入射点P0から直線20を導出する。直線式はx、y、z軸の内、長軸となる軸(直線の傾きが最も大きい軸)を分母とするそれぞれの軸に対する式となるが、分割空間の単位幅(x1−x0)を代入して直線を進行させる。図2の2次元座標で説明すると、直線20はx軸により傾いており、直線式はx軸を基軸としてyi=(Δy/Δx)(xi−x0)+y0で与えられる。ここでyiはxi点のyの値である。また(x0,y0)は始点P0点の座標値である。Xiの歩進値は分割空間の単位長となる。図2においてx1の時y軸はC0で交差しx2ではC1と交差さらにx3ではC2と交差する。C0とx1が共有する分割空間はその左右であり、以下同様にC1およびC2もそれぞれの交差点を共有する分割空間(図2の影部)は、それぞれ直線20が通過する領域となる。直線がy軸を一つ歩進しない限り、一つ前の領域と次の領域のフラグテストはダブルことになるため、共有領域が代入毎に2つであっても、テストは新たな領域の1回となる。このように長軸座標値を代入して得る座標点を共有する領域は容易に検出できる。この対象領域のフラグをテストし、物体面の有無のフラグを検出するまで直線を更新する。この更新は物体空間の外郭空間となった時点で終了する。  FIG. 2 shows a relationship for determining a divided space through which a refraction vector passes according to the present invention. In the object space, there are many divided spaces that are unrelated to the passband of the refraction vector. In the intersection test, it is necessary to detect only the divided space concerned at high speed and test the stored flag. In the present invention, a straight line 20 is derived from the refraction vector T and the object entrance point P0 at the viewpoint. The linear expression is an expression for each axis having the major axis (the axis with the largest inclination of the straight line) among the x, y, and z axes, and the unit width (x1−x0) of the divided space is Substitute and advance a straight line. Referring to the two-dimensional coordinates in FIG. 2, the straight line 20 is inclined with respect to the x-axis, and the linear formula is given by yi = (Δy / Δx) (xi−x0) + y0 with the x-axis as a base axis. Here, yi is the value of y at point xi. Further, (x0, y0) is the coordinate value of the starting point P0. The step value of Xi is the unit length of the divided space. In FIG. 2, the y-axis intersects at C0 at x1, intersects C1 at x2, and intersects C2 at x3. The divided spaces shared by C0 and x1 are the left and right sides. Similarly, the divided spaces (shaded portions in FIG. 2) where C1 and C2 also share the respective intersections are regions through which the straight line 20 passes. As long as the straight line does not move one step along the y-axis, the flag test for the previous area and the next area will be double, so even if there are two shared areas for each assignment, the test will Once. As described above, the area sharing the coordinate point obtained by substituting the long axis coordinate value can be easily detected. The target area flag is tested, and the straight line is updated until an object plane presence / absence flag is detected. This update ends when the outer space of the object space is reached.

図3は本発明に関する多次屈折の関係図を示す。始点30からの入力視線ベクトルVが物体31面上のP0点(現在の描画点)に入り、P0点の面法線N0と透過率とフレネル式を用いて物体内部の屈折ベクトルT0を求める。前記分割空間における交差テストプロセスを経て交点Q0を求めその点の面法線N1と透過率から、物体を抜け出た出力視線ベクトルT1を求める。さらに前記同様に次の交点を求め点P1を検出すると、その点での面法線N2と透過率から再び物体内部の屈折ベクトルT2を求める。以下同様にQ1と面法線N3を経て出力視線ベクトルT3を得る。さらに分割空間テストを行うが物体外郭32に到達するため、この時点で交差テストと計算は終了する。ベクトルT3と最後の点Q1から、物体31をさらに取り囲む環境キューブに対し(図には記載していない)T3のキューブと交差する点の輝度を取得し、これを点P0の輝度とする。  FIG. 3 shows a relationship diagram of multi-order refraction according to the present invention. The input line-of-sight vector V from the start point 30 enters the point P0 (current drawing point) on the surface of the object 31, and the refraction vector T0 inside the object is obtained using the surface normal N0 of the point P0, the transmittance, and the Fresnel equation. The intersection point Q0 is obtained through the intersection test process in the divided space, and the output line-of-sight vector T1 that has exited the object is obtained from the surface normal N1 and the transmittance at that point. Further, when the next intersection is obtained in the same manner as described above and the point P1 is detected, the refraction vector T2 inside the object is obtained again from the surface normal N2 and the transmittance at that point. Similarly, an output line-of-sight vector T3 is obtained through Q1 and the surface normal N3. Further, a divided space test is performed, but the object outline 32 is reached, so the intersection test and calculation are finished at this point. From the vector T3 and the last point Q1, the brightness of the point that intersects the cube of T3 (not shown in the figure) with respect to the environment cube further surrounding the object 31 is obtained, and this is set as the brightness of the point P0.

それぞれの交点P0,P1がもつ属性値あるいは物体内部の半透明度や散乱特性等を考慮し、前記環境キューブから取得した輝度を減衰することができる。これはそれぞれの交点毎に属性情報を記憶し、環境キューブ輝度が得られた時点で、記憶された属性値を用いて所定の計算(例えばアルファーブレンディング等)を行うことで得られる。  The brightness acquired from the environmental cube can be attenuated in consideration of the attribute value of each of the intersections P0 and P1, or the translucency and scattering characteristics inside the object. This is obtained by storing attribute information for each intersection and performing a predetermined calculation (for example, alpha blending) using the stored attribute value when the environment cube luminance is obtained.

図4は本発明の論理回路構成図を示す。描画点での視線ベクトルVおよび面法線Nが屈折計算回路40に加わる。ここでは予め与えられた屈折率を用いて屈折ベルトルTを求める。回路はフレネル屈折式で構成する。さらに直線式発生回路41において描画点座標値P(x、y、z)と前記Tおよび既知の物体空間の大きさによって直線式を求める。直線式では逐次長軸側の分割空間単位値を代入して歩進が始まる。回路41から出力される情報は直線が分割空間の格子軸と交差する座標値であり、この座標値を共有する分割空間の番号(アドレス)となる。このアドレスはボリューム境界および分割空間交差テスト回路42に加わり、分割空間状態バッファ43をアクセスし、フラグを読み出す。読みだされたフラグは回路42において分割空間が完全内部、外部あるいは物体面交差であるかどうかをテストする。完全内部あるいは外部では回路41を歩進させ、一方、面交差空間である場合は、その分割空間に対応して前記[007]記載のそれぞれのポリゴン情報が記憶された面交差ポリゴンバッファ44をアクセスし、所定のポリゴン情報を読み出す。ポリゴン情報は通常3角形であり、ポリゴンを構成する3頂点の座標値、面法線等で構成されている。読みだされたこれらポリゴン情報は回路41がもつ直線式と交差計算回路45で交差点座標値を求める。交差しないポリゴンの場合は回路45から42にポリゴンの読み出しを歩進させる。交点が求まると、交点での座標値、面法線が経路Aを経て屈折計算回路40に与えられ、物体から抜け出たベクトルを求めることと、すでに最初の屈折ベクトルは回路40にあるため、これらを用いて再度前記同様の次の交点のテストと交点計算を繰り返す。回路41で直線の歩進が物体空間の外郭空間に達した時、交差テストは終了する。
これらの一連の処理を高速化するためには回路40から回路45を1組として屈折次数分のパイプライン構造とすることも可能となる。
FIG. 4 shows a logic circuit configuration diagram of the present invention. The line-of-sight vector V and the surface normal N at the drawing point are added to the refraction calculation circuit 40. Here, the refractive belt T is obtained using a refractive index given in advance. The circuit is composed of Fresnel refraction. Further, the linear expression generation circuit 41 obtains a linear expression based on the drawing point coordinate value P (x, y, z), the T and the size of the known object space. In the linear formula, the step starts by substituting the division space unit value on the long axis side sequentially. The information output from the circuit 41 is a coordinate value at which the straight line intersects the lattice axis of the divided space, and becomes the number (address) of the divided space that shares this coordinate value. This address is added to the volume boundary and divided space intersection test circuit 42, and the divided space state buffer 43 is accessed to read the flag. The read flag tests in circuit 42 whether the partition space is a complete interior, exterior or object plane intersection. The circuit 41 is stepped up completely inside or outside. On the other hand, if it is a plane crossing space, the plane crossing polygon buffer 44 storing each polygon information described in [007] corresponding to the divided space is accessed. Then, predetermined polygon information is read out. The polygon information is usually a triangle, and is composed of coordinate values of three vertices constituting the polygon, surface normals, and the like. From the read polygon information, a straight line equation of the circuit 41 and an intersection calculation circuit 45 obtain an intersection coordinate value. In the case of a polygon that does not intersect, the polygon 45 is read out from the circuit 45 to 42. When the intersection point is obtained, the coordinate value and surface normal at the intersection point are given to the refraction calculation circuit 40 via the path A, and the vector that has escaped from the object is obtained, and the first refraction vector is already in the circuit 40. The same intersection test and intersection calculation are repeated again using the above. When the step of the straight line reaches the outer space of the object space in the circuit 41, the intersection test ends.
In order to speed up a series of these processes, it is possible to form a pipeline structure corresponding to the refraction order by combining the circuit 40 to the circuit 45 as one set.

本発明の回路はIP(Intelligent property)として提供したり、グラフィックスプロセッサLSIに実装されることで、リアリティーのあるCG映像製作やアムーズメントシステムに利用される。  The circuit of the present invention is provided as an IP (Intelligent property) or mounted on a graphics processor LSI so that it can be used for a realistic CG video production or an amusement system.

「本発明に係わる物体空間と屈折ベクトルおよび分割空間の関係を示す。」“The relationship between the object space, the refraction vector, and the divided space according to the present invention is shown.” 「本発明に係わる視線あるいは屈折ベクトルの通過分割空間の関係を示す。」“The relationship between the line of sight or the refraction vector passing space according to the present invention is shown.” 「本発明に係わる多次屈折状態を示す。」“Shows the multi-order refractive state according to the present invention.” 「本発明に係わる透明物体表示回路を示す。」“A transparent object display circuit according to the present invention is shown.”

図1
10 視点
11 物体空間
12 透明物体
13 屈折ベクトル
14 物体外部屈折ベクトル
図2
20 屈折ベクトル直線
21 分割空間格子
図3
30 視点
31 透明物体
32 物体空間
図4
40 屈折計算回路
41 直線式発生回路
42 ボリューム境界および分割空間交差テスト回路
43 分割空間状態バッファ
44 面交差ポリゴンバッファ
45 交差計算回路
FIG.
10 viewpoint 11 object space 12 transparent object 13 refraction vector 14 object external refraction vector
20 Refraction vector line 21 Divided space lattice Fig. 3
30 viewpoint 31 transparent object 32 object space
40 Refraction Calculation Circuit 41 Linear Generation Circuit 42 Volume Boundary and Division Space Intersection Test Circuit 43 Division Space State Buffer 44 Plane Intersection Polygon Buffer 45 Intersection Calculation Circuit

Claims (4)

コンピュータグラフィックスによる透明物体の描画回路に関し、描画点の輝度を決定する手段として、透明物体を囲う環境マッピングのための環境キューブと物体空間をそれぞれ設け、この物体空間を任意の大きさに空間分割して、分割した空間を前記透明物体の面が交差する空間、完全物体外部空間、および完全物体内部空間のそれぞれ3つの空間に分類し、分割した前記空間の座標値に対応するアドレスをもつバッファを設け、このバッファには前記3つの空間を識別するフラグを記憶する手段と、さらに前記物体面が交差する分割空間では、その空間に含まれる物体面を構成するポリゴン情報を記憶するバッファを設けるそれぞれの手段をもって、前記透明物体の描画開始の前処理とすると共に、描画点におけるポリゴンの面法線、入力視線ベクトルおよび屈折率とから前記透明物体内を通過する屈折ベクトルと、描画点を始点とする直線式を求め、この直線と交差する前記分割空間に関して前記バッファに記憶したフラグを読み出し前記分割空間の状態をテストし、前記ポリゴン面を含む分割空間である場合、前記記憶したポリゴンをバッファから逐次読み出して前記直線式との交点計算を行い、交差点の無い場合はさらに直線を歩進し、一方、交差点がある場合は、ポリゴン情報から交差した点の面法線を求め、この面法線と前記屈折ベクトルから、再び前記物体から前記屈折ベクトルが抜け出る出力視線ベクトルを求める手段と、この出力視線ベクトルが前記環境キューブの面と交差する点を求め、前記環境キューブ面上にある輝度を前記描画点の輝度とするそれぞれの手段からなる透明物体表示回路。  Regarding the drawing circuit of transparent objects by computer graphics, as a means to determine the brightness of the drawing point, an environment cube and object space for environment mapping surrounding the transparent object are provided respectively, and this object space is divided into arbitrary sizes Then, the divided space is classified into three spaces each of which the planes of the transparent objects intersect, a complete object external space, and a complete object internal space, and a buffer having an address corresponding to the coordinate value of the divided space The buffer is provided with means for storing a flag for identifying the three spaces, and a buffer for storing polygon information constituting the object plane included in the space in the divided space where the object plane intersects. Each means is used as a pre-process for starting the drawing of the transparent object, as well as the polygon normal at the drawing point, From the line-of-sight vector and the refractive index, a refraction vector passing through the transparent object and a straight line expression starting from the drawing point are obtained, and a flag stored in the buffer is read with respect to the divided space intersecting with the straight line. When the condition is tested and the divided space includes the polygon surface, the stored polygons are sequentially read from the buffer and the intersection calculation with the straight line formula is performed.If there is no intersection, the straight line is further stepped, If there is an intersection, a surface normal of the intersected point is obtained from the polygon information, and from this surface normal and the refraction vector, a means for obtaining an output line-of-sight vector from which the refraction vector exits from the object again, and this output line-of-sight vector Finds a point that intersects the surface of the environmental cube, and the luminance on the environmental cube surface is the luminance of the drawing point, respectively Transparent object display circuit consisting of means. 請求項1の回路において、描画点を始点とする直線式が通過する分割空間を選択する手段として、前記直線式の傾きが最も大きな座標軸(以下長軸という)を基軸としてそれぞれの座標についての直線式を求め、前記分割空間の単位長を代入して歩進し、得られた座標点を含む分割空間に対応する前記バッファに記憶されたフラグを読み出してテストし、完全物体内部及び外部の場合は前記直線式を歩進する一方、物体面と交差するフラグのある場合は、前記バッファからポリゴン情報を読み出して前記直線式と前記面ポリゴンとの交点計算を行う手段と、前記ポリゴン情報には、頂点座標値、頂点面法線、頂点テキスチャー座標値、透過率および減衰率を含む手段と、読み出した前記頂点座標値と、交点計算により得られた前記交点座標値から、前記交差点でのそれぞれのポリゴン情報を求め、前記環境キューブ面で得た輝度に対して、前記ポリゴン情報を用いて、前記描画点の最終輝度を決定する手段をそれぞれ併せ持つ透明物体表示回路。  2. The circuit according to claim 1, wherein as a means for selecting a divided space through which a linear expression starting from a drawing point passes, a straight line for each coordinate is based on a coordinate axis (hereinafter referred to as a major axis) having the largest inclination of the linear expression. When the equation is obtained, the unit length of the divided space is substituted and stepped, the flag stored in the buffer corresponding to the divided space including the obtained coordinate point is read and tested, and the case inside and outside the complete object If there is a flag that intersects the object plane while stepping on the straight line expression, means for reading the polygon information from the buffer and calculating the intersection of the straight line expression and the surface polygon, and the polygon information includes , Vertex coordinate value, vertex surface normal, vertex texture coordinate value, means including transmittance and attenuation factor, read vertex coordinate value, and intersection coordinate value obtained by intersection calculation Al, determined the respective polygon information in the intersection, the relative luminance obtained in the environment cube surface, using said polygon information, transparent object display circuit having both respective means for determining the final brightness of the drawing point. 請求項1および2の回路において、描画点を含むそれぞれの交差点の屈折率を用いた屈折計算において、入射視線、屈折および出力視線ベクトルが全反射する場合は、その反射ベクトルを求め、全反射点を始点とする直線式を求めた後、請求項1および2と同様な手段で、その直線式が通過する分割空間のフラグをテストし、前記物体面が交差する分割空間である場合は交差点を求め、再びその点からの屈折あるいは反射ベクトルを求める前記処理を所定の回数まで繰り返す手段と、前記屈折あるいは出力視線ベクトルによる直線が物体空間の外郭分割空間に到達した時点で分割空間との交差処理を終了し、前記環境キューブ面との交差計算に移る手段を有する透明物体表示回路。  3. The circuit according to claim 1, wherein in the refraction calculation using the refractive index of each intersection including the drawing point, when the incident line of sight, the refraction and the output line of sight vector are totally reflected, the reflection vector is obtained and the total reflection point is obtained. After obtaining a straight line expression starting from, the flag of the divided space through which the straight line expression passes is tested by the same means as in claims 1 and 2, and if the object plane intersects, the intersection point is determined. Means for repeating and obtaining the refraction or reflection vector from that point again up to a predetermined number of times, and the intersection processing with the divided space when the straight line by the refraction or output line-of-sight vector reaches the outer divided space of the object space And a transparent object display circuit having means for terminating the calculation and moving to the intersection calculation with the environmental cube surface. 請求項1から3までに記載の透明物体表示回路を用いたコンピュータグラフィック画像装置。  A computer graphic image apparatus using the transparent object display circuit according to claim 1.
JP2009299608A 2009-12-29 2009-12-29 Transparent object display circuit Pending JP2011138445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009299608A JP2011138445A (en) 2009-12-29 2009-12-29 Transparent object display circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009299608A JP2011138445A (en) 2009-12-29 2009-12-29 Transparent object display circuit

Publications (1)

Publication Number Publication Date
JP2011138445A true JP2011138445A (en) 2011-07-14

Family

ID=44349782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009299608A Pending JP2011138445A (en) 2009-12-29 2009-12-29 Transparent object display circuit

Country Status (1)

Country Link
JP (1) JP2011138445A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150107466A (en) * 2014-03-14 2015-09-23 삼성전자주식회사 Method and apparatus for removing false-intersection in ray tracing
GB2535791A (en) * 2015-02-27 2016-08-31 Advanced Risc Mach Ltd Graphics processing systems
GB2535792A (en) * 2015-02-27 2016-08-31 Advanced Risc Mach Ltd Graphic processing systems
US10089776B2 (en) 2015-09-04 2018-10-02 Arm Limited Graphics processing systems
US10282895B2 (en) 2014-07-24 2019-05-07 Arm Limited Transparency parameter determination when rendering a scene for output in graphics processing systems
US10614619B2 (en) 2015-02-27 2020-04-07 Arm Limited Graphics processing systems
US10636213B2 (en) 2015-10-26 2020-04-28 Arm Limited Graphics processing systems

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150107466A (en) * 2014-03-14 2015-09-23 삼성전자주식회사 Method and apparatus for removing false-intersection in ray tracing
KR102159262B1 (en) 2014-03-14 2020-09-23 삼성전자 주식회사 Method and apparatus for removing false-intersection in ray tracing
US10282895B2 (en) 2014-07-24 2019-05-07 Arm Limited Transparency parameter determination when rendering a scene for output in graphics processing systems
GB2535791A (en) * 2015-02-27 2016-08-31 Advanced Risc Mach Ltd Graphics processing systems
GB2535792A (en) * 2015-02-27 2016-08-31 Advanced Risc Mach Ltd Graphic processing systems
US10614619B2 (en) 2015-02-27 2020-04-07 Arm Limited Graphics processing systems
GB2535792B (en) * 2015-02-27 2021-03-31 Advanced Risc Mach Ltd Graphic processing systems
GB2535791B (en) * 2015-02-27 2021-03-31 Advanced Risc Mach Ltd Graphics processing systems
US10089776B2 (en) 2015-09-04 2018-10-02 Arm Limited Graphics processing systems
US10636213B2 (en) 2015-10-26 2020-04-28 Arm Limited Graphics processing systems

Similar Documents

Publication Publication Date Title
US10692270B2 (en) Non-divergent parallel traversal of a bounding volume hierarchy
US8018453B2 (en) Deferred acceleration data structure optimization for improved performance
KR101054702B1 (en) Determining Pixel Colors in Ray-traced Image Processing Systems
US7773087B2 (en) Dynamically configuring and selecting multiple ray tracing intersection methods
US8004518B2 (en) Combined spatial index for static and dynamic objects within a three-dimensional scene
US20160292908A1 (en) Efficient hierarchy traversal in ray tracing applications
KR102493461B1 (en) System and Method of rendering
JP2011138445A (en) Transparent object display circuit
GB2537973A (en) Systems and methods for soft shadowing in 3-D rendering
US8339398B2 (en) Integrated acceleration data structure for physics and ray tracing workload
US10586375B2 (en) Hybrid raytracing approach for modeling light reflection
JP2009525526A (en) Method for synthesizing virtual images by beam emission
US8698799B2 (en) Method and apparatus for rendering graphics using soft occlusion
US20200273239A1 (en) Systems and methods for ray-traced shadows of transparent objects
KR20150117662A (en) Method and device for enriching the content of a depth map
EP4213102A1 (en) Rendering method and apparatus, and device
CN105551075A (en) Hybrid rendering apparatus and method
US8102389B2 (en) Box casting using an integrated acceleration data structure
US10970913B2 (en) Systems and methods for texture-space ray tracing of transparent and translucent objects
US11341708B2 (en) Graphics processing
US20220392146A1 (en) Graphics processing
JP4779479B2 (en) Apparatus and method for reducing three-dimensional shape data of object
JP2009146368A (en) Visible collision detection circuit
KR20140013292A (en) Ray-tracing arithmetic operation method and system
JP2009163469A (en) Global illumination circuit