Computer program and computer device

The described computer program and device address high computational loads and penetration issues in cloth simulation by generating and correcting cloth mesh positions relative to target objects, enhancing accuracy and reducing processing load.

JP2025147819AActive Publication Date: 2025-10-07CAPCOM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024048255
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-10-07
Estimated Expiration
2044-03-25

AI Technical Summary

Technical Problem

Existing cloth simulation methods in computer programs face high computational loads and penetration issues due to frequent collision and constraint processing, especially when frame rates are low or target objects move quickly, leading to inaccurate cloth representation.

Method used

A computer program and device that generate a target object and cloth mesh with vertices, perform physical calculations, and use collision determination and position correction to ensure the cloth mesh remains positioned correctly relative to the target object, reducing processing load by avoiding unnecessary movement trajectory comparisons.

Benefits of technology

This approach reduces processing load and ensures accurate cloth positioning, preventing penetration and maintaining realistic cloth representation with reduced computational effort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025147819000001_ABST
    Figure 2025147819000001_ABST
Patent Text Reader

Abstract

To provide a computer program and a computer device capable of correcting a cloth object to an appropriate position when it collides with a target object while suppressing a processing load in cloth representation using a physical calculation.SOLUTION: Cloth generation means generates a cloth mesh having a plurality of first vertices and accompanied with a target object. Cloth simulation means performs a predetermined physical calculation on each of the first vertices, and identifies a position of each of the first vertices at each predetermined time interval. The cloth generation means generates a mesh for determination whose position is determined according to a position of a bone. Collision determination means determines, in collision determination, when at least one of the positions of the plurality of first vertices obtained by the physical calculation is located on an opposite side of a target object mesh at same time from a side on which the determination mesh is located, that the cloth mesh has collided with the target object.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a computer program and a computer device. [Background technology]

[0002] BACKGROUND ART There is known a computer program that expresses the movement of a cloth object, such as clothing of a character, placed in a virtual space in a game program or the like, by cloth simulation using physical calculations (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2011-039619 Summary of the Invention [Problem to be solved by the invention]

[0004] In expressing the movement of such a cloth object, the cloth object is configured as a cloth mesh having multiple vertices (control points), and the position of each vertex is determined at a predetermined timing by physical calculation. At this time, collision detection is performed between the cloth object and a target object that is the subject of collision detection in order to prevent the cloth object from penetrating into an object that is close to the cloth object, such as a character's body.

[0005] In collision detection, for example, when each vertex of the cross mesh moves from its position at the previous timing to its position at the current timing, it is determined whether or not it will collide with the target object mesh that constitutes the target object, and if it does, a collision process is performed to correct the position of the corresponding vertex. Furthermore, each vertex of the cross mesh is subjected to a constraint process that restricts the movement of, for example, adjacent vertices.

[0006] Repeating collision processing and constraint processing at predetermined intervals increases the accuracy of the representation of the cloth object, but increases the computational load. Also, if the interval between the timing of determining the position of the cloth mesh is long (if the frame rate is low) or if the target object moves quickly, it may not be possible to prevent the cloth object from penetrating the target object. Once the cloth object has penetrated the target object, the penetration state cannot be resolved at subsequent determination timings unless the cloth object is reset to a predetermined shape.

[0007] Therefore, an object of the present invention is to provide a computer program and a computer device that can correct a cloth object to an appropriate position when it collides with a target object while reducing the processing load in cloth representation using physical calculations. [Means for solving the problem]

[0008] A computer program according to one aspect of the present invention causes a computer to function as object generation means for generating a target object, cloth generation means for generating a cloth mesh having a plurality of first vertices and associated with the target object, cloth simulation means for performing a predetermined physical calculation on each of the first vertices and specifying the position of each of the first vertices at predetermined time intervals, collision determination means for performing a collision determination on whether the cloth mesh has collided with the target object, and position correction means for correcting the position of each of the first vertices of the cloth mesh obtained by the physical calculation in accordance with a result of the collision determination, wherein the object generation means is configured to generate a target object by performing a predetermined physical calculation on each of the first vertices of the target object. and a target object mesh having a plurality of second vertices that form the surface of the target object, the position of each second vertex moving in accordance with the movement of the bones, the cloth generation means generates a judgment mesh having a plurality of third vertices corresponding to each of the first vertices of the cloth mesh, the position of each third vertex being determined in accordance with the position of the bones, and the collision judgment means judges that the cloth mesh has collided with the target object when, in the collision judgment, at least one of the positions of the plurality of first vertices obtained by the physical calculation is located on the opposite side to the side on which the judgment mesh is located, based on the target object mesh at the same time.

[0009] A computer device according to another aspect of the present invention includes a program storage unit that stores the computer program described above, and a computer that executes the program stored in the program storage unit. [Effects of the Invention]

[0010] According to the present invention, in cloth representation using physical calculations, it is possible to suppress the processing load and correct a cloth object to an appropriate position when it collides with a target object. [Brief explanation of the drawings]

[0011] [Figure 1]FIG. 1 is a block diagram showing the hardware configuration of a game device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a block diagram showing the functional configuration of the game device shown in FIG. [Figure 3] FIG. 3 is a diagram illustrating an example of a schematic configuration of a target object. [Figure 4] FIG. 4 is a partially enlarged view showing examples of a determination mesh, a target object mesh, and a cloth object mesh used for collision determination in this embodiment. [Figure 5] FIG. 5 is a flowchart showing an example of the flow of the cross object display process in this embodiment. [Figure 6] FIG. 6 is a partial enlarged view showing a target object and a cloth object in a comparative example. DETAILED DESCRIPTION OF THE INVENTION

[0012] [Embodiment] A computer program and a computer device according to an embodiment of the present invention will be described below with reference to the drawings. In the following description, a home game device is assumed as the computer device, and an example will be described in which an action game is realized by a computer program executed on the game device. In this embodiment, a player character is exemplified as an object that can be controlled by a user. The action game according to this embodiment progresses by controlling the player character, who acts in a virtual space, and fighting enemy characters to achieve a predetermined goal, such as annihilating all enemy characters or reaching a predetermined location in the virtual space.

[0013] [Hardware configuration] The configuration of the game device that realizes the above-mentioned game will now be described. The game system in this embodiment is composed of the below-described game device 2 and external devices such as a monitor (display unit) 19, a speaker 22, and a controller (operation unit) 24 connected to the game device 2, and is capable of playing a game based on a game program 30a and game data 30b read from the below-described disk-type storage medium 30. However, for ease of explanation, the game system may be simply referred to as the game device 2 below.

[0014] Fig. 1 is a block diagram showing the hardware configuration of a game device according to an embodiment of the present invention. As shown in Fig. 1, a game device 2 can communicate with other game devices 2 and a server device 3 via a communication network NW such as the Internet or a LAN. This game device 2 has a processor such as a CPU (Central Processing Unit) 10 that controls its operation. To this CPU 10 are connected via a bus 11 a ROM (Read Only Memory) 15, a RAM (Random Access Memory) 16, a disk drive 12, a memory card slot 13, and an HDD 14 that serves as a program storage unit. A memory card (flash memory) connected to the memory card slot 13 serves as a game data storage unit that stores the game progress status, game settings, and the like.

[0015] Furthermore, the CPU 10 is connected to a graphics processing unit 17 , an audio synthesis unit 20 , a wireless communication control unit 23 , and a network interface 25 via a bus 11 .

[0016] Of these, the graphics processing unit 17 draws game images including the game space and each character, etc., in accordance with instructions from the CPU 10. An external monitor 19 is connected to the graphics processing unit 17 via a video conversion unit 18, and the game images drawn by the graphics processing unit 17 are converted into a video format by the video conversion unit 18 and displayed on the monitor 19.

[0017] The audio synthesis unit 20 plays and synthesizes digital game sounds in accordance with instructions from the CPU 10. An external speaker 22 is also connected to the audio synthesis unit 20 via an audio conversion unit 21. Therefore, the game sounds played and synthesized by the audio synthesis unit 20 are decoded into analog format by the audio conversion unit 21 and then output from the speaker 22 to the outside.

[0018] Furthermore, the audio synthesis unit 20 can acquire data in which the user's voice or the like input from a microphone 26 provided on a headset or controller 24 connected to the game device 2 is digitally coded by the audio conversion unit 21. The audio synthesis unit 20 can transmit the acquired data to the CPU 10 as input information.

[0019] The wireless communication control unit 23 has a 2.4 GHz wireless communication module and is wirelessly connected to a controller 24 attached to the game device 2, enabling data transmission and reception. By operating buttons and other controls provided on the controller 24, the user can input signals to the game device 2 and control the actions of the player character displayed on the monitor 19.

[0020] The network interface 25 connects the game device 2 to a communication network NW such as the Internet or a LAN, and allows communication with other game devices 2 or the server device 3. By connecting the game device 2 to other game devices 2 via the communication network NW and transmitting and receiving data to and from each other, it is possible to display multiple player characters synchronously within the same virtual space.

[0021] This allows the game to be played in multiplayer mode, where multiple player characters corresponding to multiple users cooperate to fight against enemy characters, or where multiple users compete against each other.

[0022] [Functional configuration of the game device] Figure 2 is a block diagram showing the functional configuration of the game device shown in Figure 1. As shown in Figure 1, the game device 2 operates as a computer equipped with a control unit 4 including a CPU 10, HDD 14, ROM 15, RAM 16, graphics processing unit 17, video conversion unit 18, audio synthesis unit 20, audio conversion unit 21, network interface 25, etc.

[0023] As shown in FIG. 2, the control unit 4 of the game device 2 executes the game program 30a of the present invention to perform functions such as game progression means 40, object generation means 41, object operation means 42, cloth generation means 43, cloth simulation means 44, collision determination means 45, and position correction means 46.

[0024] Of these, the game progression means 40 progresses the game by making the player character generated in the virtual space act based on the user's operational input. The game progression means 40 generates a three-dimensional virtual space (game space) in which the player character operated by the user acts. For example, the game progression means 40 reads data such as objects (objects other than target objects such as fixed objects) and textures included in the game data 30b as the player character moves, and generates a three-dimensional virtual game space. Furthermore, the game progression means 40 positions a virtual camera based on the position of the player character. The game progression means 40 controls the actions of the player character and the virtual camera in accordance with the user's operational input via the controller 24 or the progress of the game.

[0025] The object generation means 41 generates a target object. The target object is an object that is set as a target for performing a cross simulation, which will be described later. The target object includes a player character and a non-player character such as an enemy character. The object operation means 42 controls the operation of the target object that acts in the virtual space.

[0026] The cloth generation means 43 generates a cloth object to be associated with the target object. Note that "a cloth object is associated with a target object" means that the target object is set as a target for performing collision detection with the cloth object, which will be described later. The cloth object is composed of a cloth mesh having a plurality of first vertices. In this embodiment, the cloth object includes clothing worn by the player character and non-player characters. The cloth object includes a portion whose movement is controlled by the cloth simulation described below.

[0027] The cloth simulation means 44 performs a predetermined physical calculation for each first vertex of the cloth mesh based on the movement of the target object, the situation around the target object, etc. The cloth simulation means 44 specifies the position of each first vertex at each predetermined time interval according to the result of the physical calculation.

[0028] Collision determination means 45 performs collision determination to determine whether the cloth mesh has collided with a target object. Position correction means 46 corrects the position of each first vertex of the cloth mesh obtained by physical calculation according to the result of collision determination.

[0029] [Target object configuration] 3 is a diagram showing a schematic configuration example of a target object. The target object 50 includes a plurality of bones 51 and a target object mesh 52 that moves in accordance with the movement of the bones 51. The target object mesh 52 has a plurality of second vertices 53 that form the surface of the target object 50. Note that in FIG. 3, an example of the arrangement of the plurality of second vertices 53 is shown only for the forearm of the target object mesh 52 that forms the surface of the player character, but the same applies to other parts. Each second vertex 53 is weighted relative to a bone 51 .

[0030] The object operating means 42 moves each bone 51 of the target object 50, which is the player character, based on the user's operation, the state of the player character, external factors, etc. For example, the user's operation includes behavioral operations such as running, jumping, crouching, attacking, and defending. Furthermore, for example, the state of the player character includes a dying state, a poisoned state, falling, etc. The basic posture of the player character can change depending on such a state of the player character. Furthermore, for example, external factors include being attacked by an enemy character, being hit by a strong wind, etc. The player character can make a reaction action in response to such external factors.

[0031] Since multiple bones 51 are connected, the movement range of each of two connected bones 51 is limited. The object operation means 42 determines the position of each bone 51 using the movement range limit imposed by the connection between the bones 51 as a constraint condition.

[0032] The object operation means 42 determines the position of each second vertex 53 of the corresponding target object mesh 52 based on the position of each bone 51. The object operation means 42 changes the position of a second vertex 53 to a greater extent in accordance with the movement of the associated bone 51, as the weighting of the second vertex 53 increases with respect to the associated bone 51. Note that the number of bones 51 associated (weighted) with one second vertex 53 may vary depending on the position of the second vertex. In other words, the multiple second vertices 53 may include a second vertex 53 associated with one bone 51 and second vertices 53 associated with multiple bones 51.

[0033] The object operating means 42 determines the positions of the bones 51 and the second vertices 53 at predetermined time intervals, thereby operating the target object 50, which is the player character. The same applies to target objects 50 other than the player character.

[0034] In this embodiment, apart from the target object 50 which is the player character, clothing worn by the target object 50 is generated as a cloth object 60. In FIG. 3, the cloth object 60 is illustrated as a skirt. The cloth object 60 includes a cloth mesh 62 having a plurality of first vertices 61. The plurality of first vertices 61 constitute the surface of the cloth object 60. Note that while FIG. 3 only shows the first vertices 61 in a cross section parallel to the paper surface, the plurality of first vertices 61 are arranged three-dimensionally so that the three-dimensional shape of the cloth object 60 which is a skirt can be formed by the cloth mesh 62.

[0035] The multiple first vertices 61 include a specific first vertex 61a that is fixed at a predetermined position on the surface of the target object 50. In the example of FIG. 3, the first vertex located at the upper end of the cloth mesh 62 functions as the specific first vertex 61a. The specific first vertex 61a is fixed on the target object mesh 52. The specific first vertex 61a moves in accordance with the movement of the target object mesh 52.

[0036] The cloth simulation means 44 performs a predetermined physical calculation based on the user's operation, the state of the player character, external factors, etc., and identifies the positions of multiple first vertices 61 based on the results of the physical calculation. For example, when the player character is running as shown in FIG. 3, gravity and wind pressure from the front in the moving direction of the player character act on the skirt, which is the cloth object 60. The cloth simulation means 44 performs physical calculation for at least some of the forces acting on the cloth object 60, and identifies the position of each first vertex 61. Note that, among the multiple first vertices 61, the movement range between two connected first vertices 61 is restricted. The cloth simulation means 44 determines the position of the first vertex 61 using the restriction on the movement range due to the connection between the first vertices 61 as a constraint condition.

[0037] In this way, the positions of the second vertices 53 of the target object mesh 52 constituting the target object 50, which is the player character, and the first vertices 61 of the cloth mesh 62 constituting the cloth object 60, which is the clothing (skirt) worn by the player character, are identified by different calculations. Therefore, the target object mesh 52 and the cloth mesh 62 may intersect with each other. Therefore, if the target object 50 and the cloth object 60 are displayed using the results of each calculation as is, a problem may occur, such as the skirt, which is the cloth object 60, getting stuck in the player character, which is the target object 50.

[0038] Therefore, the collision determination means 45 performs collision determination to determine whether the cloth mesh 62 has collided with the target object 50 (target object mesh 52). In this embodiment, a determination mesh 72 is used for collision determination. For this purpose, the cloth generation means 43 generates the determination mesh 72.

[0039] [Collision detection] 4 is a partially enlarged view showing examples of a determination mesh, a target object mesh, and a cloth object mesh used for collision determination in this embodiment. Shown in FIG. 4 is a portion of a target object mesh 52 corresponding to one leg of the player character, a portion of a cloth mesh 62 corresponding to the skirt portion located in front of the target object mesh 52, and a portion of a corresponding determination mesh 72.

[0040] The determination mesh 72 has a plurality of third vertices 71. Each of the plurality of third vertices 71 corresponds to one of the plurality of first vertices 61 in the cross mesh 62. Therefore, the plurality of third vertices 71 includes a specific third vertex that is located at the same position as the specific first vertex 61a in the cross mesh 62. In the example of FIG. 3, the specific third vertex coincides with the specific first vertex 61a located at the upper end of the cross mesh 62. Note that FIG. 3 only shows the third vertices 71 that correspond to the first vertex 61 at the front end and the first vertex 61 at the rear end in a cross section parallel to the paper surface, but there is a one-to-one correspondence between the plurality of first vertices 61 and the plurality of third vertices 71. Therefore, the number of first vertices 61 and the number of third vertices 71 are the same.

[0041] Each third vertex 71 of the determination mesh 72 is associated with a specific bone 51. The position of each third vertex 71 is determined according to the position of the associated bone 51. Therefore, the position of each third vertex 71 moves according to the movement of the bone 51. In this way, the cloth generation means 43 determines the position of each third vertex of the determination mesh 72 without relying on physical calculations. In other words, the determination mesh 72 functions as a mesh similar to the target object mesh 52. However, since the surface of the cloth object 60 is formed by the cloth mesh 62, the determination mesh 72 does not form part of the surface of the cloth object 60.

[0042] The position of each third vertex 71 of the determination mesh 72 is arbitrarily determined in advance as a position correlating with the bone 51. Like the second vertex 53, the position of each third vertex 71 is weighted with respect to the associated bone 51, and the amount of movement can be determined based on the weighting of the moved bone 51. In particular, each third vertex 71 of the determination mesh 72 is determined so as to be located between the target object 50 and the cloth object 60 when no collision occurs between the target object 50 and the cloth object 60. In other words, a state in which the determination mesh 72 is located between the target object 50 and the cloth object 60 is an appropriate position for the cloth object 60.

[0043] 5 is a flowchart showing an example of the flow of the cloth object display process in this embodiment. As described above, the cloth simulation means 44 physically calculates the position of each first vertex 61 of the cloth mesh 62 at predetermined time intervals. Here, the processing at time T2, after the predetermined time interval has elapsed since time T1, is illustrated. For example, the predetermined time interval corresponds to the frame rate when an image including the target object 50 and the cloth object 60 is displayed.

[0044] The cloth simulation means 44 determines whether a predetermined time interval has elapsed since time T1 and the time has arrived at time T2 (step S1). If it is determined that time T2 has arrived (Yes in step S1), the cloth simulation means 44 performs physics calculations to identify the positions of each first vertex 61 at time T2 from the positions of each first vertex 61 at time T1 (step S2). At this time, the object operation means 42 determines the positions of each second vertex 53 of the target object 50 and the positions of each third vertex 71 of the determination mesh 72 according to the positions of the associated bones 51.

[0045] The collision determination means 45 performs collision determination based on whether the position of each first vertex 61 obtained by physical calculation is located on the opposite side of the determination mesh 72 relative to the target object mesh 52 at time T2 (step S3). If all of the first vertices 61 are located on the determination mesh 72 side relative to the target object 52 (No in step S3), the collision determination means 45 determines that the cloth mesh 62 has not collided with the target object mesh 52. In this case, the cloth generation means 43 determines the position of the first vertex 61 at time T2 to be the position specified by the cloth simulation. The cloth generation means 43 displays the cloth object 60 based on the determined position of the first vertex 61. Note that "the first vertex 61 is located on the determination mesh 72 side relative to the target object 52" includes not only the case where the first vertex 61 is located between the target object mesh 52 and the determination mesh 72, but also the case where the first vertex 61 is located on the opposite side of the target object mesh 52 relative to the determination mesh 72.

[0046] On the other hand, if there is a first vertex 61 that is not located on the judgment mesh 72 side based on the target object 52 (Yes in step S3), the collision determination means 45 determines that at least a part of the cross mesh 62 is colliding with the target object mesh 52.

[0047] For example, in the example of FIG. 4, a first vertex near the knee of the player character is denoted as 61x, and a corresponding third vertex of the determination mesh 72 is denoted as 71x. At time T1, this first vertex near the knee 61x is located on the determination mesh 72 side with respect to the target object mesh 52 as the reference. In the example of FIG. 4, the player character is running forward. Therefore, at time T2, the position of the knee is located forward compared to time T1, while gravity and a force acting backward in the moving direction of the player character are applied to the cloth object 60. Such physical phenomena are simulated by the cloth simulation means 44. Through physical calculations, the cloth mesh 62 is located in a position behind the moving direction of the player character relative to its position at time T1.

[0048] 4 , a state may occur in which the cloth mesh 62 after the physical calculation penetrates into (penetrates through) the target object mesh 52. At this time, the first vertex 61x near the knee of the cloth mesh 62 is not located on the side of the determination mesh 72 relative to the target object mesh 52, that is, it is located on the opposite side of the determination mesh 72 relative to the target object mesh 52. The collision determination means 45 detects this state and determines that the cloth mesh 62 has collided with the target object 50.

[0049] When it is determined that the cloth mesh 62 has collided with the target object 50, the position correcting means 46 corrects the positions of the first vertices 61x that are not located on the determination mesh 72 side with respect to the target object mesh 52 as a reference, among the first vertices 61 obtained by the physical calculation (step S4). More specifically, the position correcting means 46 moves the positions of the first vertices 61x that are not located on the determination mesh 72 side with respect to the target object mesh 52 as a reference, toward the determination mesh 72 side with respect to the target object mesh 52 as a reference. In the example of FIG. 4, as shown in the state diagram at time T2 (after position correction) in FIG. 4, the position of the first vertex 61x before correction is corrected to the position of the first vertex 61xc after correction.

[0050] As described above, the movement range between two connected first vertices 61 is restricted. The position correction means 46 can correct the positions of other related first vertices 61 in accordance with the change in the position of the corrected first vertex 61x, using the restriction on the movement range due to the connection between the first vertices 61 as a constraint. In the example of FIG. 4, of the first vertices 61, the first vertex 61 on the opposite side to the specific first vertex 61a side is corrected using the first vertex 61x whose position has been corrected as a reference. In FIG. 4, the first vertex whose position has been corrected in conjunction with the position correction of the first vertex 61x is denoted by the reference symbol 61c.

[0051] By such a correction, all of the first vertices 61 after the correction are positioned between the determination mesh 72 and the target object mesh 52. This prevents the cloth object 60 from penetrating into the target object 50.

[0052] [Effects of the invention] In summary, one aspect of the present embodiment causes a computer (control unit 4) to function as object generation means 41 that generates a target object 50, cloth generation means 43 that generates a cloth mesh 62 having a plurality of first vertices 61 and that is associated with the target object 50, cloth simulation means 44 that performs a predetermined physical calculation on each of the first vertices 61 and identifies the position of each of the first vertices 61 at predetermined time intervals, collision determination means 45 that performs a collision determination as to whether the cloth mesh 62 has collided with the target object 50, and position correction means 46 that corrects the position of each of the first vertices 61 of the cloth mesh 62 obtained by the physical calculation in accordance with the result of the collision determination, and the object generation means 41 generates bones 51 that are arranged in the target object 50, and the The computer program generates a target object mesh (52) having a plurality of second vertices (53) that form the surface of the target object (50), the positions of each of the second vertices (53) moving in accordance with the movement of the bones (51); the cloth generation means (43) generates a judgment mesh (72) having a plurality of third vertices (71) that correspond to each of the first vertices (61) of the cloth mesh (62), the positions of each of the third vertices (71) being determined in accordance with the positions of the bones (51); and the collision judgment means (45) judges that the cross mesh (62) has collided with the target object (50) when, in the collision judgment, at least one of the positions of the plurality of first vertices (61) obtained by the physical calculation is located on the opposite side to the side on which the judgment mesh (72) is located, based on the target object mesh (52) at the same time.

[0053] According to the game program of this embodiment, cloth mesh 62 having a plurality of first vertices 61 whose positions are determined by physics calculation is corrected so that it is positioned between target object mesh 52, which moves in conjunction with the movement of bones 51 that make up target object 50, and judgment mesh 72. At this time, the positions of the plurality of second vertices 53 that make up target object mesh 52 used for collision judgment and the positions of the plurality of third vertices 71 that make up judgment mesh 72 are the same positions at the same time as the positions of the plurality of first vertices 61 that are the object of judgment.

[0054] As a result, the collision detection does not require consideration of the movement (direction of movement) of each of the target object 50 and the cloth object 60, thereby reducing the processing load in the collision detection and achieving faster processing. Furthermore, the position of the third vertex 71 constituting the determination mesh 72 is determined according to the position of the associated bone 51, so the position of the third vertex 71 can be determined arbitrarily by the creator of the target object 50. Furthermore, the cloth mesh 62 is corrected so that it is positioned closer to the determination mesh 72 with reference to the target object mesh 52, which is linked to the movement of the bone 51 constituting the target object 50, so the position of the cloth mesh 62 can be corrected in the direction intended by the creator. Therefore, in cloth representation using physical calculations, the processing load can be reduced and the cloth object 60 can be corrected to an appropriate position upon collision with the target object 50.

[0055] Here, to explain the effect of this embodiment in more detail, a comparative example based on a conventional method is shown. FIG. 6 is a partially enlarged view showing a target object and a cloth object in the comparative example. As in FIG. 4, FIG. 6 also shows one leg of the player character, which is the target object 50, and a part of the cloth object 60 corresponding to the skirt part located in front of the leg. FIG. 6 shows the state of the target object 50 at time T2. Note that in the example of FIG. 6, the cloth mesh 62 at time T2 is located in an appropriate position, i.e., a position where it does not collide with the target object 50.

[0056] In the comparative example shown in Fig. 6, which is one of the conventional methods, the first vertex 61 at the immediately previous position determination timing is used as the basis for collision determination. In the example of Fig. 6, the first vertex near the knee of the player character at time T1 is denoted as 61x_T1, and the cloth mesh at time T1 is denoted as 62_T1. Similarly, the first vertex near the knee of the player character at time T2 is denoted as 61x_T2, and the cloth mesh at time T2 is denoted as 62_T2.

[0057] In the comparative example, as in the present embodiment, a physical calculation is performed on each first vertex 61 of the cloth mesh 62_T2 at time T2, and the position of each first vertex 61 at time T2 is identified. A collision determination is performed to determine whether the identified position of each first vertex 61 is colliding with the target object mesh 52. At this time, the cloth mesh 62_T1 at time T1, which is the previous position determination timing, is used as a reference. In the collision determination in the comparative example, if the target object mesh 52 exists between the position 61_T1 at time T1 and the position 61_T2 at time T2 for each first vertex 61, it is determined that the first vertex 61 will collide with the target object mesh 52.

[0058] As described above, in the comparative example, it is necessary to compare the movement trajectory of each first vertex 61 of the cloth mesh 62 from time T1 to time T2 with the movement trajectory of the target object mesh 52 from time T1 to time T2, which increases the processing load. In contrast, according to the present embodiment, as described above, it is not necessary to consider the movement (movement trajectory) of each of the target object 50 and the cloth object 60, so it is possible to reduce the processing load in collision detection and achieve faster processing. Furthermore, since it is not necessary to consider the movement of each of the target object 50 and the cloth object 60, it is also possible to reduce the frequency of repeating position correction and constraint processing based on collision detection.

[0059] 6, the target object mesh 52 exists between the first vertex 61x_T1 near the knee at time T1 and the first vertex 61x_T2 near the knee at time T2. Therefore, it is determined that the first vertex 61x will collide with the target object mesh 52, and the position of the first vertex 61x_T2 at time T2 is corrected. At this time, the position of the first vertex 61x_T2 at time T2 is corrected to the side of the first vertex 61x_T1 at time T1, with the target object mesh 52 as the reference.

[0060] 6, if the target object mesh 52 does not move between time T1 and time T2, the position of the first vertex 61x_T1 at time T1 is not appropriate, and the cloth object 60 is embedded in the target object 50. Temporary embedding can occur when the frame rate is low or when the motion speed of the target object 50 is fast compared to the frame rate. If the position of the first vertex 61x_T1 at time T1, which serves as the reference for position correction, is not appropriate, the corrected position of the first vertex 61x_T2 at time T2 may also not be appropriate.

[0061] Specifically, in the example of FIG. 6 , the position of the first vertex 61x_T2 at time T2 is corrected toward the first vertex 61x_T1 at time T1 with respect to the target object mesh 52. This causes the position of the first vertex 61x_T2 at time T2, which should be correct, to be corrected inside the target object mesh 52. As a result, even after time T3, which is a predetermined time interval after time T2, the position of the first vertex 61x continues to be corrected inside the target object mesh 52. In this state, the only option is to temporarily reset the position of the cloth object 60 to a position different from the position based on physics calculation. In this way, a position correction unintended by the creator may occur, and the cloth object 60 may not be properly represented.

[0062] In contrast, according to this embodiment, as described above, collision determination is performed by comparing the position of the first vertex 61 determined by physical calculation with the positions of the target object mesh 52 and the determination mesh 72 at the same time. That is, at each time point, an independent collision determination is performed without using the position at the previous time point. Therefore, even if the position of the first vertex 61 at time point T1 is temporarily erroneously determined to be inside the target object mesh 52, it can be corrected to a position outside the target object mesh 52 at time point T2, and it is possible to prevent the cross mesh 62 from continuing to be in an incorrect position.

[0063] [Other embodiments] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various improvements, changes, and modifications are possible within the scope of the spirit of the present invention.

[0064] For example, in the above embodiment, the target object 50 includes a player character and a non-player character such as an enemy character, but is not limited to this. For example, the target object 50 may be set as a fixed object such as a house or a tree. Also, for example, the target object 50 may be set as a non-fixed object such as a car.

[0065] In the above embodiment, the cloth object 60 is the player character's clothing, but this is not limiting. For example, the cloth object 60 may be set as an object such as the character's hair, a character's equipment, fabric such as a curtain or a flag, grass, or leaves. Also, a part of an object may be set as the cloth object 60. For example, the skirt and sleeves of a dress worn by the character may be set as the cloth object 60, and the other parts, such as the waist, may be set as objects associated with the bones 51 of the character to wear it.

[0066] Furthermore, in the above embodiment, an example was shown in which some of the multiple first vertices 61 constituting the cloth object 60 are set as specific first vertices 61a, and the specific first vertices 61a are fixed to predetermined positions on the surface of the target object 50, thereby fixing a portion of the cloth object 60 to the target object 50. However, these do not have to be fixed to each other. For example, if the cloth object 60 is a curtain fixed indoors, the target object 50 that is the target for collision detection with the curtain may be set not only to the wall of the house to which the curtain is fixed, but also to a character located indoors. In this case, the determination mesh 71 is set for both the wall of the house and the character located indoors. In this way, the determination mesh 71 may be set apart from the cloth object 60.

[0067] Furthermore, although the above embodiment has been described with reference to a stationary game device, the present invention can also be suitably applied to a portable game device, a mobile phone, and a computer such as a personal computer.

[0068] Furthermore, in the above embodiment, an example was shown in which an action game was realized using the cloth object 60 and the target object 50, but the present invention is not limited to this and can be widely applied to computer graphics other than games, such as movies and promotional videos.

[0069] [Disclosure Summary] Each of the following sections discloses a preferred embodiment.

[0070] [Item 1] Computer, object generation means for generating a target object; a cloth generation means for generating a cloth mesh having a plurality of first vertices and associated with the target object; a cloth simulation means for performing a predetermined physical calculation on each of the first vertices and specifying the position of each of the first vertices at predetermined time intervals; a collision determination means for determining whether the cloth mesh has collided with the target object; functioning as a position correction means for correcting the positions of each first vertex of the cloth mesh obtained by the physical calculation in accordance with the result of the collision determination; the object generation means generates a target object mesh having bones to be placed within the target object and a plurality of second vertices constituting a surface of the target object, the positions of the second vertices moving in accordance with the movement of the bones; the cloth generation means generates a judgment mesh having a plurality of third vertices corresponding to the first vertices of the cloth mesh, the positions of the third vertices being determined according to the positions of the bones; The collision determination means determines that the cloth mesh has collided with the target object if, in the collision determination, at least one of the positions of the multiple first vertices obtained by the physical calculation is located on the opposite side to the side on which the determination mesh is located, with the target object mesh as a reference at the same time.

[0071] [Item 2] Item 1. The computer program according to item 1, wherein, when it is determined that the cross mesh has collided with the target object, the position correction means moves the positions of the first vertices obtained by the physical calculation that are not located on the judgment mesh side relative to the target object mesh toward the judgment mesh side relative to the target object mesh.

[0072] [Item 3] 3. The computer program according to claim 1, wherein at least one of the plurality of first vertices, a specific first vertex, is fixed at a predetermined position on the surface of the target object.

[0073] [Item 4] A program storage unit that stores the computer program according to any one of items 1 to 3; a computer that executes the program stored in the program storage unit. [Industrial Applicability]

[0074] The present invention is useful for correcting a cloth object to an appropriate position when it collides with a target object while suppressing the processing load in cloth representation using physical calculations. [Explanation of symbols]

[0075] 1. Game device 4. Control unit (computer) 41 Object Creation Method 43 Cross Generation Method 44 Cloth Simulation Method 45 Collision determination means 46 Position correction means 50 Target Objects 51 Born 52 target object mesh 53 Second Vertex 61 First Vertex 61a Specific First Vertex 62 Cross Mesh 71 Third Vertex 72 Judgment mesh

Claims

1. Computer, object generation means for generating a target object; a cloth generating means for generating a cloth mesh having a plurality of first vertices and associated with the target object; a cloth simulation means for performing a predetermined physical calculation on each of the first vertices and specifying the position of each of the first vertices at predetermined time intervals; a collision determination means for determining whether the cloth mesh has collided with the target object; functioning as a position correction means for correcting the positions of each first vertex of the cloth mesh obtained by the physical calculation in accordance with the result of the collision determination; the object generation means generates a target object mesh having bones to be placed within the target object and a plurality of second vertices constituting a surface of the target object, the positions of the second vertices moving in accordance with the movement of the bones; the cloth generation means generates a determination mesh having a plurality of third vertices corresponding to the first vertices of the cloth mesh, the positions of the third vertices being determined according to the positions of the bones; The collision determination means determines that the cloth mesh has collided with the target object when, in the collision determination, at least one of the positions of the multiple first vertices obtained by the physical calculation is located on the opposite side to the side on which the determination mesh is located, with the target object mesh as a reference at the same time.

2. 2. The computer program according to claim 1, wherein, when it is determined that the cloth mesh has collided with the target object, the position correction means moves the positions of the first vertices obtained by the physical calculation that are not located on the determination mesh side with the target object mesh as a reference, toward the determination mesh side with the target object mesh as a reference.

3. The computer program according to claim 1 , wherein at least one of the plurality of first vertices, a specific first vertex, is fixed to a predetermined position on the surface of the target object.

4. a program storage unit that stores the computer program according to claim 1 or 2; a computer that executes the program stored in the program storage unit.

Citation Information

Patent Citations

  • Computer-implemented method for designing avatar with at least one garment

    JP2016110652A

  • Image generating device, image generating method, and program

    JP2011039619A