CN113129414A - Hand motion repairing method, device, equipment and storage medium - Google Patents

Hand motion repairing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113129414A
CN113129414A CN202110391111.XA CN202110391111A CN113129414A CN 113129414 A CN113129414 A CN 113129414A CN 202110391111 A CN202110391111 A CN 202110391111A CN 113129414 A CN113129414 A CN 113129414A
Authority
CN
China
Prior art keywords
hand
target
original
wrist
hand end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110391111.XA
Other languages
Chinese (zh)
Other versions
CN113129414B (en
Inventor
刘思阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202110391111.XA priority Critical patent/CN113129414B/en
Publication of CN113129414A publication Critical patent/CN113129414A/en
Application granted granted Critical
Publication of CN113129414B publication Critical patent/CN113129414B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Architecture (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Manipulator (AREA)

Abstract

The application relates to a hand action repairing method, a hand action repairing device, hand action repairing equipment and a storage medium, wherein the method comprises the following steps: acquiring original hand parameters in original actions of an original object, wherein the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end; acquiring target wrist parameters in target actions of a target object, wherein the target wrist parameters comprise respective target positions of a left wrist and a right wrist, and the target actions are acquired by redirecting original actions to the target object; determining respective target positions of a left-hand end and a right-hand end, which are required for repairing the hand action in the target actions, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters and the target wrist parameters meet constraint conditions; and repairing the hand action in the target action according to the target positions of the left hand end and the right hand end and the target wrist parameters. This application is used for can repairing the hand action when the motion is redirected, avoids appearing the hand and wears the mould or the serious deviation appears in the hand action.

Description

Hand motion repairing method, device, equipment and storage medium
Technical Field
The present application relates to the field of virtual reality technologies, and in particular, to a method, an apparatus, a device, and a storage medium for hand motion restoration.
Background
Motion redirection (Motion redirection) is one of the important methods for Motion editing and synthesis in three-dimensional animation. Motion redirection refers to redirecting motion from one role to another role so as to achieve the purpose of sharing motion among multiple roles. For example, the arm bending motion of the character a is redirected to the character B, so that the character B performs the same arm bending motion as the character a.
In motion redirection, two redirection strategies are typically used, one being rotation-first and the other being position-first. By rotation-first, the rotational information for each joint is kept constant during the motion reorientation. The position-first is to adjust the position of each node between the root joint point and the end joint point while keeping the position of the end joint constant during the motion redirection process.
In a virtual reality scene, when the human body model is subjected to motion redirection, the motion of the hand is not considered, and the original rotation information of the hand and the forearm is kept unchanged.
When the position-first strategy is used for motion redirection, because the position of the end joint point needs to be kept unchanged, the rotation information of the end joint point and the parent joint point may be changed, that is, the wrist joint point generates relative rotation relative to the elbow joint point, and when the rotation information of the forearm is changed, if the rotation information of the hand and the rotation information of the forearm are kept unchanged, the motion of the hand may be crossed or seriously deviated.
Disclosure of Invention
The application provides a hand action repairing method, device, equipment and storage medium, which are used for repairing hand actions when movement is redirected and avoiding hand die penetration or serious deviation of the hand actions.
In a first aspect, a hand motion repairing method is provided, including:
acquiring original hand parameters in original actions of an original object, wherein the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end respectively;
acquiring target wrist parameters in a target action of a target object, wherein the target wrist parameters comprise respective target positions of a left wrist and a right wrist, and the target action is obtained by redirecting the original action to the target object;
determining respective target positions of a left-hand terminal and a right-hand terminal, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand terminal and the right-hand terminal, the original hand parameters and the target wrist parameters satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
Optionally, the first distance value determined by the target position of each of the left-hand end and the right-hand end being close to the second distance value determined by the original position of each of the left-hand end and the right-hand end includes:
the first distance value is equal to the second distance value.
Optionally, the determining respective target positions of a left-hand end and a right-hand end required for repairing a hand motion in the target motions so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters, and the target wrist parameters satisfy constraints includes:
connecting the left-hand end and the right-hand end according to the respective original positions of the left-hand end and the right-hand end to obtain a first connecting line segment;
connecting the left wrist and the right wrist according to the target positions of the left wrist and the right wrist to obtain a second connecting line segment;
taking the midpoint of the first connecting line segment as a first midpoint, taking the midpoint of the second connecting line segment as a second midpoint, and obtaining a first vector pointing from the second midpoint to the first midpoint, wherein the size of the first vector is a third distance value from the second midpoint to the first midpoint;
drawing a first straight line parallel to the first vector through the original position of the left-hand end, and drawing a second straight line parallel to the first vector through the original position of the right-hand end;
and determining the target position of the left-hand end on the first straight line, determining the target position of the right-hand end on the second straight line, and enabling the length of a connecting line from the target position of the left-hand end to the target position of the left wrist to be equal to the first set value and enabling the length of a connecting line from the target position of the right-hand end to the target position of the right wrist to be equal to the second set value.
Optionally, the target position of the left-hand end further satisfies that the ratio of a second vector pointing to the original position of the left-hand end to the first vector is greater than or equal to-1; a magnitude of the second vector is equal to a fourth distance value of the target position of the left-hand end and the original position of the left-hand end;
the target position of the right-hand end also satisfies that the ratio of a third vector of the target position of the right-hand end pointing to the original position of the right-hand end to the first vector is greater than or equal to-1; a magnitude of the third vector is equal to a fifth distance value between the target position of the right-hand end and the original position of the right-hand end.
Optionally, before determining respective target positions of a left-hand end and a right-hand end required for repairing a hand motion in the target motions so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters, and the target wrist parameters satisfy constraints, the method further includes:
acquiring original wrist parameters in the original action, wherein the original wrist parameters comprise original positions of a left wrist and a right wrist respectively;
calculating a sixth distance value between the original position of the left wrist and the original position of the left-hand end, and taking the sixth distance value as the first set value;
and calculating a seventh distance value between the original position of the right wrist and the original position of the right hand end, and taking the seventh distance value as the second set value.
Optionally, before determining the target positions of the left-hand end and the right-hand end required for repairing the hand motion in the target motion, the method further includes:
and determining the first distance value according to the original position of the left-hand tail end and the original position of the right-hand tail end, and determining that the first distance value is not greater than a preset distance value.
Optionally, the acquiring original hand parameters in an original motion of an original object includes:
acquiring the original positions of the fingers of the left hand and the fingers of the right hand in the original action;
for any target finger in the left hand fingers, executing a calculation process: calculating an eighth distance value between the original position of the target finger and the original position of each finger of the right hand;
selecting a minimum distance value from the calculated eighth distance values, taking the original position of the left hand finger corresponding to the minimum distance value as the original position of the left hand tail end, and taking the original position of the right hand finger corresponding to the minimum distance value as the original position of the right hand tail end.
In a second aspect, the present application provides a hand motion prosthetic device comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring original hand parameters in original actions of an original object, and the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end;
a second obtaining module, configured to obtain a target wrist parameter in a target motion of a target object, where the target wrist parameter includes respective target positions of a left wrist and a right wrist, and the target motion is obtained as redirecting the original motion to the target object;
a processing module, configured to determine respective target positions of a left-hand end and a right-hand end, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameter, and the target wrist parameter satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus; the memory for storing a computer program; the processor is configured to execute the program stored in the memory, and implement the hand motion restoration method according to the first aspect of the present invention.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the hand motion repairing method according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the second distance value between the left-hand end and the right-hand end in the target action after the redirection is limited to be close to the first distance value between the left-hand end and the right-hand end in the original action, so that the proper distance can be kept between the two hands after the redirection, and the phenomenon of mold penetration is avoided. At the same time, by defining the length of the connection from the re-oriented left-hand end to the left wrist and defining the length of the connection from the re-oriented right-hand end to the right wrist, the original hand movements can be substantially maintained without significant deviation.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of a motion redirection for a chain structure ABC;
FIG. 2 is a schematic diagram illustrating the effect of the mold penetration problem caused by hand movement;
FIG. 3 is a schematic diagram showing the effect of a large deviation in the hand movement;
FIG. 4A is a diagram illustrating the original movement of a character model;
FIG. 4B is a schematic diagram of the effect of FIG. 4A after the original motion is redirected;
FIG. 5 is a schematic flow chart illustrating hand movement repairing performed in the embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating the determination of the respective target positions of the left-hand end and the right-hand end in the embodiment of the present application;
FIG. 7 is a schematic flow chart illustrating the process of obtaining original hand parameters according to the embodiment of the present application;
fig. 8 is a schematic diagram of a positional relationship between nodes in the embodiment of the present application;
FIG. 9 is a schematic structural diagram of a hand-operated prosthetic device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be noted that, during the motion redirection process, the original object and the target object are described in the same world coordinate system, and the positions in the same world coordinate system are substantially coincident, for example, if both the objects are people and only the arms are different in length, the rest parts of the two objects except the arm are coincident, and only the coordinates of the arm in the world coordinate system are different.
In the course of movement redirection, there are redirection strategies with position priority and redirection strategies with rotation priority, and any one strategy can be selected for movement redirection.
For example, assume that the chain structure ABC shown in FIG. 1, which represents a person's arm, is motion redirected, A being a shoulder joint point, B being an elbow joint point, and C being a wrist joint point. AB is a big arm, BC is a small arm. The task of motion redirection is to migrate from a person with a short arm to a person with a long arm, assuming that the original skeleton AB is 2 centimeters (cm) and BC is 2 cm; the target bone AB is 3cm, BC is 3 cm. If rotation precedence is used, i.e. the rotation information for each joint point is kept constant, AB 'C' is obtained after redirection to the target bone. If position preference is used, i.e. the position of the end joint is kept constant, the root joint is adjusted to the node between the end joints, and the AB "C" is obtained after redirection to the target bone. B 'is the position of point B after preferential reorientation with rotation, and C' is the position of point C after preferential reorientation with rotation. B "is the position of point B after position-first redirection, and C" is the position of point C after position-first redirection.
The inventor discovers that by analyzing the prior art:
when the movement is redirected, all joint points above the wrist are redirected, and the hand is not considered, so that the original rotation information of the hand and the forearm is kept unchanged.
When a position-first reorienting strategy is used, because the position of the end joint point needs to be kept unchanged, the rotation information of the end joint point and the parent joint point may be changed, that is, the wrist joint point generates relative rotation relative to the elbow joint point, when the rotation information of the forearm is changed, if the original rotation information of the hand and the forearm is kept unchanged, the motion of the hand cannot be kept, and therefore, the hand is penetrated, or the motion of the hand has serious deviation.
For example, as shown in fig. 2, the operation of the forearm and the hand is schematically illustrated, in which the long and thin line segment represents the forearm and the short line segment represents the hand. The first action in the figure is the original action in which the hand is the clapping action. In the process of redirecting the arm action by adopting position priority, the positions of the shoulder joint points and the wrist joint points are kept unchanged, so that the rotation information of the elbow joint points is changed, if the rotation information of the hand is kept unchanged, the repositioning effect is the effect of the second row in the figure, and the hand is obviously penetrated. The third row in the figure is the correct motion, i.e. the hand should remain in the palm even if the forearm rotates.
For example, as shown in fig. 3, the operation of the forearm and the hand is schematically illustrated, and in the figure, the long and thin line segment indicates the forearm and the short line segment indicates the hand. The first action in the figure is the original action in which the hand is the clapping action. The first action in the figure is the original action in which the hand is the clapping action. In the process of redirecting the arm movement by adopting position priority, the positions of the shoulder joint points and the wrist joint points are kept unchanged, so that the rotation information of the elbow joint points is changed, if the rotation information of the hand is kept unchanged, the repositioning effect is the effect of the second line in the figure, obviously, the hand movement is changed, and the hand-closing movement cannot be kept. The third row in the figure is the correct motion, i.e. the hand should remain in the palm even if the forearm rotates.
Fig. 4A shows the original movement of the original character model in a 3D game scene, the upper half of fig. 4A shows the original movement of the original character model, and the lower half of fig. 4A shows the original movement of the agent of the original character model. Figure 4B illustrates the effect of redirecting the original actions of the character model of figure 4A to the target character model of figure 4B, with the upper half of figure 4B representing the action of the target character model after it has been redirected and the lower half of figure 4B representing the action of the target character model after it has been redirected by an agent. The hand of the target character model can be seen to be pierced. The target character model has longer arms and legs than the original character model.
It should be noted that the agent bodies of the four limbs in the agent body model in fig. 4A and 4B are composed of a plurality of triangular meshes, and the cylinders shown in the figures are only the visual effects presented in the case that the triangular meshes are enough, which does not mean that the agent bodies of the four limbs are cylinders. The black-and-white lattice pattern in fig. 4A and 4B is a pattern of a floor on which a person stands.
Based on the above analysis, the inventor proposes a hand motion repairing method for repairing the hand motion when the motion is redirected and keeping the hand motion unchanged. The method can be applied to any form of electronic equipment, for example, a terminal or a server, where the terminal can be any form of a mobile phone, a tablet computer, a computer, and the like.
Specifically, as shown in fig. 5, the process of performing hand motion restoration mainly includes:
step 501, acquiring original hand parameters in original actions of an original object, wherein the original hand parameters comprise original positions of a left-hand end and a right-hand end.
The original object is a three-dimensional model of a virtual object, which may be a three-dimensional model of a virtual character, or a three-dimensional model of an animal whose wrist structure and hand structure are similar to those of a human, such as a monkey and a orangutan.
Wherein the original action is a reference action referring to the original object with respect to the redirection procedure, the reference action being directed to the target object by the redirection.
The original position of the left-hand end and the original position of the right-hand end refer to positions in a three-dimensional model of an original object, and may be positions determined based on a virtual coordinate system in which the three-dimensional model of the original object is located, and the virtual coordinate system may be constructed by using a reference point of the three-dimensional model of the original object, where the reference point is used as a coordinate origin of the virtual coordinate system. It is of course also possible to use points outside the three-dimensional model as reference points. The construction mode of the virtual coordinate system is not limited, and the positions of the joint points above the wrists of the original object and the target object can be matched only in the redirection process.
Step 502, obtaining target wrist parameters in a target motion of a target object, wherein the target wrist parameters include respective target positions of a left wrist and a right wrist, and the target motion is obtained by redirecting an original motion to the target object.
The target object is a three-dimensional model of a virtual object, and the virtual object may be a three-dimensional model of a virtual character, or may be a three-dimensional model of an animal whose wrist structure and hand structure are similar to those of a human, such as a monkey and a orangutan.
The original object and the target object are not exactly identical, e.g., the arms of the two objects are not the same length.
Wherein, similar to the original motion, the target motion is also a motion formed in the target object after redirection with respect to the redirection process.
It should be noted that, the present application does not depend on the specifically adopted motion redirection technology, and the hand motion can be repaired by using the hand motion repairing method provided in the embodiments of the present application after the joint points other than the hand motion are oriented regardless of the specifically adopted motion redirection technology.
Step 503, determining respective target positions of the left-hand end and the right-hand end, which are required for repairing the hand motion in the target motion, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters and the target wrist parameters meet constraint conditions;
step 504, repairing the hand motion in the target motion according to the target positions of the left-hand end and the right-hand end and the target wrist parameters.
After the repair, the left-hand action is limited to: the target position of the left-hand end and the target position of the left wrist are limited, and the right-hand action is limited after modification: the target position of the right hand end is within a range defined by the target position of the right wrist.
Wherein the constraint condition comprises: a first distance value determined by the respective target positions of the left-hand end and the right-hand end is close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of the connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
According to the method provided by the embodiment of the application, the second distance value between the left-hand end and the right-hand end in the target action after the redirection is limited to be close to the first distance value between the left-hand end and the right-hand end in the original action, so that the proper distance can be kept between the two hands after the redirection, and the phenomenon of mold penetration is avoided. Meanwhile, the connecting line length from the left-hand end to the left wrist after the reorientation and the connecting line length from the right-hand end to the right wrist after the reorientation are limited, so that the repaired hand action can keep the original hand action basically and the serious deviation is avoided. Target positions of the left hand end and the right hand end are determined through a simple set relation, and then rotation information of the wrist joint is reversely pushed, so that modified hand actions are obtained, the calculation amount is small, the hand actions can be prevented from being penetrated and verified, and the effect is good.
It should be noted that, as defined in the constraint condition, the fact that the first distance value is close to the second distance value means that the absolute value of the difference between the first distance value and the second distance value is not greater than a preset value, and the preset value is smaller than the second distance value.
In one embodiment, the first distance value is equal to the second distance value, i.e. the distance value between the two ends of the reoriented hand is equal to the distance value between the two ends of the hand in the original motion, so as to keep the distance between the two ends of the hand unchanged, and reduce the variation of the hand motion before and after the reorientation to the maximum extent.
It should be noted that, in the embodiment of the present application, a specific manner of determining the target positions of the left-hand end and the right-hand end according to the above constraint conditions is not limited, and regardless of the process, as long as the determined target positions of the left-hand end and the right-hand end can satisfy the above constraint conditions. For ease of understanding, the process of determining the target positions of the left-hand end and the right-hand end is described below by a specific process.
As shown in fig. 6, determining respective target positions of the left-hand end and the right-hand end, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters, and the target wrist parameters satisfy the constraint conditions, and mainly includes the following steps:
601, connecting the left-hand end and the right-hand end according to the respective original positions of the left-hand end and the right-hand end to obtain a first connection section;
step 602, connecting the left wrist and the right wrist according to the target positions of the left wrist and the right wrist to obtain a second connecting line segment;
step 603, taking the midpoint of the first connecting line segment as a first midpoint, taking the midpoint of the second connecting line segment as a second midpoint, and obtaining a first vector pointing to the first midpoint from the second midpoint, wherein the size of the first vector is a third distance value from the second midpoint to the first midpoint;
step 604, drawing a first straight line parallel to the first vector through the original position of the left-hand end, and drawing a second straight line parallel to the first vector through the original position of the right-hand end;
step 605, determining the target position of the left-hand end on the first straight line, and determining the target position of the right-hand end on the second straight line, so that the length of the connecting line from the target position of the left-hand end to the target position of the left-hand wrist is equal to the first set value, and the length of the connecting line from the target position of the right-hand end to the target position of the right-hand wrist is equal to the second set value.
In the embodiment, the target position of the left-hand tail end and the target position of the right-hand tail end are determined through a simple geometric relationship, the calculation is simple, the calculation amount is small, and the repairing effect is good.
In one embodiment, the target position of the left-hand end is further satisfied that the target position of the left-hand end points to a second vector of the original position of the left-hand end, a ratio of which to the first vector is greater than or equal to-1; the size of the second vector is equal to a fourth distance value between the target position of the left-hand end and the original position of the left-hand end;
the target position of the tail end of the right hand is satisfied, the target position of the tail end of the right hand refers to a third vector of the original position of the tail end of the right hand, and the ratio of the third vector to the first vector is greater than or equal to-1; the magnitude of the third vector is equal to a fifth distance value between the target position of the right-hand end and the original position of the right-hand end.
That is to say, when the ratio of the second vector to the first vector is greater than or equal to-1, it means that the method provided by the above embodiment can be used to determine a more suitable target position of the left-hand end, and if the constraint condition that is greater than or equal to-1 is not satisfied, it indicates that a reasonable target position of the left-hand end cannot be provided, and it may prompt to manually repair the target position of the left-hand end.
Similarly, when the ratio of the third vector to the first vector is greater than or equal to-1, it means that the method provided by the above embodiment can be used to determine a more suitable target position of the right-hand end, and if the constraint condition that is greater than or equal to-1 is not satisfied, it indicates that a reasonable target position of the right-hand end cannot be provided, and the manual repair of the target position of the right-hand end can be prompted.
In a specific embodiment, before determining respective target positions of the left-hand end and the right-hand end required for repairing a hand motion in the target motion so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters, and the target wrist parameters satisfy the constraint conditions, the method further includes:
acquiring original wrist parameters in original actions, wherein the original wrist parameters comprise respective original positions of a left wrist and a right wrist;
calculating a sixth distance value between the original position of the left wrist and the original position of the left-hand end, and taking the sixth distance value as a first set value;
and calculating a seventh distance value between the original position of the right wrist and the original position of the right hand end, and taking the seventh distance value as a second set value.
That is, the distance from the left fingertip to the left wrist remains unchanged before and after redirection, and the distance from the right fingertip to the right wrist remains unchanged before and after redirection, so that the parameter requirements for hand motion in the redirection scene can be met. Of course, the first set value and the second set value may also adopt other values, which is not limited herein.
In a specific embodiment, during the redirection process, the hand movement is repaired, which is mainly used to avoid the occurrence of hand mold penetration or serious deviation of hand movement, and the hand movement is not repaired every redirection. For the hand threading problem, the specific condition for starting hand motion repair may be set as:
determining a first distance value according to the original position of the left-hand end and the original position of the right-hand end before determining respective target positions of the left-hand end and the right-hand end, which are required for repairing the hand motion in the target motions, and determining that the first distance value is not greater than a preset distance value.
That is to say, under the condition that the first distance is greater than the preset distance value, the hand is in the safe area, the hand mold penetrating problem cannot occur, the hand action basically does not need to be repaired, and the hand action repairing process can be selected not to be executed. Of course, this is not an absolute limitation, but an optional setting condition of whether to be performed or not.
The preset distance value belongs to an empirical value, namely, a critical distance value which is obtained through statistics and can define whether hand penetration occurs or not is determined according to whether hand penetration occurs or not in a repeated redirection process.
In one embodiment, as shown in fig. 7, acquiring the original hand parameters in the original motion of the original object includes:
step 701, acquiring the original positions of each finger of the left hand and each finger of the right hand in the original action;
step 702, for any target finger in the fingers of the left hand, executing a calculation process: calculating an eighth distance value between the original position of the target finger and the original position of each finger of the right hand;
and 703, selecting a minimum distance value from the calculated eighth distance values, taking the original position of the left finger corresponding to the minimum distance value as the original position of the left end, and taking the original position of the right finger corresponding to the minimum distance value as the original position of the right end.
The following takes a virtual character model of a virtual scene as an example to illustrate the hand repairing process.
First, for the first question "when do the need to repair hand movements? "the solution is given in the following way:
because the main purpose of hand repair is to prevent the hand from penetrating the mold, the judgment can be made by the distance between the two hands, if the distance between the two hands is close, the repair is needed, and if the distance between the two hands is far, the repair is not needed.
Since the joint points of the wrist are calculated by the reorientation algorithm, the hand perforation problem will not occur by default, and the hand perforation may exist in the middle of the palm or the positions of the fingertips. Calculating the shortest distance between five fingertips of the left hand and five fingertips of the right hand in the original action before redirection, specifically as follows:
hypothesis set PLSpatial coordinates containing five left-hand fingertips:
Figure BDA0003016796530000141
hypothesis set PRSpatial coordinates containing five right fingertips:
Figure BDA0003016796530000142
suppose that
Figure BDA0003016796530000143
To show the left handFinger tip
Figure BDA0003016796530000144
With the tip of the right finger
Figure BDA0003016796530000145
The value of the distance between the finger tips,
Figure BDA0003016796530000146
Figure BDA0003016796530000147
represents the minimum distance value selected from the distance values of all possible combinations of the left and right fingertips.
If the minimum distance value satisfies: d is greater than dsetAnd then, the hand is proved to be in a safe area, and the hand does not need to be repaired. dsetIs an empirical value set manually.
Then, for the second question "how to repair? "the solution is given in the following way:
analysis shows that the rotation of the forearm changes after the reorientation, but the wrist joint point is optimized through the reorientation algorithm, and in the hand motion repairing process, the position of the wrist joint point needs to be kept still, and only the position of the finger tip of the hand needs to be adjusted in the hand motion repairing process. In addition, in the manual action repairing process, the actions of the fingers and the palm are kept unchanged, and only the rotation of the whole hand is changed. Therefore, the hand movement can be repaired only by calculating the position of the repaired fingertip. Thus, the problem translates to calculating the position of the nearest left and right fingertip.
The following node data are obtained:
the original position of the end of the left hand in the original motion is the position of the left-hand fingertip a, and the spatial coordinate is represented as pa
The original position of the tail end of the right hand is the position of the right fingertip b, and the space coordinate is expressed as pb
Primitive of the left wrist in primitive actionsPosition c, space coordinate denoted pc
Original position d of the left wrist in original motion, with spatial coordinates denoted pd
The target position c' of the left wrist after reorientation, the spatial coordinate denoted pc′
The target position d' of the right wrist after reorientation, the spatial coordinate denoted as pd′
Suppose the target position of the left-hand end to be solved is denoted as a 'and the target position of the right-hand end is denoted as b'. The positional relationship between the nodes is shown in fig. 8.
The following calculation process is performed:
calculating the midpoint e of the ab connecting line segment, i.e.
Figure BDA0003016796530000151
Calculating the midpoint f of the c'd' connecting line segment, expressed as
Figure BDA0003016796530000152
The vector pointing from e to f is represented as:
Figure BDA0003016796530000153
making a vector parallel to the a point
Figure BDA0003016796530000154
A' is located on the straight line; making a vector parallel to the b point
Figure BDA0003016796530000155
B' is located on the straight line.
When the hand is moved and repaired, the target position p of the left-hand fingertip a' is calculated while keeping the distance from the fingertip to the wrist constanta′The simultaneous equations of (1):
Figure BDA0003016796530000156
|pa′-pc′|=|pa-pc|;
obtaining p by the simultaneous equationa′And alpha, if alpha is ≧ -1, this indicates that pa′Otherwise, p obtained by the simultaneous equation is indicateda′Is unreasonable and needs to manually determine pa′The position of (a).
Similarly, the target position p of the right fingertip b' is calculatedb′The simultaneous equations of (1):
Figure BDA0003016796530000157
|pb′-pd′|=|pb-pdl, |; obtaining p by the simultaneous equationb′And beta, if beta is ≧ -1, this indicates that pb′Otherwise, p obtained by the simultaneous equation is indicatedb′Is unreasonable and needs to manually determine pb′The position of (a).
Where both α and β are greater than or equal to-1, indicating that p is obtaineda′And pb′The position of (2) is reasonable, and the hand movement can be repaired based on the position.
Based on the same concept, the embodiment of the present application provides a hand motion repairing device, and the specific implementation of the device may refer to the description of the method embodiment section, and repeated descriptions are omitted, as shown in fig. 9, the device mainly includes:
a first obtaining module 901, configured to obtain an original hand parameter in an original motion of an original object, where the original hand parameter includes original positions of a left-hand end and a right-hand end;
a second obtaining module 902, configured to obtain a target wrist parameter in a target motion of a target object, where the target wrist parameter includes respective target positions of a left wrist and a right wrist, and the target motion is obtained as redirecting the original motion to the target object;
a processing module 903, configured to determine respective target positions of a left-hand end and a right-hand end, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameter, and the target wrist parameter satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 10, the electronic device mainly includes: a processor 1001, a memory 1002, and a communication bus 1003, wherein the processor 1001 and the memory 1002 communicate with each other via the communication bus 1003. The memory 1002 stores a program executable by the processor 1001, and the processor 1001 executes the program stored in the memory 1002, so as to implement the following steps:
acquiring original hand parameters in original actions of an original object, wherein the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end respectively;
acquiring target wrist parameters in a target action of a target object, wherein the target wrist parameters comprise respective target positions of a left wrist and a right wrist, and the target action is obtained by redirecting the original action to the target object;
determining respective target positions of a left-hand terminal and a right-hand terminal, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand terminal and the right-hand terminal, the original hand parameters and the target wrist parameters satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
The communication bus 1003 mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1003 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
The Memory 1002 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one storage device located remotely from the aforementioned processor 1001.
The Processor 1001 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, which, when run on a computer, causes the computer to execute the motion redirection policy selection method described in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A hand motion restoration method is characterized by comprising the following steps:
acquiring original hand parameters in original actions of an original object, wherein the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end respectively;
acquiring target wrist parameters in a target action of a target object, wherein the target wrist parameters comprise respective target positions of a left wrist and a right wrist, and the target action is obtained by redirecting the original action to the target object;
determining respective target positions of a left-hand terminal and a right-hand terminal, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand terminal and the right-hand terminal, the original hand parameters and the target wrist parameters satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
2. The hand motion restoration method according to claim 1, wherein the step of approximating the first distance value determined by the target position of each of the left-hand end and the right-hand end to the second distance value determined by the original position of each of the left-hand end and the right-hand end comprises:
the first distance value is equal to the second distance value.
3. A hand motion restoration method according to claim 2, wherein the determining respective target positions of a left-hand end and a right-hand end required for restoring a hand motion in the target motion so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters, and the target wrist parameters satisfy constraints includes:
connecting the left-hand end and the right-hand end according to the respective original positions of the left-hand end and the right-hand end to obtain a first connecting line segment;
connecting the left wrist and the right wrist according to the target positions of the left wrist and the right wrist to obtain a second connecting line segment;
taking the midpoint of the first connecting line segment as a first midpoint, taking the midpoint of the second connecting line segment as a second midpoint, and obtaining a first vector pointing from the second midpoint to the first midpoint, wherein the size of the first vector is a third distance value from the second midpoint to the first midpoint;
drawing a first straight line parallel to the first vector through the original position of the left-hand end, and drawing a second straight line parallel to the first vector through the original position of the right-hand end;
and determining the target position of the left-hand end on the first straight line, determining the target position of the right-hand end on the second straight line, and enabling the length of a connecting line from the target position of the left-hand end to the target position of the left wrist to be equal to the first set value and enabling the length of a connecting line from the target position of the right-hand end to the target position of the right wrist to be equal to the second set value.
4. The hand motion restoration method according to claim 3, wherein the target position of the left-hand end further satisfies that a ratio of a second vector, in which the target position of the left-hand end points to the original position of the left-hand end, to the first vector is greater than or equal to-1; a magnitude of the second vector is equal to a fourth distance value of the target position of the left-hand end and the original position of the left-hand end;
the target position of the right-hand end also satisfies that the ratio of a third vector of the target position of the right-hand end pointing to the original position of the right-hand end to the first vector is greater than or equal to-1; a magnitude of the third vector is equal to a fifth distance value between the target position of the right-hand end and the original position of the right-hand end.
5. A hand movement repair method according to any one of claims 1 to 4, wherein before determining respective target positions of a left-hand end and a right-hand end required for repairing a hand movement in the target movement so that the respective target positions of the left-hand end and the right-hand end, the original hand parameters and the target wrist parameters satisfy constraints, the method further comprises:
acquiring original wrist parameters in the original action, wherein the original wrist parameters comprise original positions of a left wrist and a right wrist respectively;
calculating a sixth distance value between the original position of the left wrist and the original position of the left-hand end, and taking the sixth distance value as the first set value;
and calculating a seventh distance value between the original position of the right wrist and the original position of the right hand end, and taking the seventh distance value as the second set value.
6. A hand motion restoration method according to any of claims 1 to 4, wherein the determining of the target positions required for the hand motion restoration in the target motion is preceded by the respective left-hand and right-hand extremities, the method further comprising:
and determining the first distance value according to the original position of the left-hand tail end and the original position of the right-hand tail end, and determining that the first distance value is not greater than a preset distance value.
7. A hand motion restoration method according to any one of claims 1 to 4, wherein the acquiring original hand parameters in an original motion of an original object comprises:
acquiring the original positions of the fingers of the left hand and the fingers of the right hand in the original action;
for any target finger in the left hand fingers, executing a calculation process: calculating an eighth distance value between the original position of the target finger and the original position of each finger of the right hand;
selecting a minimum distance value from the calculated eighth distance values, taking the original position of the left hand finger corresponding to the minimum distance value as the original position of the left hand tail end, and taking the original position of the right hand finger corresponding to the minimum distance value as the original position of the right hand tail end.
8. A hand motion prosthetic device, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring original hand parameters in original actions of an original object, and the original hand parameters comprise original positions of a left-hand tail end and a right-hand tail end;
a second obtaining module, configured to obtain a target wrist parameter in a target motion of a target object, where the target wrist parameter includes respective target positions of a left wrist and a right wrist, and the target motion is obtained as redirecting the original motion to the target object;
a processing module, configured to determine respective target positions of a left-hand end and a right-hand end, which are required for repairing a hand motion in the target motions, so that the respective target positions of the left-hand end and the right-hand end, the original hand parameter, and the target wrist parameter satisfy constraint conditions; repairing a hand action in the target actions according to the target positions of the left-hand end and the right-hand end and the target wrist parameters;
the constraint conditions include: a first distance value determined by the respective target positions of the left-hand end and the right-hand end being close to a second distance value determined by the respective original positions of the left-hand end and the right-hand end; the length of a connecting line between the target position of the tail end of the left hand and the target position of the left wrist is equal to a first set value; and the length of a connecting line between the target position of the tail end of the right hand and the target position of the right wrist is equal to a second set value.
9. An electronic device, comprising: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus; the memory for storing a computer program; the processor is configured to execute the program stored in the memory to implement the hand motion restoration method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the hand motion restoration method of any one of claims 1 to 7.
CN202110391111.XA 2021-04-12 2021-04-12 Hand motion restoration method, device, equipment and storage medium Active CN113129414B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110391111.XA CN113129414B (en) 2021-04-12 2021-04-12 Hand motion restoration method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110391111.XA CN113129414B (en) 2021-04-12 2021-04-12 Hand motion restoration method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113129414A true CN113129414A (en) 2021-07-16
CN113129414B CN113129414B (en) 2024-04-12

Family

ID=76776605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110391111.XA Active CN113129414B (en) 2021-04-12 2021-04-12 Hand motion restoration method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113129414B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012111622A1 (en) * 2011-02-16 2012-08-23 株式会社スクウェア・エニックス Movement modeling device, method, and program
GB201601775D0 (en) * 2016-02-01 2016-03-16 Naturalmotion Ltd Animating a virtual object in a virtual world
US20170294041A1 (en) * 2016-04-08 2017-10-12 Adobe Systems Incorporated Animation Using Keyframing and Projected Dynamics Simulation
US20200302621A1 (en) * 2019-03-18 2020-09-24 Beijing University Of Technology Method for three-dimensional human pose estimation
CN112562072A (en) * 2020-12-25 2021-03-26 北京爱奇艺科技有限公司 Action redirection method, device, equipment and storage medium
CN112562071A (en) * 2020-12-25 2021-03-26 北京爱奇艺科技有限公司 Method, device and equipment for calculating motion difference and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012111622A1 (en) * 2011-02-16 2012-08-23 株式会社スクウェア・エニックス Movement modeling device, method, and program
GB201601775D0 (en) * 2016-02-01 2016-03-16 Naturalmotion Ltd Animating a virtual object in a virtual world
US20170294041A1 (en) * 2016-04-08 2017-10-12 Adobe Systems Incorporated Animation Using Keyframing and Projected Dynamics Simulation
US20200302621A1 (en) * 2019-03-18 2020-09-24 Beijing University Of Technology Method for three-dimensional human pose estimation
CN112562072A (en) * 2020-12-25 2021-03-26 北京爱奇艺科技有限公司 Action redirection method, device, equipment and storage medium
CN112562071A (en) * 2020-12-25 2021-03-26 北京爱奇艺科技有限公司 Method, device and equipment for calculating motion difference and storage medium

Also Published As

Publication number Publication date
CN113129414B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US9418465B2 (en) Multipoint offset sampling deformation techniques
US9460556B2 (en) System and method for interactive masking and modifying of 3D objects
GB2555605A (en) Animating a virtual object in a virtual world
US10482647B2 (en) Computer-implemented method for simulating a body taking a posture
US10062197B2 (en) Animating a virtual object in a virtual world
JP2015531098A (en) Building an avatar using a depth camera
EP2677502A1 (en) Movement modeling device, method, and program
JP5490080B2 (en) Skeleton model attitude control method and program
US11335051B2 (en) Parameterized animation modifications
US9984488B2 (en) Animating a virtual object in a virtual world
US10319135B2 (en) Computer-implemented method for simulating a body taking a posture, in particular to look at a target
GB2546820A (en) Animating a virtual object in a virtual world
US10410393B2 (en) Animating a virtual object in a virtual world
US20090251462A1 (en) System and method for mesh distance based geometry deformation
CN113129414A (en) Hand motion repairing method, device, equipment and storage medium
CN114270402A (en) Method and apparatus for constructing three-dimensional scanning human body model
CN112884869B (en) Motion redirection policy selection method, device, equipment and storage medium
CN111161419B (en) Sectioning method and device for three-dimensional model and storage medium
JP2021068438A (en) Computer-implemented method for making skeleton of modeled body take posture
Sato et al. 3D freeform design: interactive shape deformations by the use of CyberGlove
CN118570432A (en) Virtual person posture correction method, device, equipment and storage medium
CN113129412A (en) Agent generation method, device, equipment and storage medium
CN116485954A (en) Virtual skeleton repairing method and device, storage medium and electronic equipment
CN112686977A (en) Human body model action redirection method and device, electronic equipment and storage medium
Faeth et al. Using Deformation Map Painting for Bimanual, Haptic Sculpting of 3D Digital Models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant