[go: up one dir, main page]

JP2000057365A - Drawing device for three-dimensional graphics - Google Patents

Drawing device for three-dimensional graphics

Info

Publication number
JP2000057365A
JP2000057365A JP22380998A JP22380998A JP2000057365A JP 2000057365 A JP2000057365 A JP 2000057365A JP 22380998 A JP22380998 A JP 22380998A JP 22380998 A JP22380998 A JP 22380998A JP 2000057365 A JP2000057365 A JP 2000057365A
Authority
JP
Japan
Prior art keywords
pixel
pixel value
scanning line
unit
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP22380998A
Other languages
Japanese (ja)
Other versions
JP3279260B2 (en
Inventor
Tatsuji Moriyoshi
達治 森吉
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 JP22380998A priority Critical patent/JP3279260B2/en
Publication of JP2000057365A publication Critical patent/JP2000057365A/en
Application granted granted Critical
Publication of JP3279260B2 publication Critical patent/JP3279260B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a drawing device for three-dimensional graphics capable of executing a drawing processing at high speed by using a parallel processing in a separate ALU(arithmetic and logic unit) system. SOLUTION: Polygon data is converted into a parameter required for drawing the polygon data by every scanning line, is stored in an intermediate information memory 301 by a polygon data converter 201, a parameter required for drawing by every one scanning line is calculated by using the parameter for drawing a polygon which is stored in the intermediate information memory 301, the contents of the intermediate information memory 301 are updated by a pre-processor 202, interpolation of a pixel value, implicit-surface elimination for drawing one scanning line are performed by using the parameter from the pre-processor 202 and the parallel processing in the separate ALU system by a pixel value interpolation device 203 and an implicit- surface eliminating device 204, a pixel value, a Z value are written in an intermediate drawing memory 302 in a form suitable for the parallel processing in the separate ALU system by a pixel drawing device 205, the pixel value for one scanning line which is stored in the intermediate drawing memory 302 is converted and written in an applicable position of the scanning line of a frame buffer after the drawing of one scanning line is completed by a pixel value converter 206.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、グラフィックス描
画装置に関し、特に、分割ALU方式の並列処理を用
い、3次元物体の画像を2次元画面上に表示する3次元
グラフィックス描画装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphics drawing apparatus, and more particularly to a three-dimensional graphics drawing apparatus for displaying an image of a three-dimensional object on a two-dimensional screen by using a parallel processing of a divided ALU system.

【0002】[0002]

【従来の技術】近年、マイクロプロセッサにおいて、分
割ALU(Arithmetic and LogicUnit;算術論理装
置)方式の演算命令を持つマイクロプロセッサが知られ
ている。分割ALU方式の演算命令は、1個のALUを
複数のALUに分割して利用し、1命令で複数のデータ
に対して同じ処理を行なうSIMD(Single Instructi
on stream,Multiple Datastream)タイプの並列処理
を行う。
2. Description of the Related Art In recent years, as a microprocessor, a microprocessor having an operation instruction of a divided ALU (Arithmetic and Logic Unit: arithmetic logic unit) system is known. The operation instruction of the divided ALU system divides and uses one ALU into a plurality of ALUs, and performs the same processing on a plurality of data with one instruction.
on stream, Multiple Datastream) type parallel processing.

【0003】例えば、図5に示すように、64bitの
ALUを4つの16bitALUに分割し、分割したA
LUを使用して4つの16bitのデータを並列に処理
する。このような分割ALU方式並列処理の技術が、文
献(1)「MMX TechnologyExtension to the Intel
Architecture、IEEE MICRO、Vol.16、No.4、pp42-5
0、1996年8月」、文献(2)「The Design of the
Microarchitectureof UltraSPARC(TM)-I、Proceedin
gs of The IEEE、Vol. 83、No.12、pp1653-1663、19
95年12月」、文献(3)「Digital,MIPS Add Multim
edia Extensions、Microprocessor Report、Vol.10、
No.15、pp24-28、1996年11月」、及び、文献(4)「Su
bword Parallelism with MAX-2、 IEEE MICRO、Vo
l.16、No.4、pp51-59、1996年8月」に開示されている。
これらの文献に開示されてる分割ALU方式の並列処理
の技術を使用して、データの並列度の高い信号処理デー
タ等を高速に処理することができる。
For example, as shown in FIG. 5, a 64-bit ALU is divided into four 16-bit ALUs, and divided A
The four 16-bit data are processed in parallel using the LU. Such a divided ALU parallel processing technology is described in the document (1) “MMX Technology Extension to the Intel
Architecture, IEEE MICRO, Vol.16, No.4, pp42-5
0, August 1996 ”, reference (2)“ The Design of the
Microarchitectureof UltraSPARC (TM) -I, Proceedin
gs of The IEEE, Vol. 83, No. 12, pp1653-1663, 19
December 1995 ”, Reference (3)“ Digital, MIPS Add Multim ”
edia Extensions, Microprocessor Report, Vol. 10,
No.15, pp24-28, November 1996 ”and reference (4)“ Su
bword Parallelism with MAX-2, IEEE MICRO, Vo
l.16, No. 4, pp 51-59, August 1996 ".
By using the parallel processing technique of the divided ALU system disclosed in these documents, it is possible to process signal processing data with high data parallelism at high speed.

【0004】家庭用TVゲーム機やパーソナルコンピュ
ータ等で多用される3次元グラフィックス処理も、分割
ALU方式の並列処理によって高速化できる。
[0004] Three-dimensional graphics processing frequently used in home-use TV game machines, personal computers and the like can also be sped up by parallel processing of the divided ALU system.

【0005】3次元グラフィックス処理では、3次元空
間中に配置された3次元形状を持つ物体を、テレビ受像
機やCRT(Cathod Ray Tube)ディスプレイ装置等の
2次元(平面)画面上の画像として表示する。
In the three-dimensional graphics processing, an object having a three-dimensional shape arranged in a three-dimensional space is converted into an image on a two-dimensional (flat) screen such as a television receiver or a CRT (Cathod Ray Tube) display device. indicate.

【0006】このとき、3次元形状を3角形や4角形等
の多角形(ポリゴン)の集合として定義し、この各ポリ
ゴンを画面上に描画することが多い。
At this time, the three-dimensional shape is defined as a set of polygons (polygons) such as a triangle and a quadrangle, and each polygon is often drawn on a screen.

【0007】ポリゴンを画面に描画する際には、ポリゴ
ンの頂点座標を視点を原点とする座標系に変換する座標
変換、光源から放射され物体表面で反射して視点に到達
する光量を求める照明計算、画面からはみ出す部分を除
外するクリッピング、3次元空間から2次元画面に投影
する透視投影、物体表面に陰影をつけるシェーディン
グ、視点に近い物体が遠くの物体を隠す隠面消去等の処
理が行なわれる。さらに、描画結果の品質を高めるため
に、物体表面に模様を張り付けるテクスチャマッピン
グ、半透明な物体を表現するアルファブレンディング等
を行なうこともある。
When rendering a polygon on a screen, coordinate conversion is performed to convert the vertex coordinates of the polygon into a coordinate system having the viewpoint as the origin, and illumination calculation for obtaining the amount of light emitted from the light source and reflected on the surface of the object to reach the viewpoint. Processing such as clipping for excluding a portion protruding from the screen, perspective projection for projecting from a three-dimensional space to a two-dimensional screen, shading for shading an object surface, and erasing a hidden surface for an object close to a viewpoint to hide an object far away are performed. . Further, in order to improve the quality of a drawing result, texture mapping for attaching a pattern to the surface of an object, alpha blending for expressing a translucent object, and the like may be performed.

【0008】複雑なシーンを表現したり、現実感のある
画像を作成するためには、描画するポリゴンの数を増や
すのが有効であるが、ポリゴン数が増加すると描画に要
する処理量も増大するため、処理の高速化が必要とな
る。
In order to express a complicated scene or create a realistic image, it is effective to increase the number of polygons to be drawn. However, when the number of polygons increases, the processing amount required for drawing also increases. Therefore, it is necessary to increase the processing speed.

【0009】各ポリゴンを描画する処理のうち、2次元
画面上に投影されたポリゴンを画面上の各画素に描画す
るシェーディングおよび隠面消去処理においては、画面
上の各画素、あるいは画素に表示する各色成分(赤
(R)、緑(G)、青(B)の3成分がよく用いられ
る)について同一の処理を行なうため、分割ALU方式
の並列処理による高速化が有効である。
[0009] In the shading and hidden surface elimination processing for drawing the polygon projected on the two-dimensional screen to each pixel on the screen among the processing for drawing each polygon, each pixel or each pixel on the screen is displayed. Since the same processing is performed for each color component (the three components of red (R), green (G), and blue (B) are often used), it is effective to increase the speed by parallel processing of the divided ALU system.

【0010】分割ALU方式の並列処理を用いた3次元
グラフィックス処理の高速化の技術が、文献(5)「3D
Z-Buffer Using MMX(TM) Technology、Intel APP
LICATION NOTE、1996年」、文献(6)「MMX(TM)命令
を使ったグロー・シェーディング・アルゴリズムのイン
プリメンテーション、Intel APPLICATION NOTE AP-5
38J、1996年3月」、文献(7)「MMX(TM)命令を使った2
4ビット・トゥルー・カラー・データから16ビット・ハ
イ・カラーへの変換、Intel APPLICATION NOTE AP-5
53J、1996年3月」、に開示されている。これらの文献に
開示されてる技術では、シェーディング法としてグロー
・シェーディング、隠面消去法としてZバッファ法を用
いている。
A technique for speeding up three-dimensional graphics processing using the parallel processing of the divided ALU system is disclosed in reference (5), “3D Graphics Processing”.
Z-Buffer Using MMX (TM) Technology, Intel APP
LICATION NOTE, 1996 ”, Reference (6)“ Implementation of Glow Shading Algorithm Using MMX (TM) Instruction, Intel APPLICATION NOTE AP-5
38J, March 1996 ”, Reference (7)“ Using the MMX (TM) Instruction 2
Conversion from 4-bit true color data to 16-bit high color, Intel APPLICATION NOTE AP-5
53J, March 1996 ". In the techniques disclosed in these documents, glow shading is used as a shading method, and a Z buffer method is used as a hidden surface elimination method.

【0011】グロー・シェーディングは、ポリゴン内部
の各画素の色を、ポリゴンの頂点の色から双一次補間に
よって求めるシェーディング法である。また、Zバッフ
ァ法は、画面の各画素について、各画素に表示する色の
データとは別に、その画素に表示するポリゴンの奥行き
(視点からの距離)を表すZ値を記憶しておき、新しい
ポリゴンを描画する際には、そのポリゴンが画面上で占
める領域内の各画素についてポリゴンのZ値を求め、対
応する画素について既に記憶されているZ値と比較し、
新しいポリゴンのZ値の方が小さい(視点により近い)
時のみZ値および色データを新しいポリゴンのものに更
新する方法であり、この方法で全てのポリゴンを処理す
ると、視点から遠いポリゴンは、より視点に近いポリゴ
ンによって順次上書きされ、最終的に隠面消去された画
像が得られる。
Glow shading is a shading method in which the color of each pixel inside a polygon is determined from the colors of the vertices of the polygon by bilinear interpolation. The Z-buffer method stores, for each pixel on the screen, a Z value representing the depth (distance from the viewpoint) of the polygon displayed on the pixel, separately from the data of the color displayed on the pixel. When drawing a polygon, the Z value of the polygon is obtained for each pixel in the area occupied by the polygon on the screen, and the Z value of the corresponding pixel is compared with the Z value already stored.
New polygon has smaller Z value (closer to viewpoint)
Only when the Z value and color data are updated to those of a new polygon, when all polygons are processed in this way, polygons farther from the viewpoint are sequentially overwritten by polygons closer to the viewpoint, and finally hidden surfaces An erased image is obtained.

