JPH09319894A - Method and device for three-dimensional cg image using plural light sources - Google Patents

Method and device for three-dimensional cg image using plural light sources

Info

Publication number
JPH09319894A
JPH09319894A JP14016996A JP14016996A JPH09319894A JP H09319894 A JPH09319894 A JP H09319894A JP 14016996 A JP14016996 A JP 14016996A JP 14016996 A JP14016996 A JP 14016996A JP H09319894 A JPH09319894 A JP H09319894A
Authority
JP
Japan
Prior art keywords
light source
dimensional
range
illuminated
light sources
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.)
Granted
Application number
JP14016996A
Other languages
Japanese (ja)
Other versions
JP3230433B2 (en
Inventor
Shigekuni Fujimoto
茂訓 藤本
Hideki Fujii
秀樹 藤井
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 JP14016996A priority Critical patent/JP3230433B2/en
Publication of JPH09319894A publication Critical patent/JPH09319894A/en
Application granted granted Critical
Publication of JP3230433B2 publication Critical patent/JP3230433B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the burden to a user owing to plural light sources at the time of generating a three-dimensional CG images, using plural light sources. SOLUTION: When a three-dimensional CG model consisting of plural light sources 220-1 and 220-2, arranged in a three-dimensional space and plural irradiated three-dimensional graphics 230-1, 230-2, 230-3, and 230-4 are displayed on an image, ranges in irradiation of individual light sources (light source clip volumes) 250-1 and 250-2 are designated on the picture, and only the light source 220-1 is taken into consideration to calculate a display color, with respect to irradiated three-dimensional graphics 230-1 and 230-2 included in the range 250-1, and only the light source 220-2 is taken into consideration to calculate a display color, with respect to irradiated three-dimensional graphics 230-3 and 230-4 included in the range 250-2. Since it is sufficient if ranges corresponding to light sources are designated on the image, the burden to he user is not increased, even if the number of light sources and the number of irradiated objects are increased.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は3次元CG画像の生
成方法及びその装置に係り、特に、複数の光源と複数の
被照光物体(オブジェクト)の組み合わせで構成される
3次元CG画像の各被照光物体の表示色(物体色)を容
易に決めるのに好適な複数光源を用いる3次元CG画像
の生成方法及びその装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for generating a three-dimensional CG image, and more particularly, to each object of a three-dimensional CG image composed of a combination of a plurality of light sources and a plurality of illuminated objects (objects). The present invention relates to a method and an apparatus for generating a three-dimensional CG image using a plurality of light sources suitable for easily determining a display color (object color) of an illuminated object.

【0002】[0002]

【従来の技術】図6に示す3次元CGモデル(尚、説明
を簡単にするために2次元表示としている。)は、室内
を3次元CGとして表した一般的なモデルであり、家の
内部が壁310で2つの部屋(340−1と340−
2)に仕切られ、一方の部屋340−1の天井には照明
器具320−1(以下、光源1という。)が設けられ、
室内には机330−1(以下、物体1という。)と椅子
330−2(以下、物体2という。)が配置されてい
る。他方の部屋340−2の天井にも照明器具320−
2(以下、光源2)が設けられ、室内には机330−3
(以下、物体3という。)と椅子330−4(以下、物
体4という。)が配置されている。
2. Description of the Related Art A three-dimensional CG model shown in FIG. 6 (two-dimensional display is shown for the sake of simplicity) is a general model in which a room is represented as a three-dimensional CG. There are two rooms on the wall 310 (340-1 and 340-
2), and a lighting fixture 320-1 (hereinafter referred to as light source 1) is provided on the ceiling of one room 340-1.
A desk 330-1 (hereinafter referred to as object 1) and a chair 330-2 (hereinafter referred to as object 2) are arranged in the room. On the ceiling of the other room 340-2, lighting equipment 320-
2 (hereinafter, light source 2) is provided, and a desk 330-3 is provided in the room.
(Hereinafter, referred to as object 3) and chair 330-4 (hereinafter referred to as object 4) are arranged.

【0003】このような3次元CGモデル画像を画面に
表示する場合、計算機が各物体1〜4の表示色を光源
1,2からの光を考慮して計算することになる。両部屋
間に壁310が存在するため、例えば物体1の表示色を
決めるには、光源2からの照明光を考慮しないように計
算機に指示する必要がある。
When displaying such a three-dimensional CG model image on the screen, the computer calculates the display colors of the objects 1 to 4 in consideration of the light from the light sources 1 and 2. Since the wall 310 exists between the two rooms, it is necessary to instruct the computer not to consider the illumination light from the light source 2 in order to determine the display color of the object 1, for example.

【0004】そこで従来は、図7に示す様に、光源1が
照明する物体の識別子を有するテーブル410と、光源
2が照明する物体の識別子を有するテーブル420とを
設け、テーブル410に物体1と物体2を登録し、テー
ブル420に物体3と物体4を登録するようにしてい
た。また、光源が1つしかない例であるが、特開平6−
76074号公報記載の様に、3次元CG画像上で光が
及ばない範囲を細かく2次元の面として指定して、全体
の表示が不自然にならないようにしている。
Therefore, conventionally, as shown in FIG. 7, a table 410 having an identifier of an object illuminated by the light source 1 and a table 420 having an identifier of an object illuminated by the light source 2 are provided. The object 2 is registered, and the object 3 and the object 4 are registered in the table 420. In addition, this is an example in which there is only one light source.
As described in Japanese Unexamined Patent Publication No. 76074, a range not covered by light on a three-dimensional CG image is finely designated as a two-dimensional surface so that the entire display does not become unnatural.

【0005】[0005]

【発明が解決しようとする課題】上述した図7に示すテ
ーブルを設ける従来技術では、各光源と各被照光物体と
遮光物体(図6の例では壁)との位置関係をユーザが一
々把握する必要があり、この位置関係を把握した上で、
各テーブルを作成しなければならない。また、被照光物
体の位置または形が変化した場合、変化した被照光物体
に対してテーブルへの再登録処理が必要となり、被照光
物体の位置または形が変化する度に毎回テーブルへの再
登録処理が必要になってしまう。更に、壁の位置が変わ
り各光源の照光する範囲が変化した場合にも、テーブル
への再登録処理を実行しなければならない。つまり、ユ
ーザへの負担が大きいという問題がある。また、特開平
6−76074号公報記載の従来技術でも、影となる範
囲をユーザが一々細かく指示しなければならず、ユーザ
の負担が大きい。光源の数が多くなると、各光源と遮光
物体との位置関係を把握して、どこにどの光源の影がで
きるかを指定しなければならず、更にユーザの負担が大
きくなってしまう。
In the prior art in which the table shown in FIG. 7 is provided, the user grasps the positional relationship among the light sources, the illuminated objects, and the light blocking objects (walls in the example of FIG. 6) one by one. It is necessary to grasp this positional relationship,
You have to create each table. Also, if the position or shape of the illuminated object changes, re-registration processing in the table is required for the changed illuminated object, and re-registration in the table each time the position or shape of the illuminated object changes. Processing becomes necessary. Further, even if the position of the wall changes and the illuminated range of each light source changes, the re-registration process to the table must be executed. That is, there is a problem that the burden on the user is large. Further, even in the conventional technique described in Japanese Patent Laid-Open No. 6-76074, the user has to specify the shadowed area in detail, which imposes a heavy burden on the user. When the number of light sources increases, it is necessary to grasp the positional relationship between each light source and the light-shielding object and specify which light source has a shadow, and this further increases the burden on the user.

【0006】本発明の目的は、光源の数が多くなっても
ユーザの負担が少なくて済む複数光源を用いる3次元C
G画像の生成方法及びその装置を提供することにある。
An object of the present invention is to provide a three-dimensional C using a plurality of light sources, which can reduce the burden on the user even if the number of light sources is increased.
It is to provide a method of generating a G image and an apparatus thereof.

【0007】[0007]

【課題を解決するための手段】上記目的は、3次元空間
に配置された複数の光源と複数の被照光3次元図形とか
らなる3次元CGモデルを画面に表示する3次元CG画
像生成において、各光源毎に各光源が夫々照光する3次
元範囲を前記画面上で指定させ、各3次元指定範囲の前
記被照光3次元図形の色を当該3次元指定範囲の光源か
ら求めることで、達成される。
The above-mentioned object is to generate a three-dimensional CG image in which a three-dimensional CG model consisting of a plurality of light sources arranged in a three-dimensional space and a plurality of illuminated three-dimensional figures is displayed on a screen. This is achieved by causing each light source to specify a three-dimensional range illuminated by each light source on the screen, and obtaining the color of the illuminated three-dimensional figure in each three-dimensional designated range from the light source in the three-dimensional designated range. It

【0008】上記目的は好適には、前記範囲として、定
められた距離にある複数の平面に囲まれた領域として定
義することで、達成される。
The above object is preferably achieved by defining the range as a region surrounded by a plurality of planes at a predetermined distance.

【0009】上記目的は好適には、前記範囲の境界に跨
る前記被照光3次元図形に対して当該範囲内となる部分
のみの色を当該範囲に対応する光源のみを使って算出す
ることで、達成される。
Preferably, the above-mentioned object is to calculate the color of only the portion within the range with respect to the illuminated three-dimensional figure straddling the boundary of the range by using only the light source corresponding to the range, To be achieved.

【0010】[0010]

【発明の実施の形態】以下、本発明の一実施形態を図面
を参照して説明する。図1は、本発明の一実施形態を説
明する3次元CGモデルをディスプレイ上に表示した図
であり、図6に示した3次元CGモデルと同じモデルで
ある。図6で説明した従来技術と異なる点は、各部屋2
40−1,240−2毎に、当該部屋の光源220−
1,220−2の及ぶ範囲を光源クリップボリューム2
50−1,250−2として指定しているところであ
る。光源クリップボリューム250−1(斜線で示され
る範囲:物体1,2の部分も含む。)は、部屋240−
1の内部全域を包含するように画面上で3次元的に、例
えばマウスをドラッグするなどして指定され、同様に、
光源クリップボリューム250−2が部屋240−2の
内部全域を包含するように指定される。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a three-dimensional CG model for explaining an embodiment of the present invention on a display, which is the same model as the three-dimensional CG model shown in FIG. Each room 2 is different from the conventional technique described in FIG.
40-1 and 240-2 for each of the light sources 220-
1 and 220-2 range of light source clip volume 2
It is about to be designated as 50-1 and 250-2. The light source clip volume 250-1 (the range shown by the diagonal lines: includes the parts of the objects 1 and 2) is the room 240-.
1 is specified three-dimensionally on the screen so as to include the entire internal area of 1, for example, by dragging the mouse.
Light source clip volume 250-2 is designated to encompass the entire interior of room 240-2.

【0011】この図1の3次元CGモデルを描画すると
き、物体1は光源1が照光する範囲である光源1クリッ
プボリューム250−1に含まれるが、光源2が照光す
る範囲である光源2クリップボリューム250−2には
含まれないので、物体1の物体色を算出する際には、光
源1のみに照光された物体色を算出し、この物体色を使
って物体1を描画する。同様に、物体3は光源1が照光
する範囲である光源1クリップボリューム250−1に
含まれないが、光源2が照光する範囲である光源2クリ
ップボリューム250−2に含まれるので、物体3の物
体色を算出する際には、光源2のみに照光された物体色
を算出し、この物体色を使って物体3を描画する。物体
2,4も同様である。このように、光源を使って物体色
を算出する範囲を各光源毎にユーザが画面上で指定する
だけで済むため、ユーザの負担が少なくなる。
When the three-dimensional CG model of FIG. 1 is drawn, the object 1 is included in the light source 1 clip volume 250-1 which is a range illuminated by the light source 1, but the light source 2 clip which is a range illuminated by the light source 2 is clipped. Since it is not included in the volume 250-2, when calculating the object color of the object 1, the object color illuminated only by the light source 1 is calculated, and the object 1 is drawn using this object color. Similarly, the object 3 is not included in the light source 1 clip volume 250-1 which is the range illuminated by the light source 1, but is included in the light source 2 clip volume 250-2 which is the range illuminated by the light source 2, When calculating the object color, the object color illuminated only by the light source 2 is calculated, and the object 3 is drawn using this object color. The same applies to the objects 2 and 4. In this way, the user only has to specify the range for calculating the object color using the light source on the screen for each light source, and thus the burden on the user is reduced.

【0012】図2は、光源クリップボリュームの説明図
である。3次元空間上に配置された当該クリップボリュ
ーム対応の光源100を始点とし、3次元空間上の光源
クリップボリュームの境界である3次元空間上で定義さ
れた複数の光源クリップ面110−1〜5を夫々終点と
し、各光源クリップ面に垂直な3次元ベクトルを光源ク
リップベクトル120−1〜6とする。ただし、図2の
表現上の都合により光源クリップベクトル120−6に
対応する光源クリップ面は図示を省略している。
FIG. 2 is an explanatory diagram of the light source clip volume. Starting from the light source 100 corresponding to the clip volume arranged in the three-dimensional space, a plurality of light source clip surfaces 110-1 to 110-5 defined in the three-dimensional space, which are boundaries of the light source clip volumes in the three-dimensional space, are defined. The three-dimensional vectors that are the end points and are perpendicular to the respective light source clip planes are light source clip vectors 120-1 to 120-6. However, the light source clip plane corresponding to the light source clip vector 120-6 is omitted for convenience of expression in FIG.

【0013】ここで、光源クリップボリュームは、図2
に示されるように光源を含み、かつ光源クリップ面に囲
まれた3次元空間上の領域として定義される。また、光
源クリップ面数は1面以上であり、複数の光源クリップ
面によって囲まれた領域は閉空間もしくは開空間にな
る。各光源クリップ面110−1〜6は、光源100と
光源クリップベクトル120−1〜6とによって一意に
決定することができる。以下、式を使って光源クリップ
面と光源クリップボリュームを定義する。
Here, the light source clip volume is shown in FIG.
As shown in FIG. 3, it is defined as an area on the three-dimensional space that includes the light source and is surrounded by the light source clipping plane. Further, the number of light source clip surfaces is one or more, and the area surrounded by the plurality of light source clip surfaces becomes a closed space or an open space. Each of the light source clip planes 110-1 to 110-6 can be uniquely determined by the light source 100 and the light source clip vectors 120-1 to 120-6. Below, the light source clipping plane and the light source clipping volume are defined using the formulas.

【0014】光源クリップベクトルi(図2の例では、
iは上記ベクトル120−iのi)を、長さが0より大
きい3次元ベクトル(VXi,VYi,VZi)とし、光源の位置座
標を3次元座標(LX,LY,LZ)としたとき、光源クリップ面
i(図2の例では、iは110−iのi)を表す式を
The light source clip vector i (in the example of FIG. 2,
i is the vector 120-i, i) is a three-dimensional vector (VXi, VYi, VZi) whose length is greater than 0, and the position coordinates of the light source are three-dimensional coordinates (LX, LY, LZ). A formula expressing the clip plane i (i in the example of FIG. 2 is i of 110-i)

【0015】[0015]

【数1】 VXi・(x-(LX+VXi))+VYi・(y-(LY+VYi))+VZi・(z-(LZ+VZi))=0 …(式1) と定義する。[Formula 1] VXi · (x- (LX + VXi)) + VYi · (y- (LY + VYi)) + VZi · (z- (LZ + VZi)) = 0 (Formula 1) is defined.

【0016】また、光源クリップボリュームは光源を含
む領域であるとし、光源クリップ面の面数をnとし、光
源クリップ面iを表す前記式1を用い、光源クリップボ
リュームを表す式を
Further, it is assumed that the light source clip volume is a region including a light source, the number of light source clip surfaces is n, and the equation 1 representing the light source clip surface i is used to obtain an expression representing the light source clip volume.

【0017】[0017]

【数2】 VXi・(x-(LX+VXi))+VYi・(y-(LY+VYi))+VZi・(z-(LZ+VZi))≦0 …(式2) で表されるn個の3次元半空間i(i=1〜n)の共通
領域として定義する。
[Formula 2] VXi ・ (x- (LX + VXi)) + VYi ・ (y- (LY + VYi)) + VZi ・ (z- (LZ + VZi)) ≦ 0… (Equation 2) n Is defined as a common area of the three-dimensional half space i (i = 1 to n).

【0018】以下、光源クリッピング処理の1例を、図
1の3次元CGモデルを構成する各要素のX−Y平面上
位置座標及びベクトル(図3参照)と、図4に示される
光源クリップボリュームの領域を決定するデータを保持
するテーブルと、図5の光源クリッピング処理の手順を
示すフローチャートを用いて説明する。
An example of the light source clipping process will be described below with reference to the position coordinates and vector (see FIG. 3) on the XY plane of each element forming the three-dimensional CG model of FIG. 1, and the light source clip volume shown in FIG. The table for holding the data for determining the area of and the flow chart showing the procedure of the light source clipping processing of FIG. 5 will be described.

【0019】図3は、図1に示される3次元CGモデル
を構成する各要素の位置座標及びベクトルに対する本実
施形態における設定値を示したものであり、光源1クリ
ップボリューム510−1と、光源2クリップボリュー
ム510−2と、光源520−1(光源1)と、光源5
20−2(光源2)と、物体540−1(物体1)と、
物体540−2(物体2)と、物体1の頂点座標の1つ
である頂点550−1と、物体3の頂点座標の1つであ
る頂点550−2と、光源1クリップボリューム510
−1の領域を決定する光源クリップベクトル531−1
〜534−1と、光源2クリップボリューム510−2
の領域を決定する光源クリップベクトル531−2〜5
34−2とで構成される。ただし、図1の3次元CGモ
デルを構成する各要素は3次元座標系上で定義されてい
るが、ここで説明する実施形態を簡単に説明するため、
図3では、壁210に沿った直線上をY軸とし、部屋2
40−1,240−2と地面との境界をX軸としたX−
Y平面の図として示してある。また、同様の理由で、被
照光物体を物体1と物体3に限定し(物体2,4は省
略)、各被照光物体の物体色を算出するために代表して
第1頂点550を使用し、各光源クリップボリュームは
4面の光源クリップ面で囲まれた領域としている。
FIG. 3 shows set values in this embodiment for position coordinates and vectors of each element constituting the three-dimensional CG model shown in FIG. 1, and includes the light source 1 clip volume 510-1 and the light source. 2 clip volume 510-2, light source 520-1 (light source 1), and light source 5
20-2 (light source 2), object 540-1 (object 1),
Object 540-2 (object 2), vertex 550-1 which is one of the vertex coordinates of object 1, vertex 550-2 which is one of the vertex coordinates of object 3, and light source 1 clip volume 510
-1 light source clip vector 531-1 for determining the region
~ 534-1 and light source 2 clip volume 510-2
Light source clip vectors 531-2-5 that determine the region of
34-2 and the like. However, although each element forming the three-dimensional CG model in FIG. 1 is defined on the three-dimensional coordinate system, in order to briefly describe the embodiment described here,
In FIG. 3, the straight line along the wall 210 is the Y axis, and the room 2
40-1 and 240-2 X- with the boundary between the ground and the X-axis
It is shown as a view of the Y plane. For the same reason, the illuminated objects are limited to the objects 1 and 3 (the objects 2 and 4 are omitted), and the first vertex 550 is used as a representative to calculate the object color of each illuminated object. Each light source clip volume is an area surrounded by four light source clip surfaces.

【0020】図4は、図3に示す各位置座標及びベクト
ル値を保持したテーブル群であり、光源クリップボリュ
ーム510の領域を決定する光源クリップベクトル53
1〜534を保持したテーブル600と、光源520の
位置座標を保持したテーブル630と、被照光物体54
0を構成する頂点の位置座標を保持するテーブル660
とで構成される。
FIG. 4 is a table group holding each position coordinate and vector value shown in FIG. 3, and the light source clip vector 53 for determining the area of the light source clip volume 510.
1 to 534, a table 630 holding the position coordinates of the light source 520, and the illuminated object 54.
Table 660 that holds the position coordinates of the vertices that make up 0
It is composed of

【0021】図5は、図1に示される3次元CGモデル
を、図4に示されるテーブル群を使用して描画するとき
の処理手順を示すフローチャートであり、1つの被照光
物体を描画する処理ステップ710〜770を繰り返す
ためのステップ700,780と、物体iの物体色を初
期化するステップ710と、光源jが照光した時の物体
iの物体色を算出するステップ730〜750を繰り返
すステップ720,760と、物体iが光源jの光源ク
リップボリュームに含まれるか否かを判定するステップ
730と、ステップ730によって物体iが光源jのク
リップボリュームに完全に含まれないと判断されたとき
に、光源クリップボリュームに含まれる一部分のみを光
源jが照光した図形で描画するステップ740と、光源
jが物体iを照光するときの物体色を算出するステップ
750と、ステップ720〜760によって算出された
物体色で物体iを描画するステップ770とからなる。
FIG. 5 is a flow chart showing a processing procedure when drawing the three-dimensional CG model shown in FIG. 1 using the table group shown in FIG. 4, which is a processing for drawing one illuminated object. Steps 720 to repeat steps 700 and 780 for repeating steps 710 to 770, step 710 to initialize the object color of the object i, and steps 730 to 750 to calculate the object color of the object i when the light source j is illuminated. , 760, and a step 730 of determining whether the object i is included in the light source clip volume of the light source j, and when it is determined by the step 730 that the object i is not completely included in the light source j clip volume, Step 740 of drawing only a part included in the light source clip volume with a figure illuminated by the light source j, and the light source j illuminates the object i. A step 750 of calculating the object color of Rutoki, consisting of steps 770 Metropolitan of drawing an object i in object color calculated in step 720-760.

【0022】次に、図1に示される3次元CGモデルの
物体1を描画するときの処理動作を説明する。図1の物
体1を描画するとき、物体1の物体色を決定する第1頂
点の色を算出するために、第1頂点が各光源クリップボ
リュームに含まれるか否かを図5のステップ730で調
べる。ステップ730では、光源1のクリップボリュー
ムの領域を決定する光源1クリップベクトル610と、
光源1の位置座標640と、物体1の第1頂点の位置座
標670の各テーブル設定値と、光源クリップボリュー
ムの定義式(式2)を使う。光源1の位置座標640に
より、光源1の座標(LX,LY,LZ)が(-5,7,0)であり、ベク
トル610により、光源1のクリップベクトル(VX1,VY
1,VZ1)〜(VX4,VY4,VZ4)が、(0,2,0),(0,-6,0),(-4,0,
0),(4,0,0)であるので、光源1の光源クリップ面1〜光
源クリップ面4による半空間は、 y≦9,y≧1,x≧−9,x≦−1 …(式3) である。ここで、物体1の第1頂点の位置座標(x,y,z)
は、位置座標670により(-4,2,0)であり、これは4つ
の半空間を示す不等式(式3)を全て満足するため、ス
テップ730では、物体1が光源1のクリップボリュー
ムに含まれると判断する。
Next, the processing operation when drawing the object 1 of the three-dimensional CG model shown in FIG. 1 will be described. When drawing the object 1 of FIG. 1, it is determined in step 730 of FIG. 5 whether the first vertex is included in each light source clip volume in order to calculate the color of the first vertex that determines the object color of the object 1. Find out. In step 730, the light source 1 clip vector 610 that determines the region of the clip volume of the light source 1, and
The position coordinates 640 of the light source 1, the table setting values of the position coordinates 670 of the first vertex of the object 1, and the definition formula (Formula 2) of the light source clip volume are used. According to the position coordinate 640 of the light source 1, the coordinate (LX, LY, LZ) of the light source 1 is (-5,7,0), and the vector 610 indicates the clip vector (VX1, VY) of the light source 1.
1, VZ1) to (VX4, VY4, VZ4) are (0,2,0), (0, -6,0), (-4,0,
0), (4,0,0), the half space defined by the light source clip surface 1 to the light source clip surface 4 of the light source 1 is y ≦ 9, y ≧ 1, x ≧ −9, x ≦ −1. Equation 3) Here, the position coordinates (x, y, z) of the first vertex of the object 1
Is (-4,2,0) according to the position coordinate 670, and this satisfies all the inequalities (Equation 3) indicating the four half spaces. Therefore, in step 730, the object 1 is included in the clip volume of the light source 1. It is determined that

【0023】同様にこのステップ730では、物体1が
光源2の光源クリップボリュームに含まれるかどうかを
調べるため、光源2のクリップボリュームの領域を決定
する光源2クリップベクトル620と、光源2の位置座
標650と、物体1の第1頂点の位置座標670のテー
ブル設定値と、光源クリップボリュームの定義式(式
2)を使う。この場合、位置座標650により、光源2
の座標(LX,LY,LZ)が(5,7,0)であり、ベクトル620に
より、光源2のクリップベクトル(VX1,VY1,VZ1)〜(VX4,
VY4,VZ4)が、(0,2,0),(0,-6,0),(-4,0,0),(4,0,0)であ
るので、光源2の光源クリップ面1〜光源クリップ面4
による半空間は、 y≦9,y≧1,x≧1,x≦9 …(式4) である。ここで、物体1の第1頂点の位置座標(x,y,z)
は、位置座標670により(-4,2,0)であり、これは4つ
の半空間を示す不等式(式4)のうちx≧1を満たさな
いため、光源2のクリップボリュームに含まれないと判
断する。
Similarly, in this step 730, in order to check whether or not the object 1 is included in the light source clip volume of the light source 2, the light source 2 clip vector 620 for determining the area of the clip volume of the light source 2 and the position coordinate of the light source 2 are determined. 650, the table setting value of the position coordinate 670 of the first vertex of the object 1, and the definition formula (Formula 2) of the light source clip volume are used. In this case, the position coordinate 650 causes the light source 2
The coordinates (LX, LY, LZ) of (5,7,0) are (5,7,0), and the clip vector (VX1, VY1, VZ1) to (VX4,
VY4, VZ4) is (0,2,0), (0, -6,0), (-4,0,0), (4,0,0), so the light source clipping plane 1 of the light source 2 ~ Light source clip surface 4
The half space by is y ≦ 9, y ≧ 1, x ≧ 1, x ≦ 9 (Equation 4). Here, the position coordinates (x, y, z) of the first vertex of the object 1
Is (-4,2,0) according to the position coordinate 670, and this does not satisfy x ≧ 1 in the inequality (Equation 4) indicating the four half spaces, so that it is not included in the clip volume of the light source 2. to decide.

【0024】以上により、物体1の物体色を算出するス
テップ710〜760では、物体1が光源1のみによっ
て照光された物体色を算出し、ステップ770で、この
物体色を使って物体1を画面上に描画する。物体2,
3,4についても同様に判断し、画面上に描画する。
As described above, in steps 710 to 760 of calculating the object color of the object 1, the object color of the object 1 illuminated by only the light source 1 is calculated, and in step 770, the object 1 is displayed on the screen. Draw on top. Object 2,
Similarly for 3 and 4, it is drawn on the screen.

【0025】[0025]

【発明の効果】本発明によれば、ユーザは各光源と各被
照光物体と光を遮る遮光物体(壁)との位置関係を把握
する必要がなくなり、光源クリップボリュームを使って
各光源が物体を照光するか否かを動的に計算機が判定し
ながら物体色を算出しているので、被照光物体の位置ま
たは形が変化した場合や、光源が照光する範囲が変化し
た場合でも、ユーザの負担を増大させることなく、3次
元CG画像を生成することが可能となる。
According to the present invention, the user does not need to grasp the positional relationship between each light source, each illuminated object, and a light-shielding object (wall) that blocks light, and each light source uses the light source clip volume. The object color is calculated while the computer dynamically determines whether or not to illuminate, so even if the position or shape of the illuminated object changes or the range illuminated by the light source changes, the user's It is possible to generate a three-dimensional CG image without increasing the burden.

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

【図1】本発明の一実施形態に係る3次元CGモデルの
画像上で光源クリップボリュームを指定したところを示
す図である。
FIG. 1 is a diagram showing a light source clip volume designated on an image of a three-dimensional CG model according to an embodiment of the present invention.

【図2】光源クリップボリュームの説明図である。FIG. 2 is an explanatory diagram of a light source clip volume.

【図3】図1に示す3次元CGモデルをX−Y平面上で
示した説明図である。
FIG. 3 is an explanatory diagram showing the three-dimensional CG model shown in FIG. 1 on an XY plane.

【図4】図3の3次元CGモデルを構成する各要素の位
置座標及びベクトルを保持するテーブル図である。
FIG. 4 is a table diagram that holds position coordinates and vectors of respective elements that make up the three-dimensional CG model of FIG.

【図5】光源クリップボリュームを使った3次元CGモ
デルを描画する処理手順を示すフローチャートである。
FIG. 5 is a flowchart showing a processing procedure for drawing a three-dimensional CG model using a light source clip volume.

【図6】3次元CGモデルの一例を示す図である。FIG. 6 is a diagram showing an example of a three-dimensional CG model.

【図7】従来技術で使用される光源と被照光物体間の照
光関係を保持するテーブルを示す図である。
FIG. 7 is a diagram showing a table for holding an illumination relationship between a light source and an illuminated object used in the conventional technique.

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

100…光源、110…光源クリップ面、120…光源クリップ
ベクトル、210…壁、230…被照光物体、410…光源が照
光する物体の識別子を保持するテーブル、600…光源ク
リップベクトルを保持するテーブル、630…光源の位置
座標を保持するテーブル、660…被照光物体を構成する
頂点の位置座標を保持するテーブル、730…物体の光源
クリップボリュームに含まれるか否かを判定するステッ
プ、750…物体色を算出するステップ、770…物体を描画
するステップ。
100 ... Light source, 110 ... Light source clipping plane, 120 ... Light source clipping vector, 210 ... Wall, 230 ... Illuminated object, 410 ... Table holding identifier of object illuminated by light source, 600 ... Table holding light source clipping vector, 630 ... A table that holds the position coordinates of the light source, 660 ... A table that holds the position coordinates of the vertices that make up the illuminated object, 730 ... A step for determining whether or not the light source clip volume of the object is included, 750 ... The object color 770, a step of drawing an object.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 3次元空間に配置された複数の光源と複
数の被照光3次元図形とからなる3次元CGモデルを画
面に表示する3次元CG画像生成方法において、各光源
毎に各光源が夫々照光する範囲を前記画面上で指定さ
せ、各範囲毎に当該範囲に含まれる前記被照光3次元図
形の色を当該範囲に対応する光源のみを使って算出する
ことを特徴とする複数光源を用いる3次元CG画像の生
成方法。
1. A three-dimensional CG image generation method for displaying on a screen a three-dimensional CG model consisting of a plurality of light sources arranged in a three-dimensional space and a plurality of illuminated three-dimensional figures. A plurality of light sources characterized in that the range to be illuminated is designated on the screen, and the color of the illuminated three-dimensional figure included in the range is calculated for each range using only the light source corresponding to the range. A method for generating a three-dimensional CG image to be used.
【請求項2】 請求項1において、前記範囲は、定めら
れた距離にある複数の平面に囲まれた領域として定義さ
れることを特徴とする複数光源を用いる3次元CG画像
の生成方法。
2. The method for generating a three-dimensional CG image using a plurality of light sources according to claim 1, wherein the range is defined as a region surrounded by a plurality of planes at a predetermined distance.
【請求項3】 請求項1において、前記範囲の境界に跨
る前記被照光3次元図形に対しては当該範囲内となる部
分のみの色を当該範囲に対応する光源のみを使って算出
することを特徴とする複数光源を用いる3次元CG画像
の生成方法。
3. The method according to claim 1, wherein for the illuminated three-dimensional figure extending over the boundary of the range, the color of only the portion within the range is calculated using only the light source corresponding to the range. A method for generating a three-dimensional CG image using a plurality of characteristic light sources.
【請求項4】 3次元空間に配置された複数の光源と複
数の被照光3次元図形とからなる3次元CGモデルを画
面に表示する3次元CG画像生成装置において、各光源
毎に各光源が夫々照光する範囲を前記画面上で指定させ
る光源クリップボリューム指定手段と、各範囲毎に当該
範囲に含まれる前記被照光3次元図形の色を当該範囲に
対応する光源のみを使って算出する演算手段とを備える
ことを特徴とする複数光源を用いる3次元CG画像の生
成装置。
4. A three-dimensional CG image generating apparatus for displaying on a screen a three-dimensional CG model consisting of a plurality of light sources arranged in a three-dimensional space and a plurality of illuminated three-dimensional figures. Light source clip volume designating means for designating the range to be illuminated on the screen, and computing means for calculating the color of the illuminated three-dimensional figure included in the range for each range using only the light source corresponding to the range. An apparatus for generating a three-dimensional CG image using a plurality of light sources, comprising:
【請求項5】 請求項4において、前記範囲を定められ
た距離にある複数の平面に囲まれた領域として定義する
手段を備えることを特徴とする複数光源を用いる3次元
CG画像の生成装置。
5. The apparatus for generating a three-dimensional CG image using a plurality of light sources according to claim 4, further comprising means for defining the range as an area surrounded by a plurality of planes at a predetermined distance.
【請求項6】 請求項4において、前記演算手段は、前
記範囲の境界に跨る前記被照光3次元図形に対しては当
該範囲内となる部分のみの色を当該範囲に対応する光源
のみを使って算出することを特徴とする複数光源を用い
る3次元CG画像の生成装置。
6. The calculation means according to claim 4, wherein, for the illuminated three-dimensional figure straddling the boundary of the range, only the light source corresponding to the range is used for the color of only the part within the range. An apparatus for generating a three-dimensional CG image using a plurality of light sources, which is characterized in that
JP14016996A 1996-06-03 1996-06-03 Method and apparatus for generating three-dimensional CG image using multiple light sources Expired - Fee Related JP3230433B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14016996A JP3230433B2 (en) 1996-06-03 1996-06-03 Method and apparatus for generating three-dimensional CG image using multiple light sources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14016996A JP3230433B2 (en) 1996-06-03 1996-06-03 Method and apparatus for generating three-dimensional CG image using multiple light sources

