The present invention relates to a geomorphing device that smoothly replaces a polygon model with a different polygon model by gradually changing each vertex information of the polygon model.
In computer graphics, a polygon model is widely used as a method of expressing a two-dimensional or three-dimensional shape. In a polygon model, a triangle having three vertices is mainly defined as a unit shape, and a shape is expressed by a combination of triangles. Because each polygon consists of pieces of information including the positions of the three vertices and normals, in a case in which polygons are adjacent to each other, some of the polygons have the same vertex information and a redundancy occurs in the pieces of information about the plurality of polygons. To solve this problem, a technique of expressing pieces of polygon information in a polygon model by using both a set of pieces of vertex information each of which is not the same as any other vertex information within the polygon model, and three indexes respectively showing each of the pieces of vertex information, thereby reducing the data amount, is implemented typically (for example, refer to patent references 1, 2, and 3).
On the other hand, geomorphing of smoothly replacing a polygon model with a different polygon model by gradually changing each vertex information of the polygon model is used typically (for example, refer to patent reference 4). The geomorphing is implemented by preparing the positions of each vertex before and after geomorphing in advance, and then displaying the different polygon model by repeatedly calculating vertex information which is linear-interpolated between the positions of each vertex. An example of a model which is subjected to the geomorphing at a time t ranging from 0 to 1 is shown in
Generally, a CPU or the like constructs a model during geomorphing by interpolating pieces of vertex information one by one, and therefore the amount of computation increases very much when the model has a large number of vertices. Therefore, a method of providing pieces of vertex information pair before and after geomorphing for a drawing device, such as a GPU (Graphics Processing Unit), and adding a process of performing interpolation between each pair of vertex information during a process of drawing the model to parallelize the interpolation process and perform the interpolation process at a high speed is proposed (for example, refer to nonpatent reference 1). Because according to this method programmable processes (a process for each vertex, a process for each polygon, and a process for each pixel) in a polygon drawing flow in a typical GPU shown in
However, data is localized for parallel processing in the process which is performed on each vertex by a typical GPU, and therefore information about any other vertex cannot be referred to. A problem is therefore that it is necessary to prepare vertex information having two pieces of information about two vertices in advance, and it is therefore necessary to provide twice the typical amount of information. Particularly when a model after geomorphing is generated by reducing the number of polygons in a model before geomorphing to simplify this model before geomorphing, many pieces of vertex information are held redundantly.
A further problem is that when geomorphing a model in a plurality of stages, i.e., when further geomorphing a model after geomorphing to another model, it is necessary to prepare, in advance, pieces of vertex information each having information before and after geomorphing for each stage of geomorphing.
The present invention is made in order to solve the above-mentioned problems, and it is therefore an object of the present invention to provide a geomorphing device that can implement high-speed and memory-efficient geomorphing at a low cost.
In accordance with the present invention, there is provided a geomorphing device including: an input assembler that receives, as an input, vertex information in which pieces of information showing vertices used before and after geomorphing are recorded without redundancy and pieces of index information used before and after geomorphing of each polygon, and that outputs pieces of vertex information used before and after the geomorphing of the each polygon by using the pieces of index information; a vertex processor that performs a predetermined vertex-associated process on the pieces of vertex information of the each polygon; a polygon processor that interpolates vertex information between the pieces of vertex information, on which the vertex-associated process is performed, according to time, and outputs the vertex information for each polygon; a rasterizer that detects each pixel included in each polygon outputted by the polygon processor in an output image, and that outputs the pixel as pixel information which is interpolated between the pieces of vertex information of the polygon according to a position of the each pixel detected thereby; a pixel processor that determines a color of each pixel of a corresponding output image by using the pixel information outputted by the rasterizer; and an outputter that outputs the output image to an image display device.
The geomorphing device in accordance with the present invention receives, as an input, vertex information in which pieces of information showing vertices used before and after geomorphing are recorded without redundancy and pieces of index information used before and after geomorphing of each polygon, and outputs pieces of vertex information used before and after the geomorphing of each polygon by using the pieces of index information. As a result, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
Hereafter, in order to explain this invention in greater detail, the preferred embodiments of the present invention will be described with reference to the accompanying drawings.
The input assembling unit 1 collects and outputs pieces of vertex information before and after geomorphing for each polygon from vertex information and index information which are inputted thereto from the vertex memory 7. The vertex processor 2 performs predetermined processes independently applied to each vertex, such as projection conversion of vertex positions.
The polygon processing unit 3 generates and outputs vertex information which is interpolated between the pieces of vertex information before and after geomorphing according to a parameter showing a time. The rasterizing unit 4 detects pixels corresponding to the inside of each polygon on an output image, and outputs pixel information which is acquired by interpolating between pieces of vertex information according to the position of each of the pixels. The pixel processing unit 5 determines the color of each of the pixels from a pixel value in the texture memory 8 and the pixel information, and writes the color in the output image memory 9. The output unit 6 outputs the output image on the output image memory 9 to the image display device 10. Further, the vertex memory 7 stores vertex information and index information which are used by the geomorphing device, and the texture memory 8 stores a texture which is used by the geomorphing device. Further, the output image memory 9 stores the output image to be displayed on the image display device 10 as the geomorphing device.
Next, the operation of the input assembling unit 1 will be explained by using
The input assembling unit 1 then refers to the pieces of vertex information pointed to by the six indexes for each polygon and collects the pieces of vertex information, and outputs each of the pieces of vertex information to the vertex processing unit 2.
Next, the operation of the vertex processing unit 2 will be explained by using
The operation of the polygon processing unit 3 will be explained by using
V
ki′(t)=Vki′·(1−t)+Vki+3′·t (i=0 to 2)
The operation of the polygon processing unit 3 can be parallelized easily on a per polygon basis because the information is localized for each polygon, i.e., the processes on each polygon do not refer to the vertex information about any other polygon. Further, the processes by the polygon processing unit 3 can be implemented by programming, as a geometry shader, the processes on each polygon which are described in the process flow by a typical GPU shown in
The operation of the rasterizing unit 4 will be explained. The rasterizing unit 4 detects pixels, among the pixels on the output image, which are included in a region enclosed by the three vertices which construct each polygon outputted from the polygon processing unit 3. The rasterizing unit then carries out linear interpolation on the three pieces of vertex information to calculate vertex information at the position of each of the detected pixels, and outputs this vertex information as pixel information. A detailed explanation of the process by the rasterizing unit 4 will be omitted hereafter because the process corresponds to the rasterizing in the drawing flow by a typical GPU shown in
The operation of the pixel processing unit 5 will be explained. The pixel processing unit 5 performs a necessary process on each pixel by using each pixel information outputted from the pixel processing unit 5 as needed. For example, this process is the one of calculating a color to be assigned to each pixel of the output image on the basis of the pixel information or the color information of the texture extracted from the texture memory 8, and writing the color into the output image stored in the output image memory 9. A detailed explanation of the process by the pixel processing unit 5 will be omitted hereafter because the process corresponds to the process on each pixel in the drawing flow by a typical GPU shown in
The operation of the output unit 6 will be explained. After the pixel processing unit 5 completes all of the process, the output unit 6 outputs the output image stored in the output image memory 9 to the image display device 10.
Although the explanation is made by assuming that each polygon is a triangular one, each polygon can be any polygon such as a quadrangular polygon, and the input assembling unit 1 can collect twice as many pieces of vertex information as the number of angles of each polygon and, after that, carry out the same processes.
Thus, because the vertex information which is stored in the vertex memory 7 and which each polygon before and after morphing has is recorded without redundancy and each polygon is expressed in a form in which it is specified by indexes in Embodiment 1, the geomorphing process can be carried out with a small amount of recorded data. Further, because the information is localized for each polygon in the polygon processing unit 3 that performs the interpolation process for geomorphing, the interpolation process can be easily sped up through parallelization. In addition, because each of the processing units operates according to a process flow in a typical GPU, each of the processing units can be made to operate on the GPU and can be implemented at a low cost.
As previously explained, because the geomorphing device in accordance with Embodiment 1 includes: the input assembler that receives, as an input, vertex information in which pieces of information showing vertices used before and after geomorphing are recorded without redundancy and pieces of index information used before and after geomorphing of each polygon, and that outputs pieces of vertex information used before and after the geomorphing of each polygon by using the pieces of index information; the vertex processor that performs a predetermined vertex-associated process on the pieces of vertex information of each polygon; the polygon processor that interpolates vertex information between the pieces of vertex information, on which the vertex-associated process is performed, according to time, and outputs the vertex information for each polygon; the rasterizer that detects each pixel included in each polygon outputted by the polygon processor in an output image, and that outputs each pixel as pixel information which is interpolated between the pieces of vertex information of the polygon according to the position of each pixel detected thereby; the pixel processor that determines the color of each pixel of a corresponding output image by using the pixel information outputted by the rasterizer; and the outputter that outputs the output image to the image display device, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
Further, because in the geomorphing device in accordance with Embodiment 1 the input assembler collects pieces of vertex information twice as many as the number of vertices of each polygon and outputs the pieces of vertex information to the vertex processor, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
In addition, because in the geomorphing device in accordance with Embodiment 1 the vertex processor carries out the process on each inputted vertex information in parallel on a per vertex basis, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
Further, because in the geomorphing device in accordance with Embodiment 1 the polygon processor linear-interpolates vertex information between the pieces of vertex information before and after the geomorphing of each vertex which constructs a polygon according to time and outputs the vertex information, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
In addition, because in the geomorphing device in accordance with Embodiment 1 the polygon processor carries out the interpolation process on each inputted vertex information in parallel on a per polygon basis, the geomorphing device can implement high-speed and memory-efficient geomorphing at a low cost.
The geomorphing device in accordance with Embodiment 1 geomorphs a polygon model to a different polygon model. In accordance with the present invention, when geomorphing a polygon model in a plurality of stages, the geomorphing can be carried out while information is held more efficiently. In Embodiment 2, an example of changing a polygon model to a different polygon model by using geomorphing in a first stage, and further changing the model after the geomorphing in the first stage by using geomorphing in a second stage is shown.
Because a geomorphing device in accordance with Embodiment 2 has the same structure as that in accordance with Embodiment 1 in terms of drawings, the structure will be explained by using
Next, the operation of the geomorphing device in accordance with Embodiment 2 will be explained by using
In accordance with Embodiment 2, by inputting the vertex information and the index information which are shown in
Although two stages of geomorphing is explained in Embodiment 2, even when carrying out geomorphing in an arbitrary number of stages, by preparing both pieces of vertex information which are used in all the stages and which are recorded without redundancy, and index information used for each of the stages, geomorphing in each of the stages can be carried out similarly.
Thus, because the geomorphing device in accordance with Embodiment 2 of the present invention includes the input assembler that receives, as an input, vertex information which is shared before and after geomorphing in a plurality of stages and index information used before and after geomorphing of each polygon in a plurality of stages, and that outputs pieces of vertex information used before and after the geomorphing of each polygon in the plurality of stages by using the above-mentioned index information; the vertex processor that performs a predetermined vertex-associated process on the pieces of vertex information of each polygon in the plurality of stages; the polygon processor that interpolates vertex information between the pieces of vertex information, on which the vertex-associated process is performed, according to time, and outputs the vertex information for each polygon; the rasterizer that detects each pixel included in each polygon outputted by the polygon processor in an output image, and that outputs the pixel as pixel information which is interpolated between the pieces of vertex information of the polygon according to the position of each pixel detected thereby; the pixel processor that determines the color of each pixel of a corresponding output image by using the pixel information outputted by the rasterizer; and the outputter that outputs the output image to the image display device, when carrying out geomorphing in a plurality of phases, the geomorphing device can record the vertex information before and after every geomorphing without redundancy, and use the vertex information. Therefore, the geomorphing device can reduce the amount of memory in which vertex information is recorded.
While the invention has been described in its preferred embodiments, it is to be understood that an arbitrary combination of two or more of the above-mentioned embodiments can be made, various changes can be made in an arbitrary component in accordance with any one of the above-mentioned embodiments, and an arbitrary component in accordance with any one of the above-mentioned embodiments can be omitted within the scope of the invention.
As mentioned above, the geomorphing device in accordance with the present invention relates to a structure of carrying out a geomorphing process of smoothly replacing a polygon model with a different polygon model by gradually changing each vertex information of the polygon model, the geomorphing device is suitable for use in an image processing device or the like that processes a polygon mode in computer graphics.
1 input assembling unit, 2 vertex processing unit, 3 polygon processing unit, 4 rasterizing unit, 5 pixel processing unit, 6 output unit, 7 vertex memory, 8 texture memory, 9 output image memory, 10 image display device.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2011/005112 | 9/12/2011 | WO | 00 | 12/27/2013 |