JP3270535B2 - How to create and display terrain models including objects - Google Patents

How to create and display terrain models including objects

Info

Publication number
JP3270535B2
JP3270535B2 JP27676192A JP27676192A JP3270535B2 JP 3270535 B2 JP3270535 B2 JP 3270535B2 JP 27676192 A JP27676192 A JP 27676192A JP 27676192 A JP27676192 A JP 27676192A JP 3270535 B2 JP3270535 B2 JP 3270535B2
Authority
JP
Japan
Prior art keywords
triangle
error
terrain
viewpoint
simulated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP27676192A
Other languages
Japanese (ja)
Other versions
JPH06103363A (en
Inventor
景範 梶原
勝 藤野
正人 緒方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Precision Co Ltd
Original Assignee
Mitsubishi Precision Co 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 Mitsubishi Precision Co Ltd filed Critical Mitsubishi Precision Co Ltd
Priority to JP27676192A priority Critical patent/JP3270535B2/en
Publication of JPH06103363A publication Critical patent/JPH06103363A/en
Application granted granted Critical
Publication of JP3270535B2 publication Critical patent/JP3270535B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、コンピュータグラフ
ィックスにおいて地表に3次元物体が配置された状態を
モデル化する方法とそれを表示する方法に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for modeling a state in which a three-dimensional object is arranged on the ground surface in computer graphics and a method for displaying the state.

【0002】[0002]

【従来の技術】コンピュータグラフィックスにおいて
は、物体映像のうち、より手前の物体によって隠される
部分を消去する処理が非常に重要である。この処理の代
表的な方法としてデプス・バッファ法とBSP(binary
space partitioning)法がある。
2. Description of the Related Art In computer graphics, it is very important to delete a portion of an object image that is hidden by a nearer object. As representative methods of this processing, a depth buffer method and a BSP (binary
space partitioning) method.

【0003】デプス・バッファ法は、物体映像を画素毎
に色及び奥行きを計算し、フレーム・バッファに書き込
んでおき、新たに物体映像を計算したら、奥行きも計算
し、すでにフレーム・バッファに書き込まれている奥行
き値と比較し、奥行きが小さい場合はフレーム・バッフ
ァの色及び奥行き値を新しい物体の値に書き替える方法
である。
In the depth buffer method, the color and depth of an object image are calculated for each pixel, and written in a frame buffer. When a new object image is calculated, the depth is also calculated and the object image is already written in the frame buffer. If the depth is smaller than the current depth value, the color and depth value of the frame buffer are rewritten to the value of the new object.

【0004】BSP法は、空間を再帰的に二分割し、二
進木で表わし、視点に近い空間にある物体から順に映像
を計算し、フレームバッファに書き込む。このとき、す
でに映像が書き込まれていると新しい映像は計算しな
い。
[0004] In the BSP method, a space is recursively divided into two parts, represented by a binary tree, and images are calculated in order from an object located in a space close to the viewpoint and written into a frame buffer. At this time, if a video has already been written, a new video is not calculated.

【0005】[0005]

【発明が解決しようとする課題】デプス・バッファ法と
BSP法は以上の通りであるが、それぞれ次のような欠
点があった。
As described above, the depth buffer method and the BSP method have the following drawbacks.

【0006】デプス・バッファ法は、画素毎の奥行きを
計算し、比較するので計算量が大である。また、奥行き
値が大きい場合は計算した映像及び奥行き値は無駄にな
る。
The depth buffer method requires a large amount of calculation because the depth of each pixel is calculated and compared. If the depth value is large, the calculated video and depth value are wasted.

【0007】BSP法は計算量が少なく高速描画が可能
であるが、空間を分割するセパレート・プレーンが物体
をよぎるときセパレート・プレーンをずらすか物体を分
割しなければならない等の欠点がある。特に、物体が移
動物体のときは上記の処理をオンラインで行なう必要が
ある。
Although the BSP method requires a small amount of calculation and can perform high-speed drawing, it has disadvantages such as the need to shift the separate plane or divide the object when the separate plane that divides the space crosses the object. In particular, when the object is a moving object, it is necessary to perform the above processing online.

【0008】本発明が解決しようとする課題は、処理効
率を向上させた隠顕処理を実現する地形モデルの作成及
び表示の方法を提供することである。
An object of the present invention is to provide a method of creating and displaying a terrain model that realizes concealment processing with improved processing efficiency.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するため
の、物体を含む地形モデルの作成及び表示の方法は、コ
ンピュータを用いた模擬視界発生に関する地形のモデリ
ングにおいて、正方形の与えられた模擬覆域を対角線で
2分割し、2つの直角二等辺三角形で模擬される地形を
近似し、各直角二等辺三角形と模擬される地形面との近
似誤差eを、その三角形から前記模擬する地形面までの
最大距離をδとしその三角形の各辺に外接してその辺を
斜辺とする直角二等辺三角形の外接三角形誤差をそれぞ
れε1,ε2,ε3とするとき(外接三角形誤差εiは、そ
の三角形から地形面までの最大距離δi並びにその三角
形の直角を挟む辺に外接する二等辺三角形の外接三角形
誤差εi1及びεi2の内の最大値とする)、δ,ε1,ε2
及びε3の内の最大値とし、その三角形で模擬される地
形を近似した場合の近似誤差eが指定された許容誤差以
内であれば三角形の分割を終了し、近似誤差eが許容誤
差以内でなければ当該三角形を2つの直角二等辺三角形
に分割し分割後の三角形について近似誤差eが許容誤差
以内になるまで分割することにより地形モデルのデータ
を生成し、近似すべき三角形と模擬視界の視点から見た
地形面上方の物体との関係において、物体が三角形の内
部に完全に含まれる場合は、三角形に物体へのポインタ
を書き込み、その三角形上方に複数個の物体が存在する
場合は、その全て物体をチェーンで結ぶか、又は当該三
角形を更に分割して一つの三角形には一つの物体しか含
まないようにして三角形に物体へのポインタを書き込
み、物体が二つ以上の三角形にまたがっている場合は、
物体がかかっている三角形全てに、その物体を指すポイ
ンタを書き込み、当該物体には表示済みであるか否かの
フラグを用意し、前記分割したそれぞれの直角二等辺三
角形の近似誤差を分割による二進木のノードに対応させ
ておき、模擬視界中の仮定する視点に対して、二進木の
ルートから始めてその子ノードを視点に近い方の子ノー
ドから順番に近似誤差を得て、見込み角誤差を近似誤差
を視点から当該三角形までの距離で割った値とし、見込
み角誤差が所定の見込み角許容誤差以内になるまで順次
子ノードについて見込み角誤差の計算をしてその許容誤
差以内になった三角形についての地形データを用いて模
擬視界発生表示処理するに際し、当該終端の三角形上に
物体が存在し表示済みフラグがリセットしているときは
視点に近い順から物体を表示し表示済みフラグをセット
して、三角形内の物体全てを表示した後、当該三角形を
表示するようにしたものである。
A method for creating and displaying a terrain model including an object to solve the above-mentioned problem is described in a terrain modeling relating to generation of a simulated view using a computer. The area is divided into two by a diagonal line, the terrain simulated by two right-angled isosceles triangles is approximated, and the approximation error e between each right-angled isosceles triangle and the simulated terrain surface is calculated from the triangle to the simulated terrain surface. Is the maximum distance of δ, and the circumscribed triangle errors of a right-angled isosceles triangle circumscribing each side of the triangle and the hypotenuse are ε1, ε2, and ε3, respectively (the circumscribed triangle error εi Δ1, ε1, ε2, the maximum distance to the surface δi and the circumscribed triangle errors εi1 and εi2 of the isosceles triangle circumscribing the sides of the triangle.
If the approximation error e when approximating the terrain simulated by the triangle is within the specified tolerance, the division of the triangle is terminated and the approximation error e must be within the tolerance. For example, the triangle is divided into two right-angled isosceles triangles, and the divided triangles are divided until the approximation error e is within an allowable error, thereby generating terrain model data. In relation to the object above the terrain surface, if the object is completely contained within the triangle, write a pointer to the object in the triangle, and if there are multiple objects above the triangle, Connect the objects with a chain or divide the triangle further so that one triangle contains only one object and write a pointer to the object in the triangle, and If you are across the square,
A pointer pointing to the object is written in all the triangles on which the object is hung, a flag indicating whether or not the object has been displayed is prepared, and the approximation error of each of the divided right-angled isosceles triangles is divided into two. For a hypothetical viewpoint in the simulated field of view, an approximation error is obtained for the assumed viewpoint in the simulated field of view, starting from the root of the binary tree and descending from the child node closer to the viewpoint in order. Is the value obtained by dividing the approximation error by the distance from the viewpoint to the triangle, and successively calculating the prospective angle error for the child nodes until the prospective angle error is within a predetermined prospective angle tolerance, and within the tolerance. When performing a simulated view generation and display process using the terrain data for a triangle, when an object is present on the terminal triangle and the displayed flag is reset, It sets the display flag to display the body, after displaying all objects in a triangle, in which so as to display the triangle.

【0010】[0010]

【作用】分割した直角二等辺三角形の近似誤差を、その
三角形自身のものだけでなくその三角形の各辺に外接し
てその辺を斜辺とする直角二等辺三角形におけるものま
でを再帰的に対象とし、それらに接する三角形の近似誤
差はそれら以下になることが保証され、許容誤差以内で
最少限の三角形数で地形をモデリングする。
[Function] The approximation error of the divided right-angled isosceles triangle is recursively targeted not only for the triangle itself but also for a right-angled isosceles triangle that circumscribes each side of the triangle and sets the side as the hypotenuse. The approximation error of the triangles in contact with them is guaranteed to be less than them, and the terrain is modeled with the minimum number of triangles within the tolerance.

【0011】地形の上にある物体がどの三角形の上にあ
るか調べ、その三角形と物体との位置関係により、次の
処理を行なう。
[0011] It is checked which triangle the object on the terrain is on, and the following processing is performed according to the positional relationship between the triangle and the object.

【0012】(a)物体が三角形の内部に完全に含まれ
る場合:三角形に物体へのポインタを書き込み、三角形
と物体とを関連付けておく。その三角形に複数個の物体
が存在する場合は、全ての物体をチェーンで結んでおく
か、又は三角形を更に分割して一つの三角形には一個の
物体しか含まないようにしてから上記ポインタへの書き
込みを行なう。
(A) When the object is completely contained inside the triangle: A pointer to the object is written in the triangle, and the triangle is associated with the object. If there are multiple objects in the triangle, connect all the objects with a chain, or divide the triangle further so that one triangle contains only one object, and then Write.

【0013】(b)物体が二つ以上の三角形にまたがっ
ている場合:物体がかかっている三角形全てに、その物
体を指すポインタを書き込む。
(B) When the object straddles two or more triangles: A pointer pointing to the object is written in all the triangles on which the object spans.

【0014】さらに、三角形の表示に際しては、分割し
た三角形の近似誤差を分割による二進木のノードに対応
させておき、模擬視界中の仮定する視点に対して、二進
木のルートから始めてその子ノードを視点に近い方のノ
ードから順番に近似誤差を得て、見込み角誤差が所定の
見込み角許容誤差以内になるまで順次子ノードについて
見込み角誤差の計算をしておく。所定の見込み角許容誤
差以内でそれに一番近い三角形を視点に近い方のノード
から選択して表示する。物体には表示済みかどうかを示
すフラグが用意されていて、その三角形の上に物体が存
在する場合は、先に物体の表示済みフラグを調べ、フラ
グがリセットされていたらその物体を表示し、表示済み
フラグをセットしてから、三角形を表示する。一つの三
角形上に複数個の物体が存在する場合は視点に近い方か
ら順に表示する。
Further, when displaying a triangle, an approximation error of the divided triangle is made to correspond to a node of the binary tree obtained by the division. The approximation error is obtained in order from the node closer to the viewpoint, and the calculation of the prospective angle error is sequentially performed on the child nodes until the prospective angle error falls within a predetermined prospective angle allowable error. A triangle closest to the viewpoint within a predetermined permissible angle tolerance is selected and displayed from a node closer to the viewpoint. The object has a flag indicating whether it has been displayed or not, and if the object exists on the triangle, the displayed flag of the object is checked first, and if the flag is reset, the object is displayed, Set the displayed flag and display the triangle. When a plurality of objects exist on one triangle, the objects are displayed in order from the one closer to the viewpoint.

【0015】[0015]

【実施例】以下、この発明の一実施例を図について説明
する。図4(a)は、地形モデルを生成する処理のフロ
ーチャートである。与えられた正方形のモデリング地域
又はそれを格子状に分割したブロック(模擬覆域)を対
角線により2分割し、2つの直角二等辺三角形で地形を
近似する。ステップP11は、与えられた三角形(図
5)の、地形に対する近似誤差を計算する工程であり、
斜辺を共有する三角形の近似誤差の最大値をその三角形
の近似誤差eとする。ステップP12はその近似誤差e
を対応するノード(図5の丸印で示す)に書き込む工
程、ステップP13は近似誤差eを評価し、許容誤差以
内であればそのノードに対する処理を終了する段階、ス
テップP14は近似誤差eが許容誤差以内でない場合
に、当該三角形を二分割する工程、ステップP15は分
割によって出来た二つの子三角形のうち、一方例えば左
側の子三角形を再帰的に処理するすなわち上記したステ
ップP11からステップP13又は場合によりステップ
P14と同様の処理をする工程、ステップP16は他方
例えば右側の子三角形を再帰的に処理する工程を表わ
す。ここで、三角形は頂点を反時計方向に回るものと
し、その斜辺のみを記して直角二等辺三角形で表わすも
のとする。例えば図5(a)についての三角形は、(R
1,R2)であり、それを分割した左側の子三角形は
(RR,R1)であり、右側の子三角形は(R2,R
R)である。従って、ep(R1,R2)は図5におけ
る分割前の親三角形(R1,R2)の部分誤差εをい
い、ep(R2,R1)は正方形を対角線で2分割した
ときに出来る前記三角形(R1,R2)と対になるもう
一方の直角二等辺三角形の部分誤差εをいう。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 4A is a flowchart of a process for generating a terrain model. A given square modeling area or a block (simulated coverage area) obtained by dividing the modeling area into a grid is divided into two parts by diagonal lines, and the terrain is approximated by two right-angled isosceles triangles. Step P11 is a step of calculating an approximation error of the given triangle (FIG. 5) with respect to the terrain,
The maximum value of the approximation error of the triangle sharing the hypotenuse is defined as the approximation error e of the triangle. Step P12 is the approximation error e
Is written into a corresponding node (indicated by a circle in FIG. 5), a step P13 evaluates the approximation error e, and if the error is within an allowable error, the process for the node is terminated. If the error is not within the error, a step of dividing the triangle into two, step P15 is to recursively process one of the two child triangles formed by the division, for example, the left child triangle, that is, step P11 to step P13 or , And step P16 represents a step of recursively processing, for example, the right child triangle. Here, it is assumed that the triangle turns its vertex in a counterclockwise direction, and that only its hypotenuse is described to represent a right-angled isosceles triangle. For example, the triangle in FIG.
1, R2), and the left child triangle obtained by dividing it is (RR, R1), and the right child triangle is (R2, R2).
R). Therefore, ep (R1, R2) refers to the partial error ε of the parent triangle (R1, R2) before division in FIG. 5, and ep (R2, R1) refers to the triangle (R1) formed when the square is divided into two diagonal lines. , R2) is the partial error ε of the other right-angled isosceles triangle.

