1. Field of the Invention
The present invention relates generally to a method of forming a polygon image, and more particularly, to a method of forming an animation image in real time by the polygon image, as well as to an image processing apparatus using the same.
2. Description of the Related Art
In recent years, in order to give the virtual sense for the real by use of a computer graphic (CG) technique with respect to an image processing apparatus by use of a computer such as a gate unit or the like, a development is made for forming an image model (hereinafter merely called a model) which is called a character, an object, or a model of details nearer to the actual, by use of a polygon which has a plurality of polygonal faces.
For this reason, it is general that a texture having each tone is pasted up in a plurality of polygons constituting a model.
That is, in a hardware in a game unit under the present condition, color data are given as apex data to respective apexes of the polygon forming the model. A color of each pixel in the polygon is plotted by the hardware, while the color at the apex is interpolated. Thus, the texture in each polygon can be plotted having a smooth tone. Furthermore, a polygon edge is not marked in a generic model by this method.
On the other hand, it is possible to constitute a reflection by an animation image. A plurality of cell images are continuously projected in the prior art, so that it is public domain that the animation image having a motion can be obtained.
It is desirable in recent years that such the animation image is displayed even in the image processing apparatus using a computer such as a game unit or the like.
For this reason, there is a technique which is called a toon rendering in which a special rendering process is executed by a dedicated three-dimensional process software, thereby simplifying a tone of the texture of the polygon constituting the model, to form a picture similar to an animation picture.
On the other hand, it is difficult to obtain the picture similar to the animation picture by the hardware in the game unit under the present condition without using such the special technique.
That is, as a plotting process is performed by the hardware, while a color of each apex is interpolated, the texture of the polygon is plotted having the tone. Thus, in the polygon to be plotted, the cubic sense is excessively emphasized and the atmosphere as the animation picture is impaired.
It is therefore the object of the present invention to provide a method of forming an animation image in real time in an image processing apparatus such as a game unit or the like for plotting a model using a plurality of polygons by a generic computer graphic process.
In order to attain the object, according to aspects of the present invention there are provided an animation image forming method and an image processing apparatus using the same, the method comprising the steps of obtaining a plurality of polygons having normal line data as apex data and constituting a model; sorting the model constituted by the plurality of polygons into polygons of a first color part and polygons of a second color part by boundary lines consisting of the direction of a light source and normal lines of the model; pasting up a first mono-color texture on the sorted polygons having the first color part, and pasting up a second mono-color texture on the sorted polygons having the second color part; and dividing the polygons intersecting the boundary lines along the boundary lines, pasting up the first mono-color texture on the polygons belonging to the first color part out of the divided polygons, and pasting up the second mono-color texture on the polygons belonging to the second color part.
Preferably, the sorting by the boundary lines into polygons of the first color portion and polygons of the second color part is implemented by acquiring an inner product value of the normal line of the apexes of the respective polygons and the normal line of the light source, from the direction of the light source and the normal line of the model with respect to the plurality of polygons, and then sorting into polygons having the same polarity of the thus acquired inner product at the respective apexes and polygons having different polarities of the thus acquired inner product at the respective apexes.
Preferably, the intersectional position of the polygon intersecting a boundary line is acquired from a proportional relation with the inner product of each of two apexes of a boundary-line-intersecting side of the polygon intersecting the boundary lines when the inner product value at the intersectional position is 0.
The above and other objects, aspects, features and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings in which:
Hereinafter, the embodiments according to the present invention will be explained with reference to the drawings. Incidentally, in the drawings, the same reference numerals or reference symbols are assigned to same or like elements for description.
Here, for understanding of the present invention, plotting of polygons which is performed in an image processing apparatus such as a game unit or the like for plotting a model by use of a plurality of polygons by a generic computer graphic process will be explained.
The texture data obtained by interpolating the apex data are given to each pixel in the polygons. Accordingly, in the texture pasted up in the polygon, a tone continuously changes as shown in FIG. 1. In the case where the model is constituted by use of the polygon having the tone in this manner, it is hard to attain the atmosphere of an animation as the cubic sense is overemphasized as an animation picture.
In
Furthermore, a signal is transmitted to and received from outside the apparatus through a modem 8 as occasion demands. Furthermore, the bus arbiter 1 is connected to a peripheral unit such as an input pad or the like.
The control part 2 has a CPU 20 as control means and a geometry processor 21 for performing a dedicated coordinate transformation process in order to decrease a load of the CPU 20.
The rendering processor 3 for performing a rendering process such as a texture paste or the like is connected to a graphic memory 9 for temporally storing image data. An output of the rendering processor 3 is displayed on a TV monitor (not shown) through a DA transducer 10 for a video signal.
On the other hand, the audio processor 4 is connected to an audio memory 11, and an output of the audio processor 4 is connected to the TV monitor or audio unit (not shown) through a DA transducer 12 for an audio signal.
If the game unit is energized, the CPU 20 reads a game program from the CDROM 7 into the system memory 5 according to a boot program stored in the boot ROM 6.
Accordingly, the CPU 20 inputs polygon data of world coordinates constituting the model showing up in the game program according to the game program read into the system memory 5, and commands coordinates transformation to the geometry processor 21.
The geometry processor 21 transforms the polygon data of the world coordinates to station point coordinates. The polygon data constituting the model transformed into the station point coordinates data are supplied to the rendering processor 3, in which the texture is pasted up on the respective polygons according to the polygon data.
The corresponding texture data are read out based on the polygon data from the texture memory (not shown), and the texture is pasted up on the polygon. Next, the polygon data are transformed into two-dimensional coordinates data in response to a display screen of the monitor, and are stored in the graphic memory 9 as image data.
The image data are repeatedly read out of the graphic memory 9, and are transformed into an analog video signal by the video DA transducer 10, and are displayed on the TV monitor (not shown).
Returning to
On the contrary, in the present invention, a mono-color having no tones is pasted up on the polygon, and the model is formed by the plurality of polygons not having such tornal colors.
This boundary line L is set, for example, so as to attach a shadow part in the model to be formed by the polygon in response to a position of a light source in a progress of a game.
In
The present invention dissolves such inconveniences, and
Model data with a normal line are obtained from a program read in the system memory 5 by control of the CPU 20 (step S1). These model data have the world coordinates and normal line vectors as the respective apex data.
The model data are transformed into the station point coordinates in the geometry processor 21 (step S2). Then, a shadow area is calculated from a direction and intensity of a light and the normal line vector of the model (step S3)
That is, the calculation of the shadow area is a process for judging for sorting whether or not a polygon is one belonging to the shadow area in each of the plurality of polygons constituting the model.
For judging for sorting whether or not a polygon is one belonging to the shadow area, an inner product of the normal line of each apex and a light source is first of all acquired.
A formula for acquiring an inner product i of the normal line and light source is denoted as follows:
i=(ax*lx+ay*ly+az*lz) *intensity+ambient
Here, ax, ay, az are normal line vectors of the apex, and lx, ly, lz are normal line vectors of a light source. Furthermore, “intensity” is a diffuse reflection coefficient of a model, and “ambient” is a product of an ambient light intensity and a diffuse reflection coefficient of an ambient light, and a boundary position of the shadow area can be altered by changing these values.
Polarities of all the inner product values i of the apexes constituting the polygon are compared with each other. The polygons are sorted into polygons in which the polarities are all same and polygons in which polarities of the different inner product values i exist.
In the case where the polarities of all the inner product values i at the apexes constituting the polygon are same, the polygon does not intersect the boundary line L as a boundary between the bright part and shadow part.
In the example of
In this manner, regarding all the polygons constituting the model, the polarities of the inner product values i between the apexes are compared with each other, and it is judged whether or not the polygon is one having the apexes of the inner product values i having different polarities.
The polygon data of a polygon not having the apexes of the inner product values i having the different polarities, namely a polygon not shaded (for example, in
In the rendering processor 3, by a normal process, the texture data included in the apex data of the supplied polygon data are interpolated with respect to the respective structural pixels, and the corresponding texture of the bright color and dark color are pasted up thereon (step S5).
On the other hand, in step S3, regarding the polygon P3 having the apexes of the inner product values i having the different polarities, namely the polygon having partially a shadow, a crossing position of the boundary line L is further acquired.
An absolute value of the inner product value of A : An absolute value of the inner product value of B=AP : PB
Accordingly, if each component with respect to three-dimensional coordinates x, y, z is divided by this ratio, the coordinates of the point P are acquired. In the same manner, the coordinates of the point Q can be acquired.
Furthermore, as shown in
In this manner, in step S3, the polygon having the apex of the inner product value i having the different polarities is divided, to be supplied to the rendering processor 3 (step s6). Next, the texture of a dark mono-color in the same manner as in the polygon P1 is pasted up on the divided polygon, and simultaneously the polygon belonging to the shaded part, and the texture of a bright mono-color in the same manner as in the polygon P2 is pasted up on the polygon not shaded (step S7).
In the aforesaid manner, in step S5 and step S7, the image data of the polygon on which the texture is pasted up are written into the graphic memory 9 (step S8). The image data are in sequence read out of the graphic memory 9, and are transformed into an analog image signal by the video DA transducer 10, and the images are displayed on the TV monitor (step S9).
In the aforesaid manner, in the embodiments of
If all the polygons intersecting the boundary line L are performed such a division process, a model in which they are fully sorted into the shaded part and bright part is plotted in the first color part and second color part, as the embodiment.
Furthermore, the boundary between the first color part and second color part, namely the boundary between the shaded part and bright part (setting of the boundary line L), can be appropriately set in a progress of the program. Even in this case, it is possible to detect the polygon readily intersecting the boundary line L by calculation in real time, and to divide into the dark part and bright part to plot.
Incidentally, as the polygon in the above description, the triangular polygon having the three apexes was explained as an example, but adaptability of the present invention is not limited to such the case.
As explained in the embodiments of the present invention, in the image processing apparatus such as the gate unit, or the like for plotting the model by the plurality of polygons by the generic computer graphic process according to the present invention, it is possible to form the animation image in real time.
Number | Date | Country | Kind |
---|---|---|---|
11-262699 | Sep 1999 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
3889107 | Sutherland | Jun 1975 | A |
4525858 | Cline et al. | Jun 1985 | A |
4819192 | Kuragano et al. | Apr 1989 | A |
4862391 | Ohhashi | Aug 1989 | A |
4901064 | Deering | Feb 1990 | A |
5043922 | Matsumoto | Aug 1991 | A |
5083287 | Obata et al. | Jan 1992 | A |
5163126 | Einkauf et al. | Nov 1992 | A |
5193145 | Akeley | Mar 1993 | A |
5253335 | Mochizuki et al. | Oct 1993 | A |
5253339 | Wells et al. | Oct 1993 | A |
5357599 | Luken | Oct 1994 | A |
5357600 | Shirman et al. | Oct 1994 | A |
5499324 | Nakayama | Mar 1996 | A |
5544291 | Gilley et al. | Aug 1996 | A |
5544294 | Cho et al. | Aug 1996 | A |
5546515 | Mochizuki | Aug 1996 | A |
5572635 | Takizawa et al. | Nov 1996 | A |
5592598 | Yamrom | Jan 1997 | A |
5613050 | Hochmuth et al. | Mar 1997 | A |
5706415 | Kelley et al. | Jan 1998 | A |
5745666 | Gilley et al. | Apr 1998 | A |
5777620 | Billyard | Jul 1998 | A |
5912671 | Oka | Jun 1999 | A |
6034691 | Aono et al. | Mar 2000 | A |
6040835 | Gibson | Mar 2000 | A |
6163319 | Peercy et al. | Dec 2000 | A |
6246414 | Kawasaki | Jun 2001 | B1 |
6333742 | Morioka et al. | Dec 2001 | B1 |
6339433 | Politis et al. | Jan 2002 | B1 |
6356264 | Yasui et al. | Mar 2002 | B1 |
6441819 | Suzuoki | Aug 2002 | B1 |
6476809 | Browne | Nov 2002 | B1 |
6489955 | Newhall, Jr. | Dec 2002 | B1 |
6504538 | Freund et al. | Jan 2003 | B1 |
6515674 | Gelb et al. | Feb 2003 | B1 |
6525740 | Cosman | Feb 2003 | B1 |
6529194 | Yamaguchi | Mar 2003 | B1 |
6535219 | Marshall et al. | Mar 2003 | B1 |
6545677 | Brown | Apr 2003 | B2 |
6549202 | Hasegawa et al. | Apr 2003 | B1 |
6774896 | Oka | Aug 2004 | B2 |
20010045955 | Oka | Nov 2001 | A1 |
20010055028 | Oka | Dec 2001 | A1 |
20020047843 | Higashiyama et al. | Apr 2002 | A1 |