JP2010286906A - Graphics processor, graphics processing method, and program - Google Patents
Graphics processor, graphics processing method, and program Download PDFInfo
- Publication number
- JP2010286906A JP2010286906A JP2009138446A JP2009138446A JP2010286906A JP 2010286906 A JP2010286906 A JP 2010286906A JP 2009138446 A JP2009138446 A JP 2009138446A JP 2009138446 A JP2009138446 A JP 2009138446A JP 2010286906 A JP2010286906 A JP 2010286906A
- Authority
- JP
- Japan
- Prior art keywords
- graphics
- processing
- dimensional
- dimensional graphics
- arrangement information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、入力されたグラフィックス処理命令の処理を行うグラフィックス処理装置及びグラフィックス処理方法、並びに、当該グラフィックス処理方法をコンピュータに実行させるためのプログラムに関するものである。 The present invention relates to a graphics processing device and a graphics processing method for processing an input graphics processing instruction, and a program for causing a computer to execute the graphics processing method.
従来、2次元グラフィックスを3次元仮想空間内に配置して描画処理する方法として、テクスチャマッピングという手法を用いることが一般的であった。このテクスチャマッピングは、3次元仮想空間内の3次元オブジェクトの面にラスタ画像を貼り付けているかのようにレンダリング処理を行うもので、主に3次元オブジェクトの質感を表現するために用いられている。 Conventionally, it has been common to use a technique called texture mapping as a method of drawing processing by arranging two-dimensional graphics in a three-dimensional virtual space. This texture mapping performs rendering processing as if a raster image is pasted on the surface of the three-dimensional object in the three-dimensional virtual space, and is mainly used to express the texture of the three-dimensional object. .
近年では、テクスチャマッピング処理を専門に行うハードウェアを実装することによって、高速に3次元グラフィックス処理が行えるようになっている。また、一般的に、3次元オブジェクトのレンダリング処理では、Zバッファ法などによって隠面消去処理が行われ、3次元オブジェクトにおいて他のオブジェクトや面によって見えない部分を描画しないようにしている。さらに、従来、静止画テクスチャのみをサポートした描画装置を用いて、静止画と動画を区別なく扱うことができるようにするための方法が提案されている(例えば、下記の特許文献1参照)。 In recent years, by implementing hardware specializing in texture mapping processing, it has become possible to perform three-dimensional graphics processing at high speed. In general, in the rendering process of a three-dimensional object, a hidden surface removal process is performed by a Z-buffer method or the like so that a portion of the three-dimensional object that cannot be seen by other objects or faces is not drawn. Further, conventionally, there has been proposed a method for enabling a still image and a moving image to be handled without distinction using a drawing apparatus that supports only a still image texture (see, for example, Patent Document 1 below).
ここで、3次元仮想空間内に配置する2次元グラフィックスが、時間経過とともに内容が変化するアニメーションを含んでいる場合について説明する。この場合、従来の手法によれば、例えば2次元グラフィックス描画処理によって生成されるビットマップデータをテクスチャとして3次元オブジェクトの面に貼り付け、レンダリングする処理を繰り返し行う必要がある。 Here, a case where the two-dimensional graphics arranged in the three-dimensional virtual space includes an animation whose contents change with the passage of time will be described. In this case, according to the conventional method, for example, it is necessary to repeatedly perform processing of pasting and rendering bitmap data generated by two-dimensional graphics drawing processing as a texture on the surface of a three-dimensional object.
しかしながら、従来の手法の場合、2次元グラフィックス描画処理は、3次元オブジェクトの隠面処理によってレンダリングされない面に対してもテクスチャ画像を生成する必要があった。そのため、複雑な2次元グラフィックスを処理する場合や、複数の2次元グラフィックスを処理する場合、2次元グラフィックス描画処理の負荷が大きくなる。その結果、アニメーションが滑らかに動かず、いわゆるコマ落ちの現象が発生するという問題があった。 However, in the case of the conventional method, the two-dimensional graphics drawing processing needs to generate a texture image even on a surface that is not rendered by the hidden surface processing of the three-dimensional object. Therefore, when processing complex 2D graphics or when processing multiple 2D graphics, the load of 2D graphics rendering processing increases. As a result, there is a problem that the animation does not move smoothly and a so-called frame drop phenomenon occurs.
本発明は、このような問題点に鑑みてなされたものであり、3次元仮想空間内に2次元グラフィックスを配置して描画処理する際に、視認性を低下させることなく処理負荷の低減を実現できるようにすることを目的とする。 The present invention has been made in view of such a problem, and when processing a drawing by arranging two-dimensional graphics in a three-dimensional virtual space, the processing load can be reduced without reducing visibility. The purpose is to make it possible.
本発明のグラフィックス処理装置は、入力されたグラフィックス処理命令の処理を行うグラフィックス処理装置であって、前記グラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する2次元グラフィックス描画処理命令取得手段と、前記グラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する2次元グラフィックス配置情報取得手段と、前記グラフィックス処理命令から、投影条件に関する情報を取得する投影条件取得手段と、前記2次元グラフィックス配置情報および前記投影条件に関する情報に基づいて、前記2次元グラフィックスを配置する3次元仮想空間内の視点の位置に基づく視認効果を算出する視認効果算出手段と、前記視認効果に応じて前記2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う2次元グラフィックス描画処理実行手段とを有する。
また、本発明は、上述したグラフィックス処理装置によるグラフィックス処理方法、及び、当該グラフィックス処理方法をコンピュータに実行させるためのプログラムを含む。
A graphics processing apparatus according to the present invention is a graphics processing apparatus for processing an inputted graphics processing instruction, and obtains a two-dimensional graphics drawing processing instruction from the graphics processing instruction. A processing command acquisition means, a two-dimensional graphics arrangement information acquisition means for acquiring two-dimensional graphics arrangement information related to the arrangement of two-dimensional graphics from the graphics processing instruction, and a projection condition from the graphics processing instruction. Based on the projection condition acquisition means for acquiring information, the two-dimensional graphics arrangement information and the information on the projection condition, a visual effect based on the position of the viewpoint in the three-dimensional virtual space in which the two-dimensional graphics are arranged is calculated. Visual effect calculating means for performing the two-dimensional grouping according to the visual effect. Run the fix drawing commands, and a 2-dimensional graphics drawing processing execution means for executing processing for generating a raster image.
The present invention also includes a graphics processing method by the above-described graphics processing apparatus and a program for causing a computer to execute the graphics processing method.
本発明によれば、3次元仮想空間内に2次元グラフィックスを配置して描画処理する際に、視認性を低下させることなく処理負荷の低減を実現することができる。特に、2次元グラフィックスが、時間経過とともに変化する場合に、処理負荷の更なる低減を実現することが可能である。 According to the present invention, when a two-dimensional graphic is arranged in a three-dimensional virtual space and a drawing process is performed, a reduction in processing load can be realized without reducing visibility. In particular, when the two-dimensional graphics changes over time, it is possible to realize a further reduction in processing load.
以下に、図面を参照しながら、本発明を実施するための形態(実施形態)について説明する。 Hereinafter, embodiments (embodiments) for carrying out the present invention will be described with reference to the drawings.
(第1の実施形態)
まず、本発明の第1の実施形態について説明する。
(First embodiment)
First, a first embodiment of the present invention will be described.
図1は、本発明の第1の実施形態に係るグラフィックス処理装置のハードウェア構成の一例を示すブロック図である。 FIG. 1 is a block diagram showing an example of a hardware configuration of the graphics processing apparatus according to the first embodiment of the present invention.
図1のグラフィックス処理装置100は、CPU101、RAM102、ROM103、外部メモリ104、入力デバイス105、表示部106、通信インタフェース(通信I/F)107、及び、バス108のハードウェア構成を有して構成されている。
1 has a hardware configuration of a
CPU101は、例えば、ROM103或いは外部メモリ104に記憶されたプログラムやデータを用いて、グラフィックス処理装置100全体の制御を行う。
The
RAM102は、SDRAM、DRAMなどによって構成され、ROM103或いは外部メモリ104からロードされたプログラムやデータを一時的に記憶するエリアを備えるとともに、CPU101が各種の処理を行うために必要とするワークエリアを備える。
The
ROM103は、変更を必要としないプログラムや各種のパラメータ等の情報などを格納している。
The
外部メモリ104は、例えば、オペレーティングシステム(OS)やCPUが実行するプログラム、更には本実施形態の説明において既知としている情報などを記憶している。
The
入力デバイス105は、例えば、マウスやキーボード等を具備して構成されており、ユーザがグラフィックス処理装置100に対して各種の指示を行う際に操作され、当該指示をCPU101等に入力する。
The
表示部106は、例えば、モニタ等を具備して構成されており、CPU101の制御に基づいて、前記プログラムによって描画された表示画面(表示画像)をモニタに出力する。
The
通信I/F107は、グラフィックス処理装置100と外部装置との間で行われる各種の情報やデータの送受信を司るものである。
The communication I /
バス108は、CPU101、RAM102、ROM103、外部メモリ104、入力デバイス105、表示部106及び通信I/F107を相互に通信可能に接続する。
The bus 108 connects the
次に、グラフィックス処理装置100の機能構成について説明する。
図2は、本発明の第1の実施形態に係るグラフィックス処理装置の機能構成の一例を示すブロック図である。ここで、図2において、図1と同様の機能の構成については、同じ符号を付しており、また、図2に示すグラフィックス処理装置を「グラフィックス処理装置100−1」として説明を行う。
Next, a functional configuration of the
FIG. 2 is a block diagram showing an example of a functional configuration of the graphics processing apparatus according to the first embodiment of the present invention. In FIG. 2, the same functional components as those in FIG. 1 are denoted by the same reference numerals, and the graphics processing device shown in FIG. 2 is described as “graphics processing device 100-1”. .
図2のグラフィックス処理装置100−1は、グラフィックス処理命令受信部201、2次元グラフィックス描画処理命令取得部202、2次元グラフィックス配置情報取得部203、投影条件取得部204の機能構成を有して構成されている。さらに、図2のグラフィックス処理装置100−1は、視認効果算出部205、2次元グラフィックス描画処理実行部206、3次元グラフィックス描画部207、表示部(モニタ)106の機能構成を有して構成されている。
2 has a functional configuration of a graphics processing
図2のグラフィックス処理命令受信部201は、例えば、図1に示すCPU101及びROM103或いは外部メモリ104に記憶されたプログラム、並びに、入力デバイス105或いは通信I/F107から構成される。また、図2の202〜207は、例えば、図1に示すCPU101及びROM103或いは外部メモリ104に記憶されたプログラムから構成される。
The graphics processing
このグラフィックス処理装置100−1は、グラフィックス処理命令を入力とし、グラフィックス処理の結果を表示部106に出力するものである。ここで、二次元グラフィックス描画処理命令は、例えば、入力デバイス105或いは通信I/F107を介して入力された情報に基づきプログラムの実行によって呼び出されるものである。
The graphics processing apparatus 100-1 receives a graphics processing command and outputs the result of the graphics processing to the
グラフィックス処理命令受信部201は、グラフィックス処理装置100−1に入力された情報に基づきグラフィックス処理命令を受信する処理を行う。
The graphics processing
2次元グラフィックス描画処理命令取得部202は、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する処理を行う。2次元グラフィックス配置情報取得部203は、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する処理を行う。投影条件取得部204は、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、投影条件に関する情報を取得する処理を行う。
The two-dimensional graphics drawing processing
視認効果算出部205は、2次元グラフィックス配置情報取得部203で取得した2次元グラフィックス配置情報と、投影条件取得部204で取得した投影条件に関する情報に基づいて、視認効果を算出する処理を行う。具体的に、視認効果算出部205は、2次元グラフィックスを配置する3次元仮想空間内の視点の位置に基づく視認効果を算出する。
The visual
2次元グラフィックス描画処理実行部206は、視認効果算出部205で算出した視認効果に応じて、2次元グラフィックス描画処理命令取得部202で取得した2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う。
The two-dimensional graphics drawing
3次元グラフィックス描画部207は、2次元グラフィックス配置情報に基づいて2次元グラフィックス描画処理実行部206で生成したラスタ画像を3次元仮想空間内に配置し、投影条件に従って投影描画処理を行う。
The 3D
次に、グラフィックス処理装置100−1によるグラフィックス処理方法の処理手順について説明する。
図3は、本発明の第1の実施形態に係るグラフィックス処理装置によるグラフィックス処理方法の処理手順の一例を示すフローチャートである。
Next, a processing procedure of a graphics processing method by the graphics processing apparatus 100-1 will be described.
FIG. 3 is a flowchart showing an example of a processing procedure of the graphics processing method by the graphics processing apparatus according to the first embodiment of the present invention.
まず、ステップS301において、グラフィックス処理命令受信部201は、グラフィックス処理装置100−1に入力された情報に基づきグラフィックス処理命令を受信する処理を行う。
First, in step S301, the graphics processing
ここで、本実施形態のグラフィックス処理命令について説明する。
図4は、本発明の第1の実施形態を示し、図2のグラフィックス処理命令受信部201で受信するグラフィックス処理命令の一例を示す模式図である。
Here, the graphics processing instruction of this embodiment will be described.
FIG. 4 is a schematic diagram illustrating an example of a graphics processing command received by the graphics processing
図4(a)には、グラフィックス処理命令に含まれる、2次元グラフィックス描画処理命令410、2次元グラフィックス配置情報420、及び、投影条件430が示されている。また、図4(a)には、2次元グラフィックス描画処理命令410として円を描画するベクトルグラフィックスの描画命令である、第1のグラフィックス処理命令401、第2のグラフィックス処理命令402、第3のグラフィックス処理命令403が示されている。
FIG. 4A shows a two-dimensional graphics rendering processing instruction 410, two-dimensional
図4(b)は、図4(a)の2次元グラフィックス描画処理命令410における円描画処理命令について示したものである。ここで、円描画処理命令は、図4(b)に示すように、幅6、高さ6の白色の背景ビットマップ画像に対して、背景ビットマップ画像の中心に半径3の円を描画する処理である。 FIG. 4B shows a circle drawing processing command in the two-dimensional graphics drawing processing command 410 of FIG. Here, the circle drawing processing command draws a circle having a radius of 3 at the center of the background bitmap image with respect to the white background bitmap image having a width of 6 and a height of 6, as shown in FIG. It is processing.
また、図4(a)の2次元グラフィックス配置情報420としては、配置する3次元仮想空間内の平面の法線ベクトル、座標の範囲、平面が通る点を指定している。また、図4(a)の投影条件430としては、視点の条件や、投影面の条件及びその投影方法が定義されている。ここで、法線ベクトルの向きは、平面の表を示すものとする。
In addition, as the two-dimensional
図5は、本発明の第1の実施形態を示し、図4(a)の投影条件430に示されている平行投影法の概念を説明するための模式図である。具体的に、図5は、図4に示したグラフィックス処理命令の例をもとにして、本実施形態における座標系と視点の位置、投影面の位置、及び、平行投影法の概念が示されている。平行投影法によるXY平面への投影では、視点の位置までの遠近に関係なく、任意の点(p,q,r)は、XY平面上の点(p,q,0)に投影される。
FIG. 5 is a schematic diagram for explaining the concept of the parallel projection method shown in the
ここで、再び、図3の説明に戻る。
ステップS301の処理が終了すると、続いて、ステップS302において、2次元グラフィックス描画処理命令取得部202は、ステップS301で受信したグラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する処理を行う。
Here, it returns to description of FIG. 3 again.
When the process of step S301 ends, in step S302, the two-dimensional graphics drawing processing
続いて、ステップS303において、2次元グラフィックス配置情報取得部203は、ステップS301で受信したグラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する処理を行う。
Subsequently, in step S303, the two-dimensional graphics arrangement
続いて、ステップS304において、投影条件取得部204は、ステップS301で受信したグラフィックス処理命令から、投影条件に関する情報を取得する処理を行う。
Subsequently, in step S304, the projection
続いて、ステップS305において、視認効果算出部205は、ステップS303で取得された2次元グラフィックス配置情報とステップS304で取得された投影条件に関する情報に基づいて、視認効果として、可視か不可視かを判定するための算出処理を行う。
Subsequently, in step S305, the visual
ここで、視認効果算出部205による視認効果の算出について更に詳しく説明する。
可視か不可視かの分類は、視点の位置から平面の表が見えているかどうかによって分類できる。即ち、2次元グラフィックスを配置する3次元仮想空間内の平面の法線ベクトルとZ軸の正方向の単位ベクトル(0,0,1)との内積を計算し、内積が負であれば可視、0または正であれば不可視と判定する。
Here, the calculation of the visual effect by the visual
Visible or invisible can be classified according to whether a plane table is visible from the viewpoint position. That is, the inner product of the normal vector of the plane in the three-dimensional virtual space where the two-dimensional graphics are arranged and the unit vector (0, 0, 1) in the positive direction of the Z axis is calculated, and visible if the inner product is negative. If it is 0 or positive, it is determined as invisible.
図6は、本発明の第1の実施形態を示し、図2の視認効果算出部205による視認効果の算出を説明するための模式図である。具体的に、図6(a)〜図6(c)は、図4で示したグラフィック処理命令の2次元グラフィックス配置情報420と、投影条件430における投影面及び視点の位置関係について、Y軸の正方向から見た図である。この際、投影面は、いずれの場合もXY平面となっているので、X軸の軸上に重なっている。また、2次元グラフィックス配置情報420で示されている平面は、いずれもY軸に平行な平面であるので、Y軸方向から見た場合には、図6に示すように線分となる。
FIG. 6 is a schematic diagram for explaining the calculation of the visual effect by the visual
図6(a)は、図4の第1のグラフィックス処理命令401に関して図示したものである。第1のグラフィックス処理命令401の法線ベクトルの情報は、図4に示すように、(0,0,−1)である。この場合、視認効果算出部205は、取得した法線ベクトル(0,0,−1)と、Z軸の正方向の単位ベクトル(0,0,1)との内積を計算する。この場合、計算結果は−1となり負なので、可視と判定される。
FIG. 6A illustrates the first graphics processing instruction 401 in FIG. The normal vector information of the first graphics processing instruction 401 is (0, 0, −1) as shown in FIG. In this case, the visual recognition
図6(b)は、図4の第2のグラフィックス処理命令402に関して図示したものである。第2のグラフィックス処理命令402の法線ベクトルの情報は、図4に示すように、(−1,0,1)である。この場合、視認効果算出部205は、取得した法線ベクトル(−1,0,1)と、Z軸の正方向の単位ベクトル(0,0,1)との内積を計算する。この場合、計算結果は1となり正なので、不可視と判定される。
FIG. 6B illustrates the second graphics processing instruction 402 in FIG. The normal vector information of the second graphics processing instruction 402 is (−1, 0, 1) as shown in FIG. 4. In this case, the visual recognition
図6(c)は、図4の第3のグラフィックス処理命令403に関して図示したものである。第3のグラフィックス処理命令403の法線ベクトルの情報は、図4に示すように、(−0.866,0,−0.5)である。この場合、視認効果算出部205は、取得した法線ベクトル(−0.866,0,−0.5)と、Z軸の正方向の単位ベクトル(0,0,1)との内積を計算する。この場合、計算結果は−0.5となり負なので、可視と判定される。
FIG. 6C illustrates the third graphics processing instruction 403 in FIG. The normal vector information of the third graphics processing instruction 403 is (−0.866, 0, −0.5) as shown in FIG. In this case, the visual recognition
ここで、再び、図3の説明に戻る。
ステップS305の処理が終了すると、ステップS306に進む。
ステップS306に進むと、まず、2次元グラフィックス描画処理実行部206は、ステップS305における可視か不可視かの判定結果に応じて、ステップS302で取得された2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う。次いで、3次元グラフィックス描画部207は、2次元グラフィックス配置情報に基づいて2次元グラフィックス描画処理実行部206で生成したラスタ画像を3次元仮想空間内に配置し、投影条件に従って投影した描画処理を行う。
Here, it returns to description of FIG. 3 again.
When the process of step S305 ends, the process proceeds to step S306.
In step S306, first, the two-dimensional graphics drawing
続いて、ステップS307において、グラフィックス処理装置100−1(例えばグラフィックス処理命令受信部201)は、処理対象のグラフィックス処理命令の処理が終了したか否かを判断する。 Subsequently, in step S307, the graphics processing device 100-1 (for example, the graphics processing command receiving unit 201) determines whether or not the processing of the graphics processing command to be processed has ended.
ステップS307の判断の結果、処理対象のグラフィックス処理命令の処理が終了していない(未処理のグラフィックス処理命令が存在する)場合には、ステップS301に戻って、未処理のグラフィックス処理命令に対する処理を行う。 If the result of the determination in step S307 is that processing of the processing target graphics processing instruction has not ended (there is an unprocessed graphics processing instruction), the process returns to step S301, and the unprocessed graphics processing instruction Perform processing for.
一方、ステップS307の判断の結果、処理対象のグラフィックス処理命令の処理が終了した場合には、図3のフローチャートの処理を終了する。 On the other hand, as a result of the determination in step S307, when the processing of the graphics processing instruction to be processed is completed, the processing of the flowchart in FIG.
次に、図3のステップS306の処理の詳細について説明する。
図7は、本発明の第1の実施形態を示し、図3のステップS306における描画処理の詳細な処理の一例を示すフローチャートである。
Next, details of the processing in step S306 in FIG. 3 will be described.
FIG. 7 is a flowchart illustrating an example of detailed processing of the drawing processing in step S306 of FIG. 3 according to the first embodiment of this invention.
まず、ステップS701において、2次元グラフィックス描画処理実行部206は、ステップS305の視認効果の算出処理の結果が可視であるか否かを判断する。そして、ステップS701の判断の結果、可視でない(不可視である)場合には、図7のフローチャートにおける処理を終了する。
First, in step S701, the two-dimensional graphics drawing
一方、ステップS701で可視と判断された場合には、ステップS702に進む。
ステップS702に進むと、2次元グラフィックス描画処理実行部206は、ステップS302で取得した2次元グラフィックス描画処理命令を実行して、ラスタ画像(ビットマップ画像)を生成する処理を行う。
On the other hand, if it is determined in step S701 that it is visible, the process proceeds to step S702.
In step S702, the two-dimensional graphics drawing
続いて、ステップS703において、3次元グラフィックス描画部207は、ステップS702で生成したラスタ画像(ビットマップ画像)を3次元仮想空間に配置し、投影描画処理を行う。その後、図7のフローチャートにおける処理を終了する。
Subsequently, in step S703, the three-dimensional
図8は、図3のステップS306における描画処理の処理結果の一例を示す模式図である。 FIG. 8 is a schematic diagram showing an example of the processing result of the drawing process in step S306 of FIG.
ここで、図4(a)の第1のグラフィックス処理命令401に関しては、円描画処理を行うことにより、図4(b)に示すようなビットマップ画像が生成される。この場合、生成されたビットマップ画像は、図6(a)に示す位置に配置される。そして、これを投影面、即ちXY平面に投影した結果は、図8(a)に示すようになる。 Here, regarding the first graphics processing instruction 401 in FIG. 4A, a bitmap image as shown in FIG. 4B is generated by performing a circle drawing process. In this case, the generated bitmap image is arranged at the position shown in FIG. The result of projecting this onto the projection plane, ie, the XY plane, is as shown in FIG.
また、図4(a)の第2のグラフィックス処理命令402に関しては、円描画処理がなされず、投影、描画処理も行われないので、図8(b)に示すように出力がされない。 Further, the second graphics processing instruction 402 in FIG. 4A is not output as shown in FIG. 8B because the circle drawing process is not performed and the projection and drawing processes are not performed.
また、図4(a)の第3のグラフィックス処理命令403に関しては、第1のグラフィックス処理命令401と同様に、円描画処理を行うことにより、図4(b)に示すようなビットマップ画像が生成される。この場合、生成されたビットマップ画像は、図6(c)に示す位置に配置される。そして、これを投影面、即ちXY平面に投影した結果は、図8(c)に示すようになる。 In addition, with respect to the third graphics processing instruction 403 in FIG. 4A, a bitmap as shown in FIG. 4B is obtained by performing a circle drawing process in the same manner as the first graphics processing instruction 401. An image is generated. In this case, the generated bitmap image is arranged at the position shown in FIG. The result of projecting this onto the projection plane, that is, the XY plane, is as shown in FIG.
以上の処理によって、2次元グラフィックスを3次元仮想空間に配置して、投影し、描画された結果の出力が終了する。なお、本実施形態では、投影条件として、平行投影法のみ説明したが、これに限定されるものではなく、例えば、透視投影法を用いてもよい。 Through the above processing, the two-dimensional graphics are arranged and projected in the three-dimensional virtual space, and the output of the rendered result is completed. In the present embodiment, only the parallel projection method has been described as the projection condition. However, the present invention is not limited to this, and for example, a perspective projection method may be used.
(第2の実施形態)
次に、本発明の第2の実施形態について説明する。
第2の実施形態に係るグラフィックス処理装置のハードウェア構成は、図1に示す第1の実施形態に係るグラフィックス処理装置のハードウェア構成と同様であるため、その詳細な説明は省略する。また、第2の実施形態に係るグラフィックス処理装置の機能構成は、図2に示す第1の実施形態に係るグラフィックス処理装置の機能構成と同様であるため、その詳細な説明は省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described.
The hardware configuration of the graphics processing apparatus according to the second embodiment is the same as the hardware configuration of the graphics processing apparatus according to the first embodiment shown in FIG. The functional configuration of the graphics processing apparatus according to the second embodiment is the same as the functional configuration of the graphics processing apparatus according to the first embodiment shown in FIG.
第1の実施形態では、図2の視認効果算出部205による視認効果の算出において、可視、不可視の2種類に分類する例を説明した。第2の実施形態では、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θを視認効果として算出する方法について説明する。具体的に、第2の実施形態は、図2に示す視認効果算出部205、並びに、当該視認効果算出部205の処理内容の変更に基づく2次元グラフィックス描画処理実行部206の処理の内容が第1の実施形態と異なる。
In the first embodiment, the example in which the visual effect is calculated by the visual
平行投影法において、視線ベクトルは、視点の位置から投影面に向かう、投影面に対して垂直なベクトルである。一般的に3次元仮想空間内の平面は、視線ベクトルに対して平行に近ければ近いほど見えにくく、垂直に近い面の方が見やすい。 In the parallel projection method, the line-of-sight vector is a vector perpendicular to the projection plane from the viewpoint position toward the projection plane. In general, the plane in the three-dimensional virtual space is less visible as it is closer to the line-of-sight vector, and the plane near the vertical is easier to see.
図9は、本発明の第2の実施形態を示し、視認効果を説明するための模式図である。具体的に、図9には、立方体の各面に同じグラフィックスを貼り付けて描画した場合について示している。立方体面901は、立方体面902や立方体面903に比べて、視線ベクトルに対して垂直に近いので、見えやすくなっている。 FIG. 9 shows a second embodiment of the present invention and is a schematic diagram for explaining the visual recognition effect. Specifically, FIG. 9 shows a case where the same graphics is pasted and drawn on each surface of the cube. The cube surface 901 is easier to see because it is nearer to the line-of-sight vector than the cube surface 902 and the cube surface 903.
本発明の第2の実施形態に係るグラフィックス処理装置によるグラフィックス処理方法の処理手順の一例について、上述した図3のフローチャートを用いて説明する。 An example of the processing procedure of the graphics processing method by the graphics processing apparatus according to the second embodiment of the present invention will be described with reference to the flowchart of FIG.
まず、第2の実施形態では、第1の実施形態におけるステップS301〜S304の処理を経る。このステップS301〜S304の処理は、第1の実施形態と同様であるため、その説明は省略する。また、入力されるグラフィックス処理命令、及び、これに関連する説明に関しても、第1の実施形態において説明に用いた図4〜図6を適用することができる。 First, in the second embodiment, the processes in steps S301 to S304 in the first embodiment are performed. Since the processing in steps S301 to S304 is the same as that in the first embodiment, the description thereof is omitted. 4 to 6 used in the description of the first embodiment can also be applied to the input graphics processing command and the description related thereto.
ステップS304の処理が終了すると、ステップS305に進む。
ステップS305に進むと、視認効果算出部205は、ステップS303で取得した2次元グラフィックス配置情報とステップS304で取得した投影条件に関する情報に基づいて、視認効果を算出する処理を行う。ここで、第2の実施形態におけるステップS305の視認効果の算出方法について説明する。
When the process of step S304 ends, the process proceeds to step S305.
In step S305, the visual recognition
第2の実施形態では、視認効果算出部205は、まず、ステップS304で取得された投影条件から、視線ベクトルを取得する処理を行う。例えば、図4(a)に示す投影条件では、視線ベクトルは、単位ベクトルに正規化して、(0,0,1)と求めることができる。
In the second embodiment, the visual recognition
次に、視認効果算出部205は、ステップS303で取得された2次元グラフィックス配置情報から、平面の法線ベクトルを取得する処理を行う。次に、視認効果算出部205は、2次元グラフィックスを配置する3次元仮想空間内の平面の法線ベクトルと視線ベクトル(0,0,1)との内積を計算する。次に、視認効果算出部205は、求めた内積を、視線ベクトルの長さと平面の法線ベクトルの長さとの積で割る。ここで、求められた値は、視線ベクトルと平面の法線ベクトルとのなす角の余弦値である。そして、視認効果算出部205は、角度を求めるために、更にこの値の逆余弦値を計算する。この計算の結果は、角度0〜180°の範囲となる。
Next, the visual recognition
ここで、図4(a)で示したグラフィックス処理命令401〜403について、視認効果として、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θの算出結果について説明する。 Here, with respect to the graphics processing instructions 401 to 403 shown in FIG. 4A, the calculation result of the angle θ formed by the normal vector and the line-of-sight vector of the surface on which the two-dimensional graphics are arranged will be described as a visual effect. .
具体的に、第1のグラフィックス処理命令401については、視認効果として、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θ=180°が算出される。第2のグラフィックス処理命令402については、視認効果として、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θ=45°が算出される。第3のグラフィックス処理命令403については、視認効果として、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θ=120°が算出される。 Specifically, for the first graphics processing instruction 401, an angle θ = 180 ° formed by the normal vector and the line-of-sight vector of the surface on which the two-dimensional graphics are arranged is calculated as a visual effect. For the second graphics processing instruction 402, an angle θ = 45 ° formed by the normal vector and the line-of-sight vector of the surface on which the two-dimensional graphics are arranged is calculated as a visual effect. For the third graphics processing instruction 403, an angle θ = 120 ° between the normal vector and the line-of-sight vector of the surface on which the two-dimensional graphics is arranged is calculated as a visual recognition effect.
ここで、再び、図3の説明に戻る。
ステップS305の処理が終了すると、ステップS306に進む。
ステップS306に進むと、まず、2次元グラフィックス描画処理実行部206は、ステップS305における視認効果の算出結果に応じて、ステップS302で取得された2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う。具体的に、本例では、2次元グラフィックスを配置する面の法線ベクトルと視線ベクトルとのなす角度θに応じて、ステップS302で取得された2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う。次いで、3次元グラフィックス描画部207は、2次元グラフィックス配置情報に基づいて2次元グラフィックス描画処理実行部206で生成したラスタ画像を3次元仮想空間内に配置し、投影条件に従って投影描画処理を行う。
Here, it returns to description of FIG. 3 again.
When the process of step S305 ends, the process proceeds to step S306.
In step S306, first, the two-dimensional graphics drawing
続いて、ステップS307において、グラフィックス処理装置100−1(例えばグラフィックス処理命令受信部201)は、処理対象のグラフィックス処理命令の処理が終了したか否かを判断する。 Subsequently, in step S307, the graphics processing device 100-1 (for example, the graphics processing command receiving unit 201) determines whether or not the processing of the graphics processing command to be processed has ended.
ステップS307の判断の結果、処理対象のグラフィックス処理命令の処理が終了していない(未処理のグラフィックス処理命令が存在する)場合には、ステップS301に戻って、未処理のグラフィックス処理命令に対する処理を行う。 If the result of the determination in step S307 is that processing of the processing target graphics processing instruction has not ended (there is an unprocessed graphics processing instruction), the process returns to step S301, and the unprocessed graphics processing instruction Perform processing for.
一方、ステップS307の判断の結果、処理対象のグラフィックス処理命令の処理が終了した場合には、図3のフローチャートの処理を終了する。 On the other hand, as a result of the determination in step S307, when the processing of the graphics processing instruction to be processed is completed, the processing of the flowchart in FIG.
次に、図3のステップS306の処理の詳細について説明する。
図10は、本発明の第2の実施形態を示し、図3のステップS306における描画処理の詳細な処理の一例を示すフローチャートである。
Next, details of the processing in step S306 in FIG. 3 will be described.
FIG. 10 is a flowchart illustrating an example of detailed processing of the drawing processing in step S306 of FIG. 3 according to the second embodiment of this invention.
まず、ステップS1001において、2次元グラフィックス描画処理実行部206は、ステップS305の視認効果の算出処理の結果である角度θが、90°≧θ≧0°を満たすか否かを判断する。そして、ステップS1001の判断の結果、角度θが90°≧θ≧0°を満たす場合には、2次元グラフィックスを配置する面が不可視であると判定し、図10のフローチャートにおける処理を終了する。この場合、例えば、図4(a)に示す第2のグラフィックス処理命令402は、角度θ=45°であるため、不可視であると判定される。
First, in step S1001, the two-dimensional graphics drawing
一方、ステップS1001で角度θが90°≧θ≧0°を満さない(即ち、角度θが180°≧θ>90°である)と判断された場合には、2次元グラフィックスを配置する面が可視であると判定し、ステップS1002に進む。
ステップS1002に進むと、2次元グラフィックス描画処理実行部206は、ステップS305の視認効果の算出処理の結果である角度θが、予め設定されている角度の閾値φよりも大きいか否かを判断する。ここで、閾値φは、例えばROM103或いは外部メモリ104に予め格納されている180°≧φ>90°を満たす角度の閾値であり、視認性が良好であるか困難であるかを判別するための閾値である。
On the other hand, if it is determined in step S1001 that the angle θ does not satisfy 90 ° ≧ θ ≧ 0 ° (that is, the angle θ is 180 ° ≧ θ> 90 °), two-dimensional graphics are arranged. It is determined that the surface is visible, and the process proceeds to step S1002.
In step S1002, the two-dimensional graphics drawing
本例では、閾値φとして角度135°を適用し、θ>135°のとき、その面は視認性が良好であり、また、θ≦135°のとき、その面は視認が困難であると判定する。この場合、例えば、図4(a)の第1のグラフィックス処理命令401は、角度θ=180°であるため、視認性が良好と判定され、一方、第3のグラフィックス処理命令403は、角度θ=120°であるため、視認困難と判定される。 In this example, an angle of 135 ° is applied as the threshold φ, and when θ> 135 °, the surface has good visibility, and when θ ≦ 135 °, the surface is determined to be difficult to visually recognize. To do. In this case, for example, the first graphics processing instruction 401 in FIG. 4A is determined to have good visibility because the angle θ = 180 °, while the third graphics processing instruction 403 is Since the angle θ is 120 °, it is determined that the viewing is difficult.
ステップS1002の判断の結果、角度θが閾値φ(本例では135°)よりも大きい場合には、ステップS1003に進む。
ステップS1003に進むと、例えば2次元グラフィックス描画処理実行部206は、2次元グラフィックス描画処理モードを画質優先モードに設定する。
If the result of determination in step S1002 is that the angle θ is larger than the threshold value φ (135 ° in this example), the process proceeds to step S1003.
In step S1003, for example, the two-dimensional graphics drawing
一方、ステップS1002の判断の結果、角度θが閾値φよりも大きくない(即ち角度θが閾値φ以下である)場合には、ステップS1004に進む。
ステップS1004に進むと、例えば2次元グラフィックス描画処理実行部206は、2次元グラフィックス描画処理モードを速度優先モードに設定する。
On the other hand, if the result of determination in step S1002 is that the angle θ is not larger than the threshold value φ (that is, the angle θ is equal to or smaller than the threshold value φ), the process proceeds to step S1004.
In step S1004, for example, the two-dimensional graphics drawing
ステップS1003又はS1004の処理が終了すると、ステップS1005に進む。
ステップS1005に進むと、2次元グラフィックス描画処理実行部206は、設定した2次元グラフィックス描画処理モードに応じてステップS302で取得した2次元グラフィックス描画処理命令を実行する。そして、2次元グラフィックス描画処理実行部206は、ラスタ画像(ビットマップ画像)を生成する処理を行う。
When the process of step S1003 or S1004 ends, the process proceeds to step S1005.
In step S1005, the two-dimensional graphics drawing
続いて、ステップS1006において、3次元グラフィックス描画部207は、ステップS1005で生成したラスタ画像(ビットマップ画像)を3次元仮想空間に配置し、投影描画処理を行う。その後、図10のフローチャートにおける処理を終了する。
Subsequently, in step S1006, the three-dimensional
ここで、ステップS1003で設定される画質優先モード、及び、ステップS1004で設定される速度優先モードについて説明する。
2次元グラフィックス描画処理では、画質優先モードを設定した場合には、速度優先モードを設定した場合よりもグラフィックスの画質を高品位に描画する一方で、速度優先モードを設定した場合よりもグラフィックスの処理速度が遅くなる。また、速度優先モードを設定した場合には、逆に、画質優先モードを設定した場合よりもグラフィックスの処理速度が速いが、その画質は画質優先モードを設定した場合よりも劣るものとなる。
Here, the image quality priority mode set in step S1003 and the speed priority mode set in step S1004 will be described.
In the two-dimensional graphics rendering process, when the image quality priority mode is set, the graphics image quality is drawn higher than when the speed priority mode is set, while the graphics quality is higher than when the speed priority mode is set. This slows down the processing speed. On the contrary, when the speed priority mode is set, the graphics processing speed is faster than when the image quality priority mode is set, but the image quality is inferior to that when the image quality priority mode is set.
ここでは、一例としてアンチエイリアス処理について、図4に示した円描画処理命令を処理する場合について説明する。 Here, as an example, the case of processing the circle drawing processing command shown in FIG.
通常のグラフィックス処理では、ピクセルよりも細かい単位で描画処理を行うことができないため、輪郭に、いわゆるジャギーが発生する。そのため、描画する図形の輪郭が背景の色と融合するように、境界のピクセルの色を、背景の色との混色の計算を行って決定し、色の勾配を滑らかにする。この処理がアンチエイリアス処理である。 In normal graphics processing, drawing processing cannot be performed in units smaller than pixels, and so-called jaggy occurs in the contour. Therefore, the color of the boundary pixel is determined by calculating a color mixture with the background color so that the contour of the figure to be drawn merges with the background color, thereby smoothing the color gradient. This process is an anti-aliasing process.
このアンチエイリアス処理について、図4の円描画処理命令を例に説明する。
図11は、アンチエイリアス処理の概念について説明した模式図である。
具体的に、図11(a)は、白色のビットマップ画像に対して円描画処理命令をアンチエイリアス処理なしで描画処理した際のピクセルの状態の一部を示した図である。この場合、アンチエイリアス処理が行われないため、図形内のピクセルはもちろんのこと、輪郭のピクセルはすべて黒色に変更される。
This anti-aliasing process will be described by taking the circle drawing process command of FIG. 4 as an example.
FIG. 11 is a schematic diagram illustrating the concept of anti-aliasing.
Specifically, FIG. 11A is a diagram illustrating a part of a pixel state when a circle rendering process command is rendered without anti-aliasing for a white bitmap image. In this case, since anti-aliasing processing is not performed, not only the pixels in the graphic but also the contour pixels are all changed to black.
一方、図11(b)は、白色のビットマップ画像に対して円描画処理命令をアンチエイリアス処理ありで描画処理した際のピクセルの状態の一部を示した図である。この場合、図形内のピクセルは黒色に変更されているが、図形の輪郭上のピクセルは黒色、濃灰色、薄灰色に変更されている。ここで、濃灰色及び薄灰色のピクセルは、背景の白色と図形の黒色の中間色として計算される色である。図11(b)で示した例では、4階調のアンチエイリアス処理となっているが、3階調以上の階調数であれば、いずれであってもよい。 On the other hand, FIG. 11B is a diagram showing a part of a pixel state when a circle drawing processing command is drawn with anti-aliasing processing on a white bitmap image. In this case, the pixels in the figure are changed to black, but the pixels on the outline of the figure are changed to black, dark gray, and light gray. Here, the dark gray and light gray pixels are colors calculated as an intermediate color between the white of the background and the black of the figure. In the example shown in FIG. 11B, anti-aliasing processing with 4 gradations is performed, but any number of gradations may be used as long as the number of gradations is 3 gradations or more.
アンチエイリアス処理では、図形の色と背景ビットマップ画像の色との中間色を計算しなければならない。そして、アンチエイリアス処理を行う場合には、同じ図形を描画する際にアンチエイリアス処理を行わない場合と比べて、処理速度が遅くなる。一方で、アンチエイリアス処理を行う場合には、アンチエイリアス処理を行わない場合に発生するジャギーが目立たなくなるので、より画質が高くなる。ここで、適用できる2次元グラフィックス描画処理命令として、曲線、線分を組み合わせた任意の図形を描画する図形描画処理命令の他に、アウトラインフォントの描画処理命令がある。 In anti-aliasing, an intermediate color between the color of the figure and the color of the background bitmap image must be calculated. When antialiasing processing is performed, the processing speed is slower than when antialiasing processing is not performed when the same graphic is drawn. On the other hand, when the anti-aliasing process is performed, the jaggy that occurs when the anti-aliasing process is not performed becomes inconspicuous, and the image quality becomes higher. Here, as a two-dimensional graphics drawing processing command that can be applied, there is a drawing processing command for an outline font in addition to a graphics drawing processing command for drawing an arbitrary graphic combining curves and line segments.
そこで、本例では、速度優先モードとして、アンチエイリアス処理なしで図形を描画するアンチエイリアス無効モードとし、画質優先モードとして、アンチエイリアス処理を施しながら図形を描画するアンチエイリアス有効モードを適用する。 Therefore, in this example, an anti-aliasing invalid mode for drawing a figure without anti-aliasing processing is used as the speed priority mode, and an anti-aliasing effective mode for drawing a figure while performing anti-aliasing processing is applied as the image quality priority mode.
図4(a)の第1のグラフィックス処理命令401の場合には、ステップS1003においてアンチエイリアス処理有効モードに設定され、ステップS1005においてアンチエイリアス処理有効モードに基づく2次元グラフィックス描画処理が行われる。また、図4(a)の第3のグラフィックス処理命令403の場合には、ステップS1004においてアンチエイリアス処理無効モードに設定され、ステップS1005においてアンチエイリアス処理無効モードに基づく2次元グラフィックス描画処理が行われる。 In the case of the first graphics processing instruction 401 in FIG. 4A, the anti-aliasing processing valid mode is set in step S1003, and the two-dimensional graphics rendering processing based on the anti-aliasing processing valid mode is performed in step S1005. In the case of the third graphics processing instruction 403 in FIG. 4A, the anti-aliasing processing invalid mode is set in step S1004, and the two-dimensional graphics rendering processing based on the anti-aliasing processing invalid mode is performed in step S1005. .
そして、その後、ステップS1006において、当該2次元グラフィックスを3次元仮想空間に配置して、投影し、描画された結果が表示部(モニタ)106に出力され、処理が終了する。 Thereafter, in step S1006, the two-dimensional graphics are arranged and projected in the three-dimensional virtual space, and the drawn result is output to the display unit (monitor) 106, and the process ends.
なお、本実施形態では、2次元グラフィックス描画処理命令がベクターグラフィックスに係るものであり、画質優先モード及び速度優先モードを、アンチエイリアス処理の有効及び無効で切り替える例について説明したが、この態様に限定されるものではない。本実施形態では、他の2次元グラフィックス描画処理を切り替えるものであっても構わない。 In the present embodiment, the two-dimensional graphics rendering processing command relates to vector graphics, and the example in which the image quality priority mode and the speed priority mode are switched between the anti-aliasing processing enabled and disabled has been described. It is not limited. In the present embodiment, other two-dimensional graphics drawing processing may be switched.
ここで、グラフィックス処理命令に含まれる2次元グラフィックス描画処理命令が、拡大、縮小、回転、剪断変形などの2次元アフィン変換処理を施してラスタ画像を描画するラスタグラフィックスに係るものであった場合について説明する。 Here, the two-dimensional graphics drawing processing command included in the graphics processing command relates to raster graphics that draws a raster image by performing two-dimensional affine transformation processing such as enlargement, reduction, rotation, and shear deformation. The case will be described.
ラスタ画像を生成する際に、2次元アフィン変換処理を施し、リサンプリングの計算をする手法として、ニアレストネイバー法とバイリニア法がよく使用される。ここで、ニアレストネイバー法は、2次元アフィン変換写像の写像先のピクセルから写像元の座標を計算し、最も近いピクセルの値を使用する方法である。また、バイリニア法は、2次元アフィン変換写像の写像先であるピクセルの色を決定する際に、ピクセルから写像元の座標を計算し、求まった座標に近隣の4ピクセルの値を補間する方法である。 When generating a raster image, a nearest neighbor method and a bilinear method are often used as a method of performing resampling calculation by performing a two-dimensional affine transformation process. Here, the nearest neighbor method is a method in which the coordinates of the mapping source are calculated from the mapping destination pixels of the two-dimensional affine transformation map, and the value of the nearest pixel is used. In the bilinear method, when determining the color of a pixel that is a mapping destination of a two-dimensional affine transformation map, the coordinates of the mapping source are calculated from the pixels, and the values of neighboring four pixels are interpolated to the obtained coordinates. is there.
そして、ニアレストネイバー法は、バイリニア法に比べて、色を決定する計算が単純であるため、処理が高速であるが、ほとんどの場合において画質の面で劣る。よって、本実施形態のグラフィックス処理装置では、画質優先モードとしてバイリニア法を使用した処理を行い、速度優先モードとしてニアレストネイバー法を使用した処理を行うようにしてもよい。 The nearest neighbor method is simpler in calculation to determine the color than the bilinear method, and thus the processing is faster, but in most cases it is inferior in image quality. Therefore, the graphics processing apparatus according to the present embodiment may perform processing using the bilinear method as the image quality priority mode and perform processing using the nearest neighbor method as the speed priority mode.
また、2次元グラフィックス描画処理命令に色のグラデーションの指定がある場合、グラデーションの中間色の計算を、画質優先モードでは詳細に、速度優先モードでは粗雑に行なうよう構成してもよい。具体的には、画質優先モードでは、True Colorで処理を行い、速度優先モードでは、High Colorで処理を行うように構成してもよい。 Further, when the color gradation is specified in the two-dimensional graphics rendering processing command, the gradation intermediate color may be calculated in detail in the image quality priority mode and coarsely in the speed priority mode. Specifically, processing may be performed using True Color in the image quality priority mode, and processing may be performed using High Color in the speed priority mode.
また、本実施形態では、視認効果として、2次元グラフィックスを配置する平面の法線ベクトルと視線ベクトルとのなす角を算出する構成の例を示したが、他の視認効果の算出方法を用いてもよい。例えば、処理対象とする2次元グラフィックスの、投影面における占める面積を計算し、ステップS1003では、当該面積が予め設定された面積の閾値を超えている場合に、画質優先モードを設定する。そして、この場合、ステップS1005では、当該画質優先モードに基づく描画処理が行われる。また、ステップS1004では、投影面における占める面積が予め設定された面積の閾値以下である場合に、速度優先モードを設定する。そして、この場合、ステップS1005では、当該速度優先モードに基づく描画処理が行われる。 In this embodiment, an example of a configuration for calculating an angle formed by a normal vector and a line-of-sight vector of a plane on which a two-dimensional graphic is arranged is shown as a visual effect. However, other visual effect calculation methods are used. May be. For example, the area occupied by the projection plane of the two-dimensional graphics to be processed is calculated, and in step S1003, the image quality priority mode is set when the area exceeds a preset area threshold. In this case, in step S1005, drawing processing based on the image quality priority mode is performed. In step S1004, the speed priority mode is set when the area occupied by the projection plane is equal to or smaller than a preset area threshold. In this case, in step S1005, drawing processing based on the speed priority mode is performed.
また、視認効果の算出方法として、更に、視認効果算出部205に3次元照明効果情報を入力し、視認効果算出部205において、当該3次元照明効果情報に基づく2次元グラフィックスの明度によって視認効果を算出するようにしてもよい。より具体的には、当該3次元照明効果情報に基づく2次元グラフィックスを配置する平面等の明度によって視認効果を算出するようにしてもよい。この場合、ステップS1002において、当該明度が、予め設定されている明度の閾値を超えているか否かによって、画質優先モードで描画処理するか速度優先モードで描画処理するかを判断する。具体的に、算出した明度が閾値を超えている場合には画質優先モードで描画処理を行い、それ以外の場合には速度優先モードで描画処理を行う。
Further, as a method for calculating the visual effect, the visual
また、本実施形態では、画質優先モードと速度優先モードの設定に際して、予め設定された閾値を使用する例を示したが、例えば、本実施形態に係るグラフィックス処理装置の処理負荷から閾値を制御するように構成してもよい。 In this embodiment, an example in which a preset threshold value is used when setting the image quality priority mode and the speed priority mode has been described. For example, the threshold value is controlled from the processing load of the graphics processing apparatus according to this embodiment. You may comprise.
(第3の実施形態)
次に、本発明の第3の実施形態について説明する。
第3の実施形態に係るグラフィックス処理装置のハードウェア構成は、図1に示す第1の実施形態に係るグラフィックス処理装置のハードウェア構成と同様であるため、その詳細な説明は省略する。
(Third embodiment)
Next, a third embodiment of the present invention will be described.
Since the hardware configuration of the graphics processing apparatus according to the third embodiment is the same as the hardware configuration of the graphics processing apparatus according to the first embodiment shown in FIG. 1, detailed description thereof is omitted.
図12は、本発明の第3の実施形態に係るグラフィックス処理装置の機能構成の一例を示すブロック図である。ここで、図12において、図2と同様の機能の構成については、同じ符号を付しており、また、図12に示すグラフィックス処理装置を「グラフィックス処理装置100−3」として説明を行う。 FIG. 12 is a block diagram illustrating an example of a functional configuration of a graphics processing apparatus according to the third embodiment of the present invention. Here, in FIG. 12, the same reference numerals are given to the same functional configuration as in FIG. 2, and the graphics processing device shown in FIG. 12 is described as “graphics processing device 100-3”. .
図12のグラフィックス処理装置100−3は、図2に示す201〜205、207及び106の機能構成に加えて、更に2次元グラフィックス配置情報処理部1201を有し、また、2次元グラフィックス描画処理実行部1202を具備する。ここで、図12では、図2に示す2次元グラフィックス描画処理実行部206の処理と処理内容が異なるため、2次元グラフィックス描画処理実行部1202と図示している。
A graphics processing apparatus 100-3 in FIG. 12 has a two-dimensional graphics arrangement
図12の2次元グラフィックス配置情報処理部1201及び2次元グラフィックス描画処理実行部1202は、例えば、図1に示すCPU101及びROM103或いは外部メモリ104に記憶されたプログラムから構成される。
The two-dimensional graphics arrangement
グラフィックス処理命令受信部201は、第1の実施形態と同様に、グラフィックス処理装置100−1に入力された情報に基づきグラフィックス処理命令を受信する処理を行う。
Similar to the first embodiment, the graphics processing
2次元グラフィックス描画処理命令取得部202は、第1の実施形態と同様に、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する処理を行う。2次元グラフィックス配置情報取得部203は、第1の実施形態と同様に、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する処理を行う。投影条件取得部204は、第1の実施形態と同様に、グラフィックス処理命令受信部201で受信したグラフィックス処理命令から、投影条件に関する情報を取得する処理を行う。
Similar to the first embodiment, the two-dimensional graphics drawing processing
視認効果算出部205は、第1の実施形態と同様に、2次元グラフィックス配置情報取得部203で取得した2次元グラフィックス配置情報と、投影条件取得部204で取得した投影条件に関する情報に基づいて、視認効果を算出する処理を行う。
Similar to the first embodiment, the visual
2次元グラフィックス配置情報処理部1201は、視認効果算出部205で算出した視認効果に応じて、2次元グラフィックス配置情報に条件を追加し、条件つき2次元グラフィックス配置情報を生成する。具体的に、2次元グラフィックス配置情報処理部1201は、前記視認効果に応じて、2次元グラフィックス配置情報に係る配置領域を分割して、2次元グラフィックス配置情報に条件を追加し、条件つき2次元グラフィックス配置情報を生成する。
The two-dimensional graphics arrangement
2次元グラフィックス描画処理実行部1202は、条件つき2次元グラフィックス配置情報ごとに、2次元グラフィックス描画処理命令取得部202で取得した2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う。
The two-dimensional graphics drawing
3次元グラフィックス描画部207は、2次元グラフィックス描画処理実行部1202で生成したラスタ画像を、2次元グラフィックス配置情報に基づいて3次元仮想空間内に配置し、投影条件に従って描画処理を行う。
The three-dimensional
次に、グラフィックス処理装置100−3によるグラフィックス処理方法の処理手順について説明する。
図13は、本発明の第3の実施形態に係るグラフィックス処理装置によるグラフィックス処理方法の処理手順の一例を示すフローチャートである。
Next, the processing procedure of the graphics processing method by the graphics processing apparatus 100-3 will be described.
FIG. 13 is a flowchart showing an example of the processing procedure of the graphics processing method by the graphics processing apparatus according to the third embodiment of the present invention.
まず、ステップS1301において、グラフィックス処理命令受信部201は、グラフィックス処理装置100−3に入力された情報に基づきグラフィックス処理命令を受信する処理を行う。
First, in step S1301, the graphics processing
ここで、本実施形態のグラフィックス処理命令について説明する。
図14は、本発明の第3の実施形態を示し、図12のグラフィックス処理命令受信部201で受信するグラフィックス処理命令1400の一例を示す模式図である。
Here, the graphics processing instruction of this embodiment will be described.
FIG. 14 is a schematic diagram illustrating an example of a
図14(a)には、グラフィックス処理命令1400に含まれる、2次元グラフィックス描画処理命令1410、2次元グラフィックス配置情報1420、及び、投影条件1430が示されている。
FIG. 14A shows a two-dimensional graphics rendering
図14(a)に示す2次元グラフィックス描画処理命令1410は、2次元グラフィックス描画処理命令1411〜1414の円描画処理命令から構成されている。また、図14(a)に示す2次元グラフィックス配置情報1420には、2次元グラフィックス配置曲面、即ち2次元グラフィックスを円柱の側面に貼り付けるようにして配置するための情報が含まれている。また、図14(a)に示す投影条件1430には、視点の条件や投影面の条件、及び、投影方法が定義されている。
A two-dimensional graphics drawing
図14(b)には、2次元グラフィックス描画処理命令に基づく円1401〜1404と2次元グラフィックス描画処理対象ビットマップとXY軸の位置関係が示されている。2次元グラフィックス描画処理対象ビットマップは、はじめ白色であるとし、指定された円柱の側面を展開した大きさの長方形であるものとする。本実施形態の例では、円柱の高さが4、半径が2であるので、高さが4、幅が4πとなる。 FIG. 14B shows the positional relationship between the circles 1401 to 1404 based on the two-dimensional graphics drawing processing command, the two-dimensional graphics drawing processing target bitmap, and the XY axes. It is assumed that the two-dimensional graphics drawing process target bitmap is initially white, and is a rectangle having a size obtained by developing the side surface of the designated cylinder. In the example of this embodiment, since the height of the cylinder is 4 and the radius is 2, the height is 4 and the width is 4π.
図14(b)において、円1401は、2次元グラフィックス描画処理命令1411によって描画されるべき図形の位置を示している。同様に、円1402は、2次元グラフィックス描画処理命令1412によって描画されるべき図形の位置を示している。また、円1403は、2次元グラフィックス描画処理命令1413によって描画されるべき図形の位置を示している。また、円1404は、2次元グラフィックス描画処理命令1414によって描画されるべき図形の位置を示している。
In FIG. 14B, a circle 1401 indicates the position of the figure to be drawn by the two-dimensional graphics drawing processing command 1411. Similarly, a
図14(c)には、2次元グラフィックス配置情報と投影条件の3次元仮想空間における関係が示されている。図14(c)における点P(2.0,2.0,10.0)と点Q(2.0,−2.0,10.0)は、ともに、X=2.0、Z=10.0で表現される直線上の点である。また、図14(b)において、2次元グラフィックス描画処理対象ビットマップに係る長方形の4点をA、B、C、Dとし、辺ADの中点をM、辺BCの中点をNとする。2次元グラフィックス描画処理を行った後、ビットマップ画像が生成される。ここで、2次元グラフィックス配置情報に従ってビットマップ画像を配置するためには、図14(b)の点Mが図14(c)の点Pに一致するようにし、図14(b)の点Nが図14(c)の点Qに一致するようにして、円柱の側面と一致するように配置すればよい。 FIG. 14C shows the relationship between the two-dimensional graphics arrangement information and the projection conditions in the three-dimensional virtual space. A point P (2.0, 2.0, 10.0) and a point Q (2.0, −2.0, 10.0) in FIG. 14C are both X = 2.0 and Z = It is a point on a straight line represented by 10.0. In FIG. 14B, the four points of the rectangle related to the two-dimensional graphics rendering target bitmap are A, B, C, and D, the midpoint of the side AD is M, and the midpoint of the side BC is N. To do. After performing the two-dimensional graphics drawing process, a bitmap image is generated. Here, in order to arrange the bitmap image according to the two-dimensional graphics arrangement information, the point M in FIG. 14B is made to coincide with the point P in FIG. 14C, and the point in FIG. What is necessary is just to arrange | position so that N may correspond to the point Q of FIG.14 (c), and to correspond with the side surface of a cylinder.
ここで、再び、図13の説明に戻る。
ステップS1301の処理が終了すると、続いて、ステップS1302において、2次元グラフィックス描画処理命令取得部202は、ステップS301で受信したグラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する処理を行う。
Here, it returns to description of FIG. 13 again.
When the process of step S1301 is completed, in step S1302, the two-dimensional graphics drawing processing
続いて、ステップS1303において、2次元グラフィックス配置情報取得部203は、ステップS301で受信したグラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する処理を行う。
Subsequently, in step S1303, the two-dimensional graphics arrangement
続いて、ステップS1304において、投影条件取得部204は、ステップS301で受信したグラフィックス処理命令から、投影条件に関する情報を取得する処理を行う。
Subsequently, in step S1304, the projection
続いて、ステップS1305において、視認効果算出部205は、ステップS1303で取得した2次元グラフィックス配置情報と、ステップS1304で取得した投影条件に関する情報に基づいて、視認効果を算出する処理を行う。
Subsequently, in step S1305, the visual
続いて、ステップS1306において、2次元グラフィックス配置情報処理部1201は、視認効果算出部205で算出した視認効果に応じて、2次元グラフィックス配置情報に条件を追加し、条件つき2次元グラフィックス配置情報を生成する。
Subsequently, in step S1306, the two-dimensional graphics arrangement
ここで、ステップS1305の視認効果の算出処理、及び、ステップS1306の条件つき2次元グラフィックス配置情報の生成処理について詳細に説明する。 Here, the visual effect calculation processing in step S1305 and the conditional two-dimensional graphics arrangement information generation processing in step S1306 will be described in detail.
まず、視認効果算出部205は、投影条件から視線ベクトルの単位ベクトルを算出する。ここで、平行投影法において、視線ベクトルは、視点の位置から投影面に向かう、投影面に対して垂直なベクトルである。図14(a)に示す投影条件1430の場合には、ここで算出される視線ベクトルは(0,0,1)となる。また、2次元グラフィックス配置情報で指定されている面の各点は、点における面の法線ベクトルと視線ベクトルとのなす角度(θ)によって、不可視や可視、或いは、視認性良好や視認困難が判別される。
First, the visual
ここで、可視と不可視との判別は、例えば、法線ベクトルと視線ベクトルとのなす角度(θ)が90°より大きい場合のみ可視と判定し、それ以外は不可視と判定する。また、可視と判定された場合、更に、視認性良好であるか、或いは、視認困難であるかを判定する。この際、視認性良好であるか困難であるかを判定するために、例えばROM103或いは外部メモリ104に予め格納されている、視認性判定基準角度に係る閾値(φ)を利用する。ここで、本例では、閾値(φ)として角度135°を適用し、法線ベクトルと視線ベクトルとのなす角度(θ)が角度135°よりも大きい場合に視認性良好と判定し、それ以外の場合は視認困難であると判定する。
Here, the discrimination between visible and invisible is, for example, determined as visible only when the angle (θ) between the normal vector and the line-of-sight vector is greater than 90 °, and otherwise determined as invisible. Further, when it is determined to be visible, it is further determined whether the visibility is good or the visibility is difficult. At this time, in order to determine whether the visibility is good or difficult, for example, a threshold (φ) relating to the visibility determination reference angle stored in advance in the
図15は、本発明の第3の実施形態を示し、図13のステップS1305及びステップS1306の処理内容を説明するための模式図である。具体的に、図15には、2次元グラフィックス配置情報の2次元グラフィックス配置曲面及び視線ベクトルとXYZ座標軸の関係をY軸方向から見た様子が示されている。 FIG. 15 is a schematic diagram for explaining the processing contents of steps S1305 and S1306 in FIG. 13 according to the third embodiment of this invention. Specifically, FIG. 15 illustrates a state in which the relationship between the two-dimensional graphics arrangement curved surface and the line-of-sight vector of the two-dimensional graphics arrangement information and the XYZ coordinate axes is viewed from the Y-axis direction.
図14(c)に示す円柱は、円柱の軸がY軸と平行なので、円柱の側面上の点の法線ベクトルは、X座標とZ座標のみで表現される。ここで、円柱の側面上の点(x,y,z)における法線ベクトルは(x,0,z−10)である。求めた法線ベクトルと視線ベクトルのなす角度を求めることによって、2次元グラフィックス配置曲面は、図15に示すように、1つの不可視領域1504、2つの視認困難領域1501及び1503、1つの視認性良好領域1502の各領域に分けることができる。そして、ステップS1306の処理では、これらの各領域の条件を2次元グラフィックス配置情報に追加して、条件つき2次元グラフィックス配置情報として生成する。 In the cylinder shown in FIG. 14C, since the axis of the cylinder is parallel to the Y axis, the normal vector of the point on the side surface of the cylinder is expressed only by the X coordinate and the Z coordinate. Here, the normal vector at the point (x, y, z) on the side surface of the cylinder is (x, 0, z-10). By obtaining the angle formed by the obtained normal vector and line-of-sight vector, the two-dimensional graphics arrangement curved surface has one invisible area 1504, two difficult-to-view areas 1501 and 1503, and one visibility as shown in FIG. The region can be divided into good regions 1502. In the process of step S1306, the conditions of these areas are added to the two-dimensional graphics arrangement information to generate conditional two-dimensional graphics arrangement information.
ここで、再び、図13の説明に戻る。
ステップS1306の処理が終了すると、続いて、ステップS1307において、2次元グラフィックス描画処理実行部1202は、条件つき2次元グラフィックス配置情報ごとに、ステップS1302で取得した2次元グラフィックス描画処理命令を実行する。そして、2次元グラフィックス描画処理実行部1202は、ラスタ画像(ビットマップ画像)を生成する処理を行う。
Here, it returns to description of FIG. 13 again.
When the processing in step S1306 is completed, in step S1307, the two-dimensional graphics drawing
ここで、ステップS1307の2次元グラフィックス描画処理を詳細に説明する。
ステップS1307では、ステップS1305及びステップS1306の処理によって分割された2次元グラフィックス配置曲面の各領域の条件に合わせて、2次元グラフィックス描画処理対象ビットマップを分割する。
Here, the two-dimensional graphics rendering process in step S1307 will be described in detail.
In step S1307, the two-dimensional graphics drawing process target bitmap is divided in accordance with the conditions of each region of the two-dimensional graphics arrangement curved surface divided by the processes in steps S1305 and S1306.
図16は、本発明の第3の実施形態を示し、図13のステップS1307の処理内容を説明するための模式図である。具体的に、図16には、2次元グラフィックス描画処理を行う対象のビットマップを分割した様子が示されている。 FIG. 16 is a schematic diagram for explaining the processing content of step S1307 in FIG. 13 according to the third embodiment of this invention. Specifically, FIG. 16 shows a state in which a bitmap to be subjected to two-dimensional graphics drawing processing is divided.
図16において、点A、B、C、D、M、Nは、図14(b)で用いた記号と同じ意味のものである。点M及び点Nが、それぞれ、円柱の側面上の点P及び点Qに一致するように、円柱の側面に沿って配置されるので、図16において、X>0の領域、即ち四角形MNCDの領域は、不可視領域1504となる。 In FIG. 16, points A, B, C, D, M, and N have the same meaning as the symbols used in FIG. Since the point M and the point N are arranged along the side surface of the cylinder so as to coincide with the point P and the point Q on the side surface of the cylinder, respectively, in FIG. The area becomes an invisible area 1504.
図15において、視認困難領域1501及び1503は、円柱の軸を中心に45°の領域を占めているので、図16において−2π<X<−1.5πの領域と−0.5π<X<0の領域、即ち四角形ABFEと四角形HGNMの領域は視認困難領域となる。そして、残りの−1.5π≦X≦0.5πの領域が、視認性良好領域1502となる。ここで、図16には、図15に対応した、視認困難領域1501及び1503、視認性良好領域1502及び不可視領域1504の一例が示されている。 In FIG. 15, the difficult-to-view regions 1501 and 1503 occupy a 45 ° region centering on the axis of the cylinder, so in FIG. 16, the region −2π <X <−1.5π The area of 0, that is, the area of the quadrilateral ABFE and the quadrilateral HGNM, is a difficult-to-view area. The remaining region of −1.5π ≦ X ≦ 0.5π is the visibility region 1502. Here, FIG. 16 shows an example of the difficult-to-view regions 1501 and 1503, the good visibility region 1502 and the invisible region 1504 corresponding to FIG.
次に、ステップS1307では、図14(a)の2次元グラフィックス描画処理命令1411〜1414がどの領域に含まれるのかを求める処理を行う。
具体的に、2次元グラフィックス描画処理命令1411は、中心(−5.0,0.0)、半径1.0の円を描画する処理命令であるため、その描画領域は、視認困難領域1501に含まれる。また、2次元グラフィックス描画処理命令1412は、中心(−3.5,1.0)、半径1.0の円を描画する処理命令であるため、その描画領域は、視認性良好領域1502に含まれる。また、2次元グラフィックス描画処理命令1413は、中心(−1.5,−1.0)、半径1.0の円を描画する処理命令であるため、その描画領域は、視認性良好領域1502と視認困難領域1503に跨る。また、2次元グラフィックス描画処理命令1414は、中心(2.5,0.0)、半径1.0の円を描画する処理命令であるため、その描画領域は、不可視領域1504に含まれる。
Next, in step S1307, a process is performed to determine in which area the two-dimensional graphics rendering processing commands 1411 to 1414 shown in FIG.
Specifically, since the two-dimensional graphics drawing processing command 1411 is a processing command for drawing a circle having a center (−5.0, 0.0) and a radius of 1.0, the drawing region is a difficult-to-view region 1501. include. Further, since the two-dimensional graphics drawing processing command 1412 is a processing command for drawing a circle having a center (−3.5, 1.0) and a radius of 1.0, the drawing region is set to the visibility region 1502. included. Further, since the two-dimensional graphics drawing processing command 1413 is a processing command for drawing a circle having a center (−1.5, −1.0) and a radius of 1.0, the drawing region has a good visibility region 1502. And straddles the difficult-to-view region 1503. Further, since the two-dimensional graphics drawing
次に、ステップS1307では、各2次元グラフィックス描画処理命令を条件つきで実行する処理を行う。 Next, in step S1307, processing for executing each two-dimensional graphics rendering processing command with conditions is performed.
図17は、本発明の第3の実施形態を示し、図13のステップS1307における描画処理の詳細な処理の一例を示すフローチャートである。ここで、図17には、1つの2次元グラフィックス描画処理命令を条件つきで実行する処理の流れが示されているが、複数の2次元グラフィックス描画処理命令の処理を行う場合には、当該複数の分だけ、図17に示す処理が繰り返し行われることになる。 FIG. 17 is a flowchart illustrating an example of detailed processing of the drawing processing in step S1307 of FIG. 13 according to the third embodiment of this invention. Here, FIG. 17 shows a flow of processing for executing one two-dimensional graphics rendering processing command with conditions. When processing a plurality of two-dimensional graphics rendering processing commands, The process shown in FIG. 17 is repeated for the plurality of parts.
まず、ステップS1701において、2次元グラフィックス描画処理実行部1202は、2次元グラフィックス描画処理命令による描画領域の全部または一部が(即ち、描画領域の少なくとも一部が)、視認性良好領域に含まれているか否かを判断する。
First, in step S1701, the two-dimensional graphics drawing
ステップS1701の判断の結果、2次元グラフィックス描画処理命令による描画領域の全部または一部が、視認性良好領域に含まれている場合には、ステップS1702に進む。 As a result of the determination in step S1701, when all or part of the drawing area by the two-dimensional graphics drawing processing command is included in the good visibility area, the process proceeds to step S1702.
ステップS1702に進むと、2次元グラフィックス描画処理実行部1202は、2次元グラフィックス描画処理モードを画質優先モードに設定する。
In step S1702, the two-dimensional graphics drawing
一方、ステップS1701の判断の結果、2次元グラフィックス描画処理命令による描画領域の全部または一部が、視認性良好領域に含まれていない場合には、ステップS1703に進む。 On the other hand, if the result of determination in step S1701 is that all or part of the drawing area by the two-dimensional graphics drawing processing command is not included in the high visibility area, the process proceeds to step S1703.
ステップS1703に進むと、2次元グラフィックス描画処理実行部1202は、2次元グラフィックス描画処理命令による描画領域の全部または一部が(即ち、描画領域の少なくとも一部が)、視認困難領域に含まれているか否かを判断する。
In step S1703, the two-dimensional graphics drawing
ステップS1703の判断の結果、2次元グラフィックス描画処理命令による描画領域の全部または一部が、視認困難領域に含まれている場合には、ステップS1704に進む。 As a result of the determination in step S1703, if all or part of the drawing area by the two-dimensional graphics drawing processing command is included in the difficult-to-view area, the process proceeds to step S1704.
ステップS1704に進むと、2次元グラフィックス描画処理実行部1202は、2次元グラフィックス描画処理モードを速度優先モードに設定する。
In step S1704, the two-dimensional graphics drawing
ステップS1702又はS1704の処理が終了すると、ステップS1705に進む。
ステップS1705に進むと、2次元グラフィックス描画処理実行部1202は、設定した2次元グラフィックス描画処理モードに応じてステップS1302で取得した2次元グラフィックス描画処理命令を実行する。そして、2次元グラフィックス描画処理実行部206は、ラスタ画像(ビットマップ画像)を生成する処理を行う。
When the process of step S1702 or S1704 ends, the process proceeds to step S1705.
In step S1705, the two-dimensional graphics drawing
一方、ステップS1703の判断の結果、2次元グラフィックス描画処理命令による描画領域の全部または一部が視認困難領域に含まれていない場合には、描画領域の全部不可視領域に含まれていることになるので、図17の処理を終了する。即ち、この場合、2次元グラフィックス描画処理は行われない。また、ステップS1705の処理が終了した場合には、図17の処理を終了する。 On the other hand, if it is determined in step S1703 that all or part of the drawing area by the two-dimensional graphics drawing processing command is not included in the difficult-to-view area, the drawing area is all included in the invisible area. Therefore, the process of FIG. That is, in this case, the two-dimensional graphics drawing process is not performed. In addition, when the process of step S1705 ends, the process of FIG. 17 ends.
そして、上述したステップS1701〜1705の処理を、同じ2次元グラフィックス描画処理対象ビットマップに描画する2次元グラフィックス描画処理命令の分だけ、繰り返し行う。 Then, the processing in steps S1701 to S1705 described above is repeated for the two-dimensional graphics drawing processing command for drawing on the same two-dimensional graphics drawing processing target bitmap.
本実施形態では、例えば、画質優先モードとして第2の実施形態で説明したアンチエイリアス有効モードを適用し、速度優先モードとして第2の実施形態で説明したアンチエイリアス無効モードを適用する。この場合、図14(a)に示す2次元グラフィックス描画処理命令1411は、アンチエイリアス無効モードで描画処理される。また、図14(a)に示す2次元グラフィックス描画処理命令1412及び2次元グラフィックス描画処理命令1413は、アンチエイリアス有効モードで描画処理される。また、図14(a)に示す2次元グラフィックス描画処理命令1414は、描画処理されない。その結果、図18に示したような描画処理の結果になる。
In the present embodiment, for example, the anti-aliasing effective mode described in the second embodiment is applied as the image quality priority mode, and the anti-aliasing invalid mode described in the second embodiment is applied as the speed priority mode. In this case, the two-dimensional graphics drawing processing instruction 1411 shown in FIG. 14A is drawn in the anti-aliasing invalid mode. Further, the two-dimensional graphics drawing processing command 1412 and the two-dimensional graphics drawing processing command 1413 shown in FIG. 14A are drawn in the anti-aliasing effective mode. Further, the two-dimensional graphics drawing
図18は、本発明の第3の実施形態を示し、図13のステップS1307における描画処理の処理結果の一例を示す模式図である。
図18において、アンチエイリアスなし円1801は、図14(a)に示す2次元グラフィックス描画処理命令1411に基づくものである。また、アンチエイリアスあり円1802及び1803は、それぞれ、図14(a)に示す2次元グラフィックス描画処理命令1412及び1413に基づくものである。
FIG. 18 is a schematic diagram illustrating an example of a processing result of the drawing process in step S1307 of FIG. 13 according to the third embodiment of this invention.
In FIG. 18, an anti-aliased circle 1801 is based on the two-dimensional graphics drawing processing instruction 1411 shown in FIG. The anti-aliased circles 1802 and 1803 are based on the two-dimensional graphics drawing processing instructions 1412 and 1413 shown in FIG.
ここで、再び、図13の説明に戻る。
ステップS1307の処理が終了すると、ステップS1308に進む。
ステップS1308に進むと、3次元グラフィックス描画部207は、ステップS1307で生成されたラスタ画像(ビットマップ画像)を3次元仮想空間内に配置し、投影条件に従って投影した描画処理を行う。
Here, it returns to description of FIG. 13 again.
When the process of step S1307 ends, the process proceeds to step S1308.
In step S1308, the three-dimensional
図19は、本発明の第3の実施形態を示し、図13のステップS1308における描画処理の処理結果の一例を示す模式図である。
図14に示すグラフィックス処理命令を処理すると、例えば、図19(a)に示すような3次元グラフィックスが出力される。なお、本実施形態では、平行投影法についてのみ説明したが、透視投影法を用いてもよい。図19(b)は、透視投影法を用いた出力例である。
FIG. 19 is a schematic diagram illustrating an example of a processing result of the drawing process in step S1308 of FIG. 13 according to the third embodiment of this invention.
When the graphics processing command shown in FIG. 14 is processed, for example, three-dimensional graphics as shown in FIG. 19A is output. In the present embodiment, only the parallel projection method has been described, but a perspective projection method may be used. FIG. 19B shows an output example using the perspective projection method.
ここで、再び、図13の説明に戻る。
ステップS1308の処理が終了すると、続いて、ステップS1309において、グラフィックス処理装置100−3(例えばグラフィックス処理命令受信部201)は、処理対象のグラフィックス処理命令の処理が終了したか否かを判断する。
Here, it returns to description of FIG. 13 again.
When the process of step S1308 ends, in step S1309, the graphics processing device 100-3 (for example, the graphics processing command receiving unit 201) determines whether the processing of the processing target graphics processing command is ended. to decide.
ステップS1309の判断の結果、処理対象のグラフィックス処理命令の処理が終了していない(未処理のグラフィックス処理命令が存在する)場合には、ステップS1301に戻って、未処理のグラフィックス処理命令に対する処理を行う。 As a result of the determination in step S1309, if the processing of the processing target graphics processing instruction is not completed (there is an unprocessed graphics processing instruction), the process returns to step S1301 to return to the unprocessed graphics processing instruction. Perform processing for.
一方、ステップS1309の判断の結果、処理対象のグラフィックス処理命令の処理が終了した場合には、図13のフローチャートの処理を終了する。 On the other hand, as a result of the determination in step S1309, when the processing of the graphics processing instruction to be processed is completed, the processing of the flowchart in FIG.
以上の第1〜第3の実施形態によれば、3次元仮想空間内に2次元グラフィックスを配置して描画処理する際に、視認性を低下させることなく処理負荷の低減を実現することができる。特に、2次元グラフィックスが、時間経過とともに変化する場合に、処理負荷の更なる低減を実現することが可能である。 According to the first to third embodiments described above, it is possible to realize a reduction in processing load without reducing visibility when placing a two-dimensional graphic in a three-dimensional virtual space and performing a drawing process. it can. In particular, when the two-dimensional graphics changes over time, it is possible to realize a further reduction in processing load.
なお、上述した第1〜第3の実施形態では、2次元グラフィックス配置情報は、3次元仮想空間内における曲面または平面として与えられる例を示したが、例えば、3次元仮想空間内における曲面または平面の方程式で与えられる形態であってもよい。 In the first to third embodiments described above, the example in which the two-dimensional graphics arrangement information is given as a curved surface or a plane in the three-dimensional virtual space is shown. It may be a form given by a plane equation.
(本発明の他の実施形態)
前述した本発明の各実施形態に係るグラフィックス処理装置100を構成する図2及び図12の各手段は、コンピュータのCPU(101)が記憶媒体(103或いは104)記憶されているプログラムを実行することによって実現できる。また、グラフィックス処理装置100によるグラフィックス処理方法を示す図3、図7、図10、図13及び図17の各ステップは、コンピュータのCPU(101)が記憶媒体(103或いは104)記憶されているプログラムを実行することによって実現できる。このプログラム及び当該プログラムを記憶したコンピュータ読み取り可能な記録媒体は本発明に含まれる。
(Other embodiments of the present invention)
2 and 12 constituting the
また、本発明は、例えば、システム、装置、方法、プログラム若しくは記憶媒体等としての実施形態も可能であり、具体的には、複数の機器から構成されるシステムに適用してもよいし、また、1つの機器からなる装置に適用してもよい。 In addition, the present invention can be implemented as, for example, a system, apparatus, method, program, storage medium, or the like. Specifically, the present invention may be applied to a system including a plurality of devices. You may apply to the apparatus which consists of one apparatus.
なお、本発明は、前述した各実施形態の機能を実現するソフトウェアのプログラム(実施形態では図3、図7、図10、図13及び図17に示すフローチャートに対応したプログラム)を、システム或いは装置に直接、或いは遠隔から供給するものを含む。そして、そのシステム或いは装置のコンピュータが前記供給されたプログラムコードを読み出して実行することによっても達成される場合も本発明に含まれる。 In the present invention, a software program (in the embodiment, a program corresponding to the flowcharts shown in FIGS. 3, 7, 10, 13, and 17) that realizes the functions of the above-described embodiments is used as a system or apparatus. Including direct or remote supply. The present invention also includes a case where the system or the computer of the apparatus is achieved by reading and executing the supplied program code.
したがって、本発明の機能処理をコンピュータで実現するために、前記コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。 Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.
その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。 In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.
プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RWなどがある。また、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)などもある。 Examples of the recording medium for supplying the program include a flexible disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, and CD-RW. In addition, there are magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-R), and the like.
その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続する。そして、前記ホームページから本発明のコンピュータプログラムそのもの、若しくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。 As another program supply method, a browser on a client computer is used to connect to an Internet home page. The computer program itself of the present invention or a compressed file including an automatic installation function can be downloaded from the homepage by downloading it to a recording medium such as a hard disk.
また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。 It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, the present invention includes a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer.
また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせる。そして、ダウンロードした鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。 In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and key information for decryption is downloaded from a homepage via the Internet to users who have cleared predetermined conditions. Let The downloaded key information can be used to execute the encrypted program and install it on the computer.
また、コンピュータが、読み出したプログラムを実行することによって、前述した各実施形態の機能が実現される。その他、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部又は全部を行い、その処理によっても前述した各実施形態の機能が実現され得る。 Further, the functions of the respective embodiments described above are realized by the computer executing the read program. In addition, based on the instructions of the program, an OS or the like running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.
さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によっても前述した各実施形態の機能が実現される。 Further, the program read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instructions of the program, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are also realized by the processing.
なお、前述した各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 Note that each of the above-described embodiments is merely a specific example for carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. . That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
100:グラフィックス処理装置、201:グラフィックス処理命令受信部、202:2次元グラフィックス描画処理命令取得部、203:2次元グラフィックス配置情報取得部、204:投影条件取得部204、205:視認効果算出部、206:2次元グラフィックス描画処理実行部、207:3次元グラフィックス描画部、106:表示部(モニタ)
DESCRIPTION OF SYMBOLS 100: Graphics processing apparatus, 201: Graphics processing command receiving part, 202: Two-dimensional graphics drawing process command acquisition part, 203: Two-dimensional graphics arrangement information acquisition part, 204: Projection
Claims (16)
前記グラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する2次元グラフィックス描画処理命令取得手段と、
前記グラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する2次元グラフィックス配置情報取得手段と、
前記グラフィックス処理命令から、投影条件に関する情報を取得する投影条件取得手段と、
前記2次元グラフィックス配置情報および前記投影条件に関する情報に基づいて、前記2次元グラフィックスを配置する3次元仮想空間内の視点の位置に基づく視認効果を算出する視認効果算出手段と、
前記視認効果に応じて前記2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う2次元グラフィックス描画処理実行手段と
を有することを特徴とするグラフィックス処理装置。 A graphics processing apparatus for processing an input graphics processing instruction,
Two-dimensional graphics drawing processing command acquisition means for acquiring a two-dimensional graphics drawing processing command from the graphics processing command;
2D graphics layout information acquisition means for acquiring 2D graphics layout information related to the layout of 2D graphics from the graphics processing instruction;
Projection condition acquisition means for acquiring information on the projection condition from the graphics processing command;
A visual effect calculation unit that calculates a visual effect based on a position of a viewpoint in a three-dimensional virtual space in which the two-dimensional graphics are arranged based on the two-dimensional graphics arrangement information and information on the projection condition;
A graphics processing apparatus comprising: a two-dimensional graphics drawing processing execution unit that executes a process for generating a raster image by executing the two-dimensional graphics drawing processing command according to the visual recognition effect.
前記2次元グラフィックス描画処理実行手段は、前記条件つき2次元グラフィックス配置情報に基づいて前記2次元グラフィックス描画処理命令を実行することを特徴とする請求項1に記載のグラフィックス処理装置。 In accordance with the visual recognition effect, the image processing apparatus further includes a two-dimensional graphics arrangement information processing unit that divides the arrangement area related to the two-dimensional graphics arrangement information and generates conditional two-dimensional graphics arrangement information.
The graphics processing apparatus according to claim 1, wherein the two-dimensional graphics drawing processing execution unit executes the two-dimensional graphics drawing processing command based on the conditional two-dimensional graphics arrangement information.
前記2次元グラフィックス描画処理実行手段は、前記可視である場合に、前記2次元グラフィックス描画処理命令を実行することを特徴とする請求項1に記載のグラフィックス処理装置。 The visual effect calculation means performs a calculation for determining whether the visual effect is visible or invisible;
2. The graphics processing apparatus according to claim 1, wherein the two-dimensional graphics drawing processing execution unit executes the two-dimensional graphics drawing processing command when it is visible. 3.
前記2次元グラフィックス描画処理実行手段は、前記視認性が良好か困難かに応じて前記2次元グラフィックス描画処理命令を実行することを特徴とする請求項3に記載のグラフィックス処理装置。 The visual effect calculating means further performs calculation for determining whether the visibility is good or difficult when the visual effect is visible,
The graphics processing apparatus according to claim 3, wherein the two-dimensional graphics drawing processing execution unit executes the two-dimensional graphics drawing processing command according to whether the visibility is good or difficult.
前記2次元グラフィックス描画処理実行手段は、前記可視の条件つき2次元グラフィックス配置情報に基づいて前記2次元グラフィックス描画処理命令を実行することを特徴とする請求項2に記載のグラフィックス処理装置。 The two-dimensional graphics arrangement information processing means generates visible conditional two-dimensional graphics arrangement information according to the visual effect,
3. The graphics processing according to claim 2, wherein the two-dimensional graphics drawing processing execution unit executes the two-dimensional graphics drawing processing command based on the visible conditional two-dimensional graphics arrangement information. apparatus.
前記2次元グラフィックス描画処理実行手段は、前記視認性の条件つき2次元グラフィックス配置情報に基づいて前記2次元グラフィックス描画処理命令を実行することを特徴とする請求項2に記載のグラフィックス処理装置。 The two-dimensional graphics arrangement information processing means generates visibility two-dimensional graphics arrangement information indicating whether visibility is good or difficult according to the visual recognition effect,
3. The graphics according to claim 2, wherein the two-dimensional graphics drawing processing execution unit executes the two-dimensional graphics drawing processing instruction based on the two-dimensional graphics arrangement information with the visibility condition. Processing equipment.
前記グラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する2次元グラフィックス描画処理命令取得ステップと、
前記グラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する2次元グラフィックス配置情報取得ステップと、
前記グラフィックス処理命令から、投影条件に関する情報を取得する投影条件取得ステップと、
前記2次元グラフィックス配置情報および前記投影条件に関する情報に基づいて、前記2次元グラフィックスを配置する3次元仮想空間内の視点の位置に基づく視認効果を算出する視認効果算出ステップと、
前記視認効果に応じて前記2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う2次元グラフィックス描画処理実行ステップと
を有することを特徴とするグラフィックス処理方法。 A graphics processing method by a graphics processing apparatus for processing an input graphics processing instruction,
A two-dimensional graphics drawing processing command acquisition step for acquiring a two-dimensional graphics drawing processing command from the graphics processing command;
A two-dimensional graphics arrangement information acquisition step for acquiring two-dimensional graphics arrangement information related to the arrangement of the two-dimensional graphics from the graphics processing instruction;
A projection condition obtaining step for obtaining information on the projection condition from the graphics processing command;
A visual effect calculation step for calculating a visual effect based on the position of the viewpoint in the three-dimensional virtual space in which the two-dimensional graphics are arranged based on the two-dimensional graphics arrangement information and the information on the projection condition;
A graphics processing method comprising: a two-dimensional graphics rendering process execution step of executing a process of generating a raster image by executing the two-dimensional graphics rendering process command in accordance with the visual recognition effect.
前記グラフィックス処理命令から、2次元グラフィックス描画処理命令を取得する2次元グラフィックス描画処理命令取得ステップと、
前記グラフィックス処理命令から、2次元グラフィックスの配置に係る2次元グラフィックス配置情報を取得する2次元グラフィックス配置情報取得ステップと、
前記グラフィックス処理命令から、投影条件に関する情報を取得する投影条件取得ステップと、
前記2次元グラフィックス配置情報および前記投影条件に関する情報に基づいて、前記2次元グラフィックスを配置する3次元仮想空間内の視点の位置に基づく視認効果を算出する視認効果算出ステップと、
前記視認効果に応じて前記2次元グラフィックス描画処理命令を実行して、ラスタ画像を生成する処理を行う2次元グラフィックス描画処理実行ステップと
をコンピュータに実行させるためのプログラム。 A program for causing a computer to execute a graphics processing method by a graphics processing apparatus for processing an input graphics processing instruction,
A two-dimensional graphics drawing processing command acquisition step for acquiring a two-dimensional graphics drawing processing command from the graphics processing command;
A two-dimensional graphics arrangement information acquisition step for acquiring two-dimensional graphics arrangement information related to the arrangement of the two-dimensional graphics from the graphics processing instruction;
A projection condition obtaining step for obtaining information on the projection condition from the graphics processing command;
A visual effect calculation step for calculating a visual effect based on the position of the viewpoint in the three-dimensional virtual space in which the two-dimensional graphics are arranged based on the two-dimensional graphics arrangement information and the information on the projection condition;
A program for causing a computer to execute a two-dimensional graphics drawing processing execution step of executing a process of generating a raster image by executing the two-dimensional graphics drawing processing command according to the visual recognition effect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009138446A JP2010286906A (en) | 2009-06-09 | 2009-06-09 | Graphics processor, graphics processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009138446A JP2010286906A (en) | 2009-06-09 | 2009-06-09 | Graphics processor, graphics processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010286906A true JP2010286906A (en) | 2010-12-24 |
Family
ID=43542581
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009138446A Pending JP2010286906A (en) | 2009-06-09 | 2009-06-09 | Graphics processor, graphics processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010286906A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10450989B2 (en) | 2014-03-25 | 2019-10-22 | Mitsubishi Jidosha Kogyo Kabushiki Kaisha | Fuel injection device for internal combustion engine |
-
2009
- 2009-06-09 JP JP2009138446A patent/JP2010286906A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10450989B2 (en) | 2014-03-25 | 2019-10-22 | Mitsubishi Jidosha Kogyo Kabushiki Kaisha | Fuel injection device for internal combustion engine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10102663B2 (en) | Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location | |
KR102455696B1 (en) | Graphics processing systems | |
CN103946895B (en) | The method for embedding in presentation and equipment based on tiling block | |
KR102122454B1 (en) | Apparatus and Method for rendering a current frame using an image of previous tile | |
JP5336067B2 (en) | Method and apparatus for processing graphics | |
US20130127858A1 (en) | Interception of Graphics API Calls for Optimization of Rendering | |
JP6863693B2 (en) | Graphics processing system and method | |
US9672642B2 (en) | Apparatus and method of performing tile binning of bezier curve | |
US20180211434A1 (en) | Stereo rendering | |
US20180101929A1 (en) | Graphics processing devices and graphics processing methods | |
US20230082839A1 (en) | Rendering scalable raster content | |
US10062140B2 (en) | Graphics processing systems | |
JP2010286906A (en) | Graphics processor, graphics processing method, and program | |
US11741653B2 (en) | Overlapping visibility and render passes for same frame | |
US7656412B2 (en) | Texture resampling with a processor | |
US11776179B2 (en) | Rendering scalable multicolored vector content | |
KR20150042095A (en) | Apparatus and Method for rendering frame by sorting processing sequence of draw commands | |
US11972518B2 (en) | Hybrid binning | |
US11880924B2 (en) | Synchronization free cross pass binning through subpass interleaving | |
US20210225060A1 (en) | Hybrid binning | |
JP2010072917A (en) | Plotting device |