JP4387363B2 - Image processing program, image processing method, and image processing apparatus - Google Patents
Image processing program, image processing method, and image processing apparatus Download PDFInfo
- Publication number
- JP4387363B2 JP4387363B2 JP2006047657A JP2006047657A JP4387363B2 JP 4387363 B2 JP4387363 B2 JP 4387363B2 JP 2006047657 A JP2006047657 A JP 2006047657A JP 2006047657 A JP2006047657 A JP 2006047657A JP 4387363 B2 JP4387363 B2 JP 4387363B2
- Authority
- JP
- Japan
- Prior art keywords
- rendering
- image
- planar
- model
- transparency
- 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.)
- Active
Links
Images
Description
本発明は、画像処理プログラム、画像処理装置及び画像処理方法、特に、ポリゴンを用いた画像処理プログラム、画像処理及び画像処理方法に関する。 The present invention relates to an image processing program, an image processing apparatus, and an image processing method, and more particularly to an image processing program, image processing, and image processing method using polygons.
従来、3次元画像において残像表現する場合には、ポリゴンからなる複数の3次元モデルを準備し、フレームごとに、複数の3次元モデルを2次元画像にレンダリングすると共に、各3次元モデルの透明度を変化させている。また、従来の3次元画像の残像表現では、ポリゴン単位でレンダリング画像に全体的に半透明の処理をしている。しかし、ポリゴン単位で透明度の処理を行う為、処理の負荷が大きい問題がある。また、テクスチャの透明度(アルファ値)をそのまま使用して表示画像の透明度を表現する方法もあるが、この場合には、表示画像の透明度の表現が乏しい問題がある。 Conventionally, when an afterimage is represented in a three-dimensional image, a plurality of three-dimensional models made of polygons are prepared, a plurality of three-dimensional models are rendered into a two-dimensional image for each frame, and the transparency of each three-dimensional model is set. It is changing. In the conventional afterimage representation of a three-dimensional image, the rendering image is totally translucently processed in units of polygons. However, since transparency processing is performed in units of polygons, there is a problem that the processing load is large. In addition, there is a method of expressing the transparency of the display image using the transparency (alpha value) of the texture as it is, but in this case, there is a problem that the transparency of the display image is poorly expressed.
従来の3次元画像処理は、例えば、特許文献1に記載されている。
本発明は、3次元画像処理において、処理負荷の増大を防止しつつ、透明度の表現を向上させることにある。 It is an object of the present invention to improve the expression of transparency while preventing an increase in processing load in 3D image processing.
第1発明に係る画像処理プログラムは、3次元モデルの位置及び角度を決定して第1のカメラ位置でレンダリングして、第1のレンダリング画像を生成する第1レンダリング手段と、1又は複数のポリゴンから構成される平面状モデルを記憶手段から読み出すモデル読出手段と、第1のレンダリング画像を平面状モデルに貼り付けると共に、1又は複数のポリゴンの少なくとも一部の頂点に透明度を設定して、頂点の透明度に基づいて平面状モデル上の各画素の透明度を設定し、各画素に設定された透明度を第1のレンダリング画像の各画素に割り当ててレンダリングする第2レンダリング手段と、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置し、第1のカメラ位置の視線と垂直になるように平面状モデルを回転させて、平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする第3レンダリング手段と、を備える。 An image processing program according to a first aspect of the present invention is a first rendering means for determining a position and an angle of a three-dimensional model and rendering at a first camera position to generate a first rendered image, and one or a plurality of polygons A model reading unit that reads a planar model configured from the storage unit, a first rendering image is pasted on the planar model, and transparency is set to at least some vertices of one or a plurality of polygons. Second rendering means for setting the transparency of each pixel on the planar model based on the transparency of the first model, assigning the transparency set to each pixel to each pixel of the first rendering image, and rendering the first rendering image A planar model is arranged according to the position and angle of the three-dimensional model corresponding to, so that it is perpendicular to the line of sight of the first camera position A planar model is rotated, and a third rendering unit for rendering the first rendering image pasted to the flat model, a.
ここで、3次元モデルは、例えば、複数のポリゴンからなる3次元のオブジェクトである。3次元のオブジェクトは、キャラクタオブジェクト、背景オブジェクトを含む。第1のレンダリング画像は、3次元モデルを第1のカメラ位置で2次元画像に変換した画像である。第1のカメラ位置は、現在表示対象としている1又は複数のフレームにおける表示画像を見る視線を定義する為の仮想的なカメラの位置である。フレームは、単位静止画面分の静止画像を意味する。言い換えれば、第1のカメラ位置は、第1レンダリング手段でレンダリングした画像を表示するフレームにおけるカメラ位置である。第1レンダリング手段で複数の画像をレンダリングして、各画像を複数のフレームで表示する場合には、第1のカメラ位置は当該複数のフレームに共通するカメラ位置である。 Here, the three-dimensional model is, for example, a three-dimensional object composed of a plurality of polygons. The three-dimensional object includes a character object and a background object. The first rendered image is an image obtained by converting the three-dimensional model into a two-dimensional image at the first camera position. The first camera position is a virtual camera position for defining a line of sight for viewing a display image in one or a plurality of frames that are currently displayed. A frame means a still image for a unit still screen. In other words, the first camera position is a camera position in a frame for displaying an image rendered by the first rendering means. When a plurality of images are rendered by the first rendering means and each image is displayed in a plurality of frames, the first camera position is a camera position common to the plurality of frames.
平面状モデルは、1又は複数のポリゴンから構成される。ポリゴンは、三角ポリゴン、矩形ポリゴン等何れの形状であっても良い。平面状モデルは、例えば、「日」の字形、即ち2つの矩形の領域が1つの辺を共通にして隣接する形状の平面状モデルで構成することが可能である。なお、平面状モデルは、2つの矩形の領域からなる場合に限らず、複数の矩形の領域が1方向に沿って隣接して配列された形状であっても良い。
「日」の字形の平面状モデルは、2つの領域を有しており、各領域が例えば矩形である。各領域は、1又は複数のポリゴンで構成され得る。また、平面状モデルは、例えば、「田」の字形、即ち4つの矩形の領域が1つの頂点を共通にして隣接する形状の平面状モデルで構成することが可能である。「田」の字形の平面状モデルは、4つの領域を有しており、各領域が例えば矩形である。なお、平面状モデルは、4つの矩形の領域からなる場合に限らず、複数の矩形の領域が2方向に沿って隣接して配列された形状であっても良い。各領域は、1又は複数のポリゴンで構成され得る。記憶手段は、CD−ROM、フラッシュメモリ等の不揮発性記憶装置、RAM等の揮発性記憶装置の何れであっても良い。
The planar model is composed of one or a plurality of polygons. The polygon may have any shape such as a triangular polygon or a rectangular polygon. The planar model can be constituted by, for example, a planar model having a shape of “day”, that is, two rectangular regions adjacent to each other with one side in common. The planar model is not limited to the case of two rectangular regions, and may be a shape in which a plurality of rectangular regions are arranged adjacent to each other in one direction.
The “day” -shaped planar model has two regions, and each region is, for example, a rectangle. Each region may be composed of one or a plurality of polygons. Further, the planar model can be constituted by a planar model having a shape of a “rice”, that is, a shape in which four rectangular areas are adjacent to each other with one vertex in common. The planar model of the “rice” shape has four regions, and each region is, for example, a rectangle. The planar model is not limited to the case of four rectangular regions, and may be a shape in which a plurality of rectangular regions are arranged adjacently along two directions. Each region may be composed of one or a plurality of polygons. The storage means may be any of a non-volatile storage device such as a CD-ROM and a flash memory, and a volatile storage device such as a RAM.
第2レンダリング手段は、第1のレンダリング画像を平面状モデルに貼り付ける。また、第2レンダリング手段は、平面状モデルに貼り付けられた第1のレンダリング画像の各画素にテクスチャデータを割り当てても良い。テクスチャデータは、例えば色データである。テクスチャデータは、3次元モデルを構成するポリゴンの各画素に割り当てられて予め記憶しておくことが可能である。第1のレンダリング画像の各画素には、それぞれ対応する3次元モデルの画素が存在する。第1のレンダリング画像の各画素には、対応する3次元モデルの画素の色データが割り当てられる。 The second rendering unit pastes the first rendering image on the planar model. The second rendering unit may assign texture data to each pixel of the first rendering image pasted on the planar model. The texture data is color data, for example. Texture data can be assigned to each pixel of the polygon constituting the three-dimensional model and stored in advance. Each pixel of the first rendering image has a corresponding three-dimensional model pixel. The color data of the corresponding three-dimensional model pixel is assigned to each pixel of the first rendered image.
また、第2レンダリング手段は、平面状モデルを構成する1又は複数のポリゴンの頂点のうち、少なくとも一部の頂点に透明度を設定する。透明度は、画像が仮想光源からの光を透過させる割合を示す尺度であり、例えば、アルファ値によって設定される。アルファ値は、例えば、0以上100以下の値をとるように設定することが可能である。例えば、アルファ値=0である場合には光を全く透過させない不透明とし、アルファ値=100である場合には光を完全に透過させる透明とし、アルファ値が0と100の間の値ではその値に応じた半透明とすることが可能である。 Further, the second rendering means sets the transparency to at least some of the vertices of one or a plurality of polygons constituting the planar model. Transparency is a scale indicating the rate at which an image transmits light from a virtual light source, and is set by an alpha value, for example. The alpha value can be set to take a value of 0 or more and 100 or less, for example. For example, when alpha value = 0, it is opaque that does not transmit light at all, and when alpha value = 100, it is transparent that transmits light completely. When the alpha value is between 0 and 100, the value is It is possible to make it translucent according to.
第2レンダリング手段は、ポリゴンの頂点に設定された透明度に基づいて、平面状モデルの各画素の透明度を設定する。平面状モデルの各画素の透明度は、平面状モデルの画素とポリゴンの頂点との間の距離、頂点に設定された透明度に応じて決定される。例を挙げると、第1の頂点に第1のアルファ値、第2の頂点に第2のアルファ値が設定され、第1の画素のアルファ値を決定する場合には、第1の画素と第1の頂点との間の距離d1、第1の頂点のアルファ値(第1のアルファ値α1)、第1の画素と第2の頂点との間の距離d2、第2の頂点のアルファ値(第2のアルファ値α2)とを考慮して決定することが可能である。例えば、各画素のアルファ値は、頂点のアルファ値を距離に応じて加重平均して算出する。d1+d2=dとすると、以下の式(1)で算出することが可能である。 The second rendering means sets the transparency of each pixel of the planar model based on the transparency set at the vertex of the polygon. The transparency of each pixel of the planar model is determined according to the distance between the pixel of the planar model and the vertex of the polygon, and the transparency set at the vertex. For example, when the first alpha value is set to the first vertex and the second alpha value is set to the second vertex, and the alpha value of the first pixel is determined, the first pixel and the second alpha value are determined. The distance d1 between the first vertex, the alpha value of the first vertex (first alpha value α1), the distance d2 between the first pixel and the second vertex, and the alpha value of the second vertex ( It is possible to determine in consideration of the second alpha value α2). For example, the alpha value of each pixel is calculated by weighted averaging the alpha values of the vertices according to the distance. If d1 + d2 = d, it can be calculated by the following equation (1).
α1×(d1/d)+α2×(d2/d)・・・(1)
また、第2レンダリング手段は、平面状モデルの各画素の透明度を、対応する第1のレンダリング画像の各画素に割り当てる。平面状モデルの各画素の透明度は、例えば、式(1)で算出される透明度である。
α1 × (d1 / d) + α2 × (d2 / d) (1)
The second rendering unit assigns the transparency of each pixel of the planar model to each pixel of the corresponding first rendering image. The transparency of each pixel of the planar model is, for example, the transparency calculated by Expression (1).
第3のレンダリング手段は、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置する。言い換えれば、第3のレンダリング手段は、第1レンダリング手段が3次元モデルをレンダリングした際の、当該3次元モデルの位置及び角度に合わせて、平面状モデルを配置する。また、第3のレンダリング手段は、配置された平面状モデルが第1のカメラ位置の視線と垂直になるように、当該平面状モデルを回転させる。その後、第3のレンダリング手段は、当該平面状モデルに貼り付けられた第1のレンダリング画像を、第1のカメラ位置でレンダリングする。 The third rendering unit arranges the planar model in accordance with the position and angle of the three-dimensional model corresponding to the first rendering image. In other words, the third rendering unit arranges the planar model in accordance with the position and angle of the three-dimensional model when the first rendering unit renders the three-dimensional model. The third rendering unit rotates the planar model so that the arranged planar model is perpendicular to the line of sight of the first camera position. Thereafter, the third rendering means renders the first rendering image attached to the planar model at the first camera position.
上記視線と平面状モデルは、垂直であることが望ましいが、完全に垂直である必要はなく、平面状モデルに貼り付けられた第1のレンダリング画像が適切に表示される範囲であれば、上記視線と平面状モデルとの間の角度は垂直からずれても良い。例えば、第1のレンダリング画像が、紙の上に書かれた絵を横から見て薄っぺらく見えるような状況が避けられる範囲であれば、上記視線と平面状モデルとの間の角度は垂直からずれても良い。すなわち、平面状モデルは、レンダリング後の画像を考慮して、上記視線に略垂直な範囲で配置することが可能である。 The line-of-sight and the planar model are preferably vertical, but need not be completely vertical, and the first rendering image pasted on the planar model is within a range where it can be appropriately displayed. The angle between the line of sight and the planar model may deviate from the vertical. For example, if the first rendering image is within a range where a picture written on paper can be seen to be thin when viewed from the side, the angle between the line of sight and the planar model is vertical. It may be displaced. That is, the planar model can be arranged in a range substantially perpendicular to the line of sight in consideration of the rendered image.
なお、第3のレンダリング手段によるレンダリング画像を出力する出力手段をさらに備えることが可能である。出力手段は、例えば、第3のレンダリング手段によるレンダリング画像を表示する表示手段とすることができる。また、本プログラムが実行される画像処理装置があり、第3のレンダリング手段によるレンダリング画像が外部の装置に転送される場合には、外部装置と通信する為の通信部とすることが可能である。 Note that output means for outputting a rendered image by the third rendering means can further be provided. The output unit can be, for example, a display unit that displays a rendered image by the third rendering unit. In addition, when there is an image processing apparatus that executes this program and the rendered image by the third rendering means is transferred to an external apparatus, it can be a communication unit for communicating with the external apparatus. .
第1発明によれば、3次元モデルのレンダリングデータを平面状モデルに貼り付けて、第1のカメラ位置の視線と平面状モデルとが垂直になるように配置して、仮想的な3次元画像を表現するので、処理負荷を抑制して仮想3次元画像を表現することが可能である。 According to the first invention, the rendering data of the three-dimensional model is pasted on the planar model, and the virtual three-dimensional image is arranged so that the line of sight of the first camera position and the planar model are perpendicular to each other. Therefore, it is possible to express a virtual three-dimensional image while suppressing the processing load.
また、平面状モデルを構成するポリゴンの少なくとも一部の頂点に透明度を設定して、頂点に設定された透明度に基づいて平面状モデルの各画素の透明度を算出、設定するので、頂点に設定する透明度を変更することにより、又は、ポリゴンの頂点の座標を変更してポリゴンを変形することにより、各画素の透明度を簡易に変更可能となる。また、各画素の透明度は、頂点に設定された透明度と、頂点からの距離に応じて変更されるので、、一様に透明度を変化させる場合に比較して、画像の透明度を多様に変化させることが可能である。言い換えれば、各画素の透明度は、頂点に設定された透明度と、頂点からの距離に応じて変更されるので、一様に透明度を変化させる場合に比較して、画像の透明度をより細かく即ち、より高精度に変化させることが可能である。 Also, transparency is set for at least some vertices of the polygons that make up the planar model, and the transparency of each pixel of the planar model is calculated and set based on the transparency set for the vertices. The transparency of each pixel can be easily changed by changing the transparency, or by changing the coordinates of the vertexes of the polygon to deform the polygon. In addition, since the transparency of each pixel is changed according to the transparency set for the vertex and the distance from the vertex, the transparency of the image is changed in various ways compared with the case where the transparency is changed uniformly. It is possible. In other words, since the transparency of each pixel is changed according to the transparency set at the vertex and the distance from the vertex, the transparency of the image is more finely compared with the case where the transparency is uniformly changed, that is, It is possible to change with higher accuracy.
第2発明に係る画像処理プログラムは、第1発明に係る画像処理プログラムにおいて、第1レンダリング手段は、3次元モデルの位置及び角度を変更することで、第1のカメラ位置で複数の第1のレンダリング画像を生成する。モデル読出手段は、各第1のレンダリング画像にそれぞれ対応する複数の平面状モデルを読出す。第2レンダリング手段は、各第1のレンダリング画像を各平面状モデルに貼り付けると共に、各第1のレンダリング画像に対応する平面状モデルを構成するポリゴンの少なくとも一部の頂点に透明度を設定して、頂点の透明度に基づいて当該平面状モデル上の各画素の透明度を設定し、各画素に設定された透明度を第1のレンダリング画像の各画素に割り当ててレンダリングする。第3のレンダリング手段は、各第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて各平面状モデルを配置し、第1のカメラ位置の視線と垂直になるように各平面状モデルを回転させて、複数の平面状モデルに貼り付けられた第1のレンダリングデータをレンダリングする。 An image processing program according to a second invention is the image processing program according to the first invention, wherein the first rendering means changes the position and angle of the three-dimensional model, so that a plurality of first Generate a rendered image. The model reading unit reads a plurality of planar models respectively corresponding to the first rendering images. The second rendering means pastes each first rendering image to each planar model, and sets transparency to at least some of the vertices of the polygon constituting the planar model corresponding to each first rendering image. The transparency of each pixel on the planar model is set based on the transparency of the vertex, and the transparency set for each pixel is assigned to each pixel of the first rendering image for rendering. The third rendering unit arranges each planar model according to the position and angle of the three-dimensional model corresponding to each first rendering image, and each planar shape is perpendicular to the line of sight of the first camera position. The model is rotated to render the first rendering data pasted on the plurality of planar models.
第1レンダリング手段は、複数の第1のレンダリング画像を生成する。第2のレンダリング手段は、各第1のレンダリング画像をそれぞれ別々の平面状モデルに貼り付ける。また、第2レンダリング手段は、各第1のレンダリング画像が貼り付けられた各平面状モデルごとに、ポリゴンの各頂点に透明度を設定し、各頂点の透明度に基づいて各画素の透明度を設定する。また、第2レンダリング手段は、各画素に設定された透明度を第1のレンダリング画像の各画素に割り当ててレンダリングする。第3のレンダリング手段は、各平面状モデルを、対応する3次元モデルの位置及び角度に合わせて配置し、各平面状モデルを現在フレームのカメラの視線と垂直になるように回転させてレンダリングする。 The first rendering means generates a plurality of first rendering images. The second rendering unit pastes each first rendering image on a separate planar model. Further, the second rendering means sets the transparency for each vertex of the polygon for each planar model to which each first rendering image is pasted, and sets the transparency of each pixel based on the transparency of each vertex. . The second rendering means assigns the transparency set for each pixel to each pixel of the first rendering image and renders the result. The third rendering means arranges each planar model in accordance with the position and angle of the corresponding three-dimensional model, and rotates each planar model so as to be perpendicular to the camera line of sight of the current frame for rendering. .
第2発明によれば、第1のレンダリング画像ごとに別々の平面状モデルに貼り付けてレンダリングすることにより、多様な画像を処理負荷の増大を抑制しつつ表示することが可能である。言い換えれば、第1のレンダリング画像ごとに別々の平面状モデルに貼り付けてレンダリングすることにより、第1レンダリング画像ごとに透明度を細かく即ち高精度に設定することができ、処理負荷の増大を抑制しつつ表示することが可能である。 According to the second aspect of the invention, it is possible to display various images while suppressing an increase in processing load by pasting and rendering each first rendering image on a separate planar model. In other words, by rendering the first rendering image by pasting it on a separate planar model, the transparency can be set finely, that is, with high accuracy for each first rendering image, and an increase in processing load is suppressed. Can be displayed.
また、1フレームに複数の第1のレンダリング画像を表示し、各第1のレンダリング画像ごとに透明度を容易に変更できるので、複数の第1のレンダリング画像のうちの1つを実像として他の第1のレンダリング画像を残像として表現することが可能である。複数の第1のレンダリング画像のうち実像として表現する第1のレンダリング画像を順次変化させれば、同一フレーム周波数でオブジェクトの速い動きを表現することができる。 In addition, since a plurality of first rendering images can be displayed in one frame and the transparency can be easily changed for each first rendering image, one of the plurality of first rendering images can be used as another real image. One rendering image can be expressed as an afterimage. If the first rendering image expressed as a real image among the plurality of first rendering images is sequentially changed, it is possible to express the fast movement of the object at the same frame frequency.
第3発明に係る画像処理プログラムは、第1又は2発明の何れかに係る画像処理プログラムにおいて、第2レンダリング手段は、平面状モデル上の各画素の透明度を、頂点に設定された透明度と、頂点からの各画素までの距離とに基づいて設定する。 An image processing program according to a third invention is the image processing program according to any one of the first and second inventions, wherein the second rendering means is configured such that the transparency of each pixel on the planar model is set to the vertex, It is set based on the distance from the vertex to each pixel.
第3発明によれば、平面状モデルを構成するポリゴンの各頂点の透明度に基づいて、平面状モデル上の各画素の透明度を簡易にかつ多様に変更することが可能である。例えば、上述した式(1)による加重平均計算によって算出することが可能である。言い換えれば、平面状モデルを構成するポリゴンの各頂点の透明度に基づいて、平面状モデル上の各画素の透明度を簡易にかつより細かく即ち、より高精度に変更することが可能である。例えば、上述した式(1)による加重平均計算によって算出することが可能である。 According to the third invention, it is possible to easily and variously change the transparency of each pixel on the planar model based on the transparency of each vertex of the polygon constituting the planar model. For example, it can be calculated by the weighted average calculation according to the above-described equation (1). In other words, the transparency of each pixel on the planar model can be changed easily and more finely, that is, with higher accuracy, based on the transparency of each vertex of the polygon constituting the planar model. For example, it can be calculated by the weighted average calculation according to the above-described equation (1).
第4発明に係る画像処理プログラムは、第3発明に係る画像処理プログラムにおいて、第2レンダリング手段は、ポリゴンの少なくとも一部の頂点の位置を変更することで平面状モデルの形状を変更する。 An image processing program according to a fourth aspect is the image processing program according to the third aspect, wherein the second rendering means changes the shape of the planar model by changing the positions of at least some vertices of the polygon.
平面状モデルを構成するポリゴンの頂点の位置を変更することにより平面状モデルを変形する。これにより、各頂点に同様の透明度を設定したとしても、平面状モデルの各画素と頂点との間の距離が変化するので、各画素の透明度を変化させることが可能である。結果、第1のレンダリング画像の透明度を多様に変化させることが可能である。言い換えれば、第1のレンダリング画像の透明度をより細かく即ち、より高精度に変化させることが可能である。また、平面状モデルの形状が変化すれば、平面状モデルの各画素と、第1のレンダリング画像の各画素との対応関係が変わり得るので、これによっても第1のレンダリング画像の透明度を多様に変化させることが可能である。言い換えれば、平面状モデルの形状が変化すれば、平面状モデルの各画素と、第1のレンダリング画像の各画素との対応関係が変わり得るので、これによっても第1のレンダリング画像の透明度をより細かく即ち、より高精度に変化させることが可能である。 The planar model is deformed by changing the positions of the vertices of the polygons constituting the planar model. Thereby, even if the same transparency is set for each vertex, the distance between each pixel of the planar model and the vertex changes, so that the transparency of each pixel can be changed. As a result, it is possible to variously change the transparency of the first rendered image. In other words, the transparency of the first rendered image can be changed more finely, that is, with higher accuracy. Also, if the shape of the planar model changes, the correspondence between each pixel of the planar model and each pixel of the first rendering image can change, and this also makes the transparency of the first rendering image various. It is possible to change. In other words, if the shape of the planar model changes, the correspondence between each pixel of the planar model and each pixel of the first rendering image can change, which also increases the transparency of the first rendering image. It is possible to change it finely, that is, with higher accuracy.
第5発明に係る画像処理プログラムは、第3発明に係る画像処理プログラムにおいて、モデル読出手段は、予め記憶されている複数の形状のモデルから1又は複数の平面状モデルを選択することで1又は複数の平面状モデルを設定する。 The image processing program according to the fifth invention is the image processing program according to the third invention, wherein the model reading means selects one or more planar models from a plurality of models stored in advance. Set multiple planar models.
予め記憶された複数の形状の平面状モデルを選択して読み出して、第1のレンダリング画像を貼り付ける平面状モデルを変えることによって、平面状モデルを変形させる場合同様に、第1のレンダリング画像の透明度を多様に変化させることが可能である。言い換えれば、予め記憶された複数の形状の平面状モデルを選択して読み出して、第1のレンダリング画像を貼り付ける平面状モデルを変えることによって、平面状モデルを変形させる場合同様に、第1のレンダリング画像の透明度をより細かく即ち、より高精度に変化させることが可能である。 Similarly to the case where the planar model is deformed by selecting and reading out a plurality of pre-stored planar models and changing the planar model to which the first rendering image is pasted, the first rendering image It is possible to change the transparency in various ways. In other words, as in the case where the planar model is deformed by selecting and reading out a plurality of planar models stored in advance and changing the planar model to which the first rendering image is pasted, the first model It is possible to change the transparency of the rendered image more finely, that is, with higher accuracy.
第6発明に係る画像処理プログラムは、第1乃至5発明何れかに係る画像処理プログラムにおいて、第3レンダリング手段が、複数のレンダリング画像が連続的に配置されるように複数の平面状モデルを配置することで、オブジェクトの残像を表示制御する。 An image processing program according to a sixth invention is the image processing program according to any one of the first to fifth inventions, wherein the third rendering means arranges a plurality of planar models so that a plurality of rendered images are arranged continuously. By doing so, display control of the afterimage of the object is performed.
第2レンダリング手段が、複数の第1のレンダリング画像を別々の平面状モデルに貼り付けて、第3レンダリング手段が、複数の第1のレンダリング画像が連続的に配置されるように、かつ各第1のレンダリング画像の透明度を変化させて各平面状モデルを配置することにより、第1のレンダリング画像で表現されるオブジェクトが移動する際の残像を表現することが可能である。透明度の変化は、例えば、後のフレームの第1のレンダリング画像よりも、前のフレームの第1のレンダリング画像ほど透明度を大きくする。ここで、後のフレームとは、複数のフレームからなるフレーム群のうち相対的に遅い時刻に表示されるフレームであり、前のフレームとは、複数のフレームからなるフレーム群のうち相対的に早い時刻に表示されるフレームである。例えば、第1乃至第3フレームからなるフレーム群において、第1フレーム、第2フレーム、第3フレームの順番に表示される場合には、第1フレームは第2フレームの前のフレームであり、第2フレームは第1フレームの後のフレームであり、第2フレームは第3フレームの前のフレームであり、第3フレームは第2フレームの後のフレームである。即ち、第1フレームが最も前のフレームであり、第3フレームが最も後のフレームである。又は、最も後のフレームから1又は複数のフレームの第1のレンダリング画像の透明度を小さくし、他の第1のレンダリング画像の透明度を大きくする。これによれば、オブジェクトが既に通過した地点では透明に近く、残像として視認させることが可能になる。 The second rendering means pastes the plurality of first rendering images to separate planar models, and the third rendering means arranges the plurality of first rendering images so that each of the first rendering images is arranged continuously. By arranging each planar model by changing the transparency of one rendering image, it is possible to represent an afterimage when the object represented by the first rendering image moves. For example, the change in the transparency increases the transparency of the first rendered image of the previous frame as compared to the first rendered image of the subsequent frame. Here, the subsequent frame is a frame that is displayed at a relatively late time among a group of frames composed of a plurality of frames, and the previous frame is a relatively early frame among a group of frames composed of a plurality of frames. It is a frame displayed at the time. For example, in a frame group including the first to third frames, when the first frame, the second frame, and the third frame are displayed in this order, the first frame is a frame before the second frame, The second frame is a frame after the first frame, the second frame is a frame before the third frame, and the third frame is a frame after the second frame. That is, the first frame is the earliest frame and the third frame is the last frame. Alternatively, the transparency of the first rendering image of one or more frames from the last frame is decreased, and the transparency of the other first rendering image is increased. According to this, at the point where the object has already passed, it is almost transparent and can be visually recognized as an afterimage.
第7発明に係る画像処理プログラムは、第6発明に係る画像処理プログラムにおいて、第3レンダリング手段は、複数の第1のレンダリング画像の一端が繋がるように複数の平面状モデルを配置する。 An image processing program according to a seventh aspect is the image processing program according to the sixth aspect, wherein the third rendering means arranges the plurality of planar models so that one ends of the plurality of first rendering images are connected.
複数の第1のレンダリング画像の一端が繋がるようにすれば、各第1のレンダリング画像の接続箇所を関節として複数の関節からなるオブジェクトの動作を簡易かつ多様に表現することが可能となる。例えば、鎖がうねる様子を簡易に表現することが可能である。言い換えれば、複数の第1のレンダリング画像の一端が繋がるようにすれば、各第1のレンダリング画像の接続箇所を関節として複数の関節からなるオブジェクトの動作を簡易かつ高精度に表現することが可能となる。例えば、鎖がうねる様子を簡易に表現することが可能である。 If one end of the plurality of first rendering images is connected, the operation of the object composed of the plurality of joints can be expressed in a simple and diverse manner with the connection location of each first rendering image as a joint. For example, it is possible to simply express how the chains swell. In other words, if one end of a plurality of first rendering images is connected, the operation of an object composed of a plurality of joints can be expressed easily and with high accuracy using the connection location of each first rendering image as a joint. It becomes. For example, it is possible to simply express how the chains swell.
第8発明に係る画像処理プログラムは、第1乃至7発明何れかに係る画像処理プログラムにおいて、第2レンダリング手段は、現在フレーム以前の何れかのフレームでレンダリングされた第1のレンダリング画像を、現在フレームの1又は複数の平面状モデルに貼り付ける。 An image processing program according to an eighth aspect of the present invention is the image processing program according to any one of the first to seventh aspects of the present invention, wherein the second rendering means displays the first rendered image rendered in any frame before the current frame, Affix to one or more planar models of the frame.
現在フレームでの表示に用いる平面状モデルに、以前のフレームで既にレンダリングされた第1のレンダリング画像を貼り付ける。残像表現の場合には、複数のフレームにわたって、同一のレンダリング画像が何度も繰り返し表示される場合がある。このような場合に、以前にレンダリングした第1のレンダリング画像を再度使用して残像表現を実行することで、処理負荷を低減することができる。同一の第1のレンダリング画像を用いる場合であっても、平面状モデルの各画素の透明度の変更は前記同様に行うことができ、第1のレンダリング画像の透明度を多様に、かつ柔軟に変更することが可能である。言い換えれば、同一の第1のレンダリング画像を用いる場合であっても、平面状モデルの各画素の透明度の変更は前記同様に行うことができ、第1のレンダリング画像の透明度をより細かく即ち、より高精度に、かつ柔軟に変更することが可能である。 The first rendering image already rendered in the previous frame is pasted on the planar model used for display in the current frame. In the case of afterimage representation, the same rendered image may be repeatedly displayed over a plurality of frames. In such a case, the processing load can be reduced by executing the afterimage expression by using the first rendered image rendered before again. Even when the same first rendering image is used, the transparency of each pixel of the planar model can be changed in the same manner as described above, and the transparency of the first rendering image can be changed in various and flexible ways. It is possible. In other words, even when the same first rendering image is used, the transparency of each pixel of the planar model can be changed in the same manner as described above, and the transparency of the first rendering image is made finer, ie, more It is possible to change with high accuracy and flexibility.
第9発明に係る画像処理プログラムは、第1乃至8発明何れかに係る画像処理プログラムにおいて、第2レンダリング手段は、フレームごとに平面状モデルの頂点に設定する透明度を変化させる。 An image processing program according to a ninth invention is the image processing program according to any one of the first to eighth inventions, wherein the second rendering means changes the transparency set to the vertex of the planar model for each frame.
フレームごとに平面状モデルの頂点に設定する透明度を変更することで、残像表現をよりリアルに行うことができる。例えば、前のフレームほど透明度を大きくして、オブジェクトが段々不透明になっていくように表現すれば、残像表現をよりリアルに行うことができる。1フレームに複数の第1のレンダリング画像を表示する場合には、何れかの第1のレンダリング画像を実像として他の第1のレンダリング画像を徐々に薄くするようにし、実像として表示する第1のレンダリング画像をフレームごとに変更する。これにより、同一のフレーム周波数で処理負荷を抑制しつつより多くの残像を表示することが可能となる。 By changing the transparency set to the vertex of the planar model for each frame, the afterimage can be expressed more realistically. For example, afterimages can be expressed more realistically by increasing the transparency of the previous frame so that the object becomes gradually opaque. When a plurality of first rendering images are displayed in one frame, the first rendering image is displayed as a real image by gradually reducing the thickness of the other first rendering image using one of the first rendering images as a real image. Change the rendered image frame by frame. This makes it possible to display more afterimages while suppressing the processing load at the same frame frequency.
第10発明に係る画像処理方法は、第1レンダリング手段が、3次元モデルの位置及び角度を決定して第1のカメラ位置でレンダリングして、第1のレンダリング画像を生成するステップと、モデル読出手段が、1又は複数のポリゴンから構成される平面状の平面状モデルを読み出すステップと、第2レンダリング手段が、第1のレンダリング画像を前記平面状モデルに貼り付けると共に、1又は複数のポリゴンの少なくとも一部の頂点に透明度を設定して、頂点の透明度に基づいて平面状モデル上の各画素の透明度を設定し、各画素に設定された透明度を第1のレンダリング画像の各画素に割り当ててレンダリングするステップと、第3レンダリング手段が、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置し、第1のカメラ位置の視線と垂直になるように平面状モデルを回転させて、平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングするステップと、を含む。 According to a tenth aspect of the present invention, there is provided an image processing method in which a first rendering means determines a position and an angle of a three-dimensional model, renders the first three-dimensional model at a first camera position, and generates a first rendered image; Means for reading a planar planar model composed of one or a plurality of polygons; and a second rendering means for pasting the first rendering image on the planar model and for the one or a plurality of polygons Set transparency for at least some of the vertices, set the transparency of each pixel on the planar model based on the transparency of the vertices, and assign the transparency set for each pixel to each pixel of the first rendered image The rendering step, and the third rendering means is arranged in a plane in accordance with the position and angle of the three-dimensional model corresponding to the first rendered image. The model is arranged, including by rotating the planar model so that the line of sight perpendicular to the first camera position, the method comprising: rendering a first rendering image pasted to the flat model, a.
第10発明に係る画像処理方法によれば、第1発明と同様の作用効果を奏する。 According to the image processing method of the tenth invention, the same effects as the first invention are achieved.
第11発明に係る画像処理装置は、3次元モデルの位置及び角度を決定して第1のカメラ位置でレンダリングして、第1のレンダリング画像を生成する第1レンダリング手段と、記憶手段から1または複数のポリゴンから構成される平面状モデルを読み出すモデル読出手段と、第1のレンダリング画像を平面状モデルに貼り付けると共に、1又は複数のポリゴンの少なくとも一部の頂点に透明度を設定して、頂点の透明度に基づいて平面状モデル上の各画素の透明度を設定し、各画素に設定された透明度を第1のレンダリング画像の各画素に割り当ててレンダリングする第2レンダリング手段と、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置し、第1のカメラ位置の視線と垂直になるように平面状モデルを回転させて、平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする第3レンダリング手段と、を備える。記憶手段は、当該画像処理装置に設けられても良いし、当該画像処理装置に着脱自在の記憶媒体であっても良い。また、記憶手段は、当該画像処理装置とは別の装置に設けられても良い。この場合、モデル読出手段は、通信回線を介して別の装置の記憶手段から平面状モデルを読み出す。 An image processing apparatus according to an eleventh aspect of the invention is characterized in that a first rendering unit that determines a position and an angle of a three-dimensional model and renders at a first camera position to generate a first rendered image, and 1 or A model reading means for reading a planar model composed of a plurality of polygons, a first rendering image is pasted on the planar model, and transparency is set to at least some vertices of one or a plurality of polygons. Second rendering means for setting the transparency of each pixel on the planar model based on the transparency of the first model, assigning the transparency set to each pixel to each pixel of the first rendering image, and rendering the first rendering image A planar model is arranged according to the position and angle of the three-dimensional model corresponding to, so that it is perpendicular to the line of sight of the first camera position The planar model is rotated, and a third rendering unit for rendering the first rendering image pasted to the flat model, a. The storage unit may be provided in the image processing apparatus or may be a storage medium that is detachable from the image processing apparatus. The storage unit may be provided in a device different from the image processing device. In this case, the model reading unit reads the planar model from the storage unit of another device via the communication line.
第11発明に係る画像処理装置によれば、第1発明と同様の作用効果を奏する。 The image processing apparatus according to the eleventh aspect has the same operational effects as the first aspect.
本発明によれば、3次元画像処理において、処理負荷の増大を防止しつつ、透明度の表現を向上させることが可能である。 According to the present invention, in three-dimensional image processing, it is possible to improve the expression of transparency while preventing an increase in processing load.
(1)第1実施形態
図1は、本発明の一実施形態に係る画像処理装置1の概略構成図である。
(1) First Embodiment FIG. 1 is a schematic configuration diagram of an
この画像処理装置1は、制御部10と、記憶部20と、画像表示部30と、音声出力部40と、操作入力部50と、通信部60と、バス70と、を備えている。
The
制御部10は、画像処理装置1全体の動作を制御する構成である。制御部10は、バス70を介して、記憶部20、画像表示部30、音声出力部40、操作入力部50、通信部60と信号を送受信して、各部20,30,40,50,60を制御する。
The
制御部10は、例えば、CPU11と、信号処理プロセッサ12と、画像処理プロセッサ13と、から構成することが可能である。
The
CPU11は、バス70を介して、記憶部20、画像表示部30、音声出力部40、操作入力部50、通信部60と信号を送受信して、各部20,30,40,50,60を直接制御すると共に、信号処理プロセッサ12及び画像処理プロセッサ13を制御することで、画像及び音声の少なくとも一方を生成し、生成した画像を画像表示部30に出力させる。CPU11は、後述する画像処理プログラムを実行することで、第1レンダリング手段2303’、モデル読出手段2304’、第2レンダリング手段2305’、第3レンダリング手段2306’(図示せず)として機能する。CPU11は、適宜、信号処理プロセッサ12、画像処理プロセッサ13に制御信号を出力して、信号処理プロセッサ12、画像処理プロセッサ13に処理を実行させることで、第1レンダリング手段2303’、モデル読出手段2304’、第2レンダリング手段2305’、第3レンダリング手段2306’として機能する。
The
信号処理プロセッサ12は、主に3次元空間上における計算、3次元空間上での位置から疑似3次元空間上での位置への変換の為の計算、光源計算処理、並びに音声データの生成、加工処理を行う。信号処理プロセッサ12は、第1レンダリング手段2303’、モデル読出手段2304’、第2レンダリング手段2305’、第3レンダリング手段2306’の一部を構成し得る。
The
画像処理プロセッサ13は、信号処理プロセッサ12における計算結果に基づいて、記憶部20のRAM21(後述)の表示エリアに対して描画すべき画像データの書き込み処理、例えば、ポリゴンで指定されるRAM21のエリアに対するテクスチャデータの書き込み処理を行う。画像処理プロセッサ13は、第1レンダリング手段2303’、モデル読出手段2304’、第2レンダリング手段2305’、第3レンダリング手段2306’の一部を構成し得る。
Based on the calculation result in the
記憶部20は、画像処理プログラムを記憶する記憶手段として機能すると共に、画像処理プログラムを実行する際に制御部10の作業領域として機能する。画像処理プログラムは、図2を参照して後述するように、画像処理制御プログラム2301と、画像処理用データ部2302とを含む。画像処理制御プログラム2301及び画像処理用データ部2302の詳細については後述する。記憶部20には、制御部10が画像処理プログラムを実行する際に、計算結果や、中間的なレンダリング画像が記憶される。また、記憶部20には、制御部10によって計算された最終的なレンダリング画像、すなわち画像表示部30に出力するレンダリング画像が記憶される。
The
記憶部20は、例えば、RAM21と、インターフェース部22と、記憶媒体23と、から構成することが可能である。
The
RAM21は、ランダム・アクセス・メモリ(Random Access Memory)である。RAM21は、例えば、半導体素子を利用した揮発性記憶装置であり、制御部10のメインメモリ(主記憶装置)として機能する。RAM21は、画像処理プログラムを実行する際に制御部10の作業領域として機能する。RAM21には、制御部10が画像処理プログラムを実行する際に、計算結果や、中間的なレンダリング画像が記憶される。また、RAM21には、制御部10によって計算された最終的なレンダリング画像、すなわち画像表示部30に出力するレンダリング画像が記憶される。主記憶装置としては、RAMのような揮発性記憶装置の変わりに、不揮発性記憶装置を使用することができる。主記憶装置は、揮発性記憶装置または不揮発性記憶装置の何れであっても、本実施形態に係る3次元画像処理を適切に実行するのに必要な動作速度を有することが好ましい。
The
記憶媒体23は、画像処理装置1に着脱自在な記憶媒体である。記憶媒体23は、例えば、CD−ROM等の光学的に読取可能な記憶媒体、ROM、フラッシュメモリ等の半導体素子を利用した記憶媒体の何れであっても良い。記憶媒体23は、後述する画像処理プログラムを記憶しておく為に、不揮発性の記憶装置であることが好ましい。
The storage medium 23 is a storage medium that is detachable from the
インターフェース部22は、記憶媒体23とバス70との間の信号の送受信をインターフェースする。インターフェース部22は、記憶媒体23から読み出した信号をバス70が受信可能な信号に変換してバス70に出力すると共に、バス70から受信した信号を記憶媒体23が受信可能な信号に変換を施して記憶媒体23に出力する。制御部10は、インターフェース部22を介して、記憶媒体23から画像処理プログラムを読み出して、RAM21に記憶する。実際には、CPU11が、DMAC(Direct Memory Access Controller)等を制御して、DMACによって記憶媒体23とRAM21との間のデータの送受信を制御することが可能である。
The
表示制御部30は、画像処理プログラムを実行することにより制御部10が画像処理した結果のレンダリング画像を表示する。表示制御部30は、フレームメモリとして機能するRAM21の表示エリアに書き込まれた最終的なレンダリング画像を受け取って表示する。
The
表示制御部30は、例えば、モニタ31と、インターフェース部32と、から構成することが可能である。
The
モニタ31は、ブラウン管(CRT)、液晶表示パネル(LCD)等のフラットパネルの何れで構成しても良い。モニタ31は、画像処理プログラムを実行することにより制御部10が画像処理した結果のレンダリング画像を表示する。モニタ31は、フレームメモリとして機能するRAM21の表示エリアに書き込まれた最終的なレンダリング画像を受け取って記憶させる。モニタ31にアナログ信号で表現される信号を表示する場合には、モニタ31とインターフェース部32との間にデジタル/アナログ換部を設けることが好ましい。インターフェース部32は、モニタ31とバス70との間の信号の送受信をインターフェースする。インターフェース部32は、RAM21から読み出した信号をバス70が受信可能な信号に変換してバス70に出力すると共に、バス70から受信した信号をモニタ31が受信可能な信号に変換してモニタ31に出力すると共に、モニタ31からの信号に所定の変換を施してバス70に出力する。
The monitor 31 may be composed of any flat panel such as a cathode ray tube (CRT) or a liquid crystal display panel (LCD). The monitor 31 displays a rendering image as a result of image processing by the
音声出力部40は、制御部10の処理によって生成された音声データをバス70を介して受け取り、或いは、制御部10の処理によって生成されてRAM21に一時的に記憶されている音声データを読み出して、デジタル/アナログ変換処理、増幅処理を施した後、音声に変換して出力する。音声出力部40は、例えば、インターフェース部41と、デジタル/アナログ変換部42と、アンプ43と、スピーカ44と、から構成されることができる。
The
インターフェース部41は、デジタル/アナログ変換部42とバス70との間の信号の送受信をインターフェースする。インターフェース部41は、バス70を介して受け取った音声データ(デジタル信号)をデジタル/アナログ変換部42が受信可能なデジタル信号に変換して、デジタル/アナログ変換部42に出力する。
The interface unit 41 interfaces transmission / reception of signals between the digital /
デジタル/アナログ変換部42は、インターフェース部41を介して受信した音声データ(デジタル信号)をアナログ信号に変換して、アンプ43に出力する。
The digital /
アンプ43は、デジタル/アナログ変換部42でアナログ信号に変換された音声データを増幅して、スピーカ44に出力する。
The
スピーカ44は、アンプ43で増幅された音声データを音声に変換して出力する。
The speaker 44 converts the sound data amplified by the
操作入力部50は、ユーザからの操作の入力を受け付け、操作に対応した操作信号をバス70を介して制御部10に出力する。操作入力部50は、例えば、インターフェース部51と、操作部52と、から構成することが可能である。インターフェース部51は、バス70と操作部52との間の信号の送受信を制御する。インターフェース部51は、操作部52から出力される操作信号を、バス70が受信可能な操作信号に変換して、バス70に出力する。操作部52は、ユーザからの操作を受け付ける押釦、レバー等の操作対象部を含んで構成される。操作対象部は、ユーザからの操作を操作信号として出力できる構成であれば、各種タッチパッド、音声認識手段等如何なる構成であっても良い。
The
通信部60は、画像処理装置1と通信回線との通信を制御する構成である。通信部60は、外部機器から受信した信号をバス70に出力する。通信回線は、有線または無線の何れであっても良い。通信部60は、例えば、画像処理プログラムを通信回線から受信し、画像処理プログラムをRAM21に記憶させることが可能である。
The
図2は、画像処理プログラムの構成例を示す図である。 FIG. 2 is a diagram illustrating a configuration example of an image processing program.
この画像処理プログラム2300は、例えば、記憶媒体23に記憶しておき、制御部10によって記憶部23から読み出されてRAM21に記憶される。また、画像処理プログラムは、制御部10によってRAM21から読み出されて実行されることが可能である。また、画像処理プログラムは、通信部60を介して受信してRAM21に記憶され、制御部10によってRAM21から読み出されて実行されることが可能である。
For example, the
この画像処理プログラム2300は、3次元モデルの位置及び角度を決定して第1のカメラ位置でレンダリングして、第1のレンダリング画像を生成する。第1のカメラ位置は、現在表示対象としている1又は複数のフレームにおける表示画像を見る視線を定義する為の仮想的なカメラの位置である。フレームは、単位静止画面分の静止画像を意味する。言い換えれば、第1のカメラ位置は、第1レンダリング手段でレンダリングした画像を表示するフレームにおけるカメラ位置である。第1レンダリング手段で複数の画像をレンダリングして、各画像を複数のフレームで表示する場合には、第1のカメラ位置は当該複数のフレームに共通するカメラ位置である。
The
また、画像処理プログラム2300は、1又は複数のポリゴンから構成される平面状モデルを記憶手段(記憶媒体23又はRAM21)から読み出す。
The
また、画像処理プログラム2300は、第1のレンダリング画像を前記平面状モデルに貼り付けると共に、1又は複数のポリゴンの各頂点に透明度を設定して、各頂点の透明度に基づいて前記平面状モデル上の各画素の透明度を設定し、前記各画素に設定された透明度を前記第1のレンダリング画像の各画素に割り当ててレンダリングする。
Further, the
また、画像処理プログラム2300は、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて前記平面状モデルを配置し、第1のカメラ位置の視線と垂直になるように前記平面状モデルを回転させて、前記平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする。
The
画像処理プログラム2300は、画像処理制御プログラム2301と、画像処理用データ部2302とを含むことが可能である。
The
画像処理制御プログラム2301は、画像処理用データ部2302に記憶されたデータを用いて、上述した画像処理を実行する。画像処理プログラム2301は、第1レンダリング手段2303と、モデル読出手段2304と、第2レンダリング手段2305と、第3レンダリング手段2306とを備えている。第1レンダリング手段2303は、制御部10を第1レンダリング部として機能させる。モデル読出手段2304は、制御部10をモデル読出部として機能させる。第2レンダリング手段2305は、制御部10を第2レンダリング部として機能させる。第3レンダリング手段2306は、制御部10を第3レンダリング部として機能させる。
The image
画像処理用データ部2302は、画像処理プログラム2301が画像処理を実行する際に使用するデータである。画像処理用データ部2302は、3次元モデルデータ部2307と、平面状モデルデータ部2308と、テクスチャデータ部2309と、を備えている。3次元モデルデータ部2307は、複数種類の3次元のモデルデータを含んでいる。平面状モデルデータ部2308は、1又は複数のポリゴンからなる平面状のモデルを指定するデータを含んでいる。テクスチャデータ部2309は、テクスチャデータを記憶している。3次元モデルデータ部2307、平面状モデルデータ部2308、テクスチャデータ部2309について以下詳細に説明する。
The image
3次元モデルデータ部2307は、複数種類の3次元のモデルデータを含んでいる。
The 3D
図3は、3次元モデルデータ部2307に含まれる3次元モデルデータの一例である。図3(a)及び(b)は、人間の腕を複数の状態で表現した3次元モデル1001、1002である。3次元モデル1001、1002特定する3次元モデルデータは、3次元モデル1001、1002に含まれる複数のポリゴンの頂点を指定する座標データから構成される。3次元モデル1001は腕を伸ばした状態の3次元モデルであり、3次元モデル1002は腕を曲げた状態の3次元モデルである。
FIG. 3 is an example of 3D model data included in the 3D
平面状モデルデータ部2308は、1又は複数のポリゴンからなる平面状のモデルを指定するデータを含んでいる。
The planar
図4乃至図6は、平面状モデルデータ部2308に含まれる平面状モデルの具体例を示す図面である。
4 to 6 are diagrams illustrating specific examples of the planar model included in the planar
図4(a)は、平面状モデルの第1の例としての平面状モデル80を示す。
FIG. 4A shows a
この平面状モデル80は、4つの三角形のポリゴン81〜84から構成される。ポリゴン81は、頂点P81、P83、P84を含む。ポリゴン82は、頂点P81,P82,P84を含む。ポリゴン83は、頂点P83,P85,P86を含む。ポリゴン84は、頂点P83,P84,P86を含む。
The
この平面状モデル80は、ポリゴン81とポリゴン82とからなる矩形の第1領域と、ポリゴン83とポリゴン84とからなる矩形の第2領域とを含む。第1領域と第2領域とは、辺e82によって区画されている。また、第1領域は辺e82と対向する端部としての辺e81を含んでおり、第2領域は辺e82と対向する端部としての辺e83を含んでいる。平面状モデル80は、第1領域と第2領域とからなる「日」の字形、即ち2つの矩形の領域が1つの辺を共通にして隣接する形状の平面状モデルである。なお、平面状モデル80は、2つの矩形の領域からなる場合に限らず、複数の矩形の領域が1方向に沿って隣接して配列された形状であっても良い。
The
平面状モデル80を指定する平面状モデルデータは、各ポリゴン81〜84の各頂点の座標を指定する座標データから構成される。平面状モデル80に含まれるポリゴンの頂点P81,P82,P83,P84,P85,P86の少なくとも一部には、後述するように透明度としてのアルファ値が割り当てられる。
The planar model data that designates the
図7は、頂点P81,P82,P83,P84,P85,P86にアルファ値を割り当てた場合の具体例を示す。本実施形態では、アルファ値は、0以上100以下の値をとる。アルファ値=0である場合には光を全く透過させない不透明であり、アルファ値=100である場合には光を完全に透過させる透明、アルファ値が0と100の間の値ではその値に応じた半透明である。 FIG. 7 shows a specific example when alpha values are assigned to the vertices P81, P82, P83, P84, P85, and P86. In the present embodiment, the alpha value takes a value between 0 and 100. When the alpha value is 0, it is opaque that does not transmit light at all. When the alpha value is 100, it is transparent so that light is completely transmitted. When the alpha value is between 0 and 100, it depends on the value. Translucent.
図7中の平面状モデル80に示したように、この例では、頂点P81,P82,P83,P84にアルファ値=0を割り当て、頂点P85,P86にアルファ値=100を割り当てている。
As shown in the
同図中に記載したグラフは、平面状モデル80の各画素に設定されるアルファ値の変化を辺e81からe83に向かって表したものである。各画素のアルファ値は、各頂点からの距離と、各頂点に割り当てられたアルファ値とに基づいて計算される。図7の例では、頂点P81と頂点P82とに割り当てられるアルファ値が同一であり、頂点P83と頂点P84とに割り当てられるアルファ値が同一であり、かつ、頂点P85と頂点P86とに割り当てられるアルファ値が同一であるので、辺e81、e82、e83に沿った方向では、各画素のアルファ値が変化しない。従って、辺e81からe83に向かう方向で図7(b)に示すようにアルファ値が変化する。図7(b)に示すように、アルファ値は、辺e81からe82の間の第1領域においてアルファ値=0であり、辺e82から辺e83に向かってアルファ値=100まで増加する。辺e82から辺e83の間でのアルファ値の増加は、直線(1)のように一定の増加率で変化しても良いし、曲線(2)に示すように下に凸の曲線で変化しても良く、曲線(3)に示すように上に凸の曲線で変化しても良い。
The graph shown in the figure represents the change of the alpha value set for each pixel of the
図4(b)は、図4(a)に示す平面状モデル80を変形した平面状モデルの例としての平面状モデル80’である。
FIG. 4B is a planar model 80 'as an example of a planar model obtained by modifying the
平面状モデル80’は、当該平面状モデル80’を構成するポリゴンの各頂点P81’〜P86’の少なくとも一部の頂点の座標が、図4(a)の平面状モデル80のポリゴンの対応する頂点の座標とは異なる。各頂点P81’〜P86’のうち1つの頂点のみが平面状モデル80の頂点の座標と異なっても良いし、全ての頂点が平面状モデル80の頂点の座標と異なっても良い。
In the
少なくとも一部の頂点の座標が異なる平面状モデル80と平面状モデル80’とでは、各頂点に同一のアルファ値を設定したとしても、各平面状モデルにおいて各画素と頂点との間の距離が異なるので、各画素のアルファ値を変化させることが可能である。結果、第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。また、後述するように、各平面状モデル上に第1のレンダリング画像を貼り付ける場合には、平面状モデルの形状が変化すれば、平面状モデルの各画素と、第1のレンダリング画像の各画素との対応関係が変わり得る。これによっても第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。従って、平面状モデル80を平面状モデル80’に変形するように、平面状モデルを構成するポリゴンの各頂点の座標を変更して平面状モデルを変形することにより、平面状モデルに貼り付けられる第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、平面状モデル80を平面状モデル80’に変形するように、平面状モデルを構成するポリゴンの各頂点の座標を変更して平面状モデルを変形することにより、平面状モデルに貼り付けられる第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。その結果、画像の透明度を多様に表現することが可能である。言い換えれば、画像の透明度をより細かく即ち、より高精度に表現することが可能である。
In the
図5(a)は、平面状モデルの第2の例としての平面状モデル90を示す。
FIG. 5A shows a
平面状モデル90は、2つの矩形のポリゴン91、92から構成される。ポリゴン91は、頂点P91、P92、P93、P94を含む。ポリゴン92は、頂点P93、P94、P95、P96を含む。平面状モデル90は、ポリゴン91、92からなる「日」の字形のポリゴンである。
The
平面状モデル90を指定する平面状モデルデータは、各ポリゴン91、92の各頂点P91、P92、P93、P94、P95、P96の座標を指定する座標データから構成される。平面状モデル90に含まれるポリゴンの頂点P91、P92、P93、P94、P95、P96の少なくとも一部には、透明度としてのアルファ値が割り当てられる。
The planar model data that designates the
図5(b)は、平面状モデルの第3の例としての平面状モデル110を示す。
FIG. 5B shows a
平面状モデルは、1つの矩形のポリゴン111から構成される。ポリゴン111は、頂点P111、P112、P113、P114を含む。
The planar model is composed of one
平面状モデル110を指定する平面状モデルデータは、各ポリゴン111の各頂点P111、P112、P113、P114を指定する座標データから構成される。平面状モデル110に含まれるポリゴンの頂点P111、P112、P113、P114には、透明度としてのアルファ値が割り当てられる。
The planar model data designating the
図6(a)は、平面状モデルの第4の例としての平面状モデル120を示す。
FIG. 6A shows a
この平面状モデル120は、4つの矩形状のポリゴンからなる「田」の字形、即ち4つの矩形の領域が1つの頂点を共通にして隣接する形状の平面状モデルである。4つの矩形状のポリゴンは、ポリゴン121、ポリゴン122、ポリゴン123、ポリゴン124である。各ポリゴン121〜124は、それぞれが1又は複数のポリゴンから構成されても良い。平面状モデル120を特定する平面状モデルデータは、ポリゴン121、122の各ポリゴンの頂点の座標を指定する座標データによって構成される。なお、平面状モデル80は、4つの矩形の領域からなる場合に限らず、複数の矩形の領域が2方向に沿って隣接して配列された形状であっても良い。
This
ポリゴン121は、頂点P120、P121、P123、P124を含む。ポリゴン122は、頂点P121、P122、P124、P125を含む。ポリゴン123は、頂点123、P124、P126、P127を含む。ポリゴン124は、頂点P124、P125、P127、P128を含む。各頂点P121〜P128には、アルファ値が設定される。例えば、ポリゴン121に含まれる各画素のアルファ値は、ポリゴン121の各頂点P121、P122、P124、P125に設定されたアルファ値を用いて算出される。
The
平面状モデル120の各画素のアルファ値は、頂点P120〜P128の9つの頂点のアルファ値に基づいて設定される。一方、前述した平面状モデル80の各画素のアルファ値は、頂点P81〜P86の6つの頂点のアルファ値に基づいて設定される。従って、平面状モデル120の各画素のアルファ値は、平面状モデル80の場合よりもより多くの頂点のアルファ値に基づいて設定される為、平面状モデル120の方がより多様なアルファ値を変化させることができる。言い換えれば、平面状モデル120の各画素のアルファ値は、平面状モデル80の場合よりもより多くの頂点のアルファ値に基づいて設定される為、平面状モデル120の方がよりアルファ値をより細かく即ち、より高精度に変化させることができる。また、平面状モデル120の頂点P124は、平面状モデル120の端部ではなく内部にある為、端部のみに頂点がある場合よりも、各画素のアルファ値をより詳細に設定することが可能である。その結果、画像の透明度を多様に表現することが可能である。言い換えれば、画像の透明度をより細かく即ち、より高精度に表現することが可能である。
The alpha value of each pixel of the
図6(b)は、平面状モデル120を形した平面状モデル120’である。
FIG. 6B shows a
平面状モデル120’は、当該平面状モデル120’を構成するポリゴンの各頂点P121’〜P128’の少なくとも一部の頂点の座標が、平面状モデル120のポリゴンの頂点の座標とは異なる。各頂点P121’〜P128’のうち1つの頂点のみが平面状モデル120の頂点の座標と異なっても良いし、全ての頂点が平面状モデル120の頂点の座標と異なっても良い。
In the
少なくとも一部の頂点の座標が異なる平面状モデル120と平面状モデル120’とでは、各頂点に同一のアルファ値を設定したとしても、各平面状モデルにおいて各画素と頂点との間の距離が異なるので、各画素のアルファ値を変化させることが可能である。結果、第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。また、後述するように、各平面状モデル上に第1のレンダリング画像を貼り付ける場合には、平面状モデルの形状が変化すれば、平面状モデルの各画素と、第1のレンダリング画像の各画素との対応関係が変わり得る。これによっても第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。従って、平面状モデル120を平面状モデル120’に変形するように、平面状モデルを構成するポリゴンの各頂点の座標を変更して平面状モデルを変形することにより、平面状モデルに貼り付けられる第1のレンダリング画像のアルファ値を多様に変化させることが可能である。言い換えれば、平面状モデル120を平面状モデル120’に変形するように、平面状モデルを構成するポリゴンの各頂点の座標を変更して平面状モデルを変形することにより、平面状モデルに貼り付けられる第1のレンダリング画像のアルファ値をより細かく即ち、より高精度に変化させることが可能である。その結果、画像の透明度を多様に変化させることが可能である。言い換えれば、画像の透明度をより細かく即ち、より高精度に変化させることが可能である。
In the
図2において、テクスチャデータ部2309は、テクスチャデータを記憶している。テクスチャデータは、例えば、色データである。色データは、3次元モデルデータを構成するポリゴンの各画素に割り当てられる。色データは、3次元モデルデータを構成するポリゴンの各画素の座標に対応付けて記憶されている。
In FIG. 2, the
上述した3次元モデルデータ部2307、平面状モデルデータ部2308、テクスチャデータ部2309に含まれるデータは、記憶媒体23に記憶された状態で読み出されても良いし、RAM21に一旦読み出されて記憶された後、RAM21から読み出されても良い。
The data included in the above-described three-dimensional
次に、画像処理制御プログラム2301の各構成について説明する。
Next, each configuration of the image
第1レンダリング手段2303は、3次元モデルの位置及び角度を決定して第1ののカメラ位置でレンダリングして、第1のレンダリング画像を生成する。
The
第1レンダリング手段2303は、図3に示すような3次元モデル1001及び1002を第1のカメラ位置でレンダリングする。このレンダリングの結果得られるレンダリング画像を第1のレンダリング画像とする。
The
例えば、第1レンダリング手段2303は、3次元モデル1002を特定する3次元モデルデータを3次元モデルデータ部2307から読み出して、図8(a)に示すように、手の平が現在のカメラ位置を向くように配置し、現在のカメラ位置でレンダリングして、3次元モデル1002に対応する第1のレンダリング画像1002aを出力する。第1レンダリング手段2303は、例えば、第1のレンダリング画像1002aをRAM21に記憶する。第1レンダリング手段2303は、3次元モデル1001を特定する3次元モデルデータを3次元モデルデータ部2307から読み出して、図8(b)に示すように、手の平が現在のカメラ位置を向くように配置し、現在のカメラ位置でレンダリングして、3次元モデル1002に対応する第1のレンダリング画像1001bを出力する。第1レンダリング手段2303は、例えば、第1のレンダリング画像1001bをRAM21に記憶する。第1レンダリング手段2303は、3次元モデル1002を特定する3次元モデルデータを3次元モデルデータ部2307から読み出して、図8(c)に示すように、手の甲が現在のカメラ位置を向くように配置し、現在のカメラ位置でレンダリングして、3次元モデル1002に対応する第1のレンダリング画像1002cを出力する。第1レンダリング手段2303は、例えば、第1のレンダリング画像1002cをRAM21に記憶する。
For example, the
モデル読出手段2304は、平面状モデルデータ部2308から、1又は複数のポリゴンから構成される平面状モデルデータを読み出す。モデル読出手段2304は、記憶媒体23から平面状モデルデータを読み出すことが可能である。また、モデル読出手段2304は、RAM21に読み出されて記憶されている平面状モデルデータを読み出しても良い。平面状モデルデータは、前述したように、平面状モデル80、90、110、120等の平面状モデルを特定するデータである。平面状モデル80を変形した平面状モデルのデータ(例えば、平面状モデル80’、平面状モデル120’)も、平面状モデルデータ部2308に予め記憶しておくことが可能である。例えば、平面状モデルデータ部2308は、平面状モデル80の頂点の座標を変更した複数の形状の平面状モデルを含むことが可能である。
The
第2レンダリング手段2305は、第1のレンダリング画像を平面状モデルに貼り付ける。具体的には、第2レンダリング手段2305は、第1のレンダリング画像の各画素を平面状モデルの各画素に割り当てる。
The
例えば、第2レンダリング手段2305は、3次元モデル1002をレンダリングした第1のレンダリング画像1002aを、平面状モデル80の各画素に割り当てる。また、第2レンダリング手段2305は、第1のレンダリング画像1002aの各画素が割り当てられた平面状モデル80の各画素にテクスチャデータを割り当てる。
For example, the
また、第2のレンダリング手段2305は、1又は複数のポリゴンの各頂点にアルファ値を設定して、頂点のアルファ値に基づいて平面状モデル上の各画素のアルファ値を設定する。例えば、第2レンダリング手段2305は、図7に示すように、平面状モデル80を構成する各ポリゴン81〜84の各頂点P81〜P86にアルファ値を設定する。また、第2レンダリング手段2305は、各頂点P81〜P86のアルファ値と、各画素と各頂点P81〜P86との距離に基づいて、各画素のアルファ値を算出し、設定する。図7の例では、ポリゴン81に含まれる各画素は、各画素から頂点P81〜P84までの距離と、各頂点P81〜P84のアルファ値とに基づいて算出される。ある画素から各頂点P81〜P84までの距離がそれぞれd81〜d84、d81〜d84の合計をd、各頂点P81〜P84の各アルファ値をα1〜α4とすると、当該画素のアルファ値を式(2)で計算する。
The
α1×(d1/d)+α2×(d2/d)+α3×(d3/d)+α4×(d4/d)
・・・(2)
また、ポリゴン82に含まれる各画素のアルファ値も同様に算出される。
α1 × (d1 / d) + α2 × (d2 / d) + α3 × (d3 / d) + α4 × (d4 / d)
... (2)
Further, the alpha value of each pixel included in the
また、第2レンダリング手段2305は、例えば式(2)によって算出され各画素に設定されたアルファ値を第1のレンダリング画像の各画素に割り当てる。
The
この結果、第2レンダリング手段2305により、平面状モデル80には、第1のレンダリング画像1001aの各画素が割り当てられ、それらの画素にはテクスチャデータ及びアルファ値が割り当てられる。第2レンダリング手段2305は、平面状モデル80を構成するポリゴンの各頂点の座標と、平面状モデル80の各画素の座標に対応付けられたテクスチャデータ及びアルファ値をRAM21に記憶させる。
As a result, the second rendering means 2305 assigns each pixel of the first rendered image 1001a to the
第3レンダリング手段2306は、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置し、現在のカメラ位置の視線と垂直になるように平面状モデルを回転させて、平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする。
The
第3レンダリング手段2306は、第1レンダリング手段2303でレンダリングした際の3次元モデル1002の位置及び角度(手の平側がカメラを向く位置及び角度)に合わせて、第1のレンダリング画像1002aがレンダリングされた平面状モデル80を配置する。また、第3レンダリング手段2306は、第1レンダリング手段2303でレンダリングした際の3次元モデル1001の位置及び角度(手の平側がカメラを向く位置及び角度)に合わせて、第1のレンダリング画像1001bがレンダリングされた平面状モデル80を配置する。また、第3レンダリング手段2306は、第1レンダリング手段2303でレンダリングした際の3次元モデル1001の位置及び角度(手の甲側がカメラを向く位置及び角度)に合わせて、第1のレンダリング画像1002cがレンダリングされた平面状モデル80を配置する。
The
また、第3レンダリング手段2306は、処理の結果得られるレンダリング画像をRAM21に記憶する。
The
図10は、本実施形態に係る画像処理のフローチャートである。 FIG. 10 is a flowchart of image processing according to the present embodiment.
ステップS101では、第1レンダリング手段2303が、第1のカメラ位置(以下、現在カメラ位置と称す)を設定する。第1のカメラ位置は、現在表示対象としている1又は複数のフレームにおける表示画像を見る視線を定義する為の仮想的なカメラの位置である。フレームは、単位静止画面分の静止画像を意味する。言い換えれば、第1のカメラ位置は、第1レンダリング手段でレンダリングした画像を表示するフレームにおけるカメラ位置である。第1レンダリング手段で複数の画像をレンダリングして、各画像を複数のフレームで表示する場合には、第1のカメラ位置は当該複数のフレームに共通するカメラ位置である。 In step S101, the first rendering means 2303 sets a first camera position (hereinafter referred to as the current camera position). The first camera position is a virtual camera position for defining a line of sight for viewing a display image in one or a plurality of frames that are currently displayed. A frame means a still image for a unit still screen. In other words, the first camera position is a camera position in a frame for displaying an image rendered by the first rendering means. When a plurality of images are rendered by the first rendering means and each image is displayed in a plurality of frames, the first camera position is a camera position common to the plurality of frames.
ステップS102では、第1レンダリング手段2303が、ステップS101で設定された第1のカメラ位置で、図3(a)及び(b)に示す3次元モデル1001及び1002をレンダリングする。
In step S102, the
第1レンダリング手段2303は、3次元モデル1002を手の平側が現在のカメラ位置の方向を向くように配置して(図8(a)に対応)、3次元モデル1002をレンダリングすることで、第1のレンダリング画像1002aを生成する。
The
また、第1レンダリング手段2303は、3次元モデル1001を手の平側が現在のカメラ位置の方向を向くように配置して(図8(b)に対応)、3次元モデル1001をレンダリングすることで、第1のレンダリング画像1001bを生成する。
Further, the
また、第1レンダリング手段2303は、3次元モデル1001を手の甲側が現在のカメラ位置の方向を向くように配置して(図8(c)に対応)、3次元モデル1002をレンダリングすることで、第1のレンダリング画像1002cを生成する。
The
ステップS103では、モデル読出手段2304が、3次元モデルデータ部2307から平面状モデルを読み出す。
In step S103, the
ここでは、モデル読出手段2304は、第1のレンダリング画像1002a、1001b、1002cのそれぞれを貼り付ける為の平面状モデル80を読み出す。モデル読出手段2304は、第1のレンダリング画像1002a、1001b、1002cのそれぞれに対して、異なるタイプ、若しくは同一タイプで異なる形状の平面状モデルを読み出しても良い。ここでは、モデル読出手段2304は、第1のレンダリング画像1002a、1001b、1002cのそれぞれに対して、同一の平面状モデル80を読み出す。また、モデル読出手段2304は、第1のレンダリング画像1002aに対して読み出した平面状モデル80を801とし、第1のレンダリング画像1001bに対して読み出した平面状モデル80を802とし、第1のレンダリング画像1002cに対して読み出した平面状モデル80を803とする。
Here, the
ステップS104では、第2レンダリング手段2305が第1レンダリング画像を平面状モデルに貼り付ける。
In step S104, the
図8(a)に示すように、第2レンダリング手段2305が、平面状モデル801に第1のレンダリング画像1002aを貼り付ける。第2レンダリング手段2305は、第1のレンダリング画像1002aの各画素を平面状モデル801の各画素に割り当てる。また、第2レンダリング手段2305は、第1のレンダリング画像1002aの各画素の色データをテクスチャデータ部2309から読み出して、平面状モデル801の画素のうち、第1のレンダリング画像1002aの各画素が割り当てられた画素に色データを割り当てる。
As shown in FIG. 8A, the
図8(b)に示すように、第2レンダリング手段2305が、平面状モデル802に第1のレンダリング画像1001bを貼り付ける。第2レンダリング手段2305は、第1のレンダリング画像1001bの各画素を平面状モデル802の各画素に割り当てる。また、第2レンダリング手段2305は、第1のレンダリング画像1001bの各画素の色データをテクスチャデータ部2309から読み出して、平面状モデル802の画素のうち、第1のレンダリング画像1002bの各画素が割り当てられた画素に色データを割り当てる。
As shown in FIG. 8B, the
図8(c)に示すように、第2レンダリング手段2305が、平面状モデル803に第1のレンダリング画像1002cを貼り付ける。第2レンダリング手段2305は、第1のレンダリング画像1002cの各画素を平面状モデル803の各画素に割り当てる。また、第2レンダリング手段2305は、第1のレンダリング画像1002cの各画素の色データをテクスチャデータ部2309から読み出して、平面状モデル803の画素のうち、第1のレンダリング画像1002cの各画素が割り当てられた画素に色データを割り当てる。
As shown in FIG. 8C, the
図8(a)〜(c)において、オブジェクト820は肩関節820を示す。この例では、第1のレンダリング画像1002a、1001b、1002cが、肩関節820側の端部を枢軸として枢回運動する動きを表現する。
8A to 8C, an
ステップS105では、第2レンダリング手段2305が、平面状モデルを構成するポリゴンの少なくとも一部の頂点にアルファ値を設定し、頂点のアルファ値に基づいて平面状モデルの各画素のアルファ値を設定する。
In step S105, the
例えば、第2レンダリング手段2305は、各平面状モデル801、802、803を構成する各ポリゴン(図4(a)に示すポリゴン81〜84)の各頂点にアルファ値を設定する。また、第2レンダリング手段2305が、各平面状モデル801、802、803上の各画素のアルファ値を、前述したように、各画素から頂点までの距離と、頂点に設定されたアルファ値とに基づいて算出する。
For example, the
第2レンダリング手段2305は、平面状モデル801を構成する各ポリゴンの頂点にアルファ値を設定し、頂点に設定されたアルファ値と、頂点から各画素までの距離とに基づいて各画素のアルファ値を算出し、設定する。
The second rendering means 2305 sets an alpha value at the vertex of each polygon constituting the
また、第2レンダリング手段2305は、平面状モデル802を構成する各ポリゴンの頂点にアルファ値を設定し、頂点に設定されたアルファ値と、頂点から各画素までの距離とに基づいて各画素のアルファ値を算出し、設定する。
The
また、第2レンダリング手段2305は、平面状モデル803を構成する各ポリゴンの頂点にアルファ値を設定し、頂点に設定されたアルファ値と、頂点から各画素までの距離とに基づいて各画素のアルファ値を算出し、設定する。
Also, the second rendering means 2305 sets an alpha value at the vertex of each polygon constituting the
ここでは、平面状モデル801から803の順番に第1のレンダリング画像が移動しているとして、移動先の第1のレンダリング画像ほど、即ち後のフレームの第1レンダリング画像ほどアルファ値が小さく(不透明に近づく)、移動元の第1のレンダリング画像ほど、即ち前のフレームの第1レンダリング画像ほどアルファ値が大きく(透明に近づく)なるように設定する。第1〜第3フレームでは、平面状モデル803の第1のレンダリング画像1002cを実像として、平面状モデル801のアルファ値>平面状モデル802のアルファ値>平面状モデル803のアルファ値とする。
Here, assuming that the first rendering images are moved in the order of the
(第1フレームの画像の生成)
ステップS106では、第3レンダリング手段2306は、第1のレンダリング画像に対応する3次元モデルの位置及び角度に合わせて平面状モデルを配置する。第3レンダリング手段2306は、ステップS102でレンダリングした際の3次元モデル1002の位置及び角度に合わせて、第1のレンダリング画像1002aが貼り付けられた平面状モデル801を配置する。次に、第3レンダリング手段2306は、平面状モデル801を現在のカメラ位置の視線と垂直になるように回転させる。このように配置された平面状モデル801を図8(a)に示す。
(Generation of first frame image)
In step S106, the
ステップS107では、第3レンダリング手段2306は、第1のカメラ位置の視線と垂直になるように平面状モデルを回転させて、平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする。第3レンダリング手段2306は、平面状モデル801に貼り付けられた第1のレンダリング画像1002aをレンダリングする。そして、第3レンダリング手段2306は、第1のレンダリング画像1002aをレンダリングした最終画像を第1フレームの画像としてRAM21に記憶させる。
In step S107, the
(第2フレームの画像の生成)
再び、ステップS106に戻り、第2フレームの画像を生成する。
(Generation of second frame image)
Returning to step S106 again, the second frame image is generated.
ステップS106では、第3レンダリング手段2306は、ステップS102でレンダリングした際の3次元モデル1002の位置及び角度に合わせて、第1のレンダリング画像1001bが貼り付けられた平面状モデル802を配置する。次に、第3レンダリング手段2306は、平面状モデル802を現在のカメラ位置の視線と垂直になるように回転させる。このように配置された平面状モデル802を図8(b)に示す。
In step S106, the
ステップS107では、第3レンダリング手段2306は、平面状モデル802に貼り付けられた第1のレンダリング画像1002bをレンダリングする。そして、第3レンダリング手段2306は、第1のレンダリング画像1002bをレンダリングした最終画像を第2フレームの画像としてRAM21に記憶させる。
In step S107, the
(第3フレームの画像の生成)
再び、ステップS106に戻り、第3フレームの画像を生成する。
(Generation of third frame image)
Returning to step S106 again, an image of the third frame is generated.
ステップS106では、第3レンダリング手段2306は、ステップS102でレンダリングした際の3次元モデル1001の位置及び角度に合わせて、第1のレンダリング画像1002cが貼り付けられた平面状モデル803を配置する。次に、第3レンダリング手段2306は、平面状モデル803を現在のカメラ位置の視線と垂直になるように回転させる。このように配置された平面状モデル803を図8(c)に示す。
In step S106, the
ステップS107では、第3レンダリング手段2306は、平面状モデル803に貼り付けられた第1のレンダリング画像1002cをレンダリングする。そして、第3レンダリング手段2306は、第1のレンダリング画像1002cをレンダリングした最終画像を第3フレームの画像としてRAM21に記憶させる。
In step S107, the
以上のように、ステップS101で設定した第1のカメラ位置でレンダリングした第1のレンダリング画像1002a、1001b、1002cを、それぞれ第1〜第3フレームで表示する。従って、第1〜第3フレームにおけるカメラ位置は、第1のカメラ位置とする。
As described above, the first rendered
RAM21に記憶された第1フレームから第3フレームの画像は、所定周期で画像表示部30に出力されて表示される。
The first to third frame images stored in the
図9は、第1フレームから第3フレームの画像を画像表示部30に表示させた場合に、視認される画面の状態を示している。このように、第1フレームから第3フレームを連続して表示させると、各フレームの画像によってアニメーションを表現することができる。この場合、ステップS105で設定する平面状モデルのアルファ値を前のフレームのものほど大きく設定する、すなわち、平面状モデル801のアルファ値>平面状モデル802のアルファ値>平面状モデル803のアルファ値と設定すれば、第1フレームから第3フレームの画像によって腕が残像を残しながら移動する様子を表現できる。即ち、本実施形態に係る3次元画像処理によれば、簡易な処理によって、多様なアルファ値を変化させることにより、結果、簡易な処理でリアルな残像表現をすることが可能となる。言い換えれば、簡易な処理によって、アルファ値をより細かく即ち、より高精度に変化させることにより、結果、簡易な処理でリアルな残像表現をすることが可能となる。
FIG. 9 shows a state of a screen that is visually recognized when images of the first frame to the third frame are displayed on the
ステップS105で説明したように、本実施形態では、テクスチャデータに割り当てられたアルファ値をそのまま用いるのではなく、また、テクスチャを貼り付けるモデルのアルファ値を全体的に変更するのではなく、平面状モデルに含まれる複数の頂点にアルファ値を設定し、頂点のアルファ値を用いて平面状モデルの各画素のアルファ値を算出する。従って、簡易な計算で多様なアルファ値を変化させることが可能である。言い換えれば、簡易な計算でアルファ値をより細かく即ち、より高精度に変化させることが可能である。その結果、画像の透明度を多様に表現することが可能である。言い換えれば、画像の透明度をより細かく即ち、より高精度に表現することが可能である。また、平面状モデルに貼り付けたテクスチャを繰り返し用いれば、処理負荷を抑制しながら、アルファ値を多様に変化させることができ、結果、リアルな残像表現をすることが可能となる。言い換えれば、平面状モデルに貼り付けたテクスチャを繰り返し用いれば、処理負荷を抑制しながら、アルファ値をより細かく即ち、より高精度に変化させることができ、結果、リアルな残像表現をすることが可能となる。 As described in step S105, in the present embodiment, the alpha value assigned to the texture data is not used as it is, and the alpha value of the model to which the texture is pasted is not changed as a whole. Alpha values are set for a plurality of vertices included in the model, and the alpha value of each pixel of the planar model is calculated using the alpha values of the vertices. Therefore, various alpha values can be changed with a simple calculation. In other words, the alpha value can be changed more finely, that is, with higher accuracy by simple calculation. As a result, it is possible to variously express the transparency of the image. In other words, the transparency of the image can be expressed more finely, that is, with higher accuracy. Further, if the texture pasted on the planar model is repeatedly used, the alpha value can be changed in various ways while suppressing the processing load, and as a result, a realistic afterimage can be expressed. In other words, if the texture pasted on the planar model is used repeatedly, the alpha value can be changed more finely, that is, with higher accuracy while suppressing the processing load, resulting in a realistic afterimage expression. It becomes possible.
<第4フレーム以降の表示>
その後、第4フレーム以降の画像を表示させる場合には、例えば、第4フレームで平面状モデル802、第5フレームで平面状モデル803、第6フレームで平面状モデル801を表示する。すなわち、平面状モデル801〜803を繰り返し用いて画像を表示する。3フレーム単位で同一画像を繰り返し用いて、3次元モデルの動きを表現する。第4〜ステップS101で設定した第1のカメラ位置とする。
<Display after the fourth frame>
Thereafter, when displaying the image after the fourth frame, for example, the
この場合、平面状モデル「801(残像)、802(残像)、803(実像)」、「801(残像)、803(残像)、802(実像)」、「803(残像)、802(残像)、801(実像)」、・・・のように、3フレームごとに、最も後のフレームの平面状モデル(実像が貼り付けられたモデル)を1つずつずらし、かつ、3フレームごとに、後のフレームの平面状モデルほどアルファ値を小さくする(不透明に近づける)。具体的には、第1〜第3フレームでは平面状モデル803が最も後のモデルでありアルファ値が最小(不透明に最も近い)であり、第4〜第6フレームでは平面状モデル802が最も後のフレームのモデルでありアルファ値が最小(不透明に最も近い)であり、第7〜第9フレームでは平面状モデル801が最も後のフレームのモデルでありアルファ値が最小(不透明に最も近い)であるようにする。
In this case, the planar models “801 (afterimage), 802 (afterimage), 803 (real image)”, “801 (afterimage), 803 (afterimage), 802 (real image)”, “803 (afterimage), 802 (afterimage) , 801 (real image) ”,..., And shift the planar model of the last frame (model with the real image pasted) one by one every three frames, and after every three frames Reduce the alpha value of the planar model of the frame (make it more opaque). Specifically, in the first to third frames, the
第4〜第6フレームを表示する場合には、第1〜第3フレームの処理で平面状モデル801〜803に貼り付けられた第1のレンダリング画像1002a、1001b、1002cをそのまま用いる。
When displaying the fourth to sixth frames, the
但し、第4〜第6フレームでは、平面状モデル802が最も後のフレームの平面状モデルであって実像であるので、平面状モデル801のアルファ値>平面状モデル803のアルファ値>平面状モデル802のアルファ値となるように、ステップS105にて、平面状モデル801〜803のアルファ値を設定し直す。
However, in the fourth to sixth frames, since the
その後、第1〜第3フレームの場合と同様にして、ステップS106及びS107を実行し、第4〜第6フレームを表示する。 Thereafter, similarly to the case of the first to third frames, steps S106 and S107 are executed to display the fourth to sixth frames.
第7〜第9フレームを表示する場合には、第4〜第6フレームの処理で平面状モデル801〜803に貼り付けられた第1のレンダリング画像1002a、1001b、1002cをそのまま用いる。第7〜第9フレームのカメラ位置は、ステップS101で設定した第1のカメラ位置とする。
When displaying the seventh to ninth frames, the
但し、第7〜第9フレームでは、平面状モデル801が最も後のフレームの平面状モデルであり実像であるので、平面状モデル803のアルファ値>平面状モデル802のアルファ値>平面状モデル801のアルファ値となるように、ステップS105にて、平面状モデル801〜803のアルファ値を設定し直す。その後、第1〜第3フレームの場合と同様にして、ステップS106及びS107を実行し、第7〜第9フレームを表示する。
However, in the seventh to ninth frames, since the
以上のように、第1〜第9フレームを表示すれば、3次元モデルの実像が第1のレンダリング画像1002c(平面状モデル803)、第1のレンダリング画像1001b(平面状モデル802)、第1のレンダリング画像1002a(平面状モデル801)の順番に、残像を伴いながら、変化する様子を表現することができる。
As described above, when the first to ninth frames are displayed, the real image of the three-dimensional model is the first rendered
更に、第10〜第12フレームにおいて平面状モデル802を実像として、第13〜第15フレームにおいて平面状モデル803を実像として表示すれば、腕を振り下ろし(第1〜第3フレーム)、腕を振り上げ(第4〜第6フレーム、第7〜第9フレーム)、腕を振り下ろす(第10〜第12フレーム)、という一連の動きを残像と共に表現することが可能である。即ち、実像とする平面状モデルを801、802、803、802、801の順番に繰り返し表示すれば、腕を上下に振る動作を残像と共に表現することが可能である。第10〜第12フレームのカメラ位置は、ステップS101で設定した第1のカメラ位置とする。
Further, if the
また、第2レンダリング手段2305は、現在フレーム以前の何れかのフレームでレンダリングされた第1のレンダリング画像を、現在フレームの平面状モデルに貼り付ける。或いは、以前のフレームの第1のレンダリング画像が貼り付けられた平面状モデルをそのまま用いることができる。
The
例えば、第4フレームで第1のレンダリング画像1001bを表示する場合には、第2フレームで3次元モデル1002をレンダリングした第1のレンダリング画像1002bをそのまま平面状モデル802に貼り付ける。又は、第1のレンダリング画像1002bが貼り付けられた平面状モデル802をそのまま用いる。但し、この場合でも、アルファ値の計算を行う。従って、以前のフレームでレンダリングした画像を再度利用して、処理負荷を低減しつつ、リアルな残像表現を行うことが可能である。
For example, when displaying the
また、3フレームごとに、各平面状モデルに設定するアルファ値を変更することで、第1のレンダリング画像1002a、1001b、1002cのアルファ値を柔軟に変更することが可能である。これにより、処理負荷を抑制しつつ、アルファ値を多様に変化させることができ、リアルな残像表現が可能となる。言い換えれば、処理負荷を抑制しつつ、アルファ値をより細かく即ち、より高精度に変化させることができ、リアルな残像表現が可能となる。
Further, by changing the alpha value set for each planar model every three frames, the alpha values of the first rendered
また、3フレームの単位では、実像として表示される最も後のフレームの第1のレンダリング画像のアルファ値を最も小さく(不透明に近く)、前のフレームのアルファ値ほど大きく(透明に近く)する。言い換えれば、実像が表示されるフレームに対して、以前のフレームほどアルファ値を大きく(透明に近く)する。これによって、残像表現をリアルにすることが可能である。 In the unit of three frames, the alpha value of the first rendered image of the last frame displayed as a real image is the smallest (close to opaque), and the alpha value of the previous frame is made large (close to transparency). In other words, the alpha value of the previous frame is increased (close to transparency) with respect to the frame in which the real image is displayed. This makes it possible to make the afterimage expression realistic.
<平面状モデルの変形によるアルファ値の変更>
平面状モデルを変形する方法としては、例えば平面状モデル80を変形した複数の形状の平面状モデルを、記憶部23に予め記憶しておく。そして、図10のステップS103で平面状モデルを読み出す際に、適宜、異なる形状の平面状モデル80を読み出す。変形した平面状モデルとは、基準となる平面状モデルを構成するポリゴンの頂点の座標を変更することで、形状が変更された、形状の異なる平面状モデルである。そして、異なる形状の平面状モデル80にステップS104、S105を実行することで、変形前の平面状モデル80にアルファ値を設定する場合と比較して、第1のレンダリング画像に設定されるアルファ値を変更することが可能である。
<Change of alpha value by deformation of planar model>
As a method of deforming the planar model, for example, a plurality of planar models obtained by deforming the
また、平面状モデルを変形する他の方法としては、ステップS103とステップS104の間に、第2レンダリング手段2305が平面状モデル80を変形するステップS1041を追加して、平面状モデルを変形する方法がある。この場合、ステップS1041において、ステップS103で読み出した平面状モデルを構成するポリゴンの頂点の座標を変更することで、平面状モデル80を変形する。変形後の平面状モデル80にステップS104、S105を実行することで、変形前の平面状モデル80にアルファ値を設定する場合と比較して、第1のレンダリング画像に設定されるアルファ値を変更することが可能である。
As another method of deforming the planar model, a method of deforming the planar model by adding step S1041 in which the
<1フレームに複数の平面状モデルをレンダリングする場合>
上記では、第3レンダリング手段2306が、フレームごとに、平面状モデル801、802、803の最終画像の1つを生成した。一方、第3レンダリング手段2306が、1フレームで2以上の平面状モデルの最終画像を生成しても良い。
<When rendering multiple planar models in one frame>
In the above description, the
例えば、第3レンダリング手段2306が、平面状モデル801、802、803の3つの平面状モデルを1フレームでレンダリングし、1フレームで3つの平面状モデルを表示させるようにしても良い。この処理は、例えば、以下のようになる。
For example, the
(第1フレームの画像の生成)
図10のフローチャートにおいて、ステップS101〜S103を前記同様に処理した後、ステップS104に移行する。
(Generation of first frame image)
In the flowchart of FIG. 10, after steps S101 to S103 are processed in the same manner as described above, the process proceeds to step S104.
ステップS104において、図8(a)に示すように、第2レンダリング手段2305が、平面状モデル801、802、803に、それぞれ、第1のレンダリング画像1002a、1001b、1002cを貼り付ける。第2レンダリング手段2305は、第1のレンダリング画像1002a、1001b、1002cの各画素を平面状モデル801、802、803の各画素に割り当てる。また、第2レンダリング手段2305は、第1のレンダリング画像1002a、1001b、1002cの各画素の色データをテクスチャデータ部2309から読み出して、平面状モデル801、802、803の画素のうち、第1のレンダリング画像1002a、1001b、1002cの各画素が割り当てられた画素に色データを割り当てる。
In step S104, as shown in FIG. 8A, the
ステップS105において、第2レンダリング手段2305が、各平面状モデル801、802、803を構成する各ポリゴン(図4(a)に示すポリゴン81〜84)の少なくとも一部の頂点にアルファ値を設定する。また、第2レンダリング手段2305が、各平面状モデル801、802、803上の各画素のアルファ値を、各画素から少なくとも一部の頂点までの距離と、当該頂点に設定されたアルファ値とに基づいて算出する。
In step S105, the
ここでは、平面状モデル801から803の順番に第1のレンダリング画像が移動しているとして、移動先の第1のレンダリング画像ほど、即ち後のフレームの第1レンダリング画像ほどアルファ値が小さく、移動元の第1のレンダリング画像ほど、即ち前のフレームの第1レンダリング画像ほどアルファ値が大きくなるように設定する。具体的には、平面状モデル801のアルファ値>平面状モデル802のアルファ値>平面状モデル803のアルファ値とする。
Here, assuming that the first rendering image is moved in the order of the
ステップS106では、図9に示すように、第3レンダリング手段2306は、第1のレンダリング画像1002a、1002b、1001cに対応する3次元モデルの位置及び角度に合わせて平面状モデル801、802、803を配置する。
In step S106, as shown in FIG. 9, the third rendering means 2306 converts the
ステップS107では、第3レンダリング手段2306は、現在のカメラ位置の視線と垂直になるように平面状モデル801、802、803を回転させて、平面状モデル801、802、803に貼り付けられた第1のレンダリング画像1002a、1001b、1002cをレンダリングする。そして、第3レンダリング手段2306は、第1のレンダリング画像1002a、1001b、1002cをレンダリングした最終画像を第1フレームの画像としてRAM21に記憶させる。
In step S107, the
(第2フレームの画像の生成)
ステップS104に戻り、平面状モデル801、802、803に第1フレームの処理で用いた第1のレンダリング画像1002a、1001b、1002cを貼り付ける。第2フレームのカメラ位置は、ステップS101で設定した第1のカメラ位置とする。
(Generation of second frame image)
Returning to step S104, the
ステップS105では、平面状モデル801、802、803のそれぞれにおいて、当該平面状モデルを構成するポリゴンの頂点にアルファ値を設定し、頂点のアルファ値と、頂点から各画素までの距離とに基づいて、平面状モデル上の各画素のアルファ値を算出し、設定する。
In step S105, in each of the
第2フレームでは、最も後のフレームの平面状モデル、即ち実像の平面状モデルを平面状モデル802とし、平面状モデル801のアルファ値>平面状モデル803のアルファ値>平面状モデル802のアルファ値とする。
In the second frame, the planar model of the last frame, that is, the planar model of the real image is the
その後、ステップS106及びS107において前記同様に処理して、平面状モデル801〜803に貼り付けられた第1のレンダリング画像1002a、1001b、1002cのレンダリング画像を第2フレームとしてRAM21に記憶させる。
Thereafter, in the same manner as described above in steps S106 and S107, the rendering images of the
(第3フレームの画像の生成)
ステップS104に戻り、平面状モデル801、802、803に第1フレームの処理で用いた第1のレンダリング画像1002a、1001b、1002cを貼り付ける。第3フレームのカメラ位置は、ステップS101で設定した第1のカメラ位置とする。
(Generation of third frame image)
Returning to step S104, the
ステップS105では、平面状モデル801、802、803のそれぞれにおいて、当該平面状モデルを構成するポリゴンの頂点にアルファ値を設定し、頂点のアルファ値と、頂点から各画素までの距離とに基づいて、平面状モデル上の各画素のアルファ値を算出し、設定する。
In step S105, in each of the
第3フレームでは、最も後のフレームの平面状モデル、即ち実像の平面状モデルを平面状モデル801とし、平面状モデル803のアルファ値>平面状モデル802のアルファ値>平面状モデル801のアルファ値とする。
In the third frame, the planar model of the last frame, that is, the planar model of the real image is the
その後、ステップS106及びS107において前記同様に処理して、平面状モデル801〜803に貼り付けられた第1のレンダリング画像1002a、1001b、1002cのレンダリング画像を第2フレームとしてRAM21に記憶させる。
Thereafter, in the same manner as described above in steps S106 and S107, the rendering images of the
RAM21に記憶された第1フレームから第3フレームの画像は、所定周期で画像表示部30に出力されて表示される。このとき、実像は、第1フレーム、第2フレーム、第3フレームの順番に、平面状モデル803、平面状モデル802、平面状モデル801と変化するので、残像を伴いながら実像が変化する様子を処理負荷を抑制しつつ表現することができる。
The first to third frame images stored in the
平面状モデル801、802、803を1フレームごとに表示した場合には、実像が3フレームごとに移動するが、平面状モデル801、802、803のアルファ値を変更しながら3つの平面状モデルを1フレームで表現する場合には、1フレームごとに実像が移動する。従って、同一フレーム周期において実像の移動速度を速くすることが可能である。特に、残像の数が多くなる程、残像表現に伴う処理負荷が大きくなるが、このようにアルファ値を変更しながら複数の平面状モデルを表示させることで、処理負荷を抑制することが可能である。
When the
図8及び図9に示した例では、複数の第1のレンダリング画像の一端、即ち腕の付け根の部分が繋がるように表示処理したが、複数の第1のレンダリング画像の一端は必ずしも繋がる必要はない。 In the example shown in FIGS. 8 and 9, display processing is performed so that one end of the plurality of first rendering images, that is, the base portion of the arm is connected, but one end of the plurality of first rendering images is not necessarily connected. Absent.
図11は、腕の形状をした物体が、同図中の矢印Aで示す方向に飛行する様子を表現する場合を例に挙げて、複数の第1のレンダリング画像が繋がらずに連続的に配置される処理を説明する図である。 FIG. 11 shows a case where an object in the shape of an arm expresses a state of flying in a direction indicated by an arrow A in the figure, and a plurality of first rendering images are continuously arranged without being connected. It is a figure explaining the process performed.
同図では、平面状モデル804、805、806上にそれぞれ、第1のレンダリング画像1003、1004、1005が貼り付けられている。また、同図中の矢印Bで示すように、前のフレームの平面状モデルのアルファ値ほど大きく設定されている。即ち、平面状モデル804のアルファ値>平面状モデル805のアルファ値>平面状モデル806のアルファ値と設定されている。また、図10のステップS101〜S107の処理により平面状モデル804の第1のレンダリング画像1003、平面状モデル805の第1のレンダリング画像1004、平面状モデル806の第1のレンダリング画像1005を1フレームごとに表示する。これにより、第1のレンダリング画像1003から第1のレンダリング画像1005に向かって腕の形状をした物体が飛行する場合の残像表現を、前記同様に簡易な処理で行うことができる。
In the figure,
図12は、複数の第1のレンダリング画像の一端が繋がる場合の他の例である。図12は、複数の輪が繋がった鎖がうねる様子を表現する処理を説明する図である。 FIG. 12 is another example in which one end of a plurality of first rendering images is connected. FIG. 12 is a diagram illustrating a process for expressing a state in which a chain in which a plurality of rings are connected undulates.
同図(a)は第1フレームの画像を示し、同図(b)は第2フレームの画像を示す。同図(a)では、輪を表す第1のレンダリング画像1101a、1102a、・・・がそれぞれ平面状モデル901a、902a、・・・・に貼り付けられている。同図(b)では、輪を表す第1のレンダリング画像1101b、1102b、・・・がそれぞれ平面状モデル901b、902b、・・・に貼り付けられている。
FIG. 4A shows an image of the first frame, and FIG. 4B shows an image of the second frame. In FIG. 9A,
同図(a)の複数の輪に対応する3次元モデルをレンダリングすることで、第1のレンダリング画像1101a、1102a、・・・を得る。また、第1のレンダリング画像1101a、1102a、・・・を、平面状モデル901a、902a、・・・に貼り付けると共に、平面状モデル901a、902a、・・・の各画素のアルファ値を設定し、各画素のアルファ値を第1のレンダリング画像1101a、1102a、・・・の各画素に割り当てることで、第1のレンダリング画像1101a、1102a、・・・を、平面状モデル901a、902a、・・・にレンダリングする。その後、平面状モデル901a、902a、・・・を、第1のレンダリング画像1101a、1102a、・・・に対応する3次元モデルをレンダリングした際の位置及び角度に配置し、現在のカメラ位置の視線と垂直になるように平面状モデル901a、902a、・・・を回転させた後、第1のレンダリング画像1101a、1102b、・・・をレンダリングすることで、最終的なレンダリング画像を第1フレームの画像として得る。
The
同図(b)の複数の輪に対応する3次元モデルをレンダリングすることで、第1のレンダリング画像1101b、1102b、・・・を得る。また、第1のレンダリング画像1101b、1102b、・・・を、平面状モデル901b、902b、・・・に貼り付けると共に、平面状モデル901b、902b、・・・の各画素のアルファ値を設定し、各画素のアルファ値を第1のレンダリング画像1101b、1102b、・・・の各画素に割り当てることで、第1のレンダリング画像1101b、1102b、・・・を、平面状モデル901b、902b、・・・にレンダリングする。ここで、平面状モデル901b、902b、・・・の各画素のアルファ値は、平面状モデル901a、902a、・・・の各画素のアルファ値よりも小さくなるようにする。その後、平面状モデル901b、902b、・・・を、第1のレンダリング画像1101b、1102b、・・・に対応する3次元モデルをレンダリングした際の位置及び角度に配置し、第1のカメラ位置の視線と垂直になるように平面状モデル901b、902b、・・・を回転させた後、第1のレンダリング画像1101b、1102b、・・・をレンダリングすることで、最終的なレンダリング画像を第2フレームの画像として得る。
The
第1フレーム、第2フレームを連続して表示すると、第2フレームのアルファ値が第1フレームのアルファ値よりも小さいので、第2フレームの画像が実像として第1フレームの画像が残像として視認されるように表示制御することが可能である。 When the first frame and the second frame are continuously displayed, the alpha value of the second frame is smaller than the alpha value of the first frame, so that the image of the second frame is viewed as a real image and the image of the first frame is viewed as an afterimage. It is possible to control the display so that
また、第3フレーム以降のフレームでも、第1フレーム及び第2フレームのレンダリング画像を繰り返し用いながら、図12(a)及び(b)の画像のアルファ値の大小関係を入れ替えながら、2フレームごとに図12(a)及び(b)の画像を表示すれば、図12(a)と図12(b)とで交互に実像と残像が入れ替わりながら、鎖がうねる様子を表現することが可能である。 Also, in the frames after the third frame, while repeatedly using the rendered images of the first frame and the second frame, the magnitude relationship of the alpha values of the images in FIGS. If the images of FIGS. 12A and 12B are displayed, it is possible to express a state in which the chain undulates while the real image and the afterimage are alternately switched in FIGS. 12A and 12B. .
ここでは、図12(a)、図12(b)の2つのパターンの画像を用いたが、3つ以上のパターンの画像を用いて、パターンの数と同数のフレームごとに繰り返し各パターンの画像を表示すれば、鎖のうねる様子をよりリアルに表現することができる。 Here, the image of the two patterns of FIG. 12A and FIG. 12B is used, but the image of each pattern is repeated for every frame of the same number as the number of patterns using the images of three or more patterns. By displaying, it is possible to more realistically express the undulation of the chain.
1 画像処理装置
10 制御部
11 CPU
12 信号処理プロセッサ
13 画像処理プロセッサ
20 記憶部
21 RAM
22 インターフェース部
23 記憶媒体
30 画像表示部
31 モニタ
32 インターフェース部
40 音声出力部
41 インターフェース部
42 デジタル/アナログ変換部
43 アンプ
44 スピーカ
50 操作入力部
51 インターフェース部
52 操作部
60 通信部
70 バス
80,90,110,120 平面状モデル
81〜84,91〜92,111,121〜124 ポリゴン
801〜803 平面状モデル
820 基準オブジェクト
1001,1002 3次元モデル
DESCRIPTION OF
12
22 interface unit 23
Claims (9)
1又は複数のポリゴンから構成される平面状モデルであって、各第1のレンダリング画像に対応する平面状モデルを、複数、記憶手段から読み出すモデル読出手段と、
各第1のレンダリング画像を対応する各平面状モデルに貼り付けると共に、各第1のレンダリング画像に対応する平面状モデルを構成するポリゴンの少なくとも一部の頂点に透明度を設定して、該頂点の透明度に基づいて前記平面状モデル上の各画素の透明度を設定し、前記各画素に設定された透明度を前記第1のレンダリング画像の各画素に割り当ててレンダリングする第2レンダリング手段と、
各第1のレンダリング画像に対応する前記3次元モデルの位置及び角度に合わせて各平面状モデルを配置し、前記第1のカメラ位置の視線と垂直になるように各平面状モデルを回転させて、各平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする第3レンダリング手段と、を備え、
前記第2レンダリング手段は、複数の第1のレンダリング画像のうち、相対的に早い時刻に表示される第1のレンダリング画像に設定される透明度が、相対的に遅い時刻に表示される第1のレンダリング画像に設定される透明度よりも大きくなるように、透明度を設定する画像処理プログラム。 First rendering means for determining a position and an angle of a three-dimensional model and rendering at a first camera position to generate a plurality of first rendered images;
A model reading unit that is a planar model composed of one or a plurality of polygons and that reads a plurality of planar models corresponding to each first rendering image from the storage unit;
With paste on each planar model corresponding to each of the first rendering image, and set the transparency of at least a portion of the vertexes of the polygons forming the planar model corresponding to each of the first rendering image, the apex Second rendering means for setting the transparency of each pixel on the planar model based on the transparency, assigning the transparency set for each pixel to each pixel of the first rendering image, and rendering;
Each planar model disposed in accordance with the position and angle of the three-dimensional model corresponding to each of the first rendering image, rotate the respective planar models to be line of sight perpendicular of the first camera position And third rendering means for rendering the first rendering image attached to each planar model ,
The second rendering means has a first transparency displayed at a relatively late time, with the transparency set in the first rendered image displayed at a relatively early time among the plurality of first rendered images. An image processing program for setting the transparency so that it is larger than the transparency set for the rendered image .
モデル読出手段が、1又は複数のポリゴンから構成される平面状モデルであって、各第1のレンダリング画像に対応する平面状モデルを、複数、読み出すステップと、
第2レンダリング手段が、各第1のレンダリング画像を対応する各平面状モデルに貼り付けると共に、各第1のレンダリング画像に対応する平面状モデルを構成するポリゴンの少なくとも一部の頂点に透明度を設定して、該頂点の透明度に基づいて前記平面状モデル上の各画素の透明度を設定し、前記各画素に設定された透明度を前記第1のレンダリング画像の各画素に割り当ててレンダリングするステップと、
第3レンダリング手段が、各第1のレンダリング画像に対応する前記3次元モデルの位置及び角度に合わせて各平面状モデルを配置し、前記第1のカメラ位置の視線と垂直になるように各平面状モデルを回転させて、各平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングするステップと、を備え、
第2レンダリング手段は、複数の第1のレンダリング画像のうち、相対的に早い時刻に表示される第1のレンダリング画像に設定される透明度が、相対的に遅い時刻に表示される第1のレンダリング画像に設定される透明度よりも大きくなるように、透明度を設定する画像処理方法。 A first rendering means for determining a position and an angle of the three-dimensional model and rendering at the first camera position to generate a plurality of first rendered images;
A model reading unit that reads a plurality of planar models each composed of one or a plurality of polygons corresponding to each first rendering image ;
Second rendering means, with paste on each planar model corresponding to each of the first rendering image, setting the transparency in at least part of the vertexes of the polygons forming the planar model corresponding to each of the first rendering image and a step of rendering assigned based on the transparency of the vertices to set the transparency of each pixel on the planar model, the set transparency to each pixel to each pixel of said first rendering image,
Third rendering unit, according to the position and angle of the three-dimensional model corresponding to each of the first rendering image place each planar model, the first camera position of the line of sight and the plane so as to be perpendicular Rotating the shape model to render a first rendered image attached to each planar model ,
The second rendering means is a first rendering in which the transparency set in the first rendering image displayed at a relatively early time among the plurality of first rendering images is displayed at a relatively later time. An image processing method for setting the transparency so as to be larger than the transparency set for the image.
記憶手段から1または複数の平面状モデルであって、各第1のレンダリング画像に対応する平面状モデルを、複数、読み出すモデル読出手段と、
各第1のレンダリング画像を対応する各平面状モデルに貼り付けると共に、各第1のレンダリング画像に対応する平面状モデルを構成するポリゴンの少なくとも一部の頂点に透明度を設定して、該頂点の透明度に基づいて前記平面状モデル上の各画素の透明度を設定し、前記各画素に設定された透明度を前記第1のレンダリング画像の各画素に割り当ててレンダリングする第2レンダリング手段と、
各第1のレンダリング画像に対応する前記3次元モデルの位置及び角度に合わせて前記平面状モデルを配置し、前記第1のカメラ位置の視線と垂直になるように各平面状モデルを回転させて、各平面状モデルに貼り付けられた第1のレンダリング画像をレンダリングする第3レンダリング手段と、を備え、
前記第2レンダリング手段は、複数の第1のレンダリング画像のうち、相対的に早い時刻に表示される第1のレンダリング画像に設定される透明度が、相対的に遅い時刻に表示される第1のレンダリング画像に設定される透明度よりも大きくなるように、透明度を設定する画像処理装置。 First rendering means for determining a position and an angle of a three-dimensional model and rendering at a first camera position to generate a plurality of first rendered images;
Model reading means for reading out a plurality of planar models corresponding to each first rendering image from one or more planar models from the storage means;
With paste on each planar model corresponding to each of the first rendering image, and set the transparency of at least a portion of the vertexes of the polygons forming the planar model corresponding to each of the first rendering image, of the vertices Second rendering means for setting the transparency of each pixel on the planar model based on the transparency, assigning the transparency set for each pixel to each pixel of the first rendering image, and rendering;
The planar model disposed in accordance with the position and angle of the three-dimensional model corresponding to each of the first rendering image, rotate the respective planar models to be line of sight perpendicular of the first camera position And third rendering means for rendering the first rendering image attached to each planar model ,
The second rendering means has a first transparency displayed at a relatively late time, with the transparency set in the first rendered image displayed at a relatively early time among the plurality of first rendered images. An image processing apparatus for setting transparency so as to be larger than transparency set for a rendering image .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006047657A JP4387363B2 (en) | 2006-02-24 | 2006-02-24 | Image processing program, image processing method, and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006047657A JP4387363B2 (en) | 2006-02-24 | 2006-02-24 | Image processing program, image processing method, and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007226581A JP2007226581A (en) | 2007-09-06 |
JP4387363B2 true JP4387363B2 (en) | 2009-12-16 |
Family
ID=38548339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006047657A Active JP4387363B2 (en) | 2006-02-24 | 2006-02-24 | Image processing program, image processing method, and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4387363B2 (en) |
-
2006
- 2006-02-24 JP JP2006047657A patent/JP4387363B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2007226581A (en) | 2007-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11682158B2 (en) | Foveated rendering | |
US10304157B2 (en) | Information processing method, information processing device, and program | |
US8515130B2 (en) | Conference system, monitoring system, image processing apparatus, image processing method and a non-transitory computer-readable storage medium | |
EP3438919B1 (en) | Image displaying method and head-mounted display apparatus | |
US9646404B2 (en) | Information processing method, information processing device, and program that facilitates image processing operations on a mobile device | |
US10223761B2 (en) | Graphics pipeline method and apparatus | |
JP2020515954A (en) | Mixed reality system with warping virtual content and method of using the same to generate virtual content | |
US9116599B2 (en) | Systems and methods for visualizing a 3D scene using a flexible display | |
JP5348022B2 (en) | Projector and projection conversion processing apparatus | |
JP2022511273A (en) | Generate and modify object representations in augmented or virtual reality scenes | |
CN106782260A (en) | For the display methods and device of virtual reality moving scene | |
JP2022179473A (en) | Generating new frame using rendered content and non-rendered content from previous perspective | |
JPWO2009147806A1 (en) | Remote control device and remote control method | |
JP6440909B2 (en) | Cable movable range display device, cable movable range display method, and cable movable range display program | |
JP4977243B2 (en) | Image processing apparatus, method, and program | |
JP4387363B2 (en) | Image processing program, image processing method, and image processing apparatus | |
US20210090322A1 (en) | Generating and Modifying Representations of Objects in an Augmented-Reality or Virtual-Reality Scene | |
US11710467B2 (en) | Display artifact reduction | |
JP4746717B2 (en) | Image generation system, image generation method, computer program, and recording medium on which computer program is recorded | |
US9959637B2 (en) | Method and apparatus for processing border of computer figure to be merged into background image | |
JP5146054B2 (en) | Generation control program of sound generated from sound source in virtual space | |
JPWO2015141214A1 (en) | Label information processing apparatus for multi-viewpoint image and label information processing method | |
US20220326527A1 (en) | Display System Optimization | |
US20230351674A1 (en) | Image processing device and image processing method | |
JPWO2012060271A1 (en) | Image processing method, image processing apparatus, and imaging apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090224 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090427 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090526 |
|
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: 20090929 |
|
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: 20090930 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4387363 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121009 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131009 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |