JP2005346194A - Image generation device - Google Patents

Image generation device Download PDF

Info

Publication number
JP2005346194A
JP2005346194A JP2004162270A JP2004162270A JP2005346194A JP 2005346194 A JP2005346194 A JP 2005346194A JP 2004162270 A JP2004162270 A JP 2004162270A JP 2004162270 A JP2004162270 A JP 2004162270A JP 2005346194 A JP2005346194 A JP 2005346194A
Authority
JP
Japan
Prior art keywords
polygon
coordinates
coordinate information
calculating
viewpoint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004162270A
Other languages
Japanese (ja)
Other versions
JP4449582B2 (en
Inventor
Hayato Nakao
早人 中尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2004162270A priority Critical patent/JP4449582B2/en
Publication of JP2005346194A publication Critical patent/JP2005346194A/en
Application granted granted Critical
Publication of JP4449582B2 publication Critical patent/JP4449582B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image generation device capable of performing right-back side determination of a polygon without calculating the normal vector of the polygon. <P>SOLUTION: The image generation device comprises a receiving means 101 receiving object information including coordinate information of the apex of an object and environmental information including coordinate information of a visual point and a light source; a first conversion means 102 converting the apex of the object and the light source to visual point coordinates, calculating the luminance of the apex, and converting the object to a perspective coordinate; a clipping means 103 clipping the converted object; a second conversion means 103 dividing the clipped object to polygons and converting them to screen coordinates; a first calculation means 103 calculating a polygon parameter; a determination means 103 performing right-back side determination of the polygons; a second calculation means 103 calculating a depth value from coordinate information of the apex of a right polygon, and calculating the luminance value of the polygon from the luminance value of the apex of the object; and a control means 103 storing them in a storage means 104. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像生成効率を向上させる画像生成装置に関する。   The present invention relates to an image generation apparatus that improves image generation efficiency.

3次元空間におけるオブジェクトを構成するポリゴンの法線ベクトルと視点とのなす角度が90度未満のポリゴンを表ポリゴン、90度以上のポリゴンを裏ポリゴンとして、不透明オブジェクトの画像を生成する場合、表ポリゴンの奥行値及び輝度値をバッファに格納し、裏ポリゴンの処理を省略することにより画像生成効率を向上させる方法が知られている。また一方で、半透明オブジェクトの画像を生成する場合、先に裏ポリゴンの奥行値及び輝度値をバッファに格納し、次に表ポリゴンの奥行値及び輝度値をバッファに格納して陰面消去した画像を生成する方法が知られている。ここで、上述した表ポリゴン及び裏ポリゴンの判定にはポリゴンの法線ベクトルが用いられるため、法線ベクトルを計算する必要がある。法線ベクトルを計算して表ポリゴンと裏ポリゴンとの判定を行っている画像表示装置が下記の特許文献1に開示されている。なお、表ポリゴン及び裏ポリゴンについて図7を用いて説明する。図7には、ポリゴンaからgにより構成されるオブジェクト700と視点701とが示されている。図7に示すように、視点701とポリゴンaとを結ぶ視線702と、ポリゴンaの法線ベクトル703とのなす角度704は90度未満である。すなわち、ポリゴンaは表ポリゴンということになる。また、視点701とポリゴンbとを結ぶ視線705と、ポリゴンbの法線ベクトル706とのなす角度707は90度以上である。すなわち、ポリゴンbは裏ポリゴンということになる。このように、他のポリゴンについても同様に考えると、ポリゴンf及びポリゴンgは表ポリゴンであり、ポリゴンc、ポリゴンd、ポリゴンeは裏ポリゴンである。このようにして、表ポリゴンか裏ポリゴンかが判定されている。
特開平11−203486号公報(段落0010、図1)
When generating an image of an opaque object using a polygon whose normal angle of the polygon constituting the object in the three-dimensional space and the viewpoint is less than 90 degrees as a front polygon and a polygon greater than 90 degrees as a back polygon, the front polygon There is known a method of improving the image generation efficiency by storing the depth value and the luminance value of the image in a buffer and omitting the processing of the back polygon. On the other hand, when generating an image of a semi-transparent object, the depth value and luminance value of the back polygon are first stored in the buffer, and then the depth value and luminance value of the front polygon are stored in the buffer and the hidden surface is deleted. A method of generating is known. Here, since the normal vector of the polygon is used for the determination of the front polygon and the back polygon, it is necessary to calculate the normal vector. An image display device that calculates a normal vector and determines a front polygon and a back polygon is disclosed in Patent Document 1 below. The front and back polygons will be described with reference to FIG. FIG. 7 shows an object 700 composed of polygons a to g and a viewpoint 701. As shown in FIG. 7, an angle 704 formed between a line of sight 702 connecting the viewpoint 701 and the polygon a and a normal vector 703 of the polygon a is less than 90 degrees. That is, the polygon a is a front polygon. Further, an angle 707 formed by the line of sight 705 connecting the viewpoint 701 and the polygon b and the normal vector 706 of the polygon b is 90 degrees or more. That is, the polygon b is a back polygon. In this way, when considering other polygons in the same manner, the polygon f and the polygon g are front polygons, and the polygon c, the polygon d, and the polygon e are back polygons. In this way, it is determined whether the front polygon or the back polygon.
Japanese Patent Laid-Open No. 11-203486 (paragraph 0010, FIG. 1)

しかしながら、特許文献1に開示されている技術のように、表ポリゴン及び裏ポリゴンの判定に用いられる法線ベクトルを計算することは、演算量を増大させてしまうという問題があった。   However, as in the technique disclosed in Patent Document 1, calculating a normal vector used for determination of front and back polygons has a problem of increasing the amount of calculation.

本発明は、上記問題を解決するためのものであり、ポリゴンの法線ベクトルを計算することなく、ポリゴンの表裏判定を行うことができる画像生成装置を提供することを目的とする。   An object of the present invention is to solve the above-described problem, and an object of the present invention is to provide an image generation apparatus capable of determining the front and back of a polygon without calculating the normal vector of the polygon.

上記目的を達成するために、本発明によれば、複数のポリゴンから構成されるオブジェクトの頂点の3次元座標における座標情報を少なくとも含むオブジェクト情報、及び前記オブジェクトに対する視点及び光源の前記3次元座標における座標情報を少なくとも含む環境情報を受信する受信手段と、前記受信手段で受信された前記オブジェクトの頂点の座標情報及び前記光源の座標情報を、前記視点の位置を原点とする視点座標に変換し、前記視点座標における前記オブジェクトの頂点の輝度値を計算し、前記視点座標に変換された前記オブジェクトの頂点の座標情報を透視座標に変換する第1の変換手段と、前記第1の変換手段で前記透視座標に変換された前記オブジェクトの描画範囲を決めるためのクリッピングを行うクリッピング手段と、前記クリッピング手段でクリッピングされた前記オブジェクトをポリゴンに分割し、分割した前記ポリゴンを決められた描画範囲の隅を原点とするスクリーン座標に変換する第2の変換手段と、前記第2の変換手段で前記スクリーン座標に変換された前記ポリゴンが表ポリゴンであるか裏ポリゴンであるかを判定するためのポリゴンパラメータを算出する第1の算出手段と、前記第1の算出手段で算出された前記ポリゴンパラメータに基づいて、前記ポリゴンが表ポリゴンか裏ポリゴンかを判定する判定手段と、前記判定手段で表ポリゴンと判定された前記ポリゴンに対して、前記スクリーン座標における前記ポリゴンの頂点の座標情報に基づいて、前記ポリゴンの頂点に囲まれた内部の奥行値を算出し、計算された前記オブジェクトの頂点の輝度値を補間することにより前記ポリゴンの頂点に囲まれた内部の輝度値を算出する第2の算出手段と、前記第2の算出手段で算出された前記表ポリゴンの奥行値及び輝度値を記憶手段に格納する制御手段とを備える画像生成装置が提供される。   In order to achieve the above object, according to the present invention, object information including at least coordinate information in a three-dimensional coordinate of a vertex of an object composed of a plurality of polygons, and a viewpoint and a light source in the three-dimensional coordinate of the object Receiving means for receiving environment information including at least coordinate information; and converting the coordinate information of the vertex of the object and the coordinate information of the light source received by the receiving means into viewpoint coordinates having the viewpoint position as an origin, A first conversion unit that calculates a luminance value of the vertex of the object in the viewpoint coordinates, and converts coordinate information of the vertex of the object converted into the viewpoint coordinates into a perspective coordinate; and Clipping means for performing clipping for determining a drawing range of the object converted into perspective coordinates A second conversion unit that divides the object clipped by the clipping unit into polygons, and converts the divided polygons into screen coordinates with a corner of a predetermined drawing range as an origin; and the second conversion unit The first calculation means for calculating a polygon parameter for determining whether the polygon converted into the screen coordinates is a front polygon or a back polygon, and the polygon calculated by the first calculation means Based on parameters, a determination means for determining whether the polygon is a front polygon or a back polygon, and for the polygon determined to be a front polygon by the determination means, based on coordinate information of the vertices of the polygon in the screen coordinates And calculating an internal depth value surrounded by the vertices of the polygon. A second calculating means for calculating an internal luminance value surrounded by the vertices of the polygon by interpolating a luminance value of the point; and a depth value and a luminance value of the table polygon calculated by the second calculating means And an image generation apparatus including control means for storing the image in the storage means.

本発明の画像生成装置は、上記構成を有し、ポリゴンの法線ベクトルを計算することなく、ポリゴンの表裏判定を行うことができる。   The image generation apparatus according to the present invention has the above-described configuration, and can perform front / back determination of a polygon without calculating a normal vector of the polygon.

以下、本発明の実施の形態について図1から図6を用いて説明する。図1は本発明の実施の形態に係る画像生成装置の構成を示す構成図である。図2(a)は本発明の実施の形態に係る画像生成装置における視点座標について説明するための図である。図2(b)は本発明の実施の形態に係る画像生成装置における透視座標について説明するための図である。図3は本発明の実施の形態に係る画像生成装置におけるスクリーン座標について説明するための図である。図4は本発明の実施の形態に係る画像生成装置におけるスクリーン座標に変換されたポリゴンを示す図である。図5は本発明の実施の形態に係る画像生成装置におけるポリゴンパラメータの算出について説明するためのフローチャートである。図6は本発明の実施の形態に係る画像生成装置における表ポリゴンと裏ポリゴンの中間の状態を示す図である。   Hereinafter, embodiments of the present invention will be described with reference to FIGS. FIG. 1 is a configuration diagram showing a configuration of an image generation apparatus according to an embodiment of the present invention. FIG. 2A is a diagram for explaining viewpoint coordinates in the image generation apparatus according to the embodiment of the present invention. FIG. 2B is a diagram for explaining perspective coordinates in the image generating apparatus according to the embodiment of the present invention. FIG. 3 is a diagram for explaining screen coordinates in the image generating apparatus according to the embodiment of the present invention. FIG. 4 is a diagram showing polygons converted into screen coordinates in the image generating apparatus according to the embodiment of the present invention. FIG. 5 is a flowchart for explaining calculation of polygon parameters in the image generating apparatus according to the embodiment of the present invention. FIG. 6 is a diagram showing an intermediate state between the front polygon and the back polygon in the image generating apparatus according to the embodiment of the present invention.

まず、本発明の実施の形態に係る画像生成装置の構成について図1を用いて説明する。画像生成装置100は、シーンデータ受信部101、頂点処理ユニット102、画素処理ユニット103、記憶部104、画像出力部105から構成されている。シーンデータ受信部101は、複数のポリゴンから構成されるオブジェクトの頂点の3次元座標における座標情報を少なくとも含むオブジェクト情報、及びオブジェクトに対する視点及び光源の3次元座標における座標情報を少なくとも含む環境情報を受信する。図1中のシーンデータとは、上述したオブジェクト情報及び環境情報を言う。ここで、オブジェクト情報には、オブジェクトの頂点の3次元座標における座標情報の他に、オブジェクトの色を表す情報などが含まれていてもよい。また、環境情報には、視点及び光源の3次元座標における座標情報の他に、視点の向き、視野などの情報や光源の向き、色、種類といった情報などが含まれていてもよい。シーンデータ受信部101は、受信した情報を頂点処理ユニット102へ引き渡す。   First, the configuration of an image generation apparatus according to an embodiment of the present invention will be described with reference to FIG. The image generation apparatus 100 includes a scene data receiving unit 101, a vertex processing unit 102, a pixel processing unit 103, a storage unit 104, and an image output unit 105. The scene data receiving unit 101 receives object information including at least coordinate information in the three-dimensional coordinates of the vertex of an object composed of a plurality of polygons, and environment information including at least coordinate information in the three-dimensional coordinates of the viewpoint and the light source for the object. To do. The scene data in FIG. 1 refers to the object information and environment information described above. Here, the object information may include information representing the color of the object in addition to the coordinate information on the three-dimensional coordinates of the vertex of the object. In addition to the coordinate information of the viewpoint and the light source in the three-dimensional coordinates, the environment information may include information such as the viewpoint direction and field of view, and information such as the light source direction, color, and type. The scene data receiving unit 101 passes the received information to the vertex processing unit 102.

頂点処理ユニット102は、受信したオブジェクトの頂点の座標情報及び光源の座標情報を、視点の位置を原点とする視点座標に変換し、視点座標におけるオブジェクトの頂点の輝度値を計算し、視点座標に変換されたオブジェクトの頂点の座標情報を透視座標に更に変換する。なお、ここでは頂点処理ユニット102が頂点処理ユニット0〜3の4つから構成されているが、4つに限られるものではなく、1つであってもよい。また、オブジェクトの頂点の輝度値は、光源の色や位置に基づいて従来の手法により求める。ここで、上述した視点座標及び透視座標について図2(a)及び図2(b)を用いて説明する。図2(a)に示すように、視点座標は視点Oを原点とし、視線の向きがZ軸となるような座標系の座標である。また、視点Oにおける視野の範囲は、視点Oを基点とした直線OAE、直線OBF、直線OCG、直線ODHに囲まれた範囲である。オブジェクトは視点Oを原点とした際の座標情報で表現される。なお、視点Oから四角形ABCDの間に位置するオブジェクトは描画の対象にはならず、四角形ABCDと四角形EFGHとの間に位置するオブジェクトのみが描画の対象になる。また、透視座標は、図2(b)に示すように、四角形ABCDの中心を原点O'としたものである。   The vertex processing unit 102 converts the received coordinate information of the vertex of the object and the coordinate information of the light source into viewpoint coordinates having the viewpoint position as the origin, calculates the luminance value of the vertex of the object in the viewpoint coordinates, and sets the viewpoint coordinates. The coordinate information of the vertex of the converted object is further converted into perspective coordinates. Here, the vertex processing unit 102 includes four vertex processing units 0 to 3, but the number is not limited to four and may be one. Further, the luminance value of the vertex of the object is obtained by a conventional method based on the color and position of the light source. Here, the viewpoint coordinates and the perspective coordinates described above will be described with reference to FIGS. 2 (a) and 2 (b). As shown in FIG. 2A, the viewpoint coordinates are coordinates in a coordinate system in which the viewpoint O is the origin and the direction of the line of sight is the Z axis. The field of view at the viewpoint O is a range surrounded by the straight line OAE, the straight line OBF, the straight line OCG, and the straight line ODH with the viewpoint O as a base point. The object is represented by coordinate information when the viewpoint O is the origin. Note that an object positioned between the viewpoint O and the rectangle ABCD is not a drawing target, and only an object positioned between the rectangle ABCD and the rectangle EFGH is a drawing target. Further, as shown in FIG. 2B, the perspective coordinates are obtained by setting the center of the rectangle ABCD as the origin O ′.

画素処理ユニット103は、透視座標に変換されたオブジェクトの描画範囲を決めるためのクリッピングを行う。なお、ここでは画素処理ユニット103が画素処理ユニット0〜3の4つから構成されているが、4つに限られるものではなく、1つであってもよい。クリッピングとは、画像を表示したり、図形を描画したりするときに、描画範囲をマスクすることを言う。画素処理ユニット103は、クリッピングされたオブジェクトをポリゴンに分割し、分割したポリゴンを決められた描画範囲の隅を原点とするスクリーン座標に変換する。ここで、スクリーン座標について図3を用いて説明する。図3に示すように、スクリーン座標は、上述した図2(b)の透視座標の原点O'を四角形ABCD(以下、スクリーンABCDとも言う)の隅にした座標系である。この場合のクリッピングされた描画範囲はスクリーンABCDの範囲である。また、画素処理ユニット103は、スクリーン座標に変換されたポリゴンが表ポリゴンであるか裏ポリゴンであるかを判定するためのポリゴンパラメータを算出する。   The pixel processing unit 103 performs clipping for determining the drawing range of the object converted into the perspective coordinates. Here, the pixel processing unit 103 includes four pixel processing units 0 to 3, but the number is not limited to four and may be one. Clipping refers to masking the drawing range when displaying an image or drawing a figure. The pixel processing unit 103 divides the clipped object into polygons, and converts the divided polygons into screen coordinates with the corner of the determined drawing range as the origin. Here, the screen coordinates will be described with reference to FIG. As shown in FIG. 3, the screen coordinates are a coordinate system in which the origin O ′ of the perspective coordinates in FIG. 2B described above is the corner of a quadrilateral ABCD (hereinafter also referred to as a screen ABCD). In this case, the clipped drawing range is the range of the screen ABCD. Further, the pixel processing unit 103 calculates a polygon parameter for determining whether the polygon converted into the screen coordinates is a front polygon or a back polygon.

ここで、ポリゴンパラメータの算出方法について図4及び図5を用いて説明する。図4は、スクリーン座標に変換されたポリゴンを示す図である。ポリゴンの頂点は、V[0]、V[1]、V[2]であり、それぞれx、y、z座標と輝度値iとから構成されている。図4に示すようなポリゴンを対象としてポリゴンパラメータを算出する。具体的なポリゴンパラメータの算出のフローについては図5を用いて説明する。図5に示すように、画素処理ユニット103は、処理する頂点V[j]の頂点番号jを0に初期化し、スクリーン座標上のポリゴンの頂点におけるy座標の最小値ymini及び最大値ymaxをV[0]のy[0]の値に初期化し、ポリゴンパラメータlv及びrvの値を0に初期化する(ステップS501)。画素処理ユニット103は、jの値が3より小さいか否かを判断する(ステップS502)。   Here, a polygon parameter calculation method will be described with reference to FIGS. FIG. 4 is a diagram showing polygons converted into screen coordinates. The vertices of the polygon are V [0], V [1], and V [2], and are composed of x, y, z coordinates and a luminance value i, respectively. Polygon parameters are calculated for a polygon as shown in FIG. A specific polygon parameter calculation flow will be described with reference to FIG. As shown in FIG. 5, the pixel processing unit 103 initializes the vertex number j of the vertex V [j] to be processed to 0, and sets the minimum value ymini and the maximum value ymax of the y coordinate at the vertex of the polygon on the screen coordinates to V. [0] is initialized to y [0], and polygon parameters lv and rv are initialized to 0 (step S501). The pixel processing unit 103 determines whether the value of j is smaller than 3 (step S502).

ステップS502において、jの値が3以上の場合には処理を終了する。一方、jの値が3より小さいと判断された場合、画素処理ユニット103は、y[j]とyminiとの値が等しいか否かを判断する(ステップS503)。等しくないと判断された場合、後述するステップS508へ進む。一方、等しいと判断された場合、画素処理ユニット103は、x[lv]がx[j]よりも大きいか否かを判断する(ステップS504)。x[lv]がx[j]以下と判断された場合、後述するステップS506へ進む。一方、x[lv]がx[j]よりも大きいと判断された場合、画素処理ユニット103は、lvにjを代入する(ステップS505)。   In step S502, when the value of j is 3 or more, the process ends. On the other hand, when it is determined that the value of j is smaller than 3, the pixel processing unit 103 determines whether or not the values of y [j] and ymini are equal (step S503). If it is determined that they are not equal, the process proceeds to step S508 described later. On the other hand, if it is determined that they are equal, the pixel processing unit 103 determines whether x [lv] is greater than x [j] (step S504). If it is determined that x [lv] is equal to or less than x [j], the process proceeds to step S506 described below. On the other hand, when it is determined that x [lv] is larger than x [j], the pixel processing unit 103 substitutes j for lv (step S505).

次に、画素処理ユニット103は、x[j]がx[rv]以上か否かを判断する(ステップS506)。x[j]がx[rv]より小さいと判断された場合、後述するステップS508へ進む。一方、x[j]がx[rv]以上と判断された場合、画素処理ユニット103は、rvにjを代入する(ステップS507)。次に、画素処理ユニット103は、y[j]がyminiより小さいか否かを判断する(ステップS508)。y[j]がymini以上と判断された場合、後述するステップS510へ進む。一方、y[j]がyminiより小さいと判断された場合、画素処理ユニット103は、yminiにy[j]を代入し、lv及びrvにjを代入する(ステップS509)。   Next, the pixel processing unit 103 determines whether x [j] is greater than or equal to x [rv] (step S506). If it is determined that x [j] is smaller than x [rv], the process proceeds to step S508 described later. On the other hand, when it is determined that x [j] is greater than or equal to x [rv], the pixel processing unit 103 substitutes j for rv (step S507). Next, the pixel processing unit 103 determines whether y [j] is smaller than ymini (step S508). If it is determined that y [j] is equal to or greater than ymini, the process proceeds to step S510 described below. On the other hand, when it is determined that y [j] is smaller than ymini, the pixel processing unit 103 substitutes y [j] for ymini and substitutes j for lv and rv (step S509).

次に、画素処理ユニット103は、y[j]がymaxより大きいか否かを判断する(ステップS510)。y[j]がymax以下と判断された場合、後述するステップS512へ進む。一方、y[j]がymaxより大きいと判断された場合、画素処理ユニット103は、ymaxにy[j]を代入する(ステップS511)。次に、画素処理ユニット103は、jに1を加えたものを3で割り、その余りをnに代入し、頂点jに対応するスクリーン座標上のyの増分dyであるy[n]−y[j]を計算する(ステップS512)。   Next, the pixel processing unit 103 determines whether y [j] is larger than ymax (step S510). When it is determined that y [j] is equal to or less than ymax, the process proceeds to step S512 described later. On the other hand, when it is determined that y [j] is larger than ymax, the pixel processing unit 103 substitutes y [j] for ymax (step S511). Next, the pixel processing unit 103 divides j by adding 1 and divides it by 3, and substitutes the remainder for n, and y [n] −y which is an increment dy of y on the screen coordinates corresponding to the vertex j [j] is calculated (step S512).

次に、画素処理ユニット103は、dyが0でないか否かを判断する(ステップS513)。dyが0であると判断された場合、画素処理ユニット103は頂点jに対応するスクリーン座標上のxの増分dx[j]に0を代入する(ステップS515)。一方、dyが0でないと判断された場合、画素処理ユニット103は、dx[j]に(x[n]−x[j])/dyの値を代入する(ステップS514)。次に画素処理ユニット103は、jに1を加えたものを新たなjとする(ステップS516)。そして、ステップS502以降の処理を繰り返す。これにより、ポリゴンパラメータであるlv、rvが算出される。   Next, the pixel processing unit 103 determines whether dy is not 0 (step S513). If it is determined that dy is 0, the pixel processing unit 103 substitutes 0 for an increment dx [j] of x on the screen coordinates corresponding to the vertex j (step S515). On the other hand, when it is determined that dy is not 0, the pixel processing unit 103 substitutes the value of (x [n] −x [j]) / dy for dx [j] (step S514). Next, the pixel processing unit 103 sets a value obtained by adding 1 to j as a new j (step S516). And the process after step S502 is repeated. Thereby, polygon parameters lv and rv are calculated.

このように、ポリゴンパラメータlv及びrvが算出された後、以下の式(1)及び式(2)を満たす場合に裏ポリゴンと判定され、式(3)を満たす場合に表ポリゴンと裏ポリゴンの中間の状態と画素処理ユニット103に判断される。なお、式(2)における「%」は、余りの記号である。すなわち、式(2)の右辺は、(3+rv−1)を3で割った際の余りの値のdxということになる。また、表ポリゴンと裏ポリゴンの中間の状態とは、図6に示すように、ポリゴン600の面とxz平面とが平行になる状態を言う。   As described above, after the polygon parameters lv and rv are calculated, it is determined that the back polygon is satisfied when the following expressions (1) and (2) are satisfied, and the front polygon and the back polygon are determined when expression (3) is satisfied. The intermediate state and the pixel processing unit 103 are determined. Note that “%” in Equation (2) is a remainder symbol. That is, the right side of Expression (2) is dx which is a remainder when (3 + rv−1) is divided by 3. Further, the state between the front polygon and the back polygon means a state in which the surface of the polygon 600 and the xz plane are parallel to each other as shown in FIG.

x[lv]=x[rv]・・・(1) x [lv] = x [rv] (1)

dx[lv]>dx[(3+rv−1)%3]・・・(2) dx [lv]> dx [(3 + rv−1)% 3] (2)

ymini=ymax・・・(3) ymini = ymax (3)

不透明オブジェクトの場合、式(1)及び式(2)を満たすポリゴンや式(3)を満たすポリゴン、すなわち表ポリゴン以外のポリゴンに対しては、後述するスクリーン座標の奥行値及び輝度値の算出をしないため、画像生成の効率が向上する。   In the case of an opaque object, the depth value and brightness value of the screen coordinates to be described later are calculated for polygons satisfying Expression (1) and Expression (2) and polygons satisfying Expression (3), that is, polygons other than the front polygon. Therefore, the efficiency of image generation is improved.

ここで、スクリーン座標の奥行値及び輝度値の算出について説明する。画素処理ユニット103は、対象のポリゴンの頂点座標に基づいて、ポリゴンのスクリーン座標における傾きdz/dx及びdz/dyを求め、傾きと頂点座標に基づいてポリゴンの頂点に囲まれた内部の奥行値を算出する。また、画素処理ユニット103は、ポリゴンの頂点の輝度値に基づいて、ポリゴンの頂点に囲まれた内部の輝度値を算出する。そして画素処理ユニット103は、算出したスクリーン座標に対応する奥行値を記憶部104より読み出し、算出した奥行値と比較し、算出した奥行値が小さい場合、算出した奥行値及び輝度値を記憶部104に格納する。なお、奥行値及び輝度値の算出は、従来からの方法を用いることができるため詳細な説明は省略する。また、ポリゴンのスクリーン座標における傾きdz/dx及びdz/dyは、上述したポリゴンパラメータを算出する過程で算出しておいてもよい。   Here, calculation of the depth value and the luminance value of the screen coordinates will be described. The pixel processing unit 103 obtains the inclinations dz / dx and dz / dy in the screen coordinates of the polygon based on the vertex coordinates of the target polygon, and the internal depth value surrounded by the polygon vertices based on the inclination and the vertex coordinates. Is calculated. Further, the pixel processing unit 103 calculates an internal luminance value surrounded by the vertices of the polygon based on the luminance values of the vertices of the polygon. Then, the pixel processing unit 103 reads the depth value corresponding to the calculated screen coordinates from the storage unit 104, compares the depth value with the calculated depth value, and when the calculated depth value is small, the calculated depth value and the luminance value are stored in the storage unit 104. To store. Note that the depth value and the luminance value can be calculated using conventional methods, and detailed description thereof is omitted. Further, the inclinations dz / dx and dz / dy of the polygon in the screen coordinates may be calculated in the process of calculating the polygon parameter described above.

画像出力部105は、記憶部104から読み出された輝度値に基づいて、画像を生成し、不図示の表示手段に画像を表示させる。なお、画像生成についても従来と同様の方法によって行われる。以上のように、本発明の画像生成装置によればポリゴンの法線ベクトルを計算することなく、ポリゴンの表裏判定を行うことができるため、画像生成の効率を向上させることができる。   The image output unit 105 generates an image based on the luminance value read from the storage unit 104 and displays the image on a display unit (not shown). Note that image generation is also performed by a method similar to the conventional method. As described above, according to the image generating apparatus of the present invention, it is possible to determine the front and back of a polygon without calculating the normal vector of the polygon, so that the efficiency of image generation can be improved.

本発明に係る画像生成装置は、ポリゴンの法線ベクトルを計算することなく、ポリゴンの表裏判定を行うことができるため、半透明オブジェクト及び不透明オブジェクトの画像生成効率を向上させる画像生成装置などに有用である。   The image generation apparatus according to the present invention can determine the front and back of a polygon without calculating the normal vector of the polygon, and thus is useful for an image generation apparatus that improves the image generation efficiency of semitransparent objects and opaque objects. It is.

本発明の実施の形態に係る画像生成装置の構成を示す構成図である。It is a block diagram which shows the structure of the image generation apparatus which concerns on embodiment of this invention. (a)本発明の実施の形態に係る画像生成装置における視点座標について説明するための図である。(b)本発明の実施の形態に係る画像生成装置における透視座標について説明するための図である。(A) It is a figure for demonstrating the viewpoint coordinate in the image generation apparatus which concerns on embodiment of this invention. (B) It is a figure for demonstrating the perspective coordinate in the image generation apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像生成装置におけるスクリーン座標について説明するための図である。It is a figure for demonstrating the screen coordinate in the image generation apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像生成装置におけるスクリーン座標に変換されたポリゴンを示す図である。It is a figure which shows the polygon converted into the screen coordinate in the image generation apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像生成装置におけるポリゴンパラメータの算出について説明するためのフローチャートである。It is a flowchart for demonstrating calculation of the polygon parameter in the image generation apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像生成装置における表ポリゴンと裏ポリゴンの中間の状態を示す図である。It is a figure which shows the intermediate state of the front polygon and the back polygon in the image generation apparatus which concerns on embodiment of this invention. 表ポリゴン及び裏ポリゴンについて説明するための図である。It is a figure for demonstrating a front polygon and a back polygon.

符号の説明Explanation of symbols

100 画像生成装置
101 シーンデータ受信部(受信手段)
102 頂点処理ユニット(第1の変換手段)
103 画素処理ユニット(クリッピング手段、第2の変換手段、第1の算出手段、第2の算出手段、判定手段、制御手段)
104 記憶部(記憶手段)
105 画像出力部
600、a〜g ポリゴン
700 オブジェクト
701 視点
702、705 視線
703、706 法線ベクトル
704、707 視線と法線ベクトルのなす角度
DESCRIPTION OF SYMBOLS 100 Image generation apparatus 101 Scene data receiving part (reception means)
102 vertex processing unit (first conversion means)
103 pixel processing unit (clipping means, second conversion means, first calculation means, second calculation means, determination means, control means)
104 Storage section (storage means)
105 Image output unit 600, a to g Polygon 700 Object 701 View point 702, 705 Line of sight 703, 706 Normal vector 704, 707 Angle formed by line of sight and normal vector

Claims (1)

複数のポリゴンから構成されるオブジェクトの頂点の3次元座標における座標情報を少なくとも含むオブジェクト情報、及び前記オブジェクトに対する視点及び光源の前記3次元座標における座標情報を少なくとも含む環境情報を受信する受信手段と、
前記受信手段で受信された前記オブジェクトの頂点の座標情報及び前記光源の座標情報を、前記視点の位置を原点とする視点座標に変換し、前記視点座標における前記オブジェクトの頂点の輝度値を計算し、前記視点座標に変換された前記オブジェクトの頂点の座標情報を透視座標に変換する第1の変換手段と、
前記第1の変換手段で前記透視座標に変換された前記オブジェクトの描画範囲を決めるためのクリッピングを行うクリッピング手段と、
前記クリッピング手段でクリッピングされた前記オブジェクトをポリゴンに分割し、分割した前記ポリゴンを決められた描画範囲の隅を原点とするスクリーン座標に変換する第2の変換手段と、
前記第2の変換手段で前記スクリーン座標に変換された前記ポリゴンが表ポリゴンであるか裏ポリゴンであるかを判定するためのポリゴンパラメータを算出する第1の算出手段と、
前記第1の算出手段で算出された前記ポリゴンパラメータに基づいて、前記ポリゴンが表ポリゴンか裏ポリゴンかを判定する判定手段と、
前記判定手段で表ポリゴンと判定された前記ポリゴンに対して、前記スクリーン座標における前記ポリゴンの頂点の座標情報に基づいて、前記ポリゴンの頂点に囲まれた内部の奥行値を算出し、計算された前記オブジェクトの頂点の輝度値を補間することにより前記ポリゴンの頂点に囲まれた内部の輝度値を算出する第2の算出手段と、
前記第2の算出手段で算出された前記表ポリゴンの奥行値及び輝度値を記憶手段に格納する制御手段とを、
備える画像生成装置。
Receiving means for receiving object information including at least coordinate information in the three-dimensional coordinates of vertices of an object composed of a plurality of polygons, and environment information including at least coordinate information in the three-dimensional coordinates of the viewpoint and light source for the object;
The coordinate information of the vertex of the object and the coordinate information of the light source received by the receiving means are converted into viewpoint coordinates with the viewpoint position as the origin, and a luminance value of the vertex of the object at the viewpoint coordinates is calculated. , First conversion means for converting the coordinate information of the vertices of the object converted into the viewpoint coordinates into perspective coordinates;
Clipping means for performing clipping for determining a drawing range of the object converted into the perspective coordinates by the first conversion means;
A second conversion unit that divides the object clipped by the clipping unit into polygons, and converts the divided polygons into screen coordinates with a corner of a predetermined drawing range as an origin;
First calculation means for calculating a polygon parameter for determining whether the polygon converted to the screen coordinates by the second conversion means is a front polygon or a back polygon;
Determination means for determining whether the polygon is a front polygon or a back polygon based on the polygon parameter calculated by the first calculation means;
For the polygon determined to be a front polygon by the determination means, an internal depth value surrounded by the vertex of the polygon is calculated based on the coordinate information of the vertex of the polygon in the screen coordinates, and calculated. Second calculating means for calculating an internal luminance value surrounded by the vertices of the polygon by interpolating luminance values of the vertices of the object;
Control means for storing the depth value and the luminance value of the front polygon calculated by the second calculation means in a storage means;
An image generation apparatus.
JP2004162270A 2004-05-31 2004-05-31 Image generation device Expired - Fee Related JP4449582B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004162270A JP4449582B2 (en) 2004-05-31 2004-05-31 Image generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004162270A JP4449582B2 (en) 2004-05-31 2004-05-31 Image generation device

Publications (2)

Publication Number Publication Date
JP2005346194A true JP2005346194A (en) 2005-12-15
JP4449582B2 JP4449582B2 (en) 2010-04-14

Family

ID=35498542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004162270A Expired - Fee Related JP4449582B2 (en) 2004-05-31 2004-05-31 Image generation device

Country Status (1)

Country Link
JP (1) JP4449582B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104036533B (en) * 2014-06-09 2017-02-15 东南大学 In and out discrimination method for intersection point, i.e. polygonal vertex, in polygon clipping

Also Published As

Publication number Publication date
JP4449582B2 (en) 2010-04-14

Similar Documents

Publication Publication Date Title
US10573067B1 (en) Digital 3D model rendering based on actual lighting conditions in a real environment
US20100321380A1 (en) Image Processing Method and Associated Apparatus for Rendering Three-dimensional Effect Using Two-dimensional Image
KR20180122048A (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
JP2007066064A (en) Image generating device and image generating program
JP2022511273A (en) Generate and modify object representations in augmented or virtual reality scenes
JPH08329276A (en) Three-dimensional graphic processor
JP2007317204A (en) Method and apparatus for three-dimensional graphic processing performing far and near correction
JP2006107093A (en) Image processor and program
JP2016081225A (en) Information presenting system
KR20070008707A (en) Graphics pipeline for rendering graphics
JP2008077405A (en) Image generation system, program, and information storage medium
JP4449582B2 (en) Image generation device
JP2003168130A (en) System for previewing photorealistic rendering of synthetic scene in real-time
JP4642431B2 (en) Map display device, map display system, map display method and program
JP2002010060A (en) Image fusing device and image fusing method
KR100848687B1 (en) 3-dimension graphic processing apparatus and operating method thereof
JPH06274653A (en) Graphic display device
JP2006163944A (en) Normal map data generating method, and drawing processing method and processor
KR100603134B1 (en) Method and apparatus for 3 dimension rendering processing using the monochromatic lighting
US11544822B2 (en) Image generation apparatus and image generation method
WO1998050890A1 (en) Spotlight characteristic forming method and image processor using the same
JP2005173866A (en) Three-dimensional image display device
JPH10214353A (en) Method and device for picture formation
JP2001118083A (en) Graphic data processor
JP2005235015A (en) Three-dimensional image generation device and three-dimensional image generation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060630

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090703

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091006

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: 20100105

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: 20100118

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130205

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140205

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees