JP4515877B2 - Outline enhancement drawing device - Google Patents
Outline enhancement drawing device Download PDFInfo
- Publication number
- JP4515877B2 JP4515877B2 JP2004292555A JP2004292555A JP4515877B2 JP 4515877 B2 JP4515877 B2 JP 4515877B2 JP 2004292555 A JP2004292555 A JP 2004292555A JP 2004292555 A JP2004292555 A JP 2004292555A JP 4515877 B2 JP4515877 B2 JP 4515877B2
- Authority
- JP
- Japan
- Prior art keywords
- primitive
- straight line
- pixel
- vertex
- triangle
- 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.)
- Expired - Fee Related
Links
Images
Description
この発明は、3次元コンピュータグラフィックスに関して、3次元モデル表示を行う場合に、モデルを構成するプリミティブを強調する輪郭強調描画装置に関するものである。 The present invention relates to a contour emphasis drawing apparatus that emphasizes primitives constituting a model when three-dimensional computer graphics are displayed.
従来の輪郭強調描画装置は特開平4-205484号公報で示されるように、ポリゴンの塗りつぶしをスキャンライン方向に行うスキャンライン方式に対して実施されている。
これはポリゴンを塗りつぶす場合に、図2で示すようにポリゴンの左右にエッジを生成し、左右のエッジ間のピクセルを生成することで塗りつぶしを行う方法である。このエッジを生成する方式を輪郭描画に用いることでピクセルの輪郭を生成することができる。
A conventional contour-enhanced drawing apparatus is implemented for a scan line method in which polygon filling is performed in the scan line direction as disclosed in Japanese Patent Laid-Open No. 4-205484.
This is a method for filling a polygon by creating edges on the left and right sides of the polygon as shown in FIG. 2 and generating pixels between the left and right edges as shown in FIG. By using this edge generation method for contour drawing, the contour of a pixel can be generated.
また塗りつぶしの他の方法としてスキャンライン方向に塗りつぶすのではなく、タイリング状に塗りつぶす方式もとられている。これはテクスチャマッピングを行う場合にテクスチャ読み出しを効率よく行うためにとられる方法である。この方式は図3に示すように例えば2×2のタイル上のエリアを考え、この2×2の各ピクセルがプリミティブの三角形内部にあるかどうかを判定しながら塗りつぶす方法である。この方式の場合はスキャンライン方式と異なり、エッジを生成する手法が含まれていないため、輪郭を強調する場合には通常の直線描画用の手法で描画する必要があった。 As another method of painting, a method of painting in a tiling form is used instead of painting in the scan line direction. This is a method taken in order to perform texture reading efficiently when performing texture mapping. In this method, as shown in FIG. 3, for example, an area on a 2 × 2 tile is considered, and each 2 × 2 pixel is filled while determining whether or not each pixel is inside a primitive triangle. Unlike the scan line method, this method does not include a method for generating an edge. Therefore, when emphasizing an outline, it is necessary to draw using a normal straight line drawing method.
従来のタイリング方式による塗りつぶし方式は、エッジ生成を行わないため、塗りつぶしを行ったプリミティブの輪郭強調を行う場合には通常の直線描画を行う必要がある。このタイリング方式の塗りつぶし方法により形成されるプリミティブのエッジと、直線描画方法によるプリミティブのエッジ生成では手法が異なるため、同一のエッジを生成するとは限らず、直線描画方法によるプリミティブの生成エッジが本来のプリミティブの外側に輪郭を生成する場合や、輪郭とプリミティブ間に隙間が開いてしまう場合がある。 Since the conventional tiling method fill method does not generate an edge, it is necessary to perform normal straight line drawing when performing contour emphasis on a painted primitive. Since the method for generating primitive edges by the tiling method and the method for generating primitive edges by the straight line drawing method are different, the same edge is not always generated. In some cases, a contour is generated outside the primitive, or a gap is opened between the contour and the primitive.
この発明は、上述のような課題を解決するためになされたもので、タイリング方式の塗りつぶし方式においても描画プリミティブの輪郭強調においてプリミティブのサイズを超えることなく輪郭強調を作り出すことが出来る輪郭強調描画装置である。 SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and contour-enhanced drawing capable of creating contour enhancement without exceeding the size of the primitive in contour emphasis of the drawing primitive even in the tiling method. Device.
この発明の輪郭強調描画装置は3次元グラフィックスにおけるプリミティブをタイリング方式で描画する装置において、プリミティブの各頂点座標が含まれるピクセルの中心がプリミティブの内部にあるか否かを判定し、プリミティブの内部にある時はそのピクセルを、プリミティブの内部にない時は、ピクセルの中心がプリミティブの内部にあり、プリミティブの各頂点座標が含まれるピクセルに最も近い隣接ピクセルを選択する直線用頂点座標生成手段と、前記直線用頂点座標生成手段により選択された各ピクセルを各頂点データとし、この各頂点データを用いて直線描画を行う直線描画手段を備える。 The contour emphasizing drawing device of the present invention is a device for drawing a primitive in 3D graphics by a tiling method, and determines whether or not the center of a pixel including each vertex coordinate of the primitive is inside the primitive. When the pixel is inside, when it is not inside the primitive, the vertex center for straight line is selected to select the adjacent pixel closest to the pixel whose center is inside the primitive and each vertex coordinate of the primitive is included Each pixel selected by the straight line vertex coordinate generation means is used as each vertex data, and a straight line drawing means for drawing a straight line using each vertex data is provided.
直線用頂点座標生成手段で、ポリゴンを指定する頂点データから、この頂点データに最も近いプリミティブ内部の頂点座標を求めるようにすることで、直線の始点と終点がプリミティブの内部になるため、プリミティブの内部に直線描画を行うことが可能になる。 By using the vertex coordinate generation means for straight lines to find the vertex coordinates inside the primitive closest to this vertex data from the vertex data specifying the polygon, the start and end points of the line are inside the primitive. It is possible to draw a straight line inside.
実施の形態1.
図1はこの発明の実施の形態1における輪郭強調描画装置を含むパソコンやPDA(Personal Digital Assistants)や携帯電話で使用される3次元グラフィックスシステムの一例である。図1においてCPU(Central Processing Unit)11はホストプロセッサとして本装置全体を制御し、描画対象となる3次元オブジェクトデータをジオメトリエンジン12に転送する。ジオメトリエンジン12では三角形や直線などの描画プリミティブに対して回転、拡大縮小、平行移動などの座標変換や、ライティング計算などによる色計算、クリップ処理を行い、スクリーン座標系における座標や色をレンダリングコントローラ13に設定する。レンダリングコントローラ13は設定された描画プリミティブである三角形や直線を表示ディスプレイ上のピクセルに展開して、色情報をフレームメモリ14に、奥行き情報をデプスメモリ15に設定する。
FIG. 1 is an example of a three-dimensional graphics system used in a personal computer, a PDA (Personal Digital Assistants), or a mobile phone that includes an outline emphasis drawing apparatus according to
図1のように構成された3次元グラフィックスシステムにおいてプリミティブの描画を行うレンダリングコントローラ13は設定された三角形の3頂点より三角形の内部を塗りつぶす。塗りつぶし方法としてタイリング法が使用される場合は三角形を含む最小矩形領域を生成し、この矩形領域の各ピクセルが三角形の内部に存在するかどうかを判定して、内部にある場合には塗りつぶし処理を行い、外部になる場合は塗りつぶし処理をおこなわない。
この内部にあるかどうかの判定は一般にピクセルの中心が三角形の内部になるかどうかで判定される。例えば図4で示される三角形があると、頂点1、頂点2、頂点3が含まれるピクセルはピクセルの中心が三角形の内部にないため描画されない。ピクセルの中心が三角形内部にあるものだけを塗りつぶすというルールに従うと図4の○で示されたピクセルが塗りつぶされる。
In the three-dimensional graphics system configured as shown in FIG. 1, the
The determination of whether or not the pixel is inside is generally determined by whether or not the center of the pixel is inside the triangle. For example, if there is a triangle shown in FIG. 4, a
このプリミティブの輪郭強調を行うために、三角形プリミティブの3頂点を使用して直線描画を行うと3頂点を含むピクセルが塗りつぶされるため図5のようにプリミティブの外側に輪郭強調の直線が描画される。このためこの発明では図7に示す直線用頂点座標生成手段と直線描画手段及びメモリを組み合わせた輪郭強調直線描画装置をレンダリングコントローラ13に設けることでこの問題を解決する。
In order to perform contour emphasis of this primitive, if line drawing is performed using the three vertices of the triangle primitive, pixels including the three vertices are filled, so that a line for contour emphasis is drawn outside the primitive as shown in FIG. . For this reason, the present invention solves this problem by providing the
図7に示す71は三角形の第1頂点のデータを保持する手段、72は三角形の第2頂点のデータを保持する手段、73は三角形の第3頂点のデータを保持する手段、74は71,72,73が保持する各頂点データから輪郭強調のための直線描画用頂点を生成する直線用頂点座標生成手段でレンダリングコントローラ13の演算部で兼用される。75は前記三角形第1頂点データ保持手段71に対応する直線用第1頂点のデータを保持する手段、76は前記三角形第2頂点データ保持手段72に対応する直線用第2頂点のデータを保持する手段、77は前記三角形第3頂点データ保持手段73に対応する直線用第3頂点のデータを保持する手段、78は75,76,77の各頂点データ保持手段の各頂点座標をもとに直線描画を行う直線描画手段である。
7, 71 is a means for holding the data of the first vertex of the triangle, 72 is a means for holding the data of the second vertex of the triangle, 73 is a means of holding the data of the third vertex of the triangle, 74 is 71, The straight line vertex coordinate generating means for generating straight line drawing vertexes for contour enhancement from the respective vertex data held by 72 and 73 is also used in the calculation unit of the
三角形プリミティブにより指定された3頂点から直線用の頂点を生成するフローを図8に示す。第1のステップは各頂点座標が含まれるピクセルの中心が三角形の内部に含まれるかどうかを直線用頂点座標生成手段74がチェックする。この結果、各頂点座標を含む各ピクセルの中心が三角形の内部である場合、直線用頂点座標生成手段74はステップ4において、各頂点データを図7の75,76,77の直線用第n頂点データ保持手段へ転送する。また各頂点座標を含む各ピクセルの中心が三角形の内部でない場合、直線用頂点座標生成手段74はステップ2においてこの頂点座標が含まれるピクセルを囲む周辺8ピクセルの選択を行う。次にステップ3において、同じく直線用頂点座標生成手段74は選択された8ピクセルから三角形内部にあり、頂点のピクセルと前記選択されたピクセルの中心との距離が一番短いピクセルを選択し、ステップ4においてステップ3で選択されたピクセルを図7の75,76,77の直線用第n頂点のデータ保持手段へコピーを行う。
FIG. 8 shows a flow for generating straight-line vertices from the three vertices designated by the triangle primitive. In the first step, the straight line vertex coordinate generation means 74 checks whether or not the center of the pixel in which each vertex coordinate is included is included within the triangle. As a result, if the center of each pixel including each vertex coordinate is inside the triangle, the vertex coordinate generating means 74 for straight line converts each vertex data to the nth vertex for
直線用頂点座標生成手段74において図8のフローに従って直線用の各頂点データを生成し、保持手段に保管後、この各頂点データを用いて直線描画手段78が直線描画を行う。このようにすることにより、直線の各頂点が図6に示すように三角形の内部にあるため、三角形プリミティブの内部に直線描画を行うことが可能になる。 In the straight line vertex coordinate generation means 74, each vertex data for straight lines is generated according to the flow of FIG. 8, stored in the holding means, and then the straight line drawing means 78 draws a straight line using each vertex data. By doing so, since each vertex of the straight line is inside the triangle as shown in FIG. 6, it is possible to draw a straight line inside the triangle primitive.
上記直線用頂点座標生成手段74の計算は図1のレンダリングコントローラ13の演算部において計算する以外に、図1のジオメトリエンジン12の演算部で処理することも可能である。
The calculation by the straight vertex coordinate generation means 74 can be performed by the calculation unit of the
また上記直線用頂点座標生成手段74の計算は図1のレンダリングコントローラ13の演算部において計算する以外に、図1のCPU11において計算することも可能である。
Further, the calculation of the straight vertex coordinate generation means 74 can be performed by the
実施の形態2.
図9にこの発明の実施の形態2における輪郭強調直線描画装置を示す。この実施の形態2は図7に示す実施の形態1の輪郭強調直線描画装置に奥行きオフセット手段を追加したものである。この奥行きオフセット手段98は直線用頂点座標生成手段74により生成された直線座標の奥行き成分であるZ値に対してオフセット処理を行う。一般に手前がゼロで奥に行くにしたがってZ値が増加する。このため奥行きオフセット手段98においてオフセット値分だけ手前にずらす。これによりポリゴンと直線のZ値生成方法の違いから発生するZ値のコンフリクトにより、ポリゴン上に直線が点線描画のようになり、きれいに描画されないような状態を回避することができ、ポリゴン上に確実に輪郭線を描画可能にする。
FIG. 9 shows an outline-enhanced straight line drawing apparatus according to Embodiment 2 of the present invention. In the second embodiment, depth offset means is added to the contour-enhanced straight line drawing apparatus of the first embodiment shown in FIG. The
実施の形態3.
実施の形態3は、実施の形態1における直線描画手段78に判定手段と補正手段を備えたものである。直線描画手段78においてピクセルが生成される毎にそのピクセルと三角形プリミティブとの関係を判定手段で調べて、もし生成されたピクセルの中心が三角形プリミティブの内部にない場合は隣接するピクセルで同一スキャンライン上かつその中心が三角形プリミティブの内部に存在するピクセルに補正手段で置換するものである。
In the third embodiment, the straight line drawing means 78 in the first embodiment is provided with a determination means and a correction means. Each time a pixel is generated by the straight line drawing means 78, the relation between the pixel and the triangle primitive is checked by the determining means. If the center of the generated pixel is not inside the triangle primitive, the same scan line is used for the adjacent pixels. The correction means replaces the pixel whose upper center is located inside the triangle primitive.
これは図10に示すように始点と終点を三角形プリミティブの内部のピクセルにしたにもかかわらず、三角形ラスタライズ方法と直線ラスタライズの方法の違いにより、直線の始点と終点以外のピクセルが三角形プリミティブ外に出てしまうことを避けるためのものである。即ち、図10に示すように三角形ラスタライズ方法により生成されるピクセルは、三角形プリミティブを形成する直線により、図10の同一スキャンライン上で最も左外側の黒塗りされたピクセルであり、直線ラスタライズの方法により生成されるピクセルは、直線描画手段78で描画がされる直線に基づく生成されるピクセルで、前記ピクセルより1個右側に位置する黒塗りされたピクセルである。この実施の形態では三角形ラスタライズ方法により生成されるピクセルは全て三角形プリミティブの内部に位置せず、直線ラスタライズの方法により生成されるピクセルは、三角形プリミティブの内部に位置するものと、位置しないものとがある。 This is because the pixels other than the start point and end point of the line are outside the triangle primitive due to the difference between the triangle rasterization method and the line rasterization method , even though the start point and end point are pixels inside the triangle primitive as shown in FIG. This is to avoid getting out. That is, as shown in FIG. 10, the pixels generated by the triangle rasterizing method are the pixels on the left outermost black side on the same scan line in FIG. 10 by the straight lines forming the triangle primitives. The pixel generated by the above is a pixel generated based on the straight line drawn by the straight line drawing means 78, and is a blackened pixel located one right of the pixel. In this embodiment, all the pixels generated by the triangle rasterization method are not located inside the triangle primitive, and pixels generated by the straight line rasterization method may or may not be located inside the triangle primitive. is there.
このための処理フローを図11に示す。直線描画手段78において生成されたピクセルをステップ1においてその中心が三角形プリミティブの内部であるかどうかを判定手段で判定する。その結果、三角形プリミティブの内部である場合はステップ3においてピクセルの描画を行う。三角形プリミティブの内部でないと判定された場合はステップ2において同一スキャンライン上で隣接するピクセルの中でその中心が三角形プリミティブ内部に入るピクセルを補正手段で選択し、ステップ3においてピクセルの描画を行う。
このようにすることで、始点と終点以外のピクセルも全て三角形プリミティブ内にすることができる。
A processing flow for this is shown in FIG. In
In this way, all pixels other than the start point and the end point can be included in the triangle primitive.
パソコンや携帯電話および携帯端末等に搭載される3Dグラフィックスシステムに適用され、被搭載機器の高機能化、多機能化が図れる。 It can be applied to 3D graphics systems mounted on personal computers, mobile phones, mobile terminals, etc., and the mounted devices can be enhanced in functionality and functionality.
11 CPU、12 ジオメトリエンジン、13 レンダリングコントローラ、14 フレームメモリ、15 デプスメモリ、71 三角形第1頂点データ保持手段、72 三角形第2頂点データ保持手段、73 三角形第3頂点データ保持手段、74 直線用頂点座標生成手段、75 直線第1頂点データ保持手段、76 直線第2頂点データ保持手段、77 直線第3頂点データ保持手段、78 直線描画手段、98 奥行きオフセット手段。 11 CPU, 12 Geometry engine, 13 Rendering controller, 14 Frame memory, 15 Depth memory, 71 Triangle first vertex data holding means, 72 Triangle second vertex data holding means, 73 Triangle third vertex data holding means, 74 Straight line vertex Coordinate generating means, 75 straight first vertex data holding means, 76 straight second vertex data holding means, 77 straight third vertex data holding means, 78 straight line drawing means, 98 depth offset means.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004292555A JP4515877B2 (en) | 2004-10-05 | 2004-10-05 | Outline enhancement drawing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004292555A JP4515877B2 (en) | 2004-10-05 | 2004-10-05 | Outline enhancement drawing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006107104A JP2006107104A (en) | 2006-04-20 |
JP4515877B2 true JP4515877B2 (en) | 2010-08-04 |
Family
ID=36376775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004292555A Expired - Fee Related JP4515877B2 (en) | 2004-10-05 | 2004-10-05 | Outline enhancement drawing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4515877B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488830B (en) * | 2016-01-19 | 2018-04-17 | 华侨大学 | A kind of two-dimensional silhouette region single-track filling generation method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09311954A (en) * | 1996-05-22 | 1997-12-02 | Hitachi Ltd | Three-dimensional graphic display system and method |
-
2004
- 2004-10-05 JP JP2004292555A patent/JP4515877B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09311954A (en) * | 1996-05-22 | 1997-12-02 | Hitachi Ltd | Three-dimensional graphic display system and method |
Also Published As
Publication number | Publication date |
---|---|
JP2006107104A (en) | 2006-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5232358B2 (en) | Rendering outline fonts | |
US10102663B2 (en) | Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location | |
KR102275712B1 (en) | Rendering method and apparatus, and electronic apparatus | |
US6259461B1 (en) | System and method for accelerating the rendering of graphics in a multi-pass rendering environment | |
EP3180773B1 (en) | Bandwidth reduction using texture lookup by adaptive shading | |
US9153068B2 (en) | Clipless time and lens bounds for improved sample test efficiency in image rendering | |
CN108230435B (en) | Graphics processing using cube map textures | |
JP4121717B2 (en) | Apparatus for performing H-space bump mapping suitable for implementation with H-space illumination in a graphics pipeline of a computer graphics display system | |
JP2002304636A (en) | Method and device for image generation, recording medium with recorded image processing program, and image processing program | |
GB2419504A (en) | Perspective editing tool | |
US6421063B1 (en) | Pixel zoom system and method for a computer graphics system | |
JP2019121381A (en) | Graphic processor and operation method thereof | |
JPS6380375A (en) | Texture mapping device | |
CN113826144A (en) | Facial texture map generation using a single color image and depth information | |
JP4370438B2 (en) | Vector image drawing apparatus, vector image drawing method and program | |
KR20020001518A (en) | A method and apparatus in a data processing system for full scene anti-aliasing | |
JP2006311080A (en) | Texture image generation method, image processor, program, and recording medium | |
JP2003091737A (en) | Plotting processor, recording medium with plotting processing program recorded thereon, plotting processing program and plotting processing method | |
JP4515877B2 (en) | Outline enhancement drawing device | |
KR20090059800A (en) | Asterization engine and three-dimension graphics system for rasterizing by order adapted characteristic of polygon | |
KR100848687B1 (en) | 3-dimension graphic processing apparatus and operating method thereof | |
JP3002972B2 (en) | 3D image processing device | |
JP4808167B2 (en) | Image processing method and 3D drawing circuit using the processing method | |
US20140354627A1 (en) | Rendering a 3d shape | |
JP2001283242A (en) | Image processor and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070910 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100304 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100511 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100513 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130521 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |