JP2973413B2 - Illuminance calculation method and display device for computer graphics - Google Patents

Illuminance calculation method and display device for computer graphics

Info

Publication number
JP2973413B2
JP2973413B2 JP15168093A JP15168093A JP2973413B2 JP 2973413 B2 JP2973413 B2 JP 2973413B2 JP 15168093 A JP15168093 A JP 15168093A JP 15168093 A JP15168093 A JP 15168093A JP 2973413 B2 JP2973413 B2 JP 2973413B2
Authority
JP
Japan
Prior art keywords
voxel
illuminance
layer
processing unit
display device
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.)
Expired - Lifetime
Application number
JP15168093A
Other languages
Japanese (ja)
Other versions
JPH0721408A (en
Inventor
義人 佐藤
芳明 宇佐美
良三 武内
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP15168093A priority Critical patent/JP2973413B2/en
Publication of JPH0721408A publication Critical patent/JPH0721408A/en
Application granted granted Critical
Publication of JP2973413B2 publication Critical patent/JP2973413B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、天空光による陰影の効
果を高速に計算する方法で、特に景観シミュレーション
等の屋外景観の表示手法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for calculating the effect of shadows caused by sky light at high speed, and more particularly to a method for displaying an outdoor landscape such as a landscape simulation.

【0002】[0002]

【従来の技術】コンピュータグラフィックスによる景観
シミュレーションでは、物体の表示に用いられる光源は
太陽光が最も重要で、太陽光を直射光、即ち平行光線と
して物体を表示する手法が用いられる。しかし平行光線
のみを光源とする表示では、同一法線の面は単一の明る
さになり、単純な陰影による画像しか生成されない。
2. Description of the Related Art In a landscape simulation by computer graphics, sunlight is the most important light source used for displaying an object, and a method of displaying an object as direct light, that is, parallel rays of sunlight is used. However, in a display using only parallel rays as a light source, the surface of the same normal has a single brightness, and only an image with a simple shadow is generated.

【0003】一方、太陽光は直射光と塵や水分等の大気
中の微粒子による散乱光からなる。散乱光は太陽方向だ
けでなく、天空のあらゆる方向から届くから、平行光線
で完全に影になっていた部分にも光が届き、物体上に微
妙な陰影を作りだす。こうした散乱光の効果は自然な画
像を作成するうえで無視できない。
On the other hand, sunlight consists of direct light and light scattered by fine particles in the atmosphere such as dust and moisture. The scattered light arrives not only from the sun but also from all directions in the sky, so the light reaches the part that was completely shadowed by the parallel rays, creating a subtle shadow on the object. The effect of such scattered light cannot be ignored in creating a natural image.

【0004】そこで従来の景観シミュレーションにおい
ては、このような散乱光を天球そのものが輝いている
(天空光)として考え、天球を多数の微小な光源が半球
ドーム状に構成されているものとして光源計算し、直射
光と組み合わせて陰影表示している。
Therefore, in a conventional landscape simulation, such scattered light is considered as if the celestial sphere itself is shining (sky light), and the celestial sphere is assumed to have many minute light sources configured in a hemispherical dome shape. And it is shaded in combination with direct light.

【0005】そして、「直方体受光面を用いた天空光モ
デル、情報処理学会グラフィクスとCADシンポジウム
論文集、Volume91、Number7(1991)」の第135頁から
第144頁では、影を考慮した天空光による照度を高速
に求めるため、表示物体上にサンプリング点を設け、各
サンプリング点毎に天空光の輝度分布特性に応じた直方
体形状の仮想受光面を設定し、高速なZバッファ処理を
活用して受光面上に遮蔽物を投影している。
[0005] The sky light model using a rectangular parallelepiped light receiving surface, IPSJ Graphics and CAD Symposium, Volume 91, Number 7 (1991), pp. 135-144, uses sky light in consideration of shadows. In order to obtain illuminance at high speed, sampling points are set on the display object, a rectangular parallelepiped virtual light receiving surface is set for each sampling point according to the brightness distribution characteristics of sky light, and light is received using high-speed Z-buffer processing. The shield is projected on the surface.

【0006】[0006]

【発明が解決しようとする課題】天空光を用いると非常
に多くの光源数を必要とするので、照度計算は膨大な量
になる。公知例では、Zバッファ処理を活用すること
で、高速化を図っているが、各サンプリング点毎に全て
の物体を投影するので、計算時間がかかる。
The use of skylight requires a very large number of light sources, and the illuminance calculation becomes enormous. In the known example, the speed is increased by utilizing the Z-buffer processing. However, since all objects are projected at each sampling point, it takes a long calculation time.

【0007】本発明の目的は、Zバッファ処理によって
投影する物体の、投影回数を減らし、高速に天空光によ
る照度を計算する手段を提供することにある。
An object of the present invention is to provide a means for reducing the number of projections of an object to be projected by a Z-buffer process and calculating the illuminance of sky light at high speed.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、物体の存在する空間を立方格子状に細分するボクセ
ル分割手段と、それによって形成される各立方体毎に天
空光による照度を求めるボクセル面照度計算処理部を設
けた。さらに分割の均等性を用いて物体投影数の減少を
図るボクセル面照度合成処理部を設けた。
In order to achieve the above object, a voxel dividing means for subdividing a space where an object exists into a cubic lattice, and a voxel for obtaining illuminance by sky light for each cube formed thereby. A surface illuminance calculation processing unit was provided. Further, a voxel surface illuminance synthesis processing unit for reducing the number of object projections using the uniformity of division is provided.

【0009】[0009]

【作用】ボクセル分割手段は、表示物体の存在する空間
全体をボクセル(立方格子)に細分する処理を行なう。
またボクセル面照度計算処理部は、注目しているボクセ
ルの照度を計算するのに、隣り合うボクセルの照度計算
結果を6つのボクセル面に物体を投影し、高速なZバッ
ファ処理により求める。
The voxel dividing means performs a process of subdividing the entire space where the display object exists into voxels (cubic lattice).
In addition, the voxel surface illuminance calculation processing unit calculates the illuminance of the voxel of interest by calculating the illuminance calculation results of adjacent voxels by projecting objects on six voxel surfaces and performing high-speed Z-buffer processing.

【0010】そしてボクセル面照度合成処理部は、物体
上にある任意の計算点における照度を、その計算点を含
むボクセルの6面の照度から合成して求める。
The voxel surface illuminance synthesis processing unit obtains the illuminance at an arbitrary calculation point on the object from the illuminance of the six voxel surfaces including the calculation point.

【0011】[0011]

【実施例】図2は照度計算装置の構成概略図で、データ
線A(細実線)はボクセル分割処理部5と、ボクセル面
照度計算処理部6におけるデータの流れを、データ線B
(太実線)は、通常のCG画像生成処理のデータの流れ
を示す。またデータ線C(破線)は、ボクセル面照度合
成処理部7におけるデータの流れを示す。そしてこれら
のデータを制御部100が制御する。
FIG. 2 is a schematic diagram of the configuration of the illuminance calculation device. Data lines A (thin solid lines) indicate the flow of data in the voxel division processing unit 5 and the voxel surface illuminance calculation processing unit 6, and the data line B
(Thick solid line) shows the flow of data in the normal CG image generation processing. A data line C (broken line) indicates a data flow in the voxel surface illuminance synthesis processing unit 7. Then, the control unit 100 controls these data.

【0012】まずデータ線Aにおける流れを以下に示
す。制御部100はデータ部4から物体データをボクセ
ル分割処理部5へ送り、物体空間のボクセル分割を行な
い、ボクセル面照度計算処理部へ送る。データ部4はコ
マンド処理データ及び、物体データ、光源データとを保
持している。
First, the flow on the data line A will be described below. The control unit 100 sends the object data from the data unit 4 to the voxel division processing unit 5, performs voxel division of the object space, and sends it to the voxel surface illuminance calculation processing unit. The data section 4 holds command processing data, object data, and light source data.

【0013】また制御部100はボクセル面照度計算処
理部6から各ボクセル面毎にデータをZバッファ処理部
1へ送る。Zバッファ処理部1ではボクセル面への投影
計算を行ない、その結果をボクセル面照度計算処理部6
へ転送する。
The control section 100 sends data from the voxel plane illuminance calculation processing section 6 to the Z buffer processing section 1 for each voxel plane. The Z-buffer processing unit 1 performs projection calculation on the voxel surface, and outputs the result to the voxel surface illuminance calculation processing unit 6
Transfer to

【0014】以上の処理が全て終了した後、次のように
データ線Bにおける処理を行なう。データ線Bにおける
処理は、コマンド処理データに基づいて必要な回数だけ
繰り返す。まず制御部100は物体データと光源データ
をZバッファ処理部へ送り、座標変換及び陰面処理を行
なう。次にボクセル面照度合成部7では、予め求めてお
いたボクセル面照度を用いてボクセル面照度合成処理を
行ない、結果をデータ線Cでシェーディング処理部2へ
送り、できた画像を表示装置3により表示する。
After all the above processes are completed, the processes on the data lines B are performed as follows. The processing on the data line B is repeated a required number of times based on the command processing data. First, the control unit 100 sends the object data and the light source data to the Z buffer processing unit, and performs coordinate conversion and hidden surface processing. Next, the voxel surface illuminance synthesis unit 7 performs voxel surface illuminance synthesis processing using the voxel surface illuminance determined in advance, sends the result to the shading processing unit 2 via the data line C, and displays the resulting image on the display device 3. indicate.

【0015】次に図1のフローチャートを用いて各処理
の具体的な内容を説明する。ステップ101で照度を求
めたい物体を含む全範囲を求める。これを物体空間と呼
ぶ。物体空間は、xyz各軸に沿った直方体状の空間
で、xyz各座標値の最大値、最小値で表し、そのいず
れの面も物体と接している。
Next, the specific contents of each process will be described with reference to the flowchart of FIG. In step 101, the entire range including the object whose illuminance is to be obtained is obtained. This is called an object space. The object space is a rectangular parallelepiped space along each xyz axis, and is represented by the maximum value and the minimum value of each xyz coordinate value, and both surfaces are in contact with the object.

【0016】次に天球パッチを生成する(ステップ10
2)。図3に示すように、天球パッチ9は物体空間に対
して十分大きな半径を持つ天球8を設定し、細かいパッ
チに分割したものである。各パッチには、天球上のRG
B各波長の天空輝度を表す色属性を与える。天空輝度
は、天球から物体に届くまでの距離による減衰を考慮す
る。
Next, a celestial sphere patch is generated (step 10).
2). As shown in FIG. 3, the celestial sphere patch 9 is obtained by setting the celestial sphere 8 having a sufficiently large radius with respect to the object space and dividing the sphere into small patches. Each patch has an RG on the celestial sphere
B. A color attribute representing the sky luminance of each wavelength is given. The sky brightness takes into account the attenuation due to the distance from the sky ball to the object.