Publications (2)

Publication Number Publication Date
JPH09319894A true JPH09319894A (en) 1997-12-12
JP3230433B2 JP3230433B2 (en) 2001-11-19

Family

ID=15262496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14016996A Expired - Fee Related JP3230433B2 (en) 1996-06-03 1996-06-03 Method and apparatus for generating three-dimensional CG image using multiple light sources

Country Status (1)

Country Link
JP (1) JP3230433B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009139999A (en) * 2007-12-03 2009-06-25 Sammy Corp Image creation device and program
US8164591B2 (en) 2001-05-14 2012-04-24 Thomson Licensing Device, server, system and method to generate mutual photometric effects
US10334697B2 (en) 2015-10-05 2019-06-25 Samsung Electronics Co., Ltd. Method and device for displaying illumination
CN116129058A (en) * 2023-04-13 2023-05-16 图林科技(深圳)有限公司 Cloud exhibition three-dimensional modeling and rendering method based on artificial intelligence

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8164591B2 (en) 2001-05-14 2012-04-24 Thomson Licensing Device, server, system and method to generate mutual photometric effects
JP2009139999A (en) * 2007-12-03 2009-06-25 Sammy Corp Image creation device and program
US10334697B2 (en) 2015-10-05 2019-06-25 Samsung Electronics Co., Ltd. Method and device for displaying illumination
CN116129058A (en) * 2023-04-13 2023-05-16 图林科技(深圳)有限公司 Cloud exhibition three-dimensional modeling and rendering method based on artificial intelligence

Also Published As

Publication number Publication date
JP3230433B2 (en) 2001-11-19

Similar Documents

Publication Publication Date Title
US5805782A (en) Method and apparatus for projective texture mapping rendered from arbitrarily positioned and oriented light source
US5742749A (en) Method and apparatus for shadow generation through depth mapping
El-Hakim et al. A multi-sensor approach to creating accurate virtual environments
US6727910B2 (en) Method and system for inversion of detail-in-context presentations
JP3736862B2 (en) Method for drawing a two-dimensional image of a three-dimensional object space defined in an object database
JPH10255081A (en) Image processing method and image processor
JP2002531905A (en) Method of forming perspective drawing from voxel space
JPH09319894A (en) Method and device for three-dimensional cg image using plural light sources
JP2832463B2 (en) 3D model reconstruction method and display method
JP2003331313A (en) Image processing program
JP4308367B2 (en) 3D image generation apparatus and environment map generation method
JPH11149566A (en) Three-dimensional cg plotting device for curved surface display
JP2973413B2 (en) Illuminance calculation method and display device for computer graphics
JP4009289B2 (en) Method for determining a weighting factor for color-calculating a texel color value associated with a footprint
JP4319308B2 (en) Gaseous object display circuit
US20040004620A1 (en) Image processing apparatus and method of same
JP2019109594A (en) Lighting fixture array design device
Blythe et al. Lighting and shading techniques for interactive applications
JP3712139B2 (en) Image creating apparatus and method
JPH09138859A (en) Picture synthesis device
JPH06176168A (en) Computer graphics preparing device
JPH08329280A (en) Image composition device
Hagen et al. Computer graphics and visual perception: The state of the art
JPH0676074A (en) Device and method for displaying picture
JPH10240961A (en) Magnified displaying method of straight line fisheye

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees