JPH09305791A - Device and method for generating three-dimensional image - Google Patents

Device and method for generating three-dimensional image

Info

Publication number
JPH09305791A
JPH09305791A JP8117815A JP11781596A JPH09305791A JP H09305791 A JPH09305791 A JP H09305791A JP 8117815 A JP8117815 A JP 8117815A JP 11781596 A JP11781596 A JP 11781596A JP H09305791 A JPH09305791 A JP H09305791A
Authority
JP
Japan
Prior art keywords
dimensional
order
hidden
parts
viewpoint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8117815A
Other languages
Japanese (ja)
Inventor
Hiroshi Ishii
石井  博
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP8117815A priority Critical patent/JPH09305791A/en
Publication of JPH09305791A publication Critical patent/JPH09305791A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a three-dimensional(3D) image generator with which hidden line/hidden face erasing processing can be performed at high speed in the storage area of small scale. SOLUTION: This 3D image generator has a rendering parameter input means 101 for inputting a rendering parameter containing information specifying a view point position and a glance direction at least, 3D model input means 102 for inputting a 3D model defining a 3D object as the cluster of polygons inside the 3D space, hidden line/hidden face erasing processing means 104 for clustering the polygons consisting of the 3D model into plural parts of groups included in boundary cubes not to be mutually overlapped on the 3D space and for discriminating the order of state of overlapping the respective parts watched from a view point and the order of state of overlapping respective faces inside the parts watched from the view point, and face data output means 107 for projecting the respective constitutive faces onto a 2D plane according to the discriminated order and outputting it as a 2D image.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、3次元物体の2次
元投影画像を生成する立体画像生成装置および生成方法
に関し、特に立体化した文字列の2次元投影画像を生成
する立体画像生成装置および生成方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional image generating apparatus and method for generating a two-dimensional projected image of a three-dimensional object, and more particularly to a three-dimensional image generating apparatus for generating a two-dimensional projected image of a three-dimensional character string. Regarding the generation method.

【0002】[0002]

【従来の技術】一般に、3次元物体の2次元投影画像を
生成する立体画像生成装置では、3次元空間上の物体を
定義するモデリング処理と、定義された3次元物体に彩
色および陰影付け(シェーディング)を行う処理と、物
体の裏側や他の物体のかげになり視点から見えない線
(陰線)または面(陰面)を2次元投影画像上に反映さ
れないようにする陰線または陰面消去処理を施して2次
元平面に投影することで2次元画像を生成するレンダリ
ング処理とが行われる。
2. Description of the Related Art Generally, in a stereoscopic image generating apparatus for generating a two-dimensional projection image of a three-dimensional object, modeling processing for defining an object in a three-dimensional space and coloring and shading (shading) for the defined three-dimensional object are performed. ) And a hidden line or hidden surface erasing process that prevents a line (hidden line) or a surface (hidden face) that is invisible from the viewpoint from the back side of the object or other objects from being reflected on the 2D projection image. Rendering processing is performed to generate a two-dimensional image by projecting onto a three-dimensional plane.

【0003】レンダリング処理における陰線陰面消去処
理は、3次元画像処理の問題の1つとして認識されてお
り、いくつかの実現方法が知られている。
The hidden line hidden surface elimination processing in the rendering processing is recognized as one of the problems of the three-dimensional image processing, and several methods of realizing it are known.

【0004】第1の一般的な処理方法の1つとしてZバ
ッファ法がある。Zバッファ法は、フレームバッファ上
の各画素に対応させて奥行きの情報を記憶するZバッフ
ァを設け、3次元物体の構成面を書き込む際に画素毎に
奥行きの値を計算し、Zバッファの奥行きの値と書き込
もうとしている画素の奥行き値とを比較する方法であ
る。Zバッファの値よりも書き込む画素の方が手前に位
置する場合には、フレームバッファに画素の値を書き込
み、対応するZバッファの値も更新する。一方、Zバッ
ファの値よりも書き込む画素の方が奥に位置する場合
は、フレームバッファへの書き込みおよびZバッファの
更新は行わず、画素の値を破棄する。これにより、3次
元物体の全ての表面の書き込みを終えた時点で、フレー
ムバッファには最も手前に位置する画素の値が記憶され
ることになる。
The Z-buffer method is one of the first general processing methods. The Z-buffer method is provided with a Z-buffer that stores depth information corresponding to each pixel on the frame buffer, calculates a depth value for each pixel when writing a constituent surface of a three-dimensional object, and determines the depth of the Z-buffer. Is compared with the depth value of the pixel to be written. When the pixel to be written is located before the Z buffer value, the pixel value is written to the frame buffer and the corresponding Z buffer value is also updated. On the other hand, if the pixel to be written is located deeper than the Z buffer value, the pixel value is discarded without writing to the frame buffer or updating the Z buffer. As a result, when the writing of all the surfaces of the three-dimensional object is completed, the value of the pixel located closest to the front is stored in the frame buffer.

【0005】第2の方法としてスキャンライン法が知ら
れている。このスキャンライン法では、3次元物体を投
影面と直交する水平面での断面で考える。水平面上では
物体を構成する多角形は線分として示される。さらに、
この水平面上で物体の投影面への投影像を考えると、物
体を構成する多角形は直線上の区間として示される。区
間同士が重なっている場合には、重なり部分を分割して
独立した区間と考える。区間内で対応する元々の3次元
上の多角形の奥行きの順を検査して、一番投影面に近い
多角形を投影像に書き込む。水平面をスクリーンの上か
ら下まで画素の1行分ずつずらして同様の処理を繰り返
すことで、2次元投影像を完成させる。
A scan line method is known as a second method. In this scan line method, a three-dimensional object is considered as a cross section in a horizontal plane orthogonal to the projection plane. On the horizontal plane, the polygons that make up the object are shown as line segments. further,
Considering the projected image of the object on the projection plane on this horizontal plane, the polygons forming the object are shown as straight line sections. When the sections overlap each other, the overlapping section is divided and considered as an independent section. The depth order of the corresponding original three-dimensional polygon in the section is checked, and the polygon closest to the projection plane is written in the projected image. A two-dimensional projection image is completed by shifting the horizontal plane from the top to the bottom of the screen by one row of pixels and repeating the same processing.

【0006】第3の方法として、特開閉5-210745号公報
に開示されている方法がある。位相ソートを効率よく遂
行するために、物体を構成する各多角形に対して着目し
た多角形以外の多角形を、着目した多角形を隠すか否か
で分類し、これをリストにして記憶しておく方法であ
る。この方法では、位相ソートを行う場合には、リスト
を参照することで重なりを生じていない多角形同士の判
定を省くようにしている。
As a third method, there is a method disclosed in Japanese Patent Laid-Open No. 5-210745. In order to perform topological sorting efficiently, polygons other than the focused polygon are classified according to whether or not the focused polygon is hidden for each polygon forming the object, and this is stored as a list. Is a way to keep. In this method, when topological sorting is performed, a list is referred to so as to omit the determination of polygons that do not overlap.

【0007】[0007]

【発明が解決しようとする課題】第1の方法であるZバ
ッファ法においては、奥行き判定を画素単位で行うため
に単純なアルゴリズムで実現できるものの、フレームバ
ッファの他に奥行き値を記憶するZバッファが必要とな
る。Zバッファとしての記憶領域は、出力する2次元画
像の画素数に比例した大きさが必要であり、精細な画像
を出力する場合には多大な記憶領域を必要とするという
問題があった。また、画素単位の奥行き判定処理が必要
なことと、隠れ面部分の画素に対しても一通りの処理を
必要とするため処理時間も膨大となるという問題点があ
った。
In the Z-buffer method, which is the first method, although the depth judgment can be performed in pixel units, it can be realized by a simple algorithm, but in addition to the frame buffer, a Z-buffer that stores depth values is also used. Is required. The storage area as the Z buffer needs to have a size proportional to the number of pixels of the two-dimensional image to be output, and there is a problem that a large storage area is required when outputting a fine image. In addition, there is a problem in that the depth determination process for each pixel is required and the process for the pixels in the hidden surface part is also required, which results in an enormous processing time.

【0008】第2の方法であるスキャンライン法におい
ては、線分単位で奥行き判定を行うことと、線分単位で
ソートした結果に基づいて、最前部に位置するスキャン
ライン上の区間についてしか書き込み処理を行わないた
めにZバッファ法と比べると高速であるものの、この方
法も出力画像のライン数に比例して処理回数が増大する
ことと、スキャンライン上の区間に対応した多角形の並
び替えを行うために記憶領域を必要とするという問題点
があった。また、並び替えのための区間を分割する必要
があるなど処理が複雑であり、処理装置の規模が増大す
るという問題点があった。
In the scan line method, which is the second method, depth determination is performed in line segment units, and based on the result of sorting in line segment units, only the section on the scan line located at the forefront is written. Although it is faster than the Z-buffer method because it does not perform processing, this method also increases the number of processing times in proportion to the number of lines in the output image, and rearranges polygons corresponding to sections on scan lines. There is a problem that a storage area is required to perform the above. Further, there is a problem that the processing is complicated, such as the need to divide the section for rearrangement, and the scale of the processing device increases.

【0009】第3の方法である特開閉5-210745号公報に
開示されている方法においては、面単位で着目して位相
ソートを行うために処理回数は出力画像の大きさには依
存しないが、物体を構成する各多角形に対して他の全て
の多角形との位置関係を検査するために処理時間が長く
なることと、位置関係を検査した結果をそれぞれの面に
対応したリストで記憶するために大きな記憶領域を必要
とするという問題点があった。
In the method disclosed in Japanese Patent Laid-Open No. 5-210745, which is the third method, the number of processings does not depend on the size of the output image because phase sorting is performed by focusing on each surface. , It takes a long processing time to check the positional relationship between each polygon forming the object and all other polygons, and the result of the positional relationship inspection is stored in a list corresponding to each surface. However, there is a problem in that a large storage area is required to do so.

【0010】本発明の目的は、かかる問題点を解決し、
小規模な記憶領域で陰線陰面消去処理を高速に行うこと
のできる立体画像生成装置および立体画像生成方法を提
供することにある。
[0010] An object of the present invention is to solve such problems.
It is an object of the present invention to provide a stereoscopic image generation device and a stereoscopic image generation method capable of performing hidden line hidden surface removal processing at high speed in a small storage area.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するた
め、本発明の立体画像生成装置は、3次元物体の2次元
投影画像を生成する立体画像生成装置において、少なく
とも視点位置と視線の方向とを規定する情報を含んだレ
ンダリングパラメータを入力するレンダリングパラメー
タ入力手段と、前記3次元物体を3次元空間内の多角形
の集合体として定義した立体モデルを入力する立体モデ
ル入力手段と、前記立体モデルを構成する多角形を前記
3次元空間上で互いに重なることのない境界立方体に包
含されるまとまりでグループ分けして複数の部品とし、
視点から見た場合の各部品の重なり具合の序列、および
各部品毎の、視点から見た場合の部品内の各面の重なり
具合の序列を判定する陰線陰面消去処理手段と、前記立
体モデルの各構成面を、前記陰線陰面消去処理手段にて
判定された序列に従って2次元平面に投影して2次元画
像として出力する出力手段と、を有することを特徴とす
る。
In order to achieve the above object, a stereoscopic image generating apparatus of the present invention is a stereoscopic image generating apparatus for generating a two-dimensional projected image of a three-dimensional object, and at least the viewpoint position and the direction of the line of sight. Rendering parameter input means for inputting a rendering parameter including information defining the three-dimensional object, three-dimensional model input means for inputting a three-dimensional model defining the three-dimensional object as a collection of polygons in a three-dimensional space, and the three-dimensional model. The polygons that compose the above are grouped into a plurality of parts by a group included in a boundary cube that does not overlap each other in the three-dimensional space,
A hidden-line hidden surface erasing processing unit that determines the order of the degree of overlap of each part when viewed from the viewpoint, and the order of the degree of overlap of each surface in the part when viewed from the viewpoint of each part, and the three-dimensional model. Output means for projecting each constituent surface onto a two-dimensional plane according to the order determined by the hidden-line hidden surface elimination processing means and outputting it as a two-dimensional image.

【0012】上記の場合、前記陰線陰面消去処理手段
を、前記複数の部品に関し、視点から見た場合の各部品
の陰線陰面が消去されるような部品の重ね書きを行うこ
とができる描画順位を決定する部品描画順位決定手段
と、前記複数の部品毎に、視点から見た場合の部品内の
各面の陰線陰面が消去されるような面の重ね書きを行う
ことができる描画順位を決定する面描画順位決定手段
と、により構成し、前記出力手段が、前記部品描画順位
決定手段および面描画順位決定手段にて決定された部品
および面の描画順位に従って、前記立体モデルの各構成
面を2次元平面に投影するようにしてもよい。
In the above case, the hidden line hidden surface erasing processing means sets the drawing order for the plurality of parts so that the hidden line hidden surface of each part can be overwritten so that the hidden line hidden surface of each part is deleted. A component drawing order determining means for determining and a drawing order capable of performing surface overwriting so that the hidden surface and the hidden surface of each surface in the component viewed from the viewpoint are erased for each of the plurality of components. Surface drawing order determining means, and the output means sets each surface of the three-dimensional model in accordance with the drawing order of the parts and surfaces determined by the part drawing order determining means and the surface drawing order determining means. You may make it project on a three-dimensional plane.

【0013】さらに、前記境界立方体は、前記3次元物
体を空間的な位置関係により複数にグループ分けしたも
のであって、グループ中の全ての多角形を包含し、か
つ、X−Y平面、Y−Z平面、Z−X平面に平行な面で
構成されるものであってもよい。
Further, the boundary cube is one in which the three-dimensional object is divided into a plurality of groups according to a spatial positional relationship, includes all polygons in the group, and includes an XY plane, Y. It may be configured by a plane parallel to the -Z plane or the ZX plane.

【0014】本発明の立体画像生成方法は、3次元物体
を3次元空間内の多角形の集合体として定義した立体モ
デルを基に、前記3次元物体の2次元投影画像を生成す
る立体画像生成方法において、前記立体モデルを構成す
る多角形を、前記3次元空間上で互いに重なることのな
い境界立方体に包含されるまとまりでグループ分けして
複数の部品とし、視点から見た場合の各部品の重なり具
合の序列、および各部品毎の、視点から見た場合の部品
内の各面の重なり具合の序列を判定し、該判定された序
列に従って前記立体モデルの各構成面を2次元平面に投
影することにより前記2次元投影画像を得ることを特徴
とする。
The three-dimensional image generation method of the present invention is a three-dimensional image generation method for generating a two-dimensional projection image of the three-dimensional object based on a three-dimensional model in which the three-dimensional object is defined as an aggregate of polygons in a three-dimensional space. In the method, polygons forming the three-dimensional model are grouped into a plurality of parts which are included in a boundary cube that does not overlap each other in the three-dimensional space, and are divided into a plurality of parts. The order of the degree of overlap and the order of the degree of overlap of each surface in the part when viewed from the viewpoint of each part are determined, and each constituent surface of the three-dimensional model is projected on a two-dimensional plane according to the determined order. The two-dimensional projection image is obtained by performing the above.

【0015】上記の場合、前記複数の部品について、視
点から見た場合の各部品の陰線陰面が消去されるような
部品の重ね書きを行うことができる部品描画順位を求め
てこれを前記部品の序列とし、さらに各部品毎に、視点
から見た場合の部品内の各面の陰線陰面が消去されるよ
うな面の重ね書きを行うことができる面描画順位を求め
てこれを前記部品の各面の序列とし、これら部品描画順
位および面描画順位に従って前記立体モデルの各構成面
を重ね書きすることにより前記2次元投影画像を得るよ
うにしてもよい。
In the above case, regarding the plurality of parts, a part drawing order capable of overwriting the parts such that the hidden surface of each part when viewed from the viewpoint is erased is obtained, and the drawing order of the parts is determined. For each part, the surface drawing order that enables overwriting of the surface so that the hidden surface of each surface in the part when viewed from the viewpoint is erased is calculated for each part The planes may be arranged in order, and the two-dimensional projection images may be obtained by overwriting the constituent planes of the stereo model according to the component drawing order and the plane drawing order.

【0016】さらに、前記境界立方体は、前記3次元物
体を空間的な位置関係によりグループ分けしたものであ
って、グループ中の全ての多角形を包含し、かつ、X−
Y平面、Y−Z平面、Z−X平面に平行な面で構成され
ており、前記部品の重なり具合の序列を、任意の2つの
境界立方体に関して視点から見た場合の重なり具合の序
列をそれぞれの立方体を構成する面の重なり具合を検査
することにより行うようにしてもよい。
Further, the boundary cube is one in which the three-dimensional object is divided into groups according to a spatial positional relationship, and includes all polygons in the group, and X-
It is composed of planes parallel to the Y plane, the YZ plane, and the ZX plane, and the order of the degree of overlap of the parts, and the order of the degree of overlap when viewed from the viewpoint of any two boundary cubes, respectively. It may be performed by inspecting the degree of overlap of the surfaces forming the cube.

【0017】上記の通りの本発明によれば、立体モデル
を複数の部品に分割し、これら部品の重なり具合の序列
と、各部品毎の、部品内の各面の重なり具合の序列とを
判定することによって、立体モデルの各構成面の序列が
判定される。このように、本発明では、面の重なり具合
の序列の判定が部品毎に行われるので、立体モデルの各
構成面1つ1つに対して重なり具合の序列を全て判定し
ていた従来の場合と比べ、序列の判定の回数は大幅に少
なくなり、高速な陰線陰面消去処理が可能になる。
According to the present invention as described above, the three-dimensional model is divided into a plurality of parts, and the order of the degree of overlap of these parts and the order of the degree of overlap of each surface in the part for each part are determined. By doing so, the order of the constituent surfaces of the stereo model is determined. As described above, in the present invention, since the order of the overlapping degree of the surfaces is determined for each part, in the conventional case in which the order of the overlapping degree is determined for each of the constituent surfaces of the three-dimensional model. Compared with the above, the number of times of order determination is significantly reduced, and high-speed hidden line hidden surface removal processing can be performed.

【0018】[0018]

【発明の実施の形態】次に、本発明の実施例について図
面を参照して説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described with reference to the drawings.

【0019】図1は、本発明の一実施例の立体画像生成
装置の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing the schematic arrangement of a stereoscopic image generating apparatus according to an embodiment of the present invention.

【0020】本実施例の立体画像生成装置は、レンダリ
ングパラメータ入力手段101、立体モデル入力手段1
02、立体モデル記憶手段103、陰線陰面消去処理手
段104、面データ出力手段107より構成されてい
る。
The stereoscopic image generating apparatus according to the present embodiment has a rendering parameter input means 101 and a stereo model input means 1.
02, three-dimensional model storage means 103, hidden line hidden surface elimination processing means 104, and surface data output means 107.

【0021】レンダリングパラメータ入力手段101
は、少なくとも視点位置と視線の方向とを規定する情報
を含んだレンダリングパラメータ(ここでは、視点位置
座標および投影面位置)を入力する。
Rendering parameter input means 101
Inputs rendering parameters (here, viewpoint position coordinates and projection plane position) including information that defines at least the viewpoint position and the direction of the line of sight.

【0022】立体モデル入力手段102は、物体を3次
元空間内の多角形の集合体として定義した立体モデルに
関する情報(ここでは、3次元物体の形状および配置)
を入力する。
The three-dimensional model input means 102 is information about a three-dimensional model in which an object is defined as an aggregate of polygons in a three-dimensional space (here, the shape and arrangement of the three-dimensional object).
Enter

【0023】立体モデル記憶手段103は、上記レンダ
リングパラメータ入力手段101および立体モデル入力
手段102からの入力情報を記憶する。この立体モデル
記憶手段103では、詳しくは後述するが、物体を3次
元空間内の多角形の集合体として定義した立体モデル
を、3次元空間上で互いに重なることのない境界立方体
に包含されるまとまりでグループ分けし(以下、グルー
プ分けされた面群を部品と呼ぶ)、部品単位で情報の記
憶が行われる。
The stereo model storage means 103 stores the input information from the rendering parameter input means 101 and the stereo model input means 102. In the three-dimensional model storage means 103, which will be described in detail later, a three-dimensional model in which an object is defined as an aggregate of polygons in a three-dimensional space is included in a boundary cube that does not overlap each other in the three-dimensional space. Are grouped (hereinafter, the group of surfaces is referred to as a component), and information is stored for each component.

【0024】陰線陰面消去処理手段104は、視点から
見た場合の各部品の重なり具合の序列、および各部品毎
の、視点から見た場合の部品内の各面の重なり具合の序
列を判定することにより、立体モデルを表示する際の陰
線陰面消去を行う手段である。その構成は、部品描画順
位決定手段105および面描画順位決定手段106を備
えている。部品描画順位決定手段105は、視点から見
た際の各部品の陰線および陰面が消去されるような、部
品の重ね書きを行うことができる描画順位を決定する。
面描画順位決定手段106は、各部品毎に、視点から見
た際の部品内の各面の陰線および陰面が消去されるよう
な、面の重ね書きを行うことができる描画順位を決定す
る。本実施例では、この決定された部品描画順位および
面描画順位に従って描画が行われる。
The hidden line hidden surface elimination processing means 104 determines the order of the degree of overlap of each part when viewed from the viewpoint, and the order of the degree of overlap of each surface within the part when viewed from the viewpoint for each part. As a result, the hidden line hidden surface is erased when the stereo model is displayed. The configuration includes a component drawing order determining unit 105 and a surface drawing order determining unit 106. The component drawing order determination unit 105 determines a drawing order at which the parts can be overwritten so that the hidden line and the hidden surface of each part when viewed from the viewpoint are erased.
The surface drawing order determining unit 106 determines, for each part, a drawing order capable of performing surface overwriting so that the hidden line and the hidden surface of each surface in the part when viewed from the viewpoint are erased. In the present embodiment, drawing is performed in accordance with the determined component drawing order and surface drawing order.

【0025】次に、立体モデル記憶手段103について
詳しく説明する。立体モデル記憶手段103は、図2に
示すように、少なくとも立体モデルデータ記憶部201
と、部品データ記憶部202と、面データ記憶部203
と、3次元頂点データ記憶部204と、2次元データ記
憶部205と、レンダリングパラメータ記憶部206
と、を備えている。
Next, the three-dimensional model storage means 103 will be described in detail. As shown in FIG. 2, the stereo model storage unit 103 stores at least the stereo model data storage unit 201.
And a component data storage unit 202 and a surface data storage unit 203
A three-dimensional vertex data storage unit 204, a two-dimensional data storage unit 205, and a rendering parameter storage unit 206.
And

【0026】立体モデルデータ記憶部201は、3次元
頂点データ記憶部204に記憶される各頂点要素に関す
る3次元頂点データの先頭アドレスと、2次元頂点デー
タ記憶部205に記憶される各頂点要素に関する3次元
頂点データの先頭アドレスと、立体モデルに含まれる部
品の数を記憶する領域と、部品データ記憶部202上の
各部品データへのアドレスを部品数分だけ格納する領域
と、を備えている。
The three-dimensional model data storage unit 201 relates to the start address of the three-dimensional vertex data for each vertex element stored in the three-dimensional vertex data storage unit 204 and each vertex element stored in the two-dimensional vertex data storage unit 205. It is provided with a head address of the three-dimensional vertex data, an area for storing the number of parts included in the three-dimensional model, and an area for storing addresses for each part data in the part data storage unit 202 by the number of parts. .

【0027】部品データ記憶部202は、個々の部品に
含まれる面データの数を記憶する領域と面データ記憶部
203上にある部品に含まれる面のデータのアドレスを
立体モデルに含まれる面の数量分格納する領域とを備え
ている。
The component data storage unit 202 stores the area for storing the number of face data included in each component and the address of the data of the face included in the component in the face data storage unit 203 for the face included in the three-dimensional model. And an area for storing the quantity.

【0028】面データ記憶部203は、それぞれの面の
頂点の数と面の頂点に対応した、3次元頂点データ記憶
部204および2次元頂点データ記憶部205上の座標
値データのアドレスを記憶する領域と、視点から面を見
た場合に面が裏返しになっている場合にその状態を表す
可視フラグを記憶する領域と、を備えている。
The surface data storage unit 203 stores the number of vertices of each surface and the address of the coordinate value data on the three-dimensional vertex data storage unit 204 and the two-dimensional vertex data storage unit 205 corresponding to the surface vertices. An area and an area for storing a visible flag indicating the state when the surface is turned inside out when viewed from the viewpoint.

【0029】3次元頂点データ記憶部204は、立体モ
デルに含まれる全ての頂点の3次元座標値を記憶する領
域を備え、2次元頂点データ記憶部205は、立体モデ
ルに含まれる全ての頂点に対応した投影変換後の2次元
座標値を記憶する領域を備えている。これら3次元頂点
データおよび2次元頂点データの並びは対応しており、
それぞれは配列となっているので、立体モデルデータ記
憶部201に記憶されている3次元頂点データおよび2
次元頂点データの各先頭アドレスを基準として、同一配
列要素番号で対応する頂点座標データにアクセスするこ
とが可能になっている。
The three-dimensional vertex data storage unit 204 has an area for storing the three-dimensional coordinate values of all vertices included in the stereo model, and the two-dimensional vertex data storage unit 205 stores all vertices included in the stereo model. An area for storing the corresponding two-dimensional coordinate values after projection conversion is provided. The three-dimensional vertex data and the two-dimensional vertex data correspond to each other,
Since each of them is an array, the three-dimensional vertex data and 2
It is possible to access the corresponding vertex coordinate data with the same array element number with each head address of the dimension vertex data as a reference.

【0030】レンダリングパラメータ記憶部206は、
入力された視点位置および投影面位置を記憶する。ここ
では、視点のX,Y,Z座標値が記憶される。
The rendering parameter storage unit 206 is
The input viewpoint position and projection plane position are stored. Here, the X, Y, Z coordinate values of the viewpoint are stored.

【0031】次に、この立体画像生成装置の動作を図3
〜図7を参照して説明する。
Next, the operation of this stereoscopic image generating apparatus will be described with reference to FIG.
~ It demonstrates with reference to FIG.

【0032】図3は立体画像生成装置の全体の処理手順
を示すフローチャートである。
FIG. 3 is a flowchart showing the overall processing procedure of the three-dimensional image generating apparatus.

【0033】まず、ステップS101で、レンダリング
パラメータ入力手段101から入力された視点位置座標
および投影面位置、立体モデル入力手段102から入力
された立体モデルデータが、立体モデル記憶手段103
上に記憶される(ステップ101)。この際、面データ
記憶部203の全ての可視フラグはON状態に初期化さ
れる。
First, in step S 101, the viewpoint position coordinates and the projection plane position input from the rendering parameter input unit 101 and the stereo model data input from the stereo model input unit 102 are stored in the stereo model storage unit 103.
It is stored above (step 101). At this time, all the visible flags in the surface data storage unit 203 are initialized to the ON state.

【0034】ここで、立体モデルデータは、例えば図1
0に示すような立体化した文字列を、3次元空間上の複
数の面の集合として定義するものである。このような立
体の文字列は、図8に示すように線分の輪郭線で構成さ
れた2次元の文字列を、奥行き方向に適当な距離をおい
た2つの文字列とし、これら文字列間でそれぞれの線分
の端点同士を結ぶ線分を含んだ、線分で囲まれる多角形
を考えればよい。なお、この際、各文字に相当する線分
の集まりは2次元上で重なる部分を持たない矩形に包含
されており、立体化の操作をした後の各文字を構成する
面群もまた、図9に示すような、3次元空間上では互い
に重なる部分を持たない境界立方体にそれぞれ包含され
る。
Here, the stereo model data is, for example, as shown in FIG.
A three-dimensional character string as shown in 0 is defined as a set of a plurality of faces in a three-dimensional space. For such a three-dimensional character string, a two-dimensional character string constituted by the outlines of line segments as shown in FIG. 8 is made into two character strings with an appropriate distance in the depth direction, and between these character strings. Consider a polygon enclosed by line segments that includes line segments that connect the endpoints of each line segment. At this time, a group of line segments corresponding to each character is included in a rectangle that does not have a two-dimensionally overlapping portion, and the surface group that constitutes each character after the three-dimensional operation is also shown in the figure. As shown in FIG. 9, the boundary cubes are not included in the three-dimensional space and do not overlap each other.

【0035】立体モデル記憶手段103上では、図2
(a)〜(b)に示すように部品データ、面データ、3
次元頂点データ、レンダリングパラメータで構成された
立体モデルパラメータとして記憶される。
On the three-dimensional model storage means 103, FIG.
As shown in (a) and (b), part data, surface data, 3
It is stored as a three-dimensional model parameter composed of dimension vertex data and rendering parameters.

【0036】ここで、立体モデルの記憶様式に関し、図
10の例を参照して詳細に説明する。線分の継ぎ目に相
当する頂点の位置座標が順に3次元頂点データ記憶部2
04上の配列で格納される。図10に示す立体化した文
字列では、文字の形をした正面と矩形の側面は、それぞ
れ面データであり、3次元頂点データ間をつないででき
る多角形として定義されることから、面データ記憶部2
03には、各面要素毎に面に含まれる頂点の数と、それ
ら頂点を辿る順番に並んだ3次元頂点データへのアドレ
スが格納されている。ここでは、頂点を辿る順番は、面
を通り、かつ、面に垂直な線上で立体を外部から見た場
合に反時計回りとなるような順番とする。
Here, the storage mode of the three-dimensional model will be described in detail with reference to the example of FIG. The position coordinates of the vertices corresponding to the joints of the line segments are three-dimensional vertex data storage unit 2 in order.
It is stored in the array on 04. In the three-dimensional character string shown in FIG. 10, the character-shaped front surface and the rectangular side surface are surface data, respectively, and are defined as polygons formed by connecting three-dimensional vertex data. Part 2
In 03, the number of vertices included in the surface for each surface element and the addresses to the three-dimensional vertex data arranged in the order of tracing the vertices are stored. Here, the order in which the vertices are traced is such that they are counterclockwise when the solid is seen from the outside on a line that passes through the surface and is perpendicular to the surface.

【0037】部品データ記憶部202には、部品データ
として、面データを参照するためのアドレスなどが記憶
される。ここで、部品は、図10の個々の文字に相当
し、図9に示す立方体のように互いに重なる部分の無い
立方体で括られる面データのまとまりである。部品デー
タは、それぞれの部品に含まれる面の数と各面データへ
のアドレスを含むデータである。
The component data storage unit 202 stores, as the component data, addresses for referencing the surface data. Here, the part corresponds to each character in FIG. 10, and is a group of surface data which is grouped by a cube having no overlapping portions like the cube shown in FIG. The component data is data including the number of faces included in each component and an address to each face data.

【0038】立体モデルデータ記憶部201には、部品
の数とそれぞれの部品のデータのアドレスと3次元頂点
データおよび2次元頂点データの先頭アドレスが記憶さ
れている。この立体モデルデータを起点に全ての立体構
成要素を参照できる。
The three-dimensional model data storage unit 201 stores the number of parts, the address of the data of each part, the head addresses of the three-dimensional vertex data and the two-dimensional vertex data. From this solid model data, all solid components can be referenced.

【0039】上記ステップS101にて立体モデルデー
タの入力が行われると、次いで、ステップS102で、
部品を包含し、互いに重なりの無い境界立方体を立体モ
デルとして生成する。立方体の各面は、各部品を構成す
るX−Y平面、Y−Z平面、Z−X平面にそれぞれ投影
した投影像を包含する最小外接矩形として求める。
When the stereo model data is input in step S101, then in step S102,
A boundary cube that includes parts and does not overlap each other is generated as a solid model. Each surface of the cube is obtained as a minimum circumscribing rectangle including projection images projected on the XY plane, the YZ plane, and the ZX plane that form each component.

【0040】続いて、ステップS103で、上記ステッ
プS102で生成した境界立方体に関して並べ替えを行
う。図4は、このステップS103の詳細な処理手順を
示すフローチャートである。同図では、部品を記号Bで
表し、添字は部品配列での要素番号を表す。
Then, in step S103, the boundary cubes generated in step S102 are rearranged. FIG. 4 is a flowchart showing the detailed processing procedure of step S103. In the figure, parts are represented by the symbol B, and subscripts represent element numbers in the parts array.

【0041】まず、ステップS201で、部品データポ
インタaが0に初期化される。次いで、ステップS20
2で、部品データポインタbが、a+1に設定される。
次いで、ステップS203で、部品B「a」と部品B
「b」とで視点からみた場合の重なりの状況を判定す
る。図5は、このステップS203の詳細な処理手順を
示すフローチャートである。同図では、面データを記号
Fで表し、第1番目の添字は面データが属している部品
の番号を示し、第2の添字は面データポインタであり、
部品内での面の番号を示す。例えば、境界立方体は、6
面であるので第2の添字は、0から5の値となる。
First, in step S201, the component data pointer a is initialized to 0. Then, step S20
At 2, the component data pointer b is set to a + 1.
Next, in step S203, the part B "a" and the part B
With “b”, the situation of overlap from the viewpoint is determined. FIG. 5 is a flowchart showing the detailed processing procedure of step S203. In the figure, the surface data is represented by the symbol F, the first subscript indicates the number of the component to which the surface data belongs, and the second subscript is the surface data pointer.
Indicates the surface number within the part. For example, the boundary cube is 6
Since it is a surface, the second subscript has a value of 0 to 5.

【0042】図5に示すように、まず、ステップS30
1で、面データポインタをiを0に初期化する。次い
で、ステップS302で、面データポインタjを0に初
期化する。次いで、ステップS303で、面F[a,
j]が面F[b,j]を隠すかどうかを判断する。この
ステップS303の結果が偽(FALSE)であればス
テップS307へ進み、真(TRUE)であればステッ
プS304へ進む。図7は、このステップS303の詳
細な処理手順を示すフローチャートである。同図では、
面を記号Fで表しているが、第1の添字は省略してあ
る。
As shown in FIG. 5, first, step S30.
At 1, the plane data pointer is initialized to 0. Next, in step S302, the surface data pointer j is initialized to 0. Then, in step S303, the face F [a,
j] hides the face F [b, j]. If the result of step S303 is false (FALSE), the process proceeds to step S307, and if true (TRUE), the process proceeds to step S304. FIG. 7 is a flowchart showing the detailed processing procedure of step S303. In the figure,
Although the surface is represented by the symbol F, the first subscript is omitted.

【0043】図7に示すように、まずステップS501
で、面F[i]と面F[j]が2次元投影面に投影した
際に重なるかどうかを判断する。重ならない場合は、ス
テップS507へ進み、戻り値にFALSEを設定して
図5のステップS303の続きへ戻る。重なる場合は、
ステップS502へと進む。
As shown in FIG. 7, first, step S501.
Then, it is determined whether or not the surface F [i] and the surface F [j] overlap each other when projected onto the two-dimensional projection surface. If they do not overlap, the process proceeds to step S507, the return value is set to FALSE, and the process returns to the continuation of step S303 in FIG. If they overlap,
It proceeds to step S502.

【0044】ステップS502では、面F[j]の全て
の頂点が面F[i]の前方にあるかどうかを検査する。
検査結果がTRUEである場合には、ステップS507
へ進み、戻り値にFALSEを設定して図5のステップ
S303の続きへ戻る。FALSEである場合には、ス
テップ503へ進む。
In step S502, it is checked whether all the vertices of the face F [j] are in front of the face F [i].
If the inspection result is TRUE, step S507.
Then, the process returns to step S303 in FIG. 5 to set the return value to FALSE. If it is FALSE, the process proceeds to step 503.

【0045】ステップS503では、面F[i]の全て
の頂点が面F[j]の後方にあるかどうか検査する。検
査結果がTRUEである場合には、ステップS507へ
進み、戻り値にFALSEを設定して図5のステップS
303の続きへ戻る。FALSEである場合には、ステ
ップS504へ進む。
In step S503, it is checked whether all the vertices of the face F [i] are behind the face F [j]. If the inspection result is TRUE, the process proceeds to step S507, the return value is set to FALSE, and the process returns to step S of FIG.
Return to the continuation of 303. If it is FALSE, the process proceeds to step S504.

【0046】ステップS504では、面F[i]の全て
の頂点が面F[j]の前方にあるかどうかを検査する。
検査結果がTRUEである場合には、ステップS506
へ進み、戻り値にTRUEを設定して図5のステップS
303の続きへと戻る。FALSEである場合には、ス
テップS505へ進む。
In step S504, it is checked whether all the vertices of the face F [i] are in front of the face F [j].
If the inspection result is TRUE, step S506.
Go to step S of FIG. 5 with TRUE set as the return value.
Return to the continuation of 303. If it is FALSE, the process proceeds to step S505.

【0047】ステップS505では、面F[j]の全て
の頂点が面F[i]の後方にあるかどうかを検査する。
検査結果がTRUEである場合には、ステップS506
へ進み、戻り値にTRUEを設定して図5のステップS
303の続きへと戻る。FALSEである場合には、ス
テップS507へ進み、戻り値にFALSEを設定して
図5のステップS303の続きへ戻る。
In step S505, it is checked whether all the vertices of the face F [j] are behind the face F [i].
If the inspection result is TRUE, step S506.
Go to step S of FIG. 5 with TRUE set as the return value.
Return to the continuation of 303. If it is FALSE, the process proceeds to step S507, the return value is set to FALSE, and the process returns to the continuation of step S303 in FIG.

【0048】以下、再び図5の続きを説明する。Hereinafter, the continuation of FIG. 5 will be described again.

【0049】ステップS307へ進んだ場合は、戻り値
にFALSEを設定して図4のステップS203の続き
へ戻る。ステップS304へ進んだ場合は、面F[b,
j]が面F[a,j]を隠すかどうかを検査する。この
ステップS304の処理では、ステップ303の面を入
れ替えて図7のステップS501〜S507の処理を同
様に行う。
If the process proceeds to step S307, the return value is set to FALSE and the process returns to the continuation of step S203 in FIG. If the process proceeds to step S304, the face F [b,
Check whether j] hides the face F [a, j]. In the process of step S304, the faces of step 303 are exchanged and the processes of steps S501 to S507 of FIG. 7 are similarly performed.

【0050】上記ステップS304の検査結果がTRU
Eとなった場合は、ステップS306へ進み、戻り値に
TRUEを設定して図4のステップS203の続きへ戻
る。検査結果がFALSEとなった場合は、ステップS
305へ進み、面データポインタjを1増加する。そし
て、ステップS308で、面データポインタjと部品デ
ータ[b]の面数との比較をする。面データポインタj
が部品データ[b]の面数より小さい場合は、ステップ
302へ戻り、面データポインタjが部品データ[b]
の面数以上となった場合は、ステップS309へ進み、
面データポインタiを1増加する。
The inspection result of step S304 is TRU.
When it becomes E, the process proceeds to step S306, the return value is set to TRUE, and the process returns to the continuation of step S203 in FIG. If the inspection result is FALSE, step S
In step 305, the surface data pointer j is incremented by 1. Then, in step S308, the surface data pointer j is compared with the number of surfaces of the component data [b]. Surface data pointer j
Is smaller than the number of faces of the component data [b], the process returns to step 302 and the face data pointer j is set to the component data [b].
If the number of pages is more than, go to step S309,
The surface data pointer i is incremented by 1.

【0051】ステップS309にて面データポインタi
が1増加されると、次いで、ステップS310で、面デ
ータポインタiと部品データB[a]の面数との比較を
する。面データポインタiが部品データB[a]の面数
より小さい場合は、ステップS301へ戻り、面データ
ポインタiが部品データB[a]の面数以上となった場
合には、戻り値にFALSEを設定して図4のステップ
S203の続きへ戻る。
In step S309, the surface data pointer i
When is incremented by 1, then in step S310, the surface data pointer i is compared with the number of surfaces of the component data B [a]. If the surface data pointer i is smaller than the number of surfaces of the component data B [a], the process returns to step S301. If the surface data pointer i is equal to or larger than the number of surfaces of the component data B [a], the return value is FALSE. Is set and the process returns to the continuation of step S203 in FIG.

【0052】以下、再び図4の続きを説明する。Hereinafter, the continuation of FIG. 4 will be described again.

【0053】ステップS203の結果が、TRUEであ
った場合は、ステップS205へ進む。ステップS20
5では、部品B[b]を部品B[a]の直前に移動し、
ステップS201へ戻り、以上に説明した処理を繰り返
す。この際の部品の移動は、立体モデル記憶手段103
上にある元々の立体モデルデータの立体モデルデータ記
憶部201の部品データへのアドレスの配列に対しても
同時に行う。また、部品データポインタa,bはともに
更新されていないが、データの入れ替えがなされてい
る。
If the result of step S203 is TRUE, the process proceeds to step S205. Step S20
In 5, the component B [b] is moved to the position immediately before the component B [a],
The process returns to step S201, and the processing described above is repeated. The movement of the parts at this time is performed by the three-dimensional model storage means 103
This is also performed at the same time for the arrangement of the addresses of the original three-dimensional model data above to the component data in the three-dimensional model data storage unit 201. Further, although the component data pointers a and b have not been updated, the data has been replaced.

【0054】ステップS203の結果が、FALSEで
あった場合には、ステップS204へ進み、部品データ
ポインタbを1増加する。続くステップS206で、部
品データポインタbが部品数以上であるかどうかを判定
する。判定結果がFALSEである場合は、ステップS
202へ戻り、以上で説明した処理を繰り返す。判定結
果がTRUEである場合には、ステップS207へ進
み、部品データポインタaを1増加する。
If the result of step S203 is FALSE, the flow advances to step S204 to increment the component data pointer b by one. In a succeeding step S206, it is determined whether or not the component data pointer b is equal to or larger than the number of components. If the determination result is FALSE, step S
Returning to 202, the processing described above is repeated. If the determination result is TRUE, the process advances to step S207 to increment the component data pointer a by 1.

【0055】続くステップS208では、部品データポ
インタaが部品数以上であるかどうかを判定する。判定
結果がFALSEである場合は、ステップS201へ戻
り、以上で説明した処理を繰り返す。判定結果がTRU
Eである場合には、部品ソートの処理を終了する。
In a succeeding step S208, it is determined whether or not the component data pointer a is equal to or larger than the number of components. If the determination result is FALSE, the process returns to step S201 and the above-described processing is repeated. The judgment result is TRU
If it is E, the parts sorting process is terminated.

【0056】上述の図4における部品ソートの処理(図
3のステップS103の処理)の流れを簡単に説明する
と、次のようなことになる。まず、元々の部品の並びの
先頭から順次部品に着目していき、着目した部品とその
他の部品の前後関係を検査して、着目した部品よりも後
方に位置する部品がなかった場合には、着目する部品を
次の部品に移す。一方、着目した部品よりも後方に位置
する部品があった場合には、その部品を着目していた部
品の前に移動して新たな着目部品として処理を行う。こ
うして、一通りの部品の処理が終了した時点では、立体
モデルデータ記憶部201上の部品データのアドレスの
配列は、重なりの序列で部品が並べ替えられる。
The flow of the parts sorting process (the process of step S103 of FIG. 3) in FIG. 4 will be briefly described as follows. First, paying attention to the parts sequentially from the beginning of the original part sequence, inspecting the front-back relationship of the part of interest and other parts, and if there is no part located behind the part of interest, Move the part of interest to the next part. On the other hand, when there is a component located behind the focused component, the component is moved to the front of the focused component and processed as a new focused component. In this way, when the processing of one set of parts is completed, the parts of the address of the part data in the three-dimensional model data storage unit 201 are rearranged in the order of overlap.

【0057】以下、再び図3の続きを説明する。Hereinafter, the continuation of FIG. 3 will be described again.

【0058】ステップS103で、上述した部品ソート
の処理が行われると、次いでステップS104で、不可
視面除去を行う。視点から見て裏返しになっている面は
物体の陰になっているので、最終的な2次元投影画像で
は描画されない。このため、後段の処理の無駄を省くた
めにこの時点で裏返しになっているかどうかを検査し、
可視フラグの値を更新しておく(ここでは、裏返しにな
っている場合は可視フラグがオフにされる)。以降の処
理では、可視フラグがオンになっている面は処理の対象
から外される。
When the above-described component sort processing is performed in step S103, invisible surface removal is then performed in step S104. Since the surface which is turned over from the viewpoint is hidden by the object, it is not drawn in the final two-dimensional projection image. For this reason, in order to save the waste of processing in the latter stage, it is inspected whether it is turned over at this point,
The value of the visible flag is updated (in this case, the visible flag is turned off when it is turned over). In the subsequent processing, the surface for which the visible flag is turned on is excluded from the processing target.

【0059】続くステップS105で、面ソートを行
う。立体モデルデータ記憶部201に格納されている部
品データのアドレスの順番に従って、順次部品データが
ステップS105で処理される。図6は、このステップ
S105の詳細な処理手順を示すフローチャートであ
る。同図では、面を記号Fで表し、添字は部品データ記
憶部202上の面データの配列の要素番号を表す。
In the following step S105, face sorting is performed. The component data is sequentially processed in step S105 according to the order of the addresses of the component data stored in the three-dimensional model data storage unit 201. FIG. 6 is a flowchart showing the detailed processing procedure of step S105. In the figure, the surface is represented by the symbol F, and the subscript represents the element number of the array of surface data on the component data storage unit 202.

【0060】まず、ステップS401で面データポイン
タiが0に初期化される。次いで、ステップS402
で、面データポインタjがi+1に設定される。次い
で、ステップS403で、視点から見た場合に面F
[i]が面F[j]を隠すかどうかを検査する。このス
テップS403の処理は、上述の部品ソート処理で説明
した図7の処理と同様であるので、ここでは詳しい説明
は省略する。
First, in step S401, the surface data pointer i is initialized to 0. Then, step S402
Then, the surface data pointer j is set to i + 1. Then, in step S403, the plane F when viewed from the viewpoint.
Check if [i] hides face F [j]. The process of step S403 is the same as the process of FIG. 7 described in the above-described component sort process, and therefore detailed description thereof is omitted here.

【0061】上記ステップS403の戻り値がTRUE
であった場合は、ステップS405へ進む。ステップS
405では、面F[j]を面F[i]の直前に移動した
後、ステップS401の処理へ戻る。ステップS403
の戻り値がFALSEであった場合は、ステップS40
4へ進み、jを1増加させる。続くステップS406
で、面データポインタjと面の数を比較し、面データポ
インタjの方が小さい場合には、ステップS402へ戻
り、以上で説明した処理を繰り返し、面データポインタ
jの方が大きい場合には、ステップS407へ進み、i
を1増加させる。
The return value of step S403 is TRUE.
When it is, it progresses to step S405. Step S
In step 405, the surface F [j] is moved to immediately before the surface F [i], and then the process returns to step S401. Step S403
If the return value of is FALSE, step S40
Go to 4 and increment j by 1. Continued Step S406
Then, the surface data pointer j is compared with the number of surfaces, and when the surface data pointer j is smaller, the process returns to step S402, the processing described above is repeated, and when the surface data pointer j is larger, , Step S407, i
Is increased by one.

【0062】続くステップS408で、面データポイン
タiと面の数を比較し、面データポインタiの方が小さ
い場合には、ステップS401へ戻り、以上で説明した
処理を繰り返し、面データポインタiの方が大きい場合
には、次の部品データに対して同様の処理を繰り返し、
全ての部品データの処理を終了するまで繰り返す。
In the following step S408, the number of faces is compared with the face data pointer i. If the face data pointer i is smaller, the process returns to step S401 and the above-described processing is repeated to determine the face data pointer i. If it is larger, repeat the same process for the next part data,
Repeat until processing of all the component data is completed.

【0063】以上説明したステップS101〜ステップ
S105の処理で、陰線陰面消去処理手段104による
立体モデルデータおよび部品データの内容の並べ替えが
行われる。
In the processing of steps S101 to S105 described above, the hidden line hidden surface elimination processing means 104 rearranges the contents of the stereo model data and the component data.

【0064】以下、再び図3の続きを説明する。Hereinafter, the continuation of FIG. 3 will be described again.

【0065】続くステップS106では、全ての面に対
して、予め定められた光源位置などのパラメータに従っ
て、グローシェーディンッグ等の方法により面の色が決
められる。このステップS106でシェーディングが施
された立体モデルデータの頂点データは、レンダリング
パラメータ記憶部206の視点座標と投影面の位置を基
に2次元平面上の座標に変換された2次元頂点データ記
憶部205へ順次格納される。
In the following step S106, the surface color is determined for all the surfaces by a method such as glow-shading in accordance with a predetermined parameter such as the position of the light source. The vertex data of the three-dimensional model data shaded in step S106 is converted into coordinates on a two-dimensional plane based on the viewpoint coordinates of the rendering parameter storage unit 206 and the position of the projection plane, and the two-dimensional vertex data storage unit 205. Are sequentially stored in.

【0066】続くステップS108で、立体モデルデー
タ記憶部201の部品データアドレスの並びに従って、
部品データ記憶部202の面データポインタが参照さ
れ、面データポインタは、立体モデルデータ記憶部20
1の2次元頂点データアドレスを参照して順次頂点座標
を参照して、多角形の出力を行う。この結果、図11に
示すような2次元投影画像が得られる。
In the following step S108, according to the arrangement of the component data addresses in the three-dimensional model data storage unit 201,
The surface data pointer of the component data storage unit 202 is referred to, and the surface data pointer is the solid model data storage unit 20.
The two-dimensional vertex data address of 1 is referenced, and the vertex coordinates are sequentially referenced to output a polygon. As a result, a two-dimensional projection image as shown in FIG. 11 is obtained.

【0067】全ての部品データおよび面データの出力が
終了した時点で、立体画像の生成処理が終了する。
When the output of all the component data and the surface data is completed, the stereoscopic image generation process is completed.

【0068】以上説明した本実施例の立体画像生成装置
は、立体化した文字列の2次元投影画像を生成するもの
であったが、本発明はこれに限定されるものではなく、
文字列に代えて種々の3次元物体を適用することが可能
である。
Although the three-dimensional image generating apparatus of this embodiment described above generates a two-dimensional projected image of a three-dimensionalized character string, the present invention is not limited to this.
It is possible to apply various three-dimensional objects instead of the character string.

【0069】[0069]

【発明の効果】本発明は以上説明したように構成されて
いるので、以下に記載するような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0070】従来は、任意の2つの面(立体モデルを構
成する面)に関して視点から見た場合の重なり具合の序
列を判定するといった処理を全ての面について行ってい
る。立体モデルに含まれる面の数をCとした場合、任意
の2面の組み合せの数Cは、 C=N×(N−1)/2 であり、この回数分の重なり具合の判定が必要とされ
る。すなわち、重なり具合の判定の回数が面の数の二乗
に比例して増加することとなり、例えば図10に示すよ
うな複雑な形状をした文字列を処理する場合には、多大
な処理時間が必要であった。これに対して、本発明で
は、立体モデルを部品データに分割し、まず部品のまと
まり単位で部品の重なり具合の序列を判定した後に、部
品毎に面の序列を判定して、立体モデルの各構成面の序
列を求めている。この場合の序列の判定処理は、立体モ
デルをM個の部品に分割した場合、平均して1/M2
処理時間で処理できることになる。
Conventionally, a process of determining the order of the degree of overlap of two arbitrary planes (planes forming a three-dimensional model) from the viewpoint is performed on all planes. When the number of faces included in the three-dimensional model is C, the number C of combinations of arbitrary two faces is C = N × (N−1) / 2, and it is necessary to determine the degree of overlap for this number of times. To be done. That is, the number of times the degree of overlap is determined increases in proportion to the square of the number of faces, and a great deal of processing time is required when processing a character string having a complicated shape as shown in FIG. 10, for example. Met. On the other hand, in the present invention, the three-dimensional model is divided into part data, and after determining the order of the overlapping degree of the parts in a unit of the parts, the order of the surfaces is determined for each part and each of the three-dimensional models is determined. Seeking the order of composition. When the stereo model is divided into M parts, the order determination process in this case can be performed in a processing time of 1 / M 2 on average.

【0071】以上のことから、本発明によれば、立体モ
デルの各構成面の序列の判定回数を大幅に少なくするこ
とができるので、高速な陰線陰面消去処理が可能になる
という効果がある。さらには、序列の判定回数が少ない
ことから、ワークメモリを大幅に削減でき、リソースの
乏しい小規模なシステム上でも適用できるという効果が
ある。
As described above, according to the present invention, the number of times of determining the order of the respective constituent surfaces of the three-dimensional model can be significantly reduced, which has the effect of enabling high-speed hidden line hidden surface removal processing. Furthermore, since the number of times the order is determined is small, the work memory can be significantly reduced, and it can be applied to a small-scale system with scarce resources.

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

【図1】本発明の一実施例の立体画像生成装置の概略構
成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a stereoscopic image generation apparatus according to an embodiment of the present invention.

【図2】図1に示す立体モデル記憶手段の構成を説明す
るための図で、(a)〜(f)は各記憶部の構成を示す
図である。
FIG. 2 is a diagram for explaining the configuration of the stereo model storage unit shown in FIG. 1, and FIGS. 2A to 2F are diagrams showing the configuration of each storage unit.

【図3】図1に示す立体画像生成装置の全体の処理手順
を示すフローチャートである。
FIG. 3 is a flowchart showing the overall processing procedure of the stereoscopic image generation device shown in FIG. 1.

【図4】図3の部品ソートの処理を詳細に説明するフロ
ーチャートである。
FIG. 4 is a flowchart illustrating in detail the process of sorting parts in FIG.

【図5】図4の処理の一部を詳細に説明するフローチャ
ートである。
FIG. 5 is a flowchart illustrating a part of the processing of FIG. 4 in detail.

【図6】図3の面ソートの処理を詳細に説明するフロー
チャートである。
FIG. 6 is a flowchart illustrating in detail the surface sorting process of FIG.

【図7】図5の処理の一部を詳細に説明するフローチャ
ートである。
FIG. 7 is a flowchart illustrating a part of the processing of FIG. 5 in detail.

【図8】線分の輪郭線で構成された2次元の文字列の一
例を示す図である。
FIG. 8 is a diagram showing an example of a two-dimensional character string formed by contour lines of line segments.

【図9】境界立方体を説明するための図である。FIG. 9 is a diagram for explaining a boundary cube.

【図10】立体モデルを説明するための図である。FIG. 10 is a diagram for explaining a stereo model.

【図11】2次元投影画像の一例を示す図である。FIG. 11 is a diagram showing an example of a two-dimensional projection image.

【符号の説明】 101 レンダリングパラメータ入力手段 102 立体モデル入力手段 103 立体モデル記憶手段 104 陰線陰面消去処理手段 105 部品描画順位決定手段 106 面描画順位決定手段 107 面データ出力手段 201 立体モデルデータ記憶部 202 部品データ記憶部 203 面データ記憶部 204 3次元頂点データ記憶部 205 2次元頂点データ記憶部 206 レンダリングパラメータ記憶部[Explanation of Codes] 101 Rendering Parameter Input Means 102 Stereo Model Input Means 103 Stereo Model Storage Means 104 Hidden Line Hidden Surface Erasing Processing Means 105 Component Drawing Order Determining Means 106 Surface Drawing Order Determining Means 107 Surface Data Output Means 201 Stereo Model Data Storage Unit 202 Component data storage unit 203 Surface data storage unit 204 Three-dimensional vertex data storage unit 205 Two-dimensional vertex data storage unit 206 Rendering parameter storage unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 3次元物体の2次元投影画像を生成する
立体画像生成装置において、 少なくとも視点位置と視線の方向とを規定する情報を含
んだレンダリングパラメータを入力するレンダリングパ
ラメータ入力手段と、 前記3次元物体を3次元空間内の多角形の集合体として
定義した立体モデルを入力する立体モデル入力手段と、 前記立体モデルを構成する多角形を前記3次元空間上で
互いに重なることのない境界立方体に包含されるまとま
りでグループ分けして複数の部品とし、視点から見た場
合の各部品の重なり具合の序列、および各部品毎の、視
点から見た場合の部品内の各面の重なり具合の序列を判
定する陰線陰面消去処理手段と、 前記立体モデルの各構成面を、前記陰線陰面消去処理手
段にて判定された序列に従って2次元平面に投影して2
次元画像として出力する出力手段と、を有することを特
徴とする立体画像生成装置。
1. A stereoscopic image generating apparatus for generating a two-dimensional projection image of a three-dimensional object, comprising: rendering parameter input means for inputting a rendering parameter including at least information defining a viewpoint position and a line-of-sight direction; A three-dimensional model input means for inputting a three-dimensional model in which a three-dimensional object is defined as a collection of polygons in a three-dimensional space, and polygons forming the three-dimensional model are defined as boundary cubes that do not overlap each other in the three-dimensional space. The included groups are grouped into multiple parts, and the order of the degree of overlap of each part when viewed from the viewpoint, and the order of the degree of overlap of each surface within the part when viewed from the point of view of each part Hidden line hidden surface removal processing means and each constituent surface of the stereo model according to the order determined by the hidden line hidden surface removal processing means Projection to 2
A stereoscopic image generation apparatus, comprising: an output unit that outputs a three-dimensional image.
【請求項2】 請求項1に記載の立体画像生成装置にお
いて、 前記陰線陰面消去処理手段は、 前記複数の部品に関し、視点から見た場合の各部品の陰
線陰面が消去されるような部品の重ね書きを行うことが
できる描画順位を決定する部品描画順位決定手段と、 前記複数の部品毎に、視点から見た場合の部品内の各面
の陰線陰面が消去されるような面の重ね書きを行うこと
ができる描画順位を決定する面描画順位決定手段と、を
有し、 前記出力手段が、前記部品描画順位決定手段および面描
画順位決定手段にて決定された部品および面の描画順位
に従って、前記立体モデルの各構成面を2次元平面に投
影することを特徴とする立体画像生成装置。
2. The three-dimensional image generation device according to claim 1, wherein the hidden-line hidden surface erasing processing unit is configured to erase the hidden-line hidden surface of each of the plurality of components when viewed from a viewpoint. A component drawing order determining means for determining a drawing order capable of performing overwriting, and an overwriting of a surface for each of the plurality of parts such that a hidden line and a hidden surface of each surface in the part when viewed from a viewpoint are erased. And a surface drawing order determining means for determining a drawing order capable of performing, according to the drawing order of the parts and surfaces determined by the component drawing order determining means and the surface drawing order determining means. A three-dimensional image generation device, characterized in that each component surface of the three-dimensional model is projected onto a two-dimensional plane.
【請求項3】 請求項1に記載の立体画像生成装置にお
いて、 前記境界立方体は、前記3次元物体を空間的な位置関係
により複数にグループ分けしたものであって、グループ
中の全ての多角形を包含し、かつ、X−Y平面、Y−Z
平面、Z−X平面に平行な面で構成されることを特徴と
する立体画像生成装置。
3. The stereoscopic image generation device according to claim 1, wherein the boundary cube is a group of the three-dimensional objects divided into a plurality of groups according to a spatial positional relationship, and all the polygons in the group. And includes an XY plane and a YZ
A three-dimensional image generation device characterized by being configured by a plane and a plane parallel to the Z-X plane.
【請求項4】 3次元物体を3次元空間内の多角形の集
合体として定義した立体モデルを基に、前記3次元物体
の2次元投影画像を生成する立体画像生成方法におい
て、 前記立体モデルを構成する多角形を、前記3次元空間上
で互いに重なることのない境界立方体に包含されるまと
まりでグループ分けして複数の部品とし、視点から見た
場合の各部品の重なり具合の序列、および各部品毎の、
視点から見た場合の部品内の各面の重なり具合の序列を
判定し、該判定された序列に従って前記立体モデルの各
構成面を2次元平面に投影することにより前記2次元投
影画像を得ることを特徴とする立体画像生成方法。
4. A three-dimensional image generation method for generating a two-dimensional projection image of a three-dimensional object based on a three-dimensional object defined as a collection of polygons in a three-dimensional space. The constituent polygons are grouped into a plurality of parts by a group included in a boundary cube that does not overlap each other in the three-dimensional space, and the order of the overlapping degree of each part when viewed from the viewpoint, and each For each part,
Obtaining the two-dimensional projected image by determining the order of the degree of overlap of each surface in the part when viewed from the viewpoint, and projecting each constituent surface of the three-dimensional model on a two-dimensional plane according to the determined order. A method for generating a stereoscopic image, characterized by:
【請求項5】 請求項4に記載の立体画像生成方法にお
いて、 前記複数の部品について、視点から見た場合の各部品の
陰線陰面が消去されるような部品の重ね書きを行うこと
ができる部品描画順位を求めてこれを前記部品の序列と
し、さらに各部品毎に、視点から見た場合の部品内の各
面の陰線陰面が消去されるような面の重ね書きを行うこ
とができる面描画順位を求めてこれを前記部品の各面の
序列とし、これら部品描画順位および面描画順位に従っ
て前記立体モデルの各構成面を重ね書きすることにより
前記2次元投影画像を得ることを特徴とする立体画像生
成方法。
5. The three-dimensional image generation method according to claim 4, wherein parts of the plurality of parts can be overwritten so that a hidden surface of each part when viewed from a viewpoint is erased. The drawing order is calculated and used as the order of the parts. Furthermore, for each part, the surface can be overwritten so that the hidden surface and the hidden surface of each surface in the part when viewed from the viewpoint are erased. The three-dimensional projection image is obtained by obtaining a rank and using this as the order of each surface of the part, and by overwriting each constituent surface of the three-dimensional model in accordance with the part drawing order and the surface drawing order. Image generation method.
【請求項6】 請求項4に記載の立体画像生成方法にお
いて、 前記境界立方体は、前記3次元物体を空間的な位置関係
によりグループ分けしたものであって、グループ中の全
ての多角形を包含し、かつ、X−Y平面、Y−Z平面、
Z−X平面に平行な面で構成されており、 前記部品の重なり具合の序列は、任意の2つの境界立方
体に関して視点から見た場合の重なり具合の序列を、そ
れぞれの立方体を構成する面の重なり具合を検査するこ
とにより行われることを特徴とする立体画像生成方法。
6. The method for generating a stereoscopic image according to claim 4, wherein the boundary cube is a group of the three-dimensional objects grouped according to a spatial positional relationship, and includes all polygons in the group. And an XY plane, a YZ plane,
It is configured by a plane parallel to the Z-X plane, and the order of the overlapping degree of the parts is the order of the degree of overlapping when viewed from a viewpoint with respect to any two boundary cubes. A three-dimensional image generation method, which is performed by inspecting the degree of overlap.
JP8117815A 1996-05-13 1996-05-13 Device and method for generating three-dimensional image Pending JPH09305791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8117815A JPH09305791A (en) 1996-05-13 1996-05-13 Device and method for generating three-dimensional image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8117815A JPH09305791A (en) 1996-05-13 1996-05-13 Device and method for generating three-dimensional image

Publications (1)

Publication Number Publication Date
JPH09305791A true JPH09305791A (en) 1997-11-28

Family

ID=14720951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8117815A Pending JPH09305791A (en) 1996-05-13 1996-05-13 Device and method for generating three-dimensional image

Country Status (1)

Country Link
JP (1) JPH09305791A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002047033A1 (en) * 2000-12-05 2002-06-13 Matsushita Electric Industrial Co., Ltd. 3-d character data generating device and a 3-d graphics data generating device
JP2002216149A (en) * 2001-01-24 2002-08-02 Hayashi Telempu Co Ltd Pattern creating method, pattern creation system, animation creating method and animation creation system
WO2003034343A1 (en) * 2001-10-15 2003-04-24 Fujitsu Limited Hierarchical sort of objects linked in virtual three-dimensional space
JP2007094758A (en) * 2005-09-29 2007-04-12 Canon Inc Image processor, control method for image processor, and storage medium
US7218321B2 (en) 2003-03-31 2007-05-15 Fujitsu Limited Hidden line processing method for erasing hidden lines in projecting a three-dimensional model consisting of a plurality of polygons onto a two-dimensional plane
CN100358015C (en) * 2003-01-08 2007-12-26 富士胶片株式会社 Signal output method and optical information recording medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63131270A (en) * 1986-11-21 1988-06-03 Dainippon Printing Co Ltd Three-dimensional character composition device
JPS6464067A (en) * 1987-05-13 1989-03-09 Mitsubishi Precision Co Ltd Priority order deciding method and its circuit for generation of simulated visual range
JPH0285978A (en) * 1988-09-21 1990-03-27 Dainippon Printing Co Ltd Method for processing hidden-surface of solid
JPH0348983A (en) * 1989-07-17 1991-03-01 Nec Corp Hidden-line erasing processor
JPH0371277A (en) * 1989-08-10 1991-03-27 Daikin Ind Ltd Method and device for plotting surface model
JPH07114654A (en) * 1993-10-15 1995-05-02 Sony Corp Device and method for generating plotting data
JPH07296186A (en) * 1994-03-01 1995-11-10 Sega Enterp Ltd Sorting method for polygon data and game system using the same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63131270A (en) * 1986-11-21 1988-06-03 Dainippon Printing Co Ltd Three-dimensional character composition device
JPS6464067A (en) * 1987-05-13 1989-03-09 Mitsubishi Precision Co Ltd Priority order deciding method and its circuit for generation of simulated visual range
JPH0285978A (en) * 1988-09-21 1990-03-27 Dainippon Printing Co Ltd Method for processing hidden-surface of solid
JPH0348983A (en) * 1989-07-17 1991-03-01 Nec Corp Hidden-line erasing processor
JPH0371277A (en) * 1989-08-10 1991-03-27 Daikin Ind Ltd Method and device for plotting surface model
JPH07114654A (en) * 1993-10-15 1995-05-02 Sony Corp Device and method for generating plotting data
JPH07296186A (en) * 1994-03-01 1995-11-10 Sega Enterp Ltd Sorting method for polygon data and game system using the same

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002047033A1 (en) * 2000-12-05 2002-06-13 Matsushita Electric Industrial Co., Ltd. 3-d character data generating device and a 3-d graphics data generating device
JP2002216149A (en) * 2001-01-24 2002-08-02 Hayashi Telempu Co Ltd Pattern creating method, pattern creation system, animation creating method and animation creation system
WO2003034343A1 (en) * 2001-10-15 2003-04-24 Fujitsu Limited Hierarchical sort of objects linked in virtual three-dimensional space
US7142207B2 (en) 2001-10-15 2006-11-28 Fujitsu Limited Hierarchical sorting of linked objects in virtual three-dimensional space
CN100358015C (en) * 2003-01-08 2007-12-26 富士胶片株式会社 Signal output method and optical information recording medium
US7218321B2 (en) 2003-03-31 2007-05-15 Fujitsu Limited Hidden line processing method for erasing hidden lines in projecting a three-dimensional model consisting of a plurality of polygons onto a two-dimensional plane
JP2007094758A (en) * 2005-09-29 2007-04-12 Canon Inc Image processor, control method for image processor, and storage medium
JP4724517B2 (en) * 2005-09-29 2011-07-13 キヤノン株式会社 Image processing system, image processing method, program, and storage medium

Similar Documents

Publication Publication Date Title
Zhang et al. Visibility culling using hierarchical occlusion maps
CN111340928B (en) Ray tracing-combined real-time hybrid rendering method and device for Web end and computer equipment
JP3759971B2 (en) How to shade a 3D image
US5442733A (en) Method and apparatus for generating realistic images using a discrete representation
JP4499292B2 (en) Shading of 3D computer generated images
JP3390463B2 (en) Shadow test method for 3D graphics
EP1127337B1 (en) Shading 3-dimensional computer generated images
KR100889602B1 (en) Apparatus and method of ray-triangle collision detection for ray-tracing
US7126600B1 (en) Method and apparatus for high speed block mode triangle rendering
JPH0757117A (en) Forming method of index to texture map and computer control display system
Dorward A survey of object-space hidden surface removal
JP2009525526A (en) Method for synthesizing virtual images by beam emission
JP2001501349A (en) Method and apparatus for attribute interpolation in 3D graphics
JPH05266216A (en) Method and device for volume rendering
CN103649856A (en) Method for simulating machining of objects by motion of tool and system and computer program product therefor
US20220383583A1 (en) Hardware acceleration for ray tracing primitives that share vertices
JPH0727579B2 (en) Graphics processing device and method and pixel memory device
GB2406252A (en) Generation of texture maps for use in 3D computer graphics
JP2907105B2 (en) 3D display device
US20130060488A1 (en) Image processing system and method for ndt/ndi testing devices
Vyatkin et al. Voxel Volumes volume-oriented visualization system
JPH09305791A (en) Device and method for generating three-dimensional image
US11423618B2 (en) Image generation system and method
KR100300969B1 (en) Method for extracting crossfoot test area in ray tracing and rendering device thereof
Gervautz Three improvements of the ray tracing algorithm for CSG trees