【0017】具体的には、天球の半径をRsとし、天球
のある点での輝度がIであるとすると、その点に対応す
る天球パッチの天空輝度は(I/Rs)2とする。RG
B各成分について同様にする。
Specifically, assuming that the radius of the celestial sphere is Rs and the luminance at a certain point of the celestial sphere is I, the sky luminance of the celestial sphere patch corresponding to that point is (I / Rs) 2 . RG
The same applies to each component B.

【0018】また、ある方向の照度を求めるとき、全く
影響のない部分の天球パッチを除くため、図3の様に各
照度方向に対して、天球パッチを4つに分け、その一部
を割り当てるようにした。これをe(d)と書く。dは
ある照度方向で、+x、−x、+y、−y方向のいづれ
かのとき、e(d)はその方向を中心として90度の範
囲を示す。またd=+zのとき、e(+z)は天球パッ
チ全体を意味する。d=−zのとき、e(−z)は地面
を表す平面とし、色は地面による反射光を表す一様な色
とする。
When calculating the illuminance in a certain direction, the celestial sphere patch is divided into four parts for each illuminance direction as shown in FIG. I did it. This is written as e (d). d is a certain illuminance direction, and in any of the + x, -x, + y, and -y directions, e (d) indicates a range of 90 degrees around the direction. When d = + z, e (+ z) means the whole celestial sphere patch. When d = -z, e (-z) is a plane representing the ground, and the color is a uniform color representing light reflected by the ground.

【0019】次に物体空間のボクセル分割処理を行なう
(ステップ103)。図4(a)のように、物体空間1
0を立方格子状に分割する。分割により形成される立方
体の1つ1つをボクセルと呼ぶ。xyzの各方向での分
割数は異なっていてもよい。
Next, voxel division processing of the object space is performed (step 103). As shown in FIG. 4A, the object space 1
0 is divided into a cubic lattice. Each of the cubes formed by the division is called a voxel. The number of divisions in each direction of xyz may be different.

【0020】図4(b)に示すように、ボクセル11は
6つの面を持つ。各面はそれぞれ、+x(x軸正)方
向、−x(x軸負)方向、+y(y軸正)方向、−y
(y軸負)方向、+z(z軸正)方向、−z(z軸負)
方向に対して垂直となる。ボクセルの6面をそれぞれボ
クセル面と呼ぶ。
As shown in FIG. 4B, the voxel 11 has six surfaces. Each surface is in the + x (positive x-axis) direction, the -x (negative x-axis) direction, the + y (positive y-axis) direction, and -y
(Y-axis negative) direction, + z (z-axis positive) direction, -z (z-axis negative)
Perpendicular to the direction. Each of the six voxel surfaces is called a voxel surface.

【0021】次に図5に示すように、それぞれの物体1
2と交差するボクセルを探索し、そのボクセルに対応付
けられた物体12を登録する。説明を容易にするため2
次元で表すが、実際の計算は3次元で行なう。
Next, as shown in FIG.
A voxel that intersects 2 is searched for, and an object 12 associated with the voxel is registered. 2 for easy explanation
Although expressed in dimensions, the actual calculation is performed in three dimensions.

【0022】図5において、ボクセル群V1は物体Aの
みが登録されるボクセルを示す。ボクセル群V2は物体
Bのみが登録されるボクセルである。ボクセル群V3
物体Aと物体Bの両方を登録する。登録は、あるボクセ
ルを指定した場合に、そのボクセルに交差する物体を全
て列挙できればよい。この実施例の場合、各ボクセルに
対してそのボクセルに交差する物体のリストを作成し、
リストをたどることによって交差する物体を列挙する。
[0022] In FIG. 5, voxels V 1 was shown voxels only the object A is registered. Voxels V 2 is a voxel only object B is registered. Voxels V 3 registers both the objects A and B. The registration only needs to be able to enumerate all objects crossing the voxel when a certain voxel is specified. For this example, for each voxel, create a list of objects that intersect that voxel,
Enumerate intersecting objects by following the list.

【0023】図6はボクセル分割の際、オペレータが部
分的に分割を細かくする位置を指定するため3次元で示
したときの図で、表示装置3の分割入力画面13を示し
たものである。分割入力画面13は物体12をxyz各
軸方向に正射影した三画面構成になっており、物体12
と、それに対応するボクセル分割の様子が表示される。
FIG. 6 is a view showing a three-dimensional display in which the operator designates a position where the division is to be made finer at the time of voxel division, and shows the division input screen 13 of the display device 3. The divided input screen 13 has a three-screen configuration in which the object 12 is orthogonally projected in each of x, y, and z axes.
And the corresponding voxel division state is displayed.

【0024】オペレータは、この画面を見ながら分割数
を増やしたり減らしたりしたい部分を指定する。照度計
算の精度はボクセル分割の細かさにより決まり、物体空
間中の任意の部分の分割数を増やすことにより、計算精
度を上げることができ、あまり計算精度の必要でないと
ころは分割数を減らすように指定する。
The operator designates a part to increase or decrease the number of divisions while viewing this screen. The accuracy of the illuminance calculation is determined by the fineness of the voxel division.By increasing the number of divisions in any part of the object space, the calculation accuracy can be increased, and where the calculation accuracy is not necessary, the number of divisions should be reduced. specify.

【0025】次に制御部100はボクセル情報をボクセ
ル面照度計算処理部6へ送り、ボクセル面照度計算処理
を各照度方向について繰り返す(ステップ104)。ボ
クセル面照度計算処理部6は各ボクセル面のデータをZ
バッファ処理部1へ送り、ボクセル面への投影計算を行
い、ボクセル面への投影結果を得る(ステップ105〜
ステップ113)。
Next, the control unit 100 sends the voxel information to the voxel surface illuminance calculation processing unit 6, and repeats the voxel surface illuminance calculation process for each illuminance direction (step 104). The voxel plane illuminance calculation processing unit 6 converts the data of each voxel plane into Z
The data is sent to the buffer processing unit 1, the projection calculation on the voxel plane is performed, and the projection result on the voxel plane is obtained (steps 105 to 105)
Step 113).

【0026】今、図7に示すように、照度方向dを向い
て、最も天球に近いボクセルから処理していくため、各
照度方向について、ボクセル層を定める。天球に近い面
にあるボクセルから順,に、第1層、第2層、…、等と
呼ぶ。第1層に属するボクセルに関するステップ105
の処理が全て終了した後に第2層のボクセルの処理に移
る。以下第3層、第4層、…と続ける。
As shown in FIG. 7, a voxel layer is determined for each illuminance direction in order to process the voxels closest to the celestial sphere in the illuminance direction d. The voxels on the surface close to the celestial sphere are called a first layer, a second layer,... Step 105 for voxels belonging to the first layer
After all of the above processes are completed, the processing shifts to the processing of the voxels of the second layer. Hereinafter, the third layer, the fourth layer, and so on are continued.

【0027】ステップ106では、注目ボクセルVの中
心を視点とし、照度方向dを向いたときに、天球パッチ
の可視範囲を決定するため、天球パッチ及び物体を投影
するためのスクリーンを設定する。
In step 106, a screen for projecting the celestial sphere patch and the object is set in order to determine the visible range of the celestial sphere patch when the illuminance direction d is set with the center of the voxel V of interest as the viewpoint.

【0028】スクリーンは、照度方向dのボクセル面と
一致するように設定する。すなわち視点をボクセルVの
中心点、視線方向をd方向、アスペクト比(投影スクリ
ーンの縦横比)を1、画角を90度、視点からスクリー
ンまでの距離をw/2とする。ただし、wはボクセルの
一辺の長さである。
The screen is set so as to coincide with the voxel plane in the illuminance direction d. That is, the viewpoint is the center point of the voxel V, the line of sight is the d direction, the aspect ratio (the aspect ratio of the projection screen) is 1, the angle of view is 90 degrees, and the distance from the viewpoint to the screen is w / 2. Here, w is the length of one side of the voxel.

【0029】ボクセルVの照度方向dのスクリーンをs
(v、d)と書いて表す。スクリーンはさらに、細かい
ピクセルに分かれており、各ピクセルはRGB各成分の
色を記憶するメモリからなる。
The screen in the illuminance direction d of the voxel V is represented by s
(V, d). The screen is further divided into fine pixels, each of which comprises a memory for storing the colors of the RGB components.

【0030】ステップ107では、d方向について、ボ
クセルVが、第1層のボクセルであるかどうかを判定す
る。第1層のボクセルである場合はステップ108を実
行し、次のボクセルの処理に移る。
In step 107, it is determined whether or not the voxel V is the first layer voxel in the d direction. If it is the first-layer voxel, step 108 is executed, and the process proceeds to the next voxel.

【0031】ステップ108では、ボクセルVのスクリ
ーンs(v、d)に対して、天球パッチe(d)を投影
する。s(v、d)の各ピクセルには、投影された天球
パッチの色、すなわち天球の輝度が記録される。
In step 108, the celestial sphere patch e (d) is projected onto the screen s (v, d) of the voxel V. In each pixel of s (v, d), the color of the projected celestial sphere patch, that is, the luminance of the celestial sphere is recorded.

【0032】また、天球の半径は物体空間に対して十分
大きいので、照度方向dからの天球パッチの投影結果
は、ボクセルの位置によらず、各照度方向に対して一度
投影するだけでよい。したがって、d方向について、一
度天球パッチの投影を行なったら、後は投影を行なった
スクリーンを複写すればよい。この最初に投影を行なっ
たスクリーンを、S(d)と書く。
Further, since the radius of the celestial sphere is sufficiently large with respect to the object space, the projection result of the celestial sphere patch from the illuminance direction d need only be projected once for each illuminance direction regardless of the position of the voxel. Therefore, once the celestial sphere patch is projected in the d direction, the projected screen may be copied thereafter. The screen on which the projection is performed first is written as S (d).

【0033】第2層以上のボクセルである場合はステッ
プ109から111を実行する。ステップ109では、
前ステップにおけるS(d)をs(v、d)に複写す
る。
If it is a voxel of the second or higher layer, steps 109 to 111 are executed. In step 109,
S (d) in the previous step is copied to s (v, d).

【0034】ステップ110では、以下で述べる処理を
行なう。図8(a)は、繰り返し処理で現在注目するボ
クセル11と、そのボクセル11と対応する前方向ボク
セル14を抜き出している。
In step 110, the processing described below is performed. FIG. 8A shows a voxel 11 currently focused on in the repetitive processing and a forward voxel 14 corresponding to the voxel 11.

【0035】前方向ボクセル14とは、注目ボクセル1
1の直前のボクセル層に属し、注目ボクセル11に接す
る9つのボクセルである。図8(b)のように、vに対
し、d方向の前方向ボクセルを、f(v、d、i)(0
≦i≦8)と書く。
The forward voxel 14 is the voxel 1 of interest.
Nine voxels belonging to the voxel layer immediately before 1 and in contact with the voxel of interest 11. As shown in FIG. 8B, a forward voxel in the d direction is defined as f (v, d, i) (0) with respect to v.
≤ i ≤ 8).

【0036】また、スクリーンs(v、d)を9つの等
面積の領域に分け、図8(c)のように各領域に番号を
付け、特に、s(v、d)[i]と書く。
Also, the screen s (v, d) is divided into nine equal-area areas, each area is numbered as shown in FIG. 8C, and especially, s (v, d) [i] is written. .

【0037】図9(a)のように、前方向ボクセルf
(v、d、i)のスクリーンs(f(v、d、i)、
d)から、斜線をした部分のデータを切り出し、s
(v、d)[i]に貼り付ける。
As shown in FIG. 9A, the forward voxel f
(V, d, i) screen s (f (v, d, i),
From d), cut out the data in the shaded area,
(V, d) Paste to [i].

【0038】次に前方向ボクセルにおけるスクリーン全
体を貼り付けずに、一部を切り出して貼り付ける理由を
示す。
Next, the reason why a part of the front voxel is cut out and pasted without pasting the entire screen will be described.

【0039】図9(b)と図9(c)は貼り付けを行な
うときのスクリーンの位置関係を上方から見たものであ
る。例えば隣り合う2つの前方向ボクセルf1とf2のス
クリーンをs(v、d)内に貼り付けるとする。ここ
で、f1とf2はf(v、d、i)(0≦i≦8)のいづ
れかを指す。
FIGS. 9 (b) and 9 (c) show the positional relationship of the screen when pasting is viewed from above. For example, suppose that screens of two adjacent forward voxels f 1 and f 2 are pasted in s (v, d). Here, f 1 and f 2 indicate one of f (v, d, i) (0 ≦ i ≦ 8).

【0040】図9(b)は、前方向ボクセルにおけるf
1とf2のスクリーン全部を用いたときの様子を示す。
FIG. 9B shows f in the forward voxel.
Illustrating a state of using the 1 and screen all of f 2.

【0041】領域91、92はそれぞれs(f1、d)
とs(f2、d)に投影される物体の存在領域を示す。
両領域の重なった領域は、s(f1、d)とs(f2
d)に重複して投影される物体の存在領域を示してい
る。
Areas 91 and 92 are respectively s (f 1 , d)
And s (f 2 , d).
The area where both areas overlap is s (f 1 , d) and s (f 2 ,
FIG. 3D shows the region where the object is projected in an overlapping manner.

【0042】図9(c)は、図9(a)のように、前方
向ボクセルのスクリーンの一部を用いたときの様子を示
す。領域93、94はそれぞれs(f1、d)とs
(f2、d)の貼り付けの際に切り出す部分に投影され
る物体の存在する領域を示す。図9(b)に比べ、重複
して投影される部分が小さくなるという利点がある。
FIG. 9C shows a state when a part of the screen of the forward voxel is used as shown in FIG. 9A. Areas 93 and 94 are s (f 1 , d) and s, respectively.
It shows a region where an object is projected on a portion cut out at the time of pasting (f 2 , d). As compared with FIG. 9B, there is an advantage that a portion projected overlappingly becomes smaller.

【0043】ここで、図9(a)の例では、切り出す領
域はf(v、d、i)の4分の1の面積となっている
が、この面積は可変でよく、物体の形状によって、誤差
のなるべく小さくなるように設定するとよい。また、”
貼り付ける”とは、s(f(v、d、i)、d)から切
り出した領域を縮小あるいは拡大し、そのピクセル値を
s(v、d)[i]に複写することを指す。
Here, in the example shown in FIG. 9A, the area to be cut out has an area of one quarter of f (v, d, i). However, this area may be variable and depends on the shape of the object. , The error should be set as small as possible. Also,"
"Paste" refers to reducing or enlarging a region cut out from s (f (v, d, i), d) and copying the pixel value to s (v, d) [i].

【0044】ところで、前方向ボクセルf(v、d、
i)の位置が物体空間の外となる場合、f(v、d、
i)は存在しない。このときはs(f(v、d、i)、
d)の貼り付けを行なわず、次のステップ処理に移る。
By the way, the forward voxel f (v, d,
If the position of i) is outside the object space, f (v, d,
i) does not exist. In this case, s (f (v, d, i),
The process proceeds to the next step processing without performing the pasting in d).

【0045】ステップ111では、前方向ボクセルに登
録された物体を、s(v、d)に投影する。ここで投影
される物体は、前ステップにおいて貼り付けた前方向ボ
クセルのスクリーンに投影された物体よりも近い位置に
あるので、現在のs(v、d)の上に単純に投影するこ
とができる。
In step 111, the object registered in the forward voxel is projected on s (v, d). Since the object projected here is at a position closer to the object projected on the screen of the forward voxel pasted in the previous step, it can be simply projected on the current s (v, d). .

【0046】ステップ112は、113のステップの処
理を全てのボクセルについて繰り返し行なうことを示
す。
Step 112 indicates that the processing of step 113 is repeated for all voxels.

【0047】ステップ113では、d方向について、ボ
クセルVのスクリーンs(v、d)に投影された画像か
ら、ボクセルに届く天空照度に変換する。
In step 113, the image projected on the screen s (v, d) of the voxel V in the d direction is converted into the sky illuminance reaching the voxel.

【0048】具体的には、s(v、d)のピクセルのう
ち、天球パッチが投影された部分のみをRGB各成分毎
に合計し、これを、ボクセル面へのd方向からの照度と
する。
More specifically, of the pixels of s (v, d), only the portion where the celestial sphere patch is projected is totaled for each of the RGB components, and this is used as the illuminance on the voxel surface from the d direction. .

【0049】ここまでの処理で、全てのボクセルのボク
セル面における照度が求まる。
With the above processing, the illuminance on the voxel surface of all voxels is obtained.

【0050】ステップ114では、ボクセル面照度合成
処理部7により物体上の照度を求めレンダリングを行な
う。ボクセル面照度合成処理部7ではデータ線C(破
線)で前もって求めたボクセル面照度を用いて合成処理
し、結果をシェーディング処理部2へ送り、出来上がっ
た画像を表示装置3で表示する。
In step 114, the illuminance on the object is determined by the voxel surface illuminance synthesis processing unit 7 and rendering is performed. The voxel surface illuminance synthesis processing unit 7 performs synthesis processing using the voxel surface illuminance obtained in advance by the data line C (broken line), sends the result to the shading processing unit 2, and displays the completed image on the display device 3.

【0051】図10を用いて、各物体12上の任意の計
算点15におけるボクセル面照度合成処理の説明を行な
う。簡単のために、図は2次元として表している。
The voxel surface illuminance synthesis processing at an arbitrary calculation point 15 on each object 12 will be described with reference to FIG. For simplicity, the figures are shown as two-dimensional.

【0052】まず、物体12上にある点P15を含むボ
クセル11を探す。ボクセルの均一性により、Pの座標
から容易に探すことができる。nは点Pにおける法線ベ
クトル16である。
First, the voxel 11 including the point P15 on the object 12 is searched. Due to the uniformity of voxels, it can be easily found from the coordinates of P. n is a normal vector 16 at the point P.

【0053】前ステップまでの処理によって、ボクセル
Vに対する各照度方向からの天空照度は既に求められて
いる。+y方向からの照度がI0、nと+yとのなす角
がθであるとすると、+y方向から点P15への照度は
0cosθとして計算する。他の照度方向についても
同様に計算し、各照度方向からの照度の合計を点P15
における照度とする。ただしcosθが負となる照度方
向は、点P15からは見えないので合計から除く。
The sky illuminance of the voxel V from each illuminance direction has already been obtained by the processing up to the previous step. Assuming that the illuminance from the + y direction is I 0 and the angle between n and + y is θ, the illuminance from the + y direction to the point P15 is calculated as I 0 cos θ. The same calculation is performed for the other illuminance directions, and the total illuminance from each illuminance direction is calculated at a point P15.
And the illuminance at. However, the illuminance direction in which cos θ is negative cannot be seen from the point P15, and is therefore excluded from the total.

【0054】このようにして点P15における照度を計
算し、レンダリングを行なう。
In this way, the illuminance at the point P15 is calculated and rendering is performed.

【0055】図11は物体12の表面における照度計算
の例であるが、本方法を用いて照度を計算した場合の特
徴を表した図でもある。
FIG. 11 shows an example of the calculation of the illuminance on the surface of the object 12, and also shows a characteristic when the illuminance is calculated using the present method.

【0056】この照度計算において、同一ボクセル内で
法線の向きが同一の面では、その照度は一様で、ボクセ
ル毎の濃度(照度)が異なるので、図11のように、ボ
クセル分割によるモザイクパターンが現われる。このよ
うに、隣り合うボクセルにおける照度が大きく違うとき
には、そのボクセルを更に細かく分割して、照度計算を
行なう。
In this illuminance calculation, if the direction of the normal line is the same in the same voxel, the illuminance is uniform and the density (illuminance) of each voxel is different. Therefore, as shown in FIG. A pattern appears. As described above, when the illuminance of adjacent voxels is significantly different, the voxel is further divided into smaller parts and the illuminance is calculated.

【0057】物体12の配置が変わらないから、各点1
5における照度も変化しないので、一度ボクセルの照度
を計算してしまえば、CG画像作成の際の、視点、視線
方向、画角などのカメラパラメータの変更だけならば何
度でも用いることができる。
Since the arrangement of the object 12 does not change, each point 1
Since the illuminance at 5 does not change, once the illuminance of the voxel is calculated once, it can be used as many times as necessary only for changing camera parameters such as a viewpoint, a line-of-sight direction, and an angle of view when creating a CG image.

【0058】以上に示した処理により、天空光を考慮し
た画像を効率良く生成することができる。
By the processing described above, an image in consideration of sky light can be efficiently generated.

【0059】以上は本発明の一実施例で、次のようにし
てもよい。
The above is one embodiment of the present invention, and the following may be adopted.

【0060】上記実施例では物体空間全域に対してボク
セル分割し、照度計算を行なうので、物体12の存在し
ない空間においても照度を計算しているが、図12のよ
うに、物体空間中で、物体12の存在しない部分にはボ
クセル分割を行なわないとする。すなわち物体の密集す
る領域毎に小物体空間17を定義し、この小物体空間毎
にボクセル分割する局所分割処理を施し、小物体空間毎
にボクセル面照度計算処理を行なう。ただし、小物体空
間どうしは互いに重複しないように分ける。ボクセル面
照度計算処理の際、第1層ボクセルでの天球の投影の
後、他の小物体空間内の物体12を投影を行なう。これ
により他の小物体空間内にある物体12による天空光の
遮蔽を考慮することができる。
In the above embodiment, the entire object space is divided into voxels and the illuminance is calculated. Therefore, the illuminance is calculated even in the space where the object 12 does not exist. However, as shown in FIG. It is assumed that voxel division is not performed on a portion where the object 12 does not exist. That is, a small object space 17 is defined for each region where objects are dense, a local division process for voxel division is performed for each small object space, and a voxel surface illuminance calculation process is performed for each small object space. However, the small object spaces are divided so as not to overlap each other. In the voxel surface illuminance calculation process, the object 12 in another small object space is projected after the projection of the celestial sphere by the first layer voxel. Thereby, the shielding of the sky light by the object 12 in the other small object space can be considered.

【0061】図13のグラフは、従来法と比較した投影
回数の減少の概略を示している。
The graph of FIG. 13 shows an outline of the reduction in the number of projections as compared with the conventional method.

【0062】物体空間を立方体と仮定し、一辺の長さを
nとし、その中に含まれる物体の個数をm個とする。物
体が物体空間中に平均に散らばっているとすれば、mは
nの3乗に比例した数となる。
Assuming that the object space is a cube, the length of one side is n, and the number of objects contained therein is m. If the objects are scattered on average in the object space, m is a number proportional to the cube of n.

【0063】従来法のように、物体表面にサンプリング
点を設置した場合、サンプリング点は、少なくともmに
比例した数となる。この場合、各サンプリング点毎に全
物体を投影するので、全投影回数は、m2、すなわちn6
に比例した回数となる。
When sampling points are set on the object surface as in the conventional method, the number of sampling points is at least proportional to m. In this case, since all objects are projected at each sampling point, the total number of projections is m 2 , that is, n 6
The number is proportional to.

【0064】一方、本発明による手法では、物体の投影
回数はボクセルの分割数に関係なく、各照度方向(6方
向)に対して一物体一度の投影なので、全体で投影回数
は6m回、即ち6n3回となる。
On the other hand, in the method according to the present invention, the number of projections of an object is once for each object in each illuminance direction (six directions) regardless of the number of voxel divisions. 6n 3 times.

【0065】[0065]

【本発明の効果】本発明によれば、ボクセルを均等に分
割することで隣り合うボクセルの照度計算結果を用いる
ことにより、照度を求めるための物体の投影回数が各照
度方向に対し一度でよく、計算点毎に全ての物体を投影
する方法に比べ、照度計算における物体投影回数が減少
する。ので、照度計算を高速に行なうことができる効果
がある。
According to the present invention, the number of projections of the object for obtaining the illuminance can be once for each illuminance direction by equally dividing the voxel and using the illuminance calculation results of the adjacent voxels. In comparison with the method of projecting all objects for each calculation point, the number of object projections in the illuminance calculation is reduced. Therefore, there is an effect that illuminance calculation can be performed at high speed.

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

【図1】本発明にかかる処理を示すフローチャートであ
る。
FIG. 1 is a flowchart showing a process according to the present invention.

【図2】照度計算装置の構成概略図である。FIG. 2 is a schematic configuration diagram of an illuminance calculation device.

【図3】天球と天球パッチの説明図である。FIG. 3 is an explanatory diagram of a celestial sphere and a celestial sphere patch.

【図4】物体空間とボクセルの説明図である。FIG. 4 is an explanatory diagram of an object space and voxels.

【図5】ボクセルに登録する物体の説明図である。FIG. 5 is an explanatory diagram of an object registered in a voxel.

【図6】ボクセルの分割入力画面の説明図である。FIG. 6 is an explanatory diagram of a voxel division input screen.

【図7】ボクセル層の説明図である。FIG. 7 is an explanatory diagram of a voxel layer.

【図8】前方向ボクセルの説明図である。FIG. 8 is an explanatory diagram of a forward voxel.

【図9】スクリーンの貼り付けに関する説明図である。FIG. 9 is an explanatory diagram of pasting a screen.

【図10】物体上のある点における照度計算の説明図で
ある。
FIG. 10 is an explanatory diagram of illuminance calculation at a certain point on an object.

【図11】物体表面上の照度計算例を示した図である。FIG. 11 is a diagram showing an example of illuminance calculation on the surface of an object.

【図12】ボクセルの分割例を示した図である。FIG. 12 is a diagram showing an example of voxel division.

【図13】物体空間の大きさと投影回数の関係を示した
図である。
FIG. 13 is a diagram showing the relationship between the size of the object space and the number of projections.

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

1…Zバッファ処理部、2…シェーディング処理部、3
…表示装置、4…データ部、5…ボクセル分割処理部、
6…ボクセル面照度計算処理部、7…ボクセル面照度合
成処理部、8…天球、9…天球パッチ、10…物体空
間、11…ボクセル、12…物体、13…分割入力画
面、14…前方向ボクセル、15…計算点、16…法線
ベクトル、17…小物体空間、100…制御部
1 ... Z buffer processing unit, 2 ... Shading processing unit, 3
... Display device, 4 ... Data part, 5 ... Voxel division processing part,
6: Voxel surface illuminance calculation processing unit, 7: Voxel surface illuminance synthesis processing unit, 8: celestial sphere, 9: celestial sphere patch, 10: object space, 11: voxel, 12: object, 13: divided input screen, 14: forward direction Voxel, 15: calculation point, 16: normal vector, 17: small object space, 100: control unit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−324853(JP,A) 特開 平5−94539(JP,A) 特開 平5−56780(JP,A) 特開 平4−75180(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06T 15/00 - 15/70 JICSTファイル(JOIS)────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-5-324485 (JP, A) JP-A-5-94539 (JP, A) JP-A-5-56780 (JP, A) 75180 (JP, A) (58) Field surveyed (Int. Cl. 6 , DB name) G06T 15/00-15/70 JICST file (JOIS)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】天球光から照射された物体の照度計算を求
め、その結果を表示装置に表示するコンピュータグラフ
ィックスの照度計算方法において、 ボクセル分割手段を用いて前記物体の全てを包含する直
方体状空間をボクセルに分割し、 各照度方向に対応し
たボクセル層のうち、第1層ボクセル面上に前記天球光
及び前記物体をZバッファ処理手段によって投影し、 ボクセル面照度計算処理手段で前記第1層ボクセルを前
方向ボクセルとして、前記前方向ボクセルのスクリーン
を前記Zバッファ処理手段によって特定ボクセルのスク
リーン上に投影して、前記特定ボクセル面での照度を求
め、 前記特定ボクセルからなるボクセル層を前方向ボクセル
として、逐次、前記バッファ処理手段を用いて次の特定
ボクセルへ投影し、前記特定ボクセルからなる次のボク
セル層のボクセル面照度を求める処理を繰返した後、 ボクセル面照度合成処理手段で前記物体の法線方向と前
記ボクセル面の法線方向とのなす角度から各ボクセル面
の照度を合成し、合成された前記物体を表示装置に表示
することを特徴とするコンピュータグラフィックスの照
度計算方法。
1. An illuminance calculation method of computer graphics for calculating an illuminance of an object irradiated from celestial sphere light and displaying the result on a display device, wherein a rectangular parallelepiped shape including all of the object by using voxel dividing means. The space is divided into voxels, and among the voxel layers corresponding to the respective illuminance directions, the celestial sphere light and the object are projected onto a voxel surface of a first layer by a Z-buffer processing unit, and the first voxel surface is calculated by the voxel surface illuminance calculation processing unit. With the layer voxel as the forward voxel, the screen of the forward voxel is projected on the screen of the specific voxel by the Z-buffer processing means to determine the illuminance on the specific voxel surface, and the voxel layer consisting of the specific voxel is moved forward. The direction voxel is sequentially projected to the next specific voxel using the buffer processing means, and the specific voxel is projected. After repeating the processing for obtaining the voxel surface illuminance of the next voxel layer composed of the voxel surface, the illuminance of each voxel surface is determined from the angle between the normal direction of the object and the normal direction of the voxel surface by the voxel surface illuminance synthesis processing means. Illuminance calculation method, and displaying the synthesized object on a display device.
【請求項2】請求項1において、 前記ボクセル面照度計算処理手段で前記前方向ボクセル
のスクリーンの一部を第2層ボクセルのスクリーンに貼
り付けることを特徴とするコンピュータグラフィックス
の照度計算方法。
2. The computer graphics illuminance calculation method according to claim 1, wherein said voxel surface illuminance calculation processing means pastes a part of said forward voxel screen onto a second layer voxel screen.
【請求項3】請求項1又は請求項2において、前記ボク
セル分割処理の際、部分的に分割数を可変としたことを
特徴とするコンピュータグラフィックスの照度計算方
法。
3. The computer graphics illuminance calculation method according to claim 1, wherein the number of divisions is partially changed during the voxel division processing.
【請求項4】天球光から照射された物体の照度を計算
し、その結果を表示装置に表示するコンピュータグラフ
ィックス表示装置において、 前記物体の全てを包含する直方体状空間をボクセルに分
割するボクセル分割処理部と、 各照度方向に対応した特定ボクセル面に前方向ボクセル
面を投影するZバッファ処理部と、 前記Zバッファ処理部によって投影された前記特定ボク
セルのボクセル面照度を求めるボクセル面照度計算処理
部と、 前記物体の法線方向と前記ボクセル面の法線方向とのな
す角度から各ボクセル面の照度を合成するボクセル面照
度合成処理部と、 第1層ボクセル面上に前記天球光及び前記物体を前記Z
バッファ処理手段により第2層ボクセルのスクリーン上
に投影してボクセル面照度計算処理部で照度を求め、照
度を求めた前記ボクセル層を前方向ボクセルとして、逐
次、前記バッファ処理部を用いて次のボクセル層へ投影
して、前記次のボクセル層のボクセル面照度を求める処
理を繰返した後、前記ボクセル面照度合成処理で合成し
て表示装置へ表示する制御部と、を設けたことを特徴と
するコンピュータグラフィックス表示装置。
4. A computer graphics display device for calculating the illuminance of an object irradiated from celestial sphere light and displaying the result on a display device, wherein voxel division for dividing a rectangular parallelepiped space including all the objects into voxels. A processing unit; a Z-buffer processing unit for projecting a forward voxel surface on a specific voxel surface corresponding to each illuminance direction; and a voxel surface illuminance calculation process for obtaining a voxel surface illuminance of the specific voxel projected by the Z-buffer processing unit A voxel surface illuminance synthesis processing unit that synthesizes the illuminance of each voxel surface from an angle between the normal direction of the object and the normal direction of the voxel surface; and the celestial light and the celestial light on the first layer voxel surface. The object is Z
The voxel surface illuminance calculation processing unit obtains the illuminance by projecting the image on the screen of the second layer voxel by the buffer processing unit, and the voxel layer for which the illuminance is obtained is used as a forward voxel. After projecting to the voxel layer and repeating the process of obtaining the voxel surface illuminance of the next voxel layer, a control unit that combines the voxel surface illuminance in the voxel surface illuminance synthesis process and displays the synthesized image on a display device is provided. Computer graphics display device.
JP15168093A 1993-06-23 1993-06-23 Illuminance calculation method and display device for computer graphics Expired - Lifetime JP2973413B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15168093A JP2973413B2 (en) 1993-06-23 1993-06-23 Illuminance calculation method and display device for computer graphics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15168093A JP2973413B2 (en) 1993-06-23 1993-06-23 Illuminance calculation method and display device for computer graphics

Publications (2)

Publication Number Publication Date
JPH0721408A JPH0721408A (en) 1995-01-24
JP2973413B2 true JP2973413B2 (en) 1999-11-08

Family

ID=15523912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15168093A Expired - Lifetime JP2973413B2 (en) 1993-06-23 1993-06-23 Illuminance calculation method and display device for computer graphics

Country Status (1)

Country Link
JP (1) JP2973413B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4480210B2 (en) * 1999-09-10 2010-06-16 株式会社バンダイナムコゲームス Image processing apparatus, image processing method, and recording medium for processing three-dimensional computer graphics
JP2007244887A (en) * 2001-12-03 2007-09-27 Ziosoft Inc Volumetric rendering method, volumetric rendering system, computer, and program
KR101026030B1 (en) 2008-10-21 2011-03-30 삼성전기주식회사 Distance measuring apparatus
US20120212491A1 (en) * 2011-02-22 2012-08-23 Sony Computer Entertainment Inc. Indirect lighting process for virtual environments
CN111803942A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Soft shadow generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JPH0721408A (en) 1995-01-24

Similar Documents

Publication Publication Date Title
US6249289B1 (en) Multi-purpose high resolution distortion correction
US5805782A (en) Method and apparatus for projective texture mapping rendered from arbitrarily positioned and oriented light source
El-Hakim et al. A multi-sensor approach to creating accurate virtual environments
KR101923562B1 (en) Method for efficient re-rendering objects to vary viewports and under varying rendering and rasterization parameters
US6529206B1 (en) Image processing apparatus and method, and medium therefor
US7212207B2 (en) Method and apparatus for real-time global illumination incorporating stream processor based hybrid ray tracing
US5841441A (en) High-speed three-dimensional texture mapping systems and methods
JP3028378B2 (en) Method and apparatus for generating a texture map perspective
US5594850A (en) Image simulation method
US7019748B2 (en) Simulating motion of static objects in scenes
US6556195B1 (en) Image processing device and image processing method
JP3759971B2 (en) How to shade a 3D image
US9508191B2 (en) Optimal point density using camera proximity for point-based global illumination
CN106558017B (en) Spherical display image processing method and system
US5745667A (en) 3d graphics apparatus using texture images with displacement information
Coquillart et al. Shaded display of digital maps
US9401044B1 (en) Method for conformal visualization
US7133052B1 (en) Morph map based simulated real-time rendering
Vyatkin et al. Voxel Volumes volume-oriented visualization system
US8669996B2 (en) Image processing device and image processing method
JP2973413B2 (en) Illuminance calculation method and display device for computer graphics
US7116333B1 (en) Data retrieval method and system
US20030184546A1 (en) Image processing method
JP2832463B2 (en) 3D model reconstruction method and display method
CN116310041A (en) Rendering method and device of internal structure effect, electronic equipment and storage medium