U.S. Pat. No. 7,161,600
METHODS AND APPARATUS FOR TRANSFORMING THREE-DIMENSIONAL OBJECTS IN VIDEO GAMES
AssigneeKabushiki Kaisha Square Enix
Issue DateJanuary 26, 2001
Illustrative Figure
Abstract
An unprocessed cluster index and its amount of parallel movement are acquired. The order of processing clusters does not matter as long as the frame is the same. Subsequently, with respect to an unprocessed vertex corresponding to this acquired cluster index, a vertex index and the weight w of this vertex are obtained. Then, according to the amount of parallel movement and weight w in the same frame, the values of coordinates of the vertex buffer are changed. Since the cluster transformation is effected by parallel movement here, the order of processing clusters does not matter, and it is thereby possible to calculate the vertex coordinates after transformation by simple multiplication and addition alone without matrix operations.
Description
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1shows an example of home game machine101which executes a computer program in the case where the present invention is carried out by the computer program. The home game machine101comprises, for example, a CPU (Central Processing Unit)103, a ROM (Read Only Memory)104, a RAM (Random Access Memory)105, an HDD (Hard Disk Drive)107, a sound processing unit109, a graphics processing unit111, a CD-ROM drive113, a communications interface115, and an interface unit117which are connected to an internal bus119. The graphics processing unit111is equipped with a frame buffer112. The sound processing unit109and graphics processing unit111of the home game machine101are connected to a TV set121having a display screen120. A removable CD-ROM131is inserted into the CD-ROM drive113. A game program133and data135in accordance with the present invention are recorded on the CD-ROM131. The communications interface115is connected to a network151via a communications medium141. A keypad161equipped with operation buttons and a memory card171are connected to the interface unit117. The CPU103executes a program stored in the ROM104and the game program133recorded on the CD-ROM131, thereby controlling the home game machine101. The RAM105is a work area for the CPU103. The HDD107is a storage area for keeping the game program133and data135recorded on the CD-ROM131, for example. The memory card171is a storage area for saving data which the game program133refers to. In the case where the program executed by the CPU103commands that sounds be outputted, the sound processing unit109interprets this command and outputs a sound signal to the TV set121. According to a drawing instruction outputted from the CPU103, the graphics processing unit111generates image data and writes this generated data into the frame buffer112. Then, to the TV set121, the graphics processing unit111outputs a signal for displaying this written image data onto the display screen120. The CD-ROM drive113reads out the game program133and data135on the CD-ROM131. The communications interface115is ...
DESCRIPTION OF THE PREFERRED EMBODIMENTS
FIG. 1shows an example of home game machine101which executes a computer program in the case where the present invention is carried out by the computer program. The home game machine101comprises, for example, a CPU (Central Processing Unit)103, a ROM (Read Only Memory)104, a RAM (Random Access Memory)105, an HDD (Hard Disk Drive)107, a sound processing unit109, a graphics processing unit111, a CD-ROM drive113, a communications interface115, and an interface unit117which are connected to an internal bus119. The graphics processing unit111is equipped with a frame buffer112.
The sound processing unit109and graphics processing unit111of the home game machine101are connected to a TV set121having a display screen120. A removable CD-ROM131is inserted into the CD-ROM drive113. A game program133and data135in accordance with the present invention are recorded on the CD-ROM131. The communications interface115is connected to a network151via a communications medium141. A keypad161equipped with operation buttons and a memory card171are connected to the interface unit117.
The CPU103executes a program stored in the ROM104and the game program133recorded on the CD-ROM131, thereby controlling the home game machine101. The RAM105is a work area for the CPU103. The HDD107is a storage area for keeping the game program133and data135recorded on the CD-ROM131, for example. The memory card171is a storage area for saving data which the game program133refers to. In the case where the program executed by the CPU103commands that sounds be outputted, the sound processing unit109interprets this command and outputs a sound signal to the TV set121.
According to a drawing instruction outputted from the CPU103, the graphics processing unit111generates image data and writes this generated data into the frame buffer112. Then, to the TV set121, the graphics processing unit111outputs a signal for displaying this written image data onto the display screen120. The CD-ROM drive113reads out the game program133and data135on the CD-ROM131. The communications interface115is connected to the network151via the communications medium141, and controls the input/output of data communications carried out with other computers and the like. The interface unit117outputs the input from the keypad161into the RAM105, whereas the CPU103interprets the input from the keypad161and carries out arithmetic operations.
The game program133and data135in accordance with the present invention are initially recorded on the CD-ROM131, for example. Upon execution, the game program133and data135are read out by the CD-ROM drive113and are loaded into the RAM105. The data135loaded into the RAM105includes, as shown inFIG. 1, a vertex coordinate list200, a normal vector list300, a triangular polygon list400, cluster data600, and animation data700. Also, data employed during the processing of the program in accordance with the present invention includes a vertex buffer800and a frame counter900. They will be explained in detail in the following. The game program133and data135in accordance with the present invention recorded on the CD-ROM131may be read out by the CD-ROM drive113beforehand and stored in the HDD107. In the case where the game program133and data135in accordance with the present invention are stored in the HDD107, the game program133and data135are loaded into the RAM105from the HDD107.
In accordance with the present invention the CPU103processes the game program133and data135in accordance with the present invention loaded in the RAM105, and outputs a drawing instruction to the graphics processing unit111. Here, intermediate data are loaded into the RAM105for storage. The graphics processing unit111carries out processing operations according to the drawing instruction from the CPU103, writes image data into the frame buffer112, and outputs to the TV set121a signal for displaying the image data onto the display screen120.
Algorithms of the program in accordance with the present invention executed in the foregoing home game machine101and data employed therein will now be explained in detail.
FIGS. 2,3,4,5,6and7explain the data employed in the present invention.
FIG. 2shows the vertex coordinate list200concerning vertexes of a three-dimensional object in the case where the three-dimensional object is constituted by triangular polygons. The vertex coordinate list200includes a column210for vertex coordinate indexes (index) and a column220for coordinates (x, y, z).
InFIG. 2, the vertex of vertex index vtx0has coordinates of (−8, 1, −2). The vertex of vertex index vtx1has coordinates of (−5, 4, 2). The vertex of vertex index vtx2has coordinates of (−5, 0, 0). The vertex of vertex index vtx3has coordinates of (5, 0, 0). The vertex of vertex index vtx4has coordinates of (5, 4, 2). The vertex of vertex index vtx5has coordinates of (8, 1, −2). The vertex coordinates in the vertex coordinate list200are relative positional coordinates from a predetermined reference position.
FIG. 3shows the normal vector list300. The normal vector list300is a list for defining the normal vector at each vertex of triangular polygons. The normal vector list300includes a column310for normal vector indexes (index) and a column320for normal vectors (x, y, z).
InFIG. 3, the normal vector of normal vector index nm10is (1, 0, 0). The normal vector of normal vector index nm11is (−1, 0, 0). The normal vector of normal vector index nm12is (0, 0, −1). The normal vector of normal vector index nm13is (−1, −1, 0). The normal vector of normal vector index nm14is (0, −1, 0).
FIG. 4shows the triangular polygon list400. The triangular polygon list400stores the vertex indexes and normal vector indexes of vertexes 0, 1 and 2 constituting each triangular polygon. The triangular polygon list400includes a column410for triangular polygon indexes (index), a column420concerning vertex 0 for the vertex index of the vertex constituting vertex 0 and the normal vector index of the normal vector thereof, a column430concerning vertex 1 for the vertex index of the vertex constituting vertex 1 and the normal vector index of the normal vector thereof, and a column440concerning vertex 2 for the vertex index of the vertex constituting vertex 2 and the normal vector index of the normal vector thereof.
InFIG. 4, the vertex 0 of the triangular polygon of triangular polygon index plg0is constituted by the vertex of vertex index vtx0and the normal vector of normal vector index nm10. The vertex I of the triangular polygon of triangular polygon index plg0is constituted by the vertex of vertex index vtx1and the normal vector of normal vector index nm12. The vertex 2 of the triangular polygon of triangular polygon index plg0is constituted by the vertex of vertex index vtx2and the normal vector of normal vector index nm13.
The vertex 0 of the triangular polygon of triangular polygon index plg1is constituted by the vertex of vertex index vtx0and the normal vector of normal vector index nm11. The vertex 1 of the triangular polygon of triangular polygon index plg1is constituted by the vertex of vertex index vtx2and the normal vector of normal vector index nm13. The vertex 2 of the triangular polygon of triangular polygon index plg1is constituted by the vertex of vertex index vtx3and the normal vector of normal vector index nm14.
When the vertex coordinate list200and the normal vector list300are provided, while the triangular polygon list400storing the vertex index and normal vector index is prepared separately, data of identical vertex coordinates and data of identical normal vectors can commonly be used in the triangular polygon list400. Also, with respect to the same vertex, normal vectors separately may be defined for every polygon.
Vertexes defining the form of a three-dimensional object are grouped. Here, each vertex may belong to a plurality of groups.FIG. 5shows the vertex group list500. The vertex group list500stores the number of vertex groups; and, for each vertex group, the number of vertexes belonging to the vertex group, each vertex index of the vertexes belonging to the vertex group, and the weight predefined for each vertex. Hence, the vertex group list500is provided with a column510for the number of groups, columns520,522and524for the numbers of vertexes, columns530,532,534,536,538,539,550,552and554for vertex indexes, and columns540,542,544,546,548,549,560,562and564for the weights of vertexes. Data for a new vertex group begins from a new column for the number of vertexes.
InFIG. 5, the group number column510indicates that the number of groups is 3. The vertex number column520for the vertex group 0 indicates that the number of vertexes in the vertex group 0 is 6. The vertex index column530for a vertex belonging to the vertex group 0 stores vertex index vtx0. The weight column540corresponding to the vertex index vtx0stores a weight of 0.5. The vertex index column532for a vertex belonging to the vertex group 0 stores vertex index vtx1. The weight column542corresponding to the vertex index vtx1stores a weight of 1.0.
The vertex index column534for a vertex belonging to the vertex group 0 stores vertex index vtx2. The weight column544corresponding to the vertex index vtx2stores a weight of 1.0. The vertex index column536for a vertex belonging to the vertex group 0 stores vertex index vtx3. The weight column546corresponding to the vertex index vtx3stores a weight of 1.0. The vertex index column538for a vertex belonging to the vertex group 0 stores vertex index vtx4. The weight column548corresponding to the vertex index vtx4stores a weight of 1.0. The vertex index column539for a vertex belonging to the vertex group 0 stores vertex index vtx5. The weight column549corresponding to the vertex index vtx5stores a weight of 0.5.
The vertex number column522for the vertex group 1 indicates that the number of vertexes in the vertex group 1 is 2. The vertex index column550for a vertex belonging to the vertex group 1 stores vertex index vtx4. The weight column560corresponding to the vertex index vtx4stores a weight of 0.3. The vertex index column552for a vertex belonging to the vertex group 1 stores vertex index vtx6. The weight column562corresponding to the vertex index vtx6stores a weight of 0.2.
The vertex number column524for the vertex group 2 indicates that the number of vertexes in the vertex group 2 is 1. The vertex index column554for the vertex belonging to the vertex group 2 stores vertex index vtx7. The weight column564corresponding to the vertex index vtx7stores a weight of 0.5. In this embodiment, each weight is a real number of at least 0 but not greater than 1.
In this embodiment, transformation is carried out for each cluster.FIG. 6shows the cluster data600. The cluster data600includes a reference amount of parallel movement for each cluster and information concerning vertex groups included in the cluster. Here, there may exist a vertex group included in a plurality of clusters. The cluster number column610stores the number of clusters included in the cluster data600. It is 2 in the example ofFIG. 6.
A cluster index (index) column620stores the index of a cluster included in the cluster data600. It is cluster clust0in the example ofFIG. 6. The column622for the reference amount of parallel movement (x, y, z) of the cluster clust0stores a reference amount of parallel movement (0, 0, 0). The column624for the number of vertex groups belonging to the cluster clust0stores the number of vertex groups belonging to the cluster clust0, i.e., 2, in the vertex groups included in the vertex group list500. Specifically, vertex group ID columns626and628for vertex groups belonging to the cluster clust0store the vertex group IDs 3 and 2, respectively.
From a column630for a new cluster index (index) to the next cluster index column, an area for storing data for a new cluster is formed. The cluster index column630stores cluster index clust1. The column632for the reference amount of parallel movement (x, y, z) of the cluster clust1stores a reference amount of parallel movement (0, 0, 0). The column634for the number of vertex groups belonging to the cluster clust1stores the number of vertex groups belonging to the cluster clust1, i.e., 1. Specifically, the vertex group ID column636for vertex groups belonging to the cluster clust1stores the vertex group ID 0.
A transforming operation for clusters in a three-dimensional object is carried out according to the animation data700shown inFIGS. 7A and 7B. The animation data700includes animation data700A (inFIG. 7A) defining the number of clusters and the number of frames, and animation data700B (inFIG. 7B) defining the amount of parallel movement of each cluster moving in each frame display period from the starting of the transformation to the end thereof.
InFIG. 7A, the number of moving clusters is stored in the column710for the number of clusters in the animation data700A. It is 2 in the example inFIG. 7A. The number of frame display periods from the starting of the transformation to the end thereof is stored in the frame number column720. It is 10 in the example inFIG. 7A. Subsequently, in response to the number of moving clusters, 2, the respective amounts of parallel movement of the clusters in each frame display period are defined in every two consecutive rows of the animation data700B (inFIG. 7B). The cluster index (index) column730stores the indexes of moving clusters. The column740for the amount of parallel movement (x, y, z) stores the amount of parallel movement from a reference posture.
The amount of parallel movement of cluster clust0in frame0is (0, 0, 0). The amount of parallel movement of cluster clust1is also (0, 0, 0). These indicate that the state is identical to the reference posture. The amount of parallel movement of cluster clust0in frame1is (1, 0, 0). On the other hand, the amount of parallel movement of cluster clust1is (−1, 0, 0). Such data continue up to frame9. The amount of parallel movement of cluster clust0in frame9is (10, 5, 1). On the other hand, the amount of parallel movement of cluster clust1is (−12, 0, 0).
In cluster transformations including such operations as rotation, enlargement/reduction, shearing, and the like, it has been necessary for the operations to be carried out in conformity to a predetermined order. In the present invention, however, transformations can be carried out by cluster operations independent of orders since both the reference position and moving amount of clusters are restricted to parallel movement. Also, the amount of arithmetic operations used is much lower than that in cluster transformations including rotation, enlargement/reduction, shearing, and the like.
In the case of fine transformations for effecting facial or muscular expressions, changes in expressions and the like can fully be represented even when the transformations are restricted to parallel movement. While the animation data700is usually made by human hands, the labor of making the animation data700will not differ from that in cluster transformations including rotation and the like even if the cluster transformations are restricted to parallel movement.
Data such as those mentioned above are employed in this embodiment. Before explaining the processing of the program in this embodiment, the principle of an operation will be explained with reference toFIGS. 8A,8B, and8C.
FIG. 8Ashows the state before moving a cluster.FIG. 8Ashows positions of vertexes constructing a lip. In this example, the lip is constructed by vertexes arranged at thirteen positions V1, V2, V3, V4, V5, V6, V7, V8, v9, V10, V11, V12and V13. In this example, the lower lip is constructed by each vertex of group 0. The positions of each vertexes vtx0, vtx1, vtx2, vtx3, vtx4, and vtx5before moving thereof, by which the lower lip is constructed, are the positions V1, V2, V3, V4and V5respectively. The weights of the vertexes vtx0and vtx5are 0.5 and the weights of vertexes vtx1, vtx2, vtx3and vtx4are 1.0. (SeeFIG. 5).
Assuming that the lower lip is moved downward so as to express his face expression that the human shaped character is opening his mouth, for example, clust0belong to the vertex group0is moved downward in parallel.
FIG. 8Bshows a shape of a lip in the case that clust0shown inFIG. 8Ais moved downward without applying the process of the present embodiment thereto. In this example, each vertex included in clust0is moved by the same moving amount as that of clust0. In this case, all of the vertexes vtx0, vtx1, vtx2, vtx3, vtx4and vtx5of the lower lip after the parallel movement of clust0, are moved in parallel by the same amount of movement and they are moved to positions V1a, V2a, V3a, V4a, V5aand V6a. In this case, the shape of the lip becomes angular (an outline of the lip has an angle near to a right angle) and therefore, it has unnatural shape as a human skin.
FIG. 8Cshows a shape of a lip in the case that clust0shown inFIG. 8Ais moved downward by applying the process of the present embodiment thereto. In the case that the process according to the present invention is applied, each of the vertexes vt0, vtx1, vtx2, vtx3, vtx4and vtx5constructing the lower lip is moved downward in parallel by the amount of movement according to the its respective weight. In this example, the weights of vtx0and vtx5are 0.5, and the weights of the other vertexes Vtx1, vtx2, vtx3and vtx4are 1.0. Accordingly, the amounts of movements of vertexes vtx0, vtx5is one half (50%) of those of clust0. The amounts of movements of vertexes vtx1, vtx2, vtx3and vtx4is the same (100%) as that of clust0.
Accordingly, by the movement of clust0downward, vtx0and vtx5with weights of 0.5 are moved to positions V1band V6b, which are higher than positions V1aand V6aas shown inFIG. 8B. While vertexes vtx1, vtx2, vtx3and vtx4with weights of 1.0 are moved to the same positions V2b, V3b, V4band V5bas those corresponding positions (V2a, V3a, V4a, and V5a) shown inFIG. 8B.
Although inFIG. 8A, the positions of vertexes vtx0, vtx5and vertexes vtx2, vtx3have substantially the same vertical position (as represented by positions V1, V3, v4, and V6), after their movement according to this embodiment of the present invention, they thus show greater deviation from such a common vertical position. That is, vertexes vtx0and vtx5show a smaller amounts of movement than that exhibited by the other vertexes and therefore the lip in FIG.8Chas a round shape in comparison with that shown inFIG. 8B. Accordingly, it is possible to express a natural shape of the lip when the human opens his mouth.
FIG. 8Bshows a case where the cluster C ofFIG. 5Ais moved down in parallel. Here, the parallel movement is made with the vertexes V1and V6having a weight of not 0.5 but 1.0. Namely, all the vertexes belonging to the cluster C have the same weight. The respective positions of vertexes V1ato V6ahave moved down simply and equally from their corresponding positions shown inFIG. 8A.
As in the foregoing, when moving each cluster in parallel, the amount of movement is changed by use of weights predefined for vertexes.
In view of the principle of operation explained in the foregoing, a processing flow of an object transforming operation in this embodiment will be explained with reference toFIGS. 9 to 11.
Upon startup, according to the operating system stored in the ROM104and the like, the CPU103reads out the game program133and data135necessary for executing image processing and games from the CD-ROM131via the CD-ROM113, and transfers them to the RAM105. Then, by executing the game program133transferred to the RAM105, the CPU103realizes the processing set forth in the following description.
Here, the control and processing operations performed in the home game machine101include those in which actual control and processing operations are carried out by circuits other than the CPU103in cooperation with the CPU103. For convenience of explanation, however, the control and processing operations involving the CPU103will be explained in the following as being directly executed by the CPU103.
In practice, the game program133and data135necessary for executing the image processing and games are sequentially read out from the CD-ROM131and transferred to the RAM105according to the progress of the processing under the command of the CPU103. However, for easier understanding of the invention, the readout from the CD-ROM131and transfer to the RAM105will not be described in the following explanation.
If the game program133and data135necessary for executing the image processing and games are stored in the HDD107, then they will sequentially be read out from the HDD107and transferred to the RAM105according to the progress of the processing under the command of the CPU103. However, for a reason similar to that mentioned above, the readout from the HDD107and transfer to the RAM105will not be described in the following explanation.
FIG. 9shows a main flow in accordance with this embodiment. First, an initial setting is effected (step S1). In this initial setting, data such as those shown inFIGS. 2 to 7are loaded into the RAM105. Also, the frame counter900is reset to 0. Subsequently, a state within a virtual space is set (step S3). Setting a state within a virtual space is a process in which, for example, when animation of a three-dimensional object is instructed to start upon a user's manipulation of the keypad161or when a viewpoint position is changed similarly upon a user's manipulation of the keypad161, the state in the virtual space is changed accordingly.
Then, an object transforming process in accordance with the present invention is carried out (step S5). This will be set forth later in detail. The transformed three-dimensional object is subjected to a drawing process (step S7). Here, light-source calculation, perspective transformation, and the like are carried out so as to draw a picture of the three dimensional object in the frame buffer112, in the drawing process with respect to the three-dimensional object. In this embodiment, the drawing process does not differ from a conventional one. Subsequently, an increment of 1 is added to the frame counter900(step S9). Then, it is determined whether the processing is completed or not (step S11). If the value of the frame counter900indicates the completion of the processing, then the operation is terminated. If the value of the frame counter900does not indicate the completion of the processing, then the operation returns to step S3.
FIG. 10shows a flow of the object transforming process. First, an original form of the three-dimensional object is acquired (step S21) Here, the vertex coordinate list200copied to the RAM105is copied, so as to generate the vertex buffer800. Subsequently, a cluster transforming process in accordance with the present invention is carried out (step S23). This cluster transforming process will be set forth later in detail. Then, a joint transforming process is carried out (step S25). Thereafter, the operation shifts to step S7inFIG. 9.
The joint transforming process is performed as follows. For example, in the case where a three-dimensional object of a human model is to be transformed, joints corresponding to human joints are defined. Individual vertexes determining the form of the three-dimensional object are associated with each joint together with their relative positions from the joint. Also, the joints are connected to each other by bones corresponding to human bones, while each joint rotates such that the bones rotate about joint portions. As the joint rotates, the positional coordinates of vertexes and normal vectors associated with the joint are changed, whereby a relatively large transforming process corresponding to movements of human bones is effected.
One characteristic feature of the present invention lies in that the cluster transforming process is carried out before the joint transforming process. According to this order, large transformations are effected after fine transformations of the three-dimensional object are carried out. For example, if the processing is effected in this order in the case of opening the mouth of a three-dimensional object of a human model and bending its neck, the neck will be bent after the lower lip portion is moved directly downward. Here, the operation of opening the mouth and the operation of moving the lower lip portion directly downward correspond to each other one to one. If this order is reversed, however, the mouth will open after the neck is bent. When the neck is bent, the mouth will not open in a natural form even if the lower lip portion is moved directly downward. Therefore, the lower lip portion has to be moved while taking account of how the neck bends. Hence, the processing flow ofFIG. 10simplifies the whole operation.
FIG. 11shows details of the cluster transforming process. First, it is determined whether the transforming process has been carried out for all the clusters or not (step S31). If the transforming process has been carried out for all the clusters, then the operation shifts to step S25inFIG. 10. If the transforming process has not been completed for all the clusters, then the operation shifts to step S33. At this stage, it is assumed that the frame display period being processed can be seen from the value of the frame counter900.
At step S33, a cluster index is acquired from the animation data700(step S33). Then, the amount of parallel movement (Tx, Ty, Tz) concerning this acquired cluster index is obtained (step S35). In the animation data700, the order of clusters being processed does not matter as long as their frame display period is the same. Because of this fact the transformation is limited to parallel movement.
Subsequently, it is determined whether the moving process has been completed for all the vertex groups associated with the acquired cluster index (step S37). If the moving process has been completed for all the vertex groups associated with the acquired cluster index, then the operation returns to step S31in order to shift to the processing of the next cluster index. If the moving process has not been completed for all the vertex groups associated with the acquired cluster index, then an unprocessed vertex group ID is acquired from the cluster data600.
Then, the vertex group list500is referred to, so as to determine whether the moving process has been completed for all the vertexes belonging to the acquired vertex group ID or not (step S41). The vertex group list500includes no information concerning the vertex group ID. However, the vertex group list500can be scanned from the top, so as to grasp the vertex group ID according to the number of occurrences of rows520to524indicating their respective numbers of vertexes. Namely, since the number of occurrences of vertex number rows520to524minus 1 indicates the vertex group ID, vertex information concerning the acquired vertex group ID can be obtained if the vertex group list500is scanned from the top until the number of occurrences of vertex number rows520to524minus 1 equals the acquired vertex group ID.
If the moving process has been completed for all the vertexes belonging to the acquired vertex group ID, then the operation returns to step S37. If the moving process has not been completed for all the vertexes belonging to the acquired vertex group ID, then an unprocessed vertex index is acquired from the vertex group list500, and the weight w (which is a real number of at least 0 but not greater than 1) of the vertex is similarly acquired from the vertex group list500(step S43).
Then, according to the amount of parallel movement (Tx, Ty, Tz) in this frame display period and the weight w, the coordinate information in the vertex buffer800is changed (step S45). Namely, new coordinates (nx, ny, nz) in the case where the coordinates of the vertex being processed are assumed to be (x, y, z) are calculated according to the following expression:
nx=x+Tx×w
ny=y+Ty×w(1)
nz=z+Tz×w
The resulting new coordinates (nx, ny, nz) are stored in the vertex buffer800.
Thus, the value of coordinates of the vertex is updated. The updated vertex coordinates are stored in the vertex buffer800, and a three-dimensional object is drawn in the frame buffer112according to the contents of the vertex buffer.
After the step S45, the operation returns to the step S41, and then steps S43and S45are carried out until the moving process is completed for all the vertexes in the vertex group.
In the cluster transforming process, the process of transforming normal vectors may be omitted. Though recalculation is necessary to be exact, the resulting image quality will not differ in the case of fine transformations even without recalculating normal vectors.
As mentioned in the foregoing, when a three-dimensional object whose form is determined by a plurality of vertexes each associated with at least one cluster is to be transformed, the amount of parallel movement of each cluster is acquired in each frame display period (step S35). Then, in each frame display period, the amount of parallel movement of each acquired cluster is changed per each vertex corresponding to the cluster according to the weight predefined for the vertex, and the vertex is moved according to this changed amount of parallel movement (step S45).
The vertex moves by the amount of parallel movement in which the amount of parallel movement of its corresponding cluster is changed by the weight defined for itself. When the vertex corresponds to a plurality of clusters, then it is moved in parallel a plurality of times in one frame display period. The order of operations does not matter even when the parallel movement is carried out a plurality of times. Also, the parallel movement of the vertex can be effected by multiplication and addition alone, whereby the load of arithmetic operation is lower than that in the case of rotary movement which necessitates matrix operations.
Namely, if the movement of vertexes belonging to a cluster is restricted to parallel movement alone, then it becomes unnecessary to take account of the order of transforming operations, and multiplication and addition will suffice without necessitating matrix operations. Since no matrix operations are carried out, the amount of processing decreases, thereby facilitating the real-time processing of fine transformations of a three-dimensional object. The present invention is particularly effective in the case where the three-dimensional object has a large number of vertexes.
Also, since the object transformation is carried out in the order of the cluster transforming process and the joint transforming process as shown in the object transforming process ofFIG. 10, the cluster transformation can be formulated, whereby the processing becomes simpler as a whole.
DISPLAY EXAMPLE
FIG. 12shows a polygon model of a three-dimensional object10before a transformation.FIG. 12shows the head of the three-dimensional object10of a human model as viewed from the front side The head is a part to which particular attention is paid, and it can be seen that the head is constituted by a number of polygons. In particular, in order to represent an abundance of expressions by minute movements, the eye and mouth parts in the head are constituted by a very large number of polygons. For a transformation of opening the mouth, it will not be sufficient if the cluster of the lower lip portion is moved down alone, but a transformation is effected such that a plurality of clusters are moved in parallel, so as to open the mouth in a more natural form.
FIG. 13shows a polygon model of a three-dimensional object12after the transformation.FIG. 13is identical toFIG. 12in that the head of the three-dimensional object12of a human model is shown therein, but differs therefrom in that the posture of the three-dimensional object is changed, and that the mouth is open. The posture of the three-dimensional object is changed in the joint transforming process (FIG. 10; step S25). In the present invention, the cluster transforming process (step S23) for opening the mouth is carried out before the joint transforming process. InFIG. 13, clusters are provided in a portion extending from the lower lip to the lower jaw, and are moved downward. Also, minute transformations such as those of laterally moving clusters disposed at cheek portions are implemented.
FIG. 14shows an example of a display screen in which the three-dimensional object10shown inFIG. 12is drawn. It can be seen that, though the method of drawing is identical to a conventional one, a smoother three-dimensional object is drawn. On the other hand,FIG. 15shows an example of display screen in which the three-dimensional object12shown inFIG. 13is drawn. It can be seen that, while a transformation of opening the mouth is effected in the three-dimensional object10in accordance with the present invention, the smooth three-dimensional object12is drawn with its mouth being open in a natural form.
The following modifications are applicable to the above embodiments.
(Modification 1)
The animation data700is provided on the premise that data concerning the amount of parallel movement for all the frames are stored therein. However, it is not always necessary for data concerning the amount of parallel movement for all the frames to be stored therein. The amount of parallel movement for a frame lacking data can be determined by an interpolation between the respective amounts of parallel movement in its preceding and succeeding frames. That is, it is initially determined whether the amount of parallel movement of each cluster in each frame display period is defined or not. If it is determined that the amount of parallel movement of each cluster in the frame display period being processed is not defined, then the amount of parallel movement of each cluster at the frame display period being processed is calculated from the amount of parallel movement of each cluster in a frame display period which has already been processed and the amount of parallel movement of each cluster in a frame display period to be processed later. If it is determined that the amount of parallel movement of each cluster in the frame display period being processed is defined, on the other hand, then the defined amount of parallel movement of each cluster in the frame display period being processed is acquired.
(Modification 2)
Though the above-mentioned embodiment has been explained on the basis of a triangular polygon, the present invention is also applicable to models in which a three-dimensional object is transformed by moving vertexes even in rectangular or other polygons having more sides.
(Modification 3)
Modification of Employed Hardware
FIG. 1is an example, in which various modifications are possible. Whether or not to provide the communications interface115is arbitrary. Since the present invention does not directly relate to sound processing, it is not necessary to provide the sound processing unit109.
Also, the CD-ROM is an example of recording media, whereas other recording media such as an internal memory like ROM, CD-ROM, DVD-ROM, memory cartridge, floppy disk, magnetic disk, DVD-RAM, and the like can also be used. In this case, it is necessary that the CD-ROM drive113be replaced by a drive which can read out the corresponding medium.
Though the foregoing relates to the case where the present invention is implemented by a computer program, it can also be implemented by a combination of a computer program and a dedicated device such as an electronic circuit, or a dedicated device such as an electronic circuit alone.
Though explained in detail with reference to embodiments in the foregoing, the present invention is not restricted to the above-mentioned embodiments. It can be modified within the scope not deviating from the gist thereof. For example, though the above-mentioned embodiments relate to the case where the present invention is realized while using a home game machine as a platform, the present invention may also be realized while using a normal computer, an arcade game machine, or the like as its platform. Also, the present invention may be realized while using a personal digital assistant, a car navigation system, or the like as its platform.
Also, the program and data for realizing the present invention are not restricted to the mode provided by a recording medium mountable/removable with respect to computers, game machines, and the like, such as CD-ROM. Namely, the program and data for realizing the present invention may also be in such a mode that they are recorded in memories of other devices on the network151connected to the game machine or the like by way of the communications interface115and the communications line141, and are used as being successively stored into the RAM105by way of the communications line141as required.
As explained in the foregoing, the present invention can provide a technique which realizes fine transformations of three-dimensional objects by a simple process.
From the invention thus described, it will be obvious that the embodiments of the invention may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended for inclusion within the scope of the following claims.
Claims
- A computer-readable recording medium having recorded therein a video game program for transforming, in a virtual three-dimensional space, a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, said computer-readable recording medium having recorded therein a program for causing a computer to acquire, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and calculate an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
- A computer-readable recording medium for a video game according to claim 1 , wherein said computer is further caused to move, according to a movement of a joint in a virtual skeleton defining a framework of said three-dimensional object and including a plurality of joints, each of said plurality of vertexes being associated with at least one of said plurality of joints, said vertex corresponding thereto after the parallel movement of said vertexes.
- A computer-readable recording medium for a video game according to claim 1 , wherein said acquisition of the amount of parallel movement of said cluster includes: determining whether an amount of parallel movement of each said cluster in a frame display period being processed is defined or not in said animation data;calculating, if it is determined that the amount of parallel movement of each said cluster in said frame display period being processed is not defined in said animation data, the amount of parallel movement of each said cluster in said frame display period being processed according to an amount of parallel movement of each said cluster in a frame display period having already been processed and an amount of parallel movement of each said cluster in a frame display period to be processed later;and acquiring, if it is determined that the amount of parallel movement of each said cluster in said frame display period being processed is defined in said animation data, the defined amount of parallel movement of each said cluster in said frame display period being processed.
- A three-dimensional object transforming method in a video game for transforming a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, said method including: acquiring, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and calculating an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
- A three-dimensional object transforming method in a video game according to claim 4 , further including: moving, according to a movement of a joint in a virtual skeleton defining a framework of said three-dimensional object and including a plurality of joints, each of said plurality of vertexes being associated with at least one of said plurality of joints, said vertex corresponding thereto after the parallel movement of said vertexes.
- A three-dimensional object transforming method in a video game according to claim 4 , wherein said acquisition of the amount of parallel movement of said cluster includes: determining whether an amount of parallel movement of each said cluster in a frame display period being processed is defined or not in said animation data;calculating, if it is determined that the amount of parallel movement of each said cluster in said frame display period being processed is not defined, the amount of parallel movement of each said cluster in said frame display period being processed according to an amount of parallel movement of each said cluster in a frame display period having already been processed and an amount of parallel movement of each said cluster in a frame display period to be processed later;and acquiring, if it is determined that the amount of parallel movement of each said cluster in said frame display period being processed is defined in said animation data, the defined amount of parallel movement of each said cluster in said frame display period being processed.
- A video game apparatus, which comprises a computer-readable storage medium storing a program for a video game which transforms a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, and a computer which reads out and executes at least one of said programs from said computer-readable storage medium to perform the read out program, acquiring, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and calculating an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
- A video game apparatus for transforming a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, said apparatus having: a computer;and a computer-readable recording medium having recorded therein a program to be executed by said computer;said program causing said computer to execute: an acquiring process for acquiring, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and a moving process for calculating an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
- A video game program for transforming a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, said computer program for causing a computer to acquire, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and calculate an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
- A computer program for transforming a three-dimensional object having a form at least a part of which is determined by a plurality of vertexes associated with a cluster, said computer program for causing a computer to acquire, in each frame display period, an amount of parallel movement of said cluster according to animation data defining a movement of said three-dimensional object and including an amount of parallel movement of said cluster in a plurality of frame display periods, wherein the amount of parallel movement is defined by an amount of movement of said cluster in each of the three-dimensions of the virtual three-dimensional data space;and calculate an amount of parallel movement of each said vertex by, for each vertex of said cluster, multiplying the amount of movement of said cluster in each of the three dimensions of the virtual three-dimensional space by a weight predefined for that vertex, and moving, according to these calculated amounts of parallel movement, said vertexes parallel to each other in each said frame display period.
Disclaimer: Data collected from the USPTO and may be malformed, incomplete, and/or otherwise inaccurate.