【0012】図6は、前記文献等に開示されている技術
を用いた従来の3次元グラフィックス描画装置の構成を
示すブロック図である。この3次元グラフィックス描画
装置は、ポリゴンデータ入力装置100と、前処理装置
501と、画素値補間装置502と、隠面消去装置50
3と、画素値変換/描画装置504と、Zバッファ60
1と、フレームバッファ602と、表示装置400と、
から構成される。
FIG. 6 is a block diagram showing the configuration of a conventional three-dimensional graphics drawing apparatus using the technique disclosed in the above-mentioned literature and the like. The three-dimensional graphics drawing device includes a polygon data input device 100, a pre-processing device 501, a pixel value interpolating device 502, and a hidden surface removing device 50.
3, the pixel value conversion / drawing device 504, and the Z buffer 60
1, the frame buffer 602, the display device 400,
Consists of

【0013】図7は、従来の3次元グラフィックス描画
装置の処理を示すフローチャートである。
FIG. 7 is a flowchart showing the processing of the conventional three-dimensional graphics drawing apparatus.

【0014】以下、図6および図7を参照して、従来の
3次元グラフィックス描画装置の動作について説明す
る。
The operation of the conventional three-dimensional graphics drawing apparatus will be described below with reference to FIGS.

【0015】フレームバッファ602は、画面内の各画
素に表示する色データ(以下、「画素値」という)を記
憶するメモリである。Zバッファ601は、各画素に描
画するポリゴンのZ値を記憶するメモリである。
The frame buffer 602 is a memory for storing color data (hereinafter, referred to as “pixel value”) to be displayed on each pixel in the screen. The Z buffer 601 is a memory that stores a Z value of a polygon to be drawn on each pixel.

【0016】描画を開始する前に、フレームバッファ6
02の全画素には背景を表す画素値を格納し、Zバッフ
ァ601の全画素のZ値は表現できる最大のZ値に設定
しておく(ステップS201)。
Before starting drawing, the frame buffer 6
The pixel value representing the background is stored in all the pixels 02, and the Z value of all the pixels in the Z buffer 601 is set to the maximum expressible Z value (step S201).

【0017】ポリゴンデータ入力装置100からは、画
面上に表示する各ポリゴンについて、座標変換、照明計
算、クリッピング、透視投影等の処理を行なった後の、
2次元の画面上に投影されたポリゴンデータが入力され
る(ステップS202)。
From the polygon data input device 100, after performing processing such as coordinate conversion, illumination calculation, clipping, and perspective projection for each polygon displayed on the screen,
The polygon data projected on the two-dimensional screen is input (step S202).

【0018】入力されるポリゴンデータは、例えば、2
次元画面上に投影されたポリゴンの各頂点の2次元座標
X(i)及びY(i)、視点から見た各頂点の奥行きを
示すZ値Z(i)、各頂点の赤、緑、青の色成分をそれ
ぞれ示すR(i)、G(i)及びB(i)から成る。こ
こで、iは各頂点を区別するための頂点番号で、ポリゴ
ンの頂点数をNとすると、i=0、1、...、N−1
である。
The input polygon data is, for example, 2
Two-dimensional coordinates X (i) and Y (i) of each vertex of the polygon projected on the three-dimensional screen, a Z value Z (i) indicating the depth of each vertex viewed from the viewpoint, and red, green, and blue of each vertex , R (i), G (i) and B (i), respectively. Here, i is a vertex number for distinguishing each vertex, and if the number of vertices of the polygon is N, i = 0, 1,. . . , N-1
It is.

【0019】前処理装置501は、ポリゴンデータ入力
装置100から入力されたポリゴンデータに基づき、グ
ロー・シェーディングを行なうためのパラメータ(以
下、「シェーディングパラメータ」と呼ぶ)を算出す
る。シェーディングパラメータは、例えば、Z値のX軸
方向の傾きDZDX、Z値のY軸方向の傾きDZDY、
色成分R、G、BのX軸方向の傾きDRDX、DGDX
及びDBDX、色成分R、G、BのY軸方向の傾きDR
DY、DGDY及びDBDYである。また、ポリゴンが
画面上で占める領域のY座標の最小値YMIN及び最大
値YMAXを求め、画面の各走査線のうち、Y座標がY
MIN以上YMAX以下であるものについて、前記のポ
リゴンデータ及びシェーディングパラメータを用いてポ
リゴンと走査線の交点のX座標を計算し、各走査線のう
ちポリゴンに含まれる領域(スパン)を求める。
The preprocessing device 501 calculates parameters for performing glow shading (hereinafter, referred to as "shading parameters") based on the polygon data input from the polygon data input device 100. The shading parameters include, for example, a slope DZDX of the Z value in the X axis direction, a slope DZDY of the Z value in the Y axis direction,
The inclination DRDX, DGDX of the color components R, G, B in the X-axis direction
And the gradient DR of the color components R, G, and B in the Y-axis direction.
DY, DGDY and DBDY. Further, the minimum value YMIN and the maximum value YMAX of the Y coordinate of the area occupied by the polygon on the screen are obtained, and the Y coordinate of each scanning line on the screen is Y.
For those having a value of MIN or more and YMAX or less, the X coordinate of the intersection of the polygon and the scanning line is calculated using the polygon data and the shading parameter, and an area (span) included in the polygon among the scanning lines is obtained.

【0020】さらに、各スパンの画素値補間、隠面消去
を行なうためのパラメータ(以下、「スパンパラメー
タ」と呼ぶ)を算出する。スパンパラメータは、例え
ば、スパンの左端のX座標XMIN及び右端のX座標X
MAX、スパンの左端におけるZ値ZS、スパンの左端
における色成分RS、GS及びBSである。スパンパラ
メータは、例えば、Y座標の小さな走査線のスパンのも
のから順次、画素値補間装置502及び隠面消去装置5
03に供給する(ステップS203)。
Further, a parameter (hereinafter referred to as "span parameter") for performing pixel value interpolation and hidden surface elimination of each span is calculated. The span parameter includes, for example, the X coordinate XMIN at the left end of the span and the X coordinate X at the right end of the span.
MAX, Z value ZS at the left end of the span, and color components RS, GS, and BS at the left end of the span. The span parameter is, for example, sequentially from the one of the scan line span of the small Y coordinate, the pixel value interpolation device 502 and the hidden surface elimination device 5
03 (Step S203).

【0021】画素値補間装置502及び隠面消去装置5
03は、前処理装置501から供給されたシェーディン
グパラメータ、スパンパラメータに基づき、ポリゴンの
各スパンに含まれる各画素について画素値補間および隠
面消去処理を行なう。
Pixel value interpolation device 502 and hidden surface elimination device 5
In step 03, pixel value interpolation and hidden surface removal processing are performed for each pixel included in each span of the polygon based on the shading parameters and span parameters supplied from the preprocessing device 501.

【0022】画素値補間装置502は、スパンの左端に
おける色成分RS、GS、BS、及び色成分のX軸方向
の傾きDRDX、DGDX、DBDXを用いて、スパン
内の各画素の画素値PR、PG、PBを求める。
The pixel value interpolator 502 uses the color components RS, GS, BS at the left end of the span and the gradients DRDX, DGDX, DBDX of the color components in the X-axis direction to obtain the pixel value PR, Find PG and PB.

【0023】スパンの左端の画素における画素値は、P
R=RS、PG=GS、PB=BSである。
The pixel value at the leftmost pixel of the span is P
R = RS, PG = GS, PB = BS.

【0024】この画素から1画素分右の画素における画
素値は、 PR=RS+DRDX、 PG=GS+DGDX、 PB=BS+DBDX である。
The pixel values of the pixel one pixel to the right of this pixel are: PR = RS + DRDX, PG = GS + DGDX, PB = BS + DBDX.

【0025】同様に、スパンの左端からj画素分(j=
0、1、2、...)右の画素における画素値は、 PR=RS+j×DRDX、 PG=GS+j×DGDX、 PB=BS+j×DBDX である。
Similarly, j pixels from the left end of the span (j =
0, 1, 2,. . . ) The pixel values of the right pixel are: PR = RS + j × DRDX, PG = GS + j × DGDX, PB = BS + j × DBDX.

【0026】この画素値を求めるためには、図8に示す
ように、左端の画素値に順次画素値の傾きを加算する。
図8にはR成分のみについて示されているが、G、B成
分についても同様にして各画素の画素値を求める。この
処理は、多数の画素について同じ演算(加算)を行なう
処理であるため、分割ALU方式の並列処理を用いて高
速化できる。
In order to obtain this pixel value, the inclination of the pixel value is sequentially added to the leftmost pixel value as shown in FIG.
Although FIG. 8 shows only the R component, the pixel values of each pixel are similarly obtained for the G and B components. Since this process is a process of performing the same operation (addition) for a large number of pixels, the speed can be increased by using the parallel processing of the divided ALU system.

【0027】上記文献(6)「MMX(TM)命令を使
ったグロー・シェーディング・アルゴリズムのインプリ
メンテーション」には、図9に示すように、分割ALU
方式の4並列加算を用いて、4画素分の画素値を1命令
で求める技術が記載されている。
In the above-mentioned document (6) “Implementation of glow shading algorithm using MMX (TM) instruction”, as shown in FIG.
A technique is described in which pixel values for four pixels are obtained by one instruction using four-parallel addition of the system.

【0028】図9の4並列加算は、64bitレジスタ
700に格納された4つの16bitデータa0、a
1、a2、a3と、64bitレジスタ701に格納さ
れた4つの16bitデータb0、b1、b2、b3と
をそれぞれ組み合わせて4並列に加算し、結果を64b
itレジスタ702に格納する処理である。
In the four-parallel addition shown in FIG. 9, four 16-bit data a0, a stored in the 64-bit register 700 are used.
1, a2, a3 and four 16-bit data b0, b1, b2, b3 stored in the 64-bit register 701 are respectively combined and added in four parallels, and the result is 64b
This is the process of storing in the it register 702.

【0029】図10は、4並列加算を用いて、スパン内
の画素値補間を行なう様子を示す模式図である。ここで
も、R成分のみについて示す。
FIG. 10 is a schematic diagram showing how pixel value interpolation within a span is performed using 4-parallel addition. Here, only the R component is shown.

【0030】4並列に処理を行なうために、RS、DR
DXは16bit固定小数点形式で表現し、レジスタ7
10にはRS、RS、RS、RSの4つの数値を、レジ
スタ711には0、DRDX、2×DRDX、3×DR
DXの4つの数値を、レジスタ714には、4×DRD
X、4×DRDX、4×DRDX、4×DRDXの4つ
の数値をそれぞれ格納する。
In order to perform the processing in four parallel, RS, DR
DX is expressed in a 16-bit fixed-point format.
10 is four numerical values of RS, RS, RS, and RS, and register 711 is 0, DRDX, 2 × DRDX, 3 × DR.
The four values of DX are stored in the register 714 as 4 × DRD.
X, 4 × DRDX, 4 × DRDX, and 4 × DRDX are stored, respectively.

【0031】ここで、レジスタ710にレジスタ711
を4並列加算することで、レジスタ712にスパンの左
端から4画素分の画素値が求められる。さらに、レジス
タ712と同じ内容を持つレジスタ713(レジスタ7
13はレジスタ712と同一のレジスタでもよい)にレ
ジスタ714を4並列加算することで、次の4画素分の
画素値が求められる。以下、レジスタ714を順次4並
列加算することで、4画素分の画素値が順次求められる
(ステップS204)。
Here, the register 710 is added to the register 711.
Are added in parallel, the pixel values of four pixels from the left end of the span are obtained in the register 712. Further, a register 713 (register 7) having the same contents as the register 712
13 may be the same register as the register 712) and the register 714 is added in four parallels, thereby obtaining the pixel values of the next four pixels. Hereinafter, pixel values for four pixels are sequentially obtained by sequentially adding four registers 714 in parallel (step S204).

【0032】隠面消去装置503は、スパンの左端にお
けるZ値ZS、及びZ値のX軸方向の傾きDZDXを用
いて、スパン内の各画素のZ値PZを求め、Zバッファ
601の該当する画素位置に記録されているZ値と比較
し、PZがZバッファに記憶されているZ値よりも小さ
い画素を判定するとともに、その画素位置のZバッファ
をPZに更新する。
The hidden surface elimination device 503 obtains the Z value PZ of each pixel in the span using the Z value ZS at the left end of the span and the gradient DZDX of the Z value in the X-axis direction. By comparing with the Z value recorded at the pixel position, a pixel whose PZ is smaller than the Z value stored in the Z buffer is determined, and the Z buffer at that pixel position is updated to PZ.

【0033】スパン内の各画素のZ値は、画素値補間装
置502での画素値補間と同様にして求められる。Z値
の比較も、多数の画素について同じ演算(比較)を行な
う処理であるため、分割ALU方式の並列処理を用いて
高速化できる。
The Z value of each pixel in the span is obtained in the same manner as the pixel value interpolation by the pixel value interpolation device 502. Since the comparison of the Z values is a process of performing the same operation (comparison) for a large number of pixels, the speed can be increased by using the parallel processing of the divided ALU system.

【0034】上記文献(5)「3D Z−Buffer
Using MMX(TM)Technology」
では、図11に示すような分割ALU方式の4並列比較
を用いて、4画素分のZ値比較を1命令で行なう技術が
記載されている。
The above document (5) “3D Z-Buffer”
Using MMX (TM) Technology "
Describes a technique in which a Z value comparison for four pixels is performed by one instruction using a four-parallel comparison of a divided ALU system as shown in FIG.

【0035】図11の4並列比較は、64bitレジス
タ720に格納された4つの16bitデータa0、a
1、a2、a3と、64bitレジスタ721に格納さ
れた4つの16bitデータb0、b1、b2、b3と
をそれぞれ組み合わせて4並列に大小比較を行ない、a
n>bn(n=0,1,2,3)が成り立つ場合には、
0xFFFF(「0x」は、数値が16進数であること
を示す)を、an>bn(n=0,1,2,3)が成り
立たない場合には、0x0000をそれぞれ64bit
レジスタ722に格納する処理である。図11のレジス
タ722の内容は、結果の一例を表している。
The four-parallel comparison shown in FIG. 11 is based on the four 16-bit data a0, a stored in the 64-bit register 720.
1, a2, a3 and four 16-bit data b0, b1, b2, b3 stored in the 64-bit register 721 are respectively combined to perform four-parallel magnitude comparison.
When n> bn (n = 0, 1, 2, 3) holds,
0xFFFF (“0x” indicates that the numerical value is a hexadecimal number) is set to 64 bits when an> bn (n = 0, 1, 2, 3) is not satisfied.
This is a process of storing in the register 722. The contents of the register 722 in FIG. 11 represent an example of the result.

【0036】図12は、4並列比較を用いてZ値比較を
行なう様子を説明する模式図である。4並列に処理を行
なうために、Z値は16bit固定小数点で表現する。
画素値補間と同様にして求めたスパン内の各画素でのZ
値をレジスタ731に格納し、Zバッファ601の該当
する画素位置から読みだしたZ値をレジスタ730に格
納し、その内容を4並列に比較し、結果をレジスタ73
2に格納する。
FIG. 12 is a schematic diagram for explaining the manner in which the Z value is compared using 4-parallel comparison. In order to perform the processing in four parallels, the Z value is represented by a 16-bit fixed point.
Z at each pixel in the span determined in the same manner as pixel value interpolation
The value is stored in the register 731, the Z value read from the corresponding pixel position in the Z buffer 601 is stored in the register 730, the contents are compared in four parallels, and the result is stored in the register 731.
2 is stored.

【0037】レジスタ732の内容は、Z値及び画素値
を更新する必要のある画素では0xFFFF、更新する
必要の無い画素では0x0000となるため、レジスタ
732をマスクとして用いてZバッファ601の該当す
る画素位置のZ値の更新を行なう。
The contents of the register 732 are set to 0xFFFF for a pixel whose Z value and pixel value need to be updated, and set to 0x0000 for a pixel which does not need to be updated. The Z value of the position is updated.

【0038】具体的には、例えば、図13に示すよう
に、レジスタ732とレジスタ731との4並列論理積
によって、Z値を更新する画素位置のZ値をレジスタ7
33に抽出し、レジスタ732の否定であるレジスタ7
34とレジスタ730との4並列論理積によって、更新
しない画素位置のZ値をレジスタ735に抽出し、レジ
スタ733とレジスタ735の4並列論理和によって、
更新後のZ値がレジスタ736に得られる。なお、スパ
ンの先頭あるいは末尾を処理するときに、4画素未満の
描画を行なう必要がある場合があるが、この場合は、例
えば、隠面消去装置503でのZ値比較結果(レジスタ
732)の不必要な画素に対応する位置に0x0000
を設定することにより、不必要な画素の描画を避ける
(図7のステップS205)。
More specifically, for example, as shown in FIG. 13, the Z value of the pixel position at which the Z value is updated is stored in the register 7 by the 4-parallel AND of the register 732 and the register 731.
33, which is the negation of register 732
The Z value of the pixel position not to be updated is extracted to the register 735 by the four parallel logical product of the register 34 and the register 730, and the four parallel logical sum of the register 733 and the register 735 is obtained.
The updated Z value is obtained in the register 736. When processing the beginning or end of a span, it may be necessary to perform drawing of less than four pixels. In this case, for example, the Z value comparison result (register 732) of the hidden surface erasing device 503 may be used. 0x0000 at positions corresponding to unnecessary pixels
Is set to avoid unnecessary drawing of pixels (step S205 in FIG. 7).

【0039】画素値変換/描画装置504は、画素値補
間装置502で求められたスパン内の画素値と、隠面消
去装置503で求められた各画素位置でのZ値比較の結
果とに基づき、フレームバッファ602の該当する画素
位置の画素値を更新する。ここで、画素値補間装置50
2で求められた画素値に対し、フレームバッファ602
に格納するための変換を行なう。
The pixel value conversion / rendering device 504 is based on the pixel values within the span determined by the pixel value interpolator 502 and the Z value comparison result at each pixel position determined by the hidden surface elimination device 503. , The pixel value at the corresponding pixel position in the frame buffer 602 is updated. Here, the pixel value interpolation device 50
2, the frame buffer 602
Is converted to be stored in.

【0040】画素値補間装置502で求められた画素値
は、図14のように、各色成分PR、PG、PBが16
bit固定小数点で表現され、また4画素分ごとにまと
まって64bitレジスタに格納されている。
As shown in FIG. 14, the pixel value obtained by the pixel value interpolation device 502 is 16 for each color component PR, PG, and PB.
It is represented by a bit fixed point, and stored in a 64-bit register every four pixels.

【0041】これに対し、フレームバッファ602で
は、例えば図15に示すように、各画素ごとに色成分
R、G、Bが連続して配置され、各色成分は8bitず
つ(24bitフルカラー)、あるいは5bitずつ
(16bitハイカラー)で表現されることが多い。こ
のため、フレームバッファの画素値を更新するために、
画素値表現の変換を行なう(図7のステップS20
6)。
On the other hand, in the frame buffer 602, for example, as shown in FIG. 15, the color components R, G, and B are continuously arranged for each pixel, and each color component is 8 bits (24 bits full color) or 5 bits. (16-bit high color) in many cases. Therefore, in order to update the pixel value of the frame buffer,
Conversion of the pixel value expression is performed (step S20 in FIG. 7).
6).

【0042】図16は、画素値表現の変換の様子を示す
模式図である。この画素値変換のためには、画素値の各
色成分のbit数変換(例えば、16bitから8bi
tへの変換、16bitから5bitへの変換など)、
および、画素値の並び替え、位置合わせが必要となる。
FIG. 16 is a schematic diagram showing how the pixel value expression is converted. For this pixel value conversion, the number of bits of each color component of the pixel value is converted (for example, from 16 bits to 8 bits).
t, 16bit to 5bit, etc.),
In addition, it is necessary to rearrange and position the pixel values.

【0043】上記文献(6)「MMX(TM)命令を使
ったグロー・シェーディング・アルゴリズムのインプリ
メンテーション」、文献(7)「MMX(TM)命令を
使った24ビット・トゥルー・カラー・データから16
ビット・ハイ・カラーへの変換」には、分割ALU方式
の並列処理を用いた、画素値変換の技術が開示されてい
る。具体的には、例えば、24bitフルカラーへの変
換は、図17に示すような、分割ALU方式のインター
リーブ処理を用い、図18に示すような、変換処理を行
なう。
Reference (6), "Implementation of Glow Shading Algorithm Using MMX (TM) Instruction", Reference (7), "From 24 Bit True Color Data Using MMX (TM) Instruction" 16
"Conversion to bit high color" discloses a pixel value conversion technique using parallel processing of a divided ALU system. Specifically, for example, the conversion into 24-bit full color is performed by using the interleaving process of the divided ALU system as shown in FIG. 17 and performing the conversion process as shown in FIG.

【0044】図17に示すインターリーブ処理は、64
bitレジスタ752に格納された4つの16bitデ
ータa3、a2、a1、a0のうち、a1とa0、64
bitレジスタ751に格納された4つの16bitデ
ータb3、b2、b1、b0のうち、b1とb0とをイ
ンターリーブし、64bitレジスタ753にb1、a
1、b0、b0の形式で格納する処理である。
The interleave processing shown in FIG.
Of the four 16-bit data a3, a2, a1, a0 stored in the bit register 752, a1 and a0, 64
Of the four 16-bit data b3, b2, b1, and b0 stored in the bit register 751, b1 and b0 are interleaved, and b1, a are stored in the 64-bit register 753.
This is processing for storing in the format of 1, b0, b0.

【0045】図18に示す変換処理は、64bitレジ
スタ760、761、762に16bit×4の形式で
格納されたそれぞれ4画素分の色成分に対し、4並列シ
フト処理あるいは4並列下位8bitクリアを行なって
各成分の上位8bitを取り出し(レジスタ763、7
64、765)、論理和およびインターリーブを用いて
並び替えるものである。ただし、レジスタ767、レジ
スタ768に得られる変換結果は、R、G、Bの画素値
以外に、0を含んでいるため、フレームバッファ602
に書き込む際には、図15のフレームバッファの構造に
合わせるために、さらに位置合わせを行なう必要があ
る。
In the conversion processing shown in FIG. 18, the color components of four pixels stored in the 64-bit registers 760, 761, and 762 in the format of 16 bits × 4 are subjected to the 4-parallel shift processing or the 4-parallel lower 8-bit clear. To extract the upper 8 bits of each component (registers 763 and 763).
64, 765), which are rearranged by using OR and interleave. However, since the conversion results obtained in the registers 767 and 768 include 0 in addition to the R, G, and B pixel values, the frame buffer 602
When writing to the frame buffer, it is necessary to further perform positioning in order to conform to the structure of the frame buffer shown in FIG.

【0046】図7のステップS204からステップS2
06で、1つのポリゴンの、1つのスパンの、4画素分
の描画が実行される。
Steps S204 to S2 in FIG.
At 06, drawing of four pixels of one polygon and one span is executed.

【0047】続いて、1つのスパン内の全画素を描画す
るために、スパンの終了判定を行なう。具体的には、例
えばスパン左端のX座標XMINの画素から4画素ずつ
描画し、描画処理がスパン右端X座標XMAXの画素に
達したかの判定を行ない、右端に達していなければ、ス
テップS204に戻って4画素分右に移動して次の4画
素を描画する(図7のステップS207)。
Subsequently, in order to draw all the pixels in one span, the end of the span is determined. Specifically, for example, four pixels are drawn from the pixel at the X coordinate XMIN at the left end of the span, and it is determined whether the drawing process has reached the pixel at the X coordinate XMAX at the right end of the span. If the pixel has not reached the right end, the process returns to step S204. The next four pixels are drawn by moving to the right by four pixels (step S207 in FIG. 7).

【0048】ステップS204からステップS207
で、1つのポリゴンの、1つのスパンの描画が実行され
る。
Steps S204 to S207
Then, drawing of one span of one polygon is executed.

【0049】続いて、1つのポリゴン内の全スパンを描
画するために、ポリゴンの終了判定を行なう。具体的に
は、描画処理がポリゴンのY座標YMAXのスパンに達
したかの判定を行ない、達していなければ、図7のステ
ップS203に戻り、1大きいY座標のスパンを描画す
る(ステップS208)。
Subsequently, in order to draw all spans in one polygon, the end of the polygon is determined. Specifically, it is determined whether or not the drawing process has reached the span of the Y coordinate YMAX of the polygon. If not, the process returns to step S203 in FIG. 7 to draw a span of one larger Y coordinate (step S208).

【0050】図7のステップS204からステップS2
08で、1つのポリゴンの描画が実行される。続いて、
全ポリゴンの描画が終了したかの判定を行ない、終了し
ていなければ、ステップS202に戻り、次のポリゴン
データを入力して次のポリゴンを描画する(図7のステ
ップS209)。
Steps S204 to S2 in FIG.
At 08, rendering of one polygon is executed. continue,
It is determined whether the rendering of all polygons has been completed. If the rendering has not been completed, the process returns to step S202 to input the next polygon data and render the next polygon (step S209 in FIG. 7).

【0051】全ポリゴンの描画が終了すると、表示装置
400は、フレームバッファ602の内容を読みとり、
テレビ受像機やCRTディスプレイ装置等に表示する
(図7のステップS210)。
When the rendering of all the polygons is completed, the display device 400 reads the contents of the frame buffer 602 and
The image is displayed on a television receiver or a CRT display device (step S210 in FIG. 7).

【0052】[0052]

【発明が解決しようとする課題】しかしながら、上記文
献等に開示されている、従来の3次元グラフィックス描
画装置では、画素値変換/描画装置504がフレームバ
ッファ602に記憶されている画素値をを直接更新する
ため、画素値補間装置502で求めた画素値をフレーム
バッファ602の構造に合わせて変換する必要がある、
という問題がある。
However, in the conventional three-dimensional graphics rendering device disclosed in the above-mentioned documents, the pixel value conversion / rendering device 504 converts the pixel value stored in the frame buffer 602 into a pixel value. In order to directly update, it is necessary to convert the pixel value obtained by the pixel value interpolation device 502 according to the structure of the frame buffer 602.
There is a problem.

【0053】分割ALU方式の並列処理では、例えば8
bit×8、16bit×4、32bit×2等の決ま
った形式のデータの処理は、並列処理によって高速に実
行できるが、例えば16bitハイカラーの画素値の場
合の5bit×3などのように、決まった形式に合致し
ないデータを扱おうとすると、シフト処理やマスク処理
等を用いてデータ形式の変換を行なう必要があるため、
そのオーバーヘッドのために処理速度が低下してしま
う。
In the parallel processing of the divided ALU system, for example, 8
Processing of data in a fixed format such as bit × 8, 16 bit × 4, 32 bit × 2, etc. can be executed at high speed by parallel processing. However, a fixed process such as 5 bit × 3 in the case of a 16-bit high color pixel value is performed. If you want to handle data that does not match the format, you need to perform data format conversion using shift processing and mask processing, etc.
The processing speed is reduced due to the overhead.

【0054】Zバッファ法においては、フレームバッフ
ァに記憶された画素値は、視点により近いポリゴンによ
って順次上書きされる。このため、画素値変換/描画装
置504では、他のポリゴンによって上書きされ、実際
には画面上で表示されない画素の画素値についても、前
記の画素値変換処理を実行することになる。
In the Z-buffer method, pixel values stored in the frame buffer are sequentially overwritten by polygons closer to the viewpoint. Therefore, the pixel value conversion / rendering device 504 executes the above-described pixel value conversion processing also on the pixel value of a pixel which is overwritten by another polygon and is not actually displayed on the screen.

【0055】このような、実際には表示されない画素の
画素値変換処理は、特に多数の物体が3次元空間内に配
置されているような場合には多数回発生し、その変換処
理のオーバーヘッドによって、3次元グラフィックス描
画装置の処理性能が低下してしまう。
Such pixel value conversion processing of a pixel that is not actually displayed occurs many times, particularly when many objects are arranged in a three-dimensional space, and the overhead of the conversion processing causes In addition, the processing performance of the three-dimensional graphics drawing apparatus is reduced.

【0056】したがって本発明は、上記問題点に鑑みて
なされたものであって、その目的は、分割ALU方式の
並列処理を利用し、高速に描画処理を実行できる3次元
グラフィックス描画装置を提供することにある。
Accordingly, the present invention has been made in view of the above problems, and an object of the present invention is to provide a three-dimensional graphics drawing apparatus which can execute drawing processing at high speed by utilizing the parallel processing of the divided ALU system. Is to do.

【0057】[0057]

【課題を解決するための手段】前記目的を達成するため
に、本発明は、分割ALU方式の並列処理を用い、3次
元物体の画像を2次元画面上に表示する3次元グラフィ
ックス描画装置であって、入力されたポリゴンデータを
走査線ごとに描画するのに必要なパラメータに変換して
中間情報記憶手段に記憶するポリゴンデータ変換手段
と、前記中間情報記憶手段に記憶されたポリゴン描画の
ためのパラメータを用い、1走査線毎の描画に必要なパ
ラメータを求めるとともに前記中間情報記憶手段の内容
を更新する前処理手段と、前記前処理手段から供給され
るパラメータを用い分割ALU方式の並列処理を用いて
1走査線を描画するための画素値補間、隠面消去をそれ
ぞれ行う画素値補間手段及び隠面消去手段と、分割AL
U方式の並列処理に適した形式で中間描画記憶手段に画
素値、Z値を書き込む画素描画手段と、1又は複数の走
査線の描画終了後に、前記中間描画記憶手段に記憶され
た1走査線分の画素値を変換しフレーム記憶手段の該当
する走査線位置に書き込む前記画素値変換手段と、を備
える。
In order to achieve the above object, the present invention provides a three-dimensional graphics rendering apparatus for displaying an image of a three-dimensional object on a two-dimensional screen using a parallel processing of a divided ALU system. Polygon data conversion means for converting input polygon data into parameters necessary for drawing for each scanning line and storing the converted data in intermediate information storage means; and for polygon drawing stored in the intermediate information storage means. Preprocessing means for obtaining parameters necessary for rendering for each scanning line and updating the contents of the intermediate information storage means using the above parameters, and parallel processing of the divided ALU system using the parameters supplied from the preprocessing means. A pixel value interpolation unit and a hidden surface elimination unit for respectively performing pixel value interpolation and hidden surface elimination for drawing one scanning line by using
A pixel drawing unit that writes pixel values and Z values in the intermediate drawing storage unit in a format suitable for the U-type parallel processing, and one scanning line stored in the intermediate drawing storage unit after drawing of one or more scanning lines is completed And a pixel value conversion unit for converting the pixel value for each minute into a corresponding scanning line position of the frame storage unit.

【0058】[0058]

【発明の実施の形態】本発明の実施の形態について説明
する。本発明は、その好ましい実施の形態において、ポ
リゴンデータ変換装置(201)は入力されたポリゴン
データを走査線ごとに描画するのに必要なパラメータに
変換して中間情報メモリ(301)に記憶し、前処理装
置(202)は中間情報メモリ(301)に記憶された
ポリゴン描画のためのパラメータを用い、1走査線毎の
描画に必要なパラメータを求めるとともに中間情報メモ
リ(301)の内容を更新し、画素値補間装置(20
3)、隠面消去装置(204)は、前処理装置(20
2)から供給されるパラメータを用い分割ALU方式の
並列処理を用いて1走査線を描画するための画素値補
間、隠面消去を行い、画素描画装置(205)は分割A
LU方式の並列処理に適した形式で中間描画メモリ(3
02)に画素値、Z値を書き込み、画素値変換装置(2
06)は、1又は複数の走査線の描画終了後に、中間描
画メモリ(302)に記憶された1走査線分の画素値を
変換しフレームバッファの該当する走査線位置に書き込
む。
Embodiments of the present invention will be described. According to the present invention, in a preferred embodiment, the polygon data conversion device (201) converts input polygon data into parameters necessary for drawing each scanning line, and stores the parameters in the intermediate information memory (301). The preprocessing device (202) uses the parameters for polygon drawing stored in the intermediate information memory (301) to obtain parameters necessary for drawing for each scanning line and updates the contents of the intermediate information memory (301). , Pixel value interpolation device (20
3) The hidden surface erasing device (204) is a pre-processing device (20).
Using the parameters supplied from 2), pixel value interpolation and hidden surface elimination for drawing one scan line are performed by using the parallel processing of the divided ALU system.
Intermediate drawing memory (3) in a format suitable for LU-type parallel processing
02) is written in the pixel value conversion device (2).
In step 06), after drawing of one or a plurality of scanning lines is completed, the pixel values for one scanning line stored in the intermediate drawing memory (302) are converted and written to the corresponding scanning line position in the frame buffer.

【0059】より詳細には、入力されたポリゴンデータ
を走査線ごとに描画するのに必要なパラメータに変換す
るポリゴンデータ変換手段(201)と、前記ポリゴン
データ変換手段によって求めたパラメータを画面上の各
走査線に対応付けて記憶する中間情報記憶手段(30
1)と、中間情報記憶手段(301)に記憶されたポリ
ゴン描画のためのパラメータを用い、走査線毎の描画に
必要なパラメータを求め、前記中間情報記憶手段の内容
を更新する前処理手段(202)と、1又は複数の走査
線の各画素について、画素値およびZ値を記憶する中間
描画記憶手段(302)と、前処理手段(202)で求
めたパラメータを用い、走査線のうちポリゴンが占める
領域の画素の画素値を求める画素値補間手段(203)
と、前記前処理手段で求めたパラメータを用い、走査線
のうちポリゴンが占める領域の画素のZ値を求め、中間
描画記憶手段(302)の該当する画素の位置に記憶さ
れているZ値を用いて隠面消去処理を行なう隠面消去手
段(204)と、画素値補間手段(203)で求めた画
素値と隠面消去手段(204)での隠面消去処理結果を
用い、中間描画記憶手段(302)に画素値を描画する
画素描画手段(205)と、1画面の全画素の画素値を
記憶するフレーム記憶手段(303)と、中間描画記憶
手段(302)から1又は複数の走査線の各画素の画素
値を読みだし、フレーム記憶手段(303)への記録に
適した形式に画素値変換を行ない、前記フレーム記憶手
段の該当する走査線位置に書き込む画素値変換手段(2
06)と、を備える。
More specifically, a polygon data conversion means (201) for converting input polygon data into parameters necessary for drawing each scanning line, and parameters obtained by the polygon data conversion means are displayed on a screen. Intermediate information storage means (30) for storing in association with each scanning line
1) and a preprocessing means for obtaining parameters necessary for drawing for each scanning line using the polygon drawing parameters stored in the intermediate information storage means (301) and updating the contents of the intermediate information storage means (1). 202), an intermediate drawing storage unit (302) for storing a pixel value and a Z value for each pixel of one or a plurality of scanning lines, and a polygon among the scanning lines using parameters obtained by the preprocessing unit (202). Value interpolating means for obtaining the pixel value of the pixel in the area occupied by the
Using the parameters obtained by the preprocessing means, the Z value of the pixel in the area occupied by the polygon in the scanning line is obtained, and the Z value stored at the position of the corresponding pixel in the intermediate drawing storage means (302) is obtained. Hidden surface erasing means (204) for performing hidden surface erasing processing using the pixel value obtained by the pixel value interpolating means (203) and the hidden surface erasing processing result of the hidden surface erasing means (204), and storing the intermediate drawing A pixel drawing means (205) for drawing pixel values in the means (302), a frame storage means (303) for storing pixel values of all pixels of one screen, and one or more scans from the intermediate drawing storage means (302) The pixel value of each pixel of the line is read out, the pixel value is converted into a format suitable for recording in the frame storage unit (303), and the pixel value conversion unit (2) is written to the corresponding scanning line position of the frame storage unit.
06).

【0060】画素値補間手段(203)は、分割ALU
方式の並列処理を用いて画素値補間を行ない、隠面消去
手段(204)は分割ALU方式の並列処理を用いて隠
面消去を行ない、画素描画手段(205)は、分割AL
U方式の並列処理に適した形式で中間描画記憶手段(3
02)に画素値を書き込み、画素値変換手段(206)
は、1又は複数の走査線の描画終了後に中間描画記憶手
段(302)に記憶されている分割ALU方式の並列処
理に適した形式の画素値を読みだし、フレーム記憶手段
(303)への記録に適した形式に変換し、該当する走
査線位置に書き込む。
The pixel value interpolation means (203)
The pixel value interpolation is performed using parallel processing of the divided ALU method, the hidden surface removing means (204) performs hidden surface removal using the parallel processing of the divided ALU method, and the pixel drawing means (205) performs the divided AL processing.
The intermediate drawing storage means (3) in a format suitable for U-type parallel processing
02), and a pixel value conversion means (206)
Reads out a pixel value in a format suitable for the parallel processing of the divided ALU system stored in the intermediate drawing storage means (302) after drawing of one or a plurality of scanning lines, and records it in the frame storage means (303) And writes it to the corresponding scanning line position.

【0061】本発明の実施の形態においては、ポリゴン
データ変換手段(201)、前処理手段(202)、画
素値補間手段(203)、隠面消去手段(204)、画
素描画手段(205)、画素値変換手段(206)は、
データ処理装置(200)で実行されるプログラムによ
りその機能を実現するようにしてもよい。この場合、、
ポリゴン入力手段(100)、データ処理装置(20
0)、記憶装置(300)、表示手段(400)を含む
3次元グラフィックス描画装置において、上記プログラ
ムを記録した記録媒体からデータ処理装置のメインメモ
リにプログラムをロードし実行することで、本発明を実
施される。
In the embodiment of the present invention, polygon data conversion means (201), preprocessing means (202), pixel value interpolation means (203), hidden surface elimination means (204), pixel drawing means (205), The pixel value conversion means (206)
The function may be realized by a program executed by the data processing device (200). in this case,,
Polygon input means (100), data processing device (20
0), in a three-dimensional graphics rendering apparatus including a storage device (300) and a display means (400), the present invention is realized by loading and executing a program from a recording medium on which the program is recorded to a main memory of a data processing device. Will be implemented.

【0062】本発明の実施の形態によれば、走査線毎に
ポリゴン描画を行ない、1又は複数の走査線内での画素
値補間、隠面消去、描画は、中間描画メモリを用いて行
ない、中間描画メモリでは、分割ALU方式の並列処理
に適した形式で画素値、Z値を記憶し、1又は複数の走
査線の描画終了後に、画素値変換装置によって前記中間
描画メモリに記憶された画素値を変換し、フレームバッ
ファに書き込むことにより、分割ALU方式の並列処理
を用いた描画処理の際にオーバーヘッドとなる画素値変
換の処理量を削減し、高速に描画処理を実行できる。
According to the embodiment of the present invention, polygon drawing is performed for each scanning line, and pixel value interpolation, hidden surface removal, and drawing within one or a plurality of scanning lines are performed using an intermediate drawing memory. In the intermediate drawing memory, pixel values and Z values are stored in a format suitable for the parallel processing of the divided ALU system, and after the drawing of one or a plurality of scanning lines is completed, the pixels stored in the intermediate drawing memory by the pixel value conversion device are stored. By converting the value and writing the converted value to the frame buffer, the amount of pixel value conversion processing which becomes an overhead during the drawing process using the parallel processing of the divided ALU system can be reduced, and the drawing process can be executed at high speed.

【0063】これは、従来の3次元グラフィックス描画
装置では、他のポリゴンによって上書きされ、実際には
画面上で表示されない画素の画素値についても画素値変
換処理を実行していたのに対し、本発明によれば、必要
最低限の回数である、画面内の各画素について1回の画
素値変換処理を行なえばよい、ためである。以下、実施
例に即して詳細に説明する。
This is because, in the conventional three-dimensional graphics rendering apparatus, the pixel value conversion processing is also performed on the pixel values of the pixels that are overwritten by other polygons and are not actually displayed on the screen. According to the present invention, it is only necessary to perform one pixel value conversion process for each pixel in the screen, which is the minimum number of times. Hereinafter, the present invention will be described in detail with reference to examples.

【0064】[0064]

【実施例】図1は、本発明の3次元グラフィックス描画
装置の一実施例の構成を示すブロック図である。図1を
参照すると、本発明の3次元グラフィックス描画装置の
一実施例は、ポリゴンデータ入力装置100と、ポリゴ
ンデータ変換装置201と、前処理装置202と、画素
値補間装置203と、隠面消去装置204と、画素描画
装置205と、画素値変換装置206と、中間情報メモ
リ301と、中間描画メモリ302と、フレームバッフ
ァ303と、表示装置400と、を備えて構成されてい
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of a three-dimensional graphics drawing apparatus according to the present invention. Referring to FIG. 1, an embodiment of a three-dimensional graphics rendering apparatus according to the present invention includes a polygon data input apparatus 100, a polygon data conversion apparatus 201, a preprocessing apparatus 202, a pixel value interpolation apparatus 203, a hidden surface It includes an erasing device 204, a pixel drawing device 205, a pixel value conversion device 206, an intermediate information memory 301, an intermediate drawing memory 302, a frame buffer 303, and a display device 400.

【0065】中間情報メモリ301は、ポリゴンを走査
線ごとに描画するために必要となるパラメータを、各走
査線に対応づけて記憶するメモリである。中間描画メモ
リ302は、1走査線の各画素について、画素値とZ値
を記憶するメモリである。図3は、中間描画メモリの構
造を示す模式図である。分割ALU方式の並列処理によ
って求められた画素値は、例えば、図14に示したよう
に、4画素分の画素値が16bit×4の形式で64b
itレジスタに格納されており、また各色成分R、G、
Bごとに別のレジスタに格納される。中間描画メモリ3
02を、図3のような構造にすることで、求められた画
素値を、処理のオーバーヘッドとなる画素値変換処理を
行なわずに直接書き込むことができる。また、Z値も同
様に4画素単位で求まるので、そのZ値も中間描画メモ
リ302に、図3に示すように、該当する画素の画素値
に連続して格納する。
The intermediate information memory 301 is a memory for storing parameters necessary for rendering a polygon for each scanning line in association with each scanning line. The intermediate drawing memory 302 is a memory that stores a pixel value and a Z value for each pixel of one scanning line. FIG. 3 is a schematic diagram showing the structure of the intermediate drawing memory. As shown in FIG. 14, for example, as shown in FIG. 14, a pixel value of four pixels is 64 bits in a 16-bit × 4 format, as shown in FIG.
It is stored in the it register, and each color component R, G,
B is stored in another register. Intermediate drawing memory 3
02 has a structure as shown in FIG. 3, so that the obtained pixel value can be directly written without performing the pixel value conversion processing that is a processing overhead. In addition, since the Z value is similarly obtained in units of four pixels, the Z value is also stored in the intermediate drawing memory 302 continuously to the pixel value of the corresponding pixel as shown in FIG.

【0066】フレームバッファ303は、画面内の各画
素の画素値を記憶するメモリである。
The frame buffer 303 is a memory for storing a pixel value of each pixel in the screen.

【0067】図2は、本発明の3次元グラフィックス描
画装置の一実施例の処理フローを示すフローチャートで
ある。
FIG. 2 is a flowchart showing the processing flow of one embodiment of the three-dimensional graphics drawing apparatus of the present invention.

【0068】以下、図1および図2を参照して、本発明
の3次元グラフィックス描画装置の一実施例の動作につ
いて説明する。ここでは簡単のために、1走査線ごとに
描画する場合を例に説明する。また、分割ALU方式の
並列処理による画素値補間、隠面消去については、従来
法で説明したものと同様に行なう場合について説明す
る。
The operation of one embodiment of the three-dimensional graphics drawing apparatus of the present invention will be described below with reference to FIGS. Here, for the sake of simplicity, a case where drawing is performed for each scanning line will be described as an example. Further, a case where pixel value interpolation and hidden surface elimination by parallel processing of the divided ALU method are performed in the same manner as described in the conventional method will be described.

【0069】描画を開始する前に、中間描画メモリ30
2の全画素の画素値には背景を表す画素値を格納し、全
画素のZ値には表現できる最大のZ値を格納しておく
(ステップS101)。
Before starting drawing, the intermediate drawing memory 30
The pixel value representing the background is stored as the pixel value of all the pixels 2 and the maximum expressible Z value is stored as the Z value of all the pixels (step S101).

【0070】ポリゴンデータ入力装置100からは、従
来の3次元グラフィックス描画装置の場合と同様に、画
面上に表示する各ポリゴンについて、座標変換、照明計
算、クリッピング、透視投影等の処理を行なった後の、
2次元の画面上に投影されたポリゴンデータが入力され
る(ステップS102)。
From the polygon data input device 100, processes such as coordinate conversion, illumination calculation, clipping, and perspective projection were performed for each polygon to be displayed on the screen, as in the case of the conventional three-dimensional graphics drawing device. After,
The polygon data projected on the two-dimensional screen is input (step S102).

【0071】ポリゴンデータ変換装置201は、ポリゴ
ンデータ入力装置100から入力されたポリゴンデータ
に基づき、グロー・シェーディングを行なうためのパラ
メータ(以下、「シェーディングパラメータ」と呼ぶ)
を算出する。そして、求めたシェーディングパラメータ
およびスパンパラメータを中間情報メモリ301の、Y
座標がYMINの走査線に対応する位置に格納する(ス
テップS103)。
The polygon data converter 201 performs parameters for performing glow shading based on the polygon data input from the polygon data input device 100 (hereinafter referred to as "shading parameters").
Is calculated. Then, the obtained shading parameter and span parameter are stored in Y of the intermediate information memory 301.
The coordinates are stored in a position corresponding to the scanning line of YMIN (step S103).

【0072】入力された全ポリゴンについてポリゴンデ
ータ変換を行なうために、全ポリゴンのポリゴンデータ
変換が終了したかの判定を行ない、終了していなけれ
ば、ステップS102に戻り、次のポリゴンデータを入
力する(ステップS104)。
In order to perform the polygon data conversion for all the input polygons, it is determined whether the polygon data conversion for all the polygons has been completed. If not, the flow returns to step S102 to input the next polygon data. (Step S104).

【0073】全ポリゴンデータの変換が終了すると、前
処理装置202は、中間情報メモリ301に記憶されて
いる、あるY座標SYの走査線に対応づけられたポリゴ
ン描画のためのパラメータを読みだし、画素値補間装置
203および隠面消去装置204にパラメータを供給す
る。具体的には、例えば、最初にSY=0とし、Y座標
がSYの走査線に対応づけられたポリゴン描画のための
パラメータを供給し、Y座標がSYの走査線に対応づけ
られたポリゴン描画のためのパラメータを用いた描画が
終了すれば、SYを1増加させて同様の処理を行なう。
When the conversion of all the polygon data is completed, the preprocessing device 202 reads out the parameters for drawing the polygon corresponding to the scanning line of a certain Y coordinate SY stored in the intermediate information memory 301, The parameters are supplied to the pixel value interpolation device 203 and the hidden surface removal device 204. Specifically, for example, first, SY = 0 is set, a parameter for drawing a polygon whose Y coordinate is associated with a scanning line of SY is supplied, and a polygon drawing whose Y coordinate is associated with a scanning line of SY is provided. When the drawing using the parameters for is completed, SY is incremented by 1 and the same processing is performed.

【0074】また、パラメータの供給の際に、中間情報
メモリ301の更新を行なう。具体的には、処理中のポ
リゴンのY座標の最大値YMAXがSY+1以上である
場合、処理中のポリゴンはY座標がSY+1の走査線に
おいてもスパンを持つため、Y座標がSY+1の走査線
におけるスパンパラメータを求め、中間情報メモリ30
1の、Y座標がSY+1の走査線に対応する位置に格納
する(ステップ105)。
When supplying the parameters, the intermediate information memory 301 is updated. Specifically, when the maximum value YMAX of the Y coordinate of the polygon being processed is greater than or equal to SY + 1, the polygon being processed has a span even on the scanning line whose Y coordinate is SY + 1. The span parameter is obtained and the intermediate information memory 30
No. 1 is stored at a position corresponding to the scanning line whose Y coordinate is SY + 1 (step 105).

【0075】画素値補間装置203は、従来の3次元グ
ラフィックス描画装置における画素値補間装置502と
同一の処理を行なう。すなわち、前処理部202から受
け取ったパラメータに基づき、分割ALU方式の並列処
理によって、スパン内の各画素の画素値を求める(ステ
ップ106)。
The pixel value interpolation device 203 performs the same processing as the pixel value interpolation device 502 in the conventional three-dimensional graphics drawing device. That is, based on the parameters received from the preprocessing unit 202, the pixel value of each pixel in the span is obtained by the parallel processing of the divided ALU system (step 106).

【0076】隠面消去装置204は、従来の3次元グラ
フィックス描画装置における隠面消去装置503と同一
の処理を行なう。ただし、Z値の記憶には中間描画メモ
リ302を用いる。すなわち、前処理部202から受け
取ったパラメータに基づき、分割ALU方式の並列処理
によって、スパン内の各画素のZ値を求め、中間描画メ
モリ302の該当する画素位置に記憶されているZ値と
比較し、画素値を更新する画素の判定及びZ値の更新を
行なう(ステップS107)。
The hidden surface erasing device 204 performs the same processing as the hidden surface erasing device 503 in the conventional three-dimensional graphics drawing device. However, the intermediate drawing memory 302 is used for storing the Z value. That is, based on the parameters received from the preprocessing unit 202, the Z value of each pixel in the span is obtained by parallel processing of the divided ALU system, and compared with the Z value stored in the corresponding pixel position of the intermediate drawing memory 302. Then, the determination of the pixel whose pixel value is to be updated and the update of the Z value are performed (step S107).

【0077】画素描画装置205は、画素値補間装置2
03で求められたスパン内の画素値と、隠面消去装置2
04で求められた各画素位置でのZ値比較の結果とに基
づき、中間描画メモリ302の該当する画素位置の画素
値を更新する。4画素分の画素値の更新は、従来の3次
元グラフィックス描画装置における、Z値の更新と同様
の処理によって実行できる。
The pixel drawing device 205 includes the pixel value interpolation device 2
03 and the pixel value in the span obtained in step 03
The pixel value of the corresponding pixel position in the intermediate drawing memory 302 is updated based on the result of the Z value comparison at each pixel position obtained in 04. Updating of the pixel values for four pixels can be performed by the same processing as updating the Z value in the conventional three-dimensional graphics rendering apparatus.

【0078】ここで、中間描画メモリ302に記憶され
る更新された画素値の形式は、図3に示したように、分
割ALU方式の並列処理の結果として得られる画素値の
形式と同一であるため、従来の3次元グラフィックス描
画装置におけるステップS206で必要であったよう
な、画素値変換処理を行なう必要はない(ステップS1
08)。
Here, the format of the updated pixel value stored in the intermediate drawing memory 302 is the same as the format of the pixel value obtained as a result of the parallel processing of the divided ALU system, as shown in FIG. Therefore, it is not necessary to perform the pixel value conversion processing required in step S206 in the conventional three-dimensional graphics drawing apparatus (step S1).
08).

【0079】図2のステップS106からステップS1
08で、1つの走査線の、1つのスパンの、4画素分の
描画が実行される。
The steps S106 to S1 in FIG.
At 08, drawing of four pixels of one scanning line and one span is executed.

【0080】続いて、1つのスパン内の全画素を描画す
るために、スパンの終了判定を行なう。具体的には、例
えばスパン左端のX座標XMINの画素から4画素ずつ
描画し、描画処理がスパン右端X座標XMAXの画素に
達したかの判定を行ない、右端に達していなければ、ス
テップS104に戻って4画素分右に移動して次の4画
素を描画する(ステップS109)。これは、従来の3
次元グラフィックス描画装置における図7のステップS
207と同一の処理である。
Subsequently, in order to draw all the pixels in one span, the end of the span is determined. Specifically, for example, four pixels are drawn from the pixel at the X coordinate XMIN at the left end of the span, and it is determined whether the drawing processing has reached the pixel at the X coordinate XMAX at the right end of the span. If the pixel has not reached the right end, the process returns to step S104. The image is moved right by four pixels to draw the next four pixels (step S109). This is the conventional 3
Step S in FIG. 7 in the three-dimensional graphics drawing apparatus
This is the same processing as 207.

【0081】図2のステップS106からステップS1
09の処理で、1つの走査線の、1つのスパンの描画が
実行される。
Steps S106 to S1 in FIG.
In the process 09, drawing of one scanning line and one span is executed.

【0082】続いて、1つの走査線内の全スパンを描画
するために、走査線の終了判定を行なう。具体的には、
例えば、中間情報メモリに、Y座標SYの走査線に対応
づけられたポリゴン描画のためのパラメータでまだスパ
ン描画が終了していないものがあるかの判定を行なう。
1走査線内の全スパンの描画が終了していなければ、ス
テップS105に戻って、その走査線内の次のスパンを
描画する(ステップS110)。
Subsequently, in order to draw all spans in one scanning line, the end of the scanning line is determined. In particular,
For example, it is determined whether or not there is a parameter in the intermediate information memory for drawing a polygon associated with the scanning line of the Y coordinate SY, for which the span drawing has not been completed yet.
If the drawing of all spans in one scanning line has not been completed, the process returns to step S105, and the next span in that scanning line is drawn (step S110).

【0083】図2のステップS105からステップS1
10の処理で、1つの走査線の全画素の、中間描画メモ
リ302への描画が実行される。
Step S 105 to step S 1 in FIG.
In the process of 10, rendering of all pixels of one scanning line in the intermediate rendering memory 302 is executed.

【0084】続いて、その走査線内の全画素の画素値
を、フレームバッファ303に格納するのに適した形式
に変換し、フレームバッファ303の該当する走査線位
置に書き込む。画素値の変換は、従来の3次元グラフィ
ックス描画装置における画素値変換/描画装置504で
実行される画素値変換と同様である(ステップS11
1)。
Subsequently, the pixel values of all the pixels in the scanning line are converted into a format suitable for being stored in the frame buffer 303, and written to the corresponding scanning line position in the frame buffer 303. The conversion of the pixel value is the same as the pixel value conversion performed by the pixel value conversion / drawing device 504 in the conventional three-dimensional graphics drawing device (step S11).
1).

【0085】図2のステップS105からステップS1
11の処理で、1つの走査線の全画素の、フレームバッ
ファ303への描画が実行される。
Step S 105 to step S 1 in FIG.
In the process of 11, rendering of all pixels of one scanning line on the frame buffer 303 is executed.

【0086】続いて、画面内の全走査線を描画するた
め、全走査線の描画が終了したかの判定を行ない、終了
していなければ、ステップS105に戻って、次の走査
線を描画する(ステップS112)。
Subsequently, in order to draw all the scanning lines in the screen, it is determined whether or not the drawing of all the scanning lines has been completed. If not, the flow returns to step S105 to draw the next scanning line. (Step S112).

【0087】全走査線の描画が終了すると、表示装置4
00は、フレームバッファ303内容を読みとり、テレ
ビ受像機やCRTディスプレイ装置等に表示する(ステ
ップS113)。
When the drawing of all the scanning lines is completed, the display device 4
00 reads the contents of the frame buffer 303 and displays them on a television receiver or a CRT display device (step S113).

【0088】図4に、図3に示した中間描画メモリ30
2の構成を少し変更した、異なる中間描画メモリ302
の構成の例を示す。
FIG. 4 shows the intermediate drawing memory 30 shown in FIG.
A different intermediate drawing memory 302 with a slight modification of the configuration of FIG.
An example of the configuration will be described.

【0089】図3に示す構成の中間描画メモリ302を
用いた上記実施例では、画素描画装置205が中間描画
メモリ302に画素値を書き込む際の画素値変換の必要
がなく、高速に描画処理を実行できるが、中間描画メモ
リ内302では、1画素の1色成分を記憶するのに16
bitの記憶領域を用いるため、中間描画メモリ302
のために必要となるメモリ量が大きくなる点が問題とな
る場合もある。
In the above-described embodiment using the intermediate drawing memory 302 having the configuration shown in FIG. 3, the pixel drawing device 205 does not need to convert pixel values when writing pixel values into the intermediate drawing memory 302, and can perform drawing processing at high speed. Although it can be executed, in the intermediate drawing memory 302, it takes 16 to store one color component of one pixel.
In order to use a storage area of bits, the intermediate drawing memory 302
In some cases, a problem arises in that the amount of memory required for the operation becomes large.

【0090】そこで、本発明の第2の実施例として、図
4に示した構成の中間描画メモリ302を用いた例につ
いて説明する。この実施例では、中間描画メモリ内30
2で1画素の1色成分を記憶するのに8bitの記憶容
量を用いる。
Therefore, as a second embodiment of the present invention, an example using the intermediate drawing memory 302 having the configuration shown in FIG. 4 will be described. In this embodiment, 30 in the intermediate drawing memory
The storage capacity of 8 bits is used to store one color component of one pixel in 2.

【0091】これは、通常、フレームバッファ303に
画素値を記憶する際には、1画素の1色成分あたり8b
it以下でよいためである。この実施例では、画素描画
措置205が中間描画メモリ302に画素値を書き込む
際に、16bit×4から8bit×4へのbit数の
変換が必要となるが、従来の3次元グラフィックス描画
装置の画素値変換/描画装置504で必要とされていた
データの並び替え、位置合わせは必要ないため、従来の
3次元グラフィックス描画装置における変換処理と比較
すると容易に処理することができる。
Normally, when a pixel value is stored in the frame buffer 303, 8 b
This is because it may be less than it. In this embodiment, when the pixel drawing unit 205 writes pixel values in the intermediate drawing memory 302, it is necessary to convert the number of bits from 16 bits × 4 to 8 bits × 4. Since it is not necessary to rearrange and align the data required by the pixel value conversion / rendering device 504, the data can be easily processed as compared with the conversion process in the conventional three-dimensional graphics rendering device.

【0092】この実施例では、中間描画メモリ302へ
の書き込みの際の処理量を大きく増加することなく、中
間描画メモリ302のために必要となるメモリ量を大き
く削減することができる。
In this embodiment, the amount of memory required for the intermediate drawing memory 302 can be greatly reduced without greatly increasing the processing amount at the time of writing to the intermediate drawing memory 302.

【0093】なお、上記した実施例では、簡単のため
に、中間描画メモリ302は、1走査線の各画素の画素
値とZ値を記憶し、1走査線毎に描画処理を行なう場合
について説明したが、中間描画メモリ302は、複数の
走査線の各画素の画素値とZ値を記憶し、複数の走査線
単位で描画処理を行なうものとしてもよい。
In the above embodiment, for the sake of simplicity, the case where the intermediate drawing memory 302 stores the pixel value and the Z value of each pixel of one scanning line and performs the drawing process for each scanning line will be described. However, the intermediate drawing memory 302 may store the pixel value and the Z value of each pixel of a plurality of scanning lines, and perform the drawing process in units of a plurality of scanning lines.

【0094】なお、上記した実施例では、ポリゴンの描
画に、画素値の色成分であるR、G、Bを用いる場合に
ついて説明したが、本発明は、R、G、Bを用いる場合
にのみ限定されるものでなく、例えば、画素値のルック
アップテーブルのインデックス値を用いる場合等にも適
用することができる。
In the above-described embodiment, the case where R, G, and B, which are the color components of the pixel values, are used to draw the polygon has been described. However, the present invention is applicable only when R, G, and B are used. The present invention is not limited to this. For example, the present invention can be applied to a case where an index value of a lookup table of pixel values is used.

【0095】なお、上述の実施例では、分割ALU方式
の並列処理を用いた画素値補間において、4画素分の画
素値の各色成分を4並列に算出する場合について説明し
たが、本発明は、このような形式の並列処理に限定され
るものでなく、例えば、1画素の色成分R、G、Bおよ
びアルファブレンディングに用いるアルファ値の4つの
成分を4並列に処理する場合等にも適用することができ
る。この場合、中間描画メモリ302に記憶する画素値
の構造は、画素値補間で求められる画素値を記憶するの
に適した構造とする。
In the above-described embodiment, a case has been described where four color components of pixel values of four pixels are calculated in parallel in pixel value interpolation using parallel processing of the divided ALU system. The present invention is not limited to this type of parallel processing, and is also applicable to, for example, a case where four components of one color component R, G, B and four alpha values used for alpha blending are processed in four parallel processes. be able to. In this case, the structure of the pixel values stored in the intermediate drawing memory 302 is a structure suitable for storing the pixel values obtained by the pixel value interpolation.

【0096】なお、上述の実施例では、分割ALU方式
で、16bit×4の4並列処理を行なう場合について
説明しているが、この発明は16bit×4の形式の並
列処理に限定されず、例えば、32bit×2の2並列
処理等を用いる場合等にも適用できる。
In the above-described embodiment, the case where the 16-bit × 4 4-parallel processing is performed by the divided ALU system is described. However, the present invention is not limited to the 16-bit × 4 format parallel processing. , 32 bits × 2, and the like.

【0097】なお、本発明の3次元グラフィックス描画
装置は、専用のシステムによらず、通常のコンピュータ
システムを用いて実現可能である。例えば、コンピュー
タに上述の動作を実現するためのプログラムを格納した
媒体(フロッピーディスク、CD−ROM等)から該プ
ログラムをインストールすることにより、上述の処理を
実行する3次元グラフィックス描画装置を構成すること
ができる。
The three-dimensional graphics drawing apparatus of the present invention can be realized by using a general computer system without using a dedicated system. For example, a three-dimensional graphics rendering apparatus that executes the above-described processing is configured by installing the program for realizing the above-described operation in a computer from a medium (a floppy disk, a CD-ROM, or the like) storing the program. be able to.

【0098】また、コンピュータにプログラムを供給す
るための媒体は、通信媒体(通信回線、通信ネットワー
ク、通信システムのように、一次的に且つ流動的にプロ
グラムを保持する媒体)でもよい。例えば、通信ネット
ワークの掲示板(BBS)に該プログラムを掲示し、こ
れをネットワークを介して配信してもよい。そして、こ
のプログラムを起動し、OSの制御下で、他のアプリケ
ーションプログラムと同様に実行することにより、上述
の処理を実行することができる。
[0098] The medium for supplying the program to the computer may be a communication medium (a medium that temporarily and fluidly stores the program, such as a communication line, a communication network, or a communication system). For example, the program may be posted on a bulletin board (BBS) of a communication network and distributed via the network. Then, by starting this program and executing it in the same manner as other application programs under the control of the OS, the above-described processing can be executed.

【0099】[0099]

【発明の効果】以上説明したように、本発明によれば、
走査線毎にポリゴン描画を行ない、1又は複数の走査線
内での画素値補間、隠面消去、描画について、中間描画
メモリを用いて行ない、中間描画メモリでは分割ALU
方式の並列処理に適した形式にて画素値、Z値を記憶
し、1又は複数の走査線の描画終了後に、画素値変換装
置によって、中間描画メモリに記憶された画素値を変換
し、フレームバッファに書き込む、構成としたことによ
り、分割ALU方式の並列処理を用いた描画処理の際に
オーバーヘッドとなる画素値変換の処理量を削減し、高
速に描画処理を実行することができる、という効果を奏
する。
As described above, according to the present invention,
Polygon rendering is performed for each scanning line, and pixel value interpolation, hidden surface removal, and rendering within one or more scanning lines are performed using an intermediate rendering memory.
The pixel value and the Z value are stored in a format suitable for the parallel processing of the system, and after the drawing of one or a plurality of scanning lines is completed, the pixel value stored in the intermediate drawing memory is converted by the pixel value conversion device, By writing to the buffer, the amount of processing for pixel value conversion, which is an overhead during drawing processing using the parallel processing of the divided ALU system, can be reduced, and the drawing processing can be executed at high speed. To play.

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

【図1】本発明の3次元グラフィックス描画装置の一実
施例の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of a three-dimensional graphics drawing apparatus according to the present invention.

【図2】本発明の3次元グラフィックス描画装置の一実
施例の処理を説明するフローチャートである。
FIG. 2 is a flowchart illustrating a process of an embodiment of the three-dimensional graphics drawing apparatus according to the present invention.

【図3】本発明の3次元グラフィックス描画装置の一実
施例における中間描画メモリの構成の一例を示す模式図
である。
FIG. 3 is a schematic diagram showing an example of a configuration of an intermediate drawing memory in one embodiment of the three-dimensional graphics drawing device of the present invention.

【図4】本発明の3次元グラフィックス描画装置の一実
施例における中間描画メモリの別の構成例を示す模式図
である。
FIG. 4 is a schematic diagram showing another configuration example of an intermediate drawing memory in one embodiment of the three-dimensional graphics drawing apparatus of the present invention.

【図5】分割ALU方式の並列処理を説明する模式図で
ある。
FIG. 5 is a schematic diagram illustrating parallel processing of a divided ALU system.

【図6】従来の3次元グラフィックス描画装置の構成を
示すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of a conventional three-dimensional graphics drawing apparatus.

【図7】従来の3次元グラフィックス描画装置の処理を
説明するフローチャートである。
FIG. 7 is a flowchart illustrating processing of a conventional three-dimensional graphics drawing apparatus.

【図8】画素値補間の様子を説明する模式図である。FIG. 8 is a schematic diagram illustrating a state of pixel value interpolation.

【図9】分割ALU方式の4並列加算を説明する模式図
である。
FIG. 9 is a schematic diagram illustrating 4-parallel addition of the divided ALU system.

【図10】4並列加算を用いた画素値補間を説明する模
式図である。
FIG. 10 is a schematic diagram illustrating pixel value interpolation using 4-parallel addition.

【図11】分割ALU方式の4並列比較を説明する模式
図である。
FIG. 11 is a schematic diagram illustrating four-parallel comparison of the divided ALU system.

【図12】4並列比較を用いたZ値比較を説明する模式
図である。
FIG. 12 is a schematic diagram illustrating a Z-value comparison using 4-parallel comparison.

【図13】4並列論理演算を用いたZ値更新を説明する
模式図である。
FIG. 13 is a schematic diagram illustrating Z value updating using four parallel logical operations.

【図14】画素値補間装置で求められた画素値の構造を
示す模式図である。
FIG. 14 is a schematic diagram showing a structure of a pixel value obtained by a pixel value interpolation device.

【図15】フレームバッファの構造の例を示す模式図で
ある。
FIG. 15 is a schematic diagram illustrating an example of the structure of a frame buffer.

【図16】画素値の変換を説明する模式図である。FIG. 16 is a schematic diagram illustrating conversion of a pixel value.

【図17】分割ALU方式のインターリーブ処理を説明
する模式図である。
FIG. 17 is a schematic diagram illustrating an interleaving process of the divided ALU system.

【図18】24bitカラーへの変換を説明する模式図
である。
FIG. 18 is a schematic diagram illustrating conversion into 24-bit color.

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

100 ポリゴンデータ入力装置 200 データ処理装置 201 ポリゴンデータ変換装置 202 前処理装置 203 画素値補間装置 204 隠面消去装置 205 画素描画装置 206 画素値変換装置 300 記憶装置 301 中間情報メモリ 302 中間描画メモリ 303 フレームバッファ 400 表示装置 500 データ処理装置 501 前処理装置 502 画素値補間装置 503 隠面消去装置 504 画素値変換/描画装置 600 記憶装置 601 Zバッファ 602 フレームバッファ REFERENCE SIGNS LIST 100 polygon data input device 200 data processing device 201 polygon data conversion device 202 preprocessing device 203 pixel value interpolation device 204 hidden surface elimination device 205 pixel drawing device 206 pixel value conversion device 300 storage device 301 intermediate information memory 302 intermediate drawing memory 303 frame Buffer 400 Display device 500 Data processing device 501 Preprocessing device 502 Pixel value interpolation device 503 Hidden surface removal device 504 Pixel value conversion / drawing device 600 Storage device 601 Z buffer 602 Frame buffer

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】分割ALU方式の並列処理を用い、3次元
物体の画像を2次元画面上に表示する3次元グラフィッ
クス描画装置であって、 走査線毎にポリゴン描画を行ない、1又は複数の走査線
内での画素値補間、隠面消去、描画について中間描画記
憶手段を用いて行ない、前記中間描画記憶手段では分割
ALU方式の並列処理に適した形式にて、画素値、及び
Z値を記憶し、1又は複数の走査線の描画終了後に、前
記中間描画記憶手段に記憶された画素値を変換してフレ
ーム記憶手段に書き込む変換手段を含むことを特徴とす
る3次元グラフィックス描画装置。
1. A three-dimensional graphics drawing apparatus for displaying an image of a three-dimensional object on a two-dimensional screen using a parallel processing of a divided ALU system, wherein one or a plurality of polygons are drawn for each scanning line. Pixel value interpolation, hidden surface elimination, and drawing within a scanning line are performed using an intermediate drawing storage unit, and the intermediate drawing storage unit stores the pixel value and the Z value in a format suitable for the parallel processing of the divided ALU system. A three-dimensional graphics drawing apparatus, comprising: a conversion unit that stores and, after drawing one or a plurality of scanning lines, converts a pixel value stored in the intermediate drawing storage unit and writes the converted pixel value into a frame storage unit.
【請求項2】分割ALU方式の並列処理を用い、3次元
物体の画像を2次元画面上に表示する3次元グラフィッ
クス描画装置であって、 入力されたポリゴンデータを走査線ごとに描画するのに
必要なパラメータに変換して中間情報記憶手段に記憶す
るポリゴンデータ変換手段と、 前記中間情報記憶手段に記憶されたポリゴン描画のため
のパラメータを用い、1走査線毎の描画に必要なパラメ
ータを求めるとともに前記中間情報記憶手段の内容を更
新する前処理手段と、 前記前処理手段から供給されるパラメータを用い分割A
LU方式の並列処理を用いて1走査線を描画するための
画素値補間、隠面消去をそれぞれ行う画素値補間手段及
び隠面消去手段と、 分割ALU方式の並列処理に適した形式で中間描画記憶
手段に画素値、Z値を書き込む画素描画手段と、 1又は複数の走査線の描画終了後に、前記中間描画記憶
手段に記憶された1走査線分の画素値を変換しフレーム
記憶手段の該当する走査線位置に書き込む前記画素値変
換手段とを含むことを特徴とする3次元グラフィックス
描画装置。
2. A three-dimensional graphics rendering apparatus for displaying an image of a three-dimensional object on a two-dimensional screen by using a parallel processing of a divided ALU system, wherein the input polygon data is rendered for each scanning line. A polygon data conversion means for converting the parameters into the parameters necessary for storing the intermediate information storage means, and using the parameters for polygon drawing stored in the intermediate information storage means, Preprocessing means for obtaining and updating the contents of the intermediate information storage means; and dividing A using the parameters supplied from the preprocessing means.
Pixel value interpolation means and hidden surface erasing means for performing pixel value interpolation and hidden surface elimination for drawing one scanning line using LU parallel processing, and intermediate drawing in a format suitable for divided ALU system parallel processing A pixel drawing means for writing a pixel value and a Z value in the storage means; and a pixel value for one scanning line stored in the intermediate drawing storage means after completion of drawing of one or a plurality of scanning lines. A three-dimensional graphics rendering apparatus, comprising: the pixel value conversion means for writing a pixel value at a scanning line position to be written.
【請求項3】分割ALU方式の並列処理を用い、3次元
物体の画像を2次元画面上に表示する3次元グラフィッ
クス描画装置であって、 入力されたポリゴンデータを走査線ごとに描画するのに
必要なパラメータに変換するポリゴンデータ変換手段
と、 前記ポリゴンデータ変換手段によって求めたパラメータ
を画面上の各走査線に対応づけて記憶する中間情報記憶
手段と、 前記中間情報記憶手段に記憶されたポリゴン描画のため
のパラメータを用い、走査線毎の描画に必要なパラメー
タを求めるとともに、前記中間情報記憶手段の内容を更
新する前処理手段と、 1又は複数の走査線の各画素について、画素値およびZ
値を記憶する中間描画記憶手段と、 前記前処理手段で求めたパラメータを用い、走査線のう
ちポリゴンが占める領域の画素の画素値を求める画素値
補間手段と、 前記前処理手段で求めたパラメータを用い、走査線のう
ちポリゴンが占める領域の画素のZ値を求め、前記中間
描画記憶手段の該当する画素の位置に記憶されているZ
値を用いて隠面消去処理を行なう隠面消去手段と、 前記画素値補間手段で求めた画素値と前記隠面消去手段
での隠面消去処理結果を用い、前記中間描画記憶手段に
画素値を描画する画素描画手段と、 1画面の全画素の画素値を記憶するフレーム記憶手段
と、 前記中間描画記憶手段から前記1又は複数の走査線の各
画素の画素値を読み出し、前記フレーム記憶手段への記
録に適した形式に画素値変換を行ない、前記フレーム記
憶手段の該当する走査線位置に書き込む画素値変換手段
と、を備え、 前記画素値補間手段は、分割ALU方式の並列処理を用
いて画素値補間を行ない、 前記隠面消去手段は、分割ALU方式の並列処理を用い
て隠面消去を行ない、 前記画素描画手段は、分割ALU方式の並列処理に適し
た形式で前記中間描画記憶手段に画素値を書き込み、 前記画素値変換手段は、前記1又は複数の走査線の描画
終了後に、前記中間描画記憶手段に記憶されている分割
ALU方式の並列処理に適した形式の画素値を読み出
し、前記フレーム記憶手段への記録に適した形式に変換
し、該当する走査線位置に書き込む、ことを特徴とする
3次元グラフィックス描画装置。
3. A three-dimensional graphics rendering device for displaying an image of a three-dimensional object on a two-dimensional screen by using a parallel processing of a divided ALU system, wherein the input polygon data is rendered for each scanning line. Polygon data converting means for converting parameters required by the polygon data converting means, intermediate information storing means for storing parameters obtained by the polygon data converting means in association with each scanning line on a screen, and stored in the intermediate information storing means. Preprocessing means for obtaining parameters necessary for rendering for each scanning line using parameters for rendering polygons, and updating the contents of the intermediate information storage means; and a pixel value for each pixel of one or more scanning lines. And Z
Intermediate drawing storage means for storing values, pixel value interpolation means for obtaining pixel values of pixels in a region occupied by polygons in a scanning line using the parameters obtained by the preprocessing means, and parameters obtained by the preprocessing means Is used to determine the Z value of the pixel in the area occupied by the polygon in the scanning line, and the Z value stored at the position of the corresponding pixel in the intermediate drawing storage means is obtained.
A hidden surface erasing unit that performs hidden surface erasing processing using a value, and a pixel value obtained by the pixel value interpolating unit and a result of the hidden surface erasing process by the hidden surface erasing unit. A pixel drawing unit for drawing pixel data; a frame storage unit for storing pixel values of all pixels on one screen; and a pixel storage unit for reading pixel values of each pixel of the one or more scanning lines from the intermediate drawing storage unit. Pixel value conversion means for performing pixel value conversion into a format suitable for recording to the corresponding pixel, and writing the pixel value to a corresponding scanning line position of the frame storage means. The hidden surface elimination means performs hidden surface elimination by using parallel processing of a divided ALU method, and the pixel drawing means stores the intermediate drawing memory in a format suitable for the parallel processing of a divided ALU method. hand The pixel value conversion unit reads out the pixel value in a format suitable for the parallel processing of the divided ALU system stored in the intermediate drawing storage unit after the drawing of the one or more scanning lines is completed. A three-dimensional graphics rendering apparatus, which converts the data into a format suitable for recording in the frame storage means and writes the converted data at a corresponding scanning line position.
【請求項4】入力されたポリゴンデータを走査線ごとに
描画するのに必要なパラメータに変換するポリゴンデー
タ変換手段と、 前記ポリゴンデータ変換手段によって求めたパラメータ
を画面上の各走査線に対応づけて記憶する中間情報記憶
手段と、前記中間情報記憶手段に記憶されたポリゴン描
画のためのパラメータを用い、走査線毎の描画に必要な
パラメータを求め、また、前記中間情報記憶手段の内容
を更新する前処理手段と、 1又は複数の走査線の各画素について、画素値およびZ
値を記憶する中間描画情報記憶手段と、 前記前処理手段で求めたパラメータを用い、走査線のう
ちポリゴンが占める領域の画素の画素値を求める画素値
補間手段と、 前記前処理手段で求めたパラメータを用い、走査線のう
ちポリゴンが占める領域の画素のZ値を求め、前記中間
描画情報記憶手段の該当する画素の位置に記憶されてい
るZ値を用いて隠面消去処理を行なう隠面消去手段と、 前記画素値補間手段で求めた画素値と前記隠面消去手段
での隠面消去処理結果を用い、前記中間描画情報記憶手
段に画素値を描画する画素描画手段と、 1画面の全画素の画素値を記憶するフレームバッファ記
憶手段と、 前記中間描画情報記憶手段から前記1又は複数の走査線
の各画素の画素値を読みだし、前記フレームバッファ記
憶手段への記録に適した形式に画素値変換を行ない、前
記フレームバッファ記憶手段の該当する走査線位置に書
き込む画素値変換手段と、を備え、 前記画素値補間手段は分割ALU方式の並列処理を用い
て画素値補間を行ない、 前記隠面消去手段は分割ALU方式の並列処理を用いて
隠面消去を行ない、 前記画素描画手段は、分割ALU方式の並列処理に適し
た形式で前記中間描画情報記憶手段へ画素値を書き込
み、 前記画素値変換手段は、前記1又は複数の走査線の描画
終了後に前記中間描画情報記憶手段に記憶されている分
割ALU方式の並列処理に適した形式の画素値を読みだ
し、前記フレームバッファ記憶手段への記録に適した形
式に変換し、該当する走査線位置に書き込む、3次元グ
ラフィックス描画装置において、前記ポリゴンデータ変
換手段、前記前処理手段、前記画素値補間手段、前記画
素描画手段、前記画素値変換手段の各手段を、前記3次
元グラフィックス描画装置を構成するコンピュータ上で
機能させるプログラムを記録したコンピュータで読み取
り可能な記録媒体。
4. Polygon data conversion means for converting input polygon data into parameters necessary for drawing each scanning line, and associating parameters obtained by said polygon data conversion means with each scanning line on a screen. Using the intermediate information storage means for storing and storing, and the parameters for drawing polygons stored in the intermediate information storage means, obtaining parameters necessary for drawing for each scanning line, and updating the contents of the intermediate information storage means Pre-processing means, and for each pixel of one or more scanning lines, the pixel value and Z
An intermediate drawing information storage unit for storing a value, a pixel value interpolation unit for obtaining a pixel value of a pixel of an area occupied by a polygon in a scanning line by using the parameters obtained by the preprocessing unit, and a pixel value obtained by the preprocessing unit. Using the parameters, the Z value of the pixel in the area occupied by the polygon in the scanning line is obtained, and the hidden surface erasing process is performed using the Z value stored at the position of the corresponding pixel in the intermediate drawing information storage means. An erasing unit; a pixel drawing unit that draws a pixel value in the intermediate drawing information storage unit by using a pixel value obtained by the pixel value interpolation unit and a hidden surface erasing process result by the hidden surface erasing unit; A frame buffer storage unit for storing pixel values of all pixels; and a pixel value of each pixel of the one or more scanning lines read from the intermediate drawing information storage unit, and suitable for recording in the frame buffer storage unit. Pixel value conversion means for performing pixel value conversion in a format according to the above, and writing the pixel value to a corresponding scanning line position of the frame buffer storage means, wherein the pixel value interpolation means performs pixel value interpolation using parallel processing of a divided ALU system. The hidden surface erasing means performs hidden surface erasing by using the parallel processing of the divided ALU method, and the pixel drawing means stores the pixel value in the intermediate drawing information storage means in a format suitable for the parallel processing of the divided ALU method. Writing, the pixel value conversion means reads out pixel values in a format suitable for parallel processing of the divided ALU system stored in the intermediate drawing information storage means after drawing of the one or more scanning lines is completed, and In the three-dimensional graphics drawing apparatus, the polygon data conversion unit converts the data into a format suitable for recording in a buffer storage unit and writes the converted data into a corresponding scan line position. Each of the pre-processing unit, the pixel value interpolating unit, the pixel drawing unit, and the pixel value converting unit can be read by a computer recording a program that causes the computer to function on the computer constituting the three-dimensional graphics drawing device. recoding media.
JP22380998A 1998-08-07 1998-08-07 3D graphics drawing device Expired - Fee Related JP3279260B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22380998A JP3279260B2 (en) 1998-08-07 1998-08-07 3D graphics drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22380998A JP3279260B2 (en) 1998-08-07 1998-08-07 3D graphics drawing device

Publications (2)

Publication Number Publication Date
JP2000057365A true JP2000057365A (en) 2000-02-25
JP3279260B2 JP3279260B2 (en) 2002-04-30

Family

ID=16804070

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22380998A Expired - Fee Related JP3279260B2 (en) 1998-08-07 1998-08-07 3D graphics drawing device

Country Status (1)

Country Link
JP (1) JP3279260B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009538486A (en) * 2006-05-25 2009-11-05 クゥアルコム・インコーポレイテッド Graphic processor with arithmetic and elementary function units
US8644643B2 (en) 2006-06-14 2014-02-04 Qualcomm Incorporated Convolution filtering in a graphics processor
US8766995B2 (en) 2006-04-26 2014-07-01 Qualcomm Incorporated Graphics system with configurable caches
US8766996B2 (en) 2006-06-21 2014-07-01 Qualcomm Incorporated Unified virtual addressed register file
US8869147B2 (en) 2006-05-31 2014-10-21 Qualcomm Incorporated Multi-threaded processor with deferred thread output control

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001006109A (en) 1999-06-23 2001-01-12 Sony Corp Non-magnetic substrate for magnetic head and magnetic head

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8766995B2 (en) 2006-04-26 2014-07-01 Qualcomm Incorporated Graphics system with configurable caches
JP2009538486A (en) * 2006-05-25 2009-11-05 クゥアルコム・インコーポレイテッド Graphic processor with arithmetic and elementary function units
US8884972B2 (en) 2006-05-25 2014-11-11 Qualcomm Incorporated Graphics processor with arithmetic and elementary function units
US8869147B2 (en) 2006-05-31 2014-10-21 Qualcomm Incorporated Multi-threaded processor with deferred thread output control
US8644643B2 (en) 2006-06-14 2014-02-04 Qualcomm Incorporated Convolution filtering in a graphics processor
US8766996B2 (en) 2006-06-21 2014-07-01 Qualcomm Incorporated Unified virtual addressed register file

Also Published As

Publication number Publication date
JP3279260B2 (en) 2002-04-30

Similar Documents

Publication Publication Date Title
US6038031A (en) 3D graphics object copying with reduced edge artifacts
US5594854A (en) Graphics subsystem with coarse subpixel correction
KR100902973B1 (en) Real-time display post-processing using programmable hardware
US8704830B2 (en) System and method for path rendering with multiple stencil samples per color sample
US5805868A (en) Graphics subsystem with fast clear capability
US7015914B1 (en) Multiple data buffers for processing graphics data
US5815166A (en) Graphics subsystem with slaveable rasterizer
US10049486B2 (en) Sparse rasterization
US20030142100A1 (en) Vertex assembly buffer and primitive launch buffer
JP2002304636A (en) Method and device for image generation, recording medium with recorded image processing program, and image processing program
JPH11259678A (en) Image display apparatus and image display method using the same
JPH11259671A (en) Image display method and image display device executing the same
JP4154336B2 (en) Method and apparatus for drawing a frame of a raster image
JPH1166340A (en) Device and method for processing image and recording medium recording image processing program
JPH10320573A (en) Image processing apparatus and image processing method
JP3279260B2 (en) 3D graphics drawing device
US6712700B1 (en) Stereo model displaying method and apparatus in video game, game apparatus, and computer-readable recording medium stored with stereo model displaying program for video game
US7256796B1 (en) Per-fragment control for writing an output buffer
US12333745B2 (en) Potentially occluded rasterization
JP3209140B2 (en) Image processing device
CN112604293A (en) Data processing method and device, electronic equipment and readable medium
JP3652586B2 (en) Image drawing system
JP4617187B2 (en) Z sort processing circuit and three-dimensional image drawing apparatus using the same
JP3538826B2 (en) Arithmetic circuit and arithmetic method
JP2001052198A (en) Image generation apparatus, method and recording medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20011023

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020122

LAPS Cancellation because of no payment of annual fees