Information processing program, information processing device, and information processing method
The use of PD control for dynamic animation interpolation addresses the burden of static data methods by efficiently and smoothly transitioning joint rotations, reducing processing load and ensuring natural-looking animations.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-03-06
AI Technical Summary
Existing animation generation methods, such as those using static animation data, impose a significant development burden as they require pre-creation of animation data for all poses, and there is a need for dynamic animation generation that smoothly interpolates between adjustments without excessive processing load.
An information processing program and device that uses feedback control, specifically PD control, to dynamically interpolate animations by controlling joint rotations based on predetermined parameters, ensuring smooth transitions between initial and target postures.
Enables efficient and smooth interpolation of animations by dynamically adjusting joint rotations, reducing processing load and maintaining natural-looking animations.
Smart Images

Figure 2026037124000001_ABST
Abstract
Description
[Technical Field]
[0001] At least one embodiment of the present invention relates to an information processing program, an information processing device, and an information processing method for smoothly interpolating between animation before and after adjustment when adjusting animation dynamically in a post-processing manner depending on the situation. [Background technology]
[0002] Conventional methods for generating animations of objects involve preparing pre-registered animation data (hereinafter referred to as static animation data) for specifying the coordinates of parts of a 3D model and the rotation angles of joints in each pose to create an animation by continuously playing all poses, and then combining and using this static animation data to generate other animations. Here, "static" animation refers to animation generated by specifying the coordinates of all parts of a 3D model and the rotation angles of joints for all poses of the object. When using static animation data to automatically generate animations of objects, developers must create the static animation data in advance, which creates the problem of increasing the burden on developers as the development scale increases.
[0003] Therefore, there has been a demand for dynamic generation of animations according to the situation. Here, various calculation rules are used to dynamically generate animations. For example, there is FK (Forward Kinematics), which is a rule that calculates the amount of rotation of each joint until the target posture is reached, based on the information on the rotation angle of the specified joint, when information on the rotation angle of the joint of an object part in a target posture is specified. In addition, there is IK (Inverse Kinematics), which is a rule that dynamically calculates the rotation angle of the joint of the object part, when the coordinates of a specific part of the object part in the target posture or the direction in which the specific part faces are specified, in order to move the specific part to the specified coordinate position or to face the specified direction.
[0004] When a target posture of an object is given in animation, whether it is FK or IK, it is necessary to generate an animation by interpolating the posture state until the target posture is reached. In this case, it is necessary to smoothly interpolate between the animation before and after adjustment so that the animation does not look unnatural. Furthermore, since animation is generated dynamically, it is preferable to be able to smoothly interpolate using simple processing without imposing a processing load.
[0005] For example, Patent Document 1 discloses a technology for representing so-called "defeat movements" and accompanying movements in battle scenes with a smaller amount of data by setting an initial velocity vector according to the damage received by a damaged character, calculating the aerial trajectory and landing position based on the initial velocity vector, and interpolating the aerial posture motion that the character should take along the way. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Japanese Patent Application Laid-Open No. 2005-278957 Summary of the Invention [Problem to be solved by the invention]
[0007] Patent document 1 discloses a technique for adjusting and interpolating the character's posture and direction along the aerial trajectory of a damaged character, but does not disclose how to interpolate complex movements such as controlling the rotation of joints until the target posture is reached.
[0008] An object of at least one embodiment of the present invention is to provide an information processing program, an information processing device, and an information processing method for smoothly interpolating between animations before and after adjustment when dynamically adjusting animations according to the situation. [Means for solving the problem]
[0009] From a non-limiting perspective, an information processing program according to one embodiment of the present invention is an information processing program for causing a computer to perform a process of generating an animation of an object that is composed of a combination of parts each having at least one joint and that performs an action in a virtual space, and is characterized in that the computer is provided with a reception function for receiving a specification of a specified action to be performed by the object, and an interpolation function for obtaining a target posture of the object specified by the specified action, and for interpolating an animation of the posture state along the way to reaching the target posture by controlling the amount of rotation of the joints that need to be moved to move from the current posture state of the object using feedback control performed by setting predetermined parameters.
[0010] From a non-limiting perspective, an information processing device according to one embodiment of the present invention is an information processing device for performing processing to generate an animation of an object that is composed of a combination of parts each having at least one joint and that performs an action in a virtual space, and is characterized by comprising: a reception unit that receives a specification of a specified action to be performed by the object; and an interpolation unit that determines a target posture of the object specified by the specified action, and controls the amount of rotation of the joints that need to be moved to move from the current posture state of the object to the target posture using feedback control performed by setting predetermined parameters, thereby interpolating an animation of the posture state along the way to reaching the target posture.
[0011] From a non-limiting perspective, an information processing method according to one embodiment of the present invention is an information processing method in which a computer performs processing to generate an animation of an object that is composed of a combination of parts each having at least one joint and that performs an action in a virtual space, and is characterized by including: a reception step for receiving a specification of a specified action to be performed by the object; and an interpolation step for determining a target posture of the object specified by the specified action, and controlling the amount of rotation of the joint that needs to be moved to move the object from its current posture state to the target posture using feedback control performed by setting predetermined parameters, thereby interpolating an animation of the posture state along the way to reaching the target posture. [Effects of the Invention]
[0012] Each embodiment of the present application addresses one or more of the deficiencies. [Brief explanation of the drawings]
[0013] [Figure 1] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 2]10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 3] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 4] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 5] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 6] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 7] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 8] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 9] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 10] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 11] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 12] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 13] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 14] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 15]10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 16] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 17] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 18] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 19] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 20] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 21] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 22] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 23] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 24] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 25] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 26] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 27] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 28]10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 29] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 30] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 31] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 32] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 33] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 34] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 35] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 36] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 37] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 38] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 39] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 40] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 41]10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 42] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 43] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 44] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 45] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 46] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 47] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 48] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 49] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. [Figure 50] 10A and 10B are explanatory diagrams for explaining animation interpolation processing using feedback control employed in the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0014] A computer functioning as an information processing device corresponding to at least one of the embodiments of the present invention includes at least a CPU (Central Processing Unit), a memory, and a storage device. The CPU is a central processing unit that performs various calculations and controls. Furthermore, if the computer includes a GPU (Graphics Processing Unit), some of the various calculations and controls may be performed by the GPU. The computer executes various information processing using data appropriately read into the memory with the CPU, and stores the obtained processing results in the storage device as needed. The storage device functions as a storage medium that stores various information. The configuration of the storage device is not particularly limited, but it is preferable that it be configured to be able to store all of the necessary information. Examples of such a configuration include an HDD and an SSD. Furthermore, the information processing device may be configured to realize various functions by programs.
[0015] An information processing device according to at least one embodiment of the present invention includes at least a receiving unit and an interpolation unit.
[0016] The receiving unit has a function of receiving a designation of a designated action to be executed by an object.
[0017] Here, an object refers to a virtual entity that can be placed in a virtual space and is composed of a combination of object parts, each of which has at least one joint. There are no particular limitations on the object, as long as it is composed of a combination of object parts. The connections between object parts may be jointed or fixed. Examples of object types include various types of humanoid objects and four-legged animal-like objects. Such object configurations are prepared in advance as 3D models. Note that the following description will be primarily based on the assumption that the object is a 3D model, but this does not exclude 2D models, and the description can also be applied to generating animations using 2D models.
[0018] Furthermore, an object part refers to a portion of a predetermined range in a three-dimensional model that constitutes an object. An object part is a portion that occupies a predetermined range within an object. An object part has at least one or more joints. A part or the whole of an object part rotates around a joint. For example, two object parts are connected to each other via a joint. Here, the boundary between multiple object parts can be determined as appropriate. For example, the range of one object part relative to the entire object can be determined, for example, using a joint as the boundary. How to handle a joint on a boundary can be determined as appropriate, but it is possible to treat it as belonging to one of the object parts, for example.
[0019] The term "designated action" refers to an action to be performed by an object part. The term "designated action information" refers to information for identifying the content of the designated action. The designated action information also includes information necessary for dynamically calculating the rotation angles of the joints to execute the designated action. The information necessary for dynamic calculation includes, for example, information specifying a target posture, a target direction of a part, or a trajectory of the part for executing the designated action, and information specifying a predetermined calculation rule for dynamically calculating the rotation angles of the joints in each posture state when executing the designated action using the information. For example, the designated action information may include a function that includes all of the information specifying the target posture, the target direction of a part, or the trajectory of the part for executing the designated action, and the information on the predetermined calculation rule for dynamically calculating the rotation angles of the joints in each posture state when executing the designated action using the information. Here, the predetermined calculation rule may be a general-purpose calculation rule (general-purpose function) that is registered and read and used when executing the designated action, or it may be an original calculation rule registered to execute a calculation process specific to the content of the designated action. Here, the function in this example means a calculation rule for dynamically calculating and outputting the rotation angles of each joint required for each posture state of a specified action to be performed by an object part based on input of a predetermined type of parameter. Note that "dynamically calculating" means that when a target posture, a target direction of a part, or a trajectory of a part for performing a specified action is specified, the posture states of the object part during the process and the rotation angles of the joints at that time are not stored in advance as animation data, but rather the rotation angles of the joints are calculated and obtained each time to achieve the optimal posture state according to the situation.
[0020] The interpolation unit has the function of determining the target posture of the object specified by the specified action, and controlling the amount of rotation of the joints that need to be moved to move the object from its current posture state to the target posture using feedback control performed by setting predetermined parameters, thereby interpolating the animation of the posture state along the way to reaching the target posture.
[0021] Below, we explain the use of feedback control in animation interpolation processing (Figure 1).
[0022] When you want to move an enemy character's position so that it tracks a moving player, or when you want to adjust the direction of their head so that they're gazing at a target, you need an animation that smoothly follows the target. A common way to implement such animations as program processing is to use algorithms that smoothly change values representing position or direction using curves defined by functions. On the other hand, by applying feedback control algorithms, often used in mechanical engineering, to value-changing processes, it becomes easier to handle cases where the target value changes dynamically or where external disturbances are added to the value of the controlled object. Below, we will explain the mathematical properties of this latter feedback control method and how it can be applied to animation, and demonstrate its wide applicability to interpolation and tracking animation processing in game programs.
[0023] [What I want to convey in the following explanation (Figure 2)] (1) When you want to interpolate and smoothly change the angle or position, you can use feedback control (hereinafter also referred to as PD control). (2) Using PD control can sometimes make it easier to implement a program and create data than using geometric interpolation methods. (3) Understanding the characteristics of PD control will help you decide which method to use.
[0024] [What is the change in angle (Figure 3)] For example, when the object being gazed at changes, the angle of the head is changed.
[0025] [Achieving smooth angle changes through interpolation (Figure 4)] Smoothly interpolate between the two angles θ1 and θ2. Neck angle θ1 relative to gaze position (1) Neck angle θ2 relative to gaze position (2)
[0026] [Look-at IK (Figure 5)] The angle of the neck changes up, down, left and right to smoothly follow the object of gaze.
[0027] [Utilizing Look-at IK in FINAL FANTASY XVI (Figure 6)] (Gameplay) Make the character focus on the target when the game is running. (In-game event) Combined with animation data, it performs the necessary gaze changes to express events (note: Look-at IK is not used during execution in large-scale cutscenes).
[0028] [Event (Figure 7)] The character's line of sight during an event differs between when Look-at IK is off and when Look-at IK is on.
[0029] [Feedback control (Fig. 8)] How should you operate the rudder of a ship when you want to smoothly change the direction of the ship?
[0030] [Control formulation (Fig. 9)] (Control object) Target direction θ g Current direction of travel θ (The direction of travel becomes equal (θ=θ g )Turn the steering wheel How far can I turn the steering wheel? How fast should I turn it?
[0031] [Classical control theory (Fig. 10)] One degree of freedom (one variable) PD control (a feedback control method) The control target is the position and angle of the object. · Position and angle follow the motion due to inertia (weight). The control method is that the position and angle cannot be directly manipulated, but are changed indirectly by applying external force.
[0032] [Application of PD control to animation interpolation processing (Fig. 11)] (PD control) A method for moving an object with inertia to a target position. · The methods of control and the nature of the movement are well studied (established in the 1940s). (Application to animation interpolation processing) · The trajectory to move to the target position using PD control is the interpolation result. 1) Dynamically simulate the movement of the object under control. 2) The result is realistic movement. ·Research results on control are available.
[0033] [Animation Interpolation (Figure 12)] Source animation → (instant switch) → Destination animation This results in a discontinuous change in posture. I want to interpolate and smooth out the posture changes when switching. Position continuity · Speed continuity
[0034] [Geometric Interpolation (1) (Fig. 13)] Source animation → (linear interpolation) → destination animation (linear interpolation) The position is interpolated to a continuous value. The velocity becomes discontinuous. →The speed changes suddenly at the start and end of interpolation.
[0035] [Geometric Interpolation (2) (Fig. 14)] Source animation → (curve interpolation) → destination animation (curve interpolation) Velocity is also interpolated to a continuous value. -Calculate the interpolation weight using a smooth curve.
[0036] [Geometric Interpolation (3) (Figure 15)] Source animation → (inertial interpolation) → destination animation (inertial interpolation) Interpolation based on the position and velocity (slope) of the start and end points. -The processing load during interpolation can be reduced. →Do not refer to the source or destination animation during interpolation.
[0037] [Properties of Interpolation by Geometric Methods (Fig. 16)] Smoothly connects the values between the start and end points. Specify the time length until the interpolation ends. →The time from the start point to the end point of the interpolation. How do I determine the length of time for interpolation? →Adjust the length depending on the nature of the animation to be interpolated.
[0038] [<Comparison> Geometric Interpolation vs. Feedback Control Interpolation (Fig. 17)] (geometric interpolation) -Smooth interpolation can be performed over a specified time period. The length of time needs to be adjusted. (Interpolation by feedback control) -Smooth interpolation results are obtained using a dynamic model. →The target position can be easily changed even during interpolation. Interpolation does not necessarily finish within a certain time. → (Advantage) Interpolation time is automatically adjusted according to the situation. → (Disadvantage) The exact length of the interpolation time cannot be guaranteed.
[0039] [Dynamic model of feedback control (PD control) (Fig. 18)] (1) Object to be controlled (weight m) · Track the object's position x to the target. (2) Spring (strength k p ) - Works to eliminate deviation from the target position. ·k p The larger the value, the faster it will follow. (3) Viscous resistance (strength k d ) - Acts in the opposite direction to the speed of the object. ·k d Increasing the value of makes the following motion stable.
[0040] [PD control equation of motion (Fig. 19)] m(d 2 x / dt 2 )=F =k p (x g -x)-k d (dx / dt) Acceleration of the object (d 2 x / dt 2 ) is proportional to the force F applied to the object. ·Target position x g The greater the difference between the current position x and the target position, the greater the spring force that pulls the object to the target position. The greater the object's speed (dx / dt), the greater the viscous resistance force that damps the speed.
[0041] [Feedback control (Fig. 20)] Apply force from the outside. →The velocity of an object changes as a result of an external force being applied to it. → Feedback of viscous force resisting velocity: -k d (dx / dt) →The position of an object changes as a result of applying an external force. → Spring force feedback to correct positional deviation:k p (x g -x)
[0042] [PD control in game programs (Fig. 21)] PD control is easy to implement in games. Weight m, strength k p , k d(In the real world, weight, spring strength, etc. depend on the actual object.) Implementation in the game -Weight is fixed at m=1 and eliminated from the calculation formula. There are two adjustment parameters: (1) spring k p , (2) viscous resistance k d . This is an adjustment parameter for interpolation using PD control.
[0043] [Implementation example (Figure 22)] struct PD { float x, v; / / Current position and current speed (current state) float k p , k d ; / / Spring and viscous resistance (adjustment parameters) / *m(d 2 x / dt 2 )=k p (x g -x)-k d (dx / dt) , m=1 * / void update(float dt, / / time step float x g ) { / / target position float F = k p * (x g - x) - k d * v; / / (1) m(d 2 x / dt 2 ) v += dt * F; / / (2) Update the velocity x += dt * v; / / (3) Update position } }
[0044] [Spring k p (without viscous resistance) (Figure 23)] →Target position x g It cannot stop at the target position x g It goes back and forth between these two.
[0045] [Spring k p and viscous resistance k d (PD control) (Fig. 24)] Object position x is the target position x g approaching. Spring p and viscous resistance k d The way it approaches changes depending on the strength of the attack. (1) Critically damped, (2) Underdamped, (3) Overdamped
[0046] [Approaching the target (1) Critical damping (Figure 25)] k d =2(k p ) 0.5 This is called critical damping. - It does not pass over the target position and takes less time to reach it. Setting example k p =40, k d =12.5
[0047] [Approaching the target (2) Underdamping (Figure 26)] Viscous resistance k rather than critical damping d When decreasing → Pass the target position a little and then return. ·k d =(2k p ) 0.5 is a highly responsive and commonly used setting. Setting example k p =40, k d =8
[0048] [Approaching the target (3) Overdamping (Figure 27)] Viscous resistance k rather than critical damping d When increasing →It's difficult to reach the target position. Setting example k p =40, k d =15
[0049] [Speed Limit (Figure 28)] The speed of the interpolation result is kept below a certain level.
[0050] [Implementation of speed limit (Figure 29)] void PD::update(float dt, float x g , float vMax) / / maximum speed { / *m(d 2 x / dt 2 )=k p (x g -x)-k d (dx / dt), m=1 * / float F = k p * (x g - x) - k d *v; v += dt * F; / / (2) Update the velocity v = std::clamp(v, -vMax, vMax); / / clamp the speed x += dt * v; / / (3) Update position }
[0051] [Time to reach near the target position (Figure 30)] (Critical damping) Approximately 2π / (k p ) 0.5 It will reach the target in about a second. (PD control adjustment parameters) Spring strength k p It would be more intuitive if you could adjust the number of seconds until the target is reached, rather than directly specifying the initial velocity and viscous resistance k d The actual number of seconds varies depending on the
[0052] [Characteristics of interpolation by PD control (Fig. 31)] (1) Smooth interpolation results can be obtained using a dynamic model. (2) The time required for interpolation changes dynamically. The interpolation time is determined roughly by the adjustment parameters. The interpolation time varies depending on the state at the moment the interpolation begins. (3) It approaches the target position infinitely, but mathematically it never coincides with the target position (it asymptotically approaches).
[0053] [Approaching the target value (Fig. 32)] How many seconds after turning off the effect can I cut off the PD control? Mathematically, it will only get closer to the initial value, but will not match. →The moment the effect of PD control is cut, a discontinuous change may occur.
[0054] [PD control off timing (Fig. 33)] Detecting when the effect of PD control is sufficiently reduced (1) Difference from target value (x g -x) is sufficiently small. (2) The absolute value of the velocity (dx / dt) is sufficiently small. →After these conditions are met, blending out using geometric interpolation can be used in combination.
[0055] [PD control tracking (Fig. 34)] A constant delay occurs for a moving target (steady-state error) (*PID control is required to eliminate tracking errors)
[0056] [Animation data and PD control (Figure 35)] Can animation data be reproduced using PD control? - Tracks joint angles as targets for each frame. →The tracking result will lag behind the animation data.
[0057] [I want to eliminate the delay in tracking joint angles (Figure 36)] Spring k p and viscous resistance k d What if you adjust it to improve tracking? Input animation data is reproduced with high accuracy. The advantage of obtaining smooth interpolation results is lost.
[0058] [PD control of joint angles (Figure 37)] It is a bad idea to use joint angles as direct target values. If you want to change the animation angle with Look-at IK →It is a good idea to set the angle change (offset) due to IK as the control target. (1) The angle you want to achieve = (animation angle + offset angle). (2) The offset angle is tracked as a target in PD control. (3) Apply the tracking results to the character's posture.
[0059] [PD control target quantity (Figure 38)] (Interpolation of one-dimensional quantities) ·position Rotation angle (Interpolation of vectors and rotations) 3D unit vector ·Quaternion
[0060] [3D unit vector interpolation using PD control (Fig. 39)] (Exact interpolation method) Interpolation on the unit sphere where the unit vector (x,y,z) exists. (Simplified method) (1) Interpolate the components x, y, and z of a unit vector separately. (2) Normalize the vector length to 1. → A simple method is sufficient for Look-at IK interpolation (note that interpolation between completely opposite vectors is not possible)
[0061] [Quaternion interpolation with PD control (1 / 2) (Figure 40)] (Exact interpolation method) - Separate interpolation of rotation axis components x, y, z and angle component w (1) The rotation axis components x, y, and z are interpolated as unit vectors. (2) The angle component w is converted back to the angle θ from cosine cosθ and then interpolated. (3) Adjust (normalize) the vector length of the rotation axis component based on the magnitude of the cosine after interpolation. (Simplified method) Interpolate each x, y, z, and w component separately and then normalize. →This is sufficient for Look-at IK interpolation.
[0062] [Quaternion interpolation with PD control (2 / 2) (Figure 41)] (Angular velocity and angle limits) The w component of the quaternion represents the cosine of the rotation angle. w=cos(θ / 2) ·The angle θ can be calculated from the w component and θ can be limited. There is no need to calculate the angle θ. The value range of θ is -π≦θ≦π, and cos(θ / 2) monotonically increases in this range. Maximum angle θ max When you want to limit (1) In advance max =cos(θ max / 2). (2) Set the w component to w≦w max Limit the range to.
[0063] [Calculation error when PD control has high tracking ability (when the spring is strong) (Fig. 42)] A naive implementation updates the values using forward differencing. v += dt * F; x += dt * v; This method is an approximation and may differ from the actual result. Spring p When this is a strong factor, calculation errors tend to become large. -It may become increasingly distant from the target value (diverge). →The time step dt needs to be adjusted to be smaller to reduce the error. (※Strong spring = short vibration period)
[0064] [Implementation example of time step adjustment (Fig. 43)] struct PD { void stepUpdate(float dt, float xg ) { float dtMax = 1.0f / 120; / / Upper limit of time step (example) while (dt > 0.0f) { float stepDt = std::fmin(dt, dtMax); update(stepDt, x g ); / / At time intervals that do not exceed dtMax → dt -= safeDt; / / → Therefore, update in several steps } } }
[0065] [Stable PD (Figure 44)] A method that eliminates the need to adjust the time step dt. Spring p Even when the effect is strong, there is no need to consider the upper limit of the time step. Uses backward difference method and first-order Taylor expansion The condition for the results not to diverge is k p / k p >dt → Common settings in games meet this condition.
[0066] [Stable PD (Figure 45)] (force F by forward difference method) F=k p (x g -x n )-k d (dx n / dt) x n ,(dx n / dt) is the current position and velocity (force by backward difference method) F=k p (x g -x n+1 )-k d (dx n+1 / dt) [1] x n+1 ,(dx n+1 / dt) is the future position and velocity The future value is approximated by Taylor first order and replaced with the current value. x n+1 =x n +dt(dx n / dt) [2] (dx n+1 / dt)=(dx n / dt)+dt(d 2 x n / dt 2 )=(dx n / dt)+dtF [3] Replace the future values in equation [1] with the approximations [2][3] above. F=k p (x g -x n +dt(dx n / dt))-k d ((dx n / dt)+dt(d 2 x n / dt 2 )) [4] Force F by backward difference method [5] Approximation formula using current value F={k p (x g -x n +dt(dx n / dt))-k d (dx n+1 / dt)} / (1+dtk d )
[0067] [Stable PD implementation example (Fig. 46)] void PD::stableUpdate(float dt, / / time step float x g ) { / / target position / / (1') m(d 2 x / dt 2 ) float F = k p * (x g - x - dt * v) - k d *v; v += dt * F / (1.0f + k d * dt); / / (2') Update the speed x += dt * v; / / (3) Update position }
[0068] [Implementation of Look-at IK function using PD control (Fig. 47)] - Smoothly follows the target position. -A series of joints move from the head and neck to the spine and pelvis to follow. - Weight shift due to change in gaze direction. The movement of the rib cage provides a recoil to the arms. Adjust the posture of both legs.
[0069] [Event (Figure 48)] The character's line of sight during an event differs between when Look-at IK is off and when Look-at IK is on.
[0070] [Gameplay (Figure 49)] The character's line of sight during gameplay differs between when Look-at IK is off and when Look-at IK is on.
[0071] [Overall summary (Figure 50)] (1) When you want to interpolate and smoothly change the angle or position, you can use feedback control (PD control). (2) Using PD control can sometimes make it easier to implement a program and create data than using geometric interpolation methods. (3) Understanding the characteristics of PD control will help you decide which method to use.
Claims
1. An information processing program for causing a computer to execute a process of generating an animation of an object that is configured by a combination of parts each having at least one joint and that performs an action in a virtual space, the program comprising: The computer, a receiving function for receiving a designation of a designated action to be executed by the object; An interpolation function that calculates a target posture of the object specified by the specified action, and controls the rotation amount of the joints that need to be moved to move from the current posture state of the object to the target posture using feedback control with specified parameters, thereby interpolating the animation of the posture state on the way to the target posture. An information processing program that makes this possible.
2. An information processing device for performing processing to generate animation of an object that is configured by a combination of parts each having at least one joint and that performs an action in a virtual space, a receiving unit that receives a designation of a designated action to be executed by the object; an interpolation unit that calculates a target posture of the object designated by the designated action, and controls the rotation amount of the joints that need to be moved to move the object from its current posture state to the target posture by feedback control using predetermined parameters, thereby interpolating animation of the posture state along the way until the target posture is reached; An information processing device comprising:
3. An information processing method for generating an animation of an object that is configured by a combination of parts each having at least one joint, and that performs an action in a virtual space, by a computer, comprising: a receiving step for receiving a designation of a designated action to be executed by the object; an interpolation procedure for obtaining a target posture of the object designated by the designated action, and controlling the rotation amount of the joints that need to be moved to move the object from its current posture state to the target posture by feedback control using predetermined parameters, thereby interpolating animation of the posture state along the way until the target posture is reached; An information processing method including:
Citation Information
Patent Citations
Program, information storage medium and game device
JP2005278957A