JPH0935087A - Method and device for shade processing - Google Patents

Method and device for shade processing

Info

Publication number
JPH0935087A
JPH0935087A JP7183815A JP18381595A JPH0935087A JP H0935087 A JPH0935087 A JP H0935087A JP 7183815 A JP7183815 A JP 7183815A JP 18381595 A JP18381595 A JP 18381595A JP H0935087 A JPH0935087 A JP H0935087A
Authority
JP
Japan
Prior art keywords
shadow
model
dimensional
light source
data
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
JP7183815A
Other languages
Japanese (ja)
Inventor
Toshio Moriya
俊夫 守屋
Haruo Takeda
晴夫 武田
Aki Noda
亜紀 能田
Toshiyuki Yuasa
俊之 湯浅
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 JP7183815A priority Critical patent/JPH0935087A/en
Publication of JPH0935087A publication Critical patent/JPH0935087A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To decrease the number of polygons required for shade generation by approximating a complicated three-dimensional shape body which generates a shade with several solid bodies and replacing them with planes which generating nearly the same shade. SOLUTION: A 1st solid model 151 represents a three-dimensional shape body as a set of polygons and polyhedrons. A 2nd solid model 152 approximates and represents the 1st solid model 151 as a set of, for example, elliptic bodies and rectangular prisms by using an approximate model generating means 161. As data on the three-dimensional shape body, the 1st solid model 151 and further the 2nd solid model 152 which is represented by approximation with less parameters than it are provided. Then a shade generation rule calculating means 155 finds a rule for generating the shade of the 2nd solid model from data 153 regarding a light source and a shade adding means 160 finds the shade formed by a shield surface. Consequently, even if the solid model 151 is in a complicated shape, the shield surface can easily be found from the data 153.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、映画、ゲーム、芸術、
科学などの産業に関し、特にコンピュータにより画像や
映像の作成や表示を行う方法、または装置に関する。
BACKGROUND OF THE INVENTION The present invention is applicable to movies, games, arts,
The present invention relates to industries such as science, and more particularly to a method or apparatus for creating and displaying images and videos by a computer.

【0002】[0002]

【従来の技術】コンピュータグラフィックス(以下、C
Gという)とは、コンピュータ等を用い、画像や映像を
作成する技術、あるいはその作品を示し、最近では、マ
ルチメディアの分野で一般にも大きく関わってきてい
る。CGに関する技術としては、形状をコンピュータで
扱うデータ形式に変換するモデリング技術、透視投影な
どの3次元処理技術、表面をリアルに色づけするための
レンダリング技術などがある。
2. Description of the Related Art Computer graphics (hereinafter referred to as C
The term "G" refers to a technique for creating an image or a video using a computer or the like, or a work thereof, and recently, it has been widely involved in the field of multimedia in general. Examples of technologies related to CG include modeling technology for converting a shape into a data format handled by a computer, three-dimensional processing technology such as perspective projection, and rendering technology for realistically coloring a surface.

【0003】一般に、現在用いられているCG作成手法
は、3次元物体を三角形や四角形などの多角形(以下、
ポリゴン)の集合としてモデル化し(メッシュ分割)、
視点からの物体の重なりを求め、光源や物体の性質に応
じて表面処理を行なうプロセスをとるものが多い。一
方、CGでは、現実の物をなるべくリアルに映像表現し
たい、という要求がある。3次元物体をリアルに見せる
ための効果の一つとして、陰影をつけることが考えられ
るが、その技術としては、レイトレーシング、2段階
法、シャドウボリュームなどがある。
In general, the CG creation method currently used is to convert a three-dimensional object into a polygon such as a triangle or a quadrangle (hereinafter, referred to as a polygon).
Model as a set of polygons (mesh division),
In many cases, the process of obtaining the overlap of the objects from the viewpoint and performing the surface treatment according to the properties of the light source and the object is taken. On the other hand, in CG, there is a demand to express a real thing as realistically as possible. As one of the effects for making a three-dimensional object look realistic, it is conceivable to add a shadow, and its techniques include ray tracing, two-step method, shadow volume and the like.

【0004】レイトレーシングは、視線を物体側から逆
探索して、光源に行き着くまでに物体が存在すればその
部分を陰影とする方法である。2段階法は、視点からの
透視図と、光源からの透視図の2つを求め、光源からの
透視図に現われない部分を陰影として視点からの透視図
に重ね合わせる方法である。シャドウボリュームは、光
源と、遮えい面によって生じる陰影の領域を影立体(シ
ャドウボリューム)として求め、この立体と重なる物体
の交差部分を陰影とする方法である。
Ray tracing is a method in which the line of sight is reversely searched from the object side, and if an object exists before the light source is reached, that part is shaded. The two-step method is a method of obtaining a perspective view from a viewpoint and a perspective view from a light source, and superimposing a portion that does not appear in the perspective view from the light source as a shadow on the perspective view from the viewpoint. The shadow volume is a method in which an area of a shadow generated by a light source and an occluding surface is obtained as a shadow solid (shadow volume), and an intersecting portion of an object overlapping this solid is set as a shadow.

【0005】また、コンピュータにより陰影を付加させ
る手法に関する文献としては、“シャドウアルゴリズム
フォー コンピュータ グラフィックス” 197
7’シーグラフ(Shadow Algorithms
for ComputerGraphics” 19
77’ SIGGRAPH)がよく知られている。陰影
処理をハードウェアで行なうことにより高速処理を可能
にする既出願特許として、特開平4−65780号公報
がある。また、光源のあたる物体を判別し、判別結果に
もとづき描画処理を施すことにより、陰影付加時間を短
縮する既出願特許として特開平2−24785号公報が
ある。
Further, as a document relating to a method of adding a shadow by a computer, "Shadow Algorithm for Computer Graphics" 197 is cited.
7'Siegraph (Shadow Algorithms
for Computer Graphics "19
77 'SIGGRAPH) is well known. Japanese Patent Application Laid-Open No. 4-65780 is an already-applied patent that enables high-speed processing by performing shading processing by hardware. Further, there is Japanese Patent Application Laid-Open No. 2-24785 as an already-applied patent in which an object illuminated by a light source is discriminated and drawing processing is performed based on the discrimination result to shorten the shadow addition time.

【0006】[0006]

【発明が解決しようとする課題】CGにおいてある物体
が他の物体につくる陰影を求めようとすると、その計算
量の問題から、CGの描画処理速度が極端に落ちるとい
う問題がある。もし画面内の物体(オブジェクト)が移
動せず、光源の位置も変化しないときには、陰影の形状
は変わらないので、あらかじめCGデータ作成のときに
一度陰影を求めておけばよい。しかし、物体が移動した
り、光源の方向が動的に変化するときは、そのたびに陰
影を求める必要がある。
However, when the shadow formed by one object on another object in CG is to be obtained, there is a problem that the drawing processing speed of CG is extremely reduced due to the problem of the amount of calculation. If the object on the screen does not move and the position of the light source does not change, the shape of the shadow does not change. Therefore, the shadow may be obtained once when the CG data is created. However, when the object moves or the direction of the light source changes dynamically, it is necessary to obtain the shadow each time.

【0007】画像内の物体や光源が動く画像に対して、
リアルタイム(秒数10コマ程度)でこのようなデータ
に陰影をつけることは、現在のハードウェアの処理能力
などを考慮した場合、現実的に不可能なものとなってい
る。表示されている3次元の物体が任意の方向に移動し
たり、光源の位置、方向が変化したときは、そのたびに
陰影の形状を計算する必要がある。一般に、現実の物体
や風景をある程度リアルにモデル化しようとすると、陰
影を作る物体(オブジェクト)は、それぞれ数千ポリゴ
ン程度のものとなり、画像全体で数万ポリゴンを超えて
しまうことも多い。
For an image in which an object or light source in the image moves,
Shading such data in real time (about 10 frames per second) is practically impossible in consideration of the processing capability of the current hardware. When the displayed three-dimensional object moves in an arbitrary direction or the position or direction of the light source changes, it is necessary to calculate the shadow shape each time. Generally, when it is attempted to model a real object or landscape to some extent realistically, each of the objects (objects) that form a shadow is about several thousand polygons, and the whole image often exceeds tens of thousands of polygons.

【0008】陰影を求めるための計算は、物体の数や形
状の複雑さにほぼ比例して増加するので、その計算時間
のために、CGの描画が遅れ、表示する映像の動きが極
端に遅くなったり、物体の動作がぎこちなく見えたりす
る問題が生じている。ハードウェアやソフトウェアに工
夫をもたせることで、処理速度の向上をはかる方法(前
述の公知例など)が考えられているが、複雑なモデルの
リアルタイム処理ができるまでには至っておらず、さら
に高速な処理が求められている。
Since the calculation for obtaining the shadow increases substantially in proportion to the number of objects and the complexity of the shape, the CG drawing is delayed and the motion of the displayed image is extremely slow because of the calculation time. There is a problem that the object becomes awkward and the motion of the object looks awkward. A method to improve the processing speed by devising the hardware and software (such as the above-mentioned publicly known example) has been considered, but it has not yet been possible to perform real-time processing of a complicated model, and it is even faster. Processing is required.

【0009】本発明の目的は、上述の問題を解決すべ
く、複雑な形状の物体を含む映像に、高速に陰影を付加
する方法を提供することにある。本発明の他の目的は、
上述の問題を解決すべく、複雑な形状の物体を含む映像
に、高速に陰影を付加する装置を提供することにある。
また、本発明の他の目的は、特別なハードウェア等を必
要とせず、簡単な構成で、高速に陰影を付加する方法、
あるいは装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for adding a shadow to an image containing an object having a complicated shape at high speed in order to solve the above problems. Another object of the present invention is to
In order to solve the above-mentioned problem, it is an object of the present invention to provide a device for quickly adding a shadow to an image including an object having a complicated shape.
Another object of the present invention is to add shadows at high speed with a simple structure that does not require special hardware.
Or to provide a device.

【0010】[0010]

【課題を解決するための手段】上述の課題を解決するた
めに本発明は、3次元形状物体をm個のパラメータで表
現する第1の立体モデルから、前記3次元形状物体をm
>nなるn個のパラメータで表現する第2の立体モデル
を作成する近似モデル作成手段と、光源に関するデータ
と前記第2の立体モデルとから、前記光源が発生する光
の下での前記第2の立体モデルの陰影生成規則を求める
手段と、前記陰影生成規則に従い生成した陰影を、前記
第1の立体モデルが生成する陰影として前記陰影が映る
物体に付加する手段とを備えるものである。
In order to solve the above-mentioned problems, according to the present invention, the three-dimensional shaped object is represented by m from the first three-dimensional model expressing the three-dimensional shaped object by m parameters.
The second model under the light generated by the light source, based on the approximate model creating means for creating a second three-dimensional model represented by n parameters with n> n, the data about the light source, and the second three-dimensional model. And a means for adding the shadow generated according to the shadow generation rule to the object on which the shadow appears as the shadow generated by the first stereo model.

【0011】また、本発明は、3次元形状物体をm個の
パラメータで表現する第1の立体モデルから、前記3次
元形状物体をm>nなるn個のパラメータで表現する第
2の立体モデルを作成し、光源に関するデータと前記第
2の立体モデルとから、前記光源が発生する光の下での
前記第2の立体モデルの遮えい面を求め、前記遮えい面
を多角形に近似し、前記多角形が生成する陰影を、前記
第1の立体モデルが生成する陰影として前記陰影が映る
物体に付加するものである。
Further, according to the present invention, from the first three-dimensional model expressing the three-dimensional shaped object with m parameters, the second three-dimensional model expressing the three-dimensional shaped object with n parameters satisfying m> n. Is generated, the shielding surface of the second three-dimensional model under the light generated by the light source is obtained from the data about the light source and the second three-dimensional model, and the shielding surface is approximated to a polygon. The shadow generated by the polygon is added to the object on which the shadow is reflected as the shadow generated by the first stereo model.

【0012】[0012]

【作用】3次元形状物体を表すデータとして、第1の立
体モデルにより表現された3次元形状データの他に、陰
影生成用により少ないパラメータで近似的に表現した第
2の立体モデルを持つ。陰影生成時に、光源の方向など
光源に関するデータと、第2の立体モデルから、例え
ば、その立体が生成する陰影と同じ陰影を生成する平
面、すなわちその立体による遮えい面を求めるなど陰影
生成規則を求める。これによる陰影を第1の立体モデル
に付加することで、第1の立体モデルによる陰影を直接
求めるより、極めて少ない演算により、陰影を付加する
ことができる。
As data for representing a three-dimensional object, in addition to the three-dimensional shape data represented by the first three-dimensional model, there is a second three-dimensional model which is approximately represented by a smaller number of parameters for shadow generation. At the time of shadow generation, a shadow generation rule such as a plane that generates the same shadow as the shadow generated by the solid, that is, a shielding surface by the solid is calculated from the data about the light source such as the direction of the light source and the second solid model. Ask. By adding the resulting shadow to the first three-dimensional model, it is possible to add the shadow by a significantly smaller number of operations than directly obtaining the shadow by the first three-dimensional model.

【0013】例えば第2の立体モデルに楕円体の集合を
用いた場合を考える。楕円体は、どの方向から見ても楕
円であるため、複雑な形状の物体でもこれを楕円の集合
に近似しておけば、どの方向から光があたったときで
も、その遮えい面を楕円平面の集合として容易に求める
ことができる。また、この楕円平面を数個のポリゴンと
して近似しもとの立体と置き換えることで、この後、従
来の方法によって陰影を求める際の計算量を大幅に削減
させ、描画の高速化をはかることができる。なお、3次
元形状物体を楕円体に近似する既出願特許として、特願
平6−17112号がある。
For example, consider the case where a set of ellipsoids is used for the second stereo model. Since an ellipsoid is an ellipse when viewed from any direction, if an object with a complicated shape is approximated to a set of ellipses, the obstruction surface will be the elliptical plane regardless of the direction of light. Can be easily obtained as a set of. In addition, by approximating this elliptical plane as several polygons and replacing it with the original solid, the amount of calculation when obtaining the shadow by the conventional method can be greatly reduced and the drawing speed can be increased. it can. As an already-applied patent for approximating a three-dimensional object to an ellipsoid, there is Japanese Patent Application No. 6-17112.

【0014】また、第1の立体モデルを近似する第2の
立体モデルが、楕円体でなくても第1の立体モデルより
少ないパラメータで表現できる立体の集合であれば、光
線をあてたときの遮えい面を容易に求めることができ
る。これを陰影を生成する第1の立体モデルの代わりに
用いることで、陰影を生成する物体が単純な形状にな
り、陰影を求める計算量を大幅に削減することができ
る。陰影の形は近似のため、多少不正確になるが、一般
の用途では、それほど精密に陰影の形状を求める必要は
ない。近似モデルを用いても、映像全体としてのリアリ
ティーは十分に保つことができる。
If the second stereo model approximating the first stereo model is a set of solids that can be represented with fewer parameters than the first stereo model even if it is not an ellipsoid, then the The shielding surface can be easily obtained. By using this instead of the first stereo model for generating the shadow, the object for generating the shadow has a simple shape, and the amount of calculation for calculating the shadow can be significantly reduced. The shape of the shadow is somewhat inaccurate because it is an approximation, but in general applications, it is not necessary to obtain the shape of the shadow very precisely. Even if an approximate model is used, the reality of the entire image can be maintained sufficiently.

【0015】[0015]

【実施例】まず、図1を用いて本発明の全体の概念を示
す。第1の立体モデル151は、具体的には、一般のC
G同様に3次元形状物体を多角形や多面体の集合として
表現したものである。例えば4角形ポリゴンの集合とし
てこれを表現した場合は、もしポリゴン数が20000
個のときに、各ポリゴンの4つの頂点座標をx、y、z
の3つのパラメータで表せば全パラメータ数mは、4×
3×20000=240000となる。
First, the overall concept of the present invention will be described with reference to FIG. The first three-dimensional model 151 is specifically a general C
Similarly to G, the three-dimensional object is expressed as a set of polygons or polyhedra. For example, if this is expressed as a set of quadrilateral polygons, if the number of polygons is 20,000
, The four vertex coordinates of each polygon are x, y, z
The total number of parameters m is 4 ×
3 × 20000 = 240000.

【0016】第2の立体モデル152は、第1の立体モ
デル151を近似モデル生成手段161を用いて、例え
ば楕円体や直方体の集合として近似し表現したものであ
る。もしこの第1の立体モデル151が楕円体300個
の集合で近似されているときには、1つの楕円体は9つ
のパラメータで表すことができるので、全パラメータ数
nは、9×300=2700で示される。
The second three-dimensional model 152 is a representation of the first three-dimensional model 151 approximated as a set of, for example, an ellipsoid or a rectangular parallelepiped using the approximate model generation means 161. If this first three-dimensional model 151 is approximated by a set of 300 ellipsoids, one ellipsoid can be represented by 9 parameters, so the total number of parameters n is 9 × 300 = 2700. Be done.

【0017】このように本発明では、3次元形状物体
(以下、オブジェクトという)のデータとして、第1の
立体モデル151に加えて近似によりそれより少ないパ
ラメータで表現した第2の立体モデル152を持つ。な
お、近似モデル生成手段161の具体例は後述する。
As described above, in the present invention, as the data of the three-dimensional shaped object (hereinafter referred to as an object), in addition to the first three-dimensional model 151, the second three-dimensional model 152 represented by less parameters by approximation is provided. . A specific example of the approximate model generation means 161 will be described later.

【0018】ここまでが、CGにおけるモデリング過程
である。続くレンダリング過程では、まず、光線の方向
などの光源に関するデータ153から、陰影生成規則算
出手段155により、この光源による前述の第2の立体
モデルの陰影を生成する規則を求める。具体的には例え
ば、第2の立体モデル152の形状を表現するパラメー
タと光源に関する光線方向等のデータから、この第2の
立体モデル152によって生成される陰影と同じ陰影を
生成する遮えい面を算出する。その後、陰影付加手段1
60により、この遮えい面による陰影を求める。視点位
置や投影方法の種別にしたがった3次元処理を施し、レ
ンダリングを行ない表示する。
The above is the modeling process in CG. In the subsequent rendering process, first, from the data 153 on the light source such as the direction of the light ray, the shadow generation rule calculation means 155 obtains the rule for generating the shadow of the second stereo model by the light source. Specifically, for example, from a parameter expressing the shape of the second stereo model 152 and data such as a light ray direction regarding a light source, a shading surface that generates the same shadow as the shadow generated by the second stereo model 152 is selected. calculate. After that, the shadow adding means 1
By 60, the shadow due to this shielding surface is obtained. Three-dimensional processing is performed according to the viewpoint position and the type of projection method, and rendering is performed and displayed.

【0019】これらの手段により、第1の立体モデル1
51が複雑な形状のものであっても、陰影を生成する時
に、第2の立体モデル152と光源に関するデータ15
3から遮えい面を容易に求めることができる。この遮え
い面は第1の立体モデル151より単純な図形であるた
めに、この遮えい面による陰影を求める処理はものとモ
デルによるものより極めて少なくすることができる。
By these means, the first three-dimensional model 1
Even when 51 has a complicated shape, when the shadow is generated, the second solid model 152 and the light source data 15 are generated.
The shielding surface can be easily obtained from 3. Since this occluding surface is a simpler figure than the first three-dimensional model 151, the process of obtaining the shadow by this occluding surface can be made extremely less than that by the model and the model.

【0020】以下、具体的に本発明の一実施例を説明す
る。図6、図7は、本発明を適用した装置の例で、図6
は、オブジェクトや背景のデータを作るための編集装置
の概略構成図を示すものである。この編集装置は、主に
CGにおけるモデリング過程を行なうものである。図7
は、その編集装置で作成したデータを映像として表示す
る実行装置の概略構成図を示すものである。ユーザの入
力などによって対話的にオブジェクトの位置や方向、視
点の位置や方向、あるいは光源の位置や方向などを変え
ることができる。この実行装置は、主にCGにおけるレ
ンダリング過程、3次元処理過程を行なうものである。
An embodiment of the present invention will be specifically described below. 6 and 7 show examples of devices to which the present invention is applied.
FIG. 3 is a schematic configuration diagram of an editing device for creating data of objects and backgrounds. This editing device mainly performs a modeling process in CG. Figure 7
FIG. 4 is a schematic configuration diagram of an execution device that displays data created by the editing device as a video. It is possible to interactively change the position and direction of the object, the position and direction of the viewpoint, or the position and direction of the light source by inputting by the user. This execution device mainly performs a rendering process in CG and a three-dimensional processing process.

【0021】適用例の1つとして、テレビゲームが考え
られる。編集装置はゲーム制作者が、実行装置はゲーム
プレイヤが主に操作することになる。まず、図6につい
て説明する。編集装置900は、マウス901やキーボ
ード902、ディスプレイ903などのグラフィカルユ
ーザインタフェースを制御する入出力制御部904、プ
ログラムの実行を行なうプロセッサ(以下、CPUとい
う)905、ハードディスク910やフロッピーディス
ク911などの外部記憶装置、プログラムやデータなど
を記憶する主記憶912などからなる。
A video game can be considered as one of the application examples. The editing device is mainly operated by the game creator, and the execution device is mainly operated by the game player. First, FIG. 6 will be described. The editing device 900 includes an input / output control unit 904 that controls a graphical user interface such as a mouse 901, a keyboard 902, and a display 903, a processor (hereinafter, referred to as CPU) 905 that executes a program, an external hard disk 910, a floppy disk 911, and the like. It comprises a storage device, a main memory 912 for storing programs and data, and the like.

【0022】以下、各種プログラムの動作説明を行う。
これらのプログラムは、実際にはCPU905によって
実行されるものである。動作説明に際して、例として図
2に示すようなオブジェクト201に陰影を付加させて
表示させることを考える。主記憶912に記憶される各
プログラム、データについて説明する。
The operation of various programs will be described below.
These programs are actually executed by the CPU 905. In explaining the operation, as an example, consider that an object 201 as shown in FIG. 2 is displayed with a shadow added thereto. Each program and data stored in the main memory 912 will be described.

【0023】形状作成プログラム906は、オブジェク
トの3次元モデリングを行なうものである。図2に示す
ようなオブジェクト201を、図3のモデル化オブジェ
クト301に示すような3角形や4角形のポリゴンの集
合として表現する(メッシュ分割するという)。ここで
は、例として4角形ポリゴンによるモデリングを取り上
げた。このモデル化オブジェクト301が図1の第1の
立体モデル151に相当する。形状作成プログラム90
6は、現在多くのものが開発されているが、ディスプレ
イ画面を見ながらマウス等を操作させ、対話的にモデル
を作成するものが代表的である。本実施例でもこのよう
な既存のプログラムの利用を想定している。形状作成プ
ログラム906はモデル化オブジェクト301のデータ
をオブジェクト形状データ908として出力する。
The shape creation program 906 performs three-dimensional modeling of an object. An object 201 as shown in FIG. 2 is expressed as a set of triangular or quadrangular polygons as shown by the modeled object 301 in FIG. 3 (called mesh division). Here, as an example, modeling using a quadrilateral polygon is taken up. The modeled object 301 corresponds to the first stereo model 151 in FIG. Shape creation program 90
Many of 6 are currently being developed, but a typical one is to interactively create a model by operating a mouse or the like while looking at the display screen. The present embodiment also assumes the use of such an existing program. The shape creation program 906 outputs the data of the modeled object 301 as object shape data 908.

【0024】オブジェクト形状データ908は、さまざ
まな形式が考えられるが、本実施例では、図8(a)
(b)のような形式を持つものとする。図8(a)に示
すようにオブジェクトごとに、それを構成する複数の階
層からなるさらに細かいオブジェクトに分け(908−
1)、最下層のオブジェクトはそれを構成するポリゴン
のIDを記述する。そして、図8(b)に示すように、
それぞれポリゴンの頂点の座標値を記述する(908−
2)。
The object shape data 908 may have various formats, but in the present embodiment, FIG.
It has a format as shown in (b). As shown in FIG. 8A, each object is divided into finer objects having a plurality of hierarchies constituting the object (908-
1), the lowest layer object describes the IDs of the polygons that compose it. Then, as shown in FIG.
Describe the coordinate value of each vertex of the polygon (908-
2).

【0025】このようにオブジェクトを階層化するの
は、例えば、人というオブジェクトを、手や体といった
オブジェクトに分解して構成しておくことで、手だけを
動かした形状や、歩きながら体全体を動かすといったモ
デルを容易に作成することができるからである。座標
は、絶対座標系で記述することもできるが、オブジェク
トが移動することも考慮し相対座標系で記述することと
する。実際のCGでは、この他にオブジェクトの属性
(色や材質等)のデータなども記述するが、本発明には
特に影響がないので省略する。
The objects are hierarchized in this manner by, for example, disassembling an object such as a person into objects such as a hand and a body, and then forming a shape in which only the hand is moved or the whole body while walking. This is because it is possible to easily create a model that moves. Coordinates can be described in the absolute coordinate system, but in consideration of the movement of the object, the coordinates will be described in the relative coordinate system. In the actual CG, other data such as attribute data (color, material, etc.) of the object is also described, but the description is omitted because it does not particularly affect the present invention.

【0026】次に、近似モデル作成プログラム907に
ついて説明する。近似モデル作成プログラム907は、
形状作成プログラム906で作成したモデル化オブジェ
クト301を遮へい物(陰影を作るもの)として定義す
るために、楕円体、直方体等の立体の集合として近似す
るものである。本実施例では、楕円体の集合として近似
を行なう。図4に示すように、オブジェクト201と概
略がほぼ一致するように、数個から数十個の楕円体だけ
の集合で近似した近似モデル401を作成する。これが
図1の第2の立体モデルに相当し、近似モデル作成プロ
グラム907が近似モデル生成手段161に相当する。
このとき、各楕円体の重なりは無視してかまわないが、
オブジェクト201の各部位がつながっている場合は、
楕円体近似によって分離されないようにする。
Next, the approximate model creation program 907 will be described. The approximate model creation program 907 is
In order to define the modeled object 301 created by the shape creation program 906 as a shield (creating a shadow), it is approximated as a set of solids such as an ellipsoid and a rectangular parallelepiped. In this embodiment, the approximation is performed as a set of ellipsoids. As shown in FIG. 4, an approximate model 401 approximated by a set of only a few to a few tens of ellipsoids is created so that the outline of the object 201 is almost the same. This corresponds to the second stereo model in FIG. 1, and the approximate model creating program 907 corresponds to the approximate model generating means 161.
At this time, you can ignore the overlap of each ellipsoid,
If each part of the object 201 is connected,
Avoid being separated by the ellipsoidal approximation.

【0027】本実施例における近似モデル作成プログラ
ム907は、グラフィカルユーザインタフェースなどを
制御し、ユーザからの操作により対話的に近似モデル4
01の作成を支援するものである。例えば任意方向から
見たオブジェクトモデル201と、近似モデル401を
重ねて表示させ、差が大きくなった方向において近似モ
デルの修正を操作者(上述の例では、ゲーム制作者)に
行なわせることで、近似モデルを作成していく。
The approximate model creation program 907 in this embodiment controls a graphical user interface and the like, and the approximate model 4 is interactively operated by a user operation.
01 is supported. For example, by displaying the object model 201 viewed from an arbitrary direction and the approximate model 401 in an overlapping manner, and allowing the operator (the game creator in the above example) to correct the approximate model in the direction in which the difference becomes large, Create an approximate model.

【0028】図12は、550はディスプレイ903に
表示される編集画面の一例であって、画面全体、あるい
は一つのウィンドウに表示される。近似モデル作成プロ
グラム907は、ユーザが方向指示インタフェース55
3で指定した、任意の位置から見たモデル化オブジェク
ト301と楕円体562が重なった2次元画像を編集ウ
ィンドウ560に表示する。
FIG. 12 shows an example of the editing screen 550 displayed on the display 903, which is displayed on the entire screen or in one window. The approximate model creation program 907 allows the user to input a direction instruction interface 55.
A two-dimensional image in which the modeled object 301 and the ellipsoid 562 viewed from an arbitrary position specified in 3 overlap each other is displayed in the editing window 560.

【0029】そして、編集ウィンドウ560に楕円体5
62の楕円形状定義制御点563を表示し、これをユー
ザがマウス901でドラッグすることで、楕円体の大き
さや位置を調整する。このような操作をさまざまな視点
から行ない、どの方向から見てもモデル化オブジェクト
301と近似モデル401との差が最小になったときに
近似モデル401が完成し、定義される。なお、同時に
参照ウィンドウ570に、3次元的に透視投影によって
近似モデル401を表示すると、モデリングの際に参照
することができる。
Then, the ellipsoid 5 is displayed in the edit window 560.
The ellipse shape definition control point 563 of 62 is displayed, and the user drags this with the mouse 901 to adjust the size and position of the ellipsoid. Such an operation is performed from various viewpoints, and the approximation model 401 is completed and defined when the difference between the modeled object 301 and the approximation model 401 is minimized in any direction. At the same time, when the approximate model 401 is three-dimensionally displayed on the reference window 570 by perspective projection, the approximate model 401 can be referred to during modeling.

【0030】以上の過程は、本実施例のように、完全に
対話的に進めていくほかに、例えば近似モデル401と
もとのモデル化オブジェクト301との偏差の二乗和が
最小となるような条件などの設定により、自動的に求め
るようにすることも可能である。
The above-described process proceeds in a completely interactive manner as in the present embodiment, and, for example, a condition that the sum of squares of the deviation between the approximate model 401 and the modeled object 301 is minimized. It is also possible to automatically ask for it by setting such as.

【0031】楕円体は、それぞれ、楕円体の中心座標と
して3変数、楕円体の軸長として3変数、楕円体の軸方
向として3変数のあわせて9変数であらわされる。近似
モデル作成プログラム907は、これらの9変数を近似
モデル401を構成する楕円体の数だけ求め、近似モデ
ルデータ909として記憶する。近似モデルデータ90
9は図9(b)に示す楕円体の9つの変数982と、図
9(a)に示すその楕円体ともとのオブジェクト形状モ
デルとの対応関係981を記述する。
The ellipsoid is represented by a total of 9 variables including 3 variables as the center coordinates of the ellipsoid, 3 variables as the axial length of the ellipsoid, and 3 variables as the axial direction of the ellipsoid. The approximate model creation program 907 obtains these nine variables by the number of ellipsoids forming the approximate model 401 and stores them as approximate model data 909. Approximate model data 90
Reference numeral 9 describes the correspondence 981 between the nine variables 982 of the ellipsoid shown in FIG. 9B and the ellipsoid shown in FIG. 9A and the original object shape model.

【0032】以上のように、形状作成プログラム906
と、近似モデル作成プログラム907によって出力され
た、オブジェクト形状データ908と、近似モデルデー
タ909が1対となって、本実施例におけるCGのモデ
ルデータとなる。作成されたデータは、ハードディスク
910やフロッピーディスク911などの外部記憶装置
に記憶する。
As described above, the shape creation program 906
Then, the object shape data 908 and the approximate model data 909 output by the approximate model creation program 907 form a pair, and become the CG model data in this embodiment. The created data is stored in the external storage device such as the hard disk 910 or the floppy disk 911.

【0033】次に図7について説明する。実行装置95
0は、マウスやジョイスティックなどの入力装置951
と、それを制御する入出力制御部955、レンダリング
部、3次元処理部、陰影処理部からなりディスプレイ9
53を制御するグラフィックボード954、プログラム
の実行を行なうプロセッサ(以下、CPUという)95
6、ハードディスク962やフロッピーディスク963
などの外部記憶装置、プログラムやデータなどを記憶す
る主記憶964などからなる。また、編集装置900の
場合と同様に、動作説明する各種プログラムは、実際に
はCPU956によって実行されるものである。
Next, FIG. 7 will be described. Execution device 95
0 is an input device 951 such as a mouse or a joystick
And a display 9 including an input / output control unit 955 for controlling it, a rendering unit, a three-dimensional processing unit, and a shadow processing unit.
A graphic board 954 for controlling 53, a processor (hereinafter, referred to as CPU) 95 for executing a program
6, hard disk 962 and floppy disk 963
And an external storage device such as a main memory 964 for storing programs and data. Also, as in the case of the editing device 900, the various programs whose operations are described are actually executed by the CPU 956.

【0034】まず、前処理として、使用者がモデルデー
タを編集装置から実行装置に移動させる。移動させる手
段としては、フロッピーディスク、光ディスクのような
交換可能な記憶媒体を用いるほかに、ネットワークなど
を通じて転送することもできる。このオブジェクト形状
データ908、近似モデルデータ909は、実行装置の
主記憶に読み込まれる。
First, as a preprocessing, the user moves the model data from the editing device to the execution device. As a moving means, a replaceable storage medium such as a floppy disk or an optical disk may be used, and it may also be transferred via a network or the like. The object shape data 908 and the approximate model data 909 are read into the main memory of the execution device.

【0035】つぎに、主記憶964に格納されているオ
ブジェクト動作制御プログラム957、光源動作制御9
58プログラムについて説明する。これらのプログラム
は一般にシナリオを呼ばれ、ユーザの入力や時間の経過
に従って、様々な動きをオブジェクトや光源に対して与
えるものである。一般にこのプログラムはシナリオエデ
ィタと呼ばれる専用のエディタであらかじめ作成するこ
とが多い。
Next, the object operation control program 957 and the light source operation control 9 stored in the main memory 964.
The 58 program will be described. These programs are generally called scenarios, and give various movements to an object or a light source according to a user's input or the passage of time. Generally, this program is often created in advance by a dedicated editor called a scenario editor.

【0036】CPU956がオブジェクト動作制御プロ
グラム957を実行することにより、ユーザ(上述の例
ではゲームプレイヤ)は実行時(ゲーム実行時)に、入
力装置951を用いて、画面上のオブジェクトの位置や
方向を自由に変えられる。また、オブジェクトがある規
則に従って自動的に移動するように設定することができ
る。具体的には、ユーザの入力イベントや、タイマーを
監視し、イベントを受け取ったときに、オブジェクトの
位置を変化させる。オブジェクトの位置を変化させると
いうことは、オブジェクト形状データ908および近似
モデルデータ909の座標値に対して、移動演算や、回
転演算を与えることである。
When the CPU 956 executes the object motion control program 957, the user (the game player in the above example) uses the input device 951 at the time of execution (when the game is executed) to determine the position and direction of the object on the screen. Can be changed freely. Also, the object can be set to automatically move according to a certain rule. Specifically, the user's input event and a timer are monitored, and when the event is received, the position of the object is changed. Changing the position of the object means giving a movement calculation or a rotation calculation to the coordinate values of the object shape data 908 and the approximate model data 909.

【0037】また、光源動作制御プログラム958は内
部に光源データを持っており、CPU956がこのプロ
グラムを実行することにより、実行装置950が持つタ
イマー(図示せず)を監視し、光源の位置が自動的に変
わっていくように制御する。
The light source operation control program 958 has light source data inside, and when the CPU 956 executes this program, the timer (not shown) of the execution unit 950 is monitored and the position of the light source is automatically detected. Control so that it changes.

【0038】次に、画面にこのオブジェクトを描画する
レンダリング過程について説明する。CPU965は、
遮えい面算出プログラム959を実行して、一般のレン
ダリング過程における陰影の算出を簡略化するための前
処理を行う。具体的には、まず、編集装置900で作成
した近似モデルデータ909の楕円体すべてに対して、
光源動作制御プログラム958より渡される光源方向の
データ(以下、光源パラメータという)を用いて、その
楕円体が生成する陰影とおなじ陰影を生成する遮えい面
を求める。楕円体はどこから見ても楕円のため、この遮
えい面は楕円平面となる。この過程を図10を用いて説
明する。
Next, the rendering process of drawing this object on the screen will be described. CPU965 is
The occluding surface calculation program 959 is executed to perform preprocessing for simplifying the calculation of the shadow in the general rendering process. Specifically, first, for all the ellipsoids of the approximate model data 909 created by the editing device 900,
Using the light source direction data (hereinafter referred to as light source parameter) passed from the light source operation control program 958, a shading surface that produces the same shadow as the shadow produced by the ellipsoid is obtained. Since the ellipsoid is an ellipse from any direction, this blocking surface is an elliptical plane. This process will be described with reference to FIG.

【0039】図10(a)は楕円体とその陰影を示すも
ので、図10(b)は、図10(a)の楕円体の遮えい
面となる楕円平面と、その陰影を図示している。中心が
座標の原点にあり(数1)であらわされる楕円体が、
FIG. 10 (a) shows an ellipsoid and its shadow, and FIG. 10 (b) shows the ellipsoidal plane which is the shielding surface of the ellipsoid of FIG. 10 (a) and its shadow. There is. The ellipsoid whose center is at the origin of the coordinates (Equation 1)

【0040】[0040]

【数1】 [Equation 1]

【0041】上記(p、q、r)から座標の原点方向へ
の平行光で照らされる場合、まず、(数2)を求める。
When illuminating with parallel light from the above (p, q, r) toward the origin of the coordinates, first, (Equation 2) is obtained.

【0042】[0042]

【数2】 [Equation 2]

【0043】この結果を用いると、この楕円体の遮えい
面は、(数3)のような楕円平面となる。なお、θは楕
円体の座標のy方向を上方向とおいたときの楕円平面の
傾きである。
Using this result, the shielding surface of this ellipsoid becomes an elliptical plane as in (Equation 3). Note that θ is the inclination of the ellipsoidal plane when the y direction of the coordinates of the ellipsoid is the upward direction.

【0044】[0044]

【数3】 (Equation 3)

【0045】この楕円平面を図10(c)に示すように
ポリゴン近似し、ポリゴン近似遮えい面データ960と
する。
This elliptical plane is polygon-approximated as shown in FIG. 10C to obtain polygon-approximate shielding surface data 960.

【0046】この図に示すように、このポリゴンの陰影
と、もとの楕円体の陰影とは概略において一致すること
がわかる。ポリゴン近似においては、図11に示すよう
に三角形と四角形のポリゴンに分割する。本実施例では
数個のポリゴンに分割したが、いくつのポリゴンに分割
するかは、精度と処理速度の関係で調整する。ポリゴン
近似の手段としては、たとえば生成されるポリゴンと楕
円との偏差が最小となるように自動的に求める。
As shown in this figure, it can be seen that the shadow of this polygon and the shadow of the original ellipsoid roughly match. In the polygon approximation, the polygon is divided into triangular and quadrangular polygons as shown in FIG. In this embodiment, the polygon is divided into several polygons, but the number of polygons to be divided is adjusted depending on the relationship between accuracy and processing speed. As a means of polygon approximation, for example, the deviation between the generated polygon and the ellipse is automatically calculated so as to be the minimum.

【0047】この過程を全ての楕円体について行った
後、遮えい面算出プログラムは959は、オブジェクト
形状データ908、ポリゴン近似遮えい面データ960
をグラフィックボードに渡す。グラフィックボード95
4は、オブジェクト形状データ908に記述されるそれ
ぞれのオブジェクトに、上記過程で求められたポリゴン
近似遮えい面データ960からつくられる陰影を付加
し、表面をリアルに色づけして、透視投影等の3次元処
理を行なってディスプレイ953の画面に表示する。こ
の過程は、現在一般的に用いられている従来公知の方法
(2段階法、シャドウボリュームなど)によってハード
ウェア的に求める。
After performing this process for all ellipsoids, the shielding surface calculation program 959 is the object shape data 908 and the polygon approximate shielding surface data 960.
To the graphic board. Graphic board 95
Reference numeral 4 is for adding each of the objects described in the object shape data 908 with a shadow created from the approximate polygonal shading surface data 960 obtained in the above process, coloring the surface realistically, and performing 3 such as perspective projection. Dimensional processing is performed and the result is displayed on the screen of the display 953. This process is performed by hardware by a conventionally known method (two-step method, shadow volume, etc.) which is generally used at present.

【0048】なお、近似モデルデータ909は陰影を作
る物体を求めるためだけに用いるので、陰影を作成する
処理に関してはグラフィックボードに渡さなくてもよ
い。図13は、実行装置950における以上の処理をま
とめたフローチャートである。まず、編集装置900が
作成したオブジェクト形状データ908と近似モデルデ
ータ909を読み込む(1010)。
Since the approximate model data 909 is used only for obtaining an object that forms a shadow, it is not necessary to pass the processing for creating a shadow to the graphic board. FIG. 13 is a flowchart summarizing the above processing in the execution device 950. First, the object shape data 908 and the approximate model data 909 created by the editing device 900 are read (1010).

【0049】オブジェクト動作制御プログラム957
は、あらかじめ決められた動作や、あるいはユーザから
のイベント(1030)に従った動作に基づき、動きの
あるオブジェクト形状データ908の座標値を変化させ
る(1020、1035)。これは、たとえばオブジェ
クト201の一例としてあげた飛行機があらかじめ決め
られた飛行動作を行うことや、ユーザが飛行機を操縦す
ることに相当する。その後、オブジェクト形状データ9
08に対応する近似モデルデータ909の個々の楕円体
の座標値を変化させる(1040)。オブジェクト形状
データ908の座標に変化がなければ、このステップは
省略してもよい。
Object motion control program 957
Changes the coordinate value of the moving object shape data 908 based on a predetermined motion or a motion according to an event (1030) from the user (1020, 1035). This is equivalent to, for example, that the airplane, which is an example of the object 201, performs a predetermined flight motion, and that the user controls the airplane. After that, the object shape data 9
The coordinate value of each ellipsoid of the approximate model data 909 corresponding to 08 is changed (1040). If there is no change in the coordinates of the object shape data 908, this step may be omitted.

【0050】光源動作制御プログラム958は、ユーザ
からのイベント(1050)や、あるいはタイマーから
のイベント(1060)に従って、光源パラメータを変
え、光源の位置および方向を変化させる(1055、1
065)。これはたとえば、ユーザの操作によって、光
源が制御されることや、時間の推移に従って、太陽の位
置が変わることに相当する。
The light source operation control program 958 changes the light source parameter and changes the position and direction of the light source according to the event (1050) from the user or the event (1060) from the timer (1055, 1).
065). This corresponds to, for example, the light source being controlled by the operation of the user, and the position of the sun changing with the passage of time.

【0051】遮えい面算出プログラム959は、近似モ
デルデータ909におけるすべての楕円体について、光
源の位置および方向からその遮えい面を求め(107
0)、この遮えい面を陰影を作る物体としてポリゴン近
似し、ポリゴン近似遮えい面データ960を生成する
(1080)。オブジェクトの座標変化がなく、光源の
位置、方向に変化がなければ、これらのステップは省略
してもよい。
The shielding surface calculation program 959 finds the shielding surface from the position and direction of the light source for all ellipsoids in the approximate model data 909 (107).
0), this shielding surface is polygon-approximated as an object that creates a shadow, and polygon approximate shielding surface data 960 is generated (1080). If there is no change in the coordinates of the object and no change in the position or direction of the light source, these steps may be omitted.

【0052】CPU956は、オブジェクト形状データ
908、ポリゴン近似遮えい面データ960、光源パラ
メータをグラフィックボード954に渡す。グラフィッ
クボード954は、対象となるオブジェクトにレンダリ
ング、陰影づけを行ない、透視投影等の3次元画像を表
示する(1090)。以下、これらの過程を繰り返す。
The CPU 956 transfers the object shape data 908, the approximate polygonal occluding surface data 960, and the light source parameter to the graphic board 954. The graphic board 954 renders and shades the target object and displays a three-dimensional image such as perspective projection (1090). Hereinafter, these processes are repeated.

【0053】陰影づけのプロセスにおいて、あるオブジ
ェクトに注目したとき、そのオブジェクトが例えば数千
ポリゴンの要素からなるとき、従来の方法ではこのポリ
ゴン数だけの処理が必要なため、非常に時間を要してい
た。しかし、本実施例によれば、3次元の複雑な形状の
オブジェクトを、数個の楕円立体に近似し、さらにこれ
を楕円の平面におきかえるため、処理を行なうポリゴン
数として数十分の一に削減することができる。楕円立体
の断面(楕円平面)への置き換えと楕円のポリゴン近似
の2つの処理が新たに必要となるが、楕円立体のある断
面の形状は容易に求めることができるため、この処理は
陰影づけのプロセスに比べるとわずかである。全体とし
て、レンダリング時の陰影の処理時間を大幅に短縮する
ことができる。
In the shading process, when a certain object is focused on, when the object is composed of elements of, for example, several thousand polygons, the conventional method needs to process only this number of polygons, which is very time consuming. Was there. However, according to the present embodiment, since an object having a three-dimensionally complicated shape is approximated to several elliptic solids and this is replaced with an elliptic plane, the number of polygons to be processed is reduced to several tenths. Can be reduced. Two new processes are required: replacement with an ellipse solid cross section (elliptical plane) and ellipse polygon approximation. However, since the shape of a cross section with an ellipse solid can be easily obtained, this process is performed with shadowing. Few compared to the process. As a whole, the shadow processing time at the time of rendering can be significantly reduced.

【0054】近似による誤差は、(1)陰影の形状は、
特殊な場合を除き、それほど精密に求めなくても見た目
に影響はない、(2)一般の物体の形状は、楕円立体の
集合に近似し易い、(3)最終的に用いる遮へいオブジ
ェクトは平面(楕円平面)であるが、これは立体(楕円
体)を用いた時と全く同じ陰影の効果となる、などの理
由により、極めて目立たないものとすることができる。
The error due to approximation is (1) the shape of the shadow is
Except for special cases, it does not affect appearance even if it is not calculated very precisely. (2) The shape of a general object is easy to approximate to a set of elliptic solids. (3) The shielding object to be used finally is a plane ( Although it is an ellipsoidal plane, it can be made extremely inconspicuous due to the fact that it produces the same shading effect as when a solid (ellipsoid) is used.

【0055】これにより、ハードウェアの性能の制約な
どにより、従来の方法では表示されている物体が移動し
たり、光源が変化したときにこの陰影を遅れなく表示す
ることが不可能であった複雑なモデルについても、リア
ルタイムにすなわち秒数十こま程度の表示を行なうこと
ができるようになる。
As a result, it is impossible to display the shadow without delay when the displayed object moves or the light source changes due to the limitation of the hardware performance. This model can also be displayed in real time, that is, about several tens of seconds per second.

【0056】また、本実施例では、楕円体だけで近似を
行なったが、ほかの立体、たとえば多面体や曲面体など
によって近似を行なう方が適当な場合も考えられる。多
面体のときにはその頂点の座標と光源の方向から遮えい
面を求めることができる。また、曲面体の時にはその方
程式と光源の方向から遮えい面を求めることができる。
これらの場合、前述の楕円体における実施例ほど遮えい
面を単純に求めることはできないが、元のポリゴンモデ
ルから直接求めるよりは少ない演算により求めることも
できる。
Further, in the present embodiment, the approximation is performed only with the ellipsoid, but it may be more appropriate to perform the approximation with another solid such as a polyhedron or a curved surface. In the case of a polyhedron, the shielding surface can be obtained from the coordinates of the vertices and the direction of the light source. In the case of a curved body, the shielding surface can be obtained from the equation and the direction of the light source.
In these cases, the shielding surface cannot be simply obtained as in the above-described ellipsoidal embodiment, but can be obtained by a smaller number of operations than directly obtained from the original polygon model.

【0057】また、これらの複数種類の立体(楕円体、
多面体、曲面体)による近似を任意に混在させてもよ
い。また、遮えい面をあらかじめ複数個用意しておき、
ある方向から光線が当たったとき最もその光線に適合す
る遮えい面を選びこの陰影を求める方法も考えられる。
この方法では、より大まかな近似になるが、遮えい面を
求める処理も、省略することができるため、さらに陰影
付加処理時間を短くすることができる。レンダリング時
には、光線の方向に最も近い列のデータを選び、それを
遮えい面とする。
In addition, these plural kinds of solids (ellipsoids,
Approximations based on polyhedrons and curved bodies may be arbitrarily mixed. Also, prepare multiple shielding surfaces in advance,
It is also possible to select a shading surface that best fits the ray when the ray hits it from a certain direction and obtain this shadow.
Although this method provides a rough approximation, the processing for obtaining the occluding surface can be omitted, so that the shadow addition processing time can be further shortened. At the time of rendering, select the data in the column closest to the direction of the ray and use it as the blocking surface.

【0058】また、本実施例のように、陰影を作るオブ
ジェクトの構成が複数の楕円体からなるとき、おのおの
の遮えい面すべてについて陰影を求めると、光源の方向
から見て重なり合っている部分の計算を繰り返し行なう
ことになって処理の点で冗長である。そこで、遮えい面
算出プログラム959において、そのオブジェクトを構
成する遮えい面を、光源側から見た時の最外郭の輪郭の
形状を求め、それを遮えい面として再定義することで、
計算量を減らすこともできる。具体的には、すべての遮
えい面(ポリゴン近似した楕円平面)をある平面に投影
しその内部を塗りつぶして、それぞれの遮えい面の論理
和をとる操作を行なう。そして、その輪郭線を求めて、
ポリゴン近似遮えい面データ960とすればよい。
Further, when the structure of the object for forming the shadow is composed of a plurality of ellipsoids as in the present embodiment, when the shadows are obtained for all the respective shielding surfaces, the overlapping parts as seen from the direction of the light source are detected. The calculation is repeated, which is redundant in terms of processing. Therefore, in the shading surface calculation program 959, the shape of the outermost contour of the shading surface forming the object when seen from the light source side is obtained and redefined as the shading surface.
You can also reduce the amount of calculation. Specifically, all the shielding surfaces (ellipsoidal planes approximated by polygons) are projected onto a certain plane, the inside is filled, and the operation of taking the logical sum of the respective shielding surfaces is performed. Then, find that contour line,
The polygon approximate shielding surface data 960 may be used.

【0059】また、本実施例では、対応する近似モデル
データを持たない従来のオブジェクト形状データが実行
装置950に入力されたときでも、近似モデルデータへ
の置き換えを行わずにオブジェクト形状データから遮え
い面を求めることで、陰影を付加することができる。す
なわち、別のシステムで作成したデータや、形状が単純
なため、近似モデルを作成する必要のないものについて
も陰影を表示することができる。
Further, in this embodiment, even when the conventional object shape data having no corresponding approximate model data is input to the execution device 950, the object shape data is shielded from the object shape data without being replaced with the approximate model data. The shadow can be added by obtaining the surface. That is, the shadow can be displayed even for data created by another system, or for data for which it is not necessary to create an approximate model because the shape is simple.

【0060】このような場合には、オブジェクト形状デ
ータが対応する近似モデルデータを持つのかどうかを示
すヘッダ情報を、オブジェクト形状データに付加するこ
とで、実行装置950は自動的に区別、処理することが
できる。なお、本実施例では、編集装置900と実行装
置950を異なる装置としたが、同一の装置に構築する
こともできる。本実施例では、遮えい面を求める処理を
ソフトウェアが行ない、その陰影の計算および描画はグ
ラフィックボードが行なうとしたが、遮えい面を求める
プロセスも定式化した処理なので、ボード上の機能とし
て持たせ、処理時間の高速化をはかることもできる。ま
た、その逆に、高速のCPUが利用可能であれば、全て
の処理をソフトウェア化することも可能である。
In such a case, by adding header information indicating whether or not the object shape data has corresponding approximate model data to the object shape data, the execution device 950 can automatically distinguish and process. You can In this embodiment, the editing device 900 and the execution device 950 are different devices, but they can be built in the same device. In the present embodiment, it is assumed that the software performs the processing for obtaining the occluding surface and the graphic board performs the calculation and drawing of the shadow, but the process for obtaining the occluding surface is a formalized process, so it has a function on the board. In addition, the processing time can be shortened. On the contrary, if a high-speed CPU can be used, all the processes can be made into software.

【0061】[0061]

【発明の効果】本発明によれば、陰影を作る複雑な3次
元形状物体を、数個の立体で近似し、さらにこれを、ほ
ぼ同じ陰影を生成する平面におきかえるため、陰影生成
に必要なポリゴン数を大幅に削減することができる。つ
まり陰影を作るオブジェクトを単純化することで、レン
ダリング時の陰影処理時間を大幅に短縮することができ
る。したがって、陰影をつけるというリアルな表示を行
いつつ、実時間表示を可能にするという優れた効果があ
る。
According to the present invention, a complex three-dimensional object that forms a shadow is approximated by several solids, and this is replaced with a plane that generates almost the same shadow, which is necessary for shadow generation. The number of polygons can be significantly reduced. In other words, by simplifying the object that creates the shadow, it is possible to significantly reduce the shadow processing time during rendering. Therefore, there is an excellent effect that real-time display is possible while performing realistic display such as shading.

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

【図1】本発明の全体の流れを示した概念図である。FIG. 1 is a conceptual diagram showing the overall flow of the present invention.

【図2】表示する3次元形状物体(オブジェクト)を例
示する図である。
FIG. 2 is a diagram illustrating a three-dimensional shaped object (object) to be displayed.

【図3】図2に示す3次元形状物体のメッシュ分割を例
示する図である。
FIG. 3 is a diagram illustrating an example of mesh division of the three-dimensional shaped object shown in FIG.

【図4】図3に示すメッシュ分割した3次元形状物体の
楕円体近似モデルを例示する図である。
FIG. 4 is a diagram illustrating an ellipsoidal approximation model of the mesh-divided three-dimensional shaped object shown in FIG. 3;

【図5】最終的に表示する陰影付けをした画像を例示す
る図である。
FIG. 5 is a diagram illustrating an example of a shaded image to be finally displayed.

【図6】本発明の実施例における編集装置の構成を示す
ブロック図である。
FIG. 6 is a block diagram showing a configuration of an editing apparatus according to an embodiment of the present invention.

【図7】本発明の実施例における実行装置の構成を示す
ブロック図である。
FIG. 7 is a block diagram showing a configuration of an execution device according to an embodiment of the present invention.

【図8】オブジェクトモデルのデータ構造を例示する図
である。
FIG. 8 is a diagram illustrating a data structure of an object model.

【図9】楕円体近似モデルのデータ構造を例示する図で
ある。
FIG. 9 is a diagram illustrating a data structure of an ellipsoidal approximation model.

【図10】楕円体、楕円平面および楕円平面を近似した
ポリゴンによる陰影を例示する図である。
FIG. 10 is a diagram illustrating an ellipsoid, an ellipse plane, and a shadow of a polygon that approximates the ellipse plane.

【図11】楕円平面のポリゴン近似を例示する図であ
る。
FIG. 11 is a diagram exemplifying polygon approximation of an elliptical plane.

【図12】楕円体近似モデル作成エディタの操作画面を
例示する図である。
FIG. 12 is a diagram illustrating an operation screen of an ellipsoidal approximation model creation editor.

【図13】本発明の実施例における実行装置の動作フロ
ーチャートを示す図である。
FIG. 13 is a diagram showing an operation flowchart of the execution device according to the embodiment of the present invention.

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

201…オブジェクト、301…モデル化オブジェク
ト、401…近似モデル、906…形状作成プログラ
ム、907…近似モデル作成プログラム、908…オブ
ジェクト形状データ、909…近似モデルデータ、95
7…オブジェクト動作制御プログラム、958…光源動
作制御プログラム、959…遮えい面算出プログラム、
960…ポリゴン近似遮えい面データ。
201 ... Object, 301 ... Modeling object, 401 ... Approximation model, 906 ... Shape creation program, 907 ... Approximation model creation program, 908 ... Object shape data, 909 ... Approximation model data, 95
7 ... Object operation control program, 958 ... Light source operation control program, 959 ... Shielding surface calculation program,
960 ... Approximate polygon shielding surface data.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 湯浅 俊之 神奈川県川崎市麻生区王禅寺1099番地株式 会社日立製作所システム開発研究所内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Toshiyuki Yuasa 1099, Ozenji, Aso-ku, Kawasaki-shi, Kanagawa Stock Company Hitachi Systems Development Laboratory

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】3次元形状物体をm個のパラメータで表現
する第1の立体モデルから、前記3次元形状物体をm>
nなるn個のパラメータで表現する第2の立体モデルを
作成する近似モデル作成手段と、 光源に関するデータと前記第2の立体モデルとから、前
記光源が発生する光の下での前記第2の立体モデルの陰
影生成規則を求める手段と、 前記陰影生成規則に従い生成した陰影を、前記第1の立
体モデルが生成する陰影として前記陰影が映る物体に付
加する手段とを備えてなる陰影処理装置。
1. From the first three-dimensional model expressing a three-dimensional shaped object with m parameters, the three-dimensional shaped object is m>
The second model under the light generated by the light source is calculated from the approximation model creating means for creating a second three-dimensional model represented by n parameters, and the data about the light source and the second three-dimensional model. A shadow processing apparatus comprising: means for obtaining a shadow generation rule of a stereo model; and means for adding a shadow generated according to the shadow generation rule to an object on which the shadow appears as a shadow generated by the first stereo model.
【請求項2】3次元形状物体をm個のパラメータで表現
する第1の立体モデルから、前記3次元形状物体をm>
nなるn個のパラメータで表現する第2の立体モデルを
作成する近似モデル作成手段を備えてなる近似モデル作
成装置。
2. A three-dimensional shaped object is expressed by m parameters from a first three-dimensional model that represents the three-dimensional shaped object by m>.
An approximate model creating apparatus comprising approximate model creating means for creating a second three-dimensional model represented by n parameters of n.
【請求項3】3次元形状物体をn個のパラメータで表現
する第2の立体モデルと、光源に関するデータとから、
前記光源が発生する光の下での前記第2の立体モデルの
陰影生成規則を求める手段と、 前記陰影生成規則に従い生成した陰影を、前記3次元形
状物体をm>nなるm個のパラメータで表現する第1の
立体モデルが生成する陰影として前記陰影が映る物体に
付加する手段とを備えてなる陰影処理装置。
3. A second three-dimensional model representing a three-dimensional shaped object with n parameters and data concerning a light source,
A means for obtaining a shadow generation rule of the second three-dimensional model under the light generated by the light source; and a shadow generated according to the shadow generation rule with m parameters of m> n for the three-dimensional object. A shadow processing apparatus comprising means for adding a shadow generated by the first three-dimensional model to be expressed to an object on which the shadow is reflected.
【請求項4】m個のパラメータからなる第1の立体モデ
ルで表現する3次元形状物体をm>nなるn個のパラメ
ータからなる3次元形状物体の集合で表現する第2の立
体モデルを生成する手段と、 光源に関するデータと前記第2の立体モデルとから、前
記光源が発生する光の下での、前記第2の立体モデルの
陰影生成規則を求める手段とからなる陰影生成規則算出
装置。
4. A second three-dimensional model which represents a three-dimensional shaped object represented by a first three-dimensional model consisting of m parameters by a set of three-dimensional shaped objects consisting of n parameters satisfying m> n. And a means for obtaining a shadow generation rule of the second three-dimensional model under the light generated by the light source from the light source data and the second three-dimensional model.
【請求項5】3次元形状物体をm個のパラメータで表現
する第1の立体モデルから、前記3次元形状物体をm>
nなるn個のパラメータで表現する第2の立体モデルを
作成し、 光源に関するデータと前記第2の立体モデルとから、前
記光源が発生する光の下での前記第2の立体モデルの遮
えい面を求め、 前記遮えい面を多角形に近似し、 前記多角形が生成する陰影を、前記第1の立体モデルが
生成する陰影として前記陰影が映る物体に付加する陰影
処理方法。
5. From the first three-dimensional model expressing a three-dimensional shaped object with m parameters, the three-dimensional shaped object is m>
A second three-dimensional model represented by n parameters of n is created, and the shielding of the second three-dimensional model under the light generated by the light source from the data about the light source and the second three-dimensional model. A shadow processing method for obtaining a surface, approximating the obstructing surface to a polygon, and adding the shadow generated by the polygon to the object on which the shadow is reflected as the shadow generated by the first stereo model.
【請求項6】前記第2の立体モデルは楕円体の集合で構
成され、前記遮えい面は楕円平面であることを特徴とす
る請求項5記載の陰影処理方法。
6. The shading processing method according to claim 5, wherein the second three-dimensional model is composed of a set of ellipsoids, and the shielding surface is an ellipsoidal plane.
【請求項7】前記第2の立体モデルは曲面体の集合で構
成され、前記遮えい面は曲面であることを特徴とする請
求項5記載の陰影処理方法。
7. The shadow processing method according to claim 5, wherein the second three-dimensional model is composed of a set of curved bodies, and the shielding surface is a curved surface.
【請求項8】3次元形状物体をm個のパラメータで表現
する第1の立体モデルから、前記3次元形状物体をm>
nなるn個のパラメータで表現する多面体の集合として
表現する第2の立体モデルを作成し、 光源に関するデータと前記第2の立体モデルを構成する
前記多面体各々の方向と形状から、前記光源が発生する
光の下での前記多面体各々の遮えい面となる多角形を求
めを求め、 前記多角形が生成する陰影を、前記第1の立体モデルが
生成する陰影として前記陰影が映る物体に付加する陰影
処理方法。
8. A three-dimensional shaped object is expressed by m parameters, and the three-dimensional shaped object is m>
A second solid model expressed as a set of polyhedra expressed by n parameters of n is created, and the light source is generated from the data on the light source and the direction and shape of each of the polyhedra forming the second solid model. The polygons that form the occluding surface of each of the polyhedra under the light are obtained, and the shadows generated by the polygons are added to the object on which the shadows are reflected as the shadows generated by the first stereo model. Shading processing method.
JP7183815A 1995-07-20 1995-07-20 Method and device for shade processing Pending JPH0935087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7183815A JPH0935087A (en) 1995-07-20 1995-07-20 Method and device for shade processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7183815A JPH0935087A (en) 1995-07-20 1995-07-20 Method and device for shade processing

Publications (1)

Publication Number Publication Date
JPH0935087A true JPH0935087A (en) 1997-02-07

Family

ID=16142352

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7183815A Pending JPH0935087A (en) 1995-07-20 1995-07-20 Method and device for shade processing

Country Status (1)

Country Link
JP (1) JPH0935087A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346417A (en) * 2004-06-03 2005-12-15 Sega Corp Method for controlling display of object image by virtual three-dimensional coordinate polygon and image display device using the method
JP2012185534A (en) * 2011-03-03 2012-09-27 Univ Of Tokyo Three-dimensional environment restoration device, processing method therefor, and program
CN109448099A (en) * 2018-09-21 2019-03-08 腾讯科技(深圳)有限公司 Rendering method, device, storage medium and the electronic device of picture

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346417A (en) * 2004-06-03 2005-12-15 Sega Corp Method for controlling display of object image by virtual three-dimensional coordinate polygon and image display device using the method
JP4513423B2 (en) * 2004-06-03 2010-07-28 株式会社セガ Object image display control method using virtual three-dimensional coordinate polygon and image display apparatus using the same
JP2012185534A (en) * 2011-03-03 2012-09-27 Univ Of Tokyo Three-dimensional environment restoration device, processing method therefor, and program
CN109448099A (en) * 2018-09-21 2019-03-08 腾讯科技(深圳)有限公司 Rendering method, device, storage medium and the electronic device of picture
CN109448099B (en) * 2018-09-21 2023-09-22 腾讯科技(深圳)有限公司 Picture rendering method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US6426750B1 (en) Run-time geomorphs
JP3184327B2 (en) Three-dimensional graphics processing method and apparatus
US7289119B2 (en) Statistical rendering acceleration
US7164420B2 (en) Ray tracing hierarchy
US5999187A (en) Fly-through computer aided design method and apparatus
US6307554B1 (en) Apparatus and method for generating progressive polygon data, and apparatus and method for generating three-dimensional real-time graphics using the same
US9984501B2 (en) Adaptively merging intersecting meshes
US6867787B1 (en) Character generator and character generating method
JP4199663B2 (en) Tactile adjustment by visual image in human-computer interface
US9881417B2 (en) Multi-view drawing apparatus of three-dimensional objects, and method
WO1998000811A9 (en) Fly-through computer aided design method and apparatus
KR101867991B1 (en) Motion edit method and apparatus for articulated object
US8054311B1 (en) Rig baking for arbitrary deformers
US20220375152A1 (en) Method for Efficiently Computing and Specifying Level Sets for Use in Computer Simulations, Computer Graphics and Other Purposes
JP2002183228A (en) System and method for simplifying surface description and wire-frame description of geometric model
JP2023529790A (en) Method, apparatus and program for generating floorplans
JPH0935087A (en) Method and device for shade processing
Chen et al. A real-time sculpting and terrain generation system for interactive content creation
US9734616B1 (en) Tetrahedral volumes from segmented bounding boxes of a subdivision
US10636210B2 (en) Dynamic contour volume deformation
US11727616B2 (en) Contour lines for volumetric objects
US7532751B2 (en) Apparatus and computer readable medium for setting up multi-dimensional DDA variables
Isenberg et al. 3D illustrative effects for animating line drawings
Романюк et al. INTERACTIVE SHAPE MODELING USING FUNCTIONALLY DEFINED OBJECTS
Van Pernis Surface construction from within a virtual environment