JP2000207576A - Method and device for processing image and recording medium recording image processing program - Google Patents

Method and device for processing image and recording medium recording image processing program

Info

Publication number
JP2000207576A
JP2000207576A JP599299A JP599299A JP2000207576A JP 2000207576 A JP2000207576 A JP 2000207576A JP 599299 A JP599299 A JP 599299A JP 599299 A JP599299 A JP 599299A JP 2000207576 A JP2000207576 A JP 2000207576A
Authority
JP
Japan
Prior art keywords
memory
axis
image processing
screen
viewpoint
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
JP599299A
Other languages
Japanese (ja)
Inventor
Hiroto Matsuoka
裕人 松岡
Ikuo Harada
育生 原田
Hitoshi Kitazawa
仁志 北澤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP599299A priority Critical patent/JP2000207576A/en
Publication of JP2000207576A publication Critical patent/JP2000207576A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To realize rendering by voxel division by which aliasing does not occur with a small amount of required memory capacity in an image processing using a rendering method such as rate racing. SOLUTION: The three axes of a three-dimensional space V to be a display object are adopted as an X-axis, a Y-axis and a Z-axis with a viewpoint as an original point and a screen S or displaying is vertically positioned as against the Z-axis. When it is assumed, the three-dimensional space V is divided into D (a certain integer) in parallel with a screen plane. Besides, it is divided by a plane passing the view point and the boundary of a pixel on the screen S to generate truncated pyramids. The truncated pyramids are assigned to a three-dimensional arrayal memory M, the intersection point of a light beam from the viewpoint with an object is located on the memory M and intersection is judged.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は,3次元描画システ
ムで用いられ,特にレイトレーシング等のレンダリング
手法の交点算出手法およびその処理を用いた画像処理技
術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for calculating intersections of rendering techniques such as ray tracing and the like, and to an image processing technique using the processing, which is used in a three-dimensional rendering system.

【0002】[0002]

【従来の技術】3次元画像を作成するレンダリング手法
として,レイトレーシング法がある。図7は,レイトレ
ーシング手法を説明するための図である。レイトレーシ
ング法は,図7に示すように,視点からスクリーン上の
画素を通過する光線を発生させ,すべての物体に対して
交差する点を調べてレンダリングを行う。この手法で
は,物体と光線との交差判定回数が膨大となり,処理時
間が大きくなるという問題がある。この処理時間を軽減
する手法として,図8に示すように,3次元空間を小立
方体(ボクセル)に分割し,それらを3次元配列を定義
したメモリ空間に対応付けして交差判定をする手法があ
る。すべての物体をそのメモリに書き込み,光線に沿っ
てメモリ空間を探索すれば,交差判定に要する処理時間
を軽減することができる。
2. Description of the Related Art As a rendering technique for creating a three-dimensional image, there is a ray tracing method. FIG. 7 is a diagram for explaining a ray tracing method. In the ray tracing method, as shown in FIG. 7, a ray passing from a viewpoint to a pixel on a screen is generated, and rendering is performed by examining intersections of all objects. In this method, there is a problem that the number of times of intersection determination between the object and the light beam becomes enormous, and the processing time becomes long. As a method of reducing the processing time, as shown in FIG. 8, a method of dividing a three-dimensional space into small cubes (voxels) and associating them with a memory space in which a three-dimensional array is defined, and performing intersection determination. is there. If all the objects are written in the memory and the memory space is searched along the light rays, the processing time required for the intersection determination can be reduced.

【0003】しかし,この従来のボクセル分割手法で
は,必ずしも光線がボクセルの中心を通るわけではな
く,エリアシングが生じ,画質が劣化する問題がある。
図9は,この画質が劣化する問題を説明するための図で
あって,YZ平面から見た従来のボクセル分割手法を示
す図である。図9のように,視点からスクリーンSのピ
クセルの中心を通る光線1は,ボクセルAと交差してお
り,ボクセルAのデータでレンダリングを行う。しか
し,ボクセルAとボクセルBの描画データは実際には連
続しており,光線1との交点の実際の描画データは,ボ
クセルAとボクセルBの間のデータであり,その差が画
像の歪みとなる。これを回避する手法として,光線2や
光線3等の複数の光線も計算してレンダリングを行う手
法があり,これによれば画質は改善されるが,処理時間
が大きくなるという問題がある。
However, in this conventional voxel division method, a ray does not always pass through the center of a voxel, and there is a problem that aliasing occurs and image quality deteriorates.
FIG. 9 is a diagram for explaining the problem that the image quality is deteriorated, and is a diagram showing a conventional voxel dividing method viewed from the YZ plane. As shown in FIG. 9, a ray 1 passing from the viewpoint to the center of the pixel of the screen S intersects with the voxel A, and rendering is performed using the data of the voxel A. However, the drawing data of voxel A and voxel B are actually continuous, and the actual drawing data of the intersection with ray 1 is the data between voxel A and voxel B. Become. As a method of avoiding this, there is a method of calculating a plurality of light rays such as the light rays 2 and the light rays 3 and performing rendering. According to this method, the image quality is improved, but there is a problem that the processing time becomes longer.

【0004】また,上記の手法では,視点から遠く離れ
れば離れる程,X軸方向およびY軸方向のボクセル数が
増える。このため,必要とされる3次元配列を定義する
メモリ容量も大きくなるという問題もある。
In the above method, the further away from the viewpoint, the greater the number of voxels in the X-axis direction and the Y-axis direction. For this reason, there is a problem that the memory capacity for defining the required three-dimensional array also increases.

【0005】[0005]

【発明が解決しようとする課題】上述したように,ボク
セルを用いたレイトレーシング手法は演算処理量を抑え
られるが,エリアシングが生じて画質が劣化し,また,
処理に必要となるメモリ容量も大きい。本発明の目的
は,必要とするメモリ容量が少なく,かつエリアシング
が生じないボクセル分割法によるレンダリングを実現す
ることにある。
As described above, the ray tracing method using voxels can reduce the amount of arithmetic processing, but causes aliasing to degrade the image quality.
The memory capacity required for processing is also large. An object of the present invention is to realize a rendering by a voxel division method which requires a small memory capacity and does not cause aliasing.

【0006】[0006]

【課題を解決するための手段】本発明は,レイトレーシ
ング等のレンダリング手法を用いる画像処理において,
視点を原点とし,表示対象となる3次元空間Vの3つの
軸をX軸,Y軸,Z軸,表示するスクリーンSが3次元
空間VのZ軸に垂直にあるとし,3次元空間Vをスクリ
ーン平面に平行にある整数D個に分割し,さらに,視点
を通りスクリーンのピクセルの境界を通る平面で分割し
て四角錐台を生成し,それら四角錐台を3次元配列を定
義したメモリMにそれぞれ割り当て,そのメモリM上で
視点からの光線と物体との交点を探索して交差判定を行
う画像処理方法である。
SUMMARY OF THE INVENTION The present invention relates to an image processing using a rendering technique such as ray tracing.
Assume that the viewpoint is the origin, the three axes of the three-dimensional space V to be displayed are the X axis, the Y axis, the Z axis, and the screen S to be displayed is perpendicular to the Z axis of the three-dimensional space V. It is divided into an integer D parallel to the screen plane, and further divided by a plane passing through the viewpoint and passing through the boundary of the pixel of the screen to generate a truncated pyramid. This is an image processing method in which an intersection of a light ray from a viewpoint and an object is searched in the memory M to determine an intersection.

【0007】本発明では,レイトレーシング等のレンダ
リング手法において,視点からスクリーンのピクセルの
中心を通る光線が,常にボクセルの中心を通過するよう
に分割して表示対象の多角形と光線との交差を判定し描
画するため,エリアシングが生じず,歪みの少ない画像
を高速に生成することができる。また,視点から遠い場
所でもX軸およびY軸方向のボクセル数はスクリーンの
ピクセル数に等しいため,処理に必要とするメモリ容量
を低く抑えることができる。
According to the present invention, in a rendering technique such as ray tracing, a ray passing from the viewpoint to the center of a pixel on the screen is divided so that the ray always passes through the center of a voxel, and the intersection of the polygon to be displayed and the ray is determined. Since determination and drawing are performed, aliasing does not occur and an image with little distortion can be generated at high speed. In addition, the number of voxels in the X-axis and Y-axis directions is equal to the number of pixels on the screen even at a location far from the viewpoint, so that the memory capacity required for processing can be reduced.

【0008】[0008]

【発明の実施の形態】〔実施の形態1〕図1に,請求項
1に記載する画像処理方法の例を示す。レイトレーシン
グ等のレンダリング手法を用いる画像処理において,視
点を原点とし,表示対象となる3次元空間Vの3つの軸
をX軸,Y軸,Z軸,表示するスクリーンSが3次元空
間VのZ軸に対し垂直にあるとする。
[First Embodiment] FIG. 1 shows an example of an image processing method according to the first embodiment. In image processing using a rendering technique such as ray tracing, the viewpoint is set as the origin, the three axes of the three-dimensional space V to be displayed are the X axis, the Y axis, the Z axis, and the screen S to be displayed is the Z axis of the three-dimensional space V. Suppose it is perpendicular to the axis.

【0009】図1(A)に示すように,3次元空間Vを
スクリーンSと平行に,ある整数D個に分割し,さら
に,視点を通りスクリーンSのピクセルの境界を通る平
面で分割して四角錐台を生成する。それらの四角錐台
を,図1(B)に示すような3次元配列を定義したメモ
リMにそれぞれ割り当てる。そして,レイトレーシング
等の処理で行う,視点からの光線と3次元空間V内の物
体との交差判定に,そのメモリMを用いる。3次元空間
V内のすべての表示対象となる物体をメモリM上に展開
しているので,光線に沿ってメモリM内を探索すれば,
3次元空間Vの物体との交差判定を高速に行うことがで
きる。
As shown in FIG. 1A, a three-dimensional space V is divided into a certain number D of integers parallel to the screen S, and further divided by a plane passing through the viewpoint and passing through the boundaries of the pixels of the screen S. Generate a truncated quadrangular pyramid. These quadrangular truncated pyramids are respectively allocated to memories M defining a three-dimensional array as shown in FIG. Then, the memory M is used for determining the intersection between the light ray from the viewpoint and the object in the three-dimensional space V, which is performed in processing such as ray tracing. Since all the objects to be displayed in the three-dimensional space V are developed on the memory M, if the memory M is searched along the rays,
The intersection with the object in the three-dimensional space V can be determined at high speed.

【0010】また,3次元空間Vは,視点とスクリーン
Sのピクセル間の境界を通る平面で分割し,ボクセルを
形成している。したがって,表示対象となる3次元空間
Vを本手法でボクセル化すれば,視点からスクリーンS
のピクセルの中心を通った光線はボクセルの中心を通
る。
The three-dimensional space V is divided by a plane passing through the boundary between the viewpoint and the pixels of the screen S to form voxels. Therefore, if the three-dimensional space V to be displayed is voxelized by the present method, the screen S can be viewed from the viewpoint.
A ray passing through the center of the pixel passes through the center of the voxel.

【0011】図2は,YZ平面から見た本ボクセル化手
法によりボクセルに分割した例を示す。図2から明らか
なように,スクリーンの中心を通った光線はボクセルの
中心を通ることがわかる。このように,光線がボクセル
の中心を通るため,光線と交差したボクセルの情報のみ
で描画を行ってもエリアシングは生じない。従来のボク
セル分割による手法では,高品質な画像を得るため複数
の光路を探索する必要があったが,本手法によれば,1
つの光路の探索で,高品質な画像を得ることができる。
FIG. 2 shows an example of division into voxels by the present voxel conversion method viewed from the YZ plane. As is clear from FIG. 2, it can be seen that the light ray passing through the center of the screen passes through the center of the voxel. As described above, since the light beam passes through the center of the voxel, aliasing does not occur even if rendering is performed only with information on the voxel that intersects the light beam. In the conventional method based on voxel division, it was necessary to search a plurality of optical paths to obtain a high-quality image.
By searching for two optical paths, a high-quality image can be obtained.

【0012】〔実施の形態2〕図3に,請求項2に係る
画像処理方法の例を示す。この図3では,3次元空間V
のZ軸の最小値をzs ,最大値をzl とし,1からD−
1までの整数をnとすると,
[Embodiment 2] FIG. 3 shows an example of an image processing method according to the second embodiment. In FIG. 3, the three-dimensional space V
The minimum value of the Z axis is z s , the maximum value is z l ,
Assuming that an integer up to 1 is n,

【0013】[0013]

【数1】 (Equation 1)

【0014】を満たす平面で分割したときのYZ平面か
ら見た様子を示している。
FIG. 2 shows a state viewed from the YZ plane when divided by a plane that satisfies.

【0015】図4は,Z軸方向を等分に分割した場合の
ボクセルをYZ平面から見た図である。この図4のよう
に,zs からzl の区間でD個に等分に分けてメモリM
に割り当てた場合,3次元空間V上での反射光等の経路
は,メモリM上では曲線となり,光路計算が複雑とな
る。これに対し,図3に示すように(式1)を満たす平
面で分割した場合には,3次元空間V上の直線は,対応
するメモリM上でも直線となる。
FIG. 4 is a view showing a voxel when the Z-axis direction is equally divided as viewed from the YZ plane. As in FIG. 4, the memory M is divided equally from z s in D number in the section z l
, The path of the reflected light and the like in the three-dimensional space V becomes a curve in the memory M, and the optical path calculation becomes complicated. On the other hand, when the data is divided by a plane satisfying (Equation 1) as shown in FIG. 3, a straight line in the three-dimensional space V is also a straight line in the corresponding memory M.

【0016】以下,数式を用いて直線となることを証明
する。
Hereinafter, it will be proved that a straight line is obtained by using a mathematical expression.

【0017】スクリーンSのX軸の長さをsw ,ピクセ
ルの数をpw ,Y軸の長さをsh ,ピクセルの数を
h ,視点との距離をLとし,3次元空間V上の1点v
(xv ,yv ,zv )がメモリM上の1点m(xm ,y
m ,zm )に対応するとき,vとmには次の関係が成り
立つ。
The length of the X axis of the screen S is s w , the number of pixels is p w , the length of the Y axis is s h , the number of pixels is ph , and the distance from the viewpoint is L. One point v on
(X v , y v , z v ) is one point m (x m , y
m , z m ), the following relationship holds between v and m.

【0018】[0018]

【数2】 (Equation 2)

【0019】ここで,3次元空間V内の3点v
1 (xv1,yv1,zv1),v2 (xv2,yv2,zv2),
3 (xv3,yv3,zv3)が直線上にあるとき,
Here, three points v in a three-dimensional space V
1 (x v1, y v1, z v1), v 2 (x v2, y v2, z v2),
When v 3 (x v3 , y v3 , z v3 ) is on a straight line,

【0020】[0020]

【数3】 (Equation 3)

【0021】が成り立つ。まず,yとzの項について展
開すると,
The following holds. First, expanding the terms y and z,

【0022】[0022]

【数4】 (Equation 4)

【0023】となる。(式4)のyv1,yv2,yv3の項
に(式2)を代入すると,
## EQU1 ## Substituting (Equation 2) for the terms y v1 , y v2 , y v3 in (Equation 4) gives

【0024】[0024]

【数5】 (Equation 5)

【0025】となる。(式5)のzv1,zv2,zv3の項
に(式2)を代入すると,
## EQU1 ## Substituting (Equation 2) into the terms of z v1 , z v2 , z v3 in (Equation 5),

【0026】[0026]

【数6】 (Equation 6)

【0027】が得られる。同様に,(式3)のxとzに
関して計算すると,
Is obtained. Similarly, when calculating with respect to x and z in (Equation 3),

【0028】[0028]

【数7】 (Equation 7)

【0029】が得られ,3次元空間V上の直線を(式
2)を用いてメモリM上の座標に変換しても,直線が保
たれることがわかる。
It can be seen that the straight line is maintained even if the straight line in the three-dimensional space V is converted into coordinates on the memory M using (Equation 2).

【0030】したがって,本変換手法を用いれば,反射
光や屈折光等と物体との交差判定をメモリM上での直線
を用いて行うことができ,高速に判定することができ
る。
Therefore, if the present conversion technique is used, the intersection between the reflected light, the refracted light and the like and the object can be determined using the straight line on the memory M, and the determination can be made at high speed.

【0031】〔実施の形態3〕図5は,請求項3に係る
ボクセル化の手法を用いたレンダリング方法を実現する
処理フローチャートである。
[Embodiment 3] FIG. 5 is a processing flowchart for realizing a rendering method using the voxel conversion method according to the third aspect.

【0032】まず,表示対象の多角形Pのジオメトリ処
理(カメラ座標系に変換)を行い(ステップS1),表
示対象となる3次元カメラ座標系で定義された一つある
いは複数の多角形Pの頂点を,先に示した(式2)を用
いて3次元配列を定義したメモリMの座標系に変換する
(ステップS2)。メモリMの座標系で表された多角形
Pの外周および内面にあたるメモリMの座標に,多角形
Pの描画情報を書き込む(ステップS3)。すべての多
角形のメモリへの書き込みが完了したら(ステップS
4),レイトレーシングによる描画処理を行う。
First, geometry processing (conversion to the camera coordinate system) of the polygon P to be displayed is performed (step S1), and one or a plurality of polygons P defined in the three-dimensional camera coordinate system to be displayed are processed. The vertices are converted to the coordinate system of the memory M in which the three-dimensional array is defined by using the above (Equation 2) (Step S2). The drawing information of the polygon P is written to the coordinates of the memory M corresponding to the outer periphery and the inner surface of the polygon P expressed by the coordinate system of the memory M (step S3). When all polygons have been written into the memory (step S
4) Perform drawing processing by ray tracing.

【0033】スクリーンS上の各ピクセルに対するレイ
トレーシング処理の初期設定として,スクリーンS上の
1ピクセルcの座標を(xc ,yc )とし,メモリ座標
(x c ,yc ,0)を光線の開始点E,(0,0,1)
を光線の方向ベクトルVとする(ステップS5)。ピク
セルcの色彩情報は,視点からの光線の方向ベクトルV
をもとにメモリ空間内を探索して,表示対象の多角形P
との交点を求める(ステップS6〜S7)。そして,そ
の交点の多角形Pの描画情報をもとに色彩情報を計算
し,スクリーンへの書き込みを行う(ステップS8)。
場合により,その交点からの反射光や屈折光等も計算し
てピクセルcの色彩情報に加える(ステップS9〜S1
2)。スクリーン内のすべてのピクセルに対して,全ス
クリーンの描画が完了するまで同様に計算することによ
り(ステップS13),3次元画像を生成することがで
きる。
A ray for each pixel on the screen S
As the initial setting of the tracing process,
Let the coordinates of one pixel c be (xc, Yc) And memory coordinates
(X c, Yc, 0) to the starting point E of the ray, (0, 0, 1)
Is the direction vector V of the light ray (step S5). Pic
The color information of the cell c is the direction vector V of the ray from the viewpoint.
Is searched in the memory space based on the polygon P to be displayed.
Is obtained (steps S6 to S7). And that
Calculates color information based on the drawing information of polygon P at the intersection of
Then, writing to the screen is performed (step S8).
In some cases, the reflected or refracted light from the intersection is also calculated.
(Steps S9 to S1)
2). For all pixels in the screen,
Do the same calculation until the clean drawing is completed.
(Step S13), a three-dimensional image can be generated.
Wear.

【0034】〔実施の形態4〕図6は,請求項4に係る
画像処理装置のブロック構成例を示す図である。本装置
は,多角形情報書き込み回路10,3次元配列を定義し
た3次元配列メモリ20,レイトレーシング処理回路3
0からなる。
[Embodiment 4] FIG. 6 is a diagram showing an example of a block configuration of an image processing apparatus according to a fourth aspect. This apparatus comprises a polygon information writing circuit 10, a three-dimensional array memory 20 defining a three-dimensional array, a ray tracing processing circuit 3,
Consists of zero.

【0035】多角形情報書き込み回路10は,多角形の
頂点情報を,前記(式2)に従ってメモリ座標系に変換
する座標変換回路11と,与えられた多角形内のメモリ
座標を計算し,メモリにアドレスとして与える描画領域
算出回路12からなり,多角形の描画情報を3次元配列
メモリ20に書き込む。座標変換回路11は四則演算器
で構成され,描画領域算出回路12はスキャンライン手
法等を用いて実現することができる。
The polygon information writing circuit 10 converts the vertex information of the polygon into a memory coordinate system in accordance with the above (Equation 2), calculates the memory coordinates in the given polygon, and And writes the drawing information of the polygon into the three-dimensional array memory 20. The coordinate conversion circuit 11 is composed of four arithmetic operators, and the drawing area calculation circuit 12 can be realized by using a scan line method or the like.

【0036】3次元配列メモリ20への書き込みが終わ
ると,レイトレーシング処理回路30により,3次元配
列メモリ20の情報から,レイトレーシング手法により
3次元画像を生成し,ビデオメモリ40に書き込む。こ
のレイトレーシング処理回路30は,光路演算回路31
により光路に沿ったメモリアドレスを生成し,光線上に
多角形があるかを交差判定回路32で判定する。交差し
ている場合,3次元配列メモリ20の描画情報をもとに
色彩データ演算回路33によりビデオメモリ40に書き
込む色彩データを演算する。また,その交点の反射率や
屈折率のデータをもとに,反射光・屈折光演算回路34
により光線ベクトルを求め,光路演算回路31に与え,
同様に反射光や屈折光の色彩データを求める。なお,こ
れらの演算回路は論理回路を組み合わせた集積回路等で
実現することができる。
When the writing into the three-dimensional array memory 20 is completed, a three-dimensional image is generated by the ray tracing method from the information in the three-dimensional array memory 20 by the ray tracing processing circuit 30 and written into the video memory 40. The ray tracing processing circuit 30 includes an optical path operation circuit 31
, A memory address along the optical path is generated, and the intersection determination circuit 32 determines whether there is a polygon on the light beam. If they intersect, the color data calculation circuit 33 calculates the color data to be written to the video memory 40 based on the drawing information in the three-dimensional array memory 20. Further, based on the data of the reflectance and the refractive index at the intersection, the reflected light / refractive light arithmetic circuit 34 is used.
To obtain a light vector and give it to the light path operation circuit 31.
Similarly, color data of reflected light and refracted light is obtained. Note that these arithmetic circuits can be realized by an integrated circuit or the like in which logic circuits are combined.

【0037】また,汎用のCPUやDSP(Digital Si
gnal Processor)等の計算機でも,これらの処理を行う
ことができる。これらの処理を行うためのプログラム
は,計算機が読み取り可能な可搬媒体メモリ,半導体メ
モリ,ハードディスクなどの適当な記録媒体に格納する
ことができる。
A general-purpose CPU or DSP (Digital Si
These processes can be performed by a computer such as a gnal processor. Programs for performing these processes can be stored in an appropriate recording medium such as a computer-readable portable medium memory, semiconductor memory, or hard disk.

【0038】[0038]

【発明の効果】以上述べたように,本発明を用いること
により,レイトレーシング等のレンダリング手法におい
て,視点からスクリーンのピクセルの中心を通る光線
が,常にボクセルの中心を通過するように分割して,表
示対象の多角形と光線との交差を判定し描画するため,
エリアシングが生じず,歪みの少ない画像を高速に生成
することができる。また,視点から遠い場所でもX軸お
よびY軸方向のボクセル数はスクリーンのピクセル数に
等しいため,処理に必要とするメモリ容量を低く抑える
ことができる。
As described above, by using the present invention, in a rendering method such as ray tracing, a ray passing from the viewpoint to the center of a pixel on the screen is divided so as to always pass through the center of a voxel. , To determine the intersection between the polygon to be displayed and the ray,
Aliasing does not occur, and an image with little distortion can be generated at high speed. In addition, the number of voxels in the X-axis and Y-axis directions is equal to the number of pixels on the screen even at a location far from the viewpoint, so that the memory capacity required for processing can be reduced.

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

【図1】画像処理方法の第1の実施の形態を説明するた
めの図である。
FIG. 1 is a diagram for describing a first embodiment of an image processing method.

【図2】YZ平面から見た第1の実施の形態のボクセル
化手法を示す図である。
FIG. 2 is a diagram illustrating a voxel conversion method according to the first embodiment as viewed from a YZ plane.

【図3】画像処理方法の第2の実施の形態を説明するた
めの図である。
FIG. 3 is a diagram for explaining a second embodiment of the image processing method.

【図4】Z軸方向を等分に分割した場合のボクセルをY
Z平面から見た図である。
FIG. 4 shows a voxel obtained by equally dividing the Z-axis direction into Y.
It is the figure seen from the Z plane.

【図5】第3の実施の形態のボクセル化手法を用いたレ
ンダリング方法を実現する処理フローチャートである。
FIG. 5 is a processing flowchart for realizing a rendering method using a voxel conversion method according to the third embodiment.

【図6】画像処理装置のブロック構成例を示す図であ
る。
FIG. 6 is a diagram illustrating an example of a block configuration of an image processing apparatus.

【図7】レイトレーシング手法説明図である。FIG. 7 is an explanatory diagram of a ray tracing technique.

【図8】従来のボクセル分割手法を示す図である。FIG. 8 is a diagram showing a conventional voxel division technique.

【図9】YZ平面から見た従来のボクセル分割手法を示
す図である。
FIG. 9 is a diagram showing a conventional voxel dividing method viewed from the YZ plane.

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

S スクリーン V 3次元空間 M 3次元配列を定義したメモリ L 視点とスクリーンとの距離 D ある整数 sw スクリーンのX軸の長さ sh スクリーンのY軸の長さ pw スクリーンのX軸方向のピクセルの数 ph スクリーンのY軸方向のピクセルの数 zs Z軸の最小値 zl Z軸の最大値S of the X-axis of the integer s w screen with the distance D between the screen V 3 dimensional space memory L viewpoint and the screen that defines the M 3-dimensional array of length s h Screen Y-axis length p w Screen X-axis direction the maximum value of the minimum values z l Z-axis of the number z s Z-axis of the number p h screen Y-axis direction of the pixels of the pixel

───────────────────────────────────────────────────── フロントページの続き (72)発明者 北澤 仁志 東京都新宿区西新宿三丁目19番2号 日本 電信電話株式会社内 Fターム(参考) 5B050 BA04 BA09 BA10 EA27 EA28 FA06 5B080 BA03 BA04 BA05 CA08 GA06 ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Hitoshi Kitazawa 3-19-2 Nishi-Shinjuku, Shinjuku-ku, Tokyo F-term in Nippon Telegraph and Telephone Corporation (reference) 5B050 BA04 BA09 BA10 EA27 EA28 FA06 5B080 BA03 BA04 BA05 CA08 GA06

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 レイトレーシング等のレンダリング手法
を用いる画像処理方法において,視点を原点とし,表示
対象となる3次元空間Vの3つの軸をX軸,Y軸,Z
軸,表示するスクリーンSが3次元空間VのZ軸に垂直
にあるとし,3次元空間Vをスクリーン平面に平行に,
ある整数D個に分割し,さらに,視点を通りスクリーン
Sのピクセルの境界を通る平面で分割して四角錐台を生
成し,それら四角錐台を3次元配列を定義したメモリM
にそれぞれ割り当て,そのメモリM上で視点からの光線
と物体との交点を探索して交差判定を行うことを特徴と
する画像処理方法。
In an image processing method using a rendering technique such as ray tracing, a viewpoint is set as an origin, and three axes of a three-dimensional space V to be displayed are X-axis, Y-axis, and Z-axis.
It is assumed that the axis and the screen S to be displayed are perpendicular to the Z axis of the three-dimensional space V, and the three-dimensional space V is parallel to the screen plane.
A memory M that divides into a certain integer D and further generates a truncated quadrangular pyramid by dividing by a plane passing through the viewpoint and passing through the boundary of the pixel of the screen S, and defining these truncated pyramids in a three-dimensional array
An image processing method for searching for an intersection between a light ray from a viewpoint and an object in the memory M and performing intersection determination.
【請求項2】 請求項1記載の画像処理方法において,
3次元空間VのZ軸の最小値をzs ,最大値をzl
し,1から(D−1)までの整数をnとするとき,前記
3次元空間Vを,次式の z=zs ÷(1−(1−zs ÷zl )÷D×n) を満たす平面で分割することを特徴とする画像処理方
法。
2. The image processing method according to claim 1, wherein
When the minimum value of the Z axis of the three-dimensional space V is z s , the maximum value is z l, and an integer from 1 to (D−1) is n, the three-dimensional space V is represented by the following equation: z = z s ÷ image processing method characterized by dividing by (1- (1-z s ÷ z l) ÷ D × n) plane satisfying.
【請求項3】 請求項1または請求項2記載の画像処理
方法において,スクリーンSのX軸の長さをsw ,ピク
セルの数をpw ,Y軸の長さをsh ,ピクセルの数をp
h ,視点との距離をLとし,表示対象となる3次元カメ
ラ座標系で定義された一つあるいは複数の多角形Pの頂
点(xv ,yv ,zv )を,次式の xm =pw ÷sw ×L×xv ÷zvm =ph ÷sh ×L×yv ÷zvm =(1−zs ÷zv )÷(1−zs ÷zl )×D (ただし,xm ,ym ,zm は整数化する)に従って3
次元配列を定義したメモリMの座標(xm ,ym
m )に変換することによって得られるメモリMの座標
系における多角形Pの外周および内面に多角形Pの描画
情報を書き込み,スクリーンSの任意の1ピクセルcの
座標(xC ,yC )の描画データを,メモリ座標
(xC ,yC ,0)を始点,方向ベクトル(0,0,
1)を視点からの光線としてメモリ空間内を探索し,表
示対象の多角形Pとの交点を求めてピクセルの色彩デー
タを求め,さらにスクリーンS内のすべてのピクセルに
対して同様に計算して3次元画像を生成することを特徴
とする画像処理方法。
3. The image processing method according to claim 1, wherein a length of the X axis of the screen S is s w , a number of pixels is p w , a length of the Y axis is s h , and a number of pixels is To p
h, and the distance between the viewpoint is L, one defined by three-dimensional camera coordinate system to be displayed or a plurality of vertices of the polygon P (x v, y v, z v) and the following equation x m = p w ÷ s w × L × x v ÷ z v y m = p h ÷ s h × L × y v ÷ z v z m = (1-z s ÷ z v) ÷ (1-z s ÷ z l ) × D (where x m , y m , and z m are converted to integers).
The coordinates (x m , y m ,
z m ), the drawing information of the polygon P is written on the outer periphery and the inner surface of the polygon P in the coordinate system of the memory M obtained by the conversion into the coordinates (x C , y C ) of an arbitrary pixel c on the screen S. Of the drawing data at the memory coordinates (x C , y C , 0) and the direction vector (0, 0,
1) is searched in the memory space as a ray from the viewpoint, the intersection with the polygon P to be displayed is obtained, the color data of the pixel is obtained, and the calculation is similarly performed for all the pixels in the screen S. An image processing method for generating a three-dimensional image.
【請求項4】 メモリ書き込み回路,メモリ,レイトレ
ーシング回路からなり,スクリーン平面に表示する3次
元画像を生成する画像処理装置であって,前記メモリ書
き込み回路は,スクリーン平面がZ軸に垂直となるよう
に表示対象の3次元空間VのXYZ座標系をとり,3次
元空間Vをスクリーン平面に平行なD個(Dはある整
数)の平面で分割し,さらに視点およびスクリーンのピ
クセルの境界を通る平面で分割して四角錐台を生成し,
それら四角錐台を3次元配列を定義した前記メモリに割
り当てる描画領域算出回路を含み,前記レイトレーシン
グ回路は,前記メモリ上で視点からの光線と表示対象の
物体との交点を探索して交差判定を行う交差判定回路を
含むことを特徴とする画像処理装置。
4. An image processing apparatus comprising a memory writing circuit, a memory, and a ray tracing circuit for generating a three-dimensional image to be displayed on a screen plane, wherein the memory writing circuit has a screen plane perpendicular to the Z axis. As described above, the XYZ coordinate system of the three-dimensional space V to be displayed is taken, the three-dimensional space V is divided by D planes (D is an integer) parallel to the screen plane, and further passes through the boundary between the viewpoint and the screen pixel. Generate a truncated quadrangular pyramid by dividing the plane
A drawing area calculation circuit for allocating the truncated pyramids to the memory defining a three-dimensional array, wherein the ray tracing circuit searches the memory for an intersection between a light ray from a viewpoint and an object to be displayed, and determines an intersection. An image processing apparatus comprising an intersection determination circuit for performing
【請求項5】 請求項4記載の画像処理装置において,
前記描画領域算出回路は,3次元空間VのZ座標値の最
小値をzs ,最大値をzl とし,1からD−1までの整
数をnとするとき,前記3次元空間Vを,次式の z=zs ÷(1−(1−zs ÷zl )÷D×n) を満たすD個の平面で分割するものであることを特徴と
する画像処理装置。
5. The image processing apparatus according to claim 4, wherein
When the minimum value of the Z coordinate value of the three-dimensional space V is z s , the maximum value is z l, and an integer from 1 to D−1 is n, the drawing area calculation circuit converts the three-dimensional space V into following formula z = z s ÷ image processing apparatus, characterized in that the split (1- (1-z s ÷ z l) ÷ D × n) D number of planes satisfying.
【請求項6】 請求項4または請求項5記載の画像処理
装置において,視点を原点として前記3次元空間VのX
YZ座標系をとり,スクリーンのX軸の長さをsw ,ピ
クセルの数をpw ,Y軸の長さをsh ,ピクセルの数を
h ,視点との距離をLとするとき,前記メモリ書き込
み回路は,3次元空間V内の点(xv ,yv ,zv
を,次式の xm =pw ÷sw ×L×xv ÷zvm =ph ÷sh ×L×yv ÷zvm =(1−zs ÷zv )÷(1−zs ÷zl )×D (ただし,xm ,ym ,zm は整数化する)に従って,
3次元配列を定義したメモリの座標系(xm ,ym ,z
m )に変換する座標変換回路と,表示対象の1つあるい
は複数の多角形Pの頂点に対する座標変換結果に基づい
て,メモリの座標系における多角形Pの外周および内面
に多角形Pの描画データを書き込む描画領域算出回路と
を含み,前記レイトレーシング回路は,スクリーンの任
意の1ピクセル(xC ,yC )に対する光路をメモリ座
標(x C ,yC ,0)を始点,方向ベクトル(0,0,
1)として算出する光路演算回路と,算出された光路に
従ってメモリ内を探索し,表示対象の多角形Pとの交点
を算出する交差判定回路と,算出された交点とメモリ上
の描画情報から前記ピクセルの色彩データを算出する色
彩データ演算回路とを含むことを特徴とする画像処理装
置。
6. The image processing according to claim 4 or claim 5.
In the apparatus, the X in the three-dimensional space V is set with the viewpoint as the origin
Take the YZ coordinate system and set the length of the X axis of the screen to sw, Pi
The number of cellsw, Y axis length is sh, The number of pixels
ph, When the distance from the viewpoint is L,
The circuit is composed of points (xv, Yv, Zv)
Is given by xm= Pw÷ sw× Lxxv÷ zv ym= Ph÷ sh× L × yv÷ zv zm= (1-zs÷ zv) ÷ (1-zs÷ zl) × D (where xm, Ym, ZmIs converted to an integer).
Memory coordinate system (xm, Ym, Z
m) And one of the display objects
Is based on the coordinate transformation results for the vertices of the polygon P
And the outer and inner surfaces of the polygon P in the memory coordinate system
Drawing area calculation circuit for writing the drawing data of polygon P to
And the ray tracing circuit comprises a screen
One pixel (xC, YC) Optical path against memory
Mark (x C, YC, 0) as the starting point and the direction vector (0, 0,
The optical path arithmetic circuit calculated as 1) and the calculated optical path
Therefore, the memory is searched, and the intersection with the polygon P to be displayed is obtained.
Intersection calculation circuit for calculating the intersection, and the calculated intersection and memory
Color for calculating the color data of the pixel from the drawing information of
Image processing apparatus, comprising: a color data calculation circuit.
Place.
【請求項7】 レイトレーシング等のレンダリング手法
を用いる画像処理を計算機で行うためのプログラムを記
録した記録媒体であって,視点を原点とし,表示対象と
なる3次元空間Vの3つの軸をX軸,Y軸,Z軸,表示
するスクリーンSが3次元空間VのZ軸に垂直にあると
し,3次元空間VをスクリーンS平面に平行に整数D個
に分割し,さらに,視点を通りスクリーンSのピクセル
の境界を通る平面で分割して四角錐台を生成し,それら
四角錐台を3次元配列を定義したメモリMにそれぞれ割
り当て,そのメモリM上で視点からの光線と物体との交
点を探索して交差判定を行う処理を,計算機に実行させ
るプログラムを記録したことを特徴とする画像処理プロ
グラムを記録した記録媒体。
7. A recording medium in which a program for performing image processing using a rendering technique such as ray tracing by a computer is recorded, wherein a viewpoint is set as an origin, and three axes of a three-dimensional space V to be displayed are set as X. It is assumed that the axis S, the Y axis, the Z axis, and the screen S to be displayed are perpendicular to the Z axis of the three-dimensional space V, and the three-dimensional space V is divided into an integer D parallel to the plane of the screen S. A quadrangular truncated pyramid is generated by dividing by a plane passing through the boundary of the pixel of S, and these quadrangular truncated pyramids are respectively allocated to a memory M defining a three-dimensional array, and an intersection of a light ray from a viewpoint and an object on the memory M A recording medium on which an image processing program is recorded, wherein a program for causing a computer to execute a process of searching for and determining an intersection is recorded.
【請求項8】 請求項7記載の画像処理プログラムを記
録した記録媒体において,前記画像処理プログラムは,
3次元空間VのZ軸の最小値をzs ,最大値をzl
し,1から(D−1)までの整数をnとするとき,前記
3次元空間Vを,次式の z=zs ÷(1−(1−zs ÷zl )÷D×n) を満たす平面で分割する処理を,計算機に実行させるプ
ログラムを含むことを特徴とする画像処理プログラムを
記録した記録媒体。
8. A recording medium on which the image processing program according to claim 7 is recorded, wherein the image processing program comprises:
When the minimum value of the Z axis of the three-dimensional space V is z s , the maximum value is z l, and an integer from 1 to (D−1) is n, the three-dimensional space V is represented by the following equation: z = z s ÷ processing for dividing a plane satisfying (1- (1-z s ÷ z l) ÷ D × n), the recording medium recording an image processing program characterized by including a program to be executed by the computer.
【請求項9】 請求項7または請求項8記載の画像処理
プログラムを記録した記録媒体において,前記画像処理
プログラムは,スクリーンSのX軸の長さをsw ,ピク
セルの数をpw ,Y軸の長さをsh ,ピクセルの数をp
h ,視点との距離をLとし,表示対象となる3次元カメ
ラ座標系で定義された一つあるいは複数の多角形Pの頂
点(xv ,yv ,zv )を,次式の xm =pw ÷sw ×L×xv ÷zvm =ph ÷sh ×L×yv ÷zvm =(1−zs ÷zv )÷(1−zs ÷zl )×D (ただし,xm ,ym ,zm は整数化する)に従って,
3次元配列を定義したメモリMの座標(xm ,ym ,z
m )に変換することによって得られるメモリMの座標系
における多角形Pの外周および内面に多角形Pの描画情
報を書き込み,スクリーンSの任意の1ピクセルcの座
標(xC ,yC )の描画データを,メモリ座標(xC
C ,0)を始点,方向ベクトル(0,0,1)を視点
からの光線としてメモリ空間内を探索し,表示対象の多
角形Pとの交点を求めてピクセルの色彩データを求め,
さらにスクリーンS内のすべてのピクセルに対して同様
に計算して3次元画像を生成する処理を,計算機に実行
させるプログラムを含むことを特徴とする画像処理プロ
グラムを記録した記録媒体。
9. A recording medium on which the image processing program according to claim 7 or 8 is recorded, wherein said image processing program sets the length of the X axis of the screen S to s w , and the number of pixels to p w , Y the length of the shaft s h, the number of pixels p
h, and the distance between the viewpoint is L, one defined by three-dimensional camera coordinate system to be displayed or a plurality of vertices of the polygon P (x v, y v, z v) and the following equation x m = p w ÷ s w × L × x v ÷ z v y m = p h ÷ s h × L × y v ÷ z v z m = (1-z s ÷ z v) ÷ (1-z s ÷ z l ) × D (where x m , y m , z m are converted to integers)
Coordinates (x m , y m , z) of the memory M defining the three-dimensional array
m ), the drawing information of the polygon P is written on the outer and inner surfaces of the polygon P in the coordinate system of the memory M obtained by the conversion into the coordinates (x C , y C ) of an arbitrary pixel c on the screen S. The drawing data is stored in memory coordinates (x C ,
y C , 0) as a starting point, and a direction vector (0, 0, 1) as a light ray from a viewpoint, search in the memory space, find an intersection with a polygon P to be displayed, and obtain color data of a pixel,
A recording medium storing an image processing program characterized by including a program for causing a computer to execute a process of generating a three-dimensional image by similarly calculating all pixels in the screen S.
JP599299A 1999-01-13 1999-01-13 Method and device for processing image and recording medium recording image processing program Pending JP2000207576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP599299A JP2000207576A (en) 1999-01-13 1999-01-13 Method and device for processing image and recording medium recording image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP599299A JP2000207576A (en) 1999-01-13 1999-01-13 Method and device for processing image and recording medium recording image processing program

Publications (1)

Publication Number Publication Date
JP2000207576A true JP2000207576A (en) 2000-07-28

Family

ID=11626296

Family Applications (1)

Application Number Title Priority Date Filing Date
JP599299A Pending JP2000207576A (en) 1999-01-13 1999-01-13 Method and device for processing image and recording medium recording image processing program

Country Status (1)

Country Link
JP (1) JP2000207576A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7256782B2 (en) 2003-04-17 2007-08-14 Honda Motor Co., Ltd. Method, apparatus and program for compositing images, and method, apparatus and program for rendering three-dimensional model
JP2007244887A (en) * 2001-12-03 2007-09-27 Ziosoft Inc Volumetric rendering method, volumetric rendering system, computer, and program
JP2007304718A (en) * 2006-05-09 2007-11-22 Toyota Motor Corp Outline point plotting method and device
US8072487B2 (en) 2007-04-25 2011-12-06 Fujifilm Corporation Picture processing apparatus, picture recording apparatus, method and program thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007244887A (en) * 2001-12-03 2007-09-27 Ziosoft Inc Volumetric rendering method, volumetric rendering system, computer, and program
US7256782B2 (en) 2003-04-17 2007-08-14 Honda Motor Co., Ltd. Method, apparatus and program for compositing images, and method, apparatus and program for rendering three-dimensional model
JP2007304718A (en) * 2006-05-09 2007-11-22 Toyota Motor Corp Outline point plotting method and device
JP4525632B2 (en) * 2006-05-09 2010-08-18 トヨタ自動車株式会社 Outline point drawing method and apparatus
US8072487B2 (en) 2007-04-25 2011-12-06 Fujifilm Corporation Picture processing apparatus, picture recording apparatus, method and program thereof

Similar Documents

Publication Publication Date Title
EP1125253B1 (en) Shading 3-dimensional computer generated images
US6952204B2 (en) 3D computer modelling apparatus
EP1127337B1 (en) Shading 3-dimensional computer generated images
US20080129734A1 (en) Apparatus and method of ray-triangle collision detection for ray-tracing
JP4230456B2 (en) 3D image processing
JPH06223198A (en) Device and method for image preparation by light beam tracking
JP2006503355A5 (en)
JPH0771936A (en) Device and method for processing image
JP3391864B2 (en) Image data processing method and apparatus and graphic system
JPS6380375A (en) Texture mapping device
US8068120B2 (en) Guard band clipping systems and methods
JPH11161819A (en) Image processor, its method and recording medium recording image processing program
JP3629243B2 (en) Image processing apparatus and method for rendering shading process using distance component in modeling
US5706479A (en) Method and apparatus for dynamically detecting overflow of a multi-layer buffer
JP2000207576A (en) Method and device for processing image and recording medium recording image processing program
KR100693134B1 (en) Three dimensional image processing
US5926183A (en) Efficient rendering utilizing user defined rooms and windows
US11423618B2 (en) Image generation system and method
JP3332511B2 (en) Image data processing method and apparatus and graphic system
JPH0772915B2 (en) Graphic shading device
US7372466B2 (en) Image processing apparatus and method of same
JPH09305791A (en) Device and method for generating three-dimensional image
US20100141649A1 (en) Drawing device
JP2952585B1 (en) Image generation method
JP2007299080A (en) Image generation method and image generation device