【0016】各直角二等辺三角形の部分誤差は、それ自
身の面と近似される地形面との距離(誤差)δ、その三
角形の直角を挟む各辺に外接してその辺を斜辺とする各
直角二等辺三角形の各部分誤差ε1,ε2との内最大値と
定義する。そして、直角二等辺三角形の近似誤差は、斜
辺を共有する2つの直角二等辺三角形の上記部分誤差の
内の最大値と定義する。
The partial error of each right-angled isosceles triangle is the distance (error) δ between its own surface and the approximated terrain surface, and It is defined as the maximum value among the partial errors ε1, ε2 of the right-angled isosceles triangle. The approximation error of the right-angled isosceles triangle is defined as the maximum value of the partial errors of the two right-angled isosceles triangles sharing the hypotenuse.

【0017】図4(b)は図4(a)におけるステップ
P11の近似誤差計算のための各三角形の近似誤差を計
算するフローチャートである。図において、ステップP
20は、当該三角形が末端の三角形かどうかを判定する
工程、ここで末端でないときはステップP21に行き、
ステップP21は、当該三角形が直接覆う地形と当該三
角形との近似誤差e1を計算する工程、ステップP22
は当該三角形の直角を挟む一方の辺に外接する三角形と
それに外接する一群の三角形の近似誤差e2を計算する
工程、ステップP23は前記当該三角形の直角を挟む他
方の辺に外接する三角形とそれに接する一群の三角形の
近似誤差e3を計算する工程、ステップP24はステッ
プP21からP23で計算したe1,e2,e3の最大
値を当該三角形の近似誤差とする工程を表わす。ステッ
プP25は三角形が末端のときの誤差を0とする工程で
ある。今対象としている三角形をR1,R2,R3とし
たときの誤差を評価する三角形の集合を図5(b)に示
す。これらの計算は、予めコンピュータグラフィックの
模擬視界発生の運用前にオフラインで行っておき、メモ
リに格納しておく。
FIG. 4B is a flowchart for calculating the approximate error of each triangle for calculating the approximate error in step P11 in FIG. 4A. In the figure, step P
20 is a step of judging whether or not the triangle is a terminal triangle, and if not, go to Step P21;
Step P21 is a step of calculating an approximation error e1 between the terrain directly covered by the triangle and the triangle, and Step P22.
Is a step of calculating an approximation error e2 of a triangle circumscribing one side of the triangle at a right angle and a group of triangles circumscribing the triangle. Step P23 is in contact with a triangle circumscribing the other side of the triangle at a right angle. A step of calculating an approximation error e3 of a group of triangles, and step P24 represents a step of setting the maximum value of e1, e2, and e3 calculated in steps P21 to P23 as an approximation error of the triangle. Step P25 is a step of setting the error when the triangle is at the end to 0. FIG. 5B shows a set of triangles for evaluating an error when the target triangle is R1, R2, and R3. These calculations are performed in advance off-line before operation of generating a simulated view of computer graphics, and stored in a memory.

【0018】図6は前記地形モデル生成フローチャート
による処理で生成される地形モデルの二進木である。図
6(a)において、ノードN1はルートのノードであっ
て、モデル化すべき正方形の地域ABCD(図6
(b))を、ノードN2は対角線ACにより地域ABC
Dを二分割して出来る直角二等辺三角形のうち左側の三
角形ACDを、ノードN3は対角線ACの右側の三角形
を表わす。
FIG. 6 shows a binary tree of the terrain model generated by the processing according to the terrain model generation flowchart. In FIG. 6A, a node N1 is a root node, and a square area ABCD to be modeled (FIG.
(B)), the node N2 is connected to the area ABC by a diagonal line AC.
Of the right-angled isosceles triangles formed by dividing D into two, the left triangle ACD and the node N3 represent the right triangle of the diagonal line AC.

【0019】以下、図6(c)に示すように、一般にノ
ードNiは直角二等辺三角形(R1,R2)を表わし
(図6(d))、ノードNi+1はRRからR1R2に
下ろした垂線により三角形(R1,R2)を二分割して
出来る直角三角形のうち左側の三角形(RR,R1)
を、ノート゛Ni+2は右側の三角形(R2,RR)を
表わす。
Hereinafter, as shown in FIG. 6C, the node Ni generally represents a right-angled isosceles triangle (R1, R2) (FIG. 6D), and the node Ni + 1 is formed by a perpendicular drawn from RR to R1R2. Left triangle (RR, R1) among right-angled triangles formed by dividing (R1, R2) into two
And the note @ Ni + 2 represents the right triangle (R2, RR).

【0020】各ノードに付属する誤差はそのノードが表
わす三角形とその三角形の辺に接する三角形群が地形を
近似したときの誤差を表わす。
The error attached to each node indicates an error when the triangle represented by the node and a group of triangles in contact with the sides of the triangle approximate the terrain.

【0021】図7は地形モデルを表示する処理を表わす
フローチャートである。図において、ステップP31は
与えられた三角形の見込み角誤差を計算する工程であ
る。ここで、見込み角誤差は、近似誤差を視点から三角
形までの距離rで割った値として定義される。ステップ
P32は見込み角誤差を評価する工程である。見込み角
誤差を計算するのは、仮定する空間内の視点が移動する
ときに、視点から観察できる地形面の近似誤差が視点か
ら三角形までの距離rに反比例して変化すべきであると
の理由からである。ステップP33は見込み角誤差が許
容誤差以内の場合に三角形を表示する工程、ステップP
34は見込み角誤差が許容誤差以内でない場合、当該三
角形までの距離rが遷移ゾーン(図8)内であるかどう
か判定する工程である。遷移ゾーンは、図8においてβ
Rth≦r<Rthの範囲内にある区域である。ただし、R
thはしきい値距離であり、
FIG. 7 is a flowchart showing a process for displaying a terrain model. In the figure, step P31 is a step of calculating a prospective angle error of a given triangle. Here, the estimated angle error is defined as a value obtained by dividing the approximation error by the distance r from the viewpoint to the triangle. Step P32 is a step of evaluating the estimated angle error. The reason for calculating the perspective angle error is that when the viewpoint in the assumed space moves, the approximation error of the terrain surface that can be observed from the viewpoint should change in inverse proportion to the distance r from the viewpoint to the triangle. Because. Step P33 is a step of displaying a triangle when the estimated angle error is within the allowable error.
34 is a step of determining whether or not the distance r to the triangle is within the transition zone (FIG. 8) when the expected angle error is not within the allowable error. The transition zone is denoted by β in FIG.
It is an area in the range of Rth ≦ r <Rth. Where R
th is the threshold distance,

【0022】Rth=e(R1,R2)/θRth = e (R1, R2) / θ

【0023】と表わされ、e(R1,R2)は当該三角
形の近似誤差、θは許容見込み角誤差である。ステップ
P35は、遷移ゾーン内の場合、三角形を式(1)に従
って補正する工程である。すなわち、
Where e (R1, R2) is the approximation error of the triangle and θ is the allowable expected angle error. Step P35 is a step of correcting the triangle in accordance with the equation (1) when it is within the transition zone. That is,

【0024】[0024]

【数1】 (Equation 1)

【0025】である。例えば、《Ri》は3次元のベク
トルを表わし、地表上の点《Ri》=(xi,yi
i)である。なお、この明細書においてベクトル表記
を《 》を用いた場合と、肉太の場合とで併用して表わ
す。《ri》は2次元のベクトルを表わし、地表上の点
を水平面に垂直に投影した点、《ri》=(xi,yi
である。h(《ri》)は、位置ri(《ri》)におけ
る標高であり、h(《ri》)=ziである。この補正
は、遷移ゾーン内の場合、ステップP34において見込
み角が許容誤差以内でないために、地形面の詳細度を切
り替える時にその切り替えが不連続にならないようにす
るため行うものであり、視点から当該三角形までの距離
rに応じた補正率α(0<α<1;α=(r−βRth)
/(Rth−βRth))が定義される。この補正の様子を
図9(a),(b)の斜視図に示す。図9(a)は親三
角形、図9(b)は子三角形を示す。補正率αは、遷移
ゾーン内で視点から三角形までの距離rが大きいほど大
であるから、視点が三角形に対し遠くから近づいてしき
い値距離Rth以内に入ってからしばらくの間すなわち遷
移ゾーン内にある間は、詳細度が切り替っても、しばら
くは親三角形に近づけてあり地形の不連続な変化を感じ
させない。
## EQU1 ## For example, "Ri" represents the three-dimensional vector, a point on the ground "Ri" = (x i, y i,
z i ). Note that, in this specification, vector notation is used in both cases where <<>> is used and when it is thick. "R i" represents a two-dimensional vector, a point obtained by projecting perpendicularly the point on the earth's surface to the horizontal surface, "r i" = (x i, y i)
It is. h ( "r i") is an elevation in the position r i ( "r i") , h ( "r i") is a = zi. This correction is performed in order to prevent discontinuity when switching the degree of detail of the terrain surface because the estimated angle is not within the allowable error in step P34 in the transition zone. Correction rate α (0 <α <1; α = (r−βRth) according to distance r to triangle
/ (Rth-βRth)) is defined. The state of this correction is shown in the perspective views of FIGS. 9 (a) and 9 (b). FIG. 9A shows a parent triangle, and FIG. 9B shows a child triangle. The correction rate α is larger as the distance r from the viewpoint to the triangle in the transition zone is larger, so for a while after the viewpoint is closer to the triangle and within the threshold distance Rth, that is, in the transition zone, While in, even if the degree of detail is switched, it is close to the parent triangle for a while and does not feel discontinuous change in terrain.

【0026】ステップP36は当該三角形を二等分して
出来る子三角形のうち視点がどちら側にあるか判定する
工程、ステップP37は視点が左子ノード(三角形)側
にある場合に、左子ノードを再帰的に処理する工程、ス
テップP38は視点が同じく左子ノード側にある場合
に、ステップP37に続いて右子ノードを再帰的に処理
する工程、ステップP39は視点が右子ノード側にある
場合に、右子ノードを再帰的に処理する工程、ステップ
P310は視点が同じく右子ノード側にある場合に、ス
テップP39に続いて左子ノードを再帰的に処理する工
程を示す。
Step P36 is a step of determining which side is the viewpoint among the child triangles obtained by bisecting the triangle. Step P37 is a step of determining whether the viewpoint is on the left child node (triangle) side. Step P38 is a step of recursively processing the right child node following step P37 if the viewpoint is also on the left child node side, and step P39 is a viewpoint being on the right child node side. In this case, the step of recursively processing the right child node, step P310 shows the step of recursively processing the left child node following step P39 when the viewpoint is also on the right child node side.

【0027】この発明は、上記地形モデルの作成及び表
示方法において、地表に物体が配置された状態をモデル
化し表示するものである。図1(a)はモデル化した地
形と物体との状態を説明する平面図、図1(b)は物体
を含む地形をモデルするデータ構造図である。地形を表
わす二進木は上述したように発生する。図1において、
四角形U,V,W,Xは物体を表わし、複数の物体U,
Vは同一の三角形DAEに含まれ、その三角形DAEに
対応するノードに物体Uのポインタを書き込み、更に物
体Uに物体Vをチェーンで結んでいる。物体Wは三角形
CDEの内部に完全に含まれる場合を示しており、物体
Wはポインタで結びつけられている。また、物体Xは三
角形CEGと三角形GEHとの二つの三角形にまたがっ
ていて、両方の三角形に物体Xを指すポインタを書き込
む。なお、複数三角形にまたがる物体には表示済みであ
るか否かのフラグが用意されている。
According to the present invention, in the above-described method for creating and displaying a terrain model, a state in which an object is arranged on the ground surface is modeled and displayed. FIG. 1A is a plan view illustrating the state of a modeled terrain and an object, and FIG. 1B is a data structure diagram for modeling the terrain including the object. The binary tree representing the terrain is generated as described above. In FIG.
Squares U, V, W, and X represent objects, and a plurality of objects U,
V is included in the same triangle DAE, a pointer of the object U is written in a node corresponding to the triangle DAE, and the object V is connected to the object U by a chain. The case where the object W is completely included inside the triangle CDE is shown, and the object W is connected by a pointer. Further, the object X extends over two triangles, the triangle CEG and the triangle GEH, and a pointer pointing to the object X is written in both triangles. It should be noted that a flag is provided for an object that spans a plurality of triangles, indicating whether the object has already been displayed.

