[go: up one dir, main page]

JPH11161819A - Image processing apparatus, image processing method, and recording medium recording image processing program - Google Patents

Image processing apparatus, image processing method, and recording medium recording image processing program

Info

Publication number
JPH11161819A
JPH11161819A JP32611897A JP32611897A JPH11161819A JP H11161819 A JPH11161819 A JP H11161819A JP 32611897 A JP32611897 A JP 32611897A JP 32611897 A JP32611897 A JP 32611897A JP H11161819 A JPH11161819 A JP H11161819A
Authority
JP
Japan
Prior art keywords
perspective
parameters
polygon
pixel
internal division
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.)
Withdrawn
Application number
JP32611897A
Other languages
Japanese (ja)
Inventor
Seisuke Morioka
誠介 森岡
Keisuke Yasui
啓祐 安井
Ryoichi Horimoto
良一 堀本
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.)
Sega Corp
Original Assignee
Sega Enterprises Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sega Enterprises Ltd filed Critical Sega Enterprises Ltd
Priority to JP32611897A priority Critical patent/JPH11161819A/en
Publication of JPH11161819A publication Critical patent/JPH11161819A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

(57)【要約】 【課題】パースペクティブ補間演算を効率的に行うこと
ができる画像処理を提供する。 【解決手段】本発明は、従来例の様に遠近値を利用した
透視変換により求められたポリゴンのパラメータをスク
リーン座標上の内分比で補間演算処理してピクセルのパ
ラメータを求めるのではなく、遠近値とスクリーン座標
上の内分比とからワールド座標上の内分比を一旦求めて
記録する。そして、ポリゴンのパラメータを上記ワール
ド座標上の内分比に基づいて補間演算処理して、ピクセ
ルのパラメータを求める。かかるパースペクティブ補間
演算は、ワールド座標上のピクセルのパラメータを直接
補間演算することができる。その結果、ワールド座標上
のポリゴンのパラメータを直接補間演算することができ
るので、パースペクティブ補間演算において従来の遠近
値で除算する工程がなくなる。また、ワールド座標上の
内分比は、あくまでもスクリーン画面内の精度に従う演
算精度しか求められないので、その演算処理は軽い処理
となる。
(57) [Summary] To provide an image processing capable of efficiently performing a perspective interpolation operation. The present invention does not calculate pixel parameters by interpolation processing of polygon parameters obtained by perspective transformation using a perspective value at an internal division ratio on screen coordinates as in the conventional example. An internal division ratio on the world coordinates is once obtained from the perspective value and the internal division ratio on the screen coordinates and recorded. Then, an interpolation calculation process is performed on the parameters of the polygon based on the internal division ratio on the world coordinate to obtain the parameters of the pixel. In such a perspective interpolation operation, a parameter of a pixel on a world coordinate can be directly interpolated. As a result, the parameters of the polygons on the world coordinates can be directly interpolated, so that the conventional step of dividing by the perspective value in the perspective interpolation operation is eliminated. Further, since the internal division ratio on the world coordinates can be calculated only in accordance with the accuracy in the screen screen, the arithmetic processing is light.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータによ
る画像処理装置に関し、特にポリゴンの描画用のパラメ
ータからピクセルのパラメータを補間演算する場合に、
遠近法空間内での遠近値を考慮した遠近法補間(以下パ
ースペクティブ補間)を効率的に行うことができる画像
処理装置、その方法及びその画像処理プログラムを記録
した記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus using a computer, and more particularly to an image processing apparatus for interpolating pixel parameters from polygon drawing parameters.
The present invention relates to an image processing apparatus capable of efficiently performing perspective interpolation (hereinafter, perspective interpolation) in consideration of a perspective value in a perspective space, a method thereof, and a recording medium storing the image processing program.

【0002】[0002]

【従来の技術】シミュレーション装置やゲーム装置等
で、コンピュータを利用した画像処理技術が利用され
る。通常、シミュレーションやゲームのプログラムによ
って生成されたワールド座標上のポリゴンデータから表
示画面上に描画すべきスクリーン座標上のポリゴンデー
タを求め、そのポリゴン内のピクセル毎の画像データを
求め、その画像データをフレームバッファメモリに格納
する。そして、フレームバッファメモリ内の画像データ
に従って、表示装置に画像が表示される。上記したスク
リーン座標上のポリゴンデータを求める処理は、通常、
ジオメトリ処理部で行われ、そのポリゴンデータからピ
クセル毎の画像データを求める処理は、レンリング処理
部で行われる。
2. Description of the Related Art An image processing technique using a computer is used in a simulation device, a game device, or the like. Normally, polygon data on screen coordinates to be drawn on the display screen is obtained from polygon data on world coordinates generated by a simulation or game program, image data for each pixel in the polygon is obtained, and the image data is obtained. Store in the frame buffer memory. Then, an image is displayed on the display device according to the image data in the frame buffer memory. The process of obtaining polygon data on the screen coordinates described above is usually performed by
The processing performed by the geometry processing unit to obtain image data for each pixel from the polygon data is performed by the renring processing unit.

【0003】ジオメトリ処理部では、三次元のワールド
座標上のポリゴンデータから二次元のスクリーン座標上
のポリゴンデータに変換する。この変換は、遠近感を出
すために透視変換が一般的である。即ち、透視変換によ
り、視点を中心として視点から所定の距離に位置する表
示画面上にワールド座標内のポリゴンを投影して、スク
リーン座標上のポリゴンデータを求める。
The geometry processing unit converts polygon data on three-dimensional world coordinates into polygon data on two-dimensional screen coordinates. This transformation is generally a perspective transformation to give a perspective. That is, a polygon in world coordinates is projected onto a display screen located at a predetermined distance from the viewpoint with the viewpoint as the center by perspective transformation, and polygon data on screen coordinates is obtained.

【0004】一方、ポリゴンを利用したコンピュータグ
ラフィックスでは、ポリゴンに質感を与える為のパラメ
ータがポリゴンの頂点毎に与えられる。パラメータに
は、例えば、テクスチャ座標、透明度、輝度、色、法線
ベクトル等である。従って、レンダリング処理におい
て、描画されるピクセルのパラメータは、頂点毎に与え
られたパラメータを補間演算により求められる。但し、
この補間演算は、遠近感が損なわれないようにするため
に、単純な補間演算ではなく、遠近値を考慮したパース
ペクティブ補間を行うことが必要である。
On the other hand, in computer graphics using polygons, parameters for giving a texture to a polygon are provided for each vertex of the polygon. The parameters include, for example, texture coordinates, transparency, luminance, color, normal vector, and the like. Therefore, in the rendering process, the parameters of the pixels to be drawn are obtained by performing an interpolation operation on the parameters given for each vertex. However,
In this interpolation calculation, it is necessary to perform not a simple interpolation calculation but a perspective interpolation in consideration of a perspective value in order not to impair the perspective.

【0005】図8は、透視変換の原理である遠近法投影
を説明する図である。図中、ワールド座標はX、Y、Z
で示され、スクリーン座標はsx、syで示される。図
8には、三次元のワールド座標内に置かれたX軸と垂直
な直線のポリゴン10が、二次元のスクリーン座標内に
透視変換され例が示される。この透視変換は、視点Vか
らZ軸方向に距離dの位置にスクリーン12が置かれ、
ワールド座標内のポリゴン10がスクリーン12に投影
される時の、スクリーン座標を求める演算である。
FIG. 8 is a view for explaining perspective projection, which is the principle of perspective transformation. In the figure, the world coordinates are X, Y, Z
, And the screen coordinates are indicated by sx and sy. FIG. 8 shows an example in which a linear polygon 10 placed in three-dimensional world coordinates and perpendicular to the X axis is perspective-transformed into two-dimensional screen coordinates. In this perspective transformation, the screen 12 is placed at a distance d from the viewpoint V in the Z-axis direction,
This is an operation for obtaining screen coordinates when the polygon 10 in world coordinates is projected on the screen 12.

【0006】直線のポリゴン10が図示される通り端点
A,Bとその中点Cを有するとすると、透視変換では、
視点Vからそれぞれの点A,B,Cまでを直線で結び、
その直線がスクリーン上を横切る位置が、スクリーン上
での投影された点As、Bs、Csとなる。例えば、点
Aのワールド座標が(xa,ya,za)とすると、三
角形VAA0 とVAs Sとが相似形であるので、スクリ
ーン上での点Asのy座標は、sya=ya×d/Za
となる。同様に、点Bに対するスクリーン座標は、sy
b=yb×d/Zb、点Cに対するスクリーン座標は、
syc=yc×d/Zcとなる。点Cはワールド座標内
では点A,Bの中点であるが、スクリーン12上におけ
る点Cの投影点Csは、図示される通り投影点Ca,C
bの中点より投影点Bs側にずれた位置となる。これが
遠近法投影による透視変換により生成される遠近感を生
むのである。即ち、Z値とスクリーンまでの距離dから
生成されるd/zが、遠近値(perspective value )と
なる。この遠近値を利用することで、遠近感のあるスク
リーン座標上の位置を求めることができる。
Assuming that a straight polygon 10 has end points A and B and a middle point C as shown in the figure, the perspective transformation
From the viewpoint V to each point A, B, C with a straight line,
The positions where the straight line crosses the screen are projected points As, Bs, and Cs on the screen. For example, if the world coordinates of the point A are (xa, ya, za), since the triangles VAA 0 and VA s S are similar, the y coordinate of the point As on the screen is sya = ya × d / Za
Becomes Similarly, the screen coordinates for point B are sy
b = yb × d / Zb, the screen coordinates for point C are
syc = yc × d / Zc. The point C is a middle point between the points A and B in the world coordinates, but the projected point Cs of the point C on the screen 12 is the projected point Ca, C as shown in the figure.
The position is shifted to the projection point Bs side from the middle point of b. This produces the perspective created by perspective transformation by perspective projection. That is, d / z generated from the Z value and the distance d to the screen is a perspective value. By using this perspective value, it is possible to obtain a position on screen coordinates with a sense of perspective.

【0007】尚、視点Vからスクリーンの位置までの距
離dを常に1として、遠近値を1/zとして演算し、最
後にスクリーンの大きさを視点Vからスクリーンまでの
距離に応じて縮小・拡大(d倍)することでも、同様に
遠近感のある演算を行うことができる。
The distance d from the viewpoint V to the position of the screen is always set to 1, and the perspective value is calculated as 1 / z. Finally, the size of the screen is reduced or enlarged according to the distance from the viewpoint V to the screen. (D times), it is also possible to perform an operation with a sense of perspective.

【0008】既に述べた通り、ポリゴンに質感を与える
パラメータは、頂点毎に与えられる。例えば、図8の例
で、頂点Aに赤の色データが与えられ、頂点Bに対して
緑の色データが与えられたとする。その場合、中点Cで
の色データは、両側の頂点A,Bでの色データの補間演
算により求められる。即ち、ワールド座標内の位置関係
で補間する場合は、中点Cでの色データは、赤が50
%、緑が50%となる。しかしながら、スクリーン座標
内の位置関係で補間すると、点Csは点Bsにより近い
位置にあるので、点Csでの色データは、赤が50%よ
り少なく緑が50%より多くなり、遠近感が損なわれて
しまう。レンダリング処理は、スクリーン上の表示点で
あるピクセルに対して行われるので、スクリーン座標内
の位置関係で補間演算することが求められる。
As described above, parameters for giving a texture to a polygon are given for each vertex. For example, in the example of FIG. 8, it is assumed that vertex A is provided with red color data and vertex B is provided with green color data. In this case, the color data at the midpoint C is obtained by interpolation of the color data at the vertices A and B on both sides. That is, when the interpolation is performed based on the positional relationship in the world coordinates, the color data at the midpoint C is 50
% And green are 50%. However, when the interpolation is performed based on the positional relationship in the screen coordinates, the point Cs is located closer to the point Bs, so that the color data at the point Cs has less than 50% of red and more than 50% of green, and impairs perspective. I will be. Since the rendering process is performed on a pixel that is a display point on the screen, it is necessary to perform an interpolation operation based on a positional relationship within screen coordinates.

【0009】かかる問題を解決する手段として、パース
ペクティブ補間法が、例えば特開平4−220783号
で提案されている。即ち、パースペクティブ補間法で
は、スクリーン座標上での直線補間を可能にするため
に、ポリゴンの各頂点のパラメータ(x,y,z,I)
をスクリーン座標上に変換し、その変換したパラメータ
によって直線補間の演算を行い、その後パラメータIに
対して再度逆変換する。スクリーン座標への変換は、上
記した遠近値d/zを乗ずることにより行われる。色デ
ータ用のパラメータIに対して遠近値d/zを乗ずるこ
とで、遠近感を加えることができるので、スクリーン座
標上での位置関係に従って直線補間演算を行うことがで
きる。また、逆変換は遠近値d/zで除すことにより行
われる。
As means for solving such a problem, a perspective interpolation method has been proposed, for example, in Japanese Patent Laid-Open No. Hei 4-220783. That is, in the perspective interpolation method, the parameters (x, y, z, I) of each vertex of the polygon are set in order to enable linear interpolation on screen coordinates.
Is converted to screen coordinates, a linear interpolation operation is performed using the converted parameters, and then the parameter I is inversely converted again. Conversion to screen coordinates is performed by multiplying the above-mentioned perspective value d / z. By multiplying the color data parameter I by the perspective value d / z, a perspective can be added, so that the linear interpolation operation can be performed according to the positional relationship on the screen coordinates. The inverse transformation is performed by dividing by the perspective value d / z.

【0010】図9は、上記の従来のパースペクティブ補
間を利用した画像処理のフローチャートであり、図10
は、そのパースペクティブ補間を説明する図である。図
10(1)に示される通り、三角形のポリゴン14をレ
ンダリングする場合の例で説明する。図10(1)はワ
ールド座標におけるポリゴンを示す。ポリゴン14は、
頂点A,B,Cを有し、頂点Aには、ワールド座標上の
座標値(x0 、y0 、z0 )と付随するパラメータI0
が与えられ、同様に、頂点Bには(x1 、y1、z1
と付随するパラメータI1 が、頂点Cには(x2
2 、z2 )と付随するパラメータI2 がそれぞれ与え
られる。これらのポリゴンのデータが生成される(S1
0)。
FIG. 9 is a flowchart of image processing using the above-mentioned conventional perspective interpolation.
FIG. 4 is a diagram for explaining the perspective interpolation. As shown in FIG. 10A, an example in which a triangular polygon 14 is rendered will be described. FIG. 10A shows a polygon in world coordinates. Polygon 14 is
It has vertices A, B, and C. The vertex A has a coordinate value (x 0 , y 0 , z 0 ) on the world coordinates and an associated parameter I 0
And similarly, at vertex B, (x 1 , y 1 , z 1 )
Parameter I 1 and the accompanying is, the vertex C (x 2,
y 2 , z 2 ) and the associated parameter I 2 are given, respectively. Data of these polygons is generated (S1
0).

【0011】かかるポリゴンのデータから、ジオメトリ
変換部で上記した透視変換が行われ、図10(2)に示
されるスクリーン座標上でのデータが求められる。即
ち、頂点Aに対しては、スクリーン座標上の座標値(s
0 (=x0 d/z0 )、sy 0 (=y0 d/
0 ))、遠近値(d/z)0 、及び付随するパラメー
タ(Id/z)0 がそれぞれ求められる。頂点B、Cに
対しても図10(2)に示される通り同様に求められる
(S11)。
From the polygon data, the geometry
The above-described perspective transformation is performed by the transformation unit, and the transformation is performed as shown in FIG.
The data on the screen coordinates to be calculated is obtained. Immediately
For the vertex A, the coordinate value on the screen coordinates (s
x0(= X0d / z0), Sy 0(= Y0d /
z0)), Perspective (d / z)0And accompanying parameters
(Id / z)0Are required respectively. Vertices B and C
Similarly, as shown in FIG.
(S11).

【0012】そして、図10(3)に示される通り、辺
AsBs上の左エッジ点Lsのスクリーン座標値(sx
l 、sy)、遠近値(d/z)l 、及び付随するパラメ
ータ(Id/z)l がそれぞれスクリーン上の位置関係
に従って直線補間演算により求められる。また、辺As
Cs上の右エッジ点Rsについても同様に求められる
(S12)。画像データを生成する為のパラメータI
は、遠近値d/zを乗じられているので、スクリーン上
の位置関係による内分比 t=(sy−sy0 )/(sy1 ーsy0 ) を利用する直線補間演算により求められる。
Then, as shown in FIG. 10 (3), the screen coordinate value (sx) of the left edge point Ls on the side AsBs
l , sy), the perspective value (d / z) l , and the associated parameter (Id / z) l are obtained by linear interpolation according to the positional relationship on the screen. Also, the side As
The same applies to the right edge point Rs on Cs (S12). Parameter I for generating image data
Since is multiplied by the perspective value d / z, it can be obtained by a linear interpolation operation using the internal division ratio t = (sy−sy 0 ) / (sy 1 −sy 0 ) based on the positional relationship on the screen.

【0013】次に、図10(4)に示される通り、両エ
ッジ点Ls、Rs間の水平走査線上のピクセルPXにお
けるスクリーン座標値(sx、sy)、遠近値(d/
z)p、及び付随するパラメータ(Id/z)p がそれ
ぞれスクリーン上の位置関係に従って直線補間演算によ
り求められる(S13)。この補間演算も、スクリーン
上の位置関係による内分比 t=(sx−sxl )/(sxr ーsxl ) を利用して求められる。
Next, as shown in FIG. 10D, the screen coordinate value (sx, sy) and the perspective value (d / d) at the pixel PX on the horizontal scanning line between the two edge points Ls, Rs.
z) p and the associated parameter (Id / z) p are respectively obtained by linear interpolation according to the positional relationship on the screen (S13). The interpolation operation is also determined by using the internal ratio according to a positional relationship on the screen t = (sx-sx l) / (sx r over sx l).

【0014】そして、最後に、ピクセルPXのパラメー
タ(Id/z)p は、遠近値(d/z)p により除され
ることで、適正なパラメータIp が求められる(S1
4)。上記のラスタスキャン法によりポリゴン内の全て
のピクセルのパラメータIp が演算で求められ、最後に
そのパラメータIp から画像データが演算され、フレー
ムバッファに書き込まれ(S15)、表示装置に画像デ
ータが供給されて表示される(S16)。
Finally, the parameter (Id / z) p of the pixel PX is divided by the perspective value (d / z) p to obtain an appropriate parameter Ip (S1).
4). The parameters I p of all the pixels in the polygon are calculated by the above raster scan method, and finally image data is calculated from the parameters I p and written into the frame buffer (S15), and the image data is stored in the display device. It is supplied and displayed (S16).

【0015】上記のパースペクティブ補間法によれば、
スクリーン座標上での位置関係で補間演算を行うことが
できるので、スクリーンのピクセル位置に応じて補間演
算を行うことができ、画像処理として好都合である。
According to the above-described perspective interpolation method,
Since the interpolation calculation can be performed based on the positional relationship on the screen coordinates, the interpolation calculation can be performed according to the pixel position on the screen, which is convenient for image processing.

【0016】[0016]

【発明が解決しようとする課題】しかしながら、上記の
パースペクティブ補間法では、図9のステップS14で
示された除算が全てのピクセルに対して毎回行われなけ
ればならない。一般に、コンピュータにとって除算は、
四則演算の中で最も工数がかかる重い処理である。従っ
て、全てのピクセルに対する補間演算において毎回この
除算が必要になる従来のパースペクティブ補間演算は、
画像処理時間を長くしてゲームやシミュレーション等で
要求されるリアルタイムでの処理を困難にする。更に、
パラメータの数が増えると、それに応じて上記の除算の
回数も増加して画像処理時間を長くする。また、従来の
パースペクティブ補間演算を利用すると、画像処理装置
を大規模化する。
However, in the above-described perspective interpolation method, the division shown in step S14 in FIG. 9 must be performed for every pixel every time. In general, division for computers is
This is a heavy processing requiring the most man-hours among the four arithmetic operations. Therefore, the conventional perspective interpolation operation in which this division is required every time in the interpolation operation for all the pixels,
The image processing time is lengthened to make it difficult to perform real-time processing required in games, simulations, and the like. Furthermore,
As the number of parameters increases, the number of times of the above-described division also increases, thereby increasing the image processing time. In addition, when the conventional perspective interpolation calculation is used, the size of the image processing apparatus is increased.

【0017】第2に、図9のステップS11,S12,
S13では、頂点のパラメータIにd/zを乗ずる演算
が存在する。頂点のパラメータIは有限であっても、z
値は三次元のワールド座標内で無限になりうる。従っ
て、パラメータいをz値で除する演算結果も無限の演算
精度が要求されて、その演算精度の見積もりが困難であ
り、ハードウエア設計の弊害となる。例えば、ワールド
座標が238の精度を有する場合、そのz値で除する演算
結果は、2-38 〜2+38 の精度が要求される。この高精
度の演算には、大規模なハードウエアが要求される。こ
の精度を低くすると、画面に表示される画像が乱れるこ
とが判明している。
Second, steps S11, S12, and S12 in FIG.
In S13, there is an operation of multiplying the parameter I of the vertex by d / z. Even if the parameter I of the vertex is finite, z
Values can be infinite in three-dimensional world coordinates. Therefore, the calculation result of dividing the parameter by the z value also requires infinite calculation accuracy, and it is difficult to estimate the calculation accuracy, which is a bad effect on hardware design. For example, world coordinates may have 2 38 accuracy of the calculation result of dividing the z value is 2 -38 to 2 +38 of accuracy is required. This high-precision operation requires large-scale hardware. It has been found that lowering this precision causes disturbance of the image displayed on the screen.

【0018】そこで、本発明は、パースペクティブ補間
演算を効率的に行うことができる画像処理装置、その画
像処理方法、及びその画像処理プログラムを記録した記
録媒体を提供することにある。
Accordingly, an object of the present invention is to provide an image processing apparatus, an image processing method thereof, and a recording medium on which the image processing program is recorded, capable of efficiently performing a perspective interpolation operation.

【0019】また、本発明は、パースペクティブ補間演
算を行うハードウエアの設計を容易にすることができる
画像処理装置、その画像処理方法、及びその画像処理プ
ログラムを記録した記録媒体を提供することにある。
Another object of the present invention is to provide an image processing apparatus, an image processing method thereof, and a recording medium on which the image processing program is recorded, which makes it possible to easily design hardware for performing a perspective interpolation operation. .

【0020】[0020]

【課題を解決するための手段】本発明は、従来例の様に
遠近値を利用した透視変換により求められたポリゴンの
パラメータをスクリーン座標上の内分比で補間演算処理
してピクセルのパラメータを求めるのではなく、遠近値
とスクリーン座標上の内分比とからワールド座標上の内
分比を一旦求める。そして、ポリゴンのパラメータを上
記ワールド座標上の内分比に基づいて補間演算処理し
て、ピクセルのパラメータを求める。かかるパースペク
ティブ補間演算は、ワールド座標上のピクセルのパラメ
ータを直接補間演算することができる。
According to the present invention, as in the prior art, a polygon parameter obtained by a perspective transformation using a perspective value is interpolated by an internal division ratio on screen coordinates to obtain a pixel parameter. Instead of obtaining the ratio, the internal ratio on the world coordinates is once determined from the perspective value and the internal ratio on the screen coordinates. Then, an interpolation calculation process is performed on the parameters of the polygon based on the internal division ratio on the world coordinate to obtain the parameters of the pixel. In such a perspective interpolation operation, a parameter of a pixel on a world coordinate can be directly interpolated.

【0021】その結果、ワールド座標上のポリゴンのパ
ラメータを直接補間演算することができるので、パース
ペクティブ補間演算において従来の遠近値で除算する工
程がなくなる。また、ワールド座標上の内分比は、あく
までもスクリーン画面内の精度に従う演算精度しか求め
られないので、その演算処理は軽い処理となる。
As a result, it is possible to directly interpolate the parameters of the polygons on the world coordinates, thereby eliminating the conventional step of dividing by the perspective value in the perspective interpolation operation. Further, since the internal division ratio on the world coordinates can be calculated only in accordance with the accuracy in the screen screen, the arithmetic processing is light.

【0022】上記の目的を達成するために、本発明は、
ワールド座標上のポリゴンデータをスクリーン座標上の
ポリゴンデータに透視変換し、前記ポリゴンのパラメー
タを補間演算処理して表示されるピクセルのパラメータ
を求め、前記パラメータから前記ピクセルの画像データ
を生成する画像処理装置において、前記ポリゴンを構成
する複数点のワールド座標上の座標データを、前記スク
リーン座標上の遠近感を示す遠近値に基づいて該スクリ
ーン座標上の座標データに変換する透視変換部と、前記
ポリゴン内のピクセルについて、前記複数点からのスク
リーン座標上の内分比と前記遠近値とからワールド座標
上の内分比を求め、前記複数点のパラメータを前記ワー
ルド座標上の内分比に基づいて補間演算処理して前記ピ
クセルのパラメータを求め、前記ピクセルのパラメータ
から当該ピクセルの画像データを生成するレンダリング
処理部とを有する。
In order to achieve the above object, the present invention provides:
Image processing for perspectively transforming polygon data on world coordinates into polygon data on screen coordinates, obtaining the parameters of pixels to be displayed by performing interpolation calculation processing on the parameters of the polygons, and generating image data of the pixels from the parameters A perspective transformation unit that converts coordinate data on world coordinates of a plurality of points constituting the polygon into coordinate data on screen coordinates based on a perspective value indicating perspective on the screen coordinates; For the pixels within, determine the internal division ratio on the world coordinates from the internal division ratio on the screen coordinates from the plurality of points and the perspective value, and determine the parameters of the plurality of points based on the internal division ratio on the world coordinates. The parameters of the pixel are obtained by performing an interpolation operation, and the pixel And a rendering unit for generating image data.

【0023】更に、上記の目的は、本発明の画像処理方
法及び画像処理プログラムを記録した記録媒体を提供す
ることにより達成される。
Further, the above object is achieved by providing a recording medium on which an image processing method and an image processing program of the present invention are recorded.

【0024】[0024]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面に従って説明する。しかしながら、本発明の技術
的範囲がその実施の形態に限定されるものではない。
Embodiments of the present invention will be described below with reference to the drawings. However, the technical scope of the present invention is not limited to the embodiment.

【0025】先ず最初に、実施の形態例におけるパース
ペクティブ補間演算の原理を説明する。図1は、実施の
形態例のパースペクティブ補間を説明する図である。本
実施の形態例では、頂点毎に与えられたパラメータを直
接パースペクティブ補間演算するのではなく、スクリー
ン座標内での内分比tとz値とからワールド座標内での
内分比t’を求め、その内分比t’を利用して頂点パラ
メータを直接、直線補間演算する。
First, the principle of the perspective interpolation calculation in the embodiment will be described. FIG. 1 is a diagram illustrating perspective interpolation according to the embodiment. In this embodiment, the internal division ratio t ′ in the world coordinates is obtained from the internal division ratio t and the z value in the screen coordinates, instead of directly performing the perspective interpolation calculation on the parameters given for each vertex. , And vertex parameters are directly subjected to linear interpolation using the internal division ratio t ′.

【0026】図1(1)には、ワールド座標内の三角形
のポリゴンABCが示される。各頂点には、ワールド座
標上の座標値(x、y、z)と画像データを生成する為
のパラメータIとが与えられる。ピクセルPX(sx,
sy)でのパラメータIpを求める為に、従来例と同様
にラスタスキャン法を利用する。但し、本実施の形態例
では、従来の如く頂点パラメータIに遠近値d/zを乗
算して、遠近感を考慮したスクリーン座標上での頂点パ
ラメータを求めることは行わない。
FIG. 1A shows a triangular polygon ABC in world coordinates. Each vertex is given a coordinate value (x, y, z) on world coordinates and a parameter I for generating image data. Pixel PX (sx,
In order to obtain the parameter Ip in sy), a raster scan method is used as in the conventional example. However, in the present embodiment, the vertex parameter I is not multiplied by the perspective value d / z to obtain the vertex parameter on the screen coordinates in consideration of the perspective as in the related art.

【0027】図1(2)に示される左エッジLsと右エ
ッジRsでの遠近感を考慮したパラメータIl とIr
は次の通り演算される。例えば、左エッジLsのパラメ
ータIl の例で示すと、スクリーン座標上での内分比t
は、 t=(sy−sy0 )/(sy1 −sy0 ) であり、パースペクティブ補間演算により左エッジLs
のパラメータIl は、
[0027] The parameters I l and I r Considering perspective of the left edge Ls and the right edge Rs shown in FIG. 1 (2) is calculated as follows. For example, as an example of the parameter I l of the left edge Ls, the internal division ratio t on the screen coordinates
Is t = (sy−sy 0 ) / (sy 1 −sy 0 ), and the left edge Ls is obtained by the perspective interpolation operation.
The parameter I l of

【0028】[0028]

【数1】 この式(1)を整理すると、次の通りになる。(Equation 1) This equation (1) is rearranged as follows.

【0029】[0029]

【数2】 従って、(Equation 2) Therefore,

【0030】[0030]

【数3】 と置くと、 Il =I1 ×t’+I0 ×(1.0−t’) (4) と、内分比t’を利用してパラメータI0 、I1 を直接
直線補間する演算式で表せる。
(Equation 3) I l = I 1 × t ′ + I 0 × (1.0−t ′) (4) and an equation for directly linearly interpolating the parameters I 0 and I 1 using the internal division ratio t ′. Can be represented by

【0031】即ち、図1(3)に示される通り、左エッ
ジLsでのパラメータIl は、内分比t’を利用するこ
とにより、ワールド座標上での頂点A,Bのパラメータ
0とI1 とを直接直線補間演算することができる。つ
まり、この内分比t’はワールド座標上での内分比と称
することができる。右側エッジRsでのパラメータI r
を求める為の内分比t’も同様にして求めることができ
る。尚、上記式(3)から明らかな通り、ワールド座標
上の内分比t’は、スクリーン座標上の内分比tとz値
とから求めることができる。
That is, as shown in FIG.
Parameter I in di LslUses the internal division ratio t '
And the parameters of vertices A and B on world coordinates
I0And I1Can be directly subjected to linear interpolation. One
In other words, this internal division ratio t 'is called the internal division ratio on world coordinates.
can do. Parameter I at right edge Rs r
Can be obtained in the same manner.
You. In addition, as is clear from the above equation (3), the world coordinates
The above internal division ratio t 'is the internal division ratio t on screen coordinates and the z value.
And can be obtained from:

【0032】かかるワールド座標上の内分比t’を最初
に演算してメモリに記憶させ、その後の複数のパラメー
タIについてのパースペクティブ補間演算は、記憶した
内分比t’を利用して、上記式(4)の如く頂点パラメ
ータIに対して直接補間演算を行う。その結果、従来例
での最後のd/zで除する演算が不要になる。更に、遠
近感を考慮した内分比t’の演算自体は、無限の範囲の
z値による除算を伴うものの、図1(3)に示される通
り、内分比t’にはスクリーン座標上での精度しか要求
されず、しかも、内分比t’の範囲は0〜1.0であ
る。従って、その演算のハードウエアの規模はそれほど
大きくはならない。
The internal division ratio t 'on the world coordinates is first calculated and stored in the memory, and the subsequent perspective interpolation operation for a plurality of parameters I is performed using the stored internal division ratio t'. An interpolation operation is directly performed on the vertex parameter I as in equation (4). As a result, the operation of dividing by the last d / z in the conventional example becomes unnecessary. Further, although the calculation of the internal division ratio t ′ itself in consideration of the perspective involves division by an infinite range of z values, as shown in FIG. , And the range of the internal division ratio t 'is 0 to 1.0. Therefore, the scale of the hardware for the operation is not so large.

【0033】両側のエッジLs、RsのパラメータIl
とIr とが求められると、図1(4)に示される通り、
ピクセルPXでのパラメータIp が同様に求められる。
即ち、スクリーン座標上での内分比 t=(sx−sxl )/(sxr −sxl ) から、上記式(3)と同様にしてワールド座標上の内分
比t’p を求める。その内分比t’p を利用して、両エ
ッジ点Ls、RsでのパラメータIl とIr を補間演算
して、ピクセルPXでのパラメータIp は、 Ip =Ir ×t’p +Il ×(1.0−t’p ) (5) と求められる。即ち、図1(5)に示される通りであ
る。
The parameters I l of the edges Ls and Rs on both sides
When the I r obtained as, as shown in FIG. 1 (4),
The parameter I p at the pixel PX is determined similarly.
That is, the interior division ratio on the screen coordinates t = (sx-sx l) / (sx r -sx l), determine the internal ratio t 'p on the world coordinate in the same manner as in the above formula (3). Its internal ratio t 'by using the p, both edges point Ls, and interpolation operation parameters I l and I r in Rs, the parameter I p at the pixel PX, I p = I r × t' p + I l × (1.0−t ′ p ) (5) That is, it is as shown in FIG.

【0034】この演算においても、上記と同様に従来例
での最後の遠近値d/zで除する演算が不要になり、ま
たワールド座標上の内分比t’p の演算に高精度は要求
されない。
In this operation, the operation of dividing by the last perspective value d / z in the conventional example becomes unnecessary as in the above case, and high accuracy is required for the operation of the internal division ratio t ′ p on the world coordinates. Not done.

【0035】図2は、本実施の形態例の画像処理装置の
ブロック図である。CPU20は、バスを介してRAM
21、ROM22及びインターフェース23に接続され
る。ROM22には、ゲームプログラムもしくはシミュ
レーションプログラムが格納され、CPU20は、イン
ターフェース23からの操作入力信号に応じて、プログ
ラムを演算し、画像データを生成する。
FIG. 2 is a block diagram of the image processing apparatus according to this embodiment. The CPU 20 is connected to a RAM via a bus.
21, the ROM 22, and the interface 23. The ROM 22 stores a game program or a simulation program, and the CPU 20 calculates the program according to an operation input signal from the interface 23 to generate image data.

【0036】かかる画像データは、例えばワールド座標
内でのポリゴンのデータと視点データなどである。かか
る画像データがジオメトリ変換部24に供給され、ジオ
メトリ変換部24は、各頂点の座標データに対して透視
変換を行い、スクリーン座標上での頂点の座標データ、
遠近値を求める。この透視変換の演算は、具体的には、
上記した遠近値d/zを乗ずる演算である。そして、ジ
オメトリ変換部24は、かかる透視変換したポリゴンデ
ータをポリゴンバッファ25に記憶する。
Such image data is, for example, polygon data and viewpoint data in world coordinates. The image data is supplied to the geometry conversion unit 24. The geometry conversion unit 24 performs perspective transformation on the coordinate data of each vertex, and calculates the coordinate data of the vertex on the screen coordinates,
Find the perspective value. The operation of this perspective transformation is, specifically,
This is an operation of multiplying the above-mentioned perspective value d / z. The geometry conversion unit 24 stores the perspective-transformed polygon data in the polygon buffer 25.

【0037】図3は、かかるポリゴンデータの例を示す
図である。図3には、ポリゴンID0とポリゴンID1
の例が示される。各ポリゴンは、頂点毎にスクリーン座
標(sx、sy)と遠近値d/zのデータを有する。こ
れらの位置データは、遠近値d/zにより遠近感を考慮
した透視変換されたデータである。更に、図3の例で
は、画像データの生成の為に利用されるパラメータIと
して、テクスチャ座標(Tx、Ty)、法線ベクトル
(Nx,Ny,Nz)、透明度α値、そして色データで
ある。それ以外には、例えば輝度値などを含んでも良
い。本実施の形態例では、パラメータIに対して遠近値
を乗じる透視変換処理は行われない。
FIG. 3 is a diagram showing an example of such polygon data. FIG. 3 shows polygon ID0 and polygon ID1.
Is shown. Each polygon has data of screen coordinates (sx, sy) and perspective value d / z for each vertex. These position data are perspective-transformed data in consideration of perspective with the perspective value d / z. Further, in the example of FIG. 3, the parameters I used for generating the image data are texture coordinates (Tx, Ty), normal vectors (Nx, Ny, Nz), transparency α value, and color data. . In addition, it may include, for example, a luminance value. In the present embodiment, the perspective transformation processing for multiplying the parameter I by the perspective value is not performed.

【0038】レンダリング処理部26は、ポリゴンバッ
ファ25に記憶されたポリゴンデータを利用して、ピク
セルの画像データを求めるレンダリング処理を行う。レ
ンダリング処理部26内は、エッジ補間器27と、ラス
タ補間器29と、Z比較器31、Zバッファ32、画像
データ生成部33、テクスチャマップ34を有する。
The rendering processing unit 26 performs rendering processing for obtaining pixel image data using the polygon data stored in the polygon buffer 25. The rendering processing unit 26 includes an edge interpolator 27, a raster interpolator 29, a Z comparator 31, a Z buffer 32, an image data generator 33, and a texture map 34.

【0039】エッジ補間器27は、図1(2)(3)で
示した通り、両側のエッジ点Ls、Rsでの遠近値(d
/z)l 、(d/z)r を求め、スクリーン座標上の内
分比tl 、tr とその遠近値(d/z)l 、(d/z)
r とからワールド座標上の内分比t’l とt’r とを求
める。かかる内分比t’l とt’r は演算パラメータと
して以後の画像処理に利用される。そして、その内分比
t’l 、t’r を利用して両側の頂点のパラメータIの
直線補間演算が行われ、両側エッジでのパラメータIl
とIr とが求められる。
As shown in FIGS. 1 (2) and (3), the edge interpolator 27 calculates the perspective value (d at the edge points Ls and Rs on both sides.
/ Z) l, (seek d / z) r, the internal ratio of the screen coordinates t l, t r and its perspective value (d / z) l, ( d / z)
The internal division ratios t ′ l and t ′ r on the world coordinates are obtained from r . The internal division ratios t ′ l and t ′ r are used as calculation parameters in the subsequent image processing. Then, using the internal division ratios t ′ l , t ′ r , a linear interpolation operation of the parameters I of the vertices on both sides is performed, and the parameters I l on both edges are obtained.
And the I r is required.

【0040】ラスタ補間器29では、図1(4)(5)
で示した通り、ピクセルPXでの遠近値(d/z)p
求め、スクリーン座標上の内分比tp とその遠近値(d
/z)p とからワールド座標上の内分比t’p を求め
る。この内分比t’p は演算パラメータとして以後の画
像処理に利用される。そして、その内分比t’p を利用
して両エッジ点のパラメータIl 、Ir の直線補間演算
が行われ、ピクセルPXでのパラメータIp が求められ
る。
In the raster interpolator 29, FIGS.
Perspective value of the street, the pixel PX shown in (d / z) calculated for p, on the screen coordinate internal ratio t p and its perspective value (d
/ Z) p and the internal division ratio t ′ p on the world coordinates is obtained. This internal division ratio t ′ p is used as a calculation parameter in the subsequent image processing. Then, using the internal division ratio t ′ p , linear interpolation calculation of the parameters I l and I r at both edge points is performed, and the parameter I p at the pixel PX is obtained.

【0041】Z比較器31およびZバッファ32は、重
なり合う複数のピクセル間の陰面処理を行う。即ち、Z
比較器31は、初期値無限大のZバッファのd/zと処
理中のピクセルの奥行きを示す遠近値d/zとを比較
し、処理中のピクセルのd/zが小さい場合は、その遠
近値d/zをZバッファ32に書き込む。そして、その
ピクセルのパラメータIp が画像データ生成部33に供
給される。
The Z comparator 31 and the Z buffer 32 perform hidden surface processing between a plurality of overlapping pixels. That is, Z
The comparator 31 compares the d / z of the Z-buffer with an infinite initial value with a perspective value d / z indicating the depth of the pixel being processed. Write the value d / z to the Z buffer 32. Then, the parameter Ip of the pixel is supplied to the image data generation unit 33.

【0042】画像データ生成部33では、例えば、パー
スペクティブ補間演算により求められたテクスチャ座標
(Tx、Ty)に従って、テクスチャマップ34に格納
されているテクスチャデータが読み出され、法線ベクト
ル(Nx,Ny,Nz)により光源に対するシェーディ
ング処理が行われ、透明値α値や色データによりブレン
ディング処理が行われる。そして、表示すべき画像デー
タが生成され、フレームバッファ35の対応するピクセ
ル位置に記録される。かかるフレームバッファ35に記
録された画像データに従って、画像がディスプレイ36
に表示される。
The image data generator 33 reads out the texture data stored in the texture map 34 in accordance with, for example, the texture coordinates (Tx, Ty) obtained by the perspective interpolation operation, and reads the normal vectors (Nx, Ny). , Nz), the shading process for the light source is performed, and the blending process is performed using the transparent value α value and the color data. Then, image data to be displayed is generated and recorded at a corresponding pixel position in the frame buffer 35. The image is displayed on the display 36 according to the image data recorded in the frame buffer 35.
Will be displayed.

【0043】図4は、パースペクティブ補間を利用した
画像処理のフローチャート図である。このフローチャー
トの工程は、図2の画像処理装置により処理される。図
4に従って、詳細な画像処理工程を説明する。
FIG. 4 is a flow chart of image processing using perspective interpolation. The steps in this flowchart are processed by the image processing apparatus in FIG. A detailed image processing step will be described with reference to FIG.

【0044】先ず、CPU20がワールド座標上での画
像データを生成する(S10)。かかる画像データは、
操作入力に従ってゲームプログラムを実行することによ
り生成される。かかる画像データは、ポリゴンの頂点の
座標データやパラメータデータを有し、ジオメトリ変換
部24に供給される。ジオメトリ変換部は、各頂点の座
標データを透視変換して、スクリーン座標上での頂点座
標データsz,sy,d/z(または1/z)を求める
(S20)。本実施の形態例では、従来例の様に、頂点
パラメータIに対してまで透視変換する必要はない。
First, the CPU 20 generates image data on world coordinates (S10). Such image data is
It is generated by executing a game program according to an operation input. Such image data includes coordinate data and parameter data of the vertices of the polygon, and is supplied to the geometry conversion unit 24. The geometry conversion unit perspectively converts the coordinate data of each vertex to obtain vertex coordinate data sz, sy, d / z (or 1 / z) on the screen coordinates (S20). In this embodiment, there is no need to perform perspective transformation up to the vertex parameter I as in the conventional example.

【0045】ジオメトリ変換部24により透視変換され
た頂点のスクリーン座標(sx、sy)と遠近値d/z
(または1/z)及びパラメータIとがポリゴンバッフ
ァ25に記録される。かかるポリゴンバッファ25に記
録されたデータを参照して、レンダリング処理部26
は、ピクセル毎の画像データを求める描画処理を行う。
The screen coordinates (sx, sy) of the vertices perspectively transformed by the geometry transformation unit 24 and the perspective value d / z
(Or 1 / z) and the parameter I are recorded in the polygon buffer 25. Referring to the data recorded in the polygon buffer 25, the rendering processing unit 26
Performs a rendering process for obtaining image data for each pixel.

【0046】図4のステップS21〜S23は、エッジ
補間器27により実施される。まず、補間演算により図
1(2)に示した通り両側のエッジ点Ls、Rsでの遠
近値(d/z)l と(d/z)r とが求められる(S2
1)。この補間演算は、左側のエッジ点Lsでは、その
内分比t=(sy−sy0 )/(sy1 −sy0 )を利
用して、 (d/z)l =(d/z)1 ×t+(d/z)2 ×(1
−t) として求められる。かかるパースペクティブ補間演算
は、従来例と同じである。
Steps S 21 to S 23 in FIG. 4 are performed by the edge interpolator 27. First, as shown in FIG. 1 (2), the perspective values (d / z) l and (d / z) r at the edge points Ls and Rs on both sides are obtained by interpolation (S2).
1). This interpolation operation uses the internal division ratio t = (sy−sy 0 ) / (sy 1 −sy 0 ) at the left edge point Ls, and (d / z) l = (d / z) 1 × t + (d / z) 2 × (1
−t). Such a perspective interpolation operation is the same as the conventional example.

【0047】そして、両側のエッジ点Ls、Rsでの遠
近値(d/z)l と(d/z)r を利用して、図1
(3)に示される様に、上記式(3)に従って両側のワ
ールド座標上の内分比t’l とt’r とを求める(S2
2)。更に、頂点パラメータIから内分比t’l とt’
r を利用して、両エッジ点Ls、RsでのパラメータI
lとIr とが求められる(S23)。かかる演算は、頂
点パラメータIをワールド座標上の内分比t’を利用し
た直接補間演算式(4)、 Il =I1 ×t’+I0 ×(1.0−t’) により行われる。
Using the perspective values (d / z) l and (d / z) r at the edge points Ls and Rs on both sides, FIG.
As shown in (3), the internal division ratios t ′ l and t ′ r on the world coordinates on both sides are obtained according to the above equation (3) (S2
2). Further, from the vertex parameter I, the internal division ratios t ′ l and t ′
Using r , the parameter I at both edge points Ls, Rs
and l and I r is obtained (S23). Such calculation is performed by the vertex parameters I a 'direct interpolation arithmetic expression using (4), I l = I 1 × t' internal ratio t on the world coordinate + I 0 × (1.0-t ') .

【0048】図4のステップS24〜S26は、ラスタ
補間器29により実施される。まず、補間演算により図
1(4)に示した通りピクセルPXでの遠近値(d/
z)pが求められる(S24)。この補間演算は、ピク
セルPXでの内分比t=(sx−sxl )/(sxr
sxl )を利用して、 (d/z)p =(d/z)r ×t+(d/z)l ×(1
−t) として求められる。かかるパースペクティブ補間演算
は、従来例と同じである。
Steps S24 to S26 in FIG. 4 are performed by the raster interpolator 29. First, as shown in FIG. 1 (4), the perspective value (d /
z) p is determined (S24). The interpolation operation, the internal division ratio t = (sx-sx l) in pixels PX / (sx r -
sx l) using, (d / z) p = (d / z) r × t + (d / z) l × (1
−t). Such a perspective interpolation operation is the same as the conventional example.

【0049】そして、ピクセルPXでの遠近値(d/
z)p を利用して、図1(5)に示される様に、上記式
(3)に従ってピクセルの内分比t’p を求める(S2
5)。更に、両エッジ点のパラメータIl とIr から内
分比t’p を利用して、ピクセルPXでのパラメータI
p が求められる(S26)。かかる演算は、両エッジ点
のパラメータIl とIr とをそのまま内分比t’p を利
用した直接補間演算式(5)、 Ip =Ir ×t’p +Il ×(1.0−t’p ) により行われる。
Then, the perspective value (d /
z) By using p , as shown in FIG. 1 (5), an internal division ratio t ′ p of the pixel is obtained according to the above equation (3) (S2).
5). Furthermore, by utilizing the internal ratio t 'p from the parameter I l and I r both edge points, the parameter I in pixels PX
p is obtained (S26). This operation is performed by directly interpolating the parameters I l and I r of both edge points using the internal division ratio t ′ p (5), I p = I r × t ′ p + I l × (1.0 −t ′ p ).

【0050】図4に示される通り、ステップS24〜S
26は、両エッジ点間のxサイズ分だけ繰り返される。
また、ステップS21〜S26は、ポリゴンの最小sy
から最大syまでのyサイズ分繰り返される。上記のラ
スタスキャン法による各エッジ点でのスクリーン座標
は、例えば差分累積法(DDAのDigital Differential
Analyzer)により求められる。即ち、辺の傾きΔxを利
用して、頂点Aのスクリーン座標(sx0 、sy0 )に
対して、 sx=sx0 +Δx sy=sy0 +1 の演算を繰り返すことにより求められる。かかる加算を
繰り返すことにより、ハードウエアが不得手とする乗算
を避けることができる。
As shown in FIG. 4, steps S24-S
Step 26 is repeated by x size between both edge points.
Steps S21 to S26 are the minimum sy of the polygon.
Is repeated for y sizes from to sy. The screen coordinates at each edge point by the above-described raster scan method are, for example, the difference accumulation method (Digital Differential of DDA).
Analyzer). That is, it is obtained by repeating the calculation of sx = sx 0 + Δx sy = sy 0 +1 on the screen coordinates (sx 0 , sy 0 ) of the vertex A using the side gradient Δx. By repeating such addition, it is possible to avoid multiplication that the hardware is not good at.

【0051】最後に、画像データ生成部33は、求めた
ピクセルのパラメータIp から画像データを演算で求
め、フレームバッファ35に書き込む。
Finally, the image data generating unit 33 calculates image data from the obtained parameter Ip of the pixel and writes the calculated image data into the frame buffer 35.

【0052】尚、図2の画像処理装置においてZ比較器
31を設けている。このZ比較器31は、陰面消去処理
の為にZバッファ32内の遠近値(d/z)と処理中の
ピクセルの遠近値との比較を行い、画面内のより手前に
位置する場合にそのピクセルのパラメータIを画像デー
タ生成部33に供給する。従って、図4のステップS1
5は、Z比較器31により画面内の手前に位置すると判
定されたピクセルに対してのみ、その画像データの生成
の演算を行う。
The image processing apparatus shown in FIG. 2 is provided with a Z comparator 31. The Z comparator 31 compares the perspective value (d / z) in the Z buffer 32 with the perspective value of the pixel being processed for hidden surface removal processing. The pixel parameter I is supplied to the image data generation unit 33. Therefore, step S1 in FIG.
5 performs an operation of generating the image data only for the pixel determined to be located on the near side in the screen by the Z comparator 31.

【0053】[第2の実施の形態例]上記してきた実施
の形態例では、ポリゴン内の全てのピクセルに対してワ
ールド座標上の内分比t’l 、t’r 、t’p を求める
と共に、それぞれのパラメータIl 、Ir 、Ip を求め
た。そして、最後にZ比較器により遠近値(d/z) p
に従って陰面消去処理を行った。従って、先に処理され
たピクセルの画像データがフレームバッファに書き込ま
れた後に、その後処理されたピクセルの遠近値(d/
z)が大きい(手前に位置する)場合には、そのピクセ
ルの画像データが求められて、フレームバッファ内に上
書きされる。従って、Z比較器により描画不要と判断さ
れるピクセルの内分比t’やパラメータの演算、及び後
に上書きされる画像データの生成の演算が無駄になる。
[Second Embodiment] The embodiment described above
In the configuration example, all pixels in the polygon are
Internal division ratio t 'on the field coordinatesl, T 'r, T 'pAsk for
With each parameter Il, Ir, IpAsk for
Was. Finally, a perspective value (d / z) is obtained by a Z comparator. p
Was performed according to the following. Therefore, it is processed first
Pixel data is written to the frame buffer
After that, the perspective value (d /
z) is large (located in front), the pixel
Image data is stored in the frame buffer.
Written. Therefore, it is determined that drawing is unnecessary by the Z comparator.
Calculation of the internal division ratio t 'and parameters of the pixel to be
The calculation for generating the image data to be overwritten is useless.

【0054】第2の実施の形態例では、かかる演算の無
駄をなくす為に、1つのフレーム内の全てのポリゴンに
対して、各ピクセルのワールド座標上の内分比t’l
t’ r 、t’p だけを先に求め、それらのピクセルの遠
近値(d/z)p をもとにZ比較器により陰面消去処理
を行う。そして、最後に上記の内分比を利用して表示さ
れるピクセルのパラメータを頂点パラメータから補間演
算する。
In the second embodiment, no such calculation is performed.
To eliminate waste, all polygons in one frame
On the other hand, the internal division ratio t ′ on the world coordinate of each pixell,
t ' r, T 'pJust ask first, those pixels far away
Near value (d / z)pHidden surface removal processing by Z comparator based on
I do. Finally, it is displayed using the internal division ratio described above.
Pixel parameters from the vertex parameters
Calculate.

【0055】図5は、第2の実施の形態例の画像処理装
置のブロック図である。図2のブロック図と同じ部分に
は同じ引用番号が与えられる。図5に示される通り、第
2の実施の形態例の画像処理装置では、レンダリング処
理部26内のエッジ補間器27は、両側のエッジ点L
s、Rsでの遠近値(d/z)l と(d/z)r 及びそ
れぞれの内分比t’l 、t’r が求められる。また、ラ
スタ補間器29では、両側のエッジ点での遠近値から、
ピクセルの遠近値(d/z)p と水平方向の内分比t’
p とが求められる。エッジ補間器27とラスタ補間器2
9では、内分比を利用したパラメータIの補間演算は行
われない。従って、それらの演算工程は簡略化される。
FIG. 5 is a block diagram of an image processing apparatus according to the second embodiment. The same parts as those in the block diagram of FIG. 2 are given the same reference numerals. As shown in FIG. 5, in the image processing apparatus according to the second embodiment, the edge interpolator 27 in the rendering processing unit 26 outputs the edge points L on both sides.
Perspective values (d / z) l and (d / z) r at s and Rs and their internal division ratios t ′ l and t ′ r are obtained. Further, in the raster interpolator 29, from the perspective values at the edge points on both sides,
Perspective value (d / z) p of pixel and internal division ratio t 'in horizontal direction
p is required. Edge interpolator 27 and raster interpolator 2
In No. 9, the interpolation calculation of the parameter I using the internal division ratio is not performed. Therefore, those calculation steps are simplified.

【0056】第2の実施の形態例では、Z比較器31
は、処理中のピクセルの遠近値(d/z)p とZバッフ
ァ内に記憶されている対応するピクセルの遠近値(d/
z)とが比較される。処理中のピクセルの遠近値(d/
z)p がZバッファ内の遠近値よりも大きい場合は、そ
の処理中のピクセルが画面内でより手前に位置すること
を意味し、その遠近値(d/z)p がZバッファ32に
上書きされる。それと同時に、そのピクセルの領域に上
書きされた処理中のピクセルの内分比t’l 、t’r
t’p とポリゴンIDとが同様に上書きされる。
In the second embodiment, the Z comparator 31
The distance values being processed pixel (d / z) p and perspective value of the corresponding pixel stored in the Z buffer (d /
z) is compared. The perspective value of the pixel being processed (d /
z) If p is greater than the perspective value in the Z buffer, it means that the pixel being processed is located closer to the screen, and the perspective value (d / z) p overwrites the Z buffer 32. Is done. At the same time, the internal division ratios t ′ l , t ′ r ,
t ′ p and the polygon ID are similarly overwritten.

【0057】上記のエッジ補間器27、ラスタ補間器2
9、Z比較器31及びZバッファ32への書き込みが1
フレーム内の全てのポリゴンに対して終了すると、Zバ
ッファ32内には、表示画面内の最も手前に位置するポ
リゴンのピクセルの遠近値と内分比及びポリゴンIDが
記憶されることになる。
The above-described edge interpolator 27 and raster interpolator 2
9, writing to the Z comparator 31 and the Z buffer 32 is 1
When the processing is completed for all the polygons in the frame, the perspective value, the internal division ratio, and the polygon ID of the pixel of the polygon located at the forefront in the display screen are stored in the Z buffer 32.

【0058】そこで、補間器40は、Zバッファ32内
のピクセル毎の遠近値(d/z)p、内分比t’l
t’r 、t’p とポリゴンIDとをピクセル毎に読み出
し、ポリゴンバッファ25に記録されているポリゴンの
頂点のパラメータから、ピクセルのパラメータIp を、
上記の内分比t’l 、t’r 、t’p を利用する直線補
間により演算する。即ち、ワールド座標上でのパラメー
タを利用して予め求めて記憶しておいたワールド座標上
の内分比による直線補間演算が行われる。
Therefore, the interpolator 40 calculates the perspective value (d / z) p , the internal division ratio t ′ l ,
t ′ r , t ′ p and the polygon ID are read out for each pixel, and the parameter I p of the pixel is obtained from the parameters of the vertices of the polygon recorded in the polygon buffer 25.
The calculation is performed by linear interpolation using the above internal division ratios t ′ l , t ′ r , and t ′ p . That is, a linear interpolation operation is performed using the internal division ratio on the world coordinate, which is obtained and stored in advance using the parameters on the world coordinate.

【0059】そして、その補間器40により求められた
各ピクセルのパラメータIp が、画像データ生成部33
に与えられ、画像データ生成部33は、パラメータの一
つであるテクスチャ座標に従ってテクスチャマップ34
からテクスチャデータを読み出し、パラメータの一つで
ある法線ベクトルを利用してシェーディング処理を行
い、透明度α値を利用してブレンディング処理を行う。
上記の処理に色データが利用されることは言うまでもな
い。画像データ生成部33で生成された画像データは、
フレームバッファ35に書き込まれ、ディスプレイ36
に表示される。
Then, the parameter I p of each pixel obtained by the interpolator 40 is used as the image data generation unit 33.
The image data generating unit 33 generates a texture map 34 according to a texture coordinate which is one of the parameters.
, The shading process is performed using the normal vector which is one of the parameters, and the blending process is performed using the transparency α value.
It goes without saying that color data is used for the above processing. The image data generated by the image data generation unit 33 is
The data is written to the frame buffer 35 and the display 36
Will be displayed.

【0060】上記の通り、本実施の形態例では、遠近値
を利用して先ず陰面消去処理を行った後に、ピクセル毎
のパラメータの補間演算と画像データ生成の演算を行う
ので、陰面側のピクセルのパラメータ値と画像データが
無駄に生成されることはなく、効率的なレンダリング処
理を可能にする。
As described above, in this embodiment, the hidden surface erasing process is first performed using the perspective value, and then the interpolation calculation of the parameters for each pixel and the calculation of the image data are performed. The parameter value and the image data are not wasted, and efficient rendering processing is enabled.

【0061】図6は、上記第2の実施の形態例の画像処
理フローチャート図である。図4のフローチャートと同
じ処理ステップには同じステップ番号を与えた。図6に
示される通り、ステップS10、S20は図4と同じで
ある。即ち、先ず、CPU20がワールド座標上での画
像データを生成する(S10)。かかる画像データは、
ポリゴンの頂点の位置データやパラメータデータを有
し、ジオメトリ変換部24に供給される。ジオメトリ変
換部は、各頂点パラメータを透視変換して、スクリーン
座標上での頂点座標データsz,sy,d/zを求める
(S20)。頂点パラメータIに対しては透視変換され
ない。そして、ジオメトリ変換部24により透視変換さ
れた頂点のスクリーン座標(sx、sy)と遠近値d/
z及びパラメータIとがポリゴンバッファ25に記録さ
れる。かかるポリゴンバッファ25に記録されたデータ
を参照して、レンダリング処理部26がピクセル毎の画
像データを求める描画処理を行う。
FIG. 6 is a flowchart of the image processing according to the second embodiment. The same processing steps as those in the flowchart of FIG. 4 have the same step numbers. As shown in FIG. 6, steps S10 and S20 are the same as those in FIG. That is, first, the CPU 20 generates image data on world coordinates (S10). Such image data is
It has position data and parameter data of the vertices of the polygon, and is supplied to the geometry conversion unit 24. The geometry conversion unit performs perspective conversion of each vertex parameter to obtain vertex coordinate data sz, sy, d / z on screen coordinates (S20). The vertex parameter I is not perspective transformed. Then, the screen coordinates (sx, sy) of the vertices subjected to perspective transformation by the geometry transformation unit 24 and the perspective value d /
z and the parameter I are recorded in the polygon buffer 25. With reference to the data recorded in the polygon buffer 25, the rendering processing unit 26 performs a drawing process for obtaining image data for each pixel.

【0062】レンダリング処理部26では、まずエッジ
補間器27にて、両側エッジ点Ls、Rsでの遠近値
(d/z)l と(d/z)r とが求められ(S21)、
更に、上記式(3)で示した両エッジ点での内分比t’
l とt’r とが求められる(S22)。この時点では、
両エッジ点でのパラメータの補間演算は行われない。
In the rendering processing section 26, first, the edge interpolator 27 obtains the perspective values (d / z) l and (d / z) r at the two side edge points Ls and Rs (S21),
Further, the internal division ratio t 'at both edge points shown in the above equation (3)
l and t ′ r are obtained (S22). At this point,
No interpolation calculation of parameters at both edge points is performed.

【0063】更に、ラスタ補間器29にて、両側エッジ
点間の水平線上のピクセルPXでの遠近値(d/z)p
を求め(S24)、更にピクセルPXでの内分比t’p
を求める(S25)。この時点でも、ピクセルのパラメ
ータの補間演算は行われない。
Further, in the raster interpolator 29, the perspective value (d / z) p at the pixel PX on the horizontal line between the two edge points is obtained.
(S24), and further, the internal division ratio t ′ p at the pixel PX.
Is obtained (S25). At this point, no interpolation calculation of the pixel parameters is performed.

【0064】そして、Z比較器31は、処理中のピクセ
ルの遠近値(d/z)p とZバッファ32に記録済の遠
近値との比較を行う(S30)。処理中のピクセルの遠
近値が大きい(画面上より手前に位置する)場合に、そ
のピクセルの遠近値(d/z)p とエッジ補間器とラス
タ補間器で求めた内分比t’l 、t’r 、t’p 及びそ
のポリゴンIDを、Zバッファ32に書き込む(S3
1)。
Then, the Z comparator 31 compares the perspective value (d / z) p of the pixel being processed with the perspective value recorded in the Z buffer 32 (S30). When the perspective value of the pixel being processed is large (located on the front side of the screen), the perspective value (d / z) p of the pixel, the internal division ratio t ′ l obtained by the edge interpolator and the raster interpolator, t ′ r , t ′ p and their polygon IDs are written into the Z buffer 32 (S3
1).

【0065】上記のステップS24、25、30、31
が両エッジ間のxサイズ分だけ繰り返される。また、ス
テップS21、22及びステップS24、25、30、
31が、最小sy値の頂点から最大sy値の頂点までの
yサイズ分だけ繰り返される。また、それらの処理が、
1つのフレーム内の全てのポリゴンに対して繰り返され
る。
The above steps S24, S25, S30, S31
Is repeated by x size between both edges. Steps S21, S22 and S24, S25, S30,
31 is repeated for the y size from the vertex having the minimum sy value to the vertex having the maximum sy value. Also, their processing
This is repeated for all polygons in one frame.

【0066】1フレーム内の全てのポリゴンに対して上
記の処理が終了すると、補間器40は、ステップS32
〜34に示される通り、Zバッファ32からt'l,t'r,
t'p及びポリゴンIDを読み出し(S32)、ポリゴン
バッファ25からポリゴンIDに対応する頂点のパラメ
ータ、 Tx,Ty, α,Nx,Ny,Nz 等を読み出し(S33)、
頂点のパラメータ、Tx,Ty,α,Nx,Ny,Nz 等を内分比 t'
l,t'r,t'pで補間演算する(S34)。
When the above processing is completed for all polygons in one frame, the interpolator 40 proceeds to step S32
34, t'l, t'r,
t'p and the polygon ID are read (S32), and the parameters of the vertices corresponding to the polygon ID, Tx, Ty, α, Nx, Ny, Nz, etc. are read from the polygon buffer 25 (S33),
Vertex parameters, Tx, Ty, α, Nx, Ny, Nz, etc.
An interpolation operation is performed using l, t'r, and t'p (S34).

【0067】そして、画像データ生成部33は、補間演
算で求められたパラメータ、Tx,Ty,α,Nx,Ny,Nz 等から
ピクセルPXの色を求める(S35)。具体的には、テ
クスチャデータの読み出し、シェーディング処理、ブレ
ンディング処理等である。そして、ピクセルPXの色デ
ータを有する画像データをフレームバッファメモリ35
に書き込む(S36)。上記のステップS32〜S36
がピクセル分だけ繰り返される。そして、最後にフレー
ムバッファメモリ35内の画像データが表示装置36に
供給されて表示される。
Then, the image data generation unit 33 obtains the color of the pixel PX from the parameters Tx, Ty, α, Nx, Ny, Nz, etc. obtained by the interpolation calculation (S35). More specifically, the processing includes reading of texture data, shading processing, blending processing, and the like. The image data having the color data of the pixel PX is stored in the frame buffer memory 35.
(S36). Steps S32 to S36 above
Is repeated for pixels. Finally, the image data in the frame buffer memory 35 is supplied to the display device 36 and displayed.

【0068】上記した通り、第2の実施の形態例では、
複数のポリゴンの陰面消去処理が終了してから、それぞ
れのピクセルのパラメータを予め求めたワールド座標上
の内分比t’l 、t’r 、t’p に従って、頂点のパラ
メータを直接直線補間演算して、ピクセルのパラメータ
を求め、そのパラメータをもとにして色データを有する
画像データの演算処理を行う。従って、無駄になる演算
がなくなり、レンダリング処理の効率が向上する。
As described above, in the second embodiment,
After the hidden surface removal processing of a plurality of polygons is completed, the parameters of the vertices are directly linearly interpolated according to the internal division ratios t ′ l , t ′ r , and t ′ p on the world coordinates in which the parameters of each pixel are obtained in advance. Then, the parameters of the pixel are obtained, and the arithmetic processing of the image data having the color data is performed based on the parameters. Therefore, there is no useless calculation, and the efficiency of the rendering process is improved.

【0069】[汎用コンピュータによる画像処理]図7
は、本実施の形態例の画像処理を汎用コンピュータを利
用してソフトウエアにより行う場合の構成例を示す図で
ある。汎用コンピュータを利用して画像処理を行う場合
は、画像処理の演算は記録媒体内に格納されたプログラ
ムに従って行われる。従って、画像処理プログラムをコ
ンピュータが読み取り可能な記録媒体に格納すること
で、汎用コンピュータは画像処理専用コンピュータとし
て動作する。画像処理プログラムは、上記したフローチ
ャート等で説明した各手順をコンピュータに実行させ
る。
[Image Processing by General-Purpose Computer] FIG.
FIG. 3 is a diagram showing a configuration example in a case where image processing of the present embodiment is performed by software using a general-purpose computer. When image processing is performed using a general-purpose computer, image processing calculations are performed according to a program stored in a recording medium. Therefore, the general-purpose computer operates as a computer dedicated to image processing by storing the image processing program in a computer-readable recording medium. The image processing program causes a computer to execute the procedures described in the flowcharts and the like.

【0070】図7の例では、CPU70、RAM78内
に設けられた演算用のRAM71、ゲームプログラムや
画像処理プログラムが格納されたメモリ72が、バス7
6に接続される。また、バス76に接続された入出力部
73は、操作者が操作する操作部74に接続され、操作
信号を入力する。また、画像処理の為に、ポリゴンデー
タを記憶するポリゴンバッファ25、Zバッファ32が
RAM78内に設けられ、それぞれバス76に接続され
る。また、フレームバッファメモリ35は、バス76に
接続され、外部の表示装置36にも接続される。
In the example of FIG. 7, a CPU 70, a RAM 71 for calculation provided in a RAM 78, and a memory 72 storing a game program and an image processing program
6 is connected. The input / output unit 73 connected to the bus 76 is connected to an operation unit 74 operated by an operator, and inputs an operation signal. For image processing, a polygon buffer 25 for storing polygon data and a Z buffer 32 are provided in the RAM 78, and are connected to the bus 76, respectively. Further, the frame buffer memory 35 is connected to the bus 76 and also to the external display device 36.

【0071】この例では、画像処理プログラムがメモリ
72内に格納されているが、それ以外に、外部のCDR
OMや磁気テープなどの記録媒体75からRAM71内
に画像処理プログラムをインストールすることもでき
る。或いは、通信媒体により画像処理プログラムが供給
されても良い。
In this example, the image processing program is stored in the memory 72.
An image processing program can be installed in the RAM 71 from a recording medium 75 such as an OM or a magnetic tape. Alternatively, the image processing program may be supplied by a communication medium.

【0072】上記の実施の形態例では、遠近値d/zを
利用して透視変換を行った。しかしながら、本発明は、
視点からスクリーンまでの距離を一定の1にして、遠近
値として1/zを利用して透視変換を行うこともでき
る。その場合は、画角は一意に決定されてしまう。従っ
て、パースペクティブ補間を行った後に、スクリーン座
標(sz、sy)に対して一律に表示倍率に応じてd値
を乗じることで、上記の実施の形態例と同じ結果を得る
ことができる。尚、ワールド座標上の内分比t’は、式
(3)に示される通り、スクリーン座標上の内分比tと
1/zとから求めることもできる。
In the above embodiment, the perspective transformation is performed using the perspective value d / z. However, the present invention
Perspective transformation can also be performed by setting the distance from the viewpoint to the screen to be a constant 1 and using 1 / z as the perspective value. In that case, the angle of view is uniquely determined. Therefore, the same result as in the above embodiment can be obtained by uniformly multiplying the screen coordinates (sz, sy) by the d value according to the display magnification after performing the perspective interpolation. Note that the internal division ratio t ′ on the world coordinates can also be obtained from the internal division ratio t and 1 / z on the screen coordinates as shown in Expression (3).

【0073】[0073]

【発明の効果】以上説明した通り、本発明によれば、遠
近感を出す為に透視変換を行う場合に、その遠近感を維
持してポリゴンの頂点パラメータを補間する場合に、上
記の式(3)に従ってワールド座標上の内分比t’を求
めて利用することで、頂点パラメータを直接直線補間演
算することができる。その結果、従来例の様に各ピクセ
ルのパラメータのパースペクティブ補間演算における最
後の遠近値による除算を避けることができる。更に、内
分比t’は、スクリーン座標上の精度しか要求されない
ので、その演算回路のハードウエア規模を小さくするこ
とができる。また、ソフトウエアにより処理される場合
は、その処理時間を短くすることができる。
As described above, according to the present invention, when perspective transformation is performed to obtain a perspective, and when the vertex parameters of a polygon are interpolated while maintaining the perspective, the above equation ( By obtaining and using the internal division ratio t ′ on the world coordinates according to 3), it is possible to directly perform a linear interpolation operation on the vertex parameters. As a result, it is possible to avoid the division of the parameters of each pixel by the last perspective value in the perspective interpolation calculation as in the conventional example. Furthermore, since the internal division ratio t 'requires only the accuracy on the screen coordinates, the hardware scale of the arithmetic circuit can be reduced. If the processing is performed by software, the processing time can be shortened.

【0074】更に、本発明によれば、各ピクセルの内分
比を先に求め、複数のポリゴンの陰面消去処理を遠近値
d/zまたは1/zに基づいて行い、最後に内分比に従
って表示されるピクセルのパラメータの補間演算と画像
データの演算を行うことで、無駄なレンダリング処理の
演算を省くことができる。
Further, according to the present invention, the internal division ratio of each pixel is obtained first, the hidden surface elimination processing of a plurality of polygons is performed based on the perspective value d / z or 1 / z, and finally, according to the internal division ratio. By performing the interpolation calculation of the parameter of the pixel to be displayed and the calculation of the image data, it is possible to omit useless calculation of the rendering process.

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

【図1】実施の形態例のパースペクティブ補間を説明す
る図である。
FIG. 1 is a diagram illustrating perspective interpolation according to an embodiment;

【図2】本実施の形態例の画像処理装置のブロック図で
ある。
FIG. 2 is a block diagram of the image processing apparatus according to the embodiment.

【図3】ポリゴンデータの例を示す図である。FIG. 3 is a diagram showing an example of polygon data.

【図4】パースペクティブ補間を利用した画像処理のフ
ローチャート図である。
FIG. 4 is a flowchart of image processing using perspective interpolation.

【図5】第2の実施の形態例の画像処理装置のブロック
図である。
FIG. 5 is a block diagram of an image processing apparatus according to a second embodiment.

【図6】第2の実施の形態例の画像処理フローチャート
図である。
FIG. 6 is a flowchart of image processing according to the second embodiment.

【図7】本実施の形態例の画像処理を汎用コンピュータ
を利用してソフトウエアにより行う場合の構成例を示す
図である。
FIG. 7 is a diagram illustrating a configuration example in a case where image processing of the present embodiment is performed by software using a general-purpose computer.

【図8】遠近法投影を説明する図である。FIG. 8 is a diagram illustrating perspective projection.

【図9】従来のパースペクティブ補間を利用した画像処
理のフローチャートである。
FIG. 9 is a flowchart of image processing using conventional perspective interpolation.

【図10】パースペクティブ補間を説明する図である。FIG. 10 is a diagram illustrating perspective interpolation.

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

24 ジオメトリ変換部(透視変換部) 26 レンダリング処理部 27 エッジ補間器 29 ラスタ補間器 31 Z比較器 32 Zバッファ 35 フレームバッファ 36 ディスプレイ 24 geometry conversion unit (perspective conversion unit) 26 rendering processing unit 27 edge interpolator 29 raster interpolator 31 Z comparator 32 Z buffer 35 frame buffer 36 display

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】ワールド座標上のポリゴンデータをスクリ
ーン座標上のポリゴンデータに透視変換し、前記ポリゴ
ンのパラメータを補間演算処理して表示されるピクセル
のパラメータを求め、前記パラメータから前記ピクセル
の画像データを生成する画像処理装置において、 前記ポリゴンを構成する複数点のワールド座標上の座標
データを、前記スクリーン座標上の遠近感を示す遠近値
に基づいて該スクリーン座標上の座標データに変換する
透視変換部と、 前記ポリゴン内のピクセルについて、前記複数点からの
スクリーン座標上の内分比と前記遠近値とからワールド
座標上の内分比を求めて、前記複数点のパラメータを前
記ワールド座標上の内分比に基づいて補間演算処理して
前記ピクセルのパラメータを求め、前記ピクセルのパラ
メータから当該ピクセルの画像データを生成するレンダ
リング処理部とを有する画像処理装置。
1. Polygon data on world coordinates is perspective-transformed into polygon data on screen coordinates, and parameters of the polygon are interpolated to obtain parameters of a pixel to be displayed. From the parameters, image data of the pixel is obtained. A perspective transformation for converting coordinate data on a world coordinate of a plurality of points constituting the polygon into coordinate data on a screen coordinate based on a perspective value indicating a perspective on the screen coordinate. Part, for the pixels in the polygon, determine the internal division ratio on the world coordinates from the internal division ratio on the screen coordinates from the multiple points and the perspective value, and set the parameters of the multiple points on the world coordinates. Interpolation processing is performed based on the internal division ratio to determine the parameters of the pixel, and the parameters of the pixel The image processing apparatus and a rendering processor for generating image data of Luo the pixel.
【請求項2】請求項1において、 前記遠近値はd/zまたは1/z(zはワールド座標上
のz値)であり、前記スクリーン座標上の内分比をtと
すると、前記ワールド座標上の内分比t’は、 t’=(d/z1 )・t/{(d/z1 )・t+(d/
0 )・(1−t)} または t’=(1/z1 )・t/{(1/z1 )・t+(1/
0 )・(1−t)} (但し、z0 及びz1 はピクセルの両側のz値)である
ことを特徴とする画像処理装置。
2. The world coordinate system according to claim 1, wherein the perspective value is d / z or 1 / z (z is a z value on world coordinates) and the internal division ratio on the screen coordinates is t. The above internal division ratio t ′ is given by t ′ = (d / z 1 ) · t / {(d / z 1 ) · t + (d /
z 0) · (1-t )} or t '= (1 / z 1 ) · t / {(1 / z 1) · t + (1 /
z 0 ) · (1−t)} (where z 0 and z 1 are z values on both sides of the pixel).
【請求項3】請求項1または2において、 前記複数点は前記ポリゴンの頂点であり、 前記レンダリング処理部は、該頂点間の辺上のエッジ点
について前記ワールド座標上の内分比を求め、該内分比
に基づいて前記頂点のパラメータを補間演算処理して該
エッジ点のパラメータを求め、更に、前記エッジ点間の
前記ピクセルについて前記ワールド座標上の内分比を求
め、該内分比に基づいて前記エッジ点のパラメータを補
間演算処理して該ピクセルのパラメータを求めることを
特徴とする画像処理装置。
3. The polygon processing device according to claim 1, wherein the plurality of points are vertices of the polygon, and the rendering processing unit obtains an internal division ratio on the world coordinate for an edge point on a side between the vertices. The parameters of the vertices are interpolated to obtain the parameters of the edge points based on the internal division ratios. Further, the internal division ratios on the world coordinates of the pixels between the edge points are obtained. An image processing apparatus for performing an interpolation calculation process on the parameters of the edge point based on the parameter to obtain a parameter of the pixel.
【請求項4】請求項1または2において、 前記ワールド座標上の内分比は、表示画面内の精度に従
う精度で求められることを特徴とする画像処理装置。
4. The image processing apparatus according to claim 1, wherein the internal division ratio on the world coordinate is obtained with an accuracy according to an accuracy in a display screen.
【請求項5】請求項1または2において、 前記レンダリング処理部は、複数のポリゴンに対して前
記ピクセルの遠近値に従う陰面消去処理を行い、該陰面
消去処理後に前記内分比に基づく補間演算処理によりピ
クセルのパラメータを求め、該ピクセルのパラメータか
ら当該ピクセルの画像データを生成することを特徴とす
る画像処理装置。
5. The rendering processing unit according to claim 1, wherein the rendering processing unit performs a hidden surface removal process on a plurality of polygons according to a perspective value of the pixel, and performs an interpolation operation process based on the internal division ratio after the hidden surface removal process. An image processing apparatus, wherein a parameter of a pixel is obtained by the following formula, and image data of the pixel is generated from the parameter of the pixel.
【請求項6】ワールド座標上のポリゴンデータをスクリ
ーン座標上のポリゴンデータに透視変換し、前記ポリゴ
ンのパラメータを補間演算処理して表示されるピクセル
のパラメータを求め、前記パラメータから前記ピクセル
の画像データを生成する画像処理方法において、 前記ポリゴンを構成する複数点のワールド座標上の座標
データを、前記スクリーン座標上の遠近感を示す遠近値
に基づいて該スクリーン座標上の座標データに変換する
透視変換工程と、 前記ポリゴン内のピクセルについて、前記複数点からの
スクリーン座標上の内分比と前記遠近値とからワールド
座標上の内分比を求めて、前記複数点のパラメータを前
記ワールド座標上の内分比に基づいて補間演算処理して
前記ピクセルのパラメータを求め、前記ピクセルのパラ
メータから当該ピクセルの画像データを生成するレンダ
リング処理工程とを有する画像処理方法。
6. A perspective transformation of polygon data on world coordinates to polygon data on screen coordinates, interpolation calculation processing of the polygon parameters to obtain parameters of pixels to be displayed, and image data of the pixels from the parameters. A perspective transformation for converting coordinate data on world coordinates of a plurality of points constituting the polygon into coordinate data on screen coordinates based on a perspective value indicating perspective on the screen coordinates. Determining the internal division ratio on the world coordinates from the internal division ratio on the screen coordinates from the plurality of points and the perspective value for the pixels in the polygon, and changing the parameters of the plural points on the world coordinates. Interpolation processing is performed based on the internal division ratio to obtain the parameters of the pixel, and the parameters of the pixel are calculated. Image processing method and a rendering step of generating image data of the pixels from.
【請求項7】請求項6において、 前記遠近値はd/zまたは1/z(zはワールド座標上
のz値)であり、前記スクリーン座標上の内分比をtと
すると、前記ワールド座標上の内分比t’は、 t’=(d/z1 )・t/{(d/z1 )・t+(d/
0 )・(1−t)} または t’=(1/z1 )・t/{(1/z1 )・t+(1/
0 )・(1−t)} (但し、z0 及びz1 はピクセルの両側のz値)である
ことを特徴とする画像処理方法。
7. The world coordinate according to claim 6, wherein the perspective value is d / z or 1 / z (z is a z value on world coordinates) and the internal division ratio on the screen coordinates is t. The above internal division ratio t ′ is given by t ′ = (d / z 1 ) · t / {(d / z 1 ) · t + (d /
z 0) · (1-t )} or t '= (1 / z 1 ) · t / {(1 / z 1) · t + (1 /
z 0 ) · (1−t)} (where z 0 and z 1 are z values on both sides of the pixel).
【請求項8】ワールド座標上のポリゴンデータをスクリ
ーン座標上のポリゴンデータに透視変換し、前記ポリゴ
ンのパラメータを補間演算処理して表示されるピクセル
のパラメータを求め、前記パラメータから前記ピクセル
の画像データを生成する画像処理プログラムを記録した
記録媒体において、 前記ポリゴンを構成する複数点のワールド座標上の座標
データを、前記スクリーン座標上の遠近感を示す遠近値
に基づいて該スクリーン座標上の座標データに変換する
透視変換手順と、 前記ポリゴン内のピクセルについて、前記複数点からの
スクリーン座標上の内分比と前記遠近値とからワールド
座標上の内分比を求めて、前記複数点のパラメータを前
記ワールド座標上の内分比に基づいて補間演算処理して
前記ピクセルのパラメータを求め、前記ピクセルのパラ
メータから当該ピクセルの画像データを生成するレンダ
リング処理手順とをコンピュータに処理させる画像処理
プログラムを記録した前記コンピュータ読み取り可能な
記録媒体。
8. Perspective transformation of polygon data on world coordinates to polygon data on screen coordinates, interpolation processing of the polygon parameters to obtain parameters of pixels to be displayed, and image data of the pixels from the parameters. In a recording medium on which an image processing program for generating the polygon is generated, coordinate data on world coordinates of a plurality of points constituting the polygon is converted into coordinate data on screen coordinates based on a perspective value indicating perspective on the screen coordinates. And a perspective transformation procedure for transforming, into the pixels in the polygon, an internal division ratio on world coordinates from the internal division ratio on the screen coordinates from the plural points and the perspective value, and the parameters of the plural points are obtained. Interpolation processing is performed based on the internal division ratio on the world coordinates to obtain the parameters of the pixel. The computer readable recording medium recording an image processing program for processing and rendering processing procedure for generating image data of the pixels from parameters of the pixels on the computer.
【請求項9】請求項8において、 前記遠近値はd/zまたは1/z(zはワールド座標上
のz値)であり、前記スクリーン座標上の内分比をtと
すると、前記ワールド座標上の内分比t’は、 t’=(d/z1 )・t/{(d/z1 )・t+(d/
0 )・(1−t)} または t’=(1/z1 )・t/{(1/z1 )・t+(1/
0 )・(1−t)} (但し、z0 及びz1 はピクセルの両側のz値)である
ことを特徴とする画像処理プログラムを記録した前記コ
ンピュータ読み取り可能な記録媒体。
9. The system according to claim 8, wherein the perspective value is d / z or 1 / z (z is a z value on world coordinates), and the internal division ratio on the screen coordinates is t. The above internal division ratio t ′ is given by t ′ = (d / z 1 ) · t / {(d / z 1 ) · t + (d /
z 0) · (1-t )} or t '= (1 / z 1 ) · t / {(1 / z 1) · t + (1 /
z 0 ) · (1-t)} (where z 0 and z 1 are z values on both sides of the pixel). The computer-readable recording medium recording an image processing program.
JP32611897A 1997-11-27 1997-11-27 Image processing apparatus, image processing method, and recording medium recording image processing program Withdrawn JPH11161819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32611897A JPH11161819A (en) 1997-11-27 1997-11-27 Image processing apparatus, image processing method, and recording medium recording image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32611897A JPH11161819A (en) 1997-11-27 1997-11-27 Image processing apparatus, image processing method, and recording medium recording image processing program

Publications (1)

Publication Number Publication Date
JPH11161819A true JPH11161819A (en) 1999-06-18

Family

ID=18184287

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32611897A Withdrawn JPH11161819A (en) 1997-11-27 1997-11-27 Image processing apparatus, image processing method, and recording medium recording image processing program

Country Status (1)

Country Link
JP (1) JPH11161819A (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6411301B1 (en) 1999-10-28 2002-06-25 Nintendo Co., Ltd. Graphics system interface
US6421058B2 (en) 1999-10-28 2002-07-16 Nintendo Co., Ltd. Graphics command stream for calling a display object in a graphics system
US6580430B1 (en) 2000-08-23 2003-06-17 Nintendo Co., Ltd. Method and apparatus for providing improved fog effects in a graphics system
US6606689B1 (en) 2000-08-23 2003-08-12 Nintendo Co., Ltd. Method and apparatus for pre-caching data in audio memory
US6639595B1 (en) 2000-08-23 2003-10-28 Nintendo Co., Ltd. Achromatic lighting in a graphics system and method
US6664958B1 (en) 2000-08-23 2003-12-16 Nintendo Co., Ltd. Z-texturing
US6664962B1 (en) 2000-08-23 2003-12-16 Nintendo Co., Ltd. Shadow mapping in a low cost graphics system
US6697074B2 (en) 2000-11-28 2004-02-24 Nintendo Co., Ltd. Graphics system interface
JP2004272928A (en) * 1998-08-20 2004-09-30 Apple Computer Inc Advanced deferred shading graphics pipeline processor
US6825851B1 (en) 2000-08-23 2004-11-30 Nintendo Co., Ltd. Method and apparatus for environment-mapped bump-mapping in a graphics system
US6867781B1 (en) 2000-08-23 2005-03-15 Nintendo Co., Ltd. Graphics pipeline token synchronization
US6937245B1 (en) 2000-08-23 2005-08-30 Nintendo Co., Ltd. Graphics system with embedded frame buffer having reconfigurable pixel formats
US6980218B1 (en) 2000-08-23 2005-12-27 Nintendo Co., Ltd. Method and apparatus for efficient generation of texture coordinate displacements for implementing emboss-style bump mapping in a graphics rendering system
US6999100B1 (en) 2000-08-23 2006-02-14 Nintendo Co., Ltd. Method and apparatus for anti-aliasing in a graphics system
US7003588B1 (en) 2001-08-22 2006-02-21 Nintendo Co., Ltd. Peripheral devices for a video game system
US7002591B1 (en) 2000-08-23 2006-02-21 Nintendo Co., Ltd. Method and apparatus for interleaved processing of direct and indirect texture coordinates in a graphics system
US7034828B1 (en) 2000-08-23 2006-04-25 Nintendo Co., Ltd. Recirculating shade tree blender for a graphics system
US7119813B1 (en) 2000-06-02 2006-10-10 Nintendo Co., Ltd. Variable bit field encoding
US7134960B1 (en) 2000-08-23 2006-11-14 Nintendo Co., Ltd. External interfaces for a 3D graphics system
US7184059B1 (en) 2000-08-23 2007-02-27 Nintendo Co., Ltd. Graphics system with copy out conversions between embedded frame buffer and main memory
US7196710B1 (en) 2000-08-23 2007-03-27 Nintendo Co., Ltd. Method and apparatus for buffering graphics data in a graphics system
JP2007317204A (en) * 2006-05-26 2007-12-06 Samsung Electronics Co Ltd Three-dimensional graphic processing method and apparatus for performing perspective correction
US7538772B1 (en) 2000-08-23 2009-05-26 Nintendo Co., Ltd. Graphics processing system with enhanced memory controller

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004272928A (en) * 1998-08-20 2004-09-30 Apple Computer Inc Advanced deferred shading graphics pipeline processor
US6421058B2 (en) 1999-10-28 2002-07-16 Nintendo Co., Ltd. Graphics command stream for calling a display object in a graphics system
US6424348B2 (en) 1999-10-28 2002-07-23 Nintendo Co., Ltd. Application program interface for a graphics system
US6452600B1 (en) 1999-10-28 2002-09-17 Nintendo Co., Ltd. Graphics system interface
US6456290B2 (en) 1999-10-28 2002-09-24 Nintendo Co., Ltd. Application program interface for a graphics system
US6466218B2 (en) 1999-10-28 2002-10-15 Nintendo Co., Ltd. Graphics system interface
US6489963B2 (en) 1999-10-28 2002-12-03 Nintendo Co., Ltd. Application program interface for a graphics system
US6411301B1 (en) 1999-10-28 2002-06-25 Nintendo Co., Ltd. Graphics system interface
US7129956B2 (en) 2000-06-02 2006-10-31 Nintendo Co., Ltd. Variable bit field color encoding
US7119813B1 (en) 2000-06-02 2006-10-10 Nintendo Co., Ltd. Variable bit field encoding
US6606689B1 (en) 2000-08-23 2003-08-12 Nintendo Co., Ltd. Method and apparatus for pre-caching data in audio memory
US6639595B1 (en) 2000-08-23 2003-10-28 Nintendo Co., Ltd. Achromatic lighting in a graphics system and method
US7538772B1 (en) 2000-08-23 2009-05-26 Nintendo Co., Ltd. Graphics processing system with enhanced memory controller
US6664958B1 (en) 2000-08-23 2003-12-16 Nintendo Co., Ltd. Z-texturing
US6825851B1 (en) 2000-08-23 2004-11-30 Nintendo Co., Ltd. Method and apparatus for environment-mapped bump-mapping in a graphics system
US6867781B1 (en) 2000-08-23 2005-03-15 Nintendo Co., Ltd. Graphics pipeline token synchronization
US6937245B1 (en) 2000-08-23 2005-08-30 Nintendo Co., Ltd. Graphics system with embedded frame buffer having reconfigurable pixel formats
US6980218B1 (en) 2000-08-23 2005-12-27 Nintendo Co., Ltd. Method and apparatus for efficient generation of texture coordinate displacements for implementing emboss-style bump mapping in a graphics rendering system
US6999100B1 (en) 2000-08-23 2006-02-14 Nintendo Co., Ltd. Method and apparatus for anti-aliasing in a graphics system
US7307640B2 (en) 2000-08-23 2007-12-11 Nintendo Co., Ltd. Method and apparatus for efficient generation of texture coordinate displacements for implementing emboss-style bump mapping in a graphics rendering system
US7002591B1 (en) 2000-08-23 2006-02-21 Nintendo Co., Ltd. Method and apparatus for interleaved processing of direct and indirect texture coordinates in a graphics system
US7034828B1 (en) 2000-08-23 2006-04-25 Nintendo Co., Ltd. Recirculating shade tree blender for a graphics system
US7307638B2 (en) 2000-08-23 2007-12-11 Nintendo Co., Ltd. Method and apparatus for interleaved processing of direct and indirect texture coordinates in a graphics system
US6664962B1 (en) 2000-08-23 2003-12-16 Nintendo Co., Ltd. Shadow mapping in a low cost graphics system
US6580430B1 (en) 2000-08-23 2003-06-17 Nintendo Co., Ltd. Method and apparatus for providing improved fog effects in a graphics system
US7134960B1 (en) 2000-08-23 2006-11-14 Nintendo Co., Ltd. External interfaces for a 3D graphics system
US7176919B2 (en) 2000-08-23 2007-02-13 Nintendo Co., Ltd. Recirculating shade tree blender for a graphics system
US7184059B1 (en) 2000-08-23 2007-02-27 Nintendo Co., Ltd. Graphics system with copy out conversions between embedded frame buffer and main memory
US7196710B1 (en) 2000-08-23 2007-03-27 Nintendo Co., Ltd. Method and apparatus for buffering graphics data in a graphics system
US7205999B2 (en) 2000-08-23 2007-04-17 Nintendo Co., Ltd. Method and apparatus for environment-mapped bump-mapping in a graphics system
US7071945B2 (en) 2000-11-28 2006-07-04 Nintendo Co., Ltd. Graphics system interface
US7522170B2 (en) 2000-11-28 2009-04-21 Nintendo Co., Ltd. Graphics system interface
US6697074B2 (en) 2000-11-28 2004-02-24 Nintendo Co., Ltd. Graphics system interface
US7003588B1 (en) 2001-08-22 2006-02-21 Nintendo Co., Ltd. Peripheral devices for a video game system
JP2007317204A (en) * 2006-05-26 2007-12-06 Samsung Electronics Co Ltd Three-dimensional graphic processing method and apparatus for performing perspective correction

Similar Documents

Publication Publication Date Title
JPH11161819A (en) Image processing apparatus, image processing method, and recording medium recording image processing program
US4974177A (en) Mapping circuit of a CRT display device
JP3203160B2 (en) Volume rendering apparatus and method
US4975976A (en) Image transformation method and device
US6563501B2 (en) Bicubic surface rendering
JP2612260B2 (en) Texture mapping equipment
JPH0771936A (en) Image processing apparatus and method thereof
JPH1166340A (en) Device and method for processing image and recording medium recording image processing program
JPWO2019049457A1 (en) Image generating apparatus and image generating method
CN116306494A (en) A text rendering method, device, equipment, storage medium and product
JP3089792B2 (en) Hidden surface discrimination method for image data
JP5111900B2 (en) Rendering method and apparatus using point interpolation
JP2006244426A (en) Texture processing device, picture drawing processing device, and texture processing method
US7015930B2 (en) Method and apparatus for interpolating pixel parameters based on a plurality of vertex values
JPH10334269A (en) Image processing apparatus, image processing method, and recording medium recording image processing program
JP4060375B2 (en) Spotlight characteristic forming method and image processing apparatus using the same
JP4642431B2 (en) Map display device, map display system, map display method and program
US7280108B2 (en) Bicubic surface rendering
JPH11242753A (en) Three-dimensional drawing method and apparatus
JP2747822B2 (en) Graphic display device
US20100141649A1 (en) Drawing device
JP2000348196A (en) Three-dimensional image generation device and environment map generation method
JP3312560B2 (en) Texture mapping device
KR100283071B1 (en) Fast Texture Mapping Method
JPH09231408A (en) Video synthesizer

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050201