WO2022143178A1 - Motion retargeting method and apparatus, electronic device, and storage medium - Google Patents

Motion retargeting method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022143178A1
WO2022143178A1 PCT/CN2021/138407 CN2021138407W WO2022143178A1 WO 2022143178 A1 WO2022143178 A1 WO 2022143178A1 CN 2021138407 W CN2021138407 W CN 2021138407W WO 2022143178 A1 WO2022143178 A1 WO 2022143178A1
Authority
WO
WIPO (PCT)
Prior art keywords
bone
constraint
source
target
point
Prior art date
Application number
PCT/CN2021/138407
Other languages
French (fr)
Chinese (zh)
Inventor
朱曈晖
柴金祥
Original Assignee
魔珐(上海)信息科技有限公司
上海墨舞科技有限公司
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 魔珐(上海)信息科技有限公司, 上海墨舞科技有限公司 filed Critical 魔珐(上海)信息科技有限公司
Publication of WO2022143178A1 publication Critical patent/WO2022143178A1/en

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

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a motion redirection method, apparatus, electronic device, and storage medium.
  • motion capture is usually used in the current animation production. Motion capture can accurately restore the movements of the actors themselves. What is needed is character animation, and the characters may be of various types, such as real people, or two-dimensional characters, or even animals. Therefore, it is necessary to apply redirection technology to convert the actions of the actors into the corresponding character actions.
  • the redirection technology is relatively simple. Usually, only the bone rotation data of the actor's captured action is migrated. As a result, the redirected action will appear jittery or the overall action will be stiff and unnatural, etc. phenomenon, the action semantics has changed or the relevant motion constraint information is not satisfied, which leads to a lot of time for manual repair in the later stage.
  • the present disclosure proposes a motion redirection method, apparatus, electronic device, and storage medium.
  • a motion redirection method comprising:
  • the constraint point including the skin point
  • the second bone pose of the target bone that satisfies the second constraint condition is obtained, wherein the first position is to map the first bone pose to the The target bone, the obtained position of the constraint point of the target bone; the second position is based on the correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone , the determined position of the constraint point of the target bone.
  • the method further includes: building one or more virtual bones between the source bone and the target bone;
  • a second bone pose satisfying the second constraint condition is obtained; wherein the third position is the position of the constraint point of the target bone under the third bone pose.
  • the second constraint condition includes: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
  • the position of the constraint point of the target bone under the second bone posture is based on the weight information of the constraint point of the target bone, the constraint point of the target bone in the second bone posture is in the target bone
  • the local coordinates on and the transformation matrix from the local coordinate system of the target bone to the world coordinate system are determined.
  • the method further includes: processing the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the constraint point of the target bone of the current frame by using the prediction model, to obtain The constraint point of the target bone in the next frame; wherein, the motion sequence of the constraint point of the source bone is determined by the positions of different constraint points of the source bone.
  • the constraint points further include: mesh points and/or skeleton points.
  • the building one or more virtual bones between the source bone and the target bone includes:
  • the target bone and one or more preset reference poses obtain one or more reference poses of the source bone and one or more reference poses of the target bone;
  • one or more virtual bones are built between the same reference pose of the source bone and the target bone.
  • the reference posture includes at least: a T-pose.
  • the constraint point of the source bone is determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
  • a motion redirection device comprising:
  • an acquisition module for acquiring the first bone pose of the source bone and constraint points of the source bone, the constraint points include skin points; a first constraint condition building module for acquiring the first bone pose and the constraints of the source bone point to construct the first constraint condition; the second constraint condition building module is used to obtain the second constraint condition according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition; motion A redirection module, configured to obtain a second bone pose of the target bone that satisfies the second constraint condition according to the first position and the second position, wherein the first position is to convert the target bone without the second constraint condition
  • the first bone pose is mapped to the target bone, and the obtained position of the constraint point of the target bone; the second position is based on the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and
  • the first bone pose is the determined position of the constraint point of the target bone.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
  • a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
  • the first bone pose of the source bone and the constraint point of the source bone are obtained, where the constraint point includes a skin point; the first constraint condition is constructed according to the first bone pose and the constraint point of the source bone ; According to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; According to the first position and the second position, the second constraint condition is obtained.
  • the second bone pose of the target bone wherein the first position is the constraint point position of the target bone obtained by mapping the first bone pose to the target bone when there is no second constraint condition;
  • the second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone.
  • FIG. 1 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure
  • FIG. 2 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure
  • FIG. 3 shows a schematic diagram of constructing a virtual skeleton according to an embodiment of the present disclosure
  • FIG. 4 shows a structural diagram of a motion redirection device according to an embodiment of the present disclosure
  • FIG. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 1 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure. As shown in Figure 1, the method may include:
  • Step 101 Obtain the first bone pose of the source bone and the constraint points of the source bone; wherein, the constraint points include skin points.
  • Source bones and target bones can be in the form of 3D files, such as FBX files (AutoDesk common format), asf format (CMU standard format), mskel (Xmov standard format).
  • the first bone pose of the source bone can be the action pose of the captured actor, or the action pose of the bone drawn by the animator, etc.; the first bone pose can be determined by the rotation angle ( Euler angles, quaternions, etc.), translation distance and other data are represented, where the animation data of the source bones can be standard animation format files, such as amc (CMU standard format), FBX or sps (Xmov standard format) .
  • the animation data of the source bone is transferred to the desired target bone, and a semantic association configuration can be made between the source bone and the target bone in advance, so as to correspond to different naming conventions, for example, the source bone
  • the root bone in the target bone is called root
  • the root bone in the target bone is called Bip001.
  • the naming standards of two different companies are corresponding to the root bone.
  • the semantics are the same (for example, the bone The function of the same) is associated with other bones, so as to define the corresponding relationship between the source bone and the target bone.
  • the same number of key bones can be selected from the source bone and the target bone, and these key bones can be selected.
  • the bones are mapped to define the corresponding relationship between the source bone and the target bone.
  • the constraint points may include the constraint points of the target bone and the constraint points of the source bone, which represent the points that constrain the posture of the target bone during the motion redirection process.
  • the constraint points may include: skin points, bone points, meshes at least one of the points.
  • the skin point refers to the point attached to the skin surface of the target bone or the source bone
  • the bone point refers to the point on the target bone or the source bone
  • the mesh point refers to the point on other objects in the space where the target bone or the source bone is located. .
  • the data of the skinning points can come from the human database of the motion capture system or the database of other sources; the skinning points of the source bones are associated with each root bone in the source bones, and the skinning points of the target bones are related to each Root bones are associated.
  • a semantic association configuration may be made in advance between the constraint points of the source bone and the constraint points of the target bone, so as to define the corresponding relationship between the constraint points of the source bone and the constraint points of the target bone. For example, take the bone point of the thumb fingertip in the source bone as the constraint point of the source bone, take the bone point of the thumb fingertip in the target bone as the constraint point of the target bone, and associate the two bone points to define the thumb in the source bone. The correspondence between the bone points of the fingertip and the bone points of the thumb fingertip in the target bone.
  • the skin point of the toe in the source bone is used as the constraint point of the source bone
  • the skin point of the toe in the target bone is used as the constraint point of the target bone
  • the two skin points are associated to define the toe in the source bone. The correspondence between the skin point of , and the skin point of the toe in the target bone.
  • the constraint point of the source bone may be determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
  • the self-constraint of the source skeleton refers to the constraint from the source skeleton itself
  • the environment constraint refers to the constraint from the external environment generated by the interaction between the source skeleton and the external environment.
  • the three-dimensional motion of the actor cannot be directly mapped to the virtual character.
  • the various semantic information of the tensor constrains the mapping process; according to whether the semantic information originates from the role itself or from the role and the external environment, it can be divided into self constraints and environmental constraints. For example, in the process of motion redirection, a hand-length People can touch their toes without bending their knees, while people with short hands need to bend their knees when they touch their toes. This is equivalent to two gestures obtained under the same semantic information. When people touch their toes with their hands, they are a kind of self.
  • Constraints at this time, the skin points and/or bone points on the hands, knees, and toes of the source bone can be taken as the constraint points of the source bone; for another example, a tall person can touch it without jumping The basket, and short people need to jump to touch it. This is equivalent to two gestures obtained under the same semantic information.
  • a person touches the basket it is an environmental constraint.
  • the hand of the source bone can be obtained.
  • skin and/or bone points on feet, etc., and mesh points on the basket as constraint points for the source bone.
  • a part of all skin points, bone points, and mesh points in the source and target bones can be selected as the Key information points, and then select appropriate points from the key information points of the source bone as the constraint points of the source bone according to their own constraints or environmental constraints.
  • Constraint points; among them, key information points may include key skin points, key bone points, and key mesh points.
  • a number of skin points can be selected from all the skin points of the source bone as the key skin points of the source bone, and at the same time, selected from all the skin points of the target bone and
  • the skin point corresponding to the position of the key skin point of the source bone is used as the key skin point of the target bone.
  • the skin point at the end of the hand, foot, head, knee and other parts can be selected as the key skin point skin point.
  • the number of key skinning points of the source bone selected above is the same as the number of key skinning points of the selected target bone. The correspondence between the key skin points of the source bone and the key skin points of the target bone.
  • the key skinning points of the above-mentioned one or more source bones can be used as the constraint points of the source bone.
  • the key skinning points of the source bone and the target Correspondence between the key skinning points of the bones correspondingly, the key skinning points of one or more target bones can be used as the constraint points of the target bone; since each constraint point of the source bone and each constraint point of the target bone there is a corresponding relationship, and through the corresponding relationship between the constraint points and different constraint points determined according to the source bone's own constraints and/or environmental constraints associated with the source bone, different effects can be produced in different animations.
  • the key skin points of the hand of the source bone and the key skin points of the knee can be used as the constraint points of the source bone, and correspondingly, the The key skin points of the hand of the target bone and the key skin points of the knee are used as the constraint points of the target bone.
  • Step 102 construct a first constraint condition according to the posture of the first bone and the constraint point of the source bone.
  • a first constraint condition is constructed according to the constraint points of the source bone selected in the above step 101; the first constraint condition represents the relative positions of different constraint points in the source bone under the first bone pose The position constraints for each constraint point obtained by the relationship.
  • the first constraint condition including skin information can be constructed under the condition that the above self-constraint, the above-mentioned environmental constraint exists, or both the above-mentioned self-constraint and the environmental constraint exist.
  • the first bone pose of the source bone is the action pose of hand touching the knee
  • the key skin points of the hand of the source bone and the key skin points of the knee can be used as the key skin points of the source bone.
  • Constraint point in the gesture of hand touching the knee, the first constraint condition constructed is that the position of the key skin point of the hand of the source bone is the same as the position of the key skin point of the knee of the source bone.
  • Step 103 Obtain a second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition.
  • the second constraint condition containing the skin information can be constructed under the condition that the above-mentioned self-constraint, the above-mentioned environment constraint exists, or both the above-mentioned self-constraint and the environment-constraint exist.
  • the key skin points of the hand of the source bone and the key skin points of the knee are used as the constraint points of the source bone
  • the key skin points of the hand and the knee of the target bone are is the constraint point of the target bone
  • the first constraint condition is that the position of the key skin point of the hand of the source bone is the same as the position of the key skin point of the knee of the source bone, according to the constraint point of the source bone and the constraint of the target bone
  • the position of the key skin point of the target bone's hand and the position of the key skin point of the target bone's knee should be constrained as follows: the hand of the target bone
  • the position of the key skin point of the target bone is the same as that of the knee of the target bone, that is, the second constraint condition is that the position of the key skin point of the target bone's hand is the same as that of the knee of the target bone.
  • Step 104 According to the first position and the second position, obtain the second bone pose of the target bone that satisfies the second constraint condition; wherein, the first position is the position of the first bone when there is no second constraint condition.
  • the pose is mapped to the target bone, and the obtained position of the constraint point of the target bone; the second position is based on the correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone, and the first A bone pose, the determined position of the constraint point of the target bone.
  • the first bone posture is mapped to the target bone, and the position of the constraint point under the bone posture of the target bone at this time is the first position; the first position and the target bone constraint point There may be differences in the target position (ie, the second position) to be reached, and the skeleton pose of the target bone at this time is constrained by the second constraint condition, so as to obtain a second skeleton pose that satisfies the second constraint condition.
  • the final animation needs to be added with skinning effects.
  • bone data for motion redirection will cause jitter and overall motion stiffness and unnaturalness.
  • a A fat person and a thin person may have exactly the same bones, that is, the source bone is exactly the same as the target bone, but the skinning information of the two is different.
  • the fat person directly touches the head
  • the final output animation may show that the skinny person is not touching his head; therefore, additional information is needed to assist the skeletal animation to handle the above-mentioned skinning encountered in redirection question.
  • the constraint point of the target bone includes the skin point of the target bone.
  • the animation data of the existing source bones can be transferred to completely different target bones, which increases the reuse of data and further improves the efficiency of animation production.
  • the second bone pose of the target bone is the action pose of the virtual character that satisfies the second constraint condition obtained by reorienting the first bone pose of the source bone, and the second bone pose can be included in the animation data of the target bone.
  • the rotation angle, translation distance and other data are represented.
  • the animation data of the target bone is the animation data of the target bone obtained by the animation data of the source bone through motion redirection, and the style of the animation data of the target bone can be the same as the animation data of the source bone. style is consistent or similar.
  • the animation data of the target bone can be a standard format file of animation, such as amc (CMU standard format), FBX or sps (Xmov standard format).
  • the second constraint condition may include: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
  • the position of the constraint point of the target bone in the second bone posture can be based on the weight information of the constraint point of the target bone, the local coordinates of the constraint point of the target bone on the target bone in the second bone posture, and the local coordinate system of the target bone to The transformation matrix of the world coordinate system is determined.
  • the position of the key skin point in the second bone pose can be determined, and the following formula (1) can be used to determine the source bone or a certain point of the target bone.
  • the position of a constraint point under a certain bone pose for example, the following formula (1) can be used to determine the position of a certain constraint point of the target bone under the second bone pose;
  • S(q) represents the position of the constraint point (key skin point) of the target bone when the second bone pose of the target bone is q
  • n represents the constraint point (key skin point) contained in the target bone and the target bone.
  • the number of bones associated with the skin point), h is the serial number of the associated bone
  • W h represents the weight of the constraint point (key skin point) of the target bone controlled by the bone h
  • L h represents the pose of the second bone
  • M h represents the transformation matrix from the local coordinate system of the hth bone to the world coordinate system.
  • the constraint points of the target bone include the key skin points of the hand and the key skin points of the knee of the target bone, and the key skin points of the hand.
  • the key skin points of the point and knee are controlled by multiple bones in the target bone. According to the control weights of these root bones, the key skin points of the hand, and the local coordinates of the key skin points of the knee on each bone and each
  • the transformation matrix from the local coordinate system of the root bone to the world coordinate system can obtain the key skin points of the hand and knee of the target bone when the second bone pose of the target bone is q in the world coordinate system. Location.
  • the second position of the constraint point of the target bone is the constraint point of the target bone determined according to the preset correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone, and the posture of the first bone Location. Since there is a correspondence between the constraint point of the target bone and the constraint point of the source bone, in the process of transferring the animation data of the source bone to the target bone, the position of the constraint point of the source bone under the first bone pose is determined by the corresponding relationship. The relationship can be mapped to obtain the second position of the constraint point of the target bone, and the second position is the target position expected to be reached by the constraint point of the target bone in the process of motion redirection.
  • the constraint points of the target bone include the key skin points of the hand and the key skin points of the knee of the target bone.
  • the position of the key skin point of the hand and the key skin point of the knee combined with the corresponding relationship between the constraint point of the target bone and the constraint point of the source bone, can know the second position of the key skin point of the target bone, that is The expected target position of the key skin points of the knee of the target bone and the expected target position of the key skin points of the hand.
  • the constraint function can be determined according to the position and the second position of the constraint point of the target bone in the second bone pose, and the second constraint condition is expressed as the minimum value of the constraint function. It can be understood that the value of the constraint function is The smallest can indicate that the position of the constraint point of the target bone under the second bone pose is the same as the second position; through the constraint condition, the bone posture of the target bone in the process of motion redirection is constrained, so that the second constraint condition is satisfied.
  • the second bone pose of the target bone Exemplarily, as shown in the following formula (2),
  • S(q) represents the position of the jth constraint point of the target bone when the second bone pose of the target bone is q, where the constraint point includes the key skin point, and m represents the constraint point of the target bone (the key mask).
  • the number of skin points) c j represents the second position of the jth constraint point (key skin point) of the target bone.
  • the skeleton data not only the skeleton data but also the skin information is used effectively to establish the constraint conditions, so as to carry out more perfect constraints on the motion redirection process.
  • constraint information is missing.
  • the skeleton data has only two bones to control the foot, but the skeleton data cannot know the effect of the skinning, and the feet are often uneven.
  • key skin points such as hands and feet can be used as constraint points, and a first constraint condition and a second constraint condition can be constructed, and then the first position and the second position of the constraint point of the target bone can be used to satisfy the The second bone pose of the target bone of the second constraint condition, the positions of key skin points such as hands and feet under the second bone pose of the target bone and the corresponding key skin points under the first bone pose of the source bone
  • the positions of the points correspond to each other, so that the action of the virtual character can be expressed more realistically and naturally through the second skeletal pose.
  • q represents the second bone pose of the target bone
  • q ⁇ represents the bone pose of the target bone obtained without constraints (that is, directly transfer the animation data of the source bone without constraints to obtain the target bone)
  • FK ( q) Represents the coordinate information of the constraint point (bone point) when the second bone pose of the target bone is q, wherein the constraint point includes the bone point
  • c i represents the ith joint point (bone point) of the target bone corresponding to the need to reach
  • k represents the number of joint points (bone points) in the target bone.
  • the above formula (2) can be combined with the above formula (3) to obtain a more comprehensive optimization formula, so as to optimize the skeletal posture of the target bone during the motion redirection process, and the optimization formula is shown in the following formula (4) :
  • q represents the second bone pose of the target bone
  • q ⁇ represents the bone pose of the target bone obtained without constraints
  • FK(q) represents the constraint point when the second bone pose of the target bone is q (the key Bone point) information
  • c i represents the specified position corresponding to the ith joint point (key bone point) of the target bone that needs to be reached
  • k represents the number of joint points (key bone points) in the target bone
  • m represents the target bone
  • w 1 , w 2 , and w 3 are all weight coefficients.
  • FK(q) can express the coordinate information of the constraint point (key bone point) of the target bone
  • S(q) can express the constraint point (key skin point) information of the target bone
  • c i and c j respectively represent the pair of bone information
  • the position constraints and the position constraints of the skin information, and the specific values of the weight coefficients w 1 , w 2 , and w 3 can be adjusted according to actual needs, so that in the process of motion redirection, the valid information is no longer only the rotation of the bones.
  • the position of the skin point becomes an important additional constraint; at the same time, the use of bone motion information and skin information for constraints can effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall action; At the same time, the animation production efficiency is improved.
  • the method further includes: processing the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the constraint point of the target bone of the current frame by using the prediction model, to obtain The constraint point of the target bone in the next frame; wherein, the motion sequence of the constraint point of the source bone is determined by the positions of different constraint points of the source bone.
  • the motion sequence of the constraint points of the source bone consists of the position of the key skin point of the source bone and the position of the key mesh point, or the position of the key skin point of the source bone and the position of the key bone point, or the position of the key skin point of the source bone and the position of the key bone point.
  • the position of the key skin point is determined with the position of other key skin points.
  • key mesh points may include: the ground on which people walk, tables and chairs that people touch, horizontal bars, etc.
  • other key skin points may include: key skin points of bones of other characters associated with the source bone skin point.
  • the prediction model uses the second pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the position of the constraint point of the target bone in the current frame as input, and uses the constraint point of the target bone in the next frame as the prediction result. Train, and train an algorithmic model that reaches convergence.
  • the second bone pose sequence of the target bone is a sequence composed of the second bone poses of the target bone obtained through motion redirection within a certain time window; the motion sequence of the constraint points of the source bone is the source corresponding to each first bone pose of the source bone.
  • the constraint points of the source bones are related to the positions of key grid points, key bone points or other key skin points in the above motion sequence.
  • the position of the point or other key skin point can determine the constraint point of the source bone.
  • the key information point is determined as The constraint points of the source bone, thereby determining the motion sequence of the constraint points of the source bone.
  • a piece of animation data of the source bone includes 50 frames
  • the second bone pose sequence of the target bone may include the second bone pose of the target bone obtained after the animation data of the source bone in the first 30 frames of motion redirection, and the constraints of the source bone.
  • the motion sequence of points can include the constraint points of the source bone in the first bone pose of the source bone in 50 frames, through the second bone pose of the target bone in the 30 frames, the constraint points of the source bone in the 50 frames, and the target bone in the 30th frame. to determine the constraint point of the target bone in the current 31st frame of data; for example, as shown in the following formula (5):
  • F is the trained neural network prediction model
  • c ⁇ represents the constraint point of the target bone in the current frame
  • c * represents the constraint point of the target bone in the previous frame
  • a motion sequence representing the constraint points of the source bone.
  • the distance judgment is: look at the source and target bones in the space and space objects (objects with interaction) As a whole, the distance between them will become the basis for constraint determination, that is, not only the target bone of a single virtual character is considered, but the redirection space where the entire target bone is located is regarded as a whole.
  • a section of the source bone that runs first, then grabs the horizontal bar to do pull-ups and then falls is transferred to the target bone.
  • the running is the constraint between the footsteps and the ground.
  • the hand and the horizontal bar are constrained, and finally, when the body falls, it returns to the constraint between the footsteps and the ground.
  • the ground and the horizontal bar are used as environmental factors, and the ground is used in the process of motion redirection.
  • the key information points include the key skin points of the hands and feet, and the key mesh points on the ground and the horizontal bar that are in contact with the key skin points on the source bone , the constraint points of the source bones are related to these key information points; according to this whole, that is, the key mesh points on the ground, the key mesh points of the horizontal bar, the key skin points of the hands, and the key skin points of the feet, Therefore, the motion sequence of the constraint points of the source bones can be known, that is, the key skin points of the feet first contact the key mesh points on the ground, then the key skin points of the hand contact the key mesh points of the horizontal bar, and finally return.
  • the key skin points to the feet are in contact with the key grid points on the ground; assuming that a part of the motion redirection has been completed for the entire action, the second bone pose sequence of the target bone is obtained, according to the constraint point of the source bone.
  • the motion sequence, the second skeleton pose sequence of the target skeleton, and the constraint point of the target skeleton of the current frame, the constraint point of the target skeleton of the next frame can be obtained through the above formula (5);
  • the second constraint condition includes skin information and environment information, through the second constraint condition
  • the second bone pose of the target bone is constrained in real time during the motion redirection process, so that the position of the constraint point of the target bone under the optimized second bone pose of the target bone is the same as the second position.
  • the valid information is no longer only the motion information such as the rotation angle of the bones, and the key skin points and key grid points become an important additional constraint; at the same time, the bone motion information and skin information are used to constrain , effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall action; at the same time, it improves the efficiency of animation production.
  • FIG. 2 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure. As shown in Figure 2, the method may include:
  • Step 200 between the source bone and the target bone, build one or more virtual bones
  • the difference in the number of bones makes it impossible to transfer the spatial rotation data of the joints one-to-one between the source bone and the target bone.
  • the axis of the bone refers to the local coordinate system of each bone.
  • the difference in the axial direction causes the joint between the source bone and the target bone to directly transmit spatial rotation data.
  • the difference in length leads to errors in transferring animation data from the source bone to the target bone (eg foot sliding, etc.).
  • FIG. 3 shows a schematic diagram of constructing a virtual bone according to an embodiment of the present disclosure.
  • the length of each bone in the virtual bone is related to the corresponding source bone
  • the length of each bone in the virtual bone is the same, and the axial direction of each bone in the virtual bone is the same as the axial direction of each bone in the corresponding target bone.
  • the number of virtual bones can be multiple, and multiple virtual bones are used to bridge the source bone and the target bone, so as to achieve a smooth transition from the source bone to the target bone, and further optimize the effect of eliminating axial differences.
  • the number of virtual bones may be different from the source bones and the target bones, and the number of virtual bones may be the same as the number of bones selected in the above-mentioned predefined correspondence between the source bones and the target bones, for example, the source bones and the target bones
  • Each of the bones has 100 bones.
  • 10 bones are selected as key bones for correspondence, and 10 virtual bones are calculated through 100 root bones and 100 target bones and their corresponding relationships; for example, the source bones have 100 The root bone and the target bone have 10 bones.
  • 10 bones are selected as key bones for correspondence, and 10 virtual bones are calculated through 100 root bones and 10 target bones and their corresponding relationships. Therefore, the above-mentioned influence of the difference in the number of bones on the motion redirection is effectively solved, and the operation efficiency is improved.
  • this step may include: obtaining one or more reference poses of the source skeleton and one of the target skeletons according to the source skeleton, the target skeleton and one or more preset reference poses or multiple reference poses; according to the preset correspondence between the source bones and the target bones, one or more virtual bones are built between the same reference poses of the source bones and the target bones.
  • the virtual bone is constructed by adding Multiple reference poses are used, and the multi-frame reference pose is used to define the style relationship between the source bone and the target bone, so as to control the final animation style of the character.
  • one or more virtual bones corresponding to the reference poses are obtained, so as to use the virtual bones to The style transitions from the source bone to the target bone.
  • the reference pose is standing
  • the source bone is a normal standing style
  • the target bone is expected to be in a hunchbacked standing style
  • the corresponding relationship between the source bone and the target bone is used to make the normal standing source
  • a virtual skeleton of the standing posture is built between the skeleton and the target bone of hunchbacked standing.
  • the style of the virtual skeleton's standing posture is the transition from the normal standing style to the hunchbacked standing style, so that the virtual bone is used to transition the normal standing style of the source bone to the hunchbacked standing style.
  • the hunchback standing style of the target skeleton is the transition from the normal standing style to the hunchbacked standing style, so that the virtual bone is used to transition the normal standing style of the source bone to the hunchbacked standing style.
  • the reference pose includes: a T-pose.
  • the basic reference pose is a T-pose (T-pose), that is, a standing posture with both hands raised.
  • T-pose T-pose
  • the T-pose according to the corresponding relationship between the source bone and the target bone, and the T-pose presented by the source bone and the T-pose presented by the target bone.
  • T-pose virtual bone is built, and the T-pose of the virtual bone bridges the source bone and the target bone. The stylistic form when standing between hands raised.
  • the reference posture further includes at least one posture of squatting, taking a step, akimbo, bending over, and raising both hands.
  • the above-mentioned T-pose virtual bone is constructed by using the source bone and target bone, as well as the corresponding relationship between the source bone and the target bone.
  • the T-pose virtual bone is used as the basic virtual bone, which basically bridges the axial difference between the source bone and the target bone. .
  • other reference poses are added to meet different style requirements.
  • the reference postures may also include other 5 different reference postures: squatting posture, stepping posture, akimbo posture, bending posture, and raising hands posture.
  • a virtual skeleton of the reference pose is built, so as to use the virtual skeleton to transition the style of the source skeleton under the reference pose to the style of the target skeleton under the reference pose.
  • the preset reference pose has a T- pose, and other reference poses can be added according to different animation production requirements, and the number of reference poses is not limited in this embodiment of the present disclosure.
  • Step 201 Acquire the first bone pose of the source bone and the constraint points of the source bone, wherein the constraint points include skin points.
  • This step is the same as step 101 in the above-mentioned FIG. 1 , and will not be repeated here.
  • Step 202 constructing a first constraint condition according to the posture of the first bone and the constraint points of the source bone.
  • This step is the same as step 102 in the above-mentioned FIG. 1 , and will not be repeated here.
  • Step 203 Obtain a second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition.
  • This step is the same as step 103 in the above-mentioned FIG. 1 , and will not be repeated here.
  • Step 204 Obtain a third bone pose of the target bone according to the first bone pose and the virtual bone.
  • one or more virtual bones are obtained, and then one or more virtual bones are fused to obtain the third bone pose of the target bone, so that the style of the source bone can be combined Mapped to the target bone; the pose of the third bone is the pose of the target bone obtained without constraints.
  • the third bone pose of the target bone is obtained through fusion calculation.
  • Step 205 According to the third position and the second position, obtain a second bone pose that satisfies the second constraint condition; wherein, the third position is the constraint point of the target bone under the third bone pose. position; the second position is the position of the constraint point of the target bone determined according to the correspondence between the constraint point of the source bone and the constraint point of the target bone, the position of the constraint point of the source bone, and the posture of the first bone.
  • the position of the constraint point of the target bone under the posture of the third bone may be different from the target position that the constraint point of the target bone needs to reach (that is, the second position).
  • a second constraint is added to constrain the bone pose of the target bone, so as to obtain a more vivid and realistic second bone pose of the target bone, making the motion redirection action more accurate.
  • the animation data of the source bone is transferred to the target bone through one or more virtual bones constructed above, that is, the first bone pose of the source bone is mapped to the third bone pose of the target bone through the virtual bone;
  • the virtual bone eliminates the quantitative and axial differences between the source bone and the target bone, thus ensuring that the animation data can be effectively transferred from the source bone to the target bone;
  • the reference pose of the source skeleton and the target skeleton's different pose styles are also converted through the virtual skeleton.
  • the third bone pose of the target bone obtained during the motion redirection process is constrained by the second constraint condition in FIG. 1, so as to obtain the second bone pose of the target bone.
  • the skin information is effectively used to carry out Constraints can more effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall movement, which further improves the efficiency of animation production and avoids a lot of manual work.
  • the constraint points include skin points; according to the first bone pose and the constraint points of the source bone, a first Constraint condition; according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; according to the first position and the second position, the second constraint condition is obtained.
  • the second bone pose of the target bone with the constraint condition wherein the first position is the position of the constraint point of the target bone obtained by mapping the first bone pose to the target bone without the second constraint condition;
  • the second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone.
  • FIG. 4 shows a structural diagram of a motion redirection apparatus according to an embodiment of the present disclosure.
  • the apparatus includes: an acquisition module 301 for acquiring a first bone pose of a source bone and constraints of the source bone point, the constraint points include skin points; the first constraint construction module 302 is used to construct the first constraint according to the first bone pose and the constraint points of the source bone; the second constraint construction module 303 is used to construct the first constraint to obtain the second constraint condition according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition; the motion redirection module 304 is used for, according to the first position and the second position, obtaining the second bone pose of the target bone that satisfies the second constraint condition, wherein the first position is the target bone obtained by mapping the first bone pose to the target bone when there is no second constraint condition The second position is the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the
  • the apparatus further includes: a virtual bone building module, configured to: build one or more virtual bones between the source bone and the target bone; according to the first bone posture and the virtual bone to obtain the third bone posture of the target bone; according to the third position and the second position, obtain the second bone posture that satisfies the second constraint condition; wherein, the third position is the target The position of the constraint point of the bone in the third bone pose.
  • a virtual bone building module configured to: build one or more virtual bones between the source bone and the target bone; according to the first bone posture and the virtual bone to obtain the third bone posture of the target bone; according to the third position and the second position, obtain the second bone posture that satisfies the second constraint condition; wherein, the third position is the target The position of the constraint point of the bone in the third bone pose.
  • the second constraint condition includes: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
  • the position of the constraint point of the target bone under the second bone posture is based on the weight information of the constraint point of the target bone, the constraint point of the target bone in the second bone posture is in the target bone
  • the local coordinates on and the transformation matrix from the local coordinate system of the target bone to the world coordinate system are determined.
  • the apparatus further includes: a constraint point position prediction module, configured to predict the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the target of the current frame by using the prediction model
  • the constraint points of the bones are processed to obtain the constraint points of the target bone in the next frame; wherein, the motion sequence of the constraint points of the source bone is determined by the positions of different constraint points of the source bone.
  • the constraint points further include: mesh points and/or skeleton points.
  • the virtual skeleton building module is further configured to: obtain one or more references of the source skeleton according to the source skeleton, the target skeleton and one or more preset reference poses The pose and one or more reference poses of the target bone; according to the preset correspondence between the source bone and the target bone, one or more virtual bones are built between the same reference pose of the source bone and the target bone.
  • the reference posture includes at least: a T-pose.
  • the constraint point of the source bone is determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
  • the constraint points include skin points; according to the first bone pose and the constraint points of the source bone, a first Constraint condition; according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; according to the first position and the second position, the second constraint condition is obtained.
  • the second bone pose of the target bone with the constraint condition wherein the first position is the position of the constraint point of the target bone obtained by mapping the first bone pose to the target bone without the second constraint condition;
  • the second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
  • a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
  • FIG. 5 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure relates to a motion retargeting method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring a first bone posture and a constraint point of a source bone, the constraint point comprising a skin point; constructing a first constraint condition according to the first bone posture and the constraint point of the source bone; obtaining a second constraint condition according to a correspondence between the constraint point of the source bone and a constraint point of a target bone, and the first constraint condition; and obtaining, according to a first position and a second position, a second bone posture of the target bone satisfying the second constraint condition, the first position being a constraint point position of the target bone obtained by mapping the first bone posture to the target bone when there is no second constraint condition, and the second position being a constraint point position of the target bone determined according to the correspondence, the constraint point of the source bone, and the first bone posture. In the present disclosure, skin constraints are added to motion retargeting, so as to avoid phenomena such as motion jitter, stiffness, and unnaturalness, and improve animation production efficiency.

Description

一种运动重定向方法、装置、电子设备及存储介质Motion redirection method, device, electronic device and storage medium
本申请要求于2020年12月31日提交中国专利局、申请号为202011631904.6、发明名称为“一种运动重定向方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 31, 2020 with the application number 202011631904.6 and the invention titled "A Motion Redirection Method, Device, Electronic Device and Storage Medium", the entire contents of which are Incorporated herein by reference.
技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种运动重定向方法、装置、电子设备及存储介质。The present disclosure relates to the field of computer technologies, and in particular, to a motion redirection method, apparatus, electronic device, and storage medium.
背景技术Background technique
在三维内容制作的过程中,动画是其中非常重要的,但是在动画制作的过程中,传统的方式是通过动画制作人员手工制作的方式,但是这种方式带来一定的问题:手工制作动画非常耗时,需要大量的动画制作人员进行协作;高质量的动画对于动画制作人员的水平需求很高,层次不齐的动画制作人员的水平会造成动画的效果层次不齐;手工制作动画往往只会制作大体的运动动作,对于运动细节的还原较难实现。In the process of 3D content production, animation is very important, but in the process of animation production, the traditional way is to manually produce animation by animators, but this method brings certain problems: hand-made animation is very It is time-consuming and requires a large number of animators to cooperate; high-quality animation requires a high level of animators, and the level of animators with uneven levels will cause uneven levels of animation effects; hand-made animations often only It is difficult to restore the movement details when making general movement actions.
为了解决手工制作的方式存在的上述问题,在当前动画制作中通常采用动作捕捉的方式,动作捕捉可以精准还原演员本身的动作,即使演员的原始动作数据质量很高,符合动画制作要求,然而最终需要的是角色动画,角色可能是各种各样的,可能是真人,或者二次元角色,甚至可能是动物,因此,需要应用重定向技术,将演员的动作转换到对应的角色动作当中。In order to solve the above problems in the manual production method, motion capture is usually used in the current animation production. Motion capture can accurately restore the movements of the actors themselves. What is needed is character animation, and the characters may be of various types, such as real people, or two-dimensional characters, or even animals. Therefore, it is necessary to apply redirection technology to convert the actions of the actors into the corresponding character actions.
在相关技术中,重定向技术做的比较简单,通常只会将演员捕捉动作的骨骼旋转数据进行迁移,这样导致的结果是经过重定向后的动作会出现抖动或者整体动作的僵硬、不自然等现象,动作语义发生了改变或者不满足相关的运动约束信息等问题,导致后期需要花费大量的时间进行手动修复。In the related art, the redirection technology is relatively simple. Usually, only the bone rotation data of the actor's captured action is migrated. As a result, the redirected action will appear jittery or the overall action will be stiff and unnatural, etc. phenomenon, the action semantics has changed or the relevant motion constraint information is not satisfied, which leads to a lot of time for manual repair in the later stage.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本公开提出了一种运动重定向方法、装置、电子设备及存储介质。In view of this, the present disclosure proposes a motion redirection method, apparatus, electronic device, and storage medium.
根据本公开的一方面,提供了一种运动重定向方法,包括:According to an aspect of the present disclosure, there is provided a motion redirection method, comprising:
获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;obtaining the first bone pose of the source bone and the constraint point of the source bone, the constraint point including the skin point;
根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;constructing a first constraint condition according to the first bone pose and the constraint point of the source bone;
根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;Obtain the second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition;
根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。According to the first position and the second position, the second bone pose of the target bone that satisfies the second constraint condition is obtained, wherein the first position is to map the first bone pose to the The target bone, the obtained position of the constraint point of the target bone; the second position is based on the correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone , the determined position of the constraint point of the target bone.
在一种可能的实现方式中,所述方法还包括:在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨骼;In a possible implementation manner, the method further includes: building one or more virtual bones between the source bone and the target bone;
根据所述第一骨骼姿态及所述虚拟骨骼,得到目标骨骼的第三骨骼姿态;obtaining the third bone pose of the target bone according to the first bone pose and the virtual bone;
根据第三位置和所述第二位置,得到满足所述第二约束条件的第二骨骼姿态;其中,所述第三位置是目标骨骼的约束点在所述第三骨骼姿态下的位置。According to the third position and the second position, a second bone pose satisfying the second constraint condition is obtained; wherein the third position is the position of the constraint point of the target bone under the third bone pose.
在一种可能的实现方式中,所述第二约束条件包括:所述目标骨骼的约束点在所述第二骨骼姿态下的位置和所述第二位置相同。In a possible implementation manner, the second constraint condition includes: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
在一种可能的实现方式中,所述目标骨骼的约束点在所述第二骨骼姿态下的位置,根据目标骨骼的约束点的权重信息、第二骨骼姿态下目标骨骼的约束点在目标骨骼上的局部坐标及目标骨骼局部坐标系到世界坐标系的变换矩阵确定。In a possible implementation manner, the position of the constraint point of the target bone under the second bone posture is based on the weight information of the constraint point of the target bone, the constraint point of the target bone in the second bone posture is in the target bone The local coordinates on and the transformation matrix from the local coordinate system of the target bone to the world coordinate system are determined.
在一种可能的实现方式中,所述方法还包括:通过预测模型对目标骨骼 的第二骨骼姿态序列、源骨骼的约束点的运动序列、以及当前帧的目标骨骼的约束点进行处理,得到下一帧的目标骨骼的约束点;其中,所述源骨骼的约束点的运动序列由源骨骼的不同约束点的位置确定。In a possible implementation manner, the method further includes: processing the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the constraint point of the target bone of the current frame by using the prediction model, to obtain The constraint point of the target bone in the next frame; wherein, the motion sequence of the constraint point of the source bone is determined by the positions of different constraint points of the source bone.
在一种可能的实现方式中,所述约束点还包括:网格点和/或骨骼点。In a possible implementation manner, the constraint points further include: mesh points and/or skeleton points.
在一种可能的实现方式中,所述在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨骼,包括:In a possible implementation manner, the building one or more virtual bones between the source bone and the target bone includes:
根据所述源骨骼、所述目标骨骼及预设的一个或多个参考姿态,得到源骨骼的一个或多个参考姿态及目标骨骼的一个或多个参考姿态;According to the source bone, the target bone and one or more preset reference poses, obtain one or more reference poses of the source bone and one or more reference poses of the target bone;
根据预设的源骨骼与目标骨骼的对应关系,在源骨骼与目标骨骼的同一参考姿态之间,搭建一个或多个虚拟骨骼。According to the preset corresponding relationship between the source bone and the target bone, one or more virtual bones are built between the same reference pose of the source bone and the target bone.
在一种可能的实现方式中,所述参考姿态至少包括:T-姿态。In a possible implementation manner, the reference posture includes at least: a T-pose.
在一种可能的实现方式中,所述源骨骼的约束点,根据源骨骼的自身约束和/或与所述源骨骼相关联的环境约束确定。In a possible implementation manner, the constraint point of the source bone is determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
根据本公开的另一方面,提供了一种运动重定向装置,包括:According to another aspect of the present disclosure, there is provided a motion redirection device, comprising:
获取模块,用于获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;第一约束条件构建模块,用于根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;第二约束条件构建模块,用于根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;运动重定向模块,用于根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。an acquisition module for acquiring the first bone pose of the source bone and constraint points of the source bone, the constraint points include skin points; a first constraint condition building module for acquiring the first bone pose and the constraints of the source bone point to construct the first constraint condition; the second constraint condition building module is used to obtain the second constraint condition according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition; motion A redirection module, configured to obtain a second bone pose of the target bone that satisfies the second constraint condition according to the first position and the second position, wherein the first position is to convert the target bone without the second constraint condition The first bone pose is mapped to the target bone, and the obtained position of the constraint point of the target bone; the second position is based on the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and The first bone pose is the determined position of the constraint point of the target bone.
根据本公开的另一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行上述方法。According to another aspect of the present disclosure, there is provided an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
根据本公开的另一方面,提供了一种非易失性计算机可读存储介质,其 上存储有计算机程序指令,其中,所述计算机程序指令被处理器执行时实现上述方法。According to another aspect of the present disclosure, there is provided a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
本公开实施例中,通过获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。这样,在运动重定向的过程中加入了蒙皮信息进行约束,能够有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时,后期无需大量美术人力修复数据,有效提高了动画制作效率。In this embodiment of the present disclosure, the first bone pose of the source bone and the constraint point of the source bone are obtained, where the constraint point includes a skin point; the first constraint condition is constructed according to the first bone pose and the constraint point of the source bone ; According to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; According to the first position and the second position, the second constraint condition is obtained. The second bone pose of the target bone, wherein the first position is the constraint point position of the target bone obtained by mapping the first bone pose to the target bone when there is no second constraint condition; The second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone. In this way, the skin information is added for constraints in the process of motion redirection, which can effectively avoid the possible jitter of motion redirection and the stiffness and unnaturalness of the overall action. Improved animation production efficiency.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure, and together with the description, serve to explain the principles of the disclosure.
图1示出根据本公开一实施例的一种运动重定向方法的流程图;1 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure;
图2示出根据本公开一实施例的一种运动重定向方法的流程图;2 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure;
图3示出根据本公开一实施例的构建虚拟骨骼的示意图;3 shows a schematic diagram of constructing a virtual skeleton according to an embodiment of the present disclosure;
图4示出根据本公开一实施例的一种运动重定向装置的结构图;4 shows a structural diagram of a motion redirection device according to an embodiment of the present disclosure;
图5示出根据本公开一实施例的一种电子设备的框图。FIG. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附 图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar function. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
图1示出根据本公开一实施例的一种运动重定向方法的流程图。如图1所示,该方法可以包括:FIG. 1 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure. As shown in Figure 1, the method may include:
步骤101、获取源骨骼的第一骨骼姿态和源骨骼的约束点;其中,约束点包括蒙皮点。Step 101: Obtain the first bone pose of the source bone and the constraint points of the source bone; wherein, the constraint points include skin points.
在运动重定向的过程中,需要将源骨骼的动画数据传递到目标骨骼的动画数据,其中,源骨骼指已经有动画数据的骨骼,例如,可以为根据影视公司演员的真实骨骼创建的骨骼,动画师刻画出来的骨骼等等;目标骨骼指希望把动画数据传递过去的骨骼,例如,游戏公司中虚拟角色的骨骼;源骨骼和目标骨骼中均包括一根或多根骨骼。源骨骼和目标骨骼可以为3D文件的形式,比如FBX文件(AutoDesk通用格式),asf格式(CMU标准格式),mskel(Xmov标准格式)。In the process of motion redirection, it is necessary to transfer the animation data of the source bone to the animation data of the target bone, where the source bone refers to the bone that already has animation data. The bones drawn by the animator, etc.; the target bones refer to the bones to which the animation data is to be passed, for example, the bones of the virtual characters in the game company; the source bones and the target bones include one or more bones. Source bones and target bones can be in the form of 3D files, such as FBX files (AutoDesk common format), asf format (CMU standard format), mskel (Xmov standard format).
源骨骼的第一骨骼姿态可以为捕捉到的演员的动作姿态,也可以为动画师刻画出的骨骼的动作姿态,等等;该第一骨骼姿态可以通过源骨骼的动画数据包含的旋转角度(欧拉角,四元数等进行表示)、平移距离等数据进行表示,其中,源骨骼的动画数据可以为动画的标准格式文件,例如amc(CMU标准格式),FBX或者sps(Xmov标准格式)。The first bone pose of the source bone can be the action pose of the captured actor, or the action pose of the bone drawn by the animator, etc.; the first bone pose can be determined by the rotation angle ( Euler angles, quaternions, etc.), translation distance and other data are represented, where the animation data of the source bones can be standard animation format files, such as amc (CMU standard format), FBX or sps (Xmov standard format) .
在实际动画制作过程中,由于每个骨骼都会有一个命名,而命名是没有标准的,影视公司一般把源骨骼中根骨骼命名成root,游戏公司经常把目标骨骼中根骨骼命名成Bip001,因此,为了在运动重定向过程中将源骨骼的动 画数据传递到期望的目标骨骼,可以预先在源骨骼和目标骨骼之间做一个语义的关联配置,从而将各个不同的命名规范对应起来,例如,源骨骼中的根骨骼叫做root,目标骨骼中的根骨骼叫Bip001,那么将root对应到Bip001,就将两个不同公司的命名标准在根骨骼上进行了对应;同理,将语义相同(例如,骨骼的功能相同)的其他骨骼进行关联,从而定义源骨骼与目标骨骼的对应关系。同时,由于源骨骼与目标骨骼中所含骨骼的数量存在不一致的情况,此时可以基于语义相同或相似的原则,在源骨骼与目标骨骼中各挑选出相同数量的关键骨骼,并将这些关键骨骼进行对应,从而定义源骨骼与目标骨骼的对应关系。In the actual animation production process, since each bone will have a name, and the naming is not standardized, film and television companies generally name the root bone in the source bone as root, and game companies often name the root bone in the target bone as Bip001. Therefore, in order to In the process of motion redirection, the animation data of the source bone is transferred to the desired target bone, and a semantic association configuration can be made between the source bone and the target bone in advance, so as to correspond to different naming conventions, for example, the source bone The root bone in the target bone is called root, and the root bone in the target bone is called Bip001. Then, if the root corresponds to Bip001, the naming standards of two different companies are corresponding to the root bone. Similarly, the semantics are the same (for example, the bone The function of the same) is associated with other bones, so as to define the corresponding relationship between the source bone and the target bone. At the same time, due to the inconsistency in the number of bones contained in the source bone and the target bone, at this time, based on the principle of the same or similar semantics, the same number of key bones can be selected from the source bone and the target bone, and these key bones can be selected. The bones are mapped to define the corresponding relationship between the source bone and the target bone.
约束点可以包括目标骨骼的约束点及源骨骼的约束点,表示运动重定向过程中对目标骨骼的姿态产生约束的点,示例性地,约束点可以包括:蒙皮点、骨骼点、网格点中的至少一项。其中,蒙皮点指附着在目标骨骼或源骨骼的蒙皮表面上的点,骨骼点指目标骨骼或源骨骼上的点,网格点指目标骨骼或源骨骼所在空间中其他物体上的点。蒙皮点的数据可以来源于动作捕捉系统的人体数据库或者其他来源的数据库;源骨骼的蒙皮点与源骨骼中的各根骨骼存在关联关系,目标骨骼的蒙皮点与目标骨骼中的各根骨骼存在关联关系。The constraint points may include the constraint points of the target bone and the constraint points of the source bone, which represent the points that constrain the posture of the target bone during the motion redirection process. Exemplarily, the constraint points may include: skin points, bone points, meshes at least one of the points. Among them, the skin point refers to the point attached to the skin surface of the target bone or the source bone, the bone point refers to the point on the target bone or the source bone, and the mesh point refers to the point on other objects in the space where the target bone or the source bone is located. . The data of the skinning points can come from the human database of the motion capture system or the database of other sources; the skinning points of the source bones are associated with each root bone in the source bones, and the skinning points of the target bones are related to each Root bones are associated.
进一步地,可以预先在源骨骼的约束点和目标骨骼的约束点之间做一个语义的关联配置,从而定义源骨骼的约束点与目标骨骼的约束点之间的对应关系。例如,将源骨骼中拇指指尖的骨骼点作为源骨骼的约束点,将目标骨骼中拇指指尖的骨骼点作为目标骨骼的约束点,对两个骨骼点进行关联,从而定义源骨骼中拇指指尖的骨骼点与目标骨骼中拇指指尖的骨骼点之间的对应关系。再例如,将源骨骼中脚尖的蒙皮点作为源骨骼的约束点,将目标骨骼中脚尖的蒙皮点作为目标骨骼的约束点,对两个蒙皮点进行关联,从而定义源骨骼中脚尖的蒙皮点与目标骨骼中脚尖的蒙皮点之间的对应关系。Further, a semantic association configuration may be made in advance between the constraint points of the source bone and the constraint points of the target bone, so as to define the corresponding relationship between the constraint points of the source bone and the constraint points of the target bone. For example, take the bone point of the thumb fingertip in the source bone as the constraint point of the source bone, take the bone point of the thumb fingertip in the target bone as the constraint point of the target bone, and associate the two bone points to define the thumb in the source bone. The correspondence between the bone points of the fingertip and the bone points of the thumb fingertip in the target bone. For another example, the skin point of the toe in the source bone is used as the constraint point of the source bone, the skin point of the toe in the target bone is used as the constraint point of the target bone, and the two skin points are associated to define the toe in the source bone. The correspondence between the skin point of , and the skin point of the toe in the target bone.
在一种可能的实现方式中,所述源骨骼的约束点,可以根据源骨骼的自身约束和/或与所述源骨骼相关联的环境约束确定。其中,源骨骼的自身约束 指来源于源骨骼自身内部的约束,环境约束指来源于源骨骼与外部环境的互动而产生的外部环境的约束。In a possible implementation manner, the constraint point of the source bone may be determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone. Among them, the self-constraint of the source skeleton refers to the constraint from the source skeleton itself, and the environment constraint refers to the constraint from the external environment generated by the interaction between the source skeleton and the external environment.
在进行运动重定向的过程中,由于虚拟角色和演员的身体比例、体型,以及骨骼拓扑和关节自由度一般都不一样,不能将演员的三维动作直接映射到虚拟角色身上,需要利用运动中产生的各种语义信息对映射过程进行约束;根据语义信息是源于角色自身还是源于角色及外部环境,可以分为自身约束与环境约束,例如,在运动重定向的过程中,一个手长的人可以在不弯曲膝盖的情况下摸到脚尖,而手短的人摸到脚尖就需要弯曲膝盖,这相当在同一个语义信息下所得到的两个姿态,人的手摸到脚尖属于一种自身约束,此时,可以取源骨骼的手部、膝盖、脚尖上的蒙皮点和/或骨骼点作为源骨骼的约束点;再例如,一个身材高大的人可以在不跳跃的情况下摸到篮筐,而身材矮小的人需要跳跃才能摸到,这相当在同一个语义信息下所得到的两个姿态,人摸到篮筐属于一种环境约束,此时,可以取源骨骼的手部、脚部等上的蒙皮点和/或骨骼点,以及篮筐上的网格点作为源骨骼的约束点。In the process of motion retargeting, since the body proportions, body shapes, and bone topology and joint degrees of freedom of the virtual character and the actor are generally different, the three-dimensional motion of the actor cannot be directly mapped to the virtual character. The various semantic information of the tensor constrains the mapping process; according to whether the semantic information originates from the role itself or from the role and the external environment, it can be divided into self constraints and environmental constraints. For example, in the process of motion redirection, a hand-length People can touch their toes without bending their knees, while people with short hands need to bend their knees when they touch their toes. This is equivalent to two gestures obtained under the same semantic information. When people touch their toes with their hands, they are a kind of self. Constraints, at this time, the skin points and/or bone points on the hands, knees, and toes of the source bone can be taken as the constraint points of the source bone; for another example, a tall person can touch it without jumping The basket, and short people need to jump to touch it. This is equivalent to two gestures obtained under the same semantic information. When a person touches the basket, it is an environmental constraint. At this time, the hand of the source bone can be obtained. , skin and/or bone points on feet, etc., and mesh points on the basket as constraint points for the source bone.
考虑到源骨骼及目标骨骼中蒙皮点、骨骼点、网格点的数量通常较大,因此,可以在源骨骼及目标骨骼中所有蒙皮点、骨骼点、网格点中选取出一部分作为关键信息点,进而根据自身约束或环境约束在源骨骼的关键信息点中选取出合适点作为源骨骼的约束点,相应地,可以在目标骨骼的关键信息点中选取出合适点作为目标骨骼的约束点;其中,关键信息点可以包括关键蒙皮点、关键骨骼点、关键网格点。示例性地,可以根据动画场景的需要,预先在源骨骼的所有蒙皮点中选取出若干蒙皮点作为源骨骼的关键蒙皮点,同时,在目标骨骼的所有蒙皮点中选取出与上述源骨骼的关键蒙皮点的位置相对应的蒙皮点作为目标骨骼的关键蒙皮点,例如,可以选取出手部、脚部、头部、膝盖等部位端部的蒙皮点作为关键蒙皮点。上述选取出的源骨骼的关键蒙皮点与选取出的目标骨骼的关键蒙皮点的数量是相同,根据上述定义的源骨骼的约束点与目标骨骼的约束点之间的对应关系,从而定义源骨骼的关键蒙皮点与目标骨骼的关键蒙皮点之间的对应关系。Considering that the number of skin points, bone points, and mesh points in the source and target bones is usually large, a part of all skin points, bone points, and mesh points in the source and target bones can be selected as the Key information points, and then select appropriate points from the key information points of the source bone as the constraint points of the source bone according to their own constraints or environmental constraints. Constraint points; among them, key information points may include key skin points, key bone points, and key mesh points. Exemplarily, according to the needs of the animation scene, a number of skin points can be selected from all the skin points of the source bone as the key skin points of the source bone, and at the same time, selected from all the skin points of the target bone and The skin point corresponding to the position of the key skin point of the source bone is used as the key skin point of the target bone. For example, the skin point at the end of the hand, foot, head, knee and other parts can be selected as the key skin point skin point. The number of key skinning points of the source bone selected above is the same as the number of key skinning points of the selected target bone. The correspondence between the key skin points of the source bone and the key skin points of the target bone.
在动画制作过程中,针对源骨骼的不同的第一骨骼姿态,可以将上述一个或多个源骨骼的关键蒙皮点作为源骨骼的约束点,同时,根据源骨骼的关键蒙皮点与目标骨骼的关键蒙皮点之间的对应关系,相应地,可以将上述一个或多个目标骨骼的关键蒙皮点作为目标骨骼的约束点;由于源骨骼的各约束点和目标骨骼的各约束点存在对应关系,通过约束点之间的对应关系及根据源骨骼的自身约束和/或与源骨骼相关联的环境约束确定的不同约束点,可以在不同的动画中产生不同的效果。示例性地,在源骨骼第一骨骼姿态为手摸膝盖的动作姿态时,可以将源骨骼手部的关键蒙皮点及膝盖的关键蒙皮点作为源骨骼的约束点,相应地,可以将目标骨骼手部的关键蒙皮点及膝盖的关键蒙皮点作为目标骨骼的约束点。In the animation production process, according to the different first bone poses of the source bone, the key skinning points of the above-mentioned one or more source bones can be used as the constraint points of the source bone. At the same time, according to the key skinning points of the source bone and the target Correspondence between the key skinning points of the bones, correspondingly, the key skinning points of one or more target bones can be used as the constraint points of the target bone; since each constraint point of the source bone and each constraint point of the target bone There is a corresponding relationship, and through the corresponding relationship between the constraint points and different constraint points determined according to the source bone's own constraints and/or environmental constraints associated with the source bone, different effects can be produced in different animations. Exemplarily, when the first bone pose of the source bone is the action pose of hand touching the knee, the key skin points of the hand of the source bone and the key skin points of the knee can be used as the constraint points of the source bone, and correspondingly, the The key skin points of the hand of the target bone and the key skin points of the knee are used as the constraint points of the target bone.
步骤102、根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件。 Step 102 , construct a first constraint condition according to the posture of the first bone and the constraint point of the source bone.
该步骤,在第一骨骼姿态下,根据上述步骤101选取出的源骨骼的约束点,构建第一约束条件;第一约束条件表示第一骨骼姿态下,由源骨骼中不同约束点的相对位置关系所得到的对各约束点的位置约束。In this step, in the first bone pose, a first constraint condition is constructed according to the constraint points of the source bone selected in the above step 101; the first constraint condition represents the relative positions of different constraint points in the source bone under the first bone pose The position constraints for each constraint point obtained by the relationship.
本公开实施例中,在存在上述自身约束,或存在上述环境约束,或者同时存在上述自身约束和环境约束的情况下均可以构建含有蒙皮信息的第一约束条件。In the embodiment of the present disclosure, the first constraint condition including skin information can be constructed under the condition that the above self-constraint, the above-mentioned environmental constraint exists, or both the above-mentioned self-constraint and the environmental constraint exist.
示例性地,在源骨骼第一骨骼姿态为手摸膝盖的动作姿态时,由步骤101可知,此时,可以将源骨骼手部的关键蒙皮点及膝盖的关键蒙皮点作为源骨骼的约束点,在手摸膝盖这一动作姿态下,构建的第一约束条件即为源骨骼的手部的关键蒙皮点的位置与源骨骼的膝盖的关键蒙皮点位置相同。Exemplarily, when the first bone pose of the source bone is the action pose of hand touching the knee, it can be known from step 101 that at this time, the key skin points of the hand of the source bone and the key skin points of the knee can be used as the key skin points of the source bone. Constraint point, in the gesture of hand touching the knee, the first constraint condition constructed is that the position of the key skin point of the hand of the source bone is the same as the position of the key skin point of the knee of the source bone.
步骤103、根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件。Step 103: Obtain a second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition.
该步骤,在上述步骤102得到第一约束条件的基础上,利用预先定义的源骨骼的各约束点和目标骨骼的各约束点之间的对应关系,得到对目标骨骼的各约束点的位置产生约束的第二约束条件。In this step, on the basis of obtaining the first constraint condition in the above step 102, using the pre-defined correspondence between each constraint point of the source bone and each constraint point of the target bone, obtain the position generation of each constraint point of the target bone. The second constraint of the constraint.
本公开实施例中,在存在上述自身约束,或存在上述环境约束,或者同时存在上述自身约束和环境约束的情况下均可以构建含有蒙皮信息的第二约束条件。In the embodiment of the present disclosure, the second constraint condition containing the skin information can be constructed under the condition that the above-mentioned self-constraint, the above-mentioned environment constraint exists, or both the above-mentioned self-constraint and the environment-constraint exist.
示例性地,在将源骨骼手部的关键蒙皮点及膝盖的关键蒙皮点作为源骨骼的约束点时,相应地,目标骨骼手部的关键蒙皮点及膝盖的关键蒙皮点即为目标骨骼的约束点;当第一约束条件为源骨骼的手部的关键蒙皮点的位置与源骨骼的膝盖的关键蒙皮点位置相同时,根据源骨骼的约束点与目标骨骼的约束点之间的对应关系可知,此时,在重定向过程中对目标骨骼的手部的关键蒙皮点的位置与目标骨骼的膝盖的关键蒙皮点位置的约束应为:目标骨骼的手部的关键蒙皮点的位置与目标骨骼的膝盖的关键蒙皮点位置相同,即第二约束条件为目标骨骼的手部的关键蒙皮点的位置与目标骨骼的膝盖的关键蒙皮点位置相同。Exemplarily, when the key skin points of the hand of the source bone and the key skin points of the knee are used as the constraint points of the source bone, correspondingly, the key skin points of the hand and the knee of the target bone are is the constraint point of the target bone; when the first constraint condition is that the position of the key skin point of the hand of the source bone is the same as the position of the key skin point of the knee of the source bone, according to the constraint point of the source bone and the constraint of the target bone The correspondence between the points can be seen, at this time, in the redirection process, the position of the key skin point of the target bone's hand and the position of the key skin point of the target bone's knee should be constrained as follows: the hand of the target bone The position of the key skin point of the target bone is the same as that of the knee of the target bone, that is, the second constraint condition is that the position of the key skin point of the target bone's hand is the same as that of the knee of the target bone. .
步骤104、根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态;其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。Step 104: According to the first position and the second position, obtain the second bone pose of the target bone that satisfies the second constraint condition; wherein, the first position is the position of the first bone when there is no second constraint condition. The pose is mapped to the target bone, and the obtained position of the constraint point of the target bone; the second position is based on the correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone, and the first A bone pose, the determined position of the constraint point of the target bone.
该步骤中,在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,此时目标骨骼的骨骼姿态下的约束点位置,即为第一位置;第一位置与目标骨骼约束点所需到达的目标位置(即第二位置)可能存在差异,利用第二约束条件对此时目标骨骼的骨骼姿态进行约束,从而得到满足第二约束条件的第二骨骼姿态。In this step, when there is no second constraint condition, the first bone posture is mapped to the target bone, and the position of the constraint point under the bone posture of the target bone at this time is the first position; the first position and the target bone constraint point There may be differences in the target position (ie, the second position) to be reached, and the skeleton pose of the target bone at this time is constrained by the second constraint condition, so as to obtain a second skeleton pose that satisfies the second constraint condition.
考虑到在运动重定向之后,最终得到的动画是需要加入蒙皮效果的,相关技术中,仅利用骨骼数据进行运动重定向,会出现抖动及整体动作的僵硬、不自然等现象,例如,一个体型胖的人和一个体型瘦的人可能骨骼是完全一致的,即源骨骼与目标骨骼完全一致,但是两者的蒙皮信息存在差异,此时,若直接将体型胖的人触摸头部的动作传递给体型瘦的人,则最后输出的动画 可能显示该体型瘦的人并未触摸到自己的头部;因此,需要利用额外的信息来辅助骨骼动画处理重定向中遇到的上述蒙皮问题。该步骤中,在运动重定向时将源骨骼的动画数据传递到目标骨骼的过程中,根据目标骨骼的约束点的第一位置、目标骨骼的约束点的第二位置,并利用上述第二约束条件对目标骨骼的第二骨骼姿态进行约束,从而得到目标骨骼的动画数据。其中,目标骨骼的约束点包括目标骨骼的蒙皮点,这样,在运动重定向过程中,不仅利用了骨骼数据,还利用了蒙皮信息进行约束,能够有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时,后期无需大量美术人力修复数据,有效提高了动画制作效率。另外,通过运动重定向可以将已有的源骨骼的动画数据传递到完全不同的目标骨骼上,增加了数据的复用,进一步提高了动画制作的效率。Considering that after motion redirection, the final animation needs to be added with skinning effects. In the related art, only using bone data for motion redirection will cause jitter and overall motion stiffness and unnaturalness. For example, a A fat person and a thin person may have exactly the same bones, that is, the source bone is exactly the same as the target bone, but the skinning information of the two is different. At this time, if the fat person directly touches the head If the motion is passed to a skinny person, the final output animation may show that the skinny person is not touching his head; therefore, additional information is needed to assist the skeletal animation to handle the above-mentioned skinning encountered in redirection question. In this step, in the process of transferring the animation data of the source bone to the target bone during the motion redirection, according to the first position of the constraint point of the target bone and the second position of the constraint point of the target bone, and using the above-mentioned second constraint The condition constrains the pose of the second bone of the target bone, so as to obtain the animation data of the target bone. Among them, the constraint point of the target bone includes the skin point of the target bone. In this way, in the process of motion redirection, not only the bone data but also the skin information is used for constraint, which can effectively avoid the possible jitter of motion redirection. and the stiffness and unnaturalness of the overall movement; at the same time, there is no need for a lot of art manpower to repair the data in the later stage, which effectively improves the efficiency of animation production. In addition, through motion redirection, the animation data of the existing source bones can be transferred to completely different target bones, which increases the reuse of data and further improves the efficiency of animation production.
目标骨骼的第二骨骼姿态为将源骨骼的第一骨骼姿态进行运动重定向后所得到的满足第二约束条件的虚拟角色的动作姿态,该第二骨骼姿态可以通过目标骨骼的动画数据包含的旋转角度、平移距离等数据进行表示,其中,目标骨骼的动画数据为源骨骼的动画数据经过运动重定向得到的目标骨骼的动画数据,且目标骨骼的动画数据的风格可以与源骨骼的动画数据的风格保持一致或相似。目标骨骼的动画数据可以为动画的标准格式文件,例如amc(CMU标准格式),FBX或者sps(Xmov标准格式)。The second bone pose of the target bone is the action pose of the virtual character that satisfies the second constraint condition obtained by reorienting the first bone pose of the source bone, and the second bone pose can be included in the animation data of the target bone. The rotation angle, translation distance and other data are represented. The animation data of the target bone is the animation data of the target bone obtained by the animation data of the source bone through motion redirection, and the style of the animation data of the target bone can be the same as the animation data of the source bone. style is consistent or similar. The animation data of the target bone can be a standard format file of animation, such as amc (CMU standard format), FBX or sps (Xmov standard format).
在一种可能的实现方式中,所述第二约束条件可以包括:所述目标骨骼的约束点在所述第二骨骼姿态下的位置和所述第二位置相同。In a possible implementation manner, the second constraint condition may include: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
其中,目标骨骼的约束点在第二骨骼姿态下的位置可以根据目标骨骼的约束点的权重信息、第二骨骼姿态下目标骨骼的约束点在目标骨骼上的局部坐标及目标骨骼局部坐标系到世界坐标系的变换矩阵确定。其中,在目标骨骼的约束点包括目标骨骼的关键蒙皮点时,可以确定关键蒙皮点的在第二骨骼姿态下的位置,可以利用下述公式(1)确定源骨骼或者目标骨骼的某一约束点在某一骨骼姿态下的位置,例如,可以利用下述公式(1)确定目标骨骼的某一约束点在第二骨骼姿态下的位置;Wherein, the position of the constraint point of the target bone in the second bone posture can be based on the weight information of the constraint point of the target bone, the local coordinates of the constraint point of the target bone on the target bone in the second bone posture, and the local coordinate system of the target bone to The transformation matrix of the world coordinate system is determined. Wherein, when the constraint point of the target bone includes the key skin point of the target bone, the position of the key skin point in the second bone pose can be determined, and the following formula (1) can be used to determine the source bone or a certain point of the target bone. The position of a constraint point under a certain bone pose, for example, the following formula (1) can be used to determine the position of a certain constraint point of the target bone under the second bone pose;
Figure PCTCN2021138407-appb-000001
Figure PCTCN2021138407-appb-000001
式中,S(q)表示在目标骨骼的第二骨骼姿态为q时目标骨骼的约束点(关键蒙皮点)的位置,n表示目标骨骼中所包含的与目标骨骼的该约束点(关键蒙皮点)相关联的骨骼根数,h是相关联的骨骼的序号;W h表示目标骨骼的该约束点(关键蒙皮点)受到骨骼h控制的权重;L h表示在第二骨骼姿态为q时,目标骨骼的该约束点(关键蒙皮点)在第h根骨骼上的局部坐标,M h表示第h根骨骼的局部坐标系到世界坐标系的变换矩阵。 In the formula, S(q) represents the position of the constraint point (key skin point) of the target bone when the second bone pose of the target bone is q, and n represents the constraint point (key skin point) contained in the target bone and the target bone. The number of bones associated with the skin point), h is the serial number of the associated bone; W h represents the weight of the constraint point (key skin point) of the target bone controlled by the bone h; L h represents the pose of the second bone When q is the local coordinate of the constraint point (key skinning point) of the target bone on the hth bone, M h represents the transformation matrix from the local coordinate system of the hth bone to the world coordinate system.
示例性地,在上述源骨骼第一骨骼姿态为手摸膝盖的动作姿态时,目标骨骼的约束点包括目标骨骼手部的关键蒙皮点及膝盖的关键蒙皮点,手部的关键蒙皮点及膝盖的关键蒙皮点受到目标骨骼中多根骨骼的控制,根据这些根骨骼的控制权重、手部的关键蒙皮点、膝盖的关键蒙皮点在各根骨骼上的局部坐标及各根骨骼的局部坐标系到世界坐标系的变换矩阵,即可得到目标骨骼的第二骨骼姿态为q时目标骨骼的手部的关键蒙皮点及膝盖的关键蒙皮点在世界坐标系中的位置。Exemplarily, when the first bone pose of the source bone is an action pose of hand touching the knee, the constraint points of the target bone include the key skin points of the hand and the key skin points of the knee of the target bone, and the key skin points of the hand. The key skin points of the point and knee are controlled by multiple bones in the target bone. According to the control weights of these root bones, the key skin points of the hand, and the local coordinates of the key skin points of the knee on each bone and each The transformation matrix from the local coordinate system of the root bone to the world coordinate system can obtain the key skin points of the hand and knee of the target bone when the second bone pose of the target bone is q in the world coordinate system. Location.
目标骨骼的约束点的第二位置是根据上述预设的源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及第一骨骼姿态所确定的目标骨骼的约束点位置。由于目标骨骼的约束点与源骨骼的约束点之间存在对应关系,在将源骨骼的动画数据传递到目标骨骼的过程中,将第一骨骼姿态下源骨骼的约束点的位置,通过该对应关系可以映射得到目标骨骼的约束点的第二位置,该第二位置即为运动重定向的过程中目标骨骼的约束点期望到达的目标位置。The second position of the constraint point of the target bone is the constraint point of the target bone determined according to the preset correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone, and the posture of the first bone Location. Since there is a correspondence between the constraint point of the target bone and the constraint point of the source bone, in the process of transferring the animation data of the source bone to the target bone, the position of the constraint point of the source bone under the first bone pose is determined by the corresponding relationship. The relationship can be mapped to obtain the second position of the constraint point of the target bone, and the second position is the target position expected to be reached by the constraint point of the target bone in the process of motion redirection.
示例性地,在源骨骼第一骨骼姿态为手摸膝盖的动作姿态时,目标骨骼的约束点包括目标骨骼手部的关键蒙皮点及膝盖的关键蒙皮点,此时,根据源骨骼的手部的关键蒙皮点及膝盖的关键蒙皮点所在的位置,结合目标骨骼的约束点与源骨骼的约束点之间的对应关系,可知目标骨骼的关键蒙皮点的第二位置,即目标骨骼的膝盖的关键蒙皮点期望到达的目标位置及手部的关 键蒙皮点期望到达的目标位置。Exemplarily, when the first bone pose of the source bone is the action pose of hand touching the knee, the constraint points of the target bone include the key skin points of the hand and the key skin points of the knee of the target bone. The position of the key skin point of the hand and the key skin point of the knee, combined with the corresponding relationship between the constraint point of the target bone and the constraint point of the source bone, can know the second position of the key skin point of the target bone, that is The expected target position of the key skin points of the knee of the target bone and the expected target position of the key skin points of the hand.
可以根据上述目标骨骼的约束点的在第二骨骼姿态下的位置和第二位置确定约束函数,并将第二约束条件表示为该约束函数的值最小,可以理解的是,该约束函数的值最小即可表示目标骨骼的约束点的在第二骨骼姿态下的位置和第二位置相同;通过该约束条件对运动重定向过程中的目标骨骼的骨骼姿态进行约束,从而得到满足第二约束条件的目标骨骼的第二骨骼姿态。示例性地,如下述公式(2)所示,The constraint function can be determined according to the position and the second position of the constraint point of the target bone in the second bone pose, and the second constraint condition is expressed as the minimum value of the constraint function. It can be understood that the value of the constraint function is The smallest can indicate that the position of the constraint point of the target bone under the second bone pose is the same as the second position; through the constraint condition, the bone posture of the target bone in the process of motion redirection is constrained, so that the second constraint condition is satisfied. The second bone pose of the target bone. Exemplarily, as shown in the following formula (2),
Figure PCTCN2021138407-appb-000002
Figure PCTCN2021138407-appb-000002
式中,S(q)表示在目标骨骼的第二骨骼姿态为q时目标骨骼的第j个约束点的位置,其中,约束点包括关键蒙皮点,m表示目标骨骼的约束点(关键蒙皮点)的个数,c j表示目标骨骼的第j个约束点(关键蒙皮点)的第二位置。通过该公式(2),基于在第二骨骼姿态为q下目标骨骼的各约束点的位置与目标骨骼的该约束点的第二位置相差尽量小,优化得到最终的目标骨骼的第二骨骼姿态。 In the formula, S(q) represents the position of the jth constraint point of the target bone when the second bone pose of the target bone is q, where the constraint point includes the key skin point, and m represents the constraint point of the target bone (the key mask). The number of skin points), c j represents the second position of the jth constraint point (key skin point) of the target bone. According to the formula (2), based on the position of each constraint point of the target bone and the second position of the constraint point of the target bone, the difference between the position of each constraint point of the target bone and the second position of the constraint point of the target bone is as small as possible when the second bone posture is q, and the second bone posture of the final target bone is obtained by optimization. .
本公开实施例中,不仅利用了骨骼数据并且有效利用了蒙皮信息建立了约束条件,从而对运动重定向过程进行更加完善的约束。相关技术中,在运动重定向过程中只有骨骼数据,在针对人体运动中身体部位约束时,缺少了很多约束信息,例如手摸膝盖这类动作的时候,手部和膝盖会存在一个约束关系,而这种约束关系在骨骼数据中是难以体现的,再例如脚部的运动中,骨骼数据脚部只有两根骨骼来控制,但是骨骼数据无法知道究竟蒙皮的效果如何,往往出现脚部不平或者走路过程中脚掌和脚尖约束的切换不自然的现象;即仅通过骨骼数据,难以在运动重定向过程中建立有效的约束关系,无法达到满意的效果。本实施例中可以通过手部、脚部等关键蒙皮点作为约束点,并构建第一约束条件和第二约束条件,进而利用上述目标骨骼的约束点第一位置和第二位置,得到满足第二约束条件的目标骨骼的第二骨骼姿态,在目标骨骼的该第二骨骼姿态下的手部、脚部等关键蒙皮点的位置与源骨骼 的第一骨骼姿态下的相应关键蒙皮点的位置对应,从而通过该第二骨骼姿态可以更加真实自然的表达虚拟角色的动作。In the embodiment of the present disclosure, not only the skeleton data but also the skin information is used effectively to establish the constraint conditions, so as to carry out more perfect constraints on the motion redirection process. In the related art, there is only bone data in the process of motion retargeting. When constraining body parts in human motion, a lot of constraint information is missing. For example, when the hand touches the knee, there will be a constraint relationship between the hand and the knee. This kind of constraint relationship is difficult to reflect in the skeleton data. For example, in the movement of the foot, the skeleton data has only two bones to control the foot, but the skeleton data cannot know the effect of the skinning, and the feet are often uneven. Or the switching of the constraints of the soles of the feet and the toes during walking is unnatural; that is, it is difficult to establish an effective constraint relationship in the process of motion redirection only through bone data, and a satisfactory effect cannot be achieved. In this embodiment, key skin points such as hands and feet can be used as constraint points, and a first constraint condition and a second constraint condition can be constructed, and then the first position and the second position of the constraint point of the target bone can be used to satisfy the The second bone pose of the target bone of the second constraint condition, the positions of key skin points such as hands and feet under the second bone pose of the target bone and the corresponding key skin points under the first bone pose of the source bone The positions of the points correspond to each other, so that the action of the virtual character can be expressed more realistically and naturally through the second skeletal pose.
进一步地,还可以将运动重定向中约束问题描述为下述公式(3)所示的优化形式:Further, the constraint problem in motion redirection can also be described as the optimization form shown in the following formula (3):
Figure PCTCN2021138407-appb-000003
Figure PCTCN2021138407-appb-000003
式中,q表示目标骨骼的第二骨骼姿态、q`表示在无约束的情况下所得到的目标骨骼的骨骼姿态(即不进行约束直接将源骨骼的动画数据传递得到目标骨骼),FK(q)表示目标骨骼的第二骨骼姿态为q时约束点(骨骼点)的坐标信息,其中,约束点包括骨骼点,c i表示目标骨骼的第i个关节点(骨骼点)对应的需要到达的指定位置,k表示目标骨骼中关节点(骨骼点)的个数。 In the formula, q represents the second bone pose of the target bone, q` represents the bone pose of the target bone obtained without constraints (that is, directly transfer the animation data of the source bone without constraints to obtain the target bone), FK ( q) Represents the coordinate information of the constraint point (bone point) when the second bone pose of the target bone is q, wherein the constraint point includes the bone point, and c i represents the ith joint point (bone point) of the target bone corresponding to the need to reach The specified position of , k represents the number of joint points (bone points) in the target bone.
示例性地,可以将上述公式(2)与上述公式(3)结合得到更加全面的优化公式,从而对运动重定向过程中目标骨骼的骨骼姿态进行优化,优化公式如下述公式(4)所示:Exemplarily, the above formula (2) can be combined with the above formula (3) to obtain a more comprehensive optimization formula, so as to optimize the skeletal posture of the target bone during the motion redirection process, and the optimization formula is shown in the following formula (4) :
Figure PCTCN2021138407-appb-000004
Figure PCTCN2021138407-appb-000004
式中,q表示目标骨骼的第二骨骼姿态、q`表示在无约束的情况下所得到的目标骨骼的骨骼姿态,FK(q)表示目标骨骼的第二骨骼姿态为q时约束点(关键骨骼点)的信息,c i表示目标骨骼的第i个关节点(关键骨骼点)对应的需要到达的指定位置,k表示目标骨骼中关节点(关键骨骼点)的个数;m表示目标骨骼的约束点(关键蒙皮点)的个数,S(q)表示在目标骨骼的第二骨骼姿态为q时目标骨骼的第j个约束点(关键蒙皮点)的位置,c j表示表示目标骨骼的第j个约束点(关键蒙皮点)的第二位置,w 1、w 2、w 3均为权值系数。 In the formula, q represents the second bone pose of the target bone, q` represents the bone pose of the target bone obtained without constraints, and FK(q) represents the constraint point when the second bone pose of the target bone is q (the key Bone point) information, c i represents the specified position corresponding to the ith joint point (key bone point) of the target bone that needs to be reached, k represents the number of joint points (key bone points) in the target bone; m represents the target bone The number of constraint points (key skinning points) of the The second position of the jth constraint point (key skin point) of the target bone, w 1 , w 2 , and w 3 are all weight coefficients.
其中,FK(q)可以表达目标骨骼的约束点(关键骨骼点)坐标信息,S(q)可以表达目标骨骼的约束点(关键蒙皮点)信息,c i与c j分别表征对骨骼信息 的位置约束和蒙皮信息的位置约束,且权值系数w 1、w 2、w 3的具体数值可以根据实际需要进行调整,这样,在运动重定向过程中,有效信息不再只有骨骼的旋转角度等信息,蒙皮点的位置成为一个重要的附加约束;同时利用骨骼运动信息及蒙皮信息进行约束,可以有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时提高了动画制作效率。 Among them, FK(q) can express the coordinate information of the constraint point (key bone point) of the target bone, S(q) can express the constraint point (key skin point) information of the target bone, and c i and c j respectively represent the pair of bone information The position constraints and the position constraints of the skin information, and the specific values of the weight coefficients w 1 , w 2 , and w 3 can be adjusted according to actual needs, so that in the process of motion redirection, the valid information is no longer only the rotation of the bones. Angle and other information, the position of the skin point becomes an important additional constraint; at the same time, the use of bone motion information and skin information for constraints can effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall action; At the same time, the animation production efficiency is improved.
进一步地,在运动重定向的过程中,还存在下述环境约束,比如走路时候,脚和地面是一种环境约束,做引体向上时,手部和单杠是一种环境约束,甚至于两个人之间相互拥抱,也是一种环境约束(此时环境指拥抱的对象)。因此,为了达到更加理想的效果,需要考虑环境产生的各种约束的切换,以及源骨骼所在的真实环境和目标骨骼所在的虚拟环境之间的空间差异。Further, in the process of motion redirection, there are also the following environmental constraints. For example, when walking, the feet and the ground are an environmental constraint. When doing pull-ups, the hands and the horizontal bar are an environmental constraint. Embracing each other between individuals is also an environmental constraint (in this case, the environment refers to the object of the hug). Therefore, in order to achieve a more ideal effect, it is necessary to consider the switching of various constraints generated by the environment, as well as the spatial difference between the real environment where the source bones are located and the virtual environment where the target bones are located.
在一种可能的实现方式中,所述方法还包括:通过预测模型对目标骨骼的第二骨骼姿态序列、源骨骼的约束点的运动序列、以及当前帧的目标骨骼的约束点进行处理,得到下一帧的目标骨骼的约束点;其中,所述源骨骼的约束点的运动序列由源骨骼不同约束点的位置确定。In a possible implementation manner, the method further includes: processing the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the constraint point of the target bone of the current frame by using the prediction model, to obtain The constraint point of the target bone in the next frame; wherein, the motion sequence of the constraint point of the source bone is determined by the positions of different constraint points of the source bone.
示例性地,源骨骼的约束点的运动序列由源骨骼的关键蒙皮点的位置与关键网格点的位置,或源骨骼的关键蒙皮点的位置与关键骨骼点的位置,或源骨骼的关键蒙皮点的位置与其他关键蒙皮点的位置确定。例如,关键网格点可以包括:人走路的地面、人接触的桌椅、单杠等等物体的网格点,其他关键蒙皮点可以包括:与源骨骼相关联的其他人物的骨骼的关键蒙皮点。Illustratively, the motion sequence of the constraint points of the source bone consists of the position of the key skin point of the source bone and the position of the key mesh point, or the position of the key skin point of the source bone and the position of the key bone point, or the position of the key skin point of the source bone and the position of the key bone point. The position of the key skin point is determined with the position of other key skin points. For example, key mesh points may include: the ground on which people walk, tables and chairs that people touch, horizontal bars, etc., and other key skin points may include: key skin points of bones of other characters associated with the source bone skin point.
其中,预测模型为通过目标骨骼的第二姿态序列、源骨骼的约束点的运动序列、以及当前帧的目标骨骼的约束点位置作为输入,并以下一帧的目标骨骼的约束点作为预测结果进行训练,并训练达到收敛的算法模型。目标骨骼的第二骨骼姿态序列为一定时间窗口内通过运动重定向得到的目标骨骼的第二骨骼姿态组成的序列;源骨骼的约束点的运动序列为源骨骼的各第一骨骼姿态对应的源骨骼的不同约束点组成的序列。源骨骼的约束点与上述运动序列中关键网格点、关键骨骼点或其他关键蒙皮点的位置相关,在源骨骼的一段运动中,根据源骨骼的约束点与关键网格点、关键骨骼点或其他关键 蒙皮点的位置即可确定源骨骼的约束点,例如,根据关键信息点与关键网格点、关键骨骼点、或其他关键蒙皮点的位置,将该关键信息点确定为源骨骼的约束点,从而确定源骨骼的约束点的运动序列。示例性地,一段源骨骼的动画数据包括50帧,目标骨骼的第二骨骼姿态序列可以包括前30帧源骨骼的动画数据运动重定向后得到的目标骨骼的第二骨骼姿态,源骨骼的约束点的运动序列可以包括50帧的源骨骼的第一骨骼姿态下源骨骼的约束点,通过该30帧目标骨骼的第二骨骼姿态、50帧的源骨骼的约束点及第30帧中目标骨骼的约束点,确定当前第31帧数据中目标骨骼的约束点;例如,如下述公式(5)所示:The prediction model uses the second pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the position of the constraint point of the target bone in the current frame as input, and uses the constraint point of the target bone in the next frame as the prediction result. Train, and train an algorithmic model that reaches convergence. The second bone pose sequence of the target bone is a sequence composed of the second bone poses of the target bone obtained through motion redirection within a certain time window; the motion sequence of the constraint points of the source bone is the source corresponding to each first bone pose of the source bone. A sequence of different constraint points for a bone. The constraint points of the source bones are related to the positions of key grid points, key bone points or other key skin points in the above motion sequence. The position of the point or other key skin point can determine the constraint point of the source bone. For example, according to the position of the key information point and the key grid point, key bone point, or other key skin point, the key information point is determined as The constraint points of the source bone, thereby determining the motion sequence of the constraint points of the source bone. Exemplarily, a piece of animation data of the source bone includes 50 frames, and the second bone pose sequence of the target bone may include the second bone pose of the target bone obtained after the animation data of the source bone in the first 30 frames of motion redirection, and the constraints of the source bone. The motion sequence of points can include the constraint points of the source bone in the first bone pose of the source bone in 50 frames, through the second bone pose of the target bone in the 30 frames, the constraint points of the source bone in the 50 frames, and the target bone in the 30th frame. to determine the constraint point of the target bone in the current 31st frame of data; for example, as shown in the following formula (5):
Figure PCTCN2021138407-appb-000005
Figure PCTCN2021138407-appb-000005
式中,F为训练好的神经网络预测模型,c`表示当前帧中目标骨骼的约束点,c *表示前一帧中目标骨骼的约束点,
Figure PCTCN2021138407-appb-000006
表示目标骨骼的第二骨骼姿态序列,
Figure PCTCN2021138407-appb-000007
表示源骨骼的约束点的运动序列。
In the formula, F is the trained neural network prediction model, c` represents the constraint point of the target bone in the current frame, c * represents the constraint point of the target bone in the previous frame,
Figure PCTCN2021138407-appb-000006
represents the second bone pose sequence of the target bone,
Figure PCTCN2021138407-appb-000007
A motion sequence representing the constraint points of the source bone.
本公开实施例中,在上述利用目标骨骼自身的蒙皮信息构建约束条件的基础上,通过环境中的其他关键信息点(即源骨骼所在空间中物体的关键网格点、源骨骼所在空间中其他骨骼的关键蒙皮点,其中,源骨骼所在空间中物体的关键网格点与目标骨骼所在空间中物体的关键网格点具有对应关系,源骨骼所在空间中其他骨骼的关键蒙皮点与目标骨骼所在空间中其他骨骼的关键蒙皮点具有对应关系),增加在重定向空间中的距离判定,距离判定是:把空间中的源骨骼和目标骨骼以及空间物体(有互动的物体)看做整体,他们之间的距离会成为约束判定的依据,即不仅仅考虑单个虚拟角色的目标骨骼,而是把整个目标骨骼所在的重定向空间当成一个整体,例如,对于整个运动重定向空间中的多个人物和多个环境内的物体,将这些人物和物体在重定向空间中事先标注出来(即标注出关键信息点),在运动重定向过程中作为一个整体,实时更新目标骨骼的约束点,从而对上述第二约束条件进行实时更新,这样,充分考虑了环境因素的影响,目标骨骼的约束点及通过该约束点所确定的第二约束条件随着环境的变化以及运动的变化实时更新的, 从而对源骨骼的动画数据传递到目标骨骼的过程进行动态约束。In the embodiment of the present disclosure, on the basis of constructing the constraints by using the skin information of the target bone itself, other key information points in the environment (that is, the key grid points of objects in the space where the source bones are located, the The key skinning points of other bones, where the key mesh points of the object in the space where the source bone is located have a corresponding relationship with the key mesh points of the object in the space where the target bone is located, and the key skinning points of other bones in the space where the source bone is located are the same as The key skin points of other bones in the space where the target bone is located have a corresponding relationship), and the distance judgment in the redirection space is added. The distance judgment is: look at the source and target bones in the space and space objects (objects with interaction) As a whole, the distance between them will become the basis for constraint determination, that is, not only the target bone of a single virtual character is considered, but the redirection space where the entire target bone is located is regarded as a whole. For example, for the entire motion redirection space multiple characters and objects in multiple environments, mark these characters and objects in the redirection space in advance (that is, mark key information points), and update the constraints of the target bones in real time as a whole during the motion redirection process In this way, the influence of environmental factors is fully considered, and the constraint point of the target bone and the second constraint determined by the constraint point change in real time with changes in the environment and motion Updated to dynamically constrain the transfer of animation data from the source bone to the target bone.
示例性地,将源骨骼的一段先跑步然后抓取单杠做引体向上然后落下的动作传递到目标骨骼,这段动作中跑步的时候是脚步和地面之间的约束,在抓取单杠做引体向上的过程中是手部和单杠的约束,最后落下又回到脚步和地面之间的约束,在这一整段动作过程中,地面和单杠作为环境因素,在运动重定向过程中将地面、单杠及源骨骼(目标骨骼)作为一个整体,关键信息点包括手部及脚部的关键蒙皮点,及地面和单杠上的与源骨骼上的关键蒙皮点存在接触的关键网格点,源骨骼的约束点与这些关键信息点有关;根据这一整体,即地面上的关键网格点、单杠的关键网格点、手部的关键蒙皮点、脚部的关键蒙皮点,从而可知源骨骼的约束点的运动序列,即脚部的关键蒙皮点先与地面上的关键网格点接触,然后手部的关键蒙皮点与单杠的关键网格点的接触,最后回到脚部的关键蒙皮点与地面上的关键网格点接触;假设已经对该整段动作完成了一部分运动重定向,得到了目标骨骼的第二骨骼姿态序列,根据源骨骼的约束点的运动序列、该目标骨骼的第二骨骼姿态序列及当前帧的目标骨骼的约束点,通过上述公式(5)即可得到下一帧的目标骨骼的约束点;在得到实时的目标骨骼的约束点后,可以参照上述公式(2)或公式(4),利用该实时的目标骨骼的约束点的更新第二约束条件,该第二约束条件包含蒙皮信息及环境信息,通过该第二约束条件对运动重定向过程中目标骨骼的第二骨骼姿态进行实时约束,从而使得在优化出的目标骨骼的第二骨骼姿态下目标骨骼的约束点的位置与第二位置相同。Exemplarily, a section of the source bone that runs first, then grabs the horizontal bar to do pull-ups and then falls is transferred to the target bone. In this action, the running is the constraint between the footsteps and the ground. During the upward movement of the body, the hand and the horizontal bar are constrained, and finally, when the body falls, it returns to the constraint between the footsteps and the ground. During this entire movement, the ground and the horizontal bar are used as environmental factors, and the ground is used in the process of motion redirection. , the horizontal bar and the source bone (target bone) as a whole, the key information points include the key skin points of the hands and feet, and the key mesh points on the ground and the horizontal bar that are in contact with the key skin points on the source bone , the constraint points of the source bones are related to these key information points; according to this whole, that is, the key mesh points on the ground, the key mesh points of the horizontal bar, the key skin points of the hands, and the key skin points of the feet, Therefore, the motion sequence of the constraint points of the source bones can be known, that is, the key skin points of the feet first contact the key mesh points on the ground, then the key skin points of the hand contact the key mesh points of the horizontal bar, and finally return. The key skin points to the feet are in contact with the key grid points on the ground; assuming that a part of the motion redirection has been completed for the entire action, the second bone pose sequence of the target bone is obtained, according to the constraint point of the source bone. The motion sequence, the second skeleton pose sequence of the target skeleton, and the constraint point of the target skeleton of the current frame, the constraint point of the target skeleton of the next frame can be obtained through the above formula (5); After that, you can refer to the above formula (2) or formula (4), and use the real-time update second constraint condition of the constraint point of the target bone, the second constraint condition includes skin information and environment information, through the second constraint condition The second bone pose of the target bone is constrained in real time during the motion redirection process, so that the position of the constraint point of the target bone under the optimized second bone pose of the target bone is the same as the second position.
这样,在运动重定向过程中,有效信息不再只有骨骼的旋转角度等运动信息,关键蒙皮点及关键网格点成为了一个重要的附加约束;同时利用骨骼运动信息及蒙皮信息进行约束,有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时提高了动画制作效率。In this way, in the process of motion redirection, the valid information is no longer only the motion information such as the rotation angle of the bones, and the key skin points and key grid points become an important additional constraint; at the same time, the bone motion information and skin information are used to constrain , effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall action; at the same time, it improves the efficiency of animation production.
图2示出根据本公开一实施例的一种运动重定向方法的流程图。如图2所示,该方法可以包括:FIG. 2 shows a flowchart of a motion redirection method according to an embodiment of the present disclosure. As shown in Figure 2, the method may include:
步骤200、在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨 骼; Step 200, between the source bone and the target bone, build one or more virtual bones;
在运动重定向过程中,源骨骼与目标骨骼一般存在三种本质上的差异,即:骨骼的数量差异、轴向差异、长短差异。其中,骨骼的数量差异会导致源骨骼与目标骨骼之间无法一对一的传递关节的空间旋转数据。骨骼的轴向指的是每一个骨骼的局部坐标系,轴向差异导致了源骨骼与目标骨骼之间的关节无法直接传递空间旋转数据。长短差异导致了将源骨骼的动画数据传递到目标骨骼上会出现错误的情况(例如脚步滑动等)。In the process of motion redirection, there are generally three essential differences between the source bone and the target bone, namely: the difference in the number of bones, the difference in the axial direction, and the difference in length. Among them, the difference in the number of bones makes it impossible to transfer the spatial rotation data of the joints one-to-one between the source bone and the target bone. The axis of the bone refers to the local coordinate system of each bone. The difference in the axial direction causes the joint between the source bone and the target bone to directly transmit spatial rotation data. The difference in length leads to errors in transferring animation data from the source bone to the target bone (eg foot sliding, etc.).
该步骤中,通过比较源骨骼和目标骨骼,搭建出一个或多个虚拟骨骼,通过虚拟骨骼桥接源骨骼与目标骨骼,将源骨骼与目标骨骼之间的差异通过该虚拟骨骼来传递,从而消除两种骨骼之间的轴向差异,示例性地,图3示出根据本公开一实施例的构建虚拟骨骼的示意图,如图3所示,虚拟骨骼中各骨骼的长度与相对应的源骨骼中各骨骼的长度相同,虚拟骨骼中各骨骼的轴向与相对应的目标骨骼中各骨骼的轴向相同。同时,虚拟骨骼的数量可以为多个,通过多个虚拟骨骼桥接源骨骼与目标骨骼,从而实现源骨骼到目标骨骼的平滑过渡,进一步优化了消除轴向差异的效果。另外,虚拟骨骼的数量可以与源骨骼、目标骨骼均不相同,虚拟骨骼的数量可以与上述预先定义的源骨骼与目标骨骼的对应关系中所选取的骨骼的数量相同,例如,源骨骼和目标骨骼各有100根骨骼,在上述关联配置选用了10根骨骼作为关键骨骼进行对应,并通过100根源骨骼和100根目标骨骼以及对应关系计算得出10根虚拟骨骼;再例如,源骨骼有100根骨骼,目标骨骼有10根骨骼,在上述语义关联选用了10根骨骼作为关键骨骼进行对应,并通过100根源骨骼和10根目标骨骼以及对应关系计算得出10根虚拟骨骼。从而有效解决骨骼的数量差异对运动重定向的上述影响,且提高了运算效率。In this step, one or more virtual bones are built by comparing the source bone and the target bone, the source bone and the target bone are bridged through the virtual bone, and the difference between the source bone and the target bone is transmitted through the virtual bone, thereby eliminating the need for Axial difference between two kinds of bones, exemplarily, FIG. 3 shows a schematic diagram of constructing a virtual bone according to an embodiment of the present disclosure. As shown in FIG. 3, the length of each bone in the virtual bone is related to the corresponding source bone The length of each bone in the virtual bone is the same, and the axial direction of each bone in the virtual bone is the same as the axial direction of each bone in the corresponding target bone. At the same time, the number of virtual bones can be multiple, and multiple virtual bones are used to bridge the source bone and the target bone, so as to achieve a smooth transition from the source bone to the target bone, and further optimize the effect of eliminating axial differences. In addition, the number of virtual bones may be different from the source bones and the target bones, and the number of virtual bones may be the same as the number of bones selected in the above-mentioned predefined correspondence between the source bones and the target bones, for example, the source bones and the target bones Each of the bones has 100 bones. In the above association configuration, 10 bones are selected as key bones for correspondence, and 10 virtual bones are calculated through 100 root bones and 100 target bones and their corresponding relationships; for example, the source bones have 100 The root bone and the target bone have 10 bones. In the above semantic association, 10 bones are selected as key bones for correspondence, and 10 virtual bones are calculated through 100 root bones and 10 target bones and their corresponding relationships. Therefore, the above-mentioned influence of the difference in the number of bones on the motion redirection is effectively solved, and the operation efficiency is improved.
在一种可能的实现方式中,该步骤可以包括:根据所述源骨骼、所述目标骨骼及预设的一个或多个参考姿态,得到源骨骼的一个或多个参考姿态及目标骨骼的一个或多个参考姿态;根据预设的源骨骼与目标骨骼的对应关系,在源骨骼与目标骨骼的同一参考姿态之间,搭建一个或多个虚拟骨骼。In a possible implementation manner, this step may include: obtaining one or more reference poses of the source skeleton and one of the target skeletons according to the source skeleton, the target skeleton and one or more preset reference poses or multiple reference poses; according to the preset correspondence between the source bones and the target bones, one or more virtual bones are built between the same reference poses of the source bones and the target bones.
相关技术中仅通过一个参考姿态来定义源骨骼与目标骨骼的风格关联关系,这会导致难以控制角色动作的风格,例如,在T-姿态的状态下源骨骼与目标骨骼的风格是相同的,但是在弯腰或者蹲下的时候,源骨骼与目标骨骼的风格相似度难以保证;因此,本公开实施例中,为了满足实际动画制作过程中对不同动画风格的需求,在构建虚拟骨骼时加入了多个参考姿态,利用多帧参考姿态来定义源骨骼与目标骨骼的风格关联关系,从而对角色最终的动画风格加以把控。例如,通过预设的一个或多个参考姿态,并结合源骨骼、目标骨骼及上述源骨骼与目标骨骼的对应关系,得到一个或多个参考姿态对应的虚拟骨骼,从而利用虚拟骨骼将所需要的风格从源骨骼过渡到目标骨骼。例如,参考姿态为站立姿态,源骨骼是一个站立姿态为正常站立的风格,但是希望目标骨骼的站立姿态是一个驼背的站立风格,则利用源骨骼与目标骨骼的对应关系,在正常站立的源骨骼与驼背站立的目标骨骼之间搭建该站立姿态的虚拟骨骼,该虚拟骨骼的站立姿态的风格为正常站立风格到驼背站立风格的过渡,从而利用该虚拟骨骼将源骨骼正常站立的风格过渡到目标骨骼的驼背站立的风格。In the related art, only one reference pose is used to define the style association between the source bone and the target bone, which makes it difficult to control the style of the character action. For example, in the state of T-pose, the styles of the source bone and the target bone are the same, However, when bending over or squatting, it is difficult to guarantee the style similarity between the source bone and the target bone. Therefore, in the embodiment of the present disclosure, in order to meet the requirements for different animation styles in the actual animation production process, the virtual bone is constructed by adding Multiple reference poses are used, and the multi-frame reference pose is used to define the style relationship between the source bone and the target bone, so as to control the final animation style of the character. For example, through one or more preset reference poses, and combining the source bone, the target bone, and the above-mentioned correspondence between the source bone and the target bone, one or more virtual bones corresponding to the reference poses are obtained, so as to use the virtual bones to The style transitions from the source bone to the target bone. For example, if the reference pose is standing, the source bone is a normal standing style, but the target bone is expected to be in a hunchbacked standing style, the corresponding relationship between the source bone and the target bone is used to make the normal standing source A virtual skeleton of the standing posture is built between the skeleton and the target bone of hunchbacked standing. The style of the virtual skeleton's standing posture is the transition from the normal standing style to the hunchbacked standing style, so that the virtual bone is used to transition the normal standing style of the source bone to the hunchbacked standing style. The hunchback standing style of the target skeleton.
在一种可能的实现方式中,所述参考姿态包括:T-姿态。在预设的一个或多个参考姿态中,基础的参考姿态为T-姿态(T-pose),即站立双手平举姿态,针对该T-姿态,根据上述源骨骼与目标骨骼的对应关系,及源骨骼所呈现的T-姿态和目标骨骼所呈现的T-姿态,在源骨骼与目标骨骼之间,搭建出T-姿态的虚拟骨骼,虚拟骨骼的T-姿态桥接了源骨骼与目标骨骼之间站立双手平举时的风格形态。In a possible implementation manner, the reference pose includes: a T-pose. Among the preset one or more reference poses, the basic reference pose is a T-pose (T-pose), that is, a standing posture with both hands raised. For this T-pose, according to the corresponding relationship between the source bone and the target bone, and the T-pose presented by the source bone and the T-pose presented by the target bone. Between the source bone and the target bone, a T-pose virtual bone is built, and the T-pose of the virtual bone bridges the source bone and the target bone. The stylistic form when standing between hands raised.
在一种可能的实现方式中,所述参考姿态还包括:蹲下、跨出一步、叉腰、弯腰以及双手举起中的至少一个姿态。In a possible implementation manner, the reference posture further includes at least one posture of squatting, taking a step, akimbo, bending over, and raising both hands.
上述利用源骨骼和目标骨骼,以及源骨骼与目标骨骼的对应关系,搭建的T-姿态虚拟骨骼,该T-姿态虚拟骨骼作为基础的虚拟骨骼,基本桥接了源骨骼与目标骨骼的轴向差异。为了将源骨骼与目标骨骼的不同的风格也通过虚拟骨骼转换过去,本公开实施例,在T-姿态虚拟骨骼的基础上,加入其它 的参考姿态,从而满足不同的风格需求。示例性地,参考姿态还可以包括其他5个不同的参考姿态:蹲下姿态、跨出一步姿态、叉腰姿态、弯腰姿态以及双手举起姿态。针对其中这5个参考姿态中的任一参考姿态,搭建该参考姿态的虚拟骨骼,从而利用该虚拟骨骼将源骨骼的该参考姿态下的风格过渡到目标骨骼的该参考姿态下的风格。需要说明的是,预设的参考姿态在具有T-姿态的基础上,可以根据不同的动画制作需求追加其他参考姿态,本公开实施例对参考姿态的数量不作限定。The above-mentioned T-pose virtual bone is constructed by using the source bone and target bone, as well as the corresponding relationship between the source bone and the target bone. The T-pose virtual bone is used as the basic virtual bone, which basically bridges the axial difference between the source bone and the target bone. . In order to convert the different styles of the source bone and the target bone through the virtual bone, in this embodiment of the present disclosure, on the basis of the T-pose virtual bone, other reference poses are added to meet different style requirements. Exemplarily, the reference postures may also include other 5 different reference postures: squatting posture, stepping posture, akimbo posture, bending posture, and raising hands posture. For any one of the five reference poses, a virtual skeleton of the reference pose is built, so as to use the virtual skeleton to transition the style of the source skeleton under the reference pose to the style of the target skeleton under the reference pose. It should be noted that the preset reference pose has a T- pose, and other reference poses can be added according to different animation production requirements, and the number of reference poses is not limited in this embodiment of the present disclosure.
步骤201、获取源骨骼的第一骨骼姿态和源骨骼的约束点;其中,约束点包括蒙皮点。Step 201: Acquire the first bone pose of the source bone and the constraint points of the source bone, wherein the constraint points include skin points.
该步骤与上述图1中的步骤101相同,在此不再赘述。This step is the same as step 101 in the above-mentioned FIG. 1 , and will not be repeated here.
步骤202、根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件。 Step 202 , constructing a first constraint condition according to the posture of the first bone and the constraint points of the source bone.
该步骤与上述图1中的步骤102相同,在此不再赘述。This step is the same as step 102 in the above-mentioned FIG. 1 , and will not be repeated here.
步骤203、根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件。Step 203: Obtain a second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition.
该步骤与上述图1中的步骤103相同,在此不再赘述。This step is the same as step 103 in the above-mentioned FIG. 1 , and will not be repeated here.
步骤204、根据所述第一骨骼姿态及所述虚拟骨骼,得到目标骨骼的第三骨骼姿态。Step 204: Obtain a third bone pose of the target bone according to the first bone pose and the virtual bone.
该步骤中,在源骨骼的第一骨骼姿态的基础上,得到一个或多个虚拟骨骼,然后将一个或多个虚拟骨骼融合,得到目标骨骼的第三骨骼姿态,从而可以将源骨骼的风格映射到目标骨骼;该第三骨骼姿态为未进行约束所得到的目标骨骼的姿态。In this step, on the basis of the first bone pose of the source bone, one or more virtual bones are obtained, and then one or more virtual bones are fused to obtain the third bone pose of the target bone, so that the style of the source bone can be combined Mapped to the target bone; the pose of the third bone is the pose of the target bone obtained without constraints.
示例性地,根据第一骨骼姿态及上述构建的与该第一骨骼姿态对应的一个或多个虚拟骨骼,通过融合计算得到目标骨骼的第三骨骼姿态。Exemplarily, according to the first bone pose and one or more virtual bones constructed above and corresponding to the first bone pose, the third bone pose of the target bone is obtained through fusion calculation.
步骤205、根据第三位置和所述第二位置,得到满足所述第二约束条件的第二骨骼姿态;其中,所述第三位置是目标骨骼的约束点在所述第三骨骼姿态下的位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之 间的对应关系、源骨骼的约束点位置、以及第一骨骼姿态,确定的所述目标骨骼的约束点位置。Step 205: According to the third position and the second position, obtain a second bone pose that satisfies the second constraint condition; wherein, the third position is the constraint point of the target bone under the third bone pose. position; the second position is the position of the constraint point of the target bone determined according to the correspondence between the constraint point of the source bone and the constraint point of the target bone, the position of the constraint point of the source bone, and the posture of the first bone.
该步骤中,目标骨骼的约束点在所述第三骨骼姿态下的位置,即第三位置,可能与目标骨骼约束点所需到达的目标位置(即第二位置)可能存在差异,在上述根据虚拟骨骼得到目标骨骼的第三骨骼姿态的基础上,加入第二约束条件对目标骨骼的骨骼姿态进行约束,从而得到更加生动真实的目标骨骼第二骨骼姿态,使得运动重定向的动作更精确。In this step, the position of the constraint point of the target bone under the posture of the third bone, that is, the third position, may be different from the target position that the constraint point of the target bone needs to reach (that is, the second position). On the basis of obtaining the third bone pose of the target bone from the virtual bone, a second constraint is added to constrain the bone pose of the target bone, so as to obtain a more vivid and realistic second bone pose of the target bone, making the motion redirection action more accurate.
在该步骤中,通过上述构建的一个或多个虚拟骨骼将源骨骼的动画数据传递到目标骨骼,即将源骨骼的第一骨骼姿态,通过该虚拟骨骼,映射到目标骨骼的第三骨骼姿态;虚拟骨骼通过桥接源骨骼与目标骨骼,消除了源骨骼与目标骨骼之间的数量及轴向差异,从而保证动画数据可以有效地从源骨骼传递到目标骨骼上;进一步地,由于具有多个不同的参考姿态,源骨骼与目标骨骼的不同的姿态风格也通过虚拟骨骼转换过去。同时,通过上述图1中的第二约束条件对运动重定向过程中所得到的目标骨骼的第三骨骼姿态进行约束,从而得到目标骨骼的第二骨骼姿态,这样,有效利用了蒙皮信息进行约束,能够更加有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象,进一步提高了动画制作的效率,避免了大量人力工作。In this step, the animation data of the source bone is transferred to the target bone through one or more virtual bones constructed above, that is, the first bone pose of the source bone is mapped to the third bone pose of the target bone through the virtual bone; By bridging the source bone and the target bone, the virtual bone eliminates the quantitative and axial differences between the source bone and the target bone, thus ensuring that the animation data can be effectively transferred from the source bone to the target bone; The reference pose of the source skeleton and the target skeleton's different pose styles are also converted through the virtual skeleton. At the same time, the third bone pose of the target bone obtained during the motion redirection process is constrained by the second constraint condition in FIG. 1, so as to obtain the second bone pose of the target bone. In this way, the skin information is effectively used to carry out Constraints can more effectively avoid the jitter that may occur in motion redirection and the stiffness and unnaturalness of the overall movement, which further improves the efficiency of animation production and avoids a lot of manual work.
需要说明的是,尽管以上述实施例作为示例介绍了运动重定向方法如上,但本领域技术人员能够理解,本公开应不限于此。事实上,用户完全可根据个人喜好和/或实际应用场景灵活设定各实施方式,只要符合本公开的技术方案即可。It should be noted that, although the motion redirection method is described above by taking the above embodiment as an example, those skilled in the art can understand that the present disclosure should not be limited thereto. In fact, the user can flexibly set each implementation manner according to personal preferences and/or actual application scenarios, as long as it conforms to the technical solutions of the present disclosure.
这样,本公开实施例中,通过获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述 目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。这样,在运动重定向的过程中加入了蒙皮信息进行约束,能够有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时,后期无需大量美术人力修复数据,有效提高了动画制作效率。In this way, in this embodiment of the present disclosure, by acquiring the first bone pose of the source bone and the constraint points of the source bone, the constraint points include skin points; according to the first bone pose and the constraint points of the source bone, a first Constraint condition; according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; according to the first position and the second position, the second constraint condition is obtained. The second bone pose of the target bone with the constraint condition, wherein the first position is the position of the constraint point of the target bone obtained by mapping the first bone pose to the target bone without the second constraint condition; The second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone. In this way, the skin information is added for constraints in the process of motion redirection, which can effectively avoid the possible jitter of motion redirection and the stiffness and unnaturalness of the overall action. Improved animation production efficiency.
图4示出根据本公开一实施例的一种运动重定向装置的结构图,如图4所示,该装置包括:获取模块301,用于获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;第一约束条件构建模块302,用于根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;第二约束条件构建模块303,用于根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;运动重定向模块304,用于根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。FIG. 4 shows a structural diagram of a motion redirection apparatus according to an embodiment of the present disclosure. As shown in FIG. 4 , the apparatus includes: an acquisition module 301 for acquiring a first bone pose of a source bone and constraints of the source bone point, the constraint points include skin points; the first constraint construction module 302 is used to construct the first constraint according to the first bone pose and the constraint points of the source bone; the second constraint construction module 303 is used to construct the first constraint to obtain the second constraint condition according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition; the motion redirection module 304 is used for, according to the first position and the second position, obtaining the second bone pose of the target bone that satisfies the second constraint condition, wherein the first position is the target bone obtained by mapping the first bone pose to the target bone when there is no second constraint condition The second position is the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone point location.
在一种可能的实现方式中,所述装置还包括:虚拟骨骼搭建模块,用于:在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨骼;根据所述第一骨骼姿态及所述虚拟骨骼,得到目标骨骼的第三骨骼姿态;根据第三位置和所述第二位置,得到满足所述第二约束条件的第二骨骼姿态;其中,所述第三位置是目标骨骼的约束点在所述第三骨骼姿态下的位置。In a possible implementation manner, the apparatus further includes: a virtual bone building module, configured to: build one or more virtual bones between the source bone and the target bone; according to the first bone posture and the virtual bone to obtain the third bone posture of the target bone; according to the third position and the second position, obtain the second bone posture that satisfies the second constraint condition; wherein, the third position is the target The position of the constraint point of the bone in the third bone pose.
在一种可能的实现方式中,所述第二约束条件包括:所述目标骨骼的约束点在所述第二骨骼姿态下的位置和所述第二位置相同。In a possible implementation manner, the second constraint condition includes: the position of the constraint point of the target bone under the second bone pose is the same as the second position.
在一种可能的实现方式中,所述目标骨骼的约束点在所述第二骨骼姿态下的位置,根据目标骨骼的约束点的权重信息、第二骨骼姿态下目标骨骼的约束点在目标骨骼上的局部坐标及目标骨骼局部坐标系到世界坐标系的变 换矩阵确定。In a possible implementation manner, the position of the constraint point of the target bone under the second bone posture is based on the weight information of the constraint point of the target bone, the constraint point of the target bone in the second bone posture is in the target bone The local coordinates on and the transformation matrix from the local coordinate system of the target bone to the world coordinate system are determined.
在一种可能的实现方式中,所述装置还包括:约束点位置预测模块,用于通过预测模型对目标骨骼的第二骨骼姿态序列、源骨骼的约束点的运动序列、以及当前帧的目标骨骼的约束点进行处理,得到下一帧的目标骨骼的约束点;其中,所述源骨骼的约束点的运动序列由源骨骼的不同约束点的位置确定。In a possible implementation manner, the apparatus further includes: a constraint point position prediction module, configured to predict the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the target of the current frame by using the prediction model The constraint points of the bones are processed to obtain the constraint points of the target bone in the next frame; wherein, the motion sequence of the constraint points of the source bone is determined by the positions of different constraint points of the source bone.
在一种可能的实现方式中,所述约束点还包括:网格点和/或骨骼点。In a possible implementation manner, the constraint points further include: mesh points and/or skeleton points.
在一种可能的实现方式中,所述虚拟骨骼搭建模块,还用于:根据所述源骨骼、所述目标骨骼及预设的一个或多个参考姿态,得到源骨骼的一个或多个参考姿态及目标骨骼的一个或多个参考姿态;根据预设的源骨骼与目标骨骼的对应关系,在源骨骼与目标骨骼的同一参考姿态之间,搭建一个或多个虚拟骨骼。In a possible implementation manner, the virtual skeleton building module is further configured to: obtain one or more references of the source skeleton according to the source skeleton, the target skeleton and one or more preset reference poses The pose and one or more reference poses of the target bone; according to the preset correspondence between the source bone and the target bone, one or more virtual bones are built between the same reference pose of the source bone and the target bone.
在一种可能的实现方式中,所述参考姿态至少包括:T-姿态。In a possible implementation manner, the reference posture includes at least: a T-pose.
在一种可能的实现方式中,所述源骨骼的约束点,根据源骨骼的自身约束和/或与所述源骨骼相关联的环境约束确定。In a possible implementation manner, the constraint point of the source bone is determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
需要说明的是,尽管以上述实施例作为示例介绍了运动重定向装置如上,但本领域技术人员能够理解,本公开应不限于此。事实上,用户完全可根据个人喜好和/或实际应用场景灵活设定各实施方式,只要符合本公开的技术方案即可。It should be noted that, although the motion redirection device is described above by taking the above embodiment as an example, those skilled in the art can understand that the present disclosure should not be limited thereto. In fact, the user can flexibly set each implementation manner according to personal preferences and/or actual application scenarios, as long as it conforms to the technical solutions of the present disclosure.
这样,本公开实施例中,通过获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所 述目标骨骼的约束点位置。这样,在运动重定向的过程中加入了蒙皮信息进行约束,能够有效地避免运动重定向可能出现的抖动及整体动作的僵硬、不自然等现象;同时,后期无需大量美术人力修复数据,有效提高了动画制作效率。In this way, in this embodiment of the present disclosure, by acquiring the first bone pose of the source bone and the constraint points of the source bone, the constraint points include skin points; according to the first bone pose and the constraint points of the source bone, a first Constraint condition; according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, and the first constraint condition, the second constraint condition is obtained; according to the first position and the second position, the second constraint condition is obtained. The second bone pose of the target bone with the constraint condition, wherein the first position is the position of the constraint point of the target bone obtained by mapping the first bone pose to the target bone without the second constraint condition; The second position is the position of the constraint point of the target bone determined according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone. In this way, the skin information is added for constraints in the process of motion redirection, which can effectively avoid the possible jitter of motion redirection and the stiffness and unnaturalness of the overall action. Improved animation production efficiency.
根据本公开的另一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行上述方法。According to another aspect of the present disclosure, there is provided an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
根据本公开的另一方面,提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其中,所述计算机程序指令被处理器执行时实现上述方法。According to another aspect of the present disclosure, there is provided a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
图5示出根据本公开一实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图5,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 5 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. 5, electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。The electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 . Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指 令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算 机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图 中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

  1. 一种运动重定向方法,其特征在于,包括:A motion redirection method, comprising:
    获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;obtaining the first bone pose of the source bone and the constraint point of the source bone, the constraint point including the skin point;
    根据所述第一骨骼姿态和源骨骼的约束点,构建第一约束条件;constructing a first constraint condition according to the first bone pose and the constraint point of the source bone;
    根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;Obtain the second constraint condition according to the correspondence between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition;
    根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。According to the first position and the second position, the second bone pose of the target bone that satisfies the second constraint condition is obtained, wherein the first position is to map the first bone pose to the The target bone, the obtained position of the constraint point of the target bone; the second position is based on the correspondence between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source bone and the posture of the first bone , the determined position of the constraint point of the target bone.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨骼;The method according to claim 1, wherein the method further comprises: building one or more virtual bones between the source bone and the target bone;
    根据所述第一骨骼姿态及所述虚拟骨骼,得到目标骨骼的第三骨骼姿态;obtaining the third bone pose of the target bone according to the first bone pose and the virtual bone;
    根据第三位置和所述第二位置,得到满足所述第二约束条件的第二骨骼姿态;其中,所述第三位置是目标骨骼的约束点在所述第三骨骼姿态下的位置。According to the third position and the second position, a second bone pose satisfying the second constraint condition is obtained; wherein the third position is the position of the constraint point of the target bone under the third bone pose.
  3. 根据权利要求1所述的方法,其特征在于,所述第二约束条件包括:The method according to claim 1, wherein the second constraint condition comprises:
    所述目标骨骼的约束点在所述第二骨骼姿态下的位置和所述第二位置相同。The position of the constraint point of the target bone in the second bone pose is the same as the second position.
  4. 根据权利要求3所述的方法,其特征在于,所述目标骨骼的约束点在所述第二骨骼姿态下的位置,根据目标骨骼的约束点的权重信息、第二骨骼姿态下目标骨骼的约束点在目标骨骼上的局部坐标及目标骨骼局部坐标系 到世界坐标系的变换矩阵确定。The method according to claim 3, wherein the position of the constraint point of the target bone in the second bone pose is based on the weight information of the constraint point of the target bone and the constraint of the target bone in the second bone pose The local coordinates of the point on the target bone and the transformation matrix from the local coordinate system of the target bone to the world coordinate system are determined.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:通过预测模型对目标骨骼的第二骨骼姿态序列、源骨骼的约束点的运动序列、以及当前帧的目标骨骼的约束点进行处理,得到下一帧的目标骨骼的约束点;其中,所述源骨骼的约束点的运动序列由源骨骼的不同约束点的位置确定。The method according to claim 1, wherein the method further comprises: using the prediction model to the second bone pose sequence of the target bone, the motion sequence of the constraint point of the source bone, and the constraint point of the target bone of the current frame Perform processing to obtain the constraint points of the target bone in the next frame; wherein, the motion sequence of the constraint points of the source bone is determined by the positions of different constraint points of the source bone.
  6. 根据权利要求1所述的方法,其特征在于,所述约束点还包括:网格点和/或骨骼点。The method according to claim 1, wherein the constraint points further comprise: grid points and/or bone points.
  7. 根据权利要求2所述的方法,其特征在于,所述在所述源骨骼与所述目标骨骼之间,搭建一个或多个虚拟骨骼,包括:The method according to claim 2, wherein the building one or more virtual bones between the source bone and the target bone comprises:
    根据所述源骨骼、所述目标骨骼及预设的一个或多个参考姿态,得到源骨骼的一个或多个参考姿态及目标骨骼的一个或多个参考姿态;According to the source bone, the target bone and one or more preset reference poses, obtain one or more reference poses of the source bone and one or more reference poses of the target bone;
    根据预设的源骨骼与目标骨骼的对应关系,在源骨骼与目标骨骼的同一参考姿态之间,搭建一个或多个虚拟骨骼。According to the preset corresponding relationship between the source bone and the target bone, one or more virtual bones are built between the same reference pose of the source bone and the target bone.
  8. 根据权利要求6所述的方法,其特征在于,所述参考姿态至少包括:T-姿态。The method according to claim 6, wherein the reference posture at least comprises: a T-pose.
  9. 根据权利要求1所述的方法,其特征在于,所述源骨骼的约束点,根据源骨骼的自身约束和/或与所述源骨骼相关联的环境约束确定。The method according to claim 1, wherein the constraint point of the source bone is determined according to the self constraint of the source bone and/or the environment constraint associated with the source bone.
  10. 一种运动重定向装置,其特征在于,包括:A motion redirection device, comprising:
    获取模块,用于获取源骨骼的第一骨骼姿态和源骨骼的约束点,所述约束点包括蒙皮点;an acquisition module, configured to acquire the first bone pose of the source bone and the constraint point of the source bone, the constraint point including the skin point;
    第一约束条件构建模块,用于根据所述第一骨骼姿态和源骨骼的约束 点,构建第一约束条件;a first constraint condition building module for constructing a first constraint condition according to the first skeleton pose and the constraint point of the source skeleton;
    第二约束条件构建模块,用于根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、及所述第一约束条件,得到第二约束条件;The second constraint condition building module is configured to obtain the second constraint condition according to the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone and the first constraint condition;
    运动重定向模块,用于根据第一位置和第二位置,得到满足所述第二约束条件的目标骨骼的第二骨骼姿态,其中,所述第一位置是在无第二约束条件时将所述第一骨骼姿态映射到目标骨骼,得到的所述目标骨骼的约束点位置;所述第二位置是根据源骨骼的约束点与目标骨骼的约束点之间的对应关系、源骨骼的约束点以及所述第一骨骼姿态,确定的所述目标骨骼的约束点位置。The motion redirection module is used to obtain the second bone pose of the target bone that satisfies the second constraint condition according to the first position and the second position, wherein the first position is the position where the target bone will be placed without the second constraint condition. The first bone pose is mapped to the target bone, and the obtained position of the constraint point of the target bone; the second position is based on the corresponding relationship between the constraint point of the source bone and the constraint point of the target bone, the constraint point of the source and the first bone pose, and the determined position of the constraint point of the target bone.
  11. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为执行所述存储器存储的可执行指令时实现权利要求1至权利要求9中任意一项所述的方法。Wherein, the processor is configured to implement the method of any one of claims 1 to 9 when executing executable instructions stored in the memory.
  12. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method described in any one of claims 1 to 9 is implemented.
PCT/CN2021/138407 2020-12-31 2021-12-15 Motion retargeting method and apparatus, electronic device, and storage medium WO2022143178A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011631904.6A CN112634419B (en) 2020-12-31 2020-12-31 Motion redirection method and device, electronic equipment and storage medium
CN202011631904.6 2020-12-31

Publications (1)

Publication Number Publication Date
WO2022143178A1 true WO2022143178A1 (en) 2022-07-07

Family

ID=75289826

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138407 WO2022143178A1 (en) 2020-12-31 2021-12-15 Motion retargeting method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112634419B (en)
WO (1) WO2022143178A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713582A (en) * 2022-12-02 2023-02-24 北京百度网讯科技有限公司 Virtual image generation method, device, electronic equipment and medium
CN116152404A (en) * 2023-04-19 2023-05-23 苏州浪潮智能科技有限公司 Animation redirection method, device, computer equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112634419B (en) * 2020-12-31 2022-03-25 魔珐(上海)信息科技有限公司 Motion redirection method and device, electronic equipment and storage medium
CN113313794B (en) * 2021-05-19 2022-11-08 深圳市慧鲤科技有限公司 Animation migration method and device, equipment and storage medium
CN113298917A (en) * 2021-05-28 2021-08-24 上海曼恒数字技术股份有限公司 Human-shaped animation multiplexing method and system
CN113610949B (en) * 2021-08-25 2023-06-16 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for covering virtual arm skeleton
CN115018959A (en) * 2022-05-13 2022-09-06 阿里巴巴(中国)有限公司 Drive processing method, device, equipment and storage medium for three-dimensional virtual model
CN116385666B (en) * 2023-06-02 2024-02-27 杭州倚澜科技有限公司 Human body model redirection method and device based on feedback type cyclic neural network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009140261A1 (en) * 2008-05-13 2009-11-19 The Board Of Trustees Of The Leland Stanford Junior University Systems, methods and devices for motion capture using video imaging
CN111292402A (en) * 2020-02-13 2020-06-16 腾讯科技(深圳)有限公司 Data processing method, device, equipment and computer readable storage medium
CN111402372A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Method and device for simulating actions of virtual characters in game and electronic equipment
CN112634419A (en) * 2020-12-31 2021-04-09 魔珐(上海)信息科技有限公司 Motion redirection method and device, electronic equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9058065B2 (en) * 2010-10-22 2015-06-16 Custom Device Technologies, Llc Hand-held orthopedic electronic interface device and method of manufacture
CN102708582B (en) * 2012-05-08 2014-03-12 电子科技大学 Character movement redirecting method for heterogeneous topology
CN102945561B (en) * 2012-10-16 2015-11-18 北京航空航天大学 Based on the motion synthesis of motion capture data and edit methods in a kind of computing machine skeleton cartoon
CN106780766B (en) * 2016-11-24 2019-02-05 腾讯科技(深圳)有限公司 Matching implementation method and relevant apparatus
CN107833271B (en) * 2017-09-30 2020-04-07 中国科学院自动化研究所 Skeleton redirection method and device based on Kinect
CN111080755B (en) * 2019-12-31 2023-11-14 上海米哈游天命科技有限公司 Motion calculation method and device, storage medium and electronic equipment
CN111724459B (en) * 2020-06-22 2024-04-12 合肥工业大学 Method and system for redirecting movement of heterogeneous human bones
CN111899317A (en) * 2020-08-07 2020-11-06 北京中科深智科技有限公司 Movement data redirection method based on neural network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009140261A1 (en) * 2008-05-13 2009-11-19 The Board Of Trustees Of The Leland Stanford Junior University Systems, methods and devices for motion capture using video imaging
CN111292402A (en) * 2020-02-13 2020-06-16 腾讯科技(深圳)有限公司 Data processing method, device, equipment and computer readable storage medium
CN111402372A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Method and device for simulating actions of virtual characters in game and electronic equipment
CN112634419A (en) * 2020-12-31 2021-04-09 魔珐(上海)信息科技有限公司 Motion redirection method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713582A (en) * 2022-12-02 2023-02-24 北京百度网讯科技有限公司 Virtual image generation method, device, electronic equipment and medium
CN115713582B (en) * 2022-12-02 2023-10-27 北京百度网讯科技有限公司 Avatar generation method, device, electronic equipment and medium
CN116152404A (en) * 2023-04-19 2023-05-23 苏州浪潮智能科技有限公司 Animation redirection method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112634419A (en) 2021-04-09
CN112634419B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
WO2022143178A1 (en) Motion retargeting method and apparatus, electronic device, and storage medium
Seol et al. Creature features: online motion puppetry for non-human characters
CN101958007B (en) Three-dimensional animation posture modeling method by adopting sketch
CN112819971B (en) Method, device, equipment and medium for generating virtual image
CN112509099B (en) Avatar driving method, apparatus, device and storage medium
US11195318B2 (en) Rapid avatar capture and simulation using commodity depth sensors
EP3454302A1 (en) Approximating mesh deformation for character rigs
KR20120072128A (en) Apparatus and method for generating digital clone
US9947124B2 (en) Motion control of active deformable objects
CN111223171A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110189397A (en) A kind of image processing method and device, computer equipment and storage medium
WO2005114640A1 (en) Patch picking methods and apparatus
CN112330805A (en) Face 3D model generation method, device and equipment and readable storage medium
Feng et al. Fast, automatic character animation pipelines
CN116206370B (en) Driving information generation method, driving device, electronic equipment and storage medium
WO2023216646A1 (en) Driving processing method and apparatus for three-dimensional virtual model, device, and storage medium
Pantuwong et al. A novel template‐based automatic rigging algorithm for articulated‐character animation
CN111599002A (en) Method and apparatus for generating image
CN111369647A (en) Information processing method and device, computer storage medium and electronic equipment
CN112509098B (en) Animation image generation method and device and electronic equipment
US10282883B2 (en) Hierarchy-based character rigging
US10319133B1 (en) Posing animation hierarchies with dynamic posing roots
Razzaq et al. Automatic conversion of human mesh into skeleton animation by using kinect motion
Bhati et al. Analysis of design principles and requirements for procedural rigging of bipeds and quadrupeds characters with custom manipulators for animation
CN116524081A (en) Virtual reality picture adjustment method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21913919

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21913919

Country of ref document: EP

Kind code of ref document: A1