JP2000268191A - Hidden surface treatment method - Google Patents
Hidden surface treatment methodInfo
- Publication number
- JP2000268191A JP2000268191A JP11072500A JP7250099A JP2000268191A JP 2000268191 A JP2000268191 A JP 2000268191A JP 11072500 A JP11072500 A JP 11072500A JP 7250099 A JP7250099 A JP 7250099A JP 2000268191 A JP2000268191 A JP 2000268191A
- Authority
- JP
- Japan
- Prior art keywords
- buffer
- hidden surface
- surface processing
- processing
- application area
- 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
Links
Landscapes
- Image Generation (AREA)
Abstract
(57)【要約】
【課題】3次元グラフィックス処理において正確な隠面
処理を、少ない処理量で実行可能な隠面処理方法を提供
する。
【解決手段】オブジェクトを構成する複数のポリゴンの
頂点座標から、オブジェクトを代表するX、Y、Z座標
の代表値を求め(100)、得られた各オブジェクトの
X、Y、Z座標の代表値を比較することにより、各オブ
ジェクト間の位置関係を確定してZバッファ適用領域を
抽出する(102)。X、Y、Zの全3方向で座標の代
表値の重なりが検出された場合にZバッファ法により隠
面処理(210)を行い、検出されない場合に上書きに
よる隠面処理(202)を行う。
【効果】Zバッファを用いる領域を必要最小限にでき、
Zバッファを用いてのZ座標値比較及び更新処理を低減
できる。
(57) [Summary] A hidden surface processing method capable of executing accurate hidden surface processing with a small processing amount in three-dimensional graphics processing is provided. A representative value of X, Y, Z coordinates representative of an object is obtained from coordinates of vertices of a plurality of polygons constituting an object (100), and a representative value of X, Y, Z coordinates of each obtained object is obtained. To determine the positional relationship between the objects and extract the Z-buffer application area (102). When the overlap of the representative values of the coordinates is detected in all three directions of X, Y and Z, the hidden surface processing (210) is performed by the Z buffer method, and when not detected, the hidden surface processing by overwriting (202) is performed. [Effect] The area using the Z buffer can be minimized,
The Z coordinate value comparison and update processing using the Z buffer can be reduced.
Description
【0001】[0001]
【発明の属する技術分野】本発明は3次元グラフィック
ス処理の隠面処理方法に係り、特に少ない処理量で効率
よく実現可能な隠面処理方法に関する。The present invention relates to a hidden surface processing method for three-dimensional graphics processing, and more particularly to a hidden surface processing method that can be efficiently realized with a small processing amount.
【0002】[0002]
【従来の技術】従来、3次元グラフィックス処理におい
て、オブジェクトの可視面領域、不可視領域を判定し、
可視面領域のみを表示する隠面処理が行われている。こ
の隠面処理の方法としてはZバッファ法とZソート法が
知られている。なお、本明細書では、3次元の物体のこ
とをオブジェクト、オブジェクトを構成する多角形のこ
とをポリゴンとよぶ。2. Description of the Related Art Conventionally, in three-dimensional graphics processing, a visible surface area and an invisible area of an object are determined.
Hidden surface processing for displaying only the visible surface region is performed. As a method of this hidden surface processing, a Z buffer method and a Z sort method are known. In this specification, a three-dimensional object is called an object, and a polygon forming the object is called a polygon.
【0003】上記Zバッファ法は正確な隠面処理を行え
る反面、Zバッファ用のメモリ(以下、単にZバッファ
と称する)を必要とする上、Zバッファに対する書き込
み、読み出しを行うため処理時間が大きい。一方、Zソ
ート法は、Zバッファは不要であるが、ソート処理を行
うための処理量が膨大であり、複雑な位置関係にあるオ
ブジェクト間の隠面処理を正しく行えないという欠点が
ある。The above-mentioned Z-buffer method can perform accurate hidden surface processing, but requires a memory for the Z-buffer (hereinafter simply referred to as a Z-buffer) and requires a long processing time for writing and reading to and from the Z-buffer. . On the other hand, the Z-sorting method does not require a Z-buffer, but has a disadvantage that the amount of processing for performing the sorting process is enormous, and hidden surface processing between objects having a complicated positional relationship cannot be performed correctly.
【0004】これに対して、Zバッファ法とZソート法
を組み合わせることによって、正確な隠面処理を簡易に
行う方法が、例えば、特開平9−305792号公報に
開示されている。この隠面処理方法は、画面内の全ポリ
ゴンに対してポリゴン単位でZソートを行い、次に視点
に対して手前のポリゴンから順次所定量の範囲のポリゴ
ンについてZバッファ法を適用するものである。On the other hand, a method for easily performing accurate hidden surface processing by combining the Z buffer method and the Z sort method is disclosed in, for example, Japanese Patent Application Laid-Open No. 9-305792. In this hidden surface processing method, Z-sorting is performed for all polygons in the screen in units of polygons, and then the Z-buffer method is applied to polygons within a predetermined amount in order from the polygon in front of the viewpoint. .
【0005】[0005]
【発明が解決しようとする課題】しかしながら、前述し
た隠面処理を簡易に行う従来例によれば、Zバッファ法
を適用するポリゴンを選択するために、画面内の全ポリ
ゴンのZ座標値比較によりポリゴンのソート処理を行う
必要がある。このため、ポリゴン数が大きいときは処理
量が膨大となる。また、Zバッファ用のメモリが必要で
あり、メモリ量が大きいという問題がある。However, according to the conventional example in which the above-described hidden surface processing is simply performed, in order to select a polygon to which the Z-buffer method is applied, Z-coordinate values of all polygons in the screen are compared. It is necessary to sort polygons. For this reason, when the number of polygons is large, the processing amount becomes enormous. Further, a memory for the Z buffer is required, and there is a problem that the memory amount is large.
【0006】そこで、本発明の目的は、正確な隠面処理
を少ない処理量で実行可能な隠面処理方法を提供するこ
とである。An object of the present invention is to provide a hidden surface processing method capable of executing accurate hidden surface processing with a small processing amount.
【0007】また、本発明の他の目的は、少ないメモリ
量のZバッファで実現可能な隠面処理方法を提供するこ
とである。Another object of the present invention is to provide a hidden surface processing method which can be realized with a Z buffer having a small memory amount.
【0008】また、上記隠面処理方法を用いた隠面処理
装置を提供することも目的とする。It is another object of the present invention to provide a hidden surface processing apparatus using the above hidden surface processing method.
【0009】[0009]
【課題を解決するための手段】上記目的を達成するため
に、本発明に係る隠面処理方法は、オブジェクトを構成
する複数のポリゴンの頂点の座標から、オブジェクトを
代表するX、Y、Z座標の代表値を求め、得られた各オ
ブジェクトの上記X、Y、Z座標の代表値を比較するこ
とによって、各オブジェクト間の位置関係を確定する。
そして、前記位置関係を確定することによりX、Y、Z
方向の全3方向で座標の代表値の重なりが検出された場
合にはZバッファ法を用いて隠面処理を行い、検出され
ない場合に上書きによる隠面処理を行うというものであ
る。In order to achieve the above object, a hidden surface processing method according to the present invention uses an X, Y, Z coordinate representative of an object from coordinates of vertices of a plurality of polygons constituting the object. Is determined, and the obtained X, Y, and Z coordinate representative values of each object are compared to determine the positional relationship between the objects.
Then, by determining the positional relationship, X, Y, Z
When the overlap of the representative values of the coordinates is detected in all three directions, the hidden surface processing is performed using the Z-buffer method, and when not detected, the hidden surface processing by overwriting is performed.
【0010】上記隠面処理方法により、Zバッファ法を
用いて隠面処理を行う領域(以下、Zバッファ適用領域
と呼ぶ)を必要最小限にすることが可能となる。この結
果、Zバッファへの書き込み、Zバッファからの読み出
し、Z座標値比較の処理を低減することができる。According to the above-described hidden surface processing method, it is possible to minimize an area where the hidden surface processing is performed by using the Z buffer method (hereinafter, referred to as a Z buffer application area). As a result, the processing of writing to the Z buffer, reading from the Z buffer, and comparing Z coordinate values can be reduced.
【0011】したがって、上記隠面処理方法を用いた本
発明に係る隠面処理装置はオブジェクトを構成する複数
のポリゴンの頂点の座標から、オブジェクトを代表する
X、Y、Z座標の代表値を求める手段と、得られた各オ
ブジェクトの上記X、Y、Z座標の代表値を比較するこ
とによって、各オブジェクト間の位置関係を確定する手
段と、前記位置関係を確定する手段によりX、Y、Z方
向の全3方向で座標の代表値の重なりが検出された場合
にはZバッファ法を用いて隠面処理を行い、検出されな
い場合に上書きによる隠面処理を行う手段とを少なくと
も備えたことを特徴とするものである。Therefore, the hidden surface processing apparatus according to the present invention using the above hidden surface processing method obtains representative values of X, Y and Z coordinates representing the object from the coordinates of the vertices of a plurality of polygons constituting the object. Means for determining the positional relationship between the objects by comparing the obtained representative values of the X, Y, and Z coordinates of each object, and X, Y, and Z by means for determining the positional relationship. Means for performing hidden surface processing using the Z-buffer method when overlap of coordinate representative values is detected in all three directions, and performing hidden surface processing by overwriting when not detected. It is a feature.
【0012】さらに、本発明に係る隠面処理方法はZバ
ッファ適用領域を小領域に分割し、各小領域内に全頂点
が含まれるポリゴンを新たに定義した後、この新たに定
義したポリゴンを用いて前記隠面処理を行うようにして
もよい。この隠面処理方法により、Zバッファのサイズ
が画面サイズより小さい場合でも、各小領域毎に隠面処
理を行うことが可能となる。Further, the hidden surface processing method according to the present invention divides the Z-buffer application area into small areas, newly defines a polygon in which all vertices are included in each small area, and places the newly defined polygon in the small area. The hidden surface processing may be performed by using the above. With this hidden surface processing method, hidden surface processing can be performed for each small area even when the size of the Z buffer is smaller than the screen size.
【0013】前記隠面処理装置に、Zバッファ適用領域
を小領域に分割する手段と、各小領域内に全頂点が含ま
れるポリゴンを新たに定義する手段とを設け、この新た
に定義したポリゴンを用いてZバッファ法による隠面処
理を各小領域ごとに行って、各小領域内の表示画像を形
成する手段をさらに備えれば好適である。The hidden surface processing apparatus is provided with means for dividing the Z-buffer application area into small areas and means for newly defining a polygon including all vertices in each small area. It is preferable to further comprise means for performing hidden surface processing by the Z-buffer method for each of the small areas using, and forming a display image in each of the small areas.
【0014】[0014]
【発明の実施の形態】次に、本発明に係る隠面処理方法
の実施の形態につき、具体的な実施例を用いて添付図面
を参照しながら以下詳細に説明する。なお、以下の説明
では、ポリゴンは三角形形状のものであるとする。ま
た、表示画像面の水平方向がX軸、垂直方向がY軸、奥
行きがZ軸であるとして説明を行う。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment of a hidden surface processing method according to the present invention will be described in detail using specific examples with reference to the accompanying drawings. In the following description, it is assumed that the polygon has a triangular shape. Further, the description will be made on the assumption that the horizontal direction of the display image plane is the X axis, the vertical direction is the Y axis, and the depth is the Z axis.
【0015】<実施例1>本実施例は、各オブジェクト
を包含する直方体を求め、得られた直方体間の位置関係
により処理を異ならせる隠面処理方法である。具体的に
は、各オブジェクトを包含する直方体同士が、X、Y、
Z方向の全3方向で重なりを持つ場合に、その重なりの
領域に含まれるポリゴンに対しZバッファ法を用いた隠
面処理を行う。それ以外の場合には、視点に対して遠い
オブジェクトから近いオブジェクトの順に描画し、近い
オブジェクトで遠いオブジェクトを上書きすることによ
って隠面処理を行う。なお、本実施例で扱うオブジェク
トは3次元凸形状のオブジェクトであるとする。<Embodiment 1> This embodiment is a hidden surface processing method in which a rectangular parallelepiped containing each object is obtained, and processing is varied depending on the positional relationship between the obtained rectangular parallelepipeds. Specifically, rectangular parallelepipeds containing each object are X, Y,
When there are overlaps in all three directions in the Z direction, hidden surface processing using the Z buffer method is performed on polygons included in the overlap region. In other cases, the hidden surface processing is performed by drawing objects in order from objects farther from the viewpoint to objects closer to the viewpoint, and overwriting objects farther away with objects closer to the viewpoint. It is assumed that the object handled in this embodiment is a three-dimensional convex object.
【0016】図1に、本実施例の隠面処理方法の処理フ
ローを示す。この処理フローを用いて、本隠面処理方法
の概要を説明する。ここでは一画面内に、n個のオブジ
ェクトがあるとする。FIG. 1 shows a processing flow of the hidden surface processing method of this embodiment. An outline of the hidden surface processing method will be described using this processing flow. Here, it is assumed that there are n objects in one screen.
【0017】まず、ステップ100において、入力され
たn個のオブジェクトデータが図2で後述するようにメ
モリ10に格納される。ここで入力されるオブジェクト
のデータとは、各オブジェクトを構成するポリゴンのデ
ータが記述されているものであり、後述するポリゴンリ
スト(図6(c)参照)に相当する。First, in step 100, the inputted n object data is stored in the memory 10 as described later with reference to FIG. The object data input here describes data of polygons constituting each object, and corresponds to a polygon list (see FIG. 6C) described later.
【0018】次に、ステップ101において、入力され
た各オブジェクトデータに対し、各オブジェクトの代表
値を求める。ここで代表値とは、各オブジェクト内X、
Y、Z座標のそれぞれの最小値、最大値である。Next, in step 101, a representative value of each object is obtained for each input object data. Here, the representative value refers to X,
These are the minimum and maximum values of the Y and Z coordinates, respectively.
【0019】次に、ステップ102において、この得ら
れた代表値を用いて、Zバッファ法による処理が必要な
領域(Zバッファ適用領域)を抽出し、Zバッファ適用
領域リストに記述する。Next, in step 102, using the obtained representative value, an area that requires processing by the Z-buffer method (Z-buffer application area) is extracted and described in a Z-buffer application area list.
【0020】さらに、ステップ103において、オブジ
ェクトソート処理を行い、各オブジェクトを視点から遠
い順に並べたオブジェクトリストを作成する。Further, in step 103, an object sorting process is performed to create an object list in which the objects are arranged in order from the farthest from the viewpoint.
【0021】次に、描画処理のルーチン200に移る
が、オブジェクトの描画処理は上記オブジェクトリスト
に記述された順で行う。すなわち、視点から最も遠いオ
ブジェクトから順に描画処理を開始する。Next, the routine proceeds to a drawing processing routine 200, in which the object drawing processing is performed in the order described in the object list. That is, drawing processing is started in order from the object farthest from the viewpoint.
【0022】ステップ201において、先ず視点から最
も遠い、1番目に描画するオブジェクトにZバッファ適
用領域が有るか無いかを判定する。In step 201, it is first determined whether or not the first object to be drawn farthest from the viewpoint has a Z-buffer application area.
【0023】オブジェクトにZバッファ適用領域が有る
場合にはステップ210に進み、Zバッファ法による隠
面処理を行い、Zバッファ適用領域がない場合にはステ
ップ202へ進み、上書きによる隠面処理を行い、オブ
ジェクトを描画する。If the object has a Z-buffer application area, the flow advances to step 210 to perform hidden surface processing by the Z-buffer method. If the object does not have a Z-buffer application area, the flow advances to step 202 to perform hidden surface processing by overwriting. , Draw objects.
【0024】ステップ203において、次に描画処理す
るオブジェクトの有無を判定する。ここでは1画面にn
個のオブジェクトがあるとして説明しているので、ステ
ップ204へ進み、次の2番目に遠いオブジェクトの描
画処理に移り、上記と同様にステップ201と202又
はステップ201と210の処理を行い、ステップ20
3を経由してステップ204に進み、次の3番目に遠い
オブジェクトの描画処理に移る。このように描画処理ル
ーチンをn番目のオブジェクトまで繰り返し、ステップ
203において処理するオブジェクトが無いと判定した
ら描画処理を終了する。以上が、本実施例の隠面処理方
法の概略である。In step 203, it is determined whether or not there is an object to be subsequently subjected to a drawing process. Here, n
Since it is described that there are three objects, the process proceeds to step 204, the process proceeds to the next second farthest object drawing process, and the processes of steps 201 and 202 or steps 201 and 210 are performed in the same manner as described above.
Then, the process proceeds to step 204 via 3 to proceed to the next third farthest object drawing process. As described above, the drawing processing routine is repeated up to the n-th object. When it is determined in step 203 that there is no object to be processed, the drawing processing is terminated. The above is the outline of the hidden surface processing method of the present embodiment.
【0025】なお、ステップ210のZバッファ法によ
る隠面処理は、詳細に示せば図12のように表される。
すなわち、ステップ201でオブジェクトがZバッファ
適用領域ありの場合は、ステップ211において、更に
オブジェクト内の処理中の画素がZバッファ適用領域外
が否かを判定する。その画素がZバッファ適用領域外で
はない場合、すなわち処理中の画素がZバッファ適用領
域内の場合は、ステップ212へ進み、Zバッファ12
を使用したZ値比較を行い、可視画素の場合のみフレー
ムメモリ11へ書き込み、ステップ214へ進む。ま
た、可視画素の場合は、更にZバッファ12のZ座標値
を、その処理中の画素のZ座標値に更新する。一方、ス
テップ211において、Zバッファ適用領域外の場合
は、ステップ213へ進みフレームメモリ11へ上書き
し、ステップ214へ進む。ステップ214において、
その処理中のオブジェクト内の画素全部の処理が終了し
たか否かを判定し、全画素の処理をしていない場合は、
ステップ211へ戻り、全画素の処理を終了した場合
は、図1のステップ203へ進む。Incidentally, the hidden surface processing by the Z-buffer method in step 210 is expressed in detail as shown in FIG.
That is, if the object has a Z-buffer application area in step 201, it is determined in step 211 whether the pixel being processed in the object is outside the Z-buffer application area. If the pixel is not outside the Z-buffer application area, that is, if the pixel being processed is inside the Z-buffer application area, the process proceeds to step 212, where the Z buffer 12
Is performed, and only in the case of a visible pixel, writing to the frame memory 11 is performed, and the process proceeds to step 214. In the case of a visible pixel, the Z coordinate value of the Z buffer 12 is further updated to the Z coordinate value of the pixel being processed. On the other hand, if it is determined in step 211 that the area is outside the Z buffer application area, the flow advances to step 213 to overwrite the frame memory 11, and the flow advances to step 214. In step 214,
It is determined whether or not all the pixels in the object being processed have been processed, and if all the pixels have not been processed,
Returning to step 211, when the processing of all pixels is completed, the process proceeds to step 203 of FIG.
【0026】図2は、本隠面処理方法を実現する隠面処
理回路のブロック図である。本隠面処理回路15は、ポ
リゴンリスト、オブジェクトリスト、Zバッファ適用領
域リスト等を記憶するメモリ10と、表示画像データを
記憶するフレームメモリ11と、1画面分のZ座標値を
記憶するZバッファ12とを持つ。さらに、隠面処理部
20には、代表値算出部21、Zバッファ適用領域抽出
部22、オブジェクトソート部23、画素補間部24、
Zバッファ適用領域判定部25、及びZ座標値比較部2
6を持つ。更に、隠面処理部20と各メモリ10,1
1,12との間でデータのやり取りをするためのデータ
バスライン13を持つ。また、隠面処理部20の動作を
制御する制御部14を持つ。FIG. 2 is a block diagram of a hidden surface processing circuit for realizing the hidden surface processing method. The hidden surface processing circuit 15 includes a memory 10 for storing a polygon list, an object list, a Z buffer applicable area list, a frame memory 11 for storing display image data, and a Z buffer for storing Z coordinate values for one screen. 12 and so on. Further, the hidden surface processing unit 20 includes a representative value calculating unit 21, a Z buffer applied area extracting unit 22, an object sorting unit 23, a pixel interpolating unit 24,
Z buffer application area determination unit 25 and Z coordinate value comparison unit 2
Have 6. Further, the hidden surface processing unit 20 and each of the memories 10, 1
It has a data bus line 13 for exchanging data with the devices 1 and 12. The control unit 14 controls the operation of the hidden surface processing unit 20.
【0027】以下、図2のブロック図を参照しながら説
明を行う。まず、入力されるオブジェクトのデータ(ポ
リゴンリスト)がメモリ10に記憶される。オブジェク
トのデータの内容は、オブジェクト番号、オブジェクト
を構成するポリゴン番号と、各ポリゴンの頂点座標
(X、Y、Z座標)、頂点におけるRGBの色輝度情報
等である(図6(c)ポリゴンリスト参照)。Hereinafter, description will be made with reference to the block diagram of FIG. First, data of an input object (polygon list) is stored in the memory 10. The contents of the object data include an object number, a polygon number constituting the object, vertex coordinates (X, Y, Z coordinates) of each polygon, and RGB color / luminance information at the vertices (FIG. 6 (c) polygon list). reference).
【0028】次に、代表値算出部21はポリゴンリスト
を、データバスライン13を介してメモリ10から読み
出し、オブジェクトを代表するX、Y、Z座標を求め
る。本実施例では、オブジェクトを構成する全ポリゴン
の全頂点座標からX、Y、Z座標の最小値、最大値を求
め、これを代表値とする。ここで、オブジェクトの代表
値として求めたX座標の最小値、最大値をそれぞれxm
in、xmax、Y座標の最小値、最大値をそれぞれy
min、ymax、Z座標の最小値、最大値をそれぞれ
zmin、zmaxとする。Next, the representative value calculation unit 21 reads the polygon list from the memory 10 via the data bus line 13 and obtains X, Y, and Z coordinates representing the object. In this embodiment, the minimum and maximum values of X, Y, and Z coordinates are obtained from the coordinates of all the vertices of all the polygons that make up the object, and these are used as representative values. Here, the minimum value and the maximum value of the X coordinate obtained as the representative value of the object are respectively xm
in, xmax, y coordinate minimum and maximum
The minimum and maximum values of min, ymax, and Z coordinate are set to zmin and zmax, respectively.
【0029】図3に、3次元空間におけるオブジェクト
とその代表値との関係を示す。X=xminを通るYZ
平面に平行な平面、X=xmaxを通るYZ平面に平行
な平面、Y=yminを通るXZ平面に平行な平面、Y
=ymaxを通るXZ平面に平行な平面、Z=zmin
を通るXY平面に平行な平面、Z=zmaxを通るXY
平面に平行な平面の6平面を面として持つ直方体30
は、すべての面がXY平面、YZ平面、XZ平面のいず
れかに平行な、オブジェクト31を包含する最小の直方
体となる。すなわち、xmin、xmax、ymin、
ymax、zmin、zmaxを求めることは、オブジ
ェクト31を包含する直方体30の位置を確定すること
に等しい。画面内に存在する全てのオブジェクトについ
て、同様にそのオブジェクトを含む直方体の位置を求め
る。なお、これらの最小値と最大値(xmin、xma
x、ymin、ymax、zmin、zmax)のこと
を以下直方体のパラメータとよぶ。FIG. 3 shows the relationship between objects and their representative values in a three-dimensional space. X = YZ through xmin
A plane parallel to the plane, a plane parallel to the YZ plane passing through X = xmax, a plane parallel to the XZ plane passing through Y = ymin, Y
= Plane parallel to the XZ plane passing through ymax, Z = zmin
A plane parallel to the XY plane passing through XY passing through Z = zmax
A rectangular parallelepiped 30 having six planes parallel to the plane as planes
Is the smallest rectangular parallelepiped that includes the object 31 and whose faces are all parallel to one of the XY plane, the YZ plane, and the XZ plane. That is, xmin, xmax, ymin,
Determining ymax, zmin, zmax is equivalent to determining the position of the rectangular parallelepiped 30 containing the object 31. The position of a rectangular parallelepiped including the object is similarly obtained for all the objects existing on the screen. Note that these minimum and maximum values (xmin, xma
x, ymin, ymax, zmin, zmax) are hereinafter referred to as rectangular parallelepiped parameters.
【0030】次に、Zバッファ適用領域抽出部22で
は、上記直方体のパラメータを用いて直方体間の位置関
係を確定し、以後の処理に使用するリストを作成する。
二つの直方体間の位置関係は、(1)3次元空間で重な
りを持つ場合と、(2)3次元空間で重なりを持たない
場合、の二通りに分類される。Next, the Z-buffer application area extraction unit 22 determines the positional relationship between the rectangular parallelepipeds using the parameters of the rectangular parallelepiped, and creates a list to be used for the subsequent processing.
The positional relationship between two rectangular parallelepipeds is classified into two types: (1) a case where there is an overlap in a three-dimensional space, and (2) a case where there is no overlap in a three-dimensional space.
【0031】(1)の場合、直方体に含まれるオブジェ
クト同士が3次元空間で重なりを有する可能性があるた
め、直方体の重なり部分のXY平面における投影面に対
し、Zバッファ12を用いてZバッファ法による隠面処
理を行う。In the case of (1), since objects included in the rectangular parallelepiped may overlap in the three-dimensional space, the Z-buffer 12 is used to position the overlapping plane of the rectangular parallelepiped on the projection plane on the XY plane. Perform hidden surface processing by the method.
【0032】(2)の場合は、視点から遠い方のオブジ
ェクトを先にフレームメモリ11に描画した後、手前の
オブジェクトをフレームメモリ11に描画することによ
り、すなわち上書きすることにより隠面処理を行う。た
だし、ここで、オブジェクトの描画とは、オブジェクト
を構成する三角形ポリゴンのうち、面が視点に対して表
向きの有効なポリゴン(すなわち、視点から見える面)
を描画することを意味する。視点に対して面が裏向きの
ポリゴン(すなわち、視点から見えない面)は描画され
ない。In the case of (2), after the object farther from the viewpoint is drawn on the frame memory 11, the hidden object processing is performed by drawing the object on the near side in the frame memory 11, that is, by overwriting. . Here, the drawing of the object is a valid polygon whose surface is facing the viewpoint from among the triangular polygons constituting the object (that is, the surface that can be seen from the viewpoint).
Means to draw. Polygons whose surfaces face down with respect to the viewpoint (that is, surfaces that cannot be seen from the viewpoint) are not drawn.
【0033】直方体間の位置関係の確定は、次のように
行われる。一例として、図4にオブジェクト1とオブジ
ェクト2をそれぞれ包含する直方体同士の位置関係を示
し、この重なりを調べる手順を説明する。なお、図4
(a)はXY平面における重なりを、(b)はYZ平面
における重なりを示している。The positional relationship between the rectangular parallelepipeds is determined as follows. As an example, FIG. 4 shows a positional relationship between rectangular parallelepipeds each containing the object 1 and the object 2, and a procedure for checking the overlap will be described. FIG.
(A) shows the overlap on the XY plane, and (b) shows the overlap on the YZ plane.
【0034】まず、オブジェクト1、オブジェクト2を
包含する直方体を、それぞれ直方体1、直方体2とす
る。また、直方体1のxmin、xmaxをそれぞれx
min1、xmax1とする。同様に直方体2のxmi
n、xmaxをそれぞれxmin2、xmax2とす
る。このとき、直方体1と直方体2がX方向で重なりを
持たない条件は、xmax1<xmin2またはxma
x2<xmin1である。したがって、この条件を満た
すときにはX方向で重なりが存在しない。この条件を満
たさないときは、X方向で重なりが存在するかもしれな
いといえる。First, the rectangular parallelepipeds including the object 1 and the object 2 are referred to as rectangular parallelepipeds 1 and 2, respectively. Further, xmin and xmax of the rectangular parallelepiped 1 are respectively represented by x
min1 and xmax1. Similarly, xmi of the rectangular parallelepiped 2
Let n and xmax be xmin2 and xmax2, respectively. At this time, the condition that the rectangular parallelepiped 1 and the rectangular parallelepiped 2 do not overlap in the X direction is xmax1 <xmin2 or xma
x2 <xmin1. Therefore, when this condition is satisfied, no overlap exists in the X direction. When this condition is not satisfied, it can be said that an overlap may exist in the X direction.
【0035】同様にY方向、Z方向についても直方体の
パラメータを用いて重なりの有無を調べる。X、Y、Z
の全3方向において重なりが存在するときには、上記
(1)の「3次元空間で重なりを持つ場合」に分類で
き、X、Y、Zの全3方向のうち少なくとも1方向で重
なりが存在しないときには、上記(2)の「3次元空間
で重なりを持たない場合」に分類できる。Similarly, in the Y direction and the Z direction, the presence or absence of the overlap is checked by using the parameters of the rectangular parallelepiped. X, Y, Z
When there is an overlap in all three directions, it can be classified into the above-mentioned (1) “when there is overlap in the three-dimensional space”. When there is no overlap in at least one of the three directions X, Y, and Z, And (2) “when there is no overlap in the three-dimensional space”.
【0036】上述したように直方体間の位置関係を分類
した結果、(1)の「3次元空間で重なりを持つ場合」
に分類された場合は、XY平面における重なりの領域を
Zバッファ適用領域Zbとし、領域を規定するパラメー
タを求める。このパラメータのことを領域パラメータと
呼ぶことにする。領域パラメータは、Zバッファ適用領
域Zbの4辺を規定する二つのX座標と二つのY座標で
ある。図4に示した例では、X=xmin2、xmax
1とY=ymin1、ymax2である。As described above, as a result of classifying the positional relationship between the rectangular parallelepipeds, (1) “in the case of having an overlap in a three-dimensional space”
When the classification is made, the overlapping area on the XY plane is defined as a Z buffer application area Zb, and parameters defining the area are obtained. This parameter is called a region parameter. The area parameters are two X coordinates and two Y coordinates that define the four sides of the Z buffer application area Zb. In the example shown in FIG. 4, X = xmin2, xmax
1 and Y = ymin1, ymax2.
【0037】3次元空間にオブジェクトが3個以上存在
する場合には、各オブジェクトを包含する直方体の全て
の組み合わせについて、上記の手順で位置関係を分類
し、Zバッファ適用領域Zbを求める。If there are three or more objects in the three-dimensional space, the positional relationship is classified according to the above procedure for all combinations of rectangular parallelepipeds containing each object, and the Z buffer application area Zb is obtained.
【0038】上記(1)に分類された場合は、直方体の
領域のうちZバッファ適用領域Zbの部分に対してZバ
ッファ法を用いた隠面処理を行う。Zバッファ適用領域
Zb以外の部分については、Zバッファ法が不要な領域
であるため、視点から遠い順に直方体内のポリゴンを描
画し、上書きによる隠面処理を行う。In the case of the above (1), hidden surface processing using the Z-buffer method is performed on the Z-buffer application area Zb in the rectangular parallelepiped area. Since the area other than the Z-buffer application area Zb is an area that does not require the Z-buffer method, polygons in a rectangular parallelepiped are drawn in order from the farthest from the viewpoint, and hidden surface processing by overwriting is performed.
【0039】上記(2)に分類された直方体の領域は、
上記(1)の領域のうちZバッファ適用領域以外の領域
と同様に、Zバッファ法が不要な領域なので、上書きに
よる隠面処理を行う。この上書きによる隠面処理のた
め、オブジェクトソート部23では直方体を処理の順番
に並べるソート処理を行い、全ての直方体を視点に対し
て遠い順番で並べる。The rectangular parallelepiped area classified in the above (2) is
Since the Z-buffer method is not required in the region (1) except for the region other than the Z-buffer application region, the hidden surface processing by overwriting is performed. For the hidden surface processing by this overwriting, the object sorting unit 23 performs a sorting process for arranging the rectangular parallelepipeds in the processing order, and arranges all the rectangular parallelepipeds in an order far from the viewpoint.
【0040】次に、オブジェクトリストとZバッファ適
用領域リストの作成手順について説明する。一例として
4個のオブジェクト1〜4が3次元空間に存在する場合
を考える。図5に、オブジェクト1〜4をそれぞれ包含
する直方体1〜4の位置関係を示す。なお、図5におい
て、(a)はXY平面、(b)はYZ平面での重なりを
それぞれ示す。また、この場合のオブジェクトリスト、
Zバッファ適用リストを図6に示す。直方体間の位置関
係の確定処理は、次の6通りの直方体の組み合わせにつ
いて行う。6通りの組み合わせとは、すなわち、直方体
1と直方体2〜4との組み合わせ、直方体2と直方体
3、4との組み合わせ、直方体3と直方体4との組み合
わせである。Next, a procedure for creating the object list and the Z-buffer application area list will be described. As an example, consider a case where four objects 1 to 4 exist in a three-dimensional space. FIG. 5 shows the positional relationship between the rectangular parallelepipeds 1 to 4 including the objects 1 to 4, respectively. In FIG. 5, (a) shows the overlap on the XY plane, and (b) shows the overlap on the YZ plane. Also, the object list in this case,
FIG. 6 shows the Z buffer application list. The processing for determining the positional relationship between the rectangular parallelepipeds is performed for the following six combinations of rectangular parallelepipeds. The six combinations are a combination of the cuboid 1 and the cuboids 2 to 4, a combination of the cuboid 2 and the cuboids 3 and 4, and a combination of the cuboid 3 and the cuboid 4.
【0041】Zバッファ適用領域抽出部22による位置
関係の確定処理の結果、直方体2と3が上記(1)の
「3次元空間で重なりを持つ場合」に分類され、Zバッ
ファ適用領域Zbを共有することがわかる。このZバッ
ファ適用領域ZbをZバッファ適用領域1とし、Zバッ
ファ適用領域リストに領域番号と領域パラメータを記述
する(図6(b)参照)。As a result of the processing for determining the positional relationship by the Z-buffer application area extraction unit 22, the rectangular parallelepipeds 2 and 3 are classified into the above-mentioned (1) "in a case where they overlap in a three-dimensional space" and share the Z-buffer application area Zb. You can see that This Z-buffer application area Zb is defined as a Z-buffer application area 1, and an area number and an area parameter are described in the Z-buffer application area list (see FIG. 6B).
【0042】また、オブジェクトソート部23では、各
直方体のzmin(XY平面に平行な視点に近い面のZ
座標)により直方体1〜4のソート処理を行う。この結
果、直方体は視点から遠い順に3、2、4、1となる。
この結果をオブジェクトリストに記述する(図6(a)
参照)。オブジェクトリストには、オブジェクトの番号
(直方体の番号)と共に、Zバッファ適用領域Zbの有
無、Zバッファ適用領域が存在する場合にはその番号を
記述する。これらZバッファ適用領域リスト、オブジェ
クトリストはメモリ10に書き込まれる。Further, the object sorting unit 23 calculates the zmin (Zin of the plane parallel to the viewpoint parallel to the XY plane) of each rectangular solid.
(Coordinates) to sort the rectangular parallelepipeds 1 to 4. As a result, the rectangular parallelepipeds are 3, 2, 4, and 1 in order of being farther from the viewpoint.
This result is described in the object list (FIG. 6A)
reference). In the object list, the presence or absence of the Z-buffer application area Zb and the number of the Z-buffer application area, if any, are described together with the object number (the number of the rectangular parallelepiped). The Z buffer application area list and the object list are written to the memory 10.
【0043】上述したように、オブジェクトリスト、Z
バッファ適用領域リストを作成した後、これらのリスト
を参照して、描画処理を行う。この処理の概要を以下に
説明する。As described above, the object list, Z
After creating the buffer application area list, drawing processing is performed with reference to these lists. The outline of this processing will be described below.
【0044】まず、オブジェクトリストを1行ずつ読み
出し、各行に記述されている番号のオブジェクトの処理
を行う。各オブジェクトについて、そのオブジェクトの
ポリゴンが記述されているポリゴンリストを読み出し、
記述されているポリゴンを一つずつ処理する。(ここ
で、ポリゴンリストとは図6(c)に例を示すように、
各オブジェクトを構成しているポリゴンについて頂点の
座標値、色輝度等が記述してあるリストであり、オブジ
ェクトのデータとして外部から入力されるものであ
る。)画素補間部24では、各ポリゴンについて、ポリ
ゴンの頂点の座標、色輝度からポリゴン内の画素の色輝
度を補間する画素補間処理を行い、フレームメモリ11
に書き込む。ただし、Zバッファ適用領域Zbを有する
オブジェクトを処理する場合、すなわち図1のステップ
201でZバッファ適用領域ありの場合には、Zバッフ
ァ適用領域判定部25において、処理中の画素のX、Y
座標がそのオブジェクトのZバッファ適用領域Zbに含
まれるか否かのチェックを行う(図12のステップ21
1)。すなわち、処理中の画素がZバッファ適用領域外
か否かを判定し、「否」の場合(すなわち、Zバッファ
適用領域内に含まれる場合)には、図12のステップ2
12に進み、その画素についてZバッファ12を用いて
処理を行う。ただし、Zバッファ12とは、画素のX、
Y座標に対するZ座標値を記憶しておくバッファメモリ
のことである。処理中の画素がZバッファ適用領域外で
あれば、ステップ213へ進みフレームメモリへ書き込
む(上書きする)。First, the object list is read out one line at a time, and an object with the number described in each line is processed. For each object, read the polygon list that describes the polygon of that object,
Process the described polygons one by one. (Here, the polygon list is, as shown in FIG.
This is a list in which the coordinate values of the vertices, the color brightness, and the like are described for the polygons that make up each object, and are input from outside as object data. The pixel interpolator 24 performs a pixel interpolation process for each polygon to interpolate the color luminance of the pixels in the polygon from the coordinates and color luminance of the vertices of the polygon, and the frame memory 11
Write to. However, when processing an object having a Z-buffer application area Zb, that is, when there is a Z-buffer application area in step 201 in FIG.
It is checked whether or not the coordinates are included in the Z buffer application area Zb of the object (step 21 in FIG. 12).
1). That is, it is determined whether or not the pixel being processed is outside the Z-buffer application area, and if “no” (that is, if the pixel being included in the Z-buffer application area), it is determined in step 2
Proceeding to step S12, the pixel is processed using the Z buffer 12. However, the Z buffer 12 is defined as X,
This is a buffer memory that stores the Z coordinate value for the Y coordinate. If the pixel being processed is outside the Z-buffer application area, the flow advances to step 213 to write (overwrite) in the frame memory.
【0045】ステップ212のZバッファ12を用いた
処理では、Z座標値比較部26において、Zバッファ1
2に記憶してあるZ座標値を読み出し、これと処理中の
画素のZ座標値を比較し、処理中の画素のZ座標値の方
が小さければその画素は可視、大きければ不可視である
と判定する。可視と判定した場合には、フレームメモリ
11にその画素の色輝度を書き込むと共に、Zバッファ
12のZ座標値をその画素のZ座標に更新する。なお、
Zバッファ12のZ座標値は初期状態では視点から十分
に遠いZ座標にしておく。このステップ211と212
またはステップ211と213の処理を、オブジェクト
内の全画素に対して行い(ステップ214と215)、
全画素終了したら図1のステップ203ヘ進み、次のオ
ブジェクトがあれば、ステップ201へ進み、無ければ
描画処理ルーチン200を終了する。In the process using the Z buffer 12 in step 212, the Z coordinate
2, the Z coordinate value of the pixel being processed is compared with the Z coordinate value of the pixel being processed, and if the Z coordinate value of the pixel being processed is smaller, the pixel is visible; judge. If it is determined that the pixel is visible, the color luminance of the pixel is written to the frame memory 11 and the Z coordinate value of the Z buffer 12 is updated to the Z coordinate of the pixel. In addition,
In the initial state, the Z coordinate value of the Z buffer 12 is set to a Z coordinate sufficiently far from the viewpoint. Steps 211 and 212
Alternatively, the processing of steps 211 and 213 is performed on all the pixels in the object (steps 214 and 215),
When all the pixels are completed, the process proceeds to step 203 in FIG. 1. If there is the next object, the process proceeds to step 201. If there is no next object, the drawing process routine 200 ends.
【0046】以下、図6(a)のオブジェクトリストを
用いて描画処理を行う場合を具体例にとり説明する。Hereinafter, a case where the drawing process is performed using the object list of FIG. 6A will be described as a specific example.
【0047】まず、オブジェクトリストの一行目を読み
出す。この場合、オブジェクトの番号は3でZバッファ
適用領域Zbは1となっているので、オブジェクト3を
構成するポリゴンの記述を図6(c)のポリゴンリスト
から読み出し、画素補間部24でポリゴン毎に画素補間
処理を行う。この際に、処理画素のX、Y座標がZバッ
ファ適用領域1内である場合には、Zバッファ12を用
いて処理を行う。First, the first line of the object list is read. In this case, since the object number is 3 and the Z-buffer application area Zb is 1, the description of the polygons constituting the object 3 is read from the polygon list shown in FIG. Perform pixel interpolation processing. At this time, if the X and Y coordinates of the processing pixel are within the Z buffer application area 1, the processing is performed using the Z buffer 12.
【0048】オブジェクト3の処理が終了した時点で、
フレームメモリ11には、オブジェクト3のポリゴンの
画素データが書き込まれている。また、Zバッファ12
のZバッファ適用領域1の部分には、それぞれのX、Y
座標値におけるオブジェクト3のポリゴンのZ座標値が
書き込まれている。When the processing of the object 3 is completed,
In the frame memory 11, pixel data of the polygon of the object 3 is written. The Z buffer 12
Of the Z buffer application area 1 of the
The Z coordinate value of the polygon of the object 3 at the coordinate value is written.
【0049】次に、オブジェクトリストの2行目に記述
されているオブジェクト2に対する処理を行う。オブジ
ェクト2は、オブジェクト3と同様にZバッファ適用領
域1を持つ。したがって、オブジェクト2のポリゴン内
の画素のうち、Zバッファ適用領域1内に含まれる画素
についてはZバッファ12を用いて処理を行う。Zバッ
ファ12のZバッファ適用領域1の部分で、オブジェク
ト3のポリゴンの画素が存在する部分には、既にオブジ
ェクト3のZ座標値が書き込まれている。そのため、オ
ブジェクト3とオブジェクト2のポリゴンの画素がXY
平面で重なっている部分では、Zバッファ12を参照し
てZ座標値の比較を行うことはオブジェクト2とオブジ
ェクト3のZ座標値比較を行うことに等しい。Next, processing is performed on the object 2 described in the second line of the object list. The object 2 has a Z-buffer application area 1 like the object 3. Therefore, among the pixels in the polygon of the object 2, the pixels included in the Z buffer application area 1 are processed using the Z buffer 12. In the portion of the Z buffer 12 in the Z buffer application area 1 where the polygon pixels of the object 3 exist, the Z coordinate value of the object 3 has already been written. Therefore, the pixels of the polygons of the object 3 and the object 2 are XY
In the overlapping part on the plane, comparing the Z coordinate values with reference to the Z buffer 12 is equivalent to comparing the Z coordinate values of the object 2 and the object 3.
【0050】この比較の結果、オブジェクト2の画素の
方が視点に近い場合には、フレームメモリ11にオブジ
ェクト2の画素を書き込み、Zバッファ12のZ座標値
をオブジェクト2のZ座標値に書き換える。Zバッファ
適用領域1に含まれない画素の場合は、Zバッファ12
を参照することなしに、フレームメモリ11へ書き込
む。オブジェクト2の処理が完了した時点で、フレーム
メモリ11にはオブジェクト2とオブジェクト3の画素
が隠面処理を施された状態で書き込まれていることにな
る。As a result of this comparison, when the pixel of the object 2 is closer to the viewpoint, the pixel of the object 2 is written into the frame memory 11 and the Z coordinate value of the Z buffer 12 is rewritten to the Z coordinate value of the object 2. If the pixel is not included in the Z buffer application area 1, the Z buffer 12
Is written to the frame memory 11 without referring to. When the processing of the object 2 is completed, the pixels of the object 2 and the object 3 have been written in the frame memory 11 in a state where the hidden surface processing has been performed.
【0051】引き続きオブジェクトリストに従い、オブ
ジェクト4、オブジェクト1の処理を順番に行う。オブ
ジェクト4とオブジェクト1はどちらもZバッファ適用
領域Zbを持たないので、各オブジェクトを構成するポ
リゴンの画素を、Zバッファ12を参照することなしに
フレームメモリ11に書き込む。Subsequently, according to the object list, the processing of the object 4 and the object 1 is performed in order. Since neither the object 4 nor the object 1 has the Z-buffer application area Zb, the pixels of the polygons constituting each object are written into the frame memory 11 without referring to the Z-buffer 12.
【0052】以上述べたように、オブジェクトリストに
従いオブジェクト3、2、4、1の順で処理を行った結
果、フレームメモリ11には、オブジェクト1〜4の隠
面処理を施したデータが書き込まれる。このフレームメ
モリ11を読み出して表示することにより所望の表示画
像を得ることができる。As described above, as a result of performing the processing in the order of the objects 3, 2, 4, and 1 in accordance with the object list, data obtained by performing the hidden surface processing of the objects 1 to 4 is written in the frame memory 11. . By reading and displaying the frame memory 11, a desired display image can be obtained.
【0053】このように、本実施例では、3次元オブジ
ェクトを、そのオブジェクトを含む直方体で代表させ、
直方体間の位置関係を調べることによって隠面処理の順
番を決めている。このため、従来例のように、ポリゴン
単位でソート処理を行う場合に比べ、ソート処理の処理
量が少ない。また、Zバッファ法を適用する領域を最小
限にできるため、Zバッファ用のメモリに対する書き込
み、読み出しの処理量を低減できる。すなわち、Zバッ
ファを用いる領域を必要最小限にでき、Zバッファを用
いてのZ座標値比較及び更新処理を低減できる。As described above, in this embodiment, a three-dimensional object is represented by a rectangular parallelepiped including the object.
The order of the hidden surface processing is determined by examining the positional relationship between the rectangular parallelepipeds. For this reason, the processing amount of the sort processing is smaller than in the case of performing the sort processing in units of polygons as in the conventional example. In addition, since the area to which the Z-buffer method is applied can be minimized, the amount of processing for writing to and reading from the Z-buffer memory can be reduced. That is, the area using the Z buffer can be minimized, and the Z coordinate value comparison and update processing using the Z buffer can be reduced.
【0054】<実施例2>図7は、本発明の隠面処理方
法を実現する隠面処理回路の別の構成例を示すブロック
図である。本実施例は、Zバッファのサイズが画面のサ
イズよりも小さい場合に、一つのZバッファを複数の領
域に共用する隠面処理方法である。なお、図7におい
て、前記実施例の図2で示した部分と同じ構成部分に
は、同一の参照符号を付してその詳細な説明は省略す
る。すなわち、本実施例の構成は、図2で示した隠面処
理回路15の隠面処理部20に、Zバッファ適用領域分
割部71とポリゴン分割部72を付加している点、およ
びZバッファのサイズに関する点で前記実施例と相違す
る。図7に示した隠面処理回路70におけるZバッファ
73のサイズは、m画素×n画素である。ただし、ここ
で画面サイズは、M画素×N画素であり、mとM及びn
とNの関係は、m<M、n<Nであるとする。すなわ
ち、前記実施例と異なり、本実施例のZバッファ73
は、1画面分よりも少ないZ座標値を記憶するメモリ量
のZバッファである。<Embodiment 2> FIG. 7 is a block diagram showing another configuration example of a hidden surface processing circuit for realizing the hidden surface processing method of the present invention. This embodiment is a hidden surface processing method in which one Z buffer is shared by a plurality of areas when the size of the Z buffer is smaller than the size of the screen. 7, the same components as those of the embodiment shown in FIG. 2 are denoted by the same reference numerals, and detailed description thereof will be omitted. That is, the configuration of the present embodiment is different from the configuration in that the Z-buffer application area division unit 71 and the polygon division unit 72 are added to the hidden surface processing unit 20 of the hidden surface processing circuit 15 shown in FIG. This embodiment is different from the above embodiment in the size. The size of the Z buffer 73 in the hidden surface processing circuit 70 shown in FIG. 7 is m pixels × n pixels. Here, the screen size is M pixels × N pixels, and m, M, and n
And N are assumed to be m <M and n <N. That is, unlike the above embodiment, the Z buffer 73 of the present embodiment
Is a Z buffer having a memory amount for storing Z coordinate values smaller than one screen.
【0055】以下、本実施例の隠面処理方法について説
明する。前記実施例と同様に、代表値算出部21におい
て、メモリ10に入力されたオブジェクトデータに基づ
きオブジェクトを包含する直方体を求める。そして、Z
バッファ適用領域抽出部22において直方体間の位置関
係を確定し、オブジェクトソート部23ではオブジェク
トを視点から遠い順に並べたオブジェクトリストを作成
する。また、Zバッファ適用領域抽出部22は、直方体
間の位置関係を確定した結果3次元空間で重なりありと
分類された場合には、Zバッファ適用領域Zbの領域パ
ラメータを求める。Hereinafter, the hidden surface processing method of this embodiment will be described. As in the above embodiment, the representative value calculation unit 21 obtains a rectangular parallelepiped containing the object based on the object data input to the memory 10. And Z
The buffer application area extraction unit 22 determines the positional relationship between the rectangular parallelepipeds, and the object sort unit 23 creates an object list in which the objects are arranged in order from the farthest from the viewpoint. Further, when the positional relationship between the rectangular parallelepipeds is determined and the classification is determined to have the overlap in the three-dimensional space, the Z-buffer application area extraction unit 22 obtains the area parameter of the Z-buffer application area Zb.
【0056】更に、Zバッファ適用領域分割部71で
は、そのZバッファ適用領域ZbをZバッファ73のサ
イズに含まれるように分割する。ここで、Zバッファ適
用領域の分割の一例を図8に示す。図8に示すように、
例えばZバッファ適用領域Zbの左上から右上、左下、
右下の順番にZバッファ73のサイズを当てはめ、Zバ
ッファ適用領域ZbをZバッファサブ領域S1〜S4に
分割する。なお、分割する順番は、この順に限るもので
はない。Further, the Z-buffer application area dividing section 71 divides the Z-buffer application area Zb so as to be included in the size of the Z-buffer 73. Here, an example of division of the Z buffer application area is shown in FIG. As shown in FIG.
For example, from the upper left to the upper right, the lower left,
The size of the Z buffer 73 is applied in the lower right order, and the Z buffer application area Zb is divided into Z buffer sub-areas S1 to S4. Note that the order of division is not limited to this order.
【0057】次にポリゴン分割部72において、これら
Zバッファサブ領域S1〜S4に対して、それぞれのZ
バッファサブ領域Sk(k=正の整数、この例ではk=
1〜4)内に含まれるポリゴンのデータを抽出する。こ
こで、図9にZバッファサブ領域Skと抽出されるポリ
ゴンとの関係の一例を示す。Next, in the polygon division section 72, for each of the Z buffer sub-areas S1 to S4,
Buffer sub-region Sk (k = positive integer, in this example k =
Extract polygon data included in (1) to (4). Here, FIG. 9 shows an example of the relationship between the Z buffer sub-region Sk and the polygon to be extracted.
【0058】図9の例は、Zバッファサブ領域Skにポ
リゴンP1の一部が含まれている場合である。このと
き、Zバッファサブ領域Skに含まれている四角形の部
分を、ポリゴンP1−1とポリゴンP1−2の二つのポ
リゴンに分割する。ポリゴンP1−1とポリゴンP1−
2は、Zバッファサブ領域Skに全ての頂点が含まれる
ポリゴンである。Zバッファサブ領域のパラメータは、
図10(a)に示すような、Zバッファ適用領域番号、
Zバッファサブ領域数、サブ領域番号、座標値から構成
されるZバッファサブ領域リストに記述される。Zバッ
ファサブ領域に新たに定義されたポリゴンの頂点データ
と色輝度データは、図10(b)に示すような、Zバッ
ファサブ領域番号、サブポリゴン数、サブポリゴン番
号、頂点座標から構成されるサブポリゴンリストに記述
される。サブポリゴンリストは、一つのZバッファサブ
領域を共有する複数のオブジェクトについてまとめて記
述される。すなわち、Zバッファサブ領域内のポリゴン
データの情報は、まとめてサブポリゴンリストに記述さ
れることになる。これらのZバッファサブ領域リスト、
サブポリゴンリストはメモリ10に格納される。FIG. 9 shows an example in which the Z buffer sub area Sk includes a part of the polygon P1. At this time, the quadrangular portion included in the Z buffer sub-region Sk is divided into two polygons, a polygon P1-1 and a polygon P1-2. Polygon P1-1 and polygon P1-
2 is a polygon in which all vertices are included in the Z buffer sub-region Sk. The parameters of the Z buffer sub-region are:
A Z buffer application area number as shown in FIG.
It is described in a Z buffer sub area list composed of the number of Z buffer sub areas, sub area numbers, and coordinate values. The vertex data and the color / luminance data of the polygon newly defined in the Z buffer sub area are composed of the Z buffer sub area number, the number of sub polygons, the sub polygon number, and the vertex coordinates as shown in FIG. Described in the sub polygon list. The sub-polygon list is collectively described for a plurality of objects sharing one Z-buffer sub-area. That is, the information of the polygon data in the Z buffer sub-area is collectively described in the sub-polygon list. These Z-buffer sub-area lists,
The sub-polygon list is stored in the memory 10.
【0059】上記リストを作成した後、次のように描画
処理を行う。ここで、図11に本実施例の隠面処理方法
における描画処理フローの概略を示す。前記実施例の図
2で示した描画処理フローと異なる点は、描画処理ルー
チン200において、図1のZバッファ法による隠面処
理部分210が、ステップ221〜ステップ224から
なるZバッファ適用領域外処理部分220と、Zバッフ
ァ適用領域未処理の有無を判定するステップ230と、
ステップ241〜ステップ243からなるZバッファ適
用領域内処理部分240とに置き換わっている点であ
る。After the above list is created, a drawing process is performed as follows. Here, FIG. 11 shows an outline of a drawing processing flow in the hidden surface processing method of the present embodiment. The difference from the drawing processing flow shown in FIG. 2 of the embodiment is that in the drawing processing routine 200, the hidden surface processing part 210 by the Z buffer method in FIG. A part 220 and a step 230 for determining whether or not the Z-buffer application area has not been processed;
The point is that the processing part 240 is replaced with a processing part 240 in the Z buffer application area which is composed of steps 241 to 243.
【0060】本実施例の描画処理は、前記実施例同様に
オブジェクトリストに従って視点から最も遠いオブジェ
クトから順に描画処理を開始し、オブジェクト毎に処理
を行う。In the drawing process of the present embodiment, the drawing process is started in order from the object farthest from the viewpoint in accordance with the object list, and the process is performed for each object in the same manner as in the above embodiment.
【0061】ステップ201において、描画するオブジ
ェクトにZバッファ適用領域が有るか否かをZバッファ
適用領域判定部25で判定し、Zバッファ適用領域が存
在するオブジェクトを処理する場合には、ステップ22
1において、Zバッファ適用領域リストを参照し、処理
中の画素がZバッファ適用領域外か否か、すなわちZバ
ッファ適用領域に含まれるか否かをチェックする。処理
中の画素がZバッファ適用領域外の場合(Zバッファ適
用領域に含まれない場合)は、ステップ222へ進み、
Zバッファ適用領域に含まれる場合はステップ224へ
進み、次の画素に対してステップ221からの処理を繰
り返す。すなわち、処理中の画素がZバッファ適用領域
に含まれない場合のみ、その画素をフレームメモリ11
に書き込み、上書きによる隠面処理をする。In step 201, the Z-buffer application area determination unit 25 determines whether or not the object to be drawn has a Z-buffer application area.
In step 1, it is checked whether or not the pixel being processed is outside the Z-buffer application area, that is, whether or not the pixel being processed is included in the Z-buffer application area. If the pixel being processed is outside the Z-buffer application area (if not included in the Z-buffer application area), the process proceeds to step 222,
If it is included in the Z-buffer application area, the process proceeds to step 224, and the processing from step 221 is repeated for the next pixel. That is, only when the pixel under processing is not included in the Z-buffer application area, the pixel is stored in the frame memory 11.
And perform hidden surface processing by overwriting.
【0062】次にステップ223へ進み、オブジェクト
内にあるZバッファ適用領域外の全画素の隠面処理が終
了したかを判定し、未だの場合は次の画素に対してステ
ップ221へ戻り同様の処理を繰り返す。Zバッファ適
用領域外の全画素の処理が終了した場合は、ステップ2
30へ進む。Next, the process proceeds to step 223, where it is determined whether or not the hidden surface processing has been completed for all pixels outside the Z-buffer application area in the object. If not, the process returns to step 221 for the next pixel, and the same. Repeat the process. If processing of all pixels outside the Z buffer application area is completed, step 2
Proceed to 30.
【0063】ステップ230では、処理中のオブジェク
トにZバッファ適用領域の未処理部分があるかを判定
し、未処理部分がある場合にはZバッファ適用領域内処
理部分240へ進み、無い場合にはステップ203へ進
む。In step 230, it is determined whether or not the object being processed has an unprocessed portion of the Z-buffer application area. If there is an unprocessed part, the process proceeds to the processing section 240 in the Z-buffer application area. Proceed to step 203.
【0064】ステップ203では描画処理をするオブジ
ェクトの有無を判定し、有りの場合はステップ204を
経由して次のオブジェクトに対してステップ201から
の同様の処理を繰り返す。In step 203, it is determined whether or not there is an object to be rendered. If so, the same processing from step 201 is repeated for the next object via step 204.
【0065】Zバッファ適用領域内処理部分240の画
素の処理は、Zバッファ適用領域外のポリゴンの画素処
理とは独立に次の手順で行う。なお、Zバッファ適用領
域がある場合には、前述したようにZバッファ適用領域
分割部71により、そのZバッファ適用領域はZバッフ
ァ73のサイズに含まれるようにZバッファサブ領域に
分割され、そのZバッファサブ領域のパラメータはZバ
ッファサブ領域リストに記述されている。そして、ポリ
ゴン分割部72により、各Zバッファサブ領域内に含ま
れるポリゴンのデータが抽出され、サブポリゴンリスト
に記述されている。これらのリストは、メモリ10に格
納されている。The processing of the pixels in the processing portion 240 in the Z-buffer application area is performed in the following procedure independently of the pixel processing of the polygon outside the Z-buffer application area. If there is a Z-buffer application area, the Z-buffer application area dividing unit 71 divides the Z-buffer application area into Z-buffer sub-areas so as to be included in the size of the Z-buffer 73 as described above. The parameters of the Z buffer sub area are described in the Z buffer sub area list. Then, polygon data included in each Z buffer sub-region is extracted by the polygon division unit 72 and described in the sub-polygon list. These lists are stored in the memory 10.
【0066】描画処理は、Zバッファ適用領域内のZバ
ッファサブ領域(以下では、単にサブ領域と呼ぶ)毎に
行われる。The drawing process is performed for each Z buffer sub-region (hereinafter simply referred to as a sub-region) in the Z-buffer application region.
【0067】ステップ241において、サブ領域の一つ
をZバッファ法により隠面処理を行う。ここでは先ず、
Zバッファサブ領域リストを参照し、サブ領域の番号と
領域パラメータを求める。次に、サブポリゴンリストを
参照してそのサブ領域内に含まれるポリゴンデータを求
め、ポリゴン毎に処理を行う。画素補間部24により各
ポリゴンについて、ポリゴン内の画素を補間し、Zバッ
ファ73を用いた隠面処理、すなわちZバッファ法によ
る隠面処理を行うと共に、フレームメモリ11に書き込
む。そのサブ領域内の全ポリゴンの処理を終了したら、
次のステップ242に進み、処理すべき次のサブ領域が
有るかを判定する。次のサブ領域有りの場合はステップ
243へ進み、Zバッファ73を初期化して、ステップ
241へ戻り、次のサブ領域について同様の処理を行
う。In step 241, hidden surface processing is performed on one of the sub-regions by the Z-buffer method. Here, first,
With reference to the Z-buffer sub-area list, a sub-area number and an area parameter are obtained. Next, polygon data included in the sub-region is obtained with reference to the sub-polygon list, and processing is performed for each polygon. For each polygon, the pixel interpolating unit 24 interpolates the pixels in the polygon, performs hidden surface processing using the Z buffer 73, that is, performs hidden surface processing using the Z buffer method, and writes the result in the frame memory 11. After processing all polygons in that sub-region,
Proceeding to the next step 242, it is determined whether there is a next sub-region to be processed. If there is a next sub-region, the process proceeds to step 243, the Z buffer 73 is initialized, and the process returns to step 241 to perform the same processing for the next sub-region.
【0068】ステップ242の判定で、Zバッファ適用
領域内の全サブ領域について処理が終了すれば、処理中
のオブジェクトに対するZバッファ適用領域の描画処理
は終了となる。従って、ステップ203へ進み、描画処
理をする次のオブジェクトの有無を判定し、有りの場合
にはステップ204へ進み、更にステップ201へ戻
り、次のオブジェクトに対して同様の処理を行う。一
方、次のオブジェクト無しと判定した場合には、描画処
理を終了する。If it is determined in step 242 that the processing has been completed for all the sub-areas within the Z-buffer application area, the drawing processing of the Z-buffer application area for the object being processed is ended. Therefore, the process proceeds to step 203 to determine the presence or absence of the next object to be subjected to the drawing process. If there is, the process proceeds to step 204, and returns to step 201 to perform the same process on the next object. On the other hand, if it is determined that there is no next object, the drawing process is terminated.
【0069】なお、図11のフローチャートでは、ステ
ップ201でZバッファ適用領域有りの場合、Zバッフ
ァ適用領域外処理220の後にZバッファ適用領域内処
理240を行う場合を示したが、この順序は逆でもかま
わない。In the flowchart of FIG. 11, the case where the Z buffer applicable area is present at step 201 and the processing 240 inside the Z buffer applied area is performed after the processing 220 outside the Z buffer applied area, but the order is reversed. But it doesn't matter.
【0070】また、本実施例では、オブジェクトリスト
に記述される順番でオブジェクトの処理を行うが、Zバ
ッファ適用領域に関しては、そのZバッファ適用領域を
共有する二つのオブジェクトのうち、オブジェクトリス
トで先に記述されているオブジェクトの処理の前か後に
行う。例えば、前記実施例1の説明で用いた4個のオブ
ジェクトの例(図5参照)では、オブジェクトリストに
オブジェクト3、2、4、1の順で記述されている。オ
ブジェクト3と2は、図6(a)に示したように、Zバ
ッファ適用領域1を共有する。この場合の処理の順番
は、オブジェクト3のZバッファ適用領域以外の部分、
Zバッファ適用領域1、オブジェクト2のZバッファ適
用領域以外の部分、オブジェクト4、オブジェクト1の
順となる。In this embodiment, the objects are processed in the order described in the object list. However, regarding the Z-buffer application area, among the two objects sharing the Z-buffer application area, the object list is used first. Before or after processing the object described in. For example, in the example of four objects used in the description of the first embodiment (see FIG. 5), objects 3, 2, 4, and 1 are described in the object list in this order. The objects 3 and 2 share the Z-buffer application area 1 as shown in FIG. In this case, the order of the processing is a part of the object 3 other than the Z buffer application area,
The Z-buffer application area 1, the part of the object 2 other than the Z-buffer application area, the object 4, and the object 1 in that order.
【0071】上記したように、本実施例では、処理する
オブジェクトがZバッファ適用領域を持つ場合、そのオ
ブジェクトのZバッファ適用領域外とZバッファ適用領
域内とで画素の処理が異なる。すなわち、Zバッファ適
用領域外の画素はフレームメモリに上書きするが、Zバ
ッファ適用領域内の画素はZバッファサブ領域単位で処
理を行う。As described above, in the present embodiment, when an object to be processed has a Z-buffer application area, pixel processing differs between the object outside the Z-buffer application area and inside the Z-buffer application area. That is, pixels outside the Z-buffer application area overwrite the frame memory, but pixels in the Z-buffer application area are processed in units of the Z-buffer sub-area.
【0072】また、各オブジェクトのZバッファ適用領
域は一度だけ処理されれば良い。例えば、あるZバッフ
ァ適用領域がオブジェクト1とオブジェクト2で共通に
参照される場合、オブジェクト1の処理のときにそのZ
バファ適用領域の処理を行えば、オブジェクト2の処理
時に、そのZバッファ適用領域は処理しなくてよいた
め、各オブジェクトの処理では、Zバッファ適用領域が
未処理の場合のみ、Zバッファサブ領域単位の処理を行
えばよい。Zバッファ適用領域が未処理か、処理済かの
判定を行うために、例えば、図6(b)に示したZバッフ
ァ適用領域リストの項目に、Zバッファ適用領域の処理
状態を示す1ビットのフラグを追加し、各Zバッファ適
用領域を一度処理した後、そのフラグを立てるなどの方
法が可能である。Further, the Z buffer application area of each object needs to be processed only once. For example, when a certain Z buffer application area is commonly referred to by the object 1 and the object 2, when the object 1 is processed, the Z
If the processing of the buffer application area is performed, the Z buffer application area does not need to be processed when the object 2 is processed. Therefore, in the processing of each object, only when the Z buffer application area is unprocessed, the Z buffer sub area unit is used. May be performed. In order to determine whether the Z-buffer application area is unprocessed or processed, for example, a 1-bit item indicating the processing state of the Z-buffer application area is added to the item of the Z-buffer application area list shown in FIG. It is possible to add a flag, process each Z-buffer application area once, and then set the flag.
【0073】本実施例では、Zバッファのメモリ量を一
画面分持つことなく少ないZバッファ量で隠面処理を実
現できるため、前記実施例の効果に加えて、更に隠面処
理回路のメモリ量を低減できるという効果がある。In this embodiment, since the hidden surface processing can be realized with a small Z buffer amount without having the memory amount of the Z buffer for one screen, in addition to the effect of the above embodiment, the memory amount of the hidden surface processing circuit is further increased. This has the effect of reducing noise.
【0074】なお、実施例1、2で述べた本発明の隠面
処理方法及び、この隠面処理方法を適用した隠面処理装
置は、3次元オブジェクトのデータ等を格納するメモ
リ、オブジェクトのZ座標値を記憶するZバッファ、C
RTなどのディスプレイ装置に表示する表示データを記
憶するフレームメモリを有し、オブジェクトデータ等の
画像データを演算処理する演算処理回路等を備えた3次
元グラフィックス描画装置や、パーソナルコンピュータ
等における演算処理によりグラフィックス画像を作成す
る装置であれば、画像データの演算処理機能を構成する
部分に、ハード的及び/又はソフト的に、図2及び図7
のブロック図の隠面処理部20で説明した演算処理機能
を持たせることにより実現することができる。The hidden surface processing method of the present invention described in the first and second embodiments and the hidden surface processing apparatus to which the hidden surface processing method is applied include a memory for storing data of a three-dimensional object and the like, Z buffer for storing coordinate values, C
A three-dimensional graphics rendering device having a frame memory for storing display data to be displayed on a display device such as an RT, and an arithmetic processing circuit for performing arithmetic processing on image data such as object data, and arithmetic processing in a personal computer or the like 2 and FIG. 7 are provided in a part constituting an image data arithmetic processing function by hardware and / or software.
This can be realized by providing the arithmetic processing function described in the hidden surface processing unit 20 in the block diagram of FIG.
【0075】以上、本発明の好適な実施例について説明
したが、本発明は前記実施例に限定されることなく、本
発明の精神を逸脱しない範囲内において種々の設計変更
をなし得ることは勿論である。The preferred embodiment of the present invention has been described above. However, the present invention is not limited to the above-described embodiment, and various design changes can be made without departing from the spirit of the present invention. It is.
【0076】例えば、上述した二つの実施例では、オブ
ジェクトを代表する値としてオブジェクトを包含する直
方体のパラメータを求めるとしたが、代わりに、オブジ
ェクトを構成するポリゴンのうち、面が視点に対して表
向きの有効なポリゴンを全て含む最小の直方体のパラメ
ータを求めてもよい。この場合は、直方体のパラメータ
を求めるための処理量をより低減できる。For example, in the above-described two embodiments, the parameters of the rectangular parallelepiped containing the object are obtained as the representative values of the object. The parameter of the minimum rectangular parallelepiped including all the valid polygons may be obtained. In this case, the processing amount for obtaining the parameters of the rectangular parallelepiped can be further reduced.
【0077】また、上記の説明ではオブジェクトとして
3次元凸形状のオブジェクトを仮定して説明した。凹形
状のオブジェクトを扱う場合には、そのオブジェクトを
凸形状の複数のオブジェクトに分解して処理することに
より同様に処理可能である。この場合、分解により生成
される複数のオブジェクトを包含する複数の直方体のう
ち、隣接する直方体同士は3次元空間で重なりを持つ。
しかし、隣接する直方体に含まれるオブジェクトは交錯
することがないことが明らかである。すなわち、この場
合はZバッファが必要でなく、上書きによる隠面処理が
可能である。したがって、凹形状のオブジェクトを分解
して生成された凸形状のオブジェクトについては、その
分解情報を付加することによって、他の場合とは別に扱
い、すなわちZバッファ適用領域の除外領域として扱う
ことにより、処理量を低減することが可能である。In the above description, an object having a three-dimensional convex shape is assumed as the object. When a concave object is handled, the object can be similarly processed by decomposing the object into a plurality of convex objects. In this case, among a plurality of cuboids including a plurality of objects generated by decomposition, adjacent cuboids have an overlap in a three-dimensional space.
However, it is clear that objects included in adjacent rectangular parallelepipeds do not intersect. That is, in this case, a Z-buffer is not required, and hidden surface processing by overwriting can be performed. Therefore, a convex object generated by decomposing a concave object is treated separately from other cases by adding the decomposition information, that is, by treating it as an exclusion area of the Z buffer application area, It is possible to reduce the processing amount.
【0078】[0078]
【発明の効果】前述した実施例から明らかなように、本
発明の隠面処理方法によれば、3次元オブジェクトを、
そのオブジェクトを含む直方体で代表させ、オブジェク
ト同士の位置関係を調べることによって処理の順番を決
めるため、ポリゴン単位でソート処理を行う場合に比
べ、ソート処理の処理量が少ない。As is clear from the above-described embodiment, according to the hidden surface processing method of the present invention, a three-dimensional object is
Since the process is determined by examining the positional relationship between the objects by representing the object as a rectangular parallelepiped, the processing amount of the sort process is smaller than when the sort process is performed in units of polygons.
【0079】また、Zバッファを用いる領域を必要最小
限にすることによって、Zバッファを用いてのZ座標値
比較および更新の処理を低減できる。この結果、正確な
隠面処理を少ない処理量で実行可能な隠面処理方法およ
び装置を提供できる。Further, by minimizing the area where the Z buffer is used, the processing of comparing and updating the Z coordinate value using the Z buffer can be reduced. As a result, it is possible to provide a hidden surface processing method and apparatus capable of executing accurate hidden surface processing with a small processing amount.
【0080】さらに、Zバッファ量が少ない場合にも、
Zバッファを複数の領域に共用できるため、メモリ量の
少ない隠面処理装置を実現できる。Further, even when the Z buffer amount is small,
Since the Z buffer can be shared by a plurality of areas, a hidden surface processing device with a small amount of memory can be realized.
【図1】本発明に係る隠面処理方法の第1の実施例を示
す処理フロー図である。FIG. 1 is a processing flowchart showing a first embodiment of a hidden surface processing method according to the present invention.
【図2】第1の実施例の隠面処理方法を実現する隠面処
理回路のブロック図である。FIG. 2 is a block diagram of a hidden surface processing circuit for realizing the hidden surface processing method according to the first embodiment;
【図3】本発明に係る隠面処理方法における、3次元空
間のオブジェクトとその代表値との関係を示す図であ
る。FIG. 3 is a diagram showing a relationship between objects in a three-dimensional space and their representative values in the hidden surface processing method according to the present invention.
【図4】オブジェクトを包含する二つの直方体における
Zバッファ適用領域を説明する図であり、同図(a)は
XY平面における重なりを、同図(b)はYZ平面にお
ける重なりの一例を示す図である。4A and 4B are diagrams illustrating a Z-buffer application area in two rectangular parallelepipeds including an object, wherein FIG. 4A illustrates an example of an overlap on an XY plane, and FIG. 4B illustrates an example of an overlap on a YZ plane. It is.
【図5】オブジェクトを包含する四つの直方体における
Zバッファ適用領域を説明する図であり、同図(a)は
XY平面における重なりを、同図(b)はYZ平面にお
ける重なりの一例を示す図である。5A and 5B are diagrams illustrating a Z-buffer application area in four rectangular parallelepipeds including an object, wherein FIG. 5A illustrates an example of an overlap in an XY plane, and FIG. 5B illustrates an example of an overlap in a YZ plane. It is.
【図6】本発明に係る隠面処理方法で用いるリストの一
例を示す図であり、同図(a)はオブジェクトリスト、
同図(b)はZバッファ適用領域リスト、同図(c)は
ポリゴンリストである。FIG. 6 is a diagram showing an example of a list used in the hidden surface processing method according to the present invention.
FIG. 3B shows a Z buffer application area list, and FIG. 3C shows a polygon list.
【図7】第2の実施例の隠面処理方法を実現する隠面処
理回路のブロック図である。FIG. 7 is a block diagram of a hidden surface processing circuit for realizing the hidden surface processing method of the second embodiment.
【図8】第2の実施例におけるZバッファ適用領域の分
割の一例を説明する図である。FIG. 8 is a diagram illustrating an example of division of a Z-buffer application area in the second embodiment.
【図9】第2の実施例におけるポリゴンの分割の一例を
説明する図である。FIG. 9 is a diagram illustrating an example of polygon division in the second embodiment.
【図10】第2の実施例で用いるサブリストの一例であ
り、同図(a)はZバッファサブ領域リスト、同図
(b)はサブポリゴンリストである。FIGS. 10A and 10B show an example of a sublist used in the second embodiment. FIG. 10A shows a Z buffer sub area list, and FIG. 10B shows a sub polygon list.
【図11】第2の実施例における隠面処理のフロー図で
ある。FIG. 11 is a flowchart of hidden surface processing according to the second embodiment.
【図12】図1のステップ210を詳細に示したフロー
図である。FIG. 12 is a flowchart showing step 210 of FIG. 1 in detail.
10…メモリ、11…フレームメモリ、12…Zバッフ
ァ、13…データバスライン、14…制御部、15…隠
面処理回路、20…隠面処理部、21…代表値算出部、
22…Zバッファ適用領域抽出部、23…オブジェクト
ソート部、24…画素補間部、25…Zバッファ適用領
域判定部、26…Z座標値比較部、30…オブジェクト
を包含する直方体、31…オブジェクト、70…隠面処
理回路、71…Zバッファ適用領域分割部、72…ポリ
ゴン分割部、73…Zバッファ。10 memory, 11 frame memory, 12 Z buffer, 13 data bus line, 14 control unit, 15 hidden surface processing circuit, 20 hidden surface processing unit, 21 representative value calculation unit,
22: Z-buffer application area extraction unit, 23: object sort unit, 24: pixel interpolation unit, 25: Z-buffer application area determination unit, 26: Z coordinate value comparison unit, 30: rectangular parallelepiped containing object, 31: object, 70: Hidden surface processing circuit, 71: Z-buffer application area division unit, 72: Polygon division unit, 73: Z buffer.
フロントページの続き (72)発明者 中本 貴士 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所システムLSI開発セン タ内 Fターム(参考) 5B080 AA13 GA02 Continued on the front page (72) Inventor Takashi Nakamoto 5-2-1, Kamizuhoncho, Kodaira-shi, Tokyo F-term (reference) in System LSI Development Center, Hitachi, Ltd. 5B080 AA13 GA02
Claims (6)
数のオブジェクトの隠面処理方法であって、前記複数の
オブジェクトを代表する3次元領域をそれぞれ求め、前
記複数の3次元領域同士が3次元で重なりを有する場合
に、その重なりに含まれる前記複数のオブジェクトの画
素のZ座標値を比較して表示画像を形成することを特徴
とする隠面処理方法。1. A method of processing a hidden surface of a plurality of objects represented by three-dimensional coordinates of X, Y, and Z, wherein three-dimensional regions representative of the plurality of objects are respectively obtained, and the plurality of three-dimensional regions are connected to each other. A three-dimensional overlap, a Z-coordinate value of pixels of the plurality of objects included in the overlap is compared to form a display image.
る複数のポリゴンのうち面が視点に対して表向きの有効
なポリゴンを包含し、かつ、6面の全てがXY平面、Y
Z平面、XZ平面のいずれかに平行な最小の直方体であ
る請求項1記載の隠面処理方法。2. The three-dimensional area includes, among a plurality of polygons constituting an object, valid polygons whose faces are directed to the viewpoint and all six faces are XY planes and Y faces.
2. The hidden surface processing method according to claim 1, wherein the surface is a minimum rectangular parallelepiped parallel to any one of the Z plane and the XZ plane.
Y、Z座標の各座標における最大値と最小値で表される
直方体である請求項2記載の隠面処理方法。3. The minimum rectangular parallelepiped is X,
3. The hidden surface processing method according to claim 2, wherein the surface is a rectangular parallelepiped represented by a maximum value and a minimum value at each of the Y and Z coordinates.
る重なりの部分を複数の小領域に分割し、小領域毎にZ
座標値の比較を行う請求項1〜3のいずれか1項に記載
の隠面処理方法。4. A three-dimensional overlapping portion between the plurality of three-dimensional regions is divided into a plurality of small regions, and Z
The hidden surface processing method according to claim 1, wherein the coordinate values are compared.
ータに基づき、頂点が各小領域内に含まれるポリゴンを
新たに定義したのち、その新たに定義したポリゴンを用
いて小領域内の表示画像を形成する請求項4記載の隠面
処理方法。5. A new polygon whose vertices are included in each small area is newly defined based on the data of the polygons included in the plurality of small areas. The hidden surface processing method according to claim 4, wherein an image is formed.
モリ、オブジェクトのZ座標値を記憶するZバッファ、
ディスプレイ装置に表示する表示データを記憶するフレ
ームメモリを有し、前記オブジェクトのデータの隠面処
理をする処理回路と、この処理回路を制御する制御部と
を備えた隠面処理装置において、オブジェクトを構成す
る複数のポリゴンの頂点の座標から、オブジェクトを代
表するX、Y、Z座標の代表値を求める手段と、得られ
た各オブジェクトの上記X、Y、Z座標の代表値を比較
することによって、各オブジェクト間の位置関係を確定
する手段と、前記位置関係を確定する手段によりX、
Y、Z方向の全3方向で座標の代表値の重なりが検出さ
れた場合にはZバッファ法を用いて隠面処理を行い、検
出されない場合に上書きによる隠面処理を行う手段とを
前記処理回路に少なくとも備えたことを特徴とする隠面
処理装置。6. A memory for storing data of a three-dimensional object, a Z buffer for storing Z coordinate values of the object,
A hidden surface processing device having a frame memory for storing display data to be displayed on a display device, and a processing circuit for performing hidden surface processing of the data of the object, and a control unit for controlling the processing circuit; By comparing the representative values of the X, Y, and Z coordinates representing the object from the coordinates of the vertices of the plurality of constituent polygons with the representative values of the X, Y, and Z coordinates of each obtained object, X, by means for determining the positional relationship between the objects, and means for determining the positional relationship
Means for performing hidden surface processing using the Z-buffer method when overlap of representative values of coordinates is detected in all three directions of the Y and Z directions, and performing hidden surface processing by overwriting when no overlap is detected. A hidden surface processing device provided at least in a circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11072500A JP2000268191A (en) | 1999-03-17 | 1999-03-17 | Hidden surface treatment method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11072500A JP2000268191A (en) | 1999-03-17 | 1999-03-17 | Hidden surface treatment method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2000268191A true JP2000268191A (en) | 2000-09-29 |
Family
ID=13491130
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11072500A Pending JP2000268191A (en) | 1999-03-17 | 1999-03-17 | Hidden surface treatment method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2000268191A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| 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 |
| CN100378762C (en) * | 2003-08-25 | 2008-04-02 | 威盛电子股份有限公司 | 3-D image processing mechanism for reducing Z buffer zone flow rate |
| US7522166B2 (en) | 2001-11-29 | 2009-04-21 | Kabushiki Kaisha Square Enix | Video game processing method, video game processing apparatus and computer readable recording medium storing video game program |
| JP2014216011A (en) * | 2013-04-22 | 2014-11-17 | インテル・コーポレーション | Color buffer compression |
-
1999
- 1999-03-17 JP JP11072500A patent/JP2000268191A/en active Pending
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7522166B2 (en) | 2001-11-29 | 2009-04-21 | Kabushiki Kaisha Square Enix | Video game processing method, video game processing apparatus and computer readable recording medium storing video game program |
| 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 |
| CN100378762C (en) * | 2003-08-25 | 2008-04-02 | 威盛电子股份有限公司 | 3-D image processing mechanism for reducing Z buffer zone flow rate |
| JP2014216011A (en) * | 2013-04-22 | 2014-11-17 | インテル・コーポレーション | Color buffer compression |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7145565B2 (en) | Depth bounds testing | |
| US6693637B2 (en) | Method and apparatus for determining bins to be updated for polygons, including lines | |
| US5249264A (en) | Image display method and apparatus | |
| US11790480B2 (en) | Tiling a primitive in a graphics processing system by edge-specific testing of a subset of tiles in a rendering space | |
| US7876332B1 (en) | Shader that conditionally updates a framebuffer in a computer graphics system | |
| US20030117589A1 (en) | Image processor, components thereof, and rendering method | |
| CN100452096C (en) | Method and device for processing drawing primitive | |
| KR20050030595A (en) | Image processing apparatus and method | |
| TW201539374A (en) | Method for efficient construction of high resolution display buffers | |
| US10242482B2 (en) | Tiling a primitive in a graphics processing system | |
| JPH08161526A (en) | Image synthesizing apparatus and image synthesizing method | |
| JP4122573B2 (en) | Image processing method and recording medium recording image processing program | |
| JPH1166340A (en) | Device and method for processing image and recording medium recording image processing program | |
| US8547395B1 (en) | Writing coverage information to a framebuffer in a computer graphics system | |
| JP2009517770A (en) | Computer graphics processor and method for rendering stereoscopic images on a display screen | |
| US7817165B1 (en) | Selecting real sample locations for ownership of virtual sample locations in a computer graphics system | |
| US7825928B2 (en) | Image processing device and image processing method for rendering three-dimensional objects | |
| JP3756888B2 (en) | Graphics processor, graphics card and graphics processing system | |
| JP2000268191A (en) | Hidden surface treatment method | |
| US7528839B1 (en) | Faster clears for three-dimensional modeling applications | |
| US20030122850A1 (en) | Method and apparatus for determining bins to be updated for polygons, including triangles | |
| JPH0714029A (en) | Equipment and method for drawing of line | |
| KR100269118B1 (en) | Rasterization using quadrangle | |
| JP4042377B2 (en) | Image processing apparatus, image processing method, and computer program | |
| US7196706B2 (en) | Method and apparatus for rendering a quadrangle primitive |