【0028】図2は物体と地形を表わす三角形をポイン
タで関連付ける処理フロー、すなわち、上述した分割よ
り得られる三角形の地形モデルに物体を配置する処理フ
ローである。allocateというルーチンは、物体
(obj)の情報を持ってノードを再帰的に処理する。
objは物体の位置及び大きさを表わす情報、node
は地形モデルのノードを表わす情報である。S(1)は
ノードが終端の三角形を表わすかどうか調べる段階、S
(2)はノードが終端の三角形の場合、三角形と物体を
ポインタでリンクする段階、S(3)はノードが終端の
三角形でない場合、物体が左右どちらの三角形上にある
かを調べる段階、S(4)は物体が完全に左側の三角形
上にある場合左側のノードを処理する段階、S(5)は
物体が完全に右側の三角形上にある場合右側のノードを
処理する段階、S(6),S(7)は物体が左右の三角
形にまたがる場合、両方のノードの処理をする段階を表
わす。
FIG. 2 is a processing flow for associating an object with a triangle representing the terrain by a pointer, that is, a processing flow for arranging an object in a triangle terrain model obtained by the above-described division. A routine called "allocate" processes nodes recursively with information on an object (obj).
obj is information indicating the position and size of the object, node
Is information representing a node of the terrain model. S (1) is a step for checking whether a node represents a terminal triangle, S
(2) a step of linking the triangle and the object by a pointer when the node is a terminal triangle, and a step of checking whether the object is on the left or right triangle when the node is not the terminal triangle, S (3) (4) processing the left node if the object is completely on the left triangle; S (5) processing the right node if the object is completely on the right triangle; S (6) ), S (7) represent the steps of processing both nodes when the object straddles the left and right triangles.

【0029】図3は図1で表わされた物体を含む地形を
表示する処理フローである。ノードを再帰的に処理し、
終端の三角形に達したら、その上の物体のうち表示済み
フラグがセットされていない物体について視点に近い順
に表示し、表示済みフラグをセットしてから三角形を処
理する。T(1)はノードが終端の三角形か又は見込み
角誤差が十分小さい三角形を表わすノードかどうかを調
べる段階、T(2)はノードが終端を表わす三角形の場
合、その三角形上に存在する物体を視点に近い順にソー
トする段階、T(3)は物体の表示済みフラグを調べフ
ラグがセットされていない物体を表示する段階、T
(4)は表示済みフラグをセットする段階、T(5)は
三角形を表示する段階、T(6)はノードが終端の三角
形でない場合、視点が左右どちらの三角形上にあるかを
調べる段階、T(7)は視点が左側の三角形上にある場
合、左側のノードを処理する段階、T(8)は視点が右
側の三角形上にある場合、右側のノードを処理する段階
である。
FIG. 3 is a processing flow for displaying the terrain including the object shown in FIG. Process nodes recursively,
When the terminal triangle is reached, the objects on which the displayed flag is not set are displayed in order from the viewpoint closest to the viewpoint, and the triangle is processed after the displayed flag is set. T (1) is a step of checking whether the node is a terminal triangle or a node representing a triangle having a sufficiently small angle error. If the node is a triangle representing a terminal, T (2) finds an object existing on the triangle. T (3) is a step of examining the displayed flag of the object and displaying an object for which the flag is not set;
(4) setting a displayed flag, T (5) displaying a triangle, T (6) checking if the viewpoint is on the left or right triangle if the node is not the terminal triangle, T (7) is a step of processing the left node when the viewpoint is on the left triangle, and T (8) is a step of processing the right node when the viewpoint is on the right triangle.

【0030】図10は上記の方法に使用する装置のブロ
ック図である。この装置では視覚対象物を多角形、多角
面(ポリゴン)及び光点の組合わせとして数値モデル化
して模擬する。図10において、視界計算装置101
は、仮定された三次元の情景に含まれる全ての視覚対象
物の位置、面を構成する頂点の位置、色彩等の情報を記
憶する。たとえば飛行機シミュレータの場合、飛行機の
方向、高さ、パイロットの視点位置等の視点情報にした
がって、その視界内の視覚対象物を選択し、後述する幾
何計算装置に送ることおよび幾何計算装置で用いる座標
変換のためのマトリクスの計算を行なう。また、オフラ
インでデータベース生成装置1011によりデータベー
スの作成すなわち上記方法により作成される地形モデル
及び3次元物体のデータを作成してメモリ1012に格
納しておく。視点の変化による地形や物体の見え方の変
化に対応するためメモリから地形モデルデータ及び物体
データを読出す。
FIG. 10 is a block diagram of an apparatus used in the above method. In this device, a visual object is simulated by numerical modeling as a combination of a polygon, a polygonal surface (polygon), and a light spot. In FIG. 10, the visibility calculation device 101
Stores information such as the positions of all visual objects included in the assumed three-dimensional scene, the positions of vertices constituting a surface, colors, and the like. For example, in the case of an airplane simulator, a visual object in the field of view is selected according to viewpoint information such as the direction, height of the airplane, and the viewpoint position of a pilot, and is sent to a geometry calculation device described later, and coordinates used by the geometry calculation device are used. Calculate matrix for conversion. In addition, a database is created offline by the database generation apparatus 1011, that is, data of the terrain model and the three-dimensional object created by the above method are created and stored in the memory 1012. The terrain model data and the object data are read from the memory in order to cope with the change of the terrain and the appearance of the object due to the change of the viewpoint.

【0031】幾何計算装置102は視界計算装置101
から送られた視覚対象物に対して視点との位置関係にし
たがって視点に近い順に優先順位を付す。その視覚対象
物の、指定された視点から見た透視図の計算、指定され
た光源で照らされたときの各面の明るさ、かすみ具合の
計算、等の幾何計算を行なう。さらに、光点に関する座
標変換、透視変換、交点輝度の計算などを行い、結果を
優先順位と共に後述するビデオ信号発生装置に出力す
る。また、テクスチャ・パターンをポリゴンにマッピン
グするための座標変換などのパラメータを計算し、ビデ
オ信号発生回路に転送する。さらに、幾何計算装置10
2は、視界計算装置101から読出された地形データに
ついて三角形が所定の許容誤差のものであるかを判断
し、許容誤差内でありさらに補正が必要ならば上記方法
により補正をする。
The geometric calculator 102 is a view calculator 101
Priorities are assigned to the visual objects sent from the order from the viewpoint in accordance with the positional relationship with the viewpoint. Geometric calculations such as calculation of a perspective view of the visual object from a specified viewpoint, calculation of the brightness of each surface when illuminated by a specified light source, and calculation of haze are performed. Further, coordinate conversion, perspective conversion, intersection luminance calculation, and the like for the light point are performed, and the result is output to a video signal generator described later together with the priority. Also, parameters such as coordinate transformation for mapping the texture pattern to the polygon are calculated and transferred to the video signal generation circuit. Further, the geometric calculation device 10
2 judges whether the triangle of the terrain data read from the visibility calculation device 101 has a predetermined allowable error, and if the triangle is within the allowable error and further correction is necessary, the correction is performed by the above method.

【0032】ビデオ信号発生装置103は幾何計算装置
102から出力される信号を基に走査線とエッジの交点
の位置、交点における明るさ及びかすみ具合(フェー
ド)、明るさ及びフェードの計算、並びに隠面消去を行
い、ビデオ信号を発生し、表示装置104でこれをカラ
ー表示する。
The video signal generator 103 calculates the position of the intersection of the scanning line and the edge, the brightness and haze (fade) at the intersection, the calculation of the brightness and fade, and the hidden based on the signal output from the geometric calculator 102. The surface is erased, a video signal is generated, and the video signal is displayed on the display device 104 in color.

【0033】[0033]

【発明の効果】以上のように、この発明によれば、BS
P方式においてセパレート・プレーン上にある物件につ
いても優先度付けが可能となり、画素毎の奥行きの計
算、比較が不要となり処理効率が格段に向上する。
As described above, according to the present invention, BS
In the P method, priorities can be assigned to properties on a separate plane, and calculation and comparison of the depth for each pixel are not required, and processing efficiency is significantly improved.

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

【図1】物体を含む地形をモデル化するデータ構造を説
明する図である。
FIG. 1 is a diagram illustrating a data structure for modeling a terrain including an object.

【図2】物体を地形モデルと関連づける処理フローを表
わす図である。
FIG. 2 is a diagram illustrating a processing flow for associating an object with a terrain model.

【図3】図1で表わされた物体を含む地形を表示する処
理フローを示す図である。
FIG. 3 is a diagram showing a processing flow for displaying a terrain including the object shown in FIG. 1;

【図4】地形モデルを生成する処理のフローチャート、
与えられた三角形を説明する図、その三角形の近似誤差
を説明するフローチャートである。
FIG. 4 is a flowchart of processing for generating a terrain model,
FIG. 4 is a diagram illustrating a given triangle and a flowchart illustrating an approximation error of the triangle.

【図5】与えられた三角形を説明する図である。FIG. 5 is a diagram illustrating a given triangle.

【図6】地形モデル生成フローチャートによる処理で生
成される地形モデルの二進木である。
FIG. 6 is a binary tree of a terrain model generated by a process according to a terrain model generation flowchart.

【図7】地形モデルを表示する処理を表わすフローチャ
ートである。
FIG. 7 is a flowchart illustrating a process of displaying a terrain model.

【図8】遷移ゾーンを説明する図である。FIG. 8 is a diagram illustrating a transition zone.

【図9】遷移ゾーンにおける補正を説明する斜視図であ
る。同図(a)は親三角形、同図(b)は子三角形を示
す。
FIG. 9 is a perspective view illustrating correction in a transition zone. FIG. 3A shows a parent triangle, and FIG. 3B shows a child triangle.

【図10】この発明の方法に使用する装置のブロック図
である。
FIG. 10 is a block diagram of an apparatus used in the method of the present invention.

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

101 視界計算装置 102 幾何計算装置 103 ビデオ信号発生装置 104 表示装置 Reference Signs List 101 View calculation device 102 Geometric calculation device 103 Video signal generation device 104 Display device

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−75682(JP,A) 特表 平4−500878(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 17/50 G06T 15/00 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-3-75682 (JP, A) JP-A-4-500878 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06T 17/50 G06T 15/00 JICST file (JOIS)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 コンピュータを用いた模擬視界発生に関
する地形のモデリングにおいて、 (a)正方形の与えられた模擬覆域を対角線で2分割
し、2つの直角二等辺三角形で模擬される地形を近似
し、各直角二等辺三角形と模擬される地形面との近似誤
差eを、その三角形から前記模擬する地形面までの最大
距離をδとしその三角形の各辺に外接してその辺を斜辺
とする直角二等辺三角形の部分誤差をそれぞれε1,ε
2,ε3とするとき(直角二等辺三角形の部分誤差εi
は、その三角形から地形面までの最大距離δi並びにそ
の三角形の直角を挟む辺に外接する二等辺三角形の部分
誤差εi1及びεi2の内の最大値とする)、δ,ε1,ε2
及びε3の内の最大値とし、その三角形で模擬される
形を近似した場合の近似誤差eが指定された許容誤差以
内であれば三角形の分割を終了し、近似誤差eが許容誤
差以内でなければ当該三角形を2つの直角二等辺三角形
に分割し分割後の三角形について近似誤差eが許容誤差
以内になるまで分割することにより地形モデルのデータ
を生成し、 (b)近似すべき三角形と模擬視界の視点から見た地形
面上方の物体との関係において、 (b1−1)物体が三角形の内部に完全に含まれる場合
は、三角形に物体へのポインタを書き込み、 (b1−2)その三角形上方に複数個の物体が存在する
場合は、その全て物体をチェーンで結ぶか、又は当該三
角形を更に分割して一つの三角形には一つの物体しか含
まないようにして三角形に物体へのポインタを書き込
み、 (b2)物体が二つ以上の三角形にまたがっている場合
は、物体がかかっている三角形全てに、その物体を指す
ポインタを書き込み、当該物体には表示済みであるか否
かのフラグを用意し、 (c)前記分割したそれぞれの直角二等辺三角形の近似
誤差を分割による二進木のノードに対応させておき、模
擬視界中の仮定する視点に対して、二進木のルートから
始めてその子ノードを視点に近い方の子ノードから順番
に近似誤差を得て、見込み角誤差を近似誤差を視点から
当該三角形までの距離で割った値とし、見込み角誤差が
所定の見込み角許容誤差以内になるまで順次子ノードに
ついて見込み角誤差の計算をしてその終端の三角形につ
いての地形データを用いて模擬視界発生表示処理するに
際し、当該終端の三角形上に物体が存在し表示済みフラ
グがリセットしているときは視点に近い順から物体を表
示し、三角形内の物体全てを表示した後表示済みフラグ
をセットして、当該三角形を表示することを特徴とする
物体を含む地形モデルの作成及び表示の方法
In the modeling of terrain relating to the generation of a simulated field of view using a computer , (a) a simulated area covered by a square is divided into two by a diagonal line, and the terrain simulated by two right-angled isosceles triangles is approximated. Approximate error e between each right-angled isosceles triangle and the terrain surface to be simulated is defined as the maximum distance from the triangle to the simulated terrain surface as δ, a right angle circumscribing each side of the triangle and defining that side as the hypotenuse. Let the partial errors of the isosceles triangle be ε1 and ε, respectively.
2, ε3 (partial error εi of a right-angled isosceles triangle
Is the maximum value of the maximum distance δi from the triangle to the terrain surface and the partial errors εi1 and εi2 of the isosceles triangle circumscribing the right and left sides of the triangle), δ, ε1, ε2
If the approximation error e when approximating the shape simulated by the triangle is within the specified tolerance, the division of the triangle is terminated, and the approximation error e becomes data of terrain model by splitting the triangles after if not within tolerance divides the triangle into two right-angled isosceles triangle divided up approximation error e is within the tolerance
Generate, (b) in relation to the triangle to be approximated to the simulated view viewpoint terrain surface above the object as seen in, (b1-1) if the object is completely contained in the interior of the triangle, the object to triangles (B1-2) When there are a plurality of objects above the triangle, all the objects are connected by a chain, or the triangle is further divided to form one object in one triangle. (B2) If the object straddles two or more triangles, write a pointer pointing to the object in all the triangles on which the object is placed, and The object is provided with a flag indicating whether or not the object has been displayed. (C) The approximation error of each of the divided right-angled isosceles triangles is made to correspond to the node of the binary tree obtained by the division. For the viewpoint to be determined, starting from the root of the binary tree, obtain the approximation error of the child nodes in order from the child node closer to the viewpoint, and divide the expected angle error by the approximation error divided by the distance from the viewpoint to the triangle. When calculating the prospective angle error for the child nodes sequentially until the prospective angle error falls within the predetermined prospective angle allowable error, and performing the simulated view generation display process using the terrain data for the terminal triangle, the terminal When the object is present on the triangle and the displayed flag is reset, the objects are displayed in order from the viewpoint closest to the viewpoint, after displaying all the objects within the triangle, the displayed flag is set, and the triangle is displayed. A method for creating and displaying a terrain model including an object characterized by the following .
JP27676192A 1992-09-22 1992-09-22 How to create and display terrain models including objects Expired - Fee Related JP3270535B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27676192A JP3270535B2 (en) 1992-09-22 1992-09-22 How to create and display terrain models including objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27676192A JP3270535B2 (en) 1992-09-22 1992-09-22 How to create and display terrain models including objects

Publications (2)

Publication Number Publication Date
JPH06103363A JPH06103363A (en) 1994-04-15
JP3270535B2 true JP3270535B2 (en) 2002-04-02

Family

ID=17573988

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27676192A Expired - Fee Related JP3270535B2 (en) 1992-09-22 1992-09-22 How to create and display terrain models including objects

Country Status (1)

Country Link
JP (1) JP3270535B2 (en)

Also Published As

Publication number Publication date
JPH06103363A (en) 1994-04-15

Similar Documents

Publication Publication Date Title
US5357599A (en) Method and apparatus for rendering polygons
EP0366463B1 (en) Method of shading a graphics image
JPH0757117A (en) Forming method of index to texture map and computer control display system
US20060077208A1 (en) Method of creating texture capable of continuous mapping
JP2008257752A (en) Perspective editing tool to two-dimensional image
KR20060042886A (en) Wrap deformation using subdivision surfaces
US20040169649A1 (en) Method, apparatus, storage medium, program, and program product for generating image data of virtual three-dimensional space
CN108154553A (en) The seamless integration method and device of a kind of threedimensional model and monitor video
EP0727764A1 (en) 3D graphics apparatus
US6229548B1 (en) Distorting a two-dimensional image to represent a realistic three-dimensional virtual reality
JP3748451B1 (en) Program, information storage medium, and image generation system
JP3270514B2 (en) A method of creating a terrain model in generating a simulated view, and a method of displaying a terrain model in generating a simulated view.
JP2832463B2 (en) 3D model reconstruction method and display method
JP3270535B2 (en) How to create and display terrain models including objects
JPH0636013A (en) Method and device for generating topographic data
JPH07282292A (en) Texture mapping method and image processor
JPH1125286A (en) Shadowing method
JPH08123835A (en) Shape design support device
JP3261832B2 (en) Image generation device
JP3865427B2 (en) Method for generating and displaying terrain simulation model
JPH01106284A (en) Three-dimensional image display control device
JP2952585B1 (en) Image generation method
AU744983B2 (en) System and computer-implemented method for modeling the three-dimensional shape of an object by shading of two-dimensional image of the object
JP3606222B2 (en) Object image display device
JP3024861B2 (en) Texture generation method and texture generation device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090118

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090118

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100118

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees