Model animation processing method and device and electronic equipment
By automating the processing of model animations, adjusting the movement endpoint, and eliminating slippage, the high cost problem caused by manual editing in animation production is solved, and efficiency is improved.
Patent Information
- Application Number
- CN202510883402.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-11-21
AI Technical Summary
In current model animation production, motion capture resources need to be manually edited, resulting in high time and labor costs and low animation production efficiency.
The animation adjustment is handled automatically, including acquiring the initial model animation, copying and adjusting the movement endpoint, eliminating smooth movement, increasing the offset, and generating a step-free animation.
It reduces time and manpower costs, improves animation production efficiency, and solves the problem of sliding steps that do not require manual editing.
Smart Images

Figure CN120997349A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of animation production technology, and in particular to a method, apparatus and electronic device for processing model animation. Background Technology
[0002] In current model animation production, editing of animation resources, especially motion capture resources, is often required. The animation captured by motion capture actors is static and usually does not meet requirements, necessitating editing by animators in appropriate software. Related techniques typically involve segmenting animation resources, adjusting orientation, and manually keyframing to resolve issues such as footstep drift. This process is very time-consuming and labor-intensive, resulting in low animation production efficiency. Summary of the Invention
[0003] In view of this, the purpose of this disclosure is to provide a method, apparatus and electronic device for processing model animation, which automatically handles the slippage problem after animation adjustment without manual editing, thereby reducing time and labor costs and improving animation production efficiency.
[0004] In a first aspect, embodiments of this disclosure provide a method for processing model animation, the method comprising: acquiring an initial model animation, copying the initial model animation to obtain a first model animation; the initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point; in response to an adjustment operation on the target model in the first model animation, adjusting the endpoint of the target model's movement from the second position point to a third position point; wherein, the adjusted first model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is on the ground during the movement; in response to an instruction to eliminate the smooth movement phenomenon, determining a target animation frame in the initial model animation, wherein the target model in the target animation frame is in a non-static state; determining an offset of the target model in the target animation frame based on the target change amount of the target model between the second position point and the third position point; controlling the change amount of the target model in the target animation frame to increase the offset, thereby obtaining a target model animation; wherein, the target model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model does not exhibit a smooth movement phenomenon when its bottom is on the ground during the movement.
[0005] Secondly, embodiments of this disclosure provide a model animation processing apparatus, comprising: an animation copying module for acquiring an initial model animation and copying the initial model animation to obtain a first model animation; the initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point; and an animation adjustment module for responding to an adjustment operation on the target model in the first model animation, adjusting the endpoint of the target model's movement from the second position point to a third position point; wherein the adjusted first model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model exhibits smooth movement when its bottom is touching the ground during the movement. The system comprises the following modules: a target animation frame determination module, used to determine the target animation frame in the initial model animation in response to the instruction to eliminate smooth movement phenomena, wherein the target model in the target animation frame is in a non-static state; an offset determination module, used to determine the offset of the target model in the target animation frame based on the target change amount between the second position point and the third position point; and a target model animation determination module, used to control the change amount of the target model in the target animation frame to increase the offset, thereby obtaining the target model animation; wherein the target model animation is the movement animation of the target model from the first position point to the third position point, and there is no smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
[0006] Thirdly, embodiments of this disclosure provide an electronic device, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the model animation processing method of any of the first aspects.
[0007] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the model animation processing method of any of the first aspects.
[0008] The embodiments disclosed herein bring the following beneficial effects:
[0009] This disclosure provides a method, apparatus, and electronic device for processing model animation. The method involves acquiring an initial model animation and copying it to obtain a first model animation. The initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point. In response to an adjustment operation on the target model in the first model animation, the endpoint of the target model's movement is adjusted from the second position point to a third position point. The adjusted first model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model exhibits smooth movement when its bottom is on the ground during the movement. In response to an instruction to eliminate the smooth movement phenomenon, a target animation frame is determined in the initial model animation, wherein the target model in the target animation frame is in a non-static state. Based on the target change amount of the target model between the second and third position points, an offset of the target model in the target animation frame is determined. The target model animation is obtained by controlling the change amount of the target model in the target animation frame to increase the offset. The target model animation is a movement animation of the target model moving from the first position point to the third position point, and there is no smooth movement phenomenon when the target model's bottom is on the ground during the movement. This method automates the process of handling slippage issues that occur after model animation adjustments with a single click, eliminating the need for manual editing to resolve slippage problems, thus reducing time and labor costs and improving animation production efficiency.
[0010] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a method for processing model animation provided in this embodiment of the disclosure;
[0014] Figure 2 A schematic diagram of a target model provided in an embodiment of this disclosure;
[0015] Figure 3 A schematic diagram of the structure of a model animation processing device provided in an embodiment of this disclosure;
[0016] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0018] In current model animation production, editing of animation resources, especially motion capture resources, is often required. The animation captured by motion capture actors is static and usually does not meet requirements, necessitating editing by animators in relevant software. Related technologies typically involve processing animation resources by segmenting, adjusting orientation, and manually keyframing to solve problems such as footstep drift, which is very time-consuming and labor-intensive, resulting in low animation production efficiency. Therefore, this disclosure provides a method, apparatus, and electronic device for processing model animation. This technology can be applied to devices with animation editing capabilities, and is particularly applicable to the production of motion capture resources.
[0019] To facilitate understanding of this embodiment, a method for processing model animation disclosed in this disclosure will first be described in detail, such as... Figure 1 As shown, the method includes the following steps:
[0020] Step S102: Obtain the initial model animation and copy the initial model animation to obtain the first model animation; the initial model animation includes the target model, and the initial model animation is the movement animation of the target model from the first position point to the second position point;
[0021] The aforementioned initial model animation typically refers to animation generated in specific software, such as skeletal animation generated in Maya or 3ds Max, or skeletal animation captured by motion capture actors. The target model can be a virtual character model, such as a human figure or animal model. The initial model animation could be a movement animation of a human model walking from a first position point to a second position point, running from a first position point to a second position point, or jumping from a first position point to a second position point, etc.
[0022] Optionally, in response to an upload command for the initial model animation, the initial model animation can be retrieved. For example, an animation upload control can be displayed in the graphical user interface provided by the target application running on the terminal device. In response to a trigger operation on the animation upload control, multiple model animations to be selected can be displayed. In response to a selection operation for the initial model animation, the initial model animation can be retrieved.
[0023] To modify animations without loss of quality, the initial model animation is typically not modified. Therefore, the initial model animation is copied to obtain the first model animation. Optionally, a new animation layer is created, and the first model animation is displayed on the new animation layer. Specifically, the initial model animation is obtained and displayed on the first animation layer; a second animation layer is created, and the first model animation is displayed on the second animation layer.
[0024] Optionally, after obtaining the initial model animation, the skeletal data in the initial model animation is traversed, and the first model animation is obtained by copying the skeletal data. The initial model animation is the same as the first model animation.
[0025] Optionally, the target model mentioned above includes at least one model skeleton.
[0026] Step S104: In response to the adjustment operation of the target model in the first model animation, the movement endpoint of the target model is adjusted from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when the bottom of the model is touching the ground during the movement.
[0027] Optionally, the first change between the third position point and the first position point is greater than the second change between the second position point and the first position point, wherein the first change includes at least the first target change between the third position point and the first position point, and the first rotation data of the target model between the third position point and the first position point; similarly, the second change includes at least the second target change between the second position point and the first position point, and the second rotation data of the target model between the second position point and the first position point.
[0028] Optionally, after adjusting the target model's movement endpoint from the second position point to the third position point, the system will automatically adjust the first model animation based on the first and third position points, so that the target model in the first model animation moves from the first position point to the third position point.
[0029] Optionally, a specified amount of change can be added to the initial change amount of each animation frame in the initial model animation. This specified amount of change is the ratio of the third change amount between the third position point and the second position point to the total number of animation frames in the first model animation. In this adjustment method, if the target model is stationary or its bottom is touching the ground in some animation frames, increasing the change amount of the target model (such as increasing the movement distance) will cause a smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
[0030] Optionally, in response to a drag operation on the target model located at the second position point, the target model is dragged to the third position point, and the control adjusts the endpoint of the target model's movement from the second position point to the third position point. Typically, the target model is configured with a controller to facilitate user adjustments. Specifically, in response to a drag operation on the first controller of the target model located at the second position point, the target model is dragged to the third position point.
[0031] The smooth movement phenomenon when the bottom of the model is touching the ground refers to the displacement of the bottom of the model relative to the ground when the bottom of the model is touching the ground, commonly known as the sliding phenomenon.
[0032] Step S106: In response to the elimination instruction for smooth movement phenomenon, determine the target animation frame in the initial model animation, wherein the target model in the target animation frame is in a non-static state.
[0033] Optionally, in response to a triggering operation of a smoothing elimination control for a graphical user interface display, an elimination instruction is generated for the smoothing motion phenomenon present in the adjusted first model animation.
[0034] Optionally, the target model is a model skeleton. The amount of change in each animation frame is determined from the initial model animation, and the corresponding animation frame is determined to be the target animation frame based on this amount of change. For example, if the amount of change in the current animation frame is not zero, then the target model in the current animation frame is determined to be in a non-static state, and the current animation frame is determined to be the target animation frame.
[0035] Optionally, the target model includes multiple model skeletons. The amount of change of each model skeleton in each animation frame is determined from the initial model animation, and the corresponding animation frame is determined to be the target animation frame based on the amount of change. For example, if there are model skeletons in the current animation frame with a non-zero amount of change, then the target model in the current animation frame is determined to be in a non-static state, and the current animation frame is determined to be the target animation frame.
[0036] Step S108: Determine the offset of the target model in the target animation frame based on the target change amount between the second position point and the third position point;
[0037] Optionally, the target model is a model skeleton. The ratio of the target change to the total number of frames in the target animation is calculated, and this ratio is determined as the offset of the target model in the target animation frame. Alternatively, the ratio of the change of the target model in the target animation frame to the total change of the target model in the initial model animation is calculated to obtain the ratio of the target animation frame. The product of the target change and this ratio of the target animation frame is then calculated to obtain the offset of the target model in the target animation frame.
[0038] Optionally, the target model includes multiple model bones, and the offset of the model bone in the target animation frame is determined based on the target change amount of each model bone between the second position point and the third position point.
[0039] Step S110: Control the change amount of the target model in the target animation frame to increase the offset to obtain the target model animation; wherein, the target model animation is the movement animation of the target model from the first position point to the third position point, and there is no smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
[0040] Specifically, by controlling the amount of change of the target model in the target animation frame and increasing the offset of the target model in the target animation frame, the target model animation is obtained.
[0041] Optionally, the target model is a model skeleton. The displacement change of the target model in the target animation frame is increased by the displacement offset of the target model in the target animation frame, and the rotation change of the target model in the target animation frame is increased by the rotation offset to obtain the target model animation.
[0042] Optionally, the target model includes multiple model bones, and the amount of change of the model bones in the target animation frame is increased by increasing the offset of the model bone in the target animation frame. For example, if the displacement change of the first model bone (i.e., the waist bone) in the target animation frame is 1 and the rotation change is 0, and the displacement offset of the first model bone in the target animation frame determined in the above steps is 0.1 and the rotation change is 0, then by increasing the displacement change of 1 of the first model bone in the target animation frame by 0.1, the resulting displacement change of the first model bone in the target animation frame is 1.1 and the rotation change is 0.
[0043] It should be noted that the amount of change of the target model in the target animation frame is increased by the offset. Usually, the target model is offset only after it leaves the ground. When the target model is in the air, there will be no slippage phenomenon when the offset occurs.
[0044] The aforementioned changes include at least displacement and rotation; similarly, the aforementioned offsets include at least displacement and rotation. The changes can also refer to changes in the skeleton of the target model.
[0045] This disclosure provides a method for processing model animation, which involves obtaining an initial model animation and copying it to obtain a first model animation. The initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point. In response to an adjustment operation on the target model in the first model animation, the endpoint of the target model's movement is adjusted from the second position point to a third position point. The adjusted first model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is on the ground during the movement. In response to an instruction to eliminate the smooth movement phenomenon, a target animation frame is determined in the initial model animation, wherein the target model in the target animation frame is in a non-static state. Based on the target change amount of the target model between the second and third position points, the offset of the target model in the target animation frame is determined. The target model animation is obtained by controlling the change amount of the target model in the target animation frame to increase the offset. The target model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model does not exhibit a smooth movement phenomenon when its bottom is on the ground during the movement. This method automates the process of handling slippage issues that occur after model animation adjustments with a single click, eliminating the need for manual editing to resolve slippage problems, thus reducing time and labor costs and improving animation production efficiency.
[0046] The target model mentioned above includes multiple model bones. The steps for determining the target animation frame in the initial model animation include: determining the animation frame of the initial model animation; for each model bone in the animation frame, calculating the amount of change between the model bone and the model bone in the adjacent previous animation frame to obtain the amount of change of the model bone; if there is a model bone in the animation frame with a non-zero amount of change, the animation frame is determined as the target animation frame.
[0047] Optionally, a first difference between the displacement data of the model skeleton and the displacement data of the model skeleton in the adjacent previous animation frame, and a second difference between the rotational displacement data of the model skeleton and the rotational displacement data of the model skeleton in the adjacent previous animation frame are calculated, and the first difference and the second difference are determined as the change in the model skeleton. Wherein, the first difference is the change in displacement of the model skeleton, and the second difference is the change in rotation of the model skeleton.
[0048] For example, the target model includes a first model skeleton and a second model skeleton; for the first model skeleton in the animation frame, the change between the first model skeleton and the second model skeleton in the adjacent previous animation frame is calculated to obtain the change of the first model skeleton; the change between the second model skeleton and the second model skeleton in the adjacent previous animation frame is calculated to obtain the change of the second model skeleton.
[0049] If all model bones in an animation frame are zero, the target model in that animation frame is determined to be in a static state. If there are model bones in an animation frame with non-zero changes, the animation frame is determined to be the target animation frame.
[0050] For example, if the changes in the first model's skeleton and the changes in the second model's skeleton are both zero, the animation frame is determined not to be the target animation frame. Conversely, if the changes in the first model's skeleton and / or the second model's skeleton are not zero, the animation frame is determined to be the target animation frame.
[0051] By determining whether the change in the model skeleton in each animation frame of the initial model animation is zero, it is determined whether the animation frame is in a non-static state, and thus the target animation frame is determined.
[0052] One possible implementation of the above steps for determining the offset of the target model in the target animation frame based on the target model's change between the second and third position points is as follows:
[0053] Based on the target change of the model skeleton in the target model between the second and third position points, determine the offset of the model skeleton in the target animation frame.
[0054] Optionally, for each model bone in the target model, determine the position and rotation data of the model bone at the second position point in the initial model animation, and determine the position and rotation data of the model bone at the third position point in the first model animation; calculate the absolute value of the difference between the position data of the model bone at the second position point and the position data of the model bone at the third position point, calculate the absolute value of the difference between the rotation data of the model bone at the second position point and the rotation data of the model bone at the third position point, and obtain the target change amount of the model bone between the second position point and the third position point.
[0055] Optionally, the ratio of the target change of the model bone to the total number of target animation frames can be calculated to obtain the offset of the model bone in each target animation frame. The offset obtained in this way is the same across different target animation frames. For example, the ratio of the target displacement change of the model bone to the total number of target animation frames can be calculated to obtain the displacement offset of the model bone in each target animation frame. Similarly, the ratio of the target rotation change of the model bone to the total number of target animation frames can be calculated to obtain the rotation offset of the model bone in each target animation frame.
[0056] Optionally, calculate the change in the model's skeleton in the target animation frame and the total change in the model's skeleton in the initial model animation, and calculate the percentage corresponding to the change in the model's skeleton in the target animation frame; calculate the product of the percentage corresponding to the change in the model's skeleton in the target animation frame and the target change amount to obtain the offset of the model's skeleton in the target animation frame. The offset obtained in this way will be different in different target animation frames.
[0057] The percentages mentioned above include displacement percentage and rotation percentage. Specifically, the displacement change of the model bones in the target animation frame and the total displacement change of the model bones in the initial model animation are calculated, and the displacement percentage of the model bones in the target animation frame is calculated; the rotation change of the model bones in the target animation frame and the total rotation change of the model bones in the initial model animation are calculated, and the rotation percentage of the model bones in the target animation frame is calculated.
[0058] For example, the displacement offset of the model bone in the target animation frame is obtained by multiplying the percentage of displacement corresponding to the model bone in the target animation frame with the target displacement change amount, and the rotation offset of the model bone in the target animation frame is obtained by multiplying the percentage of rotation corresponding to the model bone in the target animation frame with the target rotation change amount.
[0059] The above method also includes: summing up the changes in the model bones in each animation frame of the initial model animation to obtain the total changes in the model bones in the initial model animation.
[0060] The total change includes the total change in displacement and the total change in rotation. Specifically, for each model bone, the displacement changes of that model bone in each animation frame of the initial model animation are summed to obtain the total displacement change of that model bone in the initial model animation. The rotation changes of that model bone in each animation frame of the initial model animation are summed to obtain the total rotation change of that model bone in the initial model animation.
[0061] One possible implementation of the above steps for increasing the offset of the target model in the target animation frame to obtain the target model animation is: increasing the offset of the model bones in the target animation frame to obtain the target model animation.
[0062] Specifically, by controlling the amount of change in the model's skeleton in the target animation frame and increasing the offset of the model's skeleton in the target animation frame, the target model animation is obtained.
[0063] Optionally, for each target animation frame in the initial model animation, the displacement change of each model bone in the target animation frame is increased by the displacement offset of the model bone, and the rotation change of each model bone in the target animation frame is increased by the rotation offset of the model bone, thus obtaining the target model animation.
[0064] For example, the displacement change of the first model bone in the first target animation frame is 1, the rotation change is 2, the displacement offset of the first model bone in the first target animation frame is 0.3, and the rotation offset is 0.1. Control the displacement change 1 of the first model bone in the first target animation frame to increase the displacement offset by 0.3, and control the rotation change 2 of each model bone in the target animation frame to increase the rotation offset by 0.1.
[0065] The aforementioned target model is pre-configured with a first controller, which is a primary controller of the target model and is used to control the first model skeleton of the target model. After the step of controlling the change amount of the target model in the target animation frame to increase the offset to obtain the target model animation, the above method further includes: in response to the stretching elimination instruction for the target model animation, determining a specified animation frame in the target model animation in which the target model has an overstretching phenomenon during movement, determining the target model skeleton involved in the overstretching phenomenon, and the target controller associated with the target model skeleton, and controlling the target controller in the specified animation frame to offset by a specified distance.
[0066] The aforementioned overstretching phenomenon refers to an excessive distance between the model's bones. Taking a character model as an example, if the distance between the waist bones and the left leg bones is too large, it will cause the left leg to be overstretched.
[0067] The target controller associated with the target model skeleton mentioned above can be a controller configured for at least part of the target model skeleton, a controller configured for model skeletons adjacent to the target model skeleton, or a controller configured for model skeletons pre-associated with the target model skeleton, wherein the pre-associated model skeletons are pre-configured by the animators. For example, the model skeleton pre-associated with the leg model skeleton is the waist model skeleton.
[0068] Optionally, for each animation frame in the target model animation, traverse each model bone in the animation frame. If the distance between the first model bone and the second model bone in the animation frame is greater than a preset threshold, determine the animation frame as a specified animation frame with overstretching.
[0069] Adding offsets to the model's skeleton can sometimes cause overstretching. For example, a running character might increase their stride length, leading to overstretching of the legs, meaning the distance between the lumbar and leg bones exceeds a preset threshold. Figure 2 As shown, the character model's left leg is noticeably elongated, which is unrealistic. At this point, the waist controller needs to be shifted downwards a specified distance to return the leg to a normal, slightly bent position. This specified distance is usually entered by the animator.
[0070] Prior to the step of adjusting the target model in the first model animation as described above, the method further includes: in response to adding instructions to the controller of the target model in the first model animation, configuring a first controller and / or a second controller for the target model; wherein the first controller is a primary controller of the target model, used to control the first model skeleton of the target model; and the second controller is a secondary controller of the target model, used to control the second model skeleton of the target model.
[0071] The first model skeleton is located at the first model position of the target model, and the second model skeleton is located at the second model position of the target model;
[0072] Taking the target model as a character model as an example, optionally, the first model position is the waist position of the target model, and the second model position is the left or right foot position of the target model.
[0073] Optionally, the first model position is the neck or head position of the target model, and the second model position is the left or right hand position of the target model. Overstretching occurs when the character model's legs or arms are too long, which is unrealistic.
[0074] Optionally, in response to a controller addition instruction for the first model bone in the target model within the first model animation, a first controller is configured for the first model bone of the target model; in response to a controller addition instruction for the second model bone in the target model within the first model animation, a second controller is configured for the second model bone of the target model; and in response to a controller addition instruction for the third model bone in the target model within the first model animation, a third controller is configured for the third model bone of the target model.
[0075] The first model skeleton is located at the waist of the target model, the second model skeleton is located at the left foot of the target model, and the third model skeleton is located at the right foot of the target model.
[0076] Corresponding to the above method embodiments, this disclosure provides a model animation processing apparatus, such as... Figure 3 As shown, the device includes:
[0077] Animation copy module 301 is used to obtain the initial model animation. Copying the initial model animation yields the first model animation. The initial model animation includes the target model, and the initial model animation is the movement animation of the target model from the first position point to the second position point.
[0078] The animation adjustment module 302 is used to respond to the adjustment operation of the target model in the first model animation, and adjust the target model's movement endpoint from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is touching the ground during the movement.
[0079] The target animation frame determination module 303 is used to determine the target animation frame in the initial model animation in response to the elimination instruction for smooth movement phenomenon, wherein the target model in the target animation frame is in a non-static state.
[0080] The offset determination module 304 is used to determine the offset of the target model in the target animation frame based on the target change amount between the second position point and the third position point.
[0081] The target model animation determination module 305 is used to control the change amount of the target model in the target animation frame and increase the offset to obtain the target model animation; wherein, the target model animation is the movement animation of the target model from the first position point to the third position point, and there is no smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
[0082] This disclosure provides a processing apparatus for model animation, which acquires an initial model animation and copies the initial model animation to obtain a first model animation. The initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point. In response to an adjustment operation on the target model in the first model animation, the movement endpoint of the target model is adjusted from the second position point to a third position point. The adjusted first model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is on the ground during the movement. In response to an instruction to eliminate the smooth movement phenomenon, a target animation frame in the initial model animation is determined, wherein the target model in the target animation frame is in a non-static state. Based on the target change amount of the target model between the second and third position points, the offset of the target model in the target animation frame is determined. The target model animation is obtained by controlling the change amount of the target model in the target animation frame to increase the offset. The target model animation is a movement animation of the target model moving from the first position point to the third position point, and the target model does not exhibit a smooth movement phenomenon when its bottom is on the ground during the movement. This method automates the process of handling slippage issues that occur after model animation adjustments with a single click, eliminating the need for manual editing to resolve slippage problems, thus reducing time and labor costs and improving animation production efficiency.
[0083] The target model mentioned above includes multiple model bones; the target animation frame determination module is also used to: determine the animation frame of the initial model animation, calculate the amount of change between the model bone and the model bone in the adjacent previous animation frame for each model bone in the animation frame, and obtain the amount of change of the model bone; if there is a model bone in the animation frame with a non-zero amount of change, determine the animation frame as the target animation frame.
[0084] The aforementioned offset determination module is also used to: determine the offset of the model skeleton in the target animation frame based on the target change amount between the second and third position points of the model skeleton in the target model.
[0085] The aforementioned offset determination module is also used to: calculate the percentage of the model bones in the target animation frame based on the change in the model bones in the target animation frame and the total change in the model bones in the initial model animation; and calculate the product of the percentage of the model bones in the target animation frame and the target change to obtain the offset of the model bones in the target animation frame.
[0086] The aforementioned device further includes: a total change determination module, used to add up the changes in the model bones in each animation frame of the initial model animation to obtain the total change in the model bones in the initial model animation.
[0087] The aforementioned target model animation determination module is also used to: control the amount of change in the model skeleton in the target animation frame to increase the offset of the model skeleton, thereby obtaining the target model animation.
[0088] The aforementioned changes include displacement changes and / or rotational changes; offsets include displacement offsets and / or rotational offsets.
[0089] The target model is pre-configured with a controller, which is used to control the model skeleton of the target model; the device further includes: a stretching elimination module for: in response to a stretching elimination command for the target model animation, determining a specified animation frame from the target model animation where the target model is overstretched during movement; determining the target model skeleton involved in the overstretching phenomenon, and the target controller associated with the target model skeleton, and controlling the target controller in the specified animation frame to offset by a specified distance.
[0090] The aforementioned stretching elimination module is also used to: for each animation frame in the target model animation, traverse each model bone in the animation frame, and if the distance between the first model bone and the second model bone in the animation frame is greater than a preset threshold, determine that the animation frame is a specified animation frame with overstretching.
[0091] The aforementioned device further includes a control addition module, configured to: in response to a controller addition instruction for a target model in a first model animation, configure a first controller and / or a second controller for the target model; wherein the first controller is a primary controller of the target model, used to control the first model skeleton of the target model; and the second controller is a secondary controller of the target model, used to control the second model skeleton of the target model.
[0092] The first model skeleton is located at the first model position of the target model, and the second model skeleton is located at the second model position of the target model.
[0093] The model animation processing apparatus provided in this embodiment has the same technical features as the model animation processing method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0094] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described model animation processing method. This electronic device can be a server or a terminal device.
[0095] See Figure 4 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described model animation processing method.
[0096] Furthermore, Figure 4 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0097] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0098] The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0099] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations in the above-mentioned model animation processing method:
[0100] Obtain the initial model animation, and copy the initial model animation to obtain the first model animation; the initial model animation includes the target model, and the initial model animation is the movement animation of the target model from the first position point to the second position point; in response to the adjustment operation of the target model in the first model animation, adjust the target model's movement endpoint from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is on the ground during the movement; in response to the instruction to eliminate the smooth movement phenomenon, determine the target animation frame in the initial model animation, wherein the target model in the target animation frame is in a non-static state; based on the target change amount of the target model between the second and third position points, determine the offset of the target model in the target animation frame; control the change amount of the target model in the target animation frame to increase the offset, thereby obtaining the target model animation; wherein, the target model animation is the movement animation of the target model from the first position point to the third position point, and the target model does not exhibit a smooth movement phenomenon when its bottom is on the ground during the movement. This method automates the process of handling slippage issues that occur after model animation adjustments with a single click, eliminating the need for manual editing to resolve slippage problems, thus reducing time and labor costs and improving animation production efficiency.
[0101] The target model mentioned above includes multiple model bones; the step of determining the target animation frame in the initial model animation includes: determining the animation frame of the initial model animation; for each model bone in the animation frame, calculating the amount of change between the model bone and the model bone in the adjacent previous animation frame, and obtaining the amount of change of the model bone; if there is a model bone in the animation frame with a non-zero amount of change, the animation frame is determined as the target animation frame.
[0102] The above-mentioned step of determining the offset of the target model in the target animation frame based on the target change amount between the second position point and the third position point of the target model includes: determining the offset of the model skeleton in the target animation frame based on the target change amount between the second position point and the third position point of the target model skeleton.
[0103] The steps described above for determining the offset of the target bone corresponding to the model bone in the target animation frame based on the target change amount between the second and third position points of the model bone in the target model include: calculating the percentage of the model bone in the target animation frame based on the change amount of the model bone in the target animation frame and the total change amount of the model bone in the initial model animation; and calculating the product of the percentage of the model bone in the target animation frame and the target change amount to obtain the offset of the model bone in the target animation frame.
[0104] The above method also includes: summing up the changes in the model bones in each animation frame of the initial model animation to obtain the total changes in the model bones in the initial model animation.
[0105] The steps described above for increasing the offset of the target model in the target animation frame to obtain the target model animation include: increasing the offset of the model bones in the target animation frame to obtain the target model animation.
[0106] The aforementioned changes include displacement changes and / or rotational changes; offsets include displacement offsets and / or rotational offsets.
[0107] The target model is pre-configured with a controller, which is used to control the model skeleton of the target model. After the step of controlling the change of the target model in the target animation frame to increase the offset to obtain the target model animation, the method further includes: in response to the stretching elimination instruction for the target model animation, determining a specified animation frame in the target model animation where the target model has an overstretching phenomenon during movement; determining the target model skeleton involved in the overstretching phenomenon, and the target controller associated with the target model skeleton, and controlling the target controller in the specified animation frame to offset by a specified distance.
[0108] The steps described above for determining the specified animation frame in which the target model exhibits overstretching during movement from the target model animation include: for each animation frame in the target model animation, traversing each model bone in the animation frame; if the distance between the first model bone and the second model bone in the animation frame is greater than a preset threshold, determining the animation frame as the specified animation frame exhibiting overstretching.
[0109] Before the above-mentioned step of responding to the adjustment operation of the target model in the first model animation, the method further includes: in response to adding instructions to the controller of the target model in the first model animation, configuring a first controller and / or a second controller for the target model; wherein, the first controller is a primary controller of the target model, used to control the first model skeleton of the target model; and the second controller is a secondary controller of the target model, used to control the second model skeleton of the target model.
[0110] The first model skeleton is located at the first model position of the target model, and the second model skeleton is located at the second model position of the target model.
[0111] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the above-described model animation processing method.
[0112] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the above-mentioned model animation processing method:
[0113] Obtain the initial model animation, and copy the initial model animation to obtain the first model animation; the initial model animation includes the target model, and the initial model animation is the movement animation of the target model from the first position point to the second position point; in response to the adjustment operation of the target model in the first model animation, adjust the target model's movement endpoint from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is on the ground during the movement; in response to the instruction to eliminate the smooth movement phenomenon, determine the target animation frame in the initial model animation, wherein the target model in the target animation frame is in a non-static state; based on the target change amount of the target model between the second and third position points, determine the offset of the target model in the target animation frame; control the change amount of the target model in the target animation frame to increase the offset, thereby obtaining the target model animation; wherein, the target model animation is the movement animation of the target model from the first position point to the third position point, and the target model does not exhibit a smooth movement phenomenon when its bottom is on the ground during the movement. This method automates the process of handling slippage issues that occur after model animation adjustments with a single click, eliminating the need for manual editing to resolve slippage problems, thus reducing time and labor costs and improving animation production efficiency.
[0114] The target model mentioned above includes multiple model bones; the step of determining the target animation frame in the initial model animation includes: determining the animation frame of the initial model animation; for each model bone in the animation frame, calculating the amount of change between the model bone and the model bone in the adjacent previous animation frame, and obtaining the amount of change of the model bone; if there is a model bone in the animation frame with a non-zero amount of change, the animation frame is determined as the target animation frame.
[0115] The above-mentioned step of determining the offset of the target model in the target animation frame based on the target change amount between the second position point and the third position point of the target model includes: determining the offset of the model skeleton in the target animation frame based on the target change amount between the second position point and the third position point of the target model skeleton.
[0116] The steps described above for determining the offset of the target bone corresponding to the model bone in the target animation frame based on the target change amount between the second and third position points of the model bone in the target model include: calculating the percentage of the model bone in the target animation frame based on the change amount of the model bone in the target animation frame and the total change amount of the model bone in the initial model animation; and calculating the product of the percentage of the model bone in the target animation frame and the target change amount to obtain the offset of the model bone in the target animation frame.
[0117] The above method also includes: summing up the changes in the model bones in each animation frame of the initial model animation to obtain the total changes in the model bones in the initial model animation.
[0118] The steps described above for increasing the offset of the target model in the target animation frame to obtain the target model animation include: increasing the offset of the model bones in the target animation frame to obtain the target model animation.
[0119] The aforementioned changes include displacement changes and / or rotational changes; offsets include displacement offsets and / or rotational offsets.
[0120] The target model is pre-configured with a controller, which is used to control the model skeleton of the target model. After the step of controlling the change of the target model in the target animation frame to increase the offset to obtain the target model animation, the method further includes: in response to the stretching elimination instruction for the target model animation, determining a specified animation frame in the target model animation where the target model has an overstretching phenomenon during movement; determining the target model skeleton involved in the overstretching phenomenon, and the target controller associated with the target model skeleton, and controlling the target controller in the specified animation frame to offset by a specified distance.
[0121] The steps described above for determining the specified animation frames in the target model animation where the target model exhibits overstretching during movement include: for each animation frame in the target model animation, traversing each model bone in the animation frame; if the distance between the first model bone and the second model bone in the animation frame is greater than a preset threshold, determining the animation frame as the specified animation frame exhibiting overstretching.
[0122] Before the above-mentioned step of responding to the adjustment operation of the target model in the first model animation, the method further includes: in response to adding instructions to the controller of the target model in the first model animation, configuring a first controller and / or a second controller for the target model; wherein, the first controller is a primary controller of the target model, used to control the first model skeleton of the target model; and the second controller is a secondary controller of the target model, used to control the second model skeleton of the target model.
[0123] The first model skeleton is located at the first model position of the target model, and the second model skeleton is located at the second model position of the target model.
[0124] The computer program products of the model animation processing method, apparatus, electronic device and system provided in the embodiments of this disclosure include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0125] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0126] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.
[0127] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0128] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0129] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for processing model animation, characterized in that, The method includes: Obtain an initial model animation, and copy the initial model animation to obtain a first model animation; the initial model animation includes a target model, and the initial model animation is a movement animation of the target model moving from a first position point to a second position point; In response to the adjustment operation of the target model in the first model animation, the movement endpoint of the target model is adjusted from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model moving from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is touching the ground during the movement; In response to an instruction to eliminate the smooth movement phenomenon, a target animation frame in the initial model animation is determined, wherein the target model in the target animation frame is in a non-static state; Based on the target change of the target model between the second position point and the third position point, determine the offset of the target model in the target animation frame; The target model animation is obtained by increasing the offset by controlling the change of the target model in the target animation frame; wherein the target model animation is the movement animation of the target model from the first position point to the third position point, and there is no smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
2. The method according to claim 1, characterized in that, The target model includes multiple model skeletons; the step of determining the target animation frame in the initial model animation includes: Determine the animation frames of the initial model animation, and for each model bone in the animation frame, calculate the amount of change between the model bone and the model bone in the adjacent previous animation frame to obtain the amount of change of the model bone; If there is a model skeleton in the animation frame whose change is not zero, the animation frame is determined to be the target animation frame.
3. The method according to claim 1, characterized in that, The step of determining the offset of the target model in the target animation frame based on the target model's change in position between the second position point and the third position point includes: The offset of the model skeleton in the target animation frame is determined based on the target change amount of the model skeleton in the target model between the second position point and the third position point.
4. The method according to claim 3, characterized in that, The step of determining the offset of the target bone corresponding to the model bone in the target animation frame based on the target change amount of the model bone in the target model between the second position point and the third position point includes: Based on the amount of change in the model bones in the target animation frame and the total amount of change in the model bones in the initial model animation, calculate the percentage corresponding to the model bones in the target animation frame; The offset of the model bone in the target animation frame is obtained by multiplying the percentage corresponding to the model bone in the target animation frame with the target change amount.
5. The method according to claim 4, characterized in that, The method further includes: The total change in the model skeleton in the initial model animation is obtained by summing the changes in the model skeleton in each animation frame.
6. The method according to claim 3, characterized in that, The step of controlling the change in the target model in the target animation frame to increase the offset to obtain the target model animation includes: The target model animation is obtained by controlling the amount of change in the model skeleton in the target animation frame and increasing the offset of the model skeleton.
7. The method according to claim 1, characterized in that, The change includes displacement change and / or rotation change; the offset includes displacement offset and / or rotation offset.
8. The method according to claim 1, characterized in that, The target model is pre-configured with a controller, which is used to control the model skeleton of the target model; After the step of controlling the change in the target model in the target animation frame to increase the offset to obtain the target model animation, the method further includes: In response to a stretching elimination command for the target model animation, a specified animation frame in the target model animation in which the target model exhibits overstretching during movement is determined. Identify the target model skeleton involved in the overstretching phenomenon, and the target controller associated with the target model skeleton, and control the target controller in the specified animation frame to offset by a specified distance.
9. The method according to claim 8, characterized in that, The step of determining, from the target model animation, a specified animation frame in which the target model exhibits overstretching during movement includes: For each animation frame in the target model animation, traverse each model bone in the animation frame. If the distance between the first model bone and the second model bone in the animation frame is greater than a preset threshold, determine that the animation frame is a specified animation frame with overstretching.
10. The method according to claim 1, characterized in that, Before the step of responding to an adjustment operation on the target model in the first model animation, the method further includes: In response to an instruction to add a controller for the target model in the first model animation, a first controller and / or a second controller are configured for the target model; wherein the first controller is a primary controller of the target model, used to control the first model skeleton of the target model; and the second controller is a secondary controller of the target model, used to control the second model skeleton of the target model.
11. The method according to claim 9 or 10, characterized in that, The first model skeleton is located at the first model position of the target model, and the second model skeleton is located at the second model position of the target model.
12. A processing device for model animation, characterized in that, The device includes: An animation copying module is used to obtain an initial model animation, and copy the initial model animation to obtain a first model animation; the initial model animation includes a target model, and the initial model animation is a movement animation of the target model from a first position point to a second position point; An animation adjustment module is used to respond to the adjustment operation of the target model in the first model animation, and adjust the movement endpoint of the target model from the second position point to the third position point; wherein, the adjusted first model animation is the movement animation of the target model from the first position point to the third position point, and the target model exhibits a smooth movement phenomenon when its bottom is touching the ground during the movement. A target animation frame determination module is used to determine a target animation frame in the initial model animation in response to an elimination instruction for the smooth movement phenomenon, wherein the target model in the target animation frame is in a non-static state; The offset determination module is used to determine the offset of the target model in the target animation frame based on the target change amount of the target model between the second position point and the third position point; The target model animation determination module is used to control the change amount of the target model in the target animation frame to increase the offset amount to obtain the target model animation; wherein, the target model animation is the movement animation of the target model from the first position point to the third position point, and there is no smooth movement phenomenon when the bottom of the target model is touching the ground during the movement.
13. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the model animation processing method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the model animation processing method according to any one of claims 1-11.