Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH06301792A - Texture mapping device - Google Patents
[go: Go Back, main page]

JPH06301792A - Texture mapping device - Google Patents

Texture mapping device

Info

Publication number
JPH06301792A
JPH06301792A JP8848793A JP8848793A JPH06301792A JP H06301792 A JPH06301792 A JP H06301792A JP 8848793 A JP8848793 A JP 8848793A JP 8848793 A JP8848793 A JP 8848793A JP H06301792 A JPH06301792 A JP H06301792A
Authority
JP
Japan
Prior art keywords
polygon
texture mapping
image
texture
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP8848793A
Other languages
Japanese (ja)
Other versions
JP3327986B2 (en
Inventor
Masaaki Oka
正昭 岡
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP8848793A priority Critical patent/JP3327986B2/en
Publication of JPH06301792A publication Critical patent/JPH06301792A/en
Application granted granted Critical
Publication of JP3327986B2 publication Critical patent/JP3327986B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

(57)【要約】 【構成】 画像表示すべき物体を構成するポリゴンに対
してテクスチャ画像を貼り付ける際に、グラフィックプ
ロセッサ16内のスクリーン座標計算機能部21で求め
られたポリゴンの各頂点のスクリーン座標に基づいてポ
リゴン分割数決定機能部22にて分割数を決定し、ポリ
ゴン分割機能部23で該ポリゴンを分割して、これらの
分割された小ポリゴン毎にテクスチャマッピング機能部
24でテクスチャマッピングを行う。 【効果】 計算量を増加させることなくポリゴンの対角
線上での画質劣化を有効に防止することができる。
(57) [Summary] [Structure] When a texture image is pasted on polygons forming an object to be displayed as an image, the screen of each vertex of the polygon obtained by the screen coordinate calculation function unit 21 in the graphic processor 16 is displayed. The polygon division number determination function unit 22 determines the number of divisions based on the coordinates, the polygon division function unit 23 divides the polygons, and the texture mapping function unit 24 performs texture mapping for each of these divided small polygons. To do. [Effect] It is possible to effectively prevent the image quality deterioration on the diagonal line of the polygon without increasing the calculation amount.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータを用いた
映像機器であるグラフィックコンピュータ、特殊効果装
置、ビデオゲーム機等においてテクスチャマッピングの
手法を使って画像を作成するようなテクスチャマッピン
グ装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a texture mapping device for creating an image using a texture mapping technique in a graphic computer, a special effect device, a video game machine or the like which is a video device using a computer. is there.

【0002】[0002]

【従来の技術】例えば、家庭用TVゲーム機やパーソナ
ルコンピュータ装置、あるいはグラフィックコンピュー
タ装置等において、テレビジョン受像機やモニタ受像機
あるいはCRTディスプレイ装置等に出力されて表示さ
れる画像のデータ(表示出力画像データ)を生成あるい
は作成する際に、いわゆるテクスチャ(生地、地模様)
の画像を表示される多面体等の所望の面(画像表示すべ
き物体を構成する単位となる多角形領域、いわゆるポリ
ゴン)に貼り付けるようなテクスチャマッピングの手法
が採られることがある。
2. Description of the Related Art For example, in a home TV game machine, a personal computer device, a graphic computer device, or the like, image data (display output) output and displayed on a television receiver, a monitor receiver, a CRT display device, or the like. So-called textures (fabric, ground pattern) when generating or creating image data)
A texture mapping method may be adopted in which the image is attached to a desired surface such as a polyhedron to be displayed (a polygonal area that is a unit forming an object to be displayed as an image, a so-called polygon).

【0003】ここで図6は、従来のテクスチャマッピン
グ機能を有する画像作成装置の構成の一例を示すブロッ
ク図である。この図6において、マイクロプロセッサ等
から成るCPU101がバスライン109に接続され、
このバスライン109には、プログラムやデータ等を格
納するメインメモリ102、上記テクスチャのソースと
なる画像(テクスチャソース画像)のデータを格納する
ビデオメモリ103、及び生成あるいは作成された上記
表示出力画像のデータが格納されるビデオメモリ104
が少なくとも接続されている。CPU101は、ビデオ
メモリ103からテクスチャソース画像のデータを読み
出して、必要に応じて変形を加え、ビデオメモリ104
に書き込む。ビデオメモリ104の表示領域内に書き込
まれた上記表示出力画像のデータは、D/A変換器10
5でアナログ信号に変換されて映像出力として取り出さ
れる。
FIG. 6 is a block diagram showing an example of the configuration of a conventional image creating apparatus having a texture mapping function. In FIG. 6, a CPU 101 including a microprocessor is connected to a bus line 109,
The bus line 109 includes a main memory 102 for storing programs and data, a video memory 103 for storing data of an image (texture source image) which is a source of the texture, and a display output image generated or created. Video memory 104 in which data is stored
Is at least connected. The CPU 101 reads the data of the texture source image from the video memory 103, modifies it as necessary, and adds it to the video memory 104.
Write in. The data of the display output image written in the display area of the video memory 104 is the D / A converter 10.
At 5, it is converted into an analog signal and taken out as a video output.

【0004】この図6に示すような構成の画像作成装置
等を用いてテクスチャマッピング処理を行う際には、任
意の1つのいわゆるポリゴン(画像表示すべき物体を構
成する単位となる多角形領域)に所定のテクスチャ画像
を貼り付けようとするとき、例えば次のような方法が採
用されている。この方法について、図7のフローチャー
トを参照しながら説明する。
When a texture mapping process is performed using the image forming apparatus having the structure shown in FIG. 6, any one so-called polygon (a polygonal area which is a unit forming an object to be displayed as an image) is used. When a predetermined texture image is to be attached to, the following method is used, for example. This method will be described with reference to the flowchart of FIG.

【0005】この図7において、ポリゴンの各頂点、例
えば三角形の3つの頂点の3次元座標(ローカル座標
系)に、座標変換マトリックスの乗算(ステップS9
1)と、平行移動ベクトルの足し算(ステップS92)
を行い、表示のためのスクリーンに固定の座標系での3
次元座標を求める。
In FIG. 7, the three-dimensional coordinates (local coordinate system) of each vertex of a polygon, for example, three vertices of a triangle are multiplied by a coordinate conversion matrix (step S9).
1) and the translation vector addition (step S92)
3 in a fixed coordinate system on the screen for display
Find the dimensional coordinates.

【0006】次に、スクリーン座標系での3次元座標を
透視変換(ステップS93)し、スクリーン(表示面)
上での2次元座標を求める。
Next, the three-dimensional coordinates in the screen coordinate system are perspective-transformed (step S93), and the screen (display surface) is displayed.
Find the two-dimensional coordinates above.

【0007】以上でテクスチャ画像とスクリーン上のポ
リゴンの間に各三角形の3頂点での対応関係ができたの
で、これをもとに一次変換式を作る(ステップS94)
ことができる。この一次変換式を使って、ポリゴンに含
まれる画素に対応するテクスチャ画像上の点を求め、そ
の画素値をポリゴン内の画素に書き込む(ステップS9
5)。
As described above, since the correspondence between the texture image and the polygon on the screen at the three vertices of each triangle has been established, the primary conversion equation is created based on this (step S94).
be able to. Using this linear conversion formula, a point on the texture image corresponding to a pixel included in the polygon is obtained, and the pixel value is written to the pixel in the polygon (step S9).
5).

【0008】このような方法で複数の三角形から成るポ
リゴンにテクスチャマッピングを行う場合、例えばポリ
ゴンが四角形である場合には、図8のBに示すように四
角形81を2つの三角形82、83に分割し、上記マッ
ピング操作を各三角形82、83に対して行う。図8の
Aはテクスチャ画像側の対応する四角形81t及び2つ
の分割三角形82t、83tをそれぞれ示している。
When texture mapping is performed on a polygon composed of a plurality of triangles by such a method, for example, when the polygon is a quadrangle, the quadrangle 81 is divided into two triangles 82 and 83 as shown in FIG. 8B. Then, the mapping operation is performed for each triangle 82, 83. 8A shows a corresponding quadrangle 81t and two divided triangles 82t and 83t on the texture image side, respectively.

【0009】図9は、テクスチャの具体例として格子模
様(方眼地)としたときのテクスチャ画像側の四角形8
1t及び2つの分割三角形82t、83tと、これがマ
ッピングされた表示(スクリーン)画像側の四角形81
及び2つの分割三角形82、83とをそれぞれ示してい
る。
FIG. 9 shows a quadrangle 8 on the texture image side when a lattice pattern (grid) is used as a concrete example of the texture.
1t and two division triangles 82t and 83t, and a quadrangle 81 on the display (screen) image side to which this is mapped
And two divided triangles 82 and 83, respectively.

【0010】ここで、ポリゴンの大きさが大きく、平行
四辺形に比べてひずんでいるときには、上述した方法に
よるテクスチャマッピングでは、例えば図9のBに示す
ように、分割三角形82、83のつなぎめのところでテ
クスチャの屈折が生じ、表示画像の画質を損なう。
Here, when the size of the polygon is large and distorted as compared with the parallelogram, in the texture mapping by the above-described method, for example, as shown in FIG. At that point, the refraction of the texture occurs and the quality of the displayed image is impaired.

【0011】そこで、このようなテクスチャの屈折によ
る画質の劣化を防ぐために、図10のフローチャートに
示すような方法が考えられている。
Therefore, in order to prevent the deterioration of image quality due to such refraction of texture, a method shown in the flowchart of FIG. 10 has been considered.

【0012】すなわち、先ずステップS71において、
上記ポリゴンを図11のBに示すようにいくつかの(例
えば4つの)分割領域である小ポリゴンに分割する。次
のステップS72において、上記各小ポリゴンに対応す
るように、テクスチャ画像も分割する(図11のA)。
That is, first, in step S71,
The polygon is divided into small polygons, which are some (for example, four) divided areas, as shown in FIG. 11B. In the next step S72, the texture image is also divided so as to correspond to each of the small polygons (A in FIG. 11).

【0013】次のステップS73以降では、分割された
小ポリゴン毎に、上記図7のステップS91からステッ
プS95までの処理を行う。すなわち、図10の各ステ
ップS73、S74、S75、S76、及びS77は、
上記図7の各ステップS91、S92、S93、S9
4、及びS95にそれぞれ対応し、同様な処理を小ポリ
ゴンに対して行う。ステップS78では、上記ステップ
S91〜S95の処理が全ての小ポリゴンに対して行わ
れたか否かを判別し、NOのときはステップS73に戻
り、YESのときは処理を終了することにより、全体の
テクスチャマッピングを完成させている。
After the next step S73, the processing from step S91 to step S95 in FIG. 7 is performed for each of the divided small polygons. That is, steps S73, S74, S75, S76, and S77 in FIG.
Steps S91, S92, S93, S9 in FIG. 7 described above.
4 and S95, respectively, the same processing is performed on the small polygon. In step S78, it is determined whether or not the processes of steps S91 to S95 have been performed for all the small polygons. If NO, the process returns to step S73, and if YES, the process is terminated, and the whole process is completed. Texture mapping is completed.

【0014】このようなポリゴンを分割して得られた小
ポリゴン毎にテクスチャマッピング処理を施すことによ
り、それぞれの小ポリゴンの中でのみ画像のひずみが生
じ、全体としては画質の劣化が減ることになる。
By performing the texture mapping process for each small polygon obtained by dividing such a polygon, the image distortion occurs only in each small polygon, and the deterioration of the image quality as a whole is reduced. Become.

【0015】図12は、テクスチャの具体例として格子
模様(方眼地)としたときのテクスチャ画像側をAに、
これがマッピングされた表示(スクリーン)画像側の四
角形のポリゴンをBにそれぞれ示している。この図12
のBと、上記図9のBとを比べれば、ポリゴン(四角
形)の対角線上でのテクスチャの折れ曲がりが、図12
のBの方が少なくなっている(目立たなくなっている)
ことがわかる。
In FIG. 12, the texture image side when a grid pattern (grid) is used as a concrete example of the texture is A.
Each of the rectangular polygons on the display (screen) image side to which this is mapped is shown in B. This FIG.
12 is compared with B of FIG. 9 above, the bending of the texture on the diagonal line of the polygon (quadrangle) is shown in FIG.
B is less (less noticeable)
I understand.

【0016】[0016]

【発明が解決しようとする課題】ところで、上記図10
に示したような方法によれば、ポリゴンの頂点の数が上
記分割数に比例して増えるため、全体の計算量も増加す
ることになる。すなわち、ポリゴンとして四角形を想定
するとき、この四角形のポリゴンにテクスチャマッピン
グを施すときには、 (1) ポリゴンを再分割しないと対角線上で画質が劣化す
る。 (2) ポリゴンを再分割すると分割数だけ計算量が増え
る。 (3) 分割数を前もって増やしておくと、分割前のポリゴ
ンが小さいとき計算が無駄になる。 という問題点がある。
By the way, the above-mentioned FIG.
According to the method described in (1), since the number of polygon vertices increases in proportion to the number of divisions, the total calculation amount also increases. That is, when a quadrangle is assumed as a polygon, and when texture mapping is applied to this quadrilateral polygon, (1) unless the polygon is subdivided, the image quality deteriorates on the diagonal line. (2) When the polygon is subdivided, the calculation amount increases by the number of divisions. (3) If the number of divisions is increased in advance, the calculation becomes useless when the polygons before division are small. There is a problem.

【0017】本発明は、このような実情に鑑みてなされ
たものであり、計算量を大幅に増大させることなく、ポ
リゴンの対角線上でのテクスチャの折れ曲がり等の画質
劣化を有効に改善し得るようなテクスチャマッピング装
置を提供することを目的とするものである。
The present invention has been made in view of such a situation, and it is possible to effectively improve image quality deterioration such as bending of a texture on a diagonal of a polygon without significantly increasing the amount of calculation. An object of the present invention is to provide a simple texture mapping device.

【0018】[0018]

【課題を解決するための手段】本発明に係るテクスチャ
マッピング装置は、画像表示すべき物体を構成する単位
となる多角形領域(いわゆるポリゴン)に対して所望の
テクスチャ画像を貼り付けるテクスチャマッピング装置
において、上記多角形領域の各頂点のスクリーン座標か
ら求められた該多角形領域の形状に関する情報に応じて
該多角形領域の分割数を決定する手段と、上記多角形領
域の各頂点のスクリーン座標から上記分割数に応じて内
挿によって複数の分割多角形領域(いわゆる小ポリゴ
ン)に分割する手段と、この分割された各分割多角形領
域のそれぞれの各頂点のスクリーン座標を用いて各分割
多角形領域のテクスチャマッピングを行う手段とを有し
て成ることにより、上述の課題を解決するものである。
A texture mapping device according to the present invention is a texture mapping device for pasting a desired texture image onto a polygonal area (so-called polygon) which is a unit constituting an object to be image-displayed. , Means for determining the number of divisions of the polygonal area in accordance with information on the shape of the polygonal area obtained from the screen coordinates of the respective vertices of the polygonal area, and from the screen coordinates of the respective vertices of the polygonal area Means for dividing into a plurality of divided polygonal areas (so-called small polygons) by interpolation according to the number of divisions, and each divided polygonal area using the screen coordinates of each vertex of each divided polygonal area. Means for performing texture mapping of a region is provided to solve the above-mentioned problems.

【0019】ここで、上記形状に関する情報としては、
上記多角形領域のひずみ量及び/又は面積(大きさ)を
用いることができる。
Here, as the information on the above-mentioned shape,
The strain amount and / or area (size) of the polygonal region can be used.

【0020】[0020]

【作用】スクリーン上のポリゴン(単位多角形領域)の
対角線上のテクスチャの屈折等の画質劣化を、該ポリゴ
ンの分割により改善すると共に、このときの分割数を該
ポリゴンのひずみ量や面積(大きさ)に応じて決定して
いるため、必要最小限の分割が行われ、無駄な計算量の
増大を防止できる。また、スクリーン座標系での小ポリ
ゴン(分割された各多角形領域)の各頂点座標は、元の
ポリゴンのスクリーン座標系での頂点座標から内挿で求
めているため、各小ポリゴンの頂点座標を座標変換で求
めなくてもよく、計算量の増加が少ない。
The deterioration of the image quality such as the refraction of the texture on the diagonal line of the polygon (unit polygon area) on the screen is improved by dividing the polygon, and the number of divisions at this time is adjusted by the distortion amount and area (largeness) of the polygon. Therefore, the necessary minimum division is performed, and it is possible to prevent an unnecessary increase in the calculation amount. Since the vertex coordinates of the small polygon (divided polygonal areas) in the screen coordinate system are interpolated from the vertex coordinates of the original polygon in the screen coordinate system, the vertex coordinates of each small polygon. Does not have to be obtained by coordinate conversion, and the increase in calculation amount is small.

【0021】[0021]

【実施例】以下、本発明に係る好ましい実施例について
図面を参照しながら説明する。図1は本発明に係るテク
スチャマッピング装置の一実施例の要部の概略構成を示
すブロック回路図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block circuit diagram showing a schematic configuration of a main part of an embodiment of a texture mapping device according to the present invention.

【0022】この図1において、マイクロプロセッサ等
から成るCPU11がバスライン19に接続され、この
バスライン19には、プログラムやデータ等を格納する
メインメモリ12と、入力パッド等の入力デバイス14
からの操作データを取り込むためのインターフェース1
3と、画像を生成するためのグラフィックプロセッサ1
6とが接続されており、グラフィックプロセッサ16に
は生成された画像を格納するためのビデオメモリ15が
接続されている。ここで、メインメモリ12には、プロ
グラムのみならず、描画しようとする物体の3次元頂点
座標(ローカル座標あるいはオブジェクト座標)や、座
標変換マトリックスや、表示される物体の各面を構成す
る単位となる多角形領域(いわゆるポリゴン)に貼り付
けられるいわゆるテクスチャ画像の格納場所を示す情報
等の各種情報が格納されている。CPU11は、メイン
メモリ12に格納されているプログラムの実行に従って
必要とされる情報をメインメモリ12から取り出し、グ
ラフィックプロセッサ16に転送する。
In FIG. 1, a CPU 11 including a microprocessor or the like is connected to a bus line 19, and the bus line 19 includes a main memory 12 for storing programs and data and an input device 14 such as an input pad.
Interface 1 for importing operation data from
3 and a graphic processor 1 for generating an image
6 is connected, and a video memory 15 for storing the generated image is connected to the graphic processor 16. Here, in the main memory 12, not only the program, but also the three-dimensional vertex coordinates (local coordinates or object coordinates) of the object to be drawn, the coordinate conversion matrix, and the units forming each surface of the displayed object. Various information such as information indicating a storage location of a so-called texture image to be attached to the polygon area (so-called polygon) is stored. The CPU 11 takes out the information required according to the execution of the program stored in the main memory 12 from the main memory 12 and transfers it to the graphic processor 16.

【0023】グラフィックプロセッサ16は、表示され
る画像の作成や描画等の処理を行うものであるが、特に
テクスチャマッピングに関連した主要な処理について、
機能ブロックにて表して説明する。これらの機能ブロッ
クは、ソフトウェア的に実現される各機能をハードウェ
ア的に表したものである。
The graphic processor 16 performs processing such as creation and drawing of an image to be displayed. Especially, regarding the main processing relating to texture mapping,
The function blocks will be described. These functional blocks represent each function realized by software as hardware.

【0024】スクリーン座標計算機能部21では、メイ
ンメモリ12に格納されている上記物体の頂点座標(ロ
ーカル座標)や座標変換マトリックス等から、スクリー
ンに固定の座標系(スクリーン座標系)での3次元座標
を計算し、さらには実際に表示されるスクリーン上での
2次元座標を求める。
The screen coordinate calculation function unit 21 uses a three-dimensional coordinate system (screen coordinate system) fixed on the screen based on the vertex coordinates (local coordinates) and coordinate conversion matrix of the object stored in the main memory 12. The coordinates are calculated, and the two-dimensional coordinates on the screen that are actually displayed are calculated.

【0025】ポリゴン分割数決定機能部22は、上記ポ
リゴン(単位多角形領域)の各頂点のスクリーン座標か
ら求められた該ポリゴンの形状に関する情報に応じて、
該ポリゴンの分割数を決定するものである。具体的に
は、上記ポリゴンを四角形とするとき、4頂点のスクリ
ーン上での2次元座標の「ひずみ」や「大きさ(あるい
は面積)」に応じてポリゴンの分割数を決める。例え
ば、平行四辺形から形がずれるほど「ひずみ」は大きく
なる。また、「大きさ」はスクリーン座標系における大
きさ(面積)、すなわち見た目の大きさである。
The polygon division number determination function unit 22 responds to information regarding the shape of the polygon (unit polygon area), which is obtained from the screen coordinates of the vertices of the polygon.
The number of divisions of the polygon is determined. Specifically, when the polygon is a quadrangle, the number of divisions of the polygon is determined according to the “distortion” or “size (or area)” of the two-dimensional coordinate on the screen with four vertices. For example, the "distortion" increases as the shape deviates from the parallelogram. The "size" is the size (area) in the screen coordinate system, that is, the apparent size.

【0026】ポリゴン分割機能部23は、上記ポリゴン
の各頂点のスクリーン座標から上記分割数に応じて、内
挿によって当該ポリゴンを複数の分割領域(小ポリゴ
ン)に分割するものである。この場合、辺の2分点は両
端点の平均、ポリゴンの中心点は4頂点の平均によって
決めればよい。
The polygon division function unit 23 divides the polygon into a plurality of division areas (small polygons) by interpolation from the screen coordinates of the vertices of the polygon according to the division number. In this case, the bisection point of the side may be determined by the average of both end points, and the center point of the polygon may be determined by the average of four vertices.

【0027】テクスチャマッピング機能部24は、分割
された各領域(小ポリゴン)のそれぞれの各頂点のスク
リーン座標を用いて、各小ポリゴンのテクスチャマッピ
ングを行うものである。具体的に、上記ポリゴンが四角
形で、これを分割した小ポリゴンも四角形の場合には、
各小ポリゴンについて三角形分割を行い、それぞれの三
角形について一次変換式を求め、この一次変換式を用い
て、各小ポリゴンに含まれる画素に対応するテクスチャ
画像上の点を求め、その画素値を各小ポリゴン内の画素
に書き込むようにすればよい。
The texture mapping function unit 24 performs the texture mapping of each small polygon by using the screen coordinates of each vertex of each divided area (small polygon). Specifically, if the polygon is a quadrangle and the small polygon that divides it is also a quadrangle,
Triangulation is performed on each small polygon, a primary conversion formula is calculated for each triangle, and a point on the texture image corresponding to the pixel included in each small polygon is calculated using this linear conversion formula, and the pixel value is It suffices to write to the pixels in the small polygon.

【0028】次に、本発明の実施例の処理の流れの具体
例について、図2のフローチャートを参照しながら説明
する。この具体例においては、説明を簡略化するため
に、画像表示の物体の単位構成要素となる多角形領域で
ある上記ポリゴンとして、例えば四角形を用いるものと
する。
Next, a specific example of the processing flow of the embodiment of the present invention will be described with reference to the flowchart of FIG. In this specific example, for simplification of description, it is assumed that, for example, a quadrangle is used as the polygon, which is a polygonal area serving as a unit constituent element of an object for image display.

【0029】上述したポリゴンの具体例としての四角形
の4頂点の3次元座標(ローカル座標系)に対して、ス
テップS31にて上記座標変換マトリックスの乗算を行
い、ステップS32にて平行移動ベクトルの加算を行う
ことにより、スクリーンに固定の座標系(スクリーン座
標系)での3次元座標を求める。次のステップS33で
は、上記スクリーン座標系での3次元座標を透視変換
し、スクリーン上での2次元座標を求める。
The three-dimensional coordinates (local coordinate system) of the four vertices of a quadrangle, which is a specific example of the polygon described above, are multiplied by the coordinate conversion matrix in step S31, and the translation vector is added in step S32. By performing the above, three-dimensional coordinates in a coordinate system fixed on the screen (screen coordinate system) are obtained. In the next step S33, the three-dimensional coordinates in the screen coordinate system are perspective-transformed to obtain the two-dimensional coordinates on the screen.

【0030】次のステップS34においては、上記工程
により求められた4頂点のスクリーン座標から、「ひず
み」、「大きさ(あるいは面積)」を求め、これらの
「ひずみ」、「大きさ」の少なくとも一方に応じて、上
記ポリゴンである四角形の分割数を決定する。ここで、
図3は上記「ひずみ」、「大きさ」の定義を説明するた
めの図であり、図3のA、Bに示すように、平行四辺形
から形がずれるほど「ひずみ」が大きくなり、図3の
C、Dに示すように、スクリーン座標系における見た目
の大きさ(面積)により「大きさ」の大小が決まる。こ
れらの「ひずみ」、「大きさ」の大小に応じて上記四角
形の分割数を決定する。
In the next step S34, "strain" and "size (or area)" are obtained from the screen coordinates of the four vertices obtained in the above process, and at least these "strain" and "size" are obtained. According to one of them, the number of divisions of the quadrangle that is the polygon is determined. here,
FIG. 3 is a diagram for explaining the definitions of the above “strain” and “size”. As shown in FIGS. 3A and 3B, the “strain” increases as the shape deviates from the parallelogram. As shown in C and D of 3, the size of the “size” is determined by the apparent size (area) in the screen coordinate system. The number of divisions of the quadrangle is determined according to the magnitude of these “distortion” and “size”.

【0031】この「ひずみ」や「大きさ」に応じて上記
分割数を決めるための評価式の例について、図4と共に
説明する。この図4に示すポリゴン(四角形)の4頂点
をA、B、C、Dとし、辺ABのベクトルをa、辺A
Dのベクトルb、辺DCのベクトルをc、辺BCの
ベクトルdとし、さらにベクトルaの互いに直交す
るx、y成分を(a0 、a1 )、ベクトルbの各成分
を(b0 、b1 )、ベクトルcの各成分を(c0 、c
1 )、ベクトルdの各成分を(d0 、d1 )とすると
き、上記「ひずみ」の量(ひずみ量)Hを、 H=(a0 −c0 2 +(a1 −c1 2 +(b0 −d0 2 +(b1 −d1 2 ・・・ (1) また、上記「大きさ」を表す量Eを、 E=|a0 1 −a1 0 |+|c0 1 −c1 0 | ・・・ (2) と定義する。そして、これらの値H及びEを用いて、分
割数Divを、 Div=kEH (ただしkは定数) ・・・ (3) のように決定することができる。この分割数は、自然数
であることが必要とされるが、2の倍数、あるいは2の
べき乗とすることが分割を容易化する上で好ましい。上
記(1)式に示すひずみ量Hは、ベクトルaとcと
の平行度及びベクトルbとdとの平行度を表すもの
であるが、面積の成分も含んでいるため、純粋なひずみ
成分のみを求めたい場合には、例えば面積成分で除算す
ることによる正規化を施すようにしてもよい。分割数を
決定する要素としては、上記ひずみや大きさの他に、ポ
リゴン(四角形)の「細さ」等も考えられる。
An example of an evaluation formula for determining the number of divisions according to the "distortion" and "size" will be described with reference to FIG. The four vertices of the polygon (quadrangle) shown in FIG. 4 are A, B, C, and D, and the vector of side AB is a and side A is
Let a vector b of D, a vector of a side DC be c, a vector d of a side BC, and mutually orthogonal x and y components of the vector a (a 0 , a 1 ), and each component of the vector b be (b 0 , b 1 ), and each component of the vector c is (c 0 , c
1 ) and each component of the vector d is (d 0 , d 1 ), the amount of “strain” (strain amount) H is H = (a 0 −c 0 ) 2 + (a 1 −c 1 ) 2 + (b 0 -d 0 ) 2 + (b 1 -d 1) 2 ··· (1) Further, the amount E representing the "size", E = | a 0 b 1 -a 1 b 0 | + | c 0 d 1 −c 1 d 0 | It is defined as (2). Then, by using these values H and E, the division number D iv can be determined as follows: D iv = kEH (where k is a constant) (3) This division number is required to be a natural number, but it is preferable to set it to a multiple of 2 or a power of 2 in order to facilitate division. The strain amount H shown in the above equation (1) represents the parallelism between the vectors a and c and the parallelism between the vectors b and d, but since the area component is also included, only the pure strain component is included. If it is desired to obtain, normalization may be performed by dividing by, for example, an area component. As a factor for determining the number of divisions, in addition to the above-mentioned distortion and size, the "thinness" of a polygon (quadrangle) and the like can be considered.

【0032】以上のようにしてポリゴン(四角形)の分
割数が決まったら、ステップS35において、例えば図
5に示すようにポリゴンをいくつかの小ポリゴンに分割
してゆく。図5では4分割の例を示しており、図5のB
に示すポリゴン(四角形)の4頂点をA、B、C、Dと
するとき、辺ABを2分する分割点M、辺BCの分割点
N、辺CDの分割点P、及び辺DAの分割点Qについて
は、それぞれの両端点の平均、すなわち、 M=(A+B)/2 N=(B+C)/2 P=(D+C)/2 Q=(A+D)/2 により求め、ポリゴンの中心点Oについては、4頂点の
平均、すなわち、 O=(A+B+C+D)/4 により求めるようにすれば、計算が容易である。
After the number of polygons (quadrangles) to be divided is determined as described above, in step S35, the polygon is divided into some small polygons, for example, as shown in FIG. FIG. 5 shows an example of four divisions, and B of FIG.
When the four vertices of the polygon (quadrangle) shown in FIG. 3 are A, B, C, and D, a division point M that divides the side AB, a division point N of the side BC, a division point P of the side CD, and a division of the side DA. For the point Q, the average of the respective end points, that is, M = (A + B) / 2 N = (B + C) / 2 P = (D + C) / 2 Q = (A + D) / 2 Can be calculated easily by obtaining the average of four vertices, that is, O = (A + B + C + D) / 4.

【0033】ステップS36では、図5のAに示すよう
に、テクスチャ画像側でも同様の分割を行う。
In step S36, similar division is performed on the texture image side as shown in FIG.

【0034】このように充分細かく分割し終わった後、
図5に示すように各小ポリゴンについて三角形分割を行
い、ステップS37にてそれぞれの微小三角形について
一次変換式を求める。この一次変換式は、スクリーン画
像側での微小三角形の各頂点に対応するテクスチャ画像
の座標に基づき、上記微小三角形の内部の画素の位置に
対応するテクスチャ画像の各点の座標を求めるものであ
り、この一次変換式を用いて、ステップS38では上記
小ポリゴンに含まれる画素に対応するテクスチャ画像上
の点を求めて、その画素データを上記小ポリゴン内の画
素位置に書き込むことにより、描画を行う。
After the fine division is completed in this way,
As shown in FIG. 5, triangulation is performed on each small polygon, and in step S37, a primary conversion formula is obtained for each small triangle. This linear conversion formula is for obtaining the coordinates of each point of the texture image corresponding to the position of the pixel inside the above-mentioned minute triangle based on the coordinates of the texture image corresponding to each vertex of the minute triangle on the screen image side. By using this linear conversion equation, in step S38, a point on the texture image corresponding to a pixel included in the small polygon is obtained, and the pixel data is written in the pixel position in the small polygon to perform drawing. .

【0035】次のステップS39では、上記ステップS
37、S38の処理が全ての小ポリゴンについて実行さ
れたか否かを判別しており、NOのときはステップS3
7に戻って、上記処理が施されていない小ポリゴンにつ
いて一次変換式を作成し、ステップS38で上記描画処
理を施す。ステップS39でYESと判別されたときに
は、このテクスチャマッピング処理を終了する。
At the next step S39, the above step S
It is determined whether or not the processes of 37 and S38 have been executed for all the small polygons. If NO, step S3.
Returning to step 7, a primary conversion formula is created for the small polygons that have not been subjected to the above processing, and the drawing processing is performed in step S38. If YES is determined in the step S39, this texture mapping process is ended.

【0036】このような実施例によれば、分割前のポリ
ゴンでは対角線上で目立つテクスチャの折れ曲がりが目
立たなくなり、しかも、ポリゴンの分割数がポリゴンの
「ひずみ」、「大きさ」等に従って適応的にわかるた
め、無駄に計算量が増えることもない。さらに、分割に
よって増える計算は座標変換後の計算であるから、最初
からポリゴンを分割して全ての頂点について座標計算を
行うのに比べて、格段に計算量を減らすことができる。
According to such an embodiment, in the polygon before division, the bending of the texture which is conspicuous on the diagonal line becomes inconspicuous, and moreover, the number of divisions of the polygon is adaptive according to the "distortion", "size", etc. of the polygon. Since it is understood, the amount of calculation does not increase unnecessarily. Further, since the calculation increased by the division is the calculation after the coordinate conversion, the calculation amount can be significantly reduced as compared with the case where the polygon is divided from the beginning and the coordinate calculation is performed for all the vertices.

【0037】[0037]

【発明の効果】以上の説明からも明らかなように、本発
明によれば、画像表示すべき物体を構成する単位となる
多角形領域(いわゆるポリゴン)の各頂点のスクリーン
座標から求められた該多角形領域の形状に関する情報
(ひずみ量や大きさ)に応じて該多角形領域の分割数を
決定し、これらの各頂点のスクリーン座標から上記分割
数に応じて内挿によって複数の分割多角形領域(いわゆ
る小ポリゴン)に分割し、この分割された各分割多角形
領域のそれぞれの各頂点のスクリーン座標を用いて各分
割多角形領域のテクスチャマッピングを行っている。従
って、ポリゴンの対角線上でのテクスチャの屈折等の画
質劣化を防止できると共に、ポリゴンのひずみ量や大き
さに応じて適応的に分割数を変化させているため、ポリ
ゴンのひずみ量が小さい場合や大きさが小さい場合は分
割の数も小さくなり、無駄な計算量の増加がない。ま
た、分割数が増えても、座標変換の回数は増えず、内挿
の回数が増えるだけであるので、計算量の増加も少なく
て済む。
As is apparent from the above description, according to the present invention, the screen coordinates obtained from the vertices of each polygonal area (so-called polygon) which is a unit forming an object to be displayed as an image are calculated. The number of divisions of the polygonal area is determined according to the information on the shape of the polygonal area (strain amount or size), and a plurality of divided polygons are interpolated from the screen coordinates of these vertices according to the number of divisions. The area is divided into areas (so-called small polygons), and the texture mapping of each divided polygonal area is performed using the screen coordinates of each vertex of each divided polygonal area. Therefore, it is possible to prevent the image quality deterioration such as the refraction of the texture on the diagonal line of the polygon and to adaptively change the division number according to the distortion amount and size of the polygon. When the size is small, the number of divisions is also small, and there is no unnecessary increase in the amount of calculation. Further, even if the number of divisions increases, the number of coordinate conversions does not increase, but only the number of interpolations increases, so the increase in the amount of calculation can be small.

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

【図1】本発明に係るテクスチャマッピング装置の一実
施例が適用される画像作成装置の一例を示すブロック回
路図である。
FIG. 1 is a block circuit diagram showing an example of an image creating apparatus to which an embodiment of a texture mapping apparatus according to the present invention is applied.

【図2】該一実施例の動作を説明するためのフローチャ
ートである。
FIG. 2 is a flowchart for explaining the operation of the embodiment.

【図3】該一実施例に用いられるポリゴンのひずみ及び
大きさを説明するための図である。
FIG. 3 is a diagram for explaining the distortion and size of a polygon used in the one embodiment.

【図4】該一実施例に用いられるポリゴンのひずみ及び
大きさを評価するための評価式の一例を説明するための
図である。
FIG. 4 is a diagram for explaining an example of an evaluation formula for evaluating the distortion and size of a polygon used in the embodiment.

【図5】該一実施例のテクスチャマッピングを説明する
ための図である。
FIG. 5 is a diagram for explaining texture mapping of the embodiment.

【図6】従来のテクスチャマッピングが施される画像作
成装置の一例を示すブロック回路図である。
FIG. 6 is a block circuit diagram showing an example of a conventional image creating apparatus to which texture mapping is applied.

【図7】従来のテクスチャマッピングの処理の流れを説
明するためのフローチャートである。
FIG. 7 is a flowchart for explaining the flow of conventional texture mapping processing.

【図8】従来のテクスチャマッピングの処理を説明する
ための図である。
FIG. 8 is a diagram for explaining a conventional texture mapping process.

【図9】従来のテクスチャマッピングの処理を説明する
ための図である。
FIG. 9 is a diagram for explaining a conventional texture mapping process.

【図10】従来のテクスチャマッピングのポリゴン分割
を伴う処理の流れを説明するためのフローチャートであ
る。
FIG. 10 is a flow chart for explaining a flow of processing involving polygon division of conventional texture mapping.

【図11】従来のポリゴン分割を伴うテクスチャマッピ
ングの処理を説明するための図である。
FIG. 11 is a diagram for explaining a conventional texture mapping process involving polygon division.

【図12】従来のポリゴン分割を伴うテクスチャマッピ
ングの処理を説明するための図である。
FIG. 12 is a diagram for explaining a conventional texture mapping process involving polygon division.

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

11・・・・・CPU 12・・・・・メインメモリ 14・・・・・ビデオメモリ 16・・・・・グラフィックプロセッサ 21・・・・・スクリーン座標計算機能部 22・・・・・ポリゴン分割数決定機能部 23・・・・・ポリゴン分割機能部 24・・・・・テクスチャマッピング機能部 11-CPU 12-main memory 14-video memory 16-graphic processor 21-screen coordinate calculation function unit 22-polygon division Number determination function part 23 ... Polygon division function part 24 ... Texture mapping function part

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 画像表示すべき物体を構成する単位とな
る多角形領域に対して所望のテクスチャ画像を貼り付け
るテクスチャマッピング装置において、 上記多角形領域の各頂点のスクリーン座標から求められ
た該多角形領域の形状に関する情報に応じて該多角形領
域の分割数を決定する手段と、 上記多角形領域の各頂点のスクリーン座標から上記分割
数に応じて内挿によって複数の分割多角形領域に分割す
る手段と、 この分割された各分割多角形領域のそれぞれの各頂点の
スクリーン座標を用いて各分割多角形領域のテクスチャ
マッピングを行う手段とを有して成ることを特徴とする
テクスチャマッピング装置。
1. A texture mapping device for pasting a desired texture image onto a polygonal area, which is a unit constituting an object to be displayed as an image, wherein the multiplicity of pixels obtained from the screen coordinates of each vertex of the polygonal area. A means for determining the number of divisions of the polygonal area according to information on the shape of the polygonal area; and dividing into a plurality of divisional polygonal areas by interpolation from the screen coordinates of each vertex of the polygonal area according to the number of divisions. And a means for performing texture mapping of each divided polygonal area using the screen coordinates of each vertex of each divided polygonal area.
【請求項2】 上記形状に関する情報として、上記多角
形領域のひずみ量を用いることを特徴とする請求項1記
載のテクスチャマッピング装置。
2. The texture mapping apparatus according to claim 1, wherein a strain amount of the polygonal area is used as the information on the shape.
【請求項3】 上記形状に関する情報として、上記多角
形領域の面積を用いることを特徴とする請求項1記載の
テクスチャマッピング装置。
3. The texture mapping device according to claim 1, wherein the area of the polygonal region is used as the information on the shape.
【請求項4】 上記形状に関する情報として、上記多角
形領域のひずみ量及び面積を用いることを特徴とする請
求項1記載のテクスチャマッピング装置。
4. The texture mapping apparatus according to claim 1, wherein a strain amount and an area of the polygonal region are used as the information on the shape.
JP8848793A 1993-04-15 1993-04-15 Image creation device Expired - Lifetime JP3327986B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8848793A JP3327986B2 (en) 1993-04-15 1993-04-15 Image creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8848793A JP3327986B2 (en) 1993-04-15 1993-04-15 Image creation device

Publications (2)

Publication Number Publication Date
JPH06301792A true JPH06301792A (en) 1994-10-28
JP3327986B2 JP3327986B2 (en) 2002-09-24

Family

ID=13944165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8848793A Expired - Lifetime JP3327986B2 (en) 1993-04-15 1993-04-15 Image creation device

Country Status (1)

Country Link
JP (1) JP3327986B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0715276A2 (en) * 1994-12-02 1996-06-05 Sony Corporation Method and apparatus for mapping texture
JPH0997350A (en) * 1995-09-29 1997-04-08 Canon Inc Information processing method and apparatus and computer control apparatus
JPH0997343A (en) * 1995-09-29 1997-04-08 Canon Inc Texture data generation method and apparatus and computer control apparatus
US6563497B1 (en) 1998-05-15 2003-05-13 Sony Corporation Image processing apparatus
JP2003225369A (en) * 2002-02-05 2003-08-12 Shinnichi Electronics Kk Image display device for pachinko game machine and image display method and program therefor
JP2006209654A (en) * 2005-01-31 2006-08-10 Matsushita Electric Ind Co Ltd Polygon drawing device with pattern

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0715276A2 (en) * 1994-12-02 1996-06-05 Sony Corporation Method and apparatus for mapping texture
JPH0997350A (en) * 1995-09-29 1997-04-08 Canon Inc Information processing method and apparatus and computer control apparatus
JPH0997343A (en) * 1995-09-29 1997-04-08 Canon Inc Texture data generation method and apparatus and computer control apparatus
US6563497B1 (en) 1998-05-15 2003-05-13 Sony Corporation Image processing apparatus
JP2003225369A (en) * 2002-02-05 2003-08-12 Shinnichi Electronics Kk Image display device for pachinko game machine and image display method and program therefor
JP2006209654A (en) * 2005-01-31 2006-08-10 Matsushita Electric Ind Co Ltd Polygon drawing device with pattern
US7667714B2 (en) 2005-01-31 2010-02-23 Panasonic Corporation Patterned polygon rendering apparatus

Also Published As

Publication number Publication date
JP3327986B2 (en) 2002-09-24

Similar Documents

Publication Publication Date Title
JP3466661B2 (en) Image processing apparatus and method
US5877769A (en) Image processing apparatus and method
US7432936B2 (en) Texture data anti-aliasing method and apparatus
JP3179392B2 (en) Image processing apparatus and image processing method
JP2005122361A (en) Image processor, its processing method, computer program, and recording medium
JP3959862B2 (en) Texture mapping method and apparatus
US20030011611A1 (en) Rendering process
JP2973573B2 (en) Image conversion device
JPH06301792A (en) Texture mapping device
JP2837584B2 (en) How to create terrain data
JPH07282292A (en) Texture mapping method and image processing apparatus
US6693634B1 (en) Reduction rate processing circuit and method with logarithmic operation and image processor employing same
JP3910259B2 (en) Image processing apparatus and method, and rendering apparatus and method
JP3712139B2 (en) Image creating apparatus and method
US6900804B1 (en) Method of forming polygon image and image processing apparatus using the same
JPH11306366A (en) Graphic operation device and method
JP3701627B2 (en) Drawing processing program, recording medium storing drawing processing program, drawing processing apparatus and method
JP4042204B2 (en) Graphic operation apparatus and method
JP2830339B2 (en) Image conversion method
JP4106719B2 (en) Image processing device
JPH0816822A (en) Three-dimensional moving picture generation method
JP2796900B2 (en) Image interpolation device
JP4224887B2 (en) Signal processing apparatus and image processing apparatus
CN118714271A (en) Image processing method, device and electronic equipment
JP2000348199A (en) Method and device for texture mapping

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080712

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080712

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090712

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090712

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100712

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110712

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110712

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120712

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120712

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130712

Year of fee payment: 11

EXPY Cancellation because of completion of term