Method, device and equipment for motion simulation of rope model and storage medium
By acquiring multiple animation frames and correcting the position of the virtual joints of the rope model based on preset external forces and constraints, the problem of motion coupling between multiple joint chains was solved, achieving high-precision motion simulation of the rope model and improving visual realism and dynamic effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies cannot effectively handle motion coupling between multiple joint chains when performing motion simulation on rope models, resulting in abnormal display effects such as uncontrolled chain spacing and cross-penetration, which affects the visual realism.
By acquiring multiple animation frames, and based on preset motion external forces and rope constraints, the position of each virtual joint is predicted and corrected. The length and bending rationality of a single joint chain are maintained by using intra-chain constraints, and the inter-chain constraints coordinate the relative positions of multiple joint chains to achieve multi-chain collaborative deformation and mutual constraint.
It significantly improves the motion realism and visual credibility of the rope structure, prevents abnormal display effects such as ropes penetrating the character's body or violating the principles of mechanics, and ensures that the rope model presents a natural dynamic effect that fits the target object in every frame.
Smart Images

Figure CN122176128A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for simulating the motion of a rope model. Background Technology
[0002] With the continuous development of science and technology, 3D simulation technology in various fields is increasingly pursuing accuracy and realism in simulating the real world. For example, in the fields of character animation, visual effects, and video generation, there are high requirements for the realism of the simulated 3D models. That is, it is hoped that these 3D models can present motion trajectories that conform to the laws of real physics as much as possible.
[0003] Taking 3D character animation as an example, in order to create more exquisite and realistic character models, certain elements are usually superimposed on the character's clothing, and a major category of these elements is rope-type accessories. For example... Figure 1 As shown, rope-type accessories on a character model's clothing typically need to sway in sync with the character's movement to make the animation as vivid as possible. To achieve this effect, it's necessary to perform physical simulations on the rope-type accessories (hereinafter referred to as rope models) to simulate their motion.
[0004] Currently, most related technologies are based on rigid body mechanics models to simulate the motion of rope models. These methods typically model the rope as a joint chain connecting multiple mass points (also known as rigid body elements), and calculate the torque borne by each joint in motion based on Newtonian mechanics, and then gradually solve for the position of each virtual joint in the motion phase.
[0005] However, the above method is limited to the internal structure of a single joint chain and cannot establish coupling of motion states between different joint chains. Therefore, when dealing with complex rope models composed of multiple joint chains, the motion of each joint chain is independent of each other, which can easily lead to problems such as uncontrolled chain spacing and cross-penetration, resulting in abnormal display effects such as ropes penetrating the character's body and rope motion trajectories violating the principles of mechanics.
[0006] Therefore, how to perform high-precision motion simulation of the rope model is an urgent problem to be solved. Summary of the Invention
[0007] This application provides a method, apparatus, device, and storage medium for motion simulation of a rope model, used for high-precision motion simulation of the rope model.
[0008] In a first aspect, embodiments of this application provide a motion simulation method for a rope model, including: Multiple animation frames are acquired; wherein, the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; Based on the playback order of the multiple animation frames, for each non-first frame other than the first frame, the following steps are executed sequentially: Based on the preset external motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. Based on the preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between each virtual joint in each joint chain, and inter-chain constraint conditions for constraining the relative position between each joint chain. Based on the physical positions of the multiple virtual joints, the rope model in the non-first frame is corrected.
[0009] Secondly, embodiments of this application also provide a motion simulation device for a rope model, comprising: The data acquisition unit is configured to acquire multiple animation frames; wherein the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; The motion simulation unit is configured to, based on the playback order of the plurality of animation frames, sequentially execute the following for each non-first frame other than the first frame: Based on the preset external motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. Based on the preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between each virtual joint in each joint chain, and inter-chain constraint conditions for constraining the relative position between each joint chain. Based on the physical positions of the multiple virtual joints, the rope model in the non-first frame is corrected.
[0010] In this embodiment, the first virtual joint of each joint chain is bound to the target model; the initial position of each virtual joint is corrected based on the preset rope constraint conditions to obtain the physical position of each virtual joint in the non-first frame. The motion simulation unit is specifically configured as follows: The preset animation position of the first virtual joint in each joint chain in the non-first frame is taken as the physical position of the first virtual joint in the joint chain. Based on the constraints within the chain, and referring to the physical position of the first virtual joint in each joint chain, the initial positions of each virtual joint other than the first virtual joint in each joint chain are corrected to obtain the middle position of each other virtual joint. Based on the inter-chain constraints, the intermediate positions of each of the other virtual joints are corrected to obtain the physical position of each of the sub-joints.
[0011] In this embodiment of the application, the intra-chain constraints include: The relative distance between any two adjacent virtual joints falls within a preset range of intra-chain distances. The curvature between every three consecutive virtual joints falls within a preset range of intra-chain curvature. The relative distance between each target joint and its associated joint falls within a preset association distance range; wherein, the target joint is a virtual joint bound to the target model in a joint chain, and the target joint is not a head virtual joint; the associated joint is a virtual joint in the target model.
[0012] In this embodiment of the application, the inter-chain constraints include: The relative distance between the end virtual joints of each pair of joint chains falls within a preset range of inter-chain distances. The curvature between multiple joints to be processed corresponding to each pair of joint chains falls within a preset range of inter-chain curvature; wherein, the multiple joints to be processed include: the end virtual joints of each of the two joint chains, and a virtual joint adjacent to an end virtual joint.
[0013] In this embodiment, each virtual joint corresponds to a reference joint; the reference joint is an adjacent joint within the same joint chain as the corresponding virtual joint; the motion simulation unit is specifically configured to correct the rope model in the non-first frame based on the physical positions of the multiple virtual joints, and the motion simulation unit is specifically configured as follows: For each virtual joint, the following steps are performed: determining a first physical direction from the physical position of the virtual joint to the physical position of the corresponding reference joint; and determining a first animation direction from the animation position of the virtual joint in the non-first frame to the animation position of the corresponding reference joint in the non-first frame. Obtain the first rotation angle between the first physical direction and the first animation direction; Based on the first rotation angle, the current rotation angle of the virtual joint is corrected.
[0014] In this embodiment of the application, the motion simulation unit is specifically configured to correct the current rotation angle of the virtual joint based on the first rotation angle. When the virtual joint is not the end virtual joint in the joint chain, the first rotation angle is used to correct the current rotation angle of the virtual joint; When the virtual joint is the end virtual joint in a joint chain, the current rotation angle of the virtual joint is corrected based on the first rotation angle, combined with the physical position of the end virtual joints of the plurality of joint chains and the animation position of the end virtual joints of the plurality of joint chains in the non-first frame.
[0015] In this embodiment, the motion simulation unit is specifically configured to correct the current rotation angle of the virtual joint based on the first rotation angle, combined with the physical position of the end virtual joints of the plurality of joint chains, and the animation position of the end virtual joints of the plurality of joint chains in the non-first frame. The physical centroid position is determined based on the physical position of the terminal virtual joints of each of the plurality of joint chains; The animation centroid position is determined based on the animation position of the terminal virtual joints of the multiple joint chains in the non-first frame. Determine a second physical direction from the physical position of the virtual joint to the physical centroid position; and determine a second animation direction from the animation position of the virtual joint in the non-first frame to the animation centroid position. Based on the first rotation angle, an interpolation operation is performed on the second rotation angle between the second physical direction and the second animation direction to obtain the corrected rotation angle of the virtual joint; The current rotation angle of the virtual joint is corrected using the corrected rotation angle.
[0016] In this embodiment of the application, the motion simulation unit is specifically configured to perform the correction of the rope model in the non-first frame based on the physical positions of the plurality of virtual joints, and the motion simulation unit is configured as follows: For each virtual joint, the following steps are performed: interpolation calculations are performed on the physical position of the virtual joint and its animation position in the non-first frame based on preset weights to obtain the target position of the virtual joint; Adjust the animation position of the virtual joint in the non-first frame to be the same as the target position.
[0017] Thirdly, embodiments of this application also provide an electronic device, including: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the method described in the first aspect according to the obtained computer program.
[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program for causing a computer to perform the method described in the first aspect.
[0019] Fifthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0020] The beneficial effects of this application are as follows: In this embodiment, multiple animation frames are pre-acquired to describe the motion trajectory of a rope model composed of multiple joint chains. Each joint chain includes multiple virtual joints connected sequentially, providing a topological basis for simulating multi-anchor-point fixed structures such as necklaces and multi-ended belts. In the first frame, the animation position of each virtual joint is directly used as its physical position, ensuring that the initial posture is consistent with the art setting and avoiding initial jitter. In non-first frames, the position of each virtual joint is predicted based on the preset motion external force and the physical position of the previous frame to obtain the initial position, enabling the dynamics to have a realistic inertial response. Subsequently, the initial position is corrected based on rope constraints: the intra-chain constraints are used to maintain the length stability and bending rationality of a single joint chain, and the inter-chain constraints are used to constrain the relative positions between different joint chains, realizing multi-chain collaborative deformation and mutual restraint, effectively preventing abnormalities such as the rope penetrating the character's body or violating mechanical principles. Finally, the rope model in non-first frames is updated based on the corrected physical positions of each virtual joint, so that it presents a natural dynamic effect that fits the movement rhythm of the target object in each frame, significantly improving the motion realism and visual credibility of the rope structure.
[0021] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures indicated in the written description, claims, and drawings. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram of a rope model provided in an embodiment of this application; Figure 2 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application; Figure 3 A flowchart illustrating the motion simulation method for the rope model provided in this application embodiment; Figure 4 A schematic diagram of the articulated chain provided in the embodiments of this application; Figure 5 A schematic diagram of a rope model of a multi-joint chain provided in an embodiment of this application; Figure 6 A schematic diagram of the bending angle formed by three virtual joints provided in an embodiment of this application; Figure 7 A schematic diagram of the target joint provided in the embodiments of this application; Figure 8 A schematic diagram of the inter-chain curvature corresponding to two joint chains provided in an embodiment of this application; Figure 9 A schematic diagram of the inter-chain curvature corresponding to two joint chains provided in an embodiment of this application; Figure 10 A schematic diagram of the correction process using rope term constraints provided for embodiments of this application; Figure 11 This is a schematic diagram of intra-chain distance constraint correction provided in an embodiment of this application; Figure 12 This is a schematic diagram of the chain curvature constraint correction provided in an embodiment of this application; Figure 13 This is a schematic diagram of inter-chain distance constraint correction provided in an embodiment of this application; Figure 14 This is a schematic diagram of inter-chain curvature constraint correction provided in an embodiment of this application; Figure 15 A schematic diagram illustrating the animation rotation position correction of a virtual joint provided in an embodiment of this application; Figure 16 A schematic diagram illustrating the animation rotation position correction of the end effector virtual joint provided in the embodiments of this application; Figure 17 A structural diagram of the motion simulation device for the rope model provided in the embodiments of this application; Figure 18 A hardware structure diagram of the electronic device provided in the embodiments of this application; Figure 19 This is another hardware structure diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0024] The following describes some of the concepts involved in the embodiments of this application: (1) Skeletal Animation: Skeletal animation is an animation technique that drives the deformation of a model (i.e., skinning) through a hierarchical skeletal structure. Its core lies in constructing a tree-like hierarchical system composed of bones, with the root bone usually located at the model's center of gravity. The transformations of child bones inherit and superimpose the transformation matrices of the parent bones, thereby simulating the linkage effect of biological joints. Animators set parameters such as rotation and translation of bones in keyframes and use interpolation algorithms to generate smooth transitions. Each vertex on the skin can be affected by multiple bones with specific weights (the sum of the weights is 1). The final position of the vertex is dynamically determined by calculating the weighted blending value of the transformation matrices of each bone. This not only eliminates the problem of cracks at joints when the model moves, but also significantly improves the realism of the animation and storage efficiency.
[0025] (2) Bones and joints: Skeleton and joints are the core elements constituting the character animation skeleton system. Joints are the connection points or rotation centers in the skeleton, defining the relative positions and hierarchical relationships between bones, and are usually considered as the origin of the skeletal spatial coordinate system. Bones are considered as line segments or directed line segments connecting two joints, representing the transformation relationship between joints, and their spatial orientation and length are determined by the joints. The entire skeleton is usually organized in a tree-like hierarchical structure with parent-child hierarchical relationships. Transformations of parent joints / bones (such as rotation and translation) will cause all its child joints / bones to move synchronously, thus creating a linkage effect.
[0026] The virtual joint mentioned in the embodiments of this application refers to the joint structure in the skeleton used in three-dimensional simulation.
[0027] (3) The pose of the virtual joint: In the embodiments of this application, the pose of the virtual joint includes position coordinates and rotation coordinates. These two data together are called pose. The physical quantity of pose describes the precise parameters of the position, orientation and scaling state of each joint in the skeleton system relative to a specific reference frame at a specific moment. It defines the instantaneous static posture of the skeleton in space.
[0028] (4) Position-Based Dynamics (PBD): The PBD algorithm is a widely used physics simulation method in computer graphics. Its core idea is to bypass traditional force-based dynamics calculations (i.e., not directly integrating forces to obtain acceleration and velocity), and instead correct particle positions by directly defining and solving geometric constraints, thereby simulating physical effects. This method first updates the particle velocity and position based on preset external forces. Then, it constructs constraint functions (such as distance constraints, volume constraints, or shape matching constraints) to describe the geometric relationships that particles should satisfy. An iterative projection algorithm is then used to continuously approximate the constraint satisfaction conditions with the system state. Finally, the corrected positions are used to update the velocity in reverse.
[0029] (5) Quaternion interpolation: Quaternion interpolation is a method for smoothly transitioning between two rotations in a three-dimensional rotational space, widely used in game animation, robot control, and computer graphics. Specifically, quaternion interpolation is a mathematical method for smoothly transitioning attitude points representing rotations on a three-dimensional sphere (S3) composed of unit quaternions. Its core lies in maintaining the constancy of angular velocity and minimizing the path during the interpolation process. The main methods include spherical linear interpolation (Slerp) and spherical quadrilateral interpolation (Squad).
[0030] (6) Joint chain: A joint chain refers to a chain-like structure formed by multiple virtual joints connected sequentially in a 3D simulated rope model. Each joint chain connects its virtual joints from beginning to end, forming a flexible and extendable chain used to simulate the morphology and dynamics of ropes or other flexible structures. This arrangement helps ensure coordination and continuity within a single joint chain and between multiple joint chains.
[0031] It should be noted that the embodiments of this application involve operations such as obtaining motion description information of the previous animation frame and the previous correction result. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the requesting party is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0032] The design concept of the embodiments of this application is briefly introduced below: As mentioned earlier, in order to create more exquisite and realistic character models, certain elements are usually superimposed on the character's clothing, and a major category of these elements is rope-type accessories. For example... Figure 1 As shown, rope-type accessories on a character model's clothing typically need to sway in sync with the character's movement to make the animation as vivid as possible. To achieve this effect, it's necessary to perform physical simulations on the rope-type accessories (hereinafter referred to as rope models) to simulate their motion.
[0033] Currently, most related technologies are based on rigid body mechanics models to simulate the motion of rope models. These methods typically model the rope as a joint chain connecting multiple mass points (also known as rigid body elements), and calculate the torque borne by each joint in motion based on Newtonian mechanics, and then gradually solve for the position of each virtual joint in the motion phase.
[0034] For example, in Unreal Engine (UE), a commonly used 3D modeling engine, the system treats each segment of the rope model as a virtual joint and creates corresponding rigid body elements (such as capsules, spheres, etc.) for it. Multiple rigid body elements are connected sequentially through rigid body constraints to form a joint chain. During motion simulation, the engine calls a multi-rigid-body dynamics solver (such as PhysX) to calculate the gravity, collision force, constraint reaction force, etc., acting on each rigid body element according to Newtonian mechanics, and solves the position of each virtual joint during the motion phase by integrating acceleration based on Newton's second law (F = ma).
[0035] While the aforementioned methods offer high physical accuracy, they suffer from high computational costs and complex parameter tuning. More critically, the motion simulation logic of this approach is confined to the internal workings of a single joint chain, failing to establish coupling relationships between different joint chains. Consequently, when processing complex rope models composed of multiple joint chains, the independent motion of each chain easily leads to problems such as uncontrolled chain spacing, cross-penetration, and end-point drift. This results in abnormal display effects, such as ropes penetrating the character's body or rope trajectories violating mechanical principles, severely impacting visual realism and the interactive experience.
[0036] In view of this, this application proposes a method, apparatus, device, and storage medium for simulating the motion of a rope model. In the embodiments of this application, multiple animation frames are pre-acquired; these multiple animation frames are used to describe the motion trajectory of the rope model, which includes multiple joint chains, each joint chain comprising multiple virtual joints. Thus, by structuring the rope model into a composite system composed of multiple joint chains, with each joint chain containing multiple virtual joints connected sequentially, a basic topology support is provided for simulating complex rope structures with multiple anchor points, such as necklaces or multi-ended belts.
[0037] Next, based on the playback order of multiple animation frames, the process is executed sequentially for each non-first frame (excluding the first frame). For each non-first frame, based on a preset motion force and the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain its initial position in the non-first frame. In the first frame, the animation position of each virtual joint is its physical position.
[0038] In this way, by directly using the animation position as the physical starting point in the first frame, the initial posture set by the art can be seamlessly inherited, avoiding initial jitter or deformation distortion caused by physical initialization deviation. At the same time, by introducing preset external motion forces such as gravity and wind in subsequent non-frames, the position of the virtual joints can be predicted, making the rope dynamics more realistic and possessing inertial response and motion trend that conform to the laws of real physics.
[0039] Subsequently, based on preset rope constraints, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in non-first frames. The rope constraints include: intra-chain constraints to constrain the relative positions between virtual joints within each joint chain, and inter-chain constraints to constrain the relative positions between joint chains. In this way, not only are the length stability and bending rationality of a single joint chain maintained through intra-chain constraints, but the geometric relationships between different joint chains are also established through inter-chain constraints. This allows the multi-chain structure to deform collaboratively and constrain each other during movement, effectively preventing abnormal display effects such as ropes penetrating the character's body or rope movement trajectories violating mechanical principles.
[0040] Finally, based on the physical positions of multiple virtual joints, the rope model in non-first frames is corrected. The corrected physical positions are then fed back to the geometric representation of the rope model, ensuring a natural dynamic effect that matches the movement rhythm of the target object in each frame. This enhances the realism and visual credibility of the rope structure's motion.
[0041] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0042] like Figure 2 The diagram shown illustrates an application scenario of a motion simulation method for a rope model according to an embodiment of this application. This application scenario includes a terminal device 210 and a server 220.
[0043] Terminal device 210 is a front-end device used to run 3D character animation content and present rope models to the requesting party. This includes, but is not limited to, terminal devices with graphics rendering and animation playback capabilities such as smartphones, tablets, laptops, desktop computers, game consoles, or VR / AR headsets. These devices can load character animation data containing multiple animation frames and perform motion simulation of the rope model with local or remote support to achieve dynamic effects for multi-terminal fixed rope ornaments such as necklaces, belts, and pendants.
[0044] Server 220 is a backend system that provides motion simulation calculation services for rope models. It can be deployed in a local data center, a distributed computing cluster, or a cloud service platform. It can be a standalone physical server or a server cluster or distributed system consisting of multiple physical servers.
[0045] In addition, the server 220 can also have the capabilities of animation data processing, constraint parameter configuration, physical simulation calculation and result return, and can maintain preset simulation resources such as intra-chain constraints, inter-chain constraints and preset motion external force models.
[0046] The terminal device 210 and the server 220 are connected through a communication network, which can be a wired network or a wireless network, such as Wi-Fi, 4G / 5G network, etc., to transmit key parameters such as animation frame data, rope model topology information, and virtual joint physical positions in simulation results.
[0047] It should be understood that the motion simulation method of the rope model in the various embodiments of this application can be executed by an electronic device, which can be a server 220 or a terminal device 210. That is, the method can be executed independently by the server 220 or completed collaboratively by the terminal device 210 and the server 220.
[0048] For example, in a scenario where terminal device 210 and server 220 work together, terminal device 210 pre-acquires multiple animation frames; these multiple animation frames are used to describe the motion trajectory of a rope model, which includes multiple joint chains, each of which includes multiple virtual joints.
[0049] Terminal device 210 sends the multiple animation frames, the joint chain structure information of the rope model, and the animation position of each virtual joint in the first frame to server 220.
[0050] Based on the playback order of multiple animation frames, the server 220 performs the following operations sequentially for each non-first frame other than the first frame: based on the preset motion external force and combined with the physical position of each virtual joint in the previous frame, it performs position prediction for each virtual joint to obtain its initial position in the non-first frame; then, based on the preset rope constraint conditions, it corrects the initial position to obtain the physical position of each virtual joint in the non-first frame, and returns the physical position of each virtual joint to the terminal device 210.
[0051] Terminal device 210 receives the physical location returned by server 220, and updates and renders the rope model in non-first frames accordingly to achieve realistic dynamic effects.
[0052] In this embodiment, the terminal device 210 can locally cache the physical positions of each virtual joint in the non-first frame that has been calculated, so as to reduce repeated communication with the server 220, thereby improving the simulation response speed and system efficiency while ensuring visual continuity.
[0053] In this embodiment, the server 220 can maintain a configurable constraint parameter library, which contains various types of intra-chain constraints (such as distance constraints and bending constraints) and inter-chain constraints (such as end-to-end spacing constraints and symmetric coupling constraints). It also supports automatic matching of the optimal constraint combination according to rope type (such as single chain, double chain, and multi-branch) to adapt to the physical characteristics of different clothing and accessories.
[0054] It should be understood that, Figure 2 The illustrations shown are merely examples; the number and deployment methods of terminal devices and electronic devices in actual systems are not limited and are not specifically limited in this application embodiment. When there are multiple electronic devices, they can form a distributed physical simulation cluster or serve as load balancing nodes in a high-availability architecture; key information such as animation frame data, virtual joint physical positions, and constraint parameter configurations can be selectively persisted or used for subsequent animation optimization analysis.
[0055] The embodiments of this application can be widely applied to various technical scenarios that require high-fidelity, multi-anchor-point fixed rope dynamic effects in 3D character animation, including but not limited to 3D game engines, film and television special effects production, virtual idol live streaming, digital human interaction systems and metaverse social platforms, etc. It is especially suitable for application environments that require stable, collaborative, and low-interference simulation of rope-type clothing with complex topological structures such as necklaces, belts, ornaments, and cape ties, and has good versatility and product implementation value.
[0056] Here are a few typical application scenarios: (a) Highly realistic accessory simulation in 3D games In 3D games such as open-world and role-playing games, player characters often wear complex rope structures such as necklaces with fixed ends, multi-segment waist chains, or crisscrossing back ornaments. Traditional solutions based on single-chain rigid bodies or independent PBDs struggle to handle the spatial relationships between multiple chains, easily leading to clipping issues such as necklace chains crossing and penetrating the body, and belt branches drifting and separating at the ends, severely compromising the realism of the visuals.
[0057] In this embodiment, the rope model is constructed as a composite structure containing multiple joint chains, each chain consisting of multiple virtual joints. During animation playback, the position of each virtual joint is predicted sequentially based on multiple animation frames, and unified correction is performed through a rope constraint system that simultaneously includes intra-chain and inter-chain constraints, ensuring that each joint chain maintains a reasonable spacing and relative posture during movement. Thus, even when the character runs, turns, or jumps quickly, the left and right chains of the necklace naturally conform to the chest contour, and the belt branches swing synchronously without separating, significantly enhancing the realism of the character's appearance and the player's immersive experience.
[0058] (II) Visual Enhancement in the Field of 3D Animation
[0059] In 3D animation production, characters often wear rope-like accessories with multiple anchor points, such as double-ended necklaces, crossed belts, and shoulder chains. Traditional skeletal binding or single-chain physics simulation methods struggle to handle the spatial coupling between multiple chains, often requiring animators to manually adjust frame by frame to avoid clipping or deformation breaks, greatly increasing production costs and making it difficult to guarantee motion continuity.
[0060] In this embodiment, the topology of the rope model is explicitly divided into multiple joint chains, each consisting of multiple virtual joints arranged linearly, and embedded into the standard animation pipeline. When playing back multiple animation frames, the system uses the animation position of the first frame as the initial physical state, and sequentially performs position prediction and dual constraint correction based on external force for each subsequent non-first frame. This design enables the rope dynamics to faithfully follow the character's main skeleton animation while automatically maintaining a reasonable spatial layout between multiple chains in complex action sequences, significantly reducing the workload of post-correction and helping animation teams efficiently produce highly reliable character detail within a limited timeframe.
[0061] (III) High-precision simulation in the field of special effects animation
[0062] In cinematic special effects animation, flexible elements such as ropes, chains, and braids often appear as key visual assets, and their dynamic performance directly affects the credibility of the visuals. While existing solutions based on rigid chain or multi-mass spring models can simulate a single rope, they are prone to problems such as uncontrolled chain spacing and inconsistent motion phases when dealing with complex topological structures with multiple branches and fixed points due to the lack of cross-chain constraint mechanisms. These issues require expensive offline calculations or post-processing repairs.
[0063] This application's embodiments are geared towards offline or real-time pre-simulation scenarios. The rope model is modeled as a collection of multiple joint chains. In the simulation process across multiple animation frames, not only is the physical position of each virtual joint from the previous frame used for inertial prediction, but the pose between each joint chain can also be explicitly defined by configuring inter-chain constraints. The corrected physical position is directly used to drive the deformation of the high-poly model rope mesh. This effectively prevents unsightly phenomena in special effects shots, such as multiple strands of necklaces piercing each other when a character turns, the ends of the left and right waist chains separating and floating unnecessarily, and rope ornaments swinging with excessively large phase differences in slow motion.
[0064] (iv) Dynamic clothing presentation in virtual live streaming
[0065] In virtual live streaming scenarios such as virtual idols and digital humans, clothing dynamics are a key element in enhancing the character's vitality and the audience's trust. If the pearl necklace, tassel waist ornaments, etc. worn by the character exhibit abnormal shaking, chain crossing, or floating ends due to physical simulation distortion, it will quickly weaken the virtual character's anthropomorphic credibility.
[0066] This application's embodiments address the requirements of real-time rendering and low-latency interaction. In the first frame, the physical state of each virtual joint is initialized directly using the animation position in the bound pose. In each subsequent non-first frame, rapid position prediction is performed based solely on simple external forces such as gravity, and the movement of multiple joint chains is collaboratively restricted through preset inter-chain constraints. This ensures that even during a live broadcast lasting several hours, the multiple chains maintain a stable and natural relative relationship. Thus, even if the character only makes slight head movements or breathing fluctuations, the left and right chains of the necklace can still exhibit delicate and synchronized draping responses. This allows for the continuous output of highly consistent and believable clothing dynamics in a resource-constrained real-time environment, enhancing the viewer's emotional projection and long-term engagement with the virtual character.
[0067] In summary, the embodiments of this application can be widely applied to technical fields that require high realism, physical plausibility, and multi-chain collaboration in character appearance, such as 3D games, 3D animation production, film and television special effects, virtual live streaming, digital human interaction, and metaverse social networking. By constructing the rope model as a structure containing multiple joint chains, each joint chain consisting of multiple virtual joints, and performing position prediction and step-by-step correction including intra-chain and inter-chain constraints based on multiple animation frames, the rope model in non-first frames is finally corrected. This achieves the technical effect of highly stable and highly consistent motion simulation of complex rope structures without disrupting the animation rhythm of the main character. It should be understood that the application scenarios listed above are just simple examples. Other application scenarios involving multi-anchor point fixation, multi-branch structure rope-type clothing, or flexible body simulation are also applicable to the embodiments of this application, and will not be described in detail here.
[0068] The specific implementation of this application involves data processing and use, such as the animation position of each virtual joint in multiple animation frames, preset motion external force parameters, and intra-chain / inter-chain constraint configuration information. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the relevant parties is required, and the collection, storage, processing and analysis of all data should strictly comply with the privacy protection laws and regulations and data security standards of the relevant countries and regions.
[0069] The following is a detailed description of a motion simulation method for a rope model provided in an embodiment of this application.
[0070] Please refer to Figure 3 This is a flowchart illustrating the motion simulation method for the rope model in this embodiment. It should be noted that the execution entity in this embodiment can be... Figure 2 The electronic device shown may specifically be Figure 2 The client 210 or server 220 in this application are not restricted in this regard.
[0071] like Figure 3 As shown, the specific implementation steps of this method are as follows: S31, acquire multiple animation frames; wherein, the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; In the embodiments of this application, multiple animation frames refer to a series of animation data units arranged in chronological order. Each frame contains the current pose of the target object, which refers to the animated character that has a binding relationship with the rope model (such as wearing or holding it).
[0072] In implementing the motion simulation method for the rope model provided in this application, the first step is to determine the multiple virtual joints set up for the rope model. Virtual joints are the basic units constituting the dynamic behavior of the rope model. They do not rely on parent-child hierarchical bindings in traditional skeletal animation, but rather achieve coordinated movement through physical constraints. For rope-like structures, their natural form is typically a continuous, flexible curve, making chain-like topology modeling more suitable.
[0073] In this embodiment, the rope model is composed of multiple joint chains; each joint chain is a series of virtual joints connected sequentially, and the relative distance and bending characteristics between adjacent virtual joints are maintained by implicit intra-chain constraints. This chain-like structure can more realistically simulate flexible objects with linear or segmented continuous characteristics, such as necklaces, belts, and pendants.
[0074] Figure 4 An exemplary configuration of a single joint chain is shown, such as... Figure 4As shown, a single joint chain consists of a group of virtual joints connected sequentially, with parent-child relationships. For each virtual joint, the preceding virtual joint it is connected to is its parent joint, and the following virtual joint it is connected to is its child joint. For example, for virtual joint 2, virtual joint 1 is the parent joint of virtual joint 2, and virtual joint 3 is the child joint of virtual joint 2. The first virtual joint (i.e., virtual joint 1) has only corresponding child joints, and the last virtual joint (i.e., virtual joint 4) has only corresponding parent joints.
[0075] It should be noted that, Figure 4 The diagram shows only a simple linear structure consisting of a single joint chain. In practical applications, rope-like ornaments often have more complex topological forms. For example, Figure 5 As shown, the target model is wearing a "Y"-shaped necklace, with the upper two ends fixed to the left and right shoulders, while the lower part wraps around the torso. The necklace's rope design is a complex rope model composed of multiple articulated chains.
[0076] After introducing the animation frames and rope model structure of this application, the sources of obtaining multiple animation frames in the embodiments of this application will be explained below:
[0077] As mentioned above, the technical solution of this application is not only applicable to real-time rendering scenarios such as 3D games and virtual live streaming, but also to offline rendering scenarios such as 3D animation production and film and television special effects pre-visualization.
[0078] In real-time rendering scenarios, the system can only obtain the current frame and the processed historical frames, and cannot predict future frames; therefore, in this scenario, the multiple animation frames of this application may include the animation frame to be played and the cached historical frames (e.g., the frame before the current frame).
[0079] In non-real-time offline rendering scenarios, the system can access frame data at any point in time before or during the simulation; therefore, in this scenario, the multiple animation frames of this application may include multiple animation frames played within a certain time period; for example, a set of continuous animation frames of the target object from the start of the motion to the end of the motion.
[0080] Since the animation position of the rope model in animation frames is usually derived from character rigging or keyframe settings by artists, it only reflects the static layout of the rope in an ideal posture and does not consider physical factors such as gravity, inertia, collisions, or interactions between chains during character movement. If the animation position is directly used to drive rendering, visual inconsistencies are very likely to occur. To obtain dynamic effects that conform to physical laws, the rope model in the animation frames needs to be physically simulated and corrected.
[0081] As mentioned earlier, in a real-time rendering scene, multiple animation frames can include the animation frame to be played and the frame preceding the current frame. In this case, the first animation frame among multiple animation frames can be regarded as a historical frame that has been corrected; the non-first animation frames can be regarded as the current frame that needs to be corrected.
[0082] In offline rendering scenarios, multiple animation frames typically constitute a complete continuous sequence, covering all poses of the target object from the start to the end of the motion. In this case, the first frame of the animation can be regarded as the animation frame that presents the pose of the target object before the motion; the non-first frames can be regarded as the animation frames that present the pose of the target object at various points in time during the motion.
[0083] Therefore, in this embodiment of the application, when correcting the rope model in multiple animation frames, it is only necessary to perform frame-by-frame correction on non-first frame animations, without processing the first frame animation. For specific implementation, refer to step S32 below.
[0084] S32, based on the playback order of the multiple animation frames, for each non-first frame other than the first frame, the following steps S321~S323 are executed sequentially; S321, based on the preset motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. For virtual joint position prediction, in the initial prediction process, motion information from the previous frame can be used to predict the initial position of each virtual joint in the current non-first frame. The motion information can include the physical position of each virtual joint in the previous frame, as well as the preset external forces acting on the rope model in the previous frame, such as gravity, wind, or traction force generated by the movement of the target model.
[0085] In non-first frames, the physical position of each virtual joint is obtained by constraining and correcting the initial position of each virtual joint. The specific implementation is described in subsequent step S322 and will not be repeated here. In the first frame, the physical position of each virtual joint is its animation position in the first frame animation.
[0086] In this application's embodiments, the preset motion external force specifically refers to the environmental forces (such as gravity, wind, etc.) pre-configured by the system and the traction force derived from the target model's motion. The environmental forces can be set according to the physical parameters of the simulation scene, while the traction force generated by the target model's motion can be generated by calculating the change in skeletal pose of the target model between the previous frame and the current non-first frame, and mapping it to the anchor point virtual joints of the rope model, thereby generating the corresponding inertial driving force. This application does not limit this aspect.
[0087] Based on the above motion information, the pose of each virtual joint on the rope model in this animation frame can be preliminarily predicted according to the motion trend of the rope model, thus determining the initial position of each virtual joint.
[0088] For example, in the initial prediction process, explicit Euler integrals can be used to predict the initial position of each virtual joint. The formula corresponding to the Euler integral is shown below: (1) in, This indicates the physical position of the virtual joint in the previous frame. This part represents inertia, and m is the set mass of the model. It is the velocity of the previous frame, which is calculated by the difference between the physical positions of the virtual joints in the previous frame and the frame before that. It is the time interval between the current frame and the previous frame. This indicates that the object maintains uniform linear motion, and within a time interval... The distance moved; This part represents the accelerated motion caused by external forces.
[0089] In summary, Formula 1 describes the new position of the rope model in the current animation frame as the sum of its old position in the previous animation frame, the position due to inertial movement, and the displacement caused by external force.
[0090] However, the initial position obtained by the above process does not take into account the structural constraints of the rope model. If this initial position is directly used to update the rope shape, it can easily lead to problems such as abnormal stretching or compression of the spacing between adjacent virtual joints, mutual penetration of multiple joint chains, and deviation of the end anchor point from its fixed position, thereby destroying the geometric continuity and physical rationality of the rope.
[0091] Therefore, after obtaining the initial position of each virtual joint, this embodiment of the application needs to correct the initial position of each virtual joint in combination with the preset rope constraint conditions, as shown in step S322 below: S322, based on preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between virtual joints within each joint chain, and inter-chain constraint conditions for constraining the relative position between joint chains. As mentioned earlier, the PBD algorithm can initially update the velocity and position of particles based on external forces, then construct constraint functions (such as distance constraints, volume constraints, or shape matching constraints) to describe the geometric relationships that particles should satisfy, and use an iterative projection algorithm to make the system state continuously approach the constraint satisfaction conditions, and finally use the corrected position to update the velocity in reverse.
[0092] Considering that the PBD algorithm has advantages such as high numerical stability, high computational efficiency, and easy control of convergence behavior, its position-based solution method is naturally suitable for the correction requirements of virtual joint positions in this application. Based on this, the embodiments of this application can use the PBD algorithm to solve the constraint problem of the initial position of the virtual joint.
[0093] Since current PBD algorithms are mainly applied to physical simulation scenarios involving continuous media such as cloth, soft materials, and fluids, their typical constraints often focus on local geometric relationships within a single group (such as triangle preservation and volume conservation). When dealing with rope-like structures with multiple branches and anchor points, especially in complex scenarios where it is necessary to simultaneously maintain intra-chain continuity and inter-chain spatial coordination, existing PBD solutions lack targeted constraint mechanisms.
[0094] Based on this, this application embodiment sets various rope constraint conditions for rope model calibration scenarios, taking into account actual business needs. These rope constraint conditions include: intra-chain constraint conditions for constraining the relative positions between virtual joints within each joint chain, and inter-chain constraint conditions for constraining the relative positions between joint chains.
[0095] To facilitate understanding, the following sections will explain the intra-chain constraints and inter-chain constraints respectively: The in-chain constraints in this application embodiment include: (1) The relative distance between any two adjacent virtual joints belongs to the preset intra-chain distance range; This constraint is called the intra-chain distance constraint D. Where i represents any virtual joint in the joint chain, and i+1 is the sub-joint corresponding to virtual joint i. This constraint is used to ensure that the distance between any two adjacent virtual joints in the joint chain remains stable during the simulation and does not exceed the set intra-chain distance range. .
[0096] (2) The curvature between every three consecutive virtual joints belongs to the preset range of curvature within the chain; This constraint is called the in-chain curvature constraint B. Where i+2 is the sub-joint corresponding to virtual joint i+1; flexure This refers to the bending angle formed by three consecutively arranged virtual joints, specifically as follows: Figure 6As shown, for three consecutively arranged virtual joints i, i+1, and i+2, the bending degree... The angle between the line connecting virtual joint i and virtual joint i+1 and the line connecting virtual joint i+1 and virtual joint i+2.
[0097] This constraint is used to limit the degree of bending of the joint chain in local areas, ensuring that the bending degree of any three consecutive virtual joints is within the bending degree range of the chain during motion simulation. This constraint can prevent the rope model from exhibiting unnatural sharp-angle bends or excessive stiffness, thereby maintaining its compliant and continuous physical form.
[0098] (3) The relative distance between each target joint and its associated joints is within a preset associated distance range; wherein, the target joint is a virtual joint in the joint chain that is bound to the target model, and the target joint is not the first virtual joint; the associated joint is a virtual joint in the target model.
[0099] This constraint is called the binding constraint Pin. Where Ji represents the target joint, and Jbody represents the associated joint corresponding to the target joint Ji.
[0100] It should be noted that, unlike the two constraints mentioned above which apply to all joint chains, this constraint only applies to application scenarios where, in addition to the calcaneus, there are other virtual joints that need to be fixed to the target model.
[0101] Specifically, in actual 3D modeling scenarios, the fixed relationships of joint chains mainly include the following two types: one is that at least one end of the joint chain is fixed to the target model, and the other is that the joint chain does not establish a fixed relationship with the target model and can move freely.
[0102] For joint chains with at least one end fixed to the target model, the initial virtual joint (i.e., the heel joint) of the joint chain is typically fixed to the target model during the modeling phase. To ensure that the pose of the rope model in the initial stage of motion remains consistent with the animation pose, the current rope model motion simulation process does not adjust the position of the initial virtual joint of such joint chains.
[0103] However, in some complex modeling scenarios, a non-head virtual joint on the joint chain may also be specified on the target model. For example... Figure 7 The rope model shown is a ribbon at one end of the target model. The virtual joint i and virtual joint i+n at the beginning of the rope model are both fixed to the target model. The virtual joint i+n is the target joint Ji.
[0104] At this point, if the position of the virtual joint i at the head end is kept unchanged, and only the aforementioned intra-chain distance constraint and intra-chain curvature constraint are applied to the target joint, the target joint will gradually deviate from its binding position during the dynamic process, causing the middle part of the ribbon to detach from the body or produce unnatural pulling.
[0105] Based on this, the embodiments of this application address the foregoing Figure 7 The scenario shown incorporates the aforementioned Pin constraint. In practice, any virtual joint from the torso of the target model can be selected as the associated joint Jbody corresponding to the target joint Ji. Furthermore, the local spatial offset vector of the target joint Ji relative to the associated joint Jbody is recorded in the initial animation frame. During simulation, the deviation of the target joint Ji from the associated joint Jbody is constrained to not exceed a preset association distance range p. This constraint ensures that the target joint maintains its binding relationship with the target model throughout the dynamic simulation, avoiding anchor point drift caused by relying solely on intra-chain distance or bending constraints, thereby improving the motion stability and visual realism of the multi-point fixed rope structure.
[0106] Through the synergistic effect of the aforementioned intra-chain constraints, the embodiments of this application can effectively maintain the structural integrity and binding stability of the rope model during motion simulation. Specifically, intra-chain distance constraints ensure reasonable spacing between adjacent joints to prevent non-physical stretching; intra-chain curvature constraints suppress excessive local bending to maintain sleekness; and intra-chain binding constraints ensure that non-terminal fixed joints closely follow the character's movement in multi-point anchoring scenarios. These three factors collectively enhance the geometric consistency, physical plausibility, and visual realism of complex rope structures during dynamic processes.
[0107] The inter-chain constraints in this application embodiment include: (1) The relative distance between the end virtual joints of each pair of joint chains belongs to the preset inter-chain distance range; This constraint is called the inter-chain distance constraint D. end D end =(i end1 i end2 ,d2); where i end1 and i end2 d1 represents the virtual joints at the ends of any two joint chains, and d2 represents the range of distances between the chains.
[0108] This constraint controls the spatial proximity of multiple joint chains in the free-end region, ensuring that the end-to-end spacing of each joint chain remains within the chain-to-chain distance range d2 during motion simulation, thus avoiding excessive separation or abnormal penetration caused by independent motion. The chain-to-chain distance range d2 can be based on i end1 and i end2The actual distance is set in the initial animation frame to maintain the integrity of the structure while preserving the freedom of natural swing.
[0109] (2) The curvature between multiple joints to be processed corresponding to each pair of joint chains belongs to a preset range of inter-chain curvature; wherein, the multiple joints to be processed include: the end virtual joints of each of the two joint chains, and a virtual joint adjacent to an end virtual joint.
[0110] This constraint is called inter-chain curvature constraint B. end B end =( i end1 i end2 ,θ2); where, i end1 i end2 For any two joint chains, there are multiple joints to be processed.
[0111] In this embodiment, for any two joint chains, a plurality of corresponding joints to be processed are set. Each joint to be processed includes the terminal virtual joint of each of the two joint chains, and a virtual joint adjacent to one of the terminal virtual joints.
[0112] For example Figure 8 As shown, for joint chain 1 and joint chain 2, each joint to be processed may include: the terminal virtual joint i of joint chain 1. end1 The terminal virtual joint i of joint chain 2 end2 and the end-effector virtual joint i end1 Father joint This constraint requires... i end1 i end2 The resulting bending angle θ 2.1 It is within the preset range of inter-chain bending.
[0113] For example Figure 9 As shown, for joint chain 1 and joint chain 2, each joint to be processed may further include: the terminal virtual joint i of joint chain 1. end1 The terminal virtual joint i of joint chain 2 end2 and the end-effector virtual joint i end2 Father joint In this constraint, i needs to be constrained. end1 i end2 , The resulting bending angle θ 2.2 It is within the preset range of inter-chain bending.
[0114] To accommodate more application scenarios, in this embodiment of the application, for any two joint chains (such as...) Figure 8 and Figure 9 The joint chains shown (joint chain 1 and joint chain 2) can also be configured to correspond to two sets of joints to be processed; wherein, set 1 of joints to be processed includes i end1 with i end2 The joint set 2 to be processed includes i end1 i end2 and .
[0115] For these two joint chains, constraints are required. i end1 i end2 The resulting bending angle θ 2.1 , and i end1 i end2 , The resulting bending angle θ 2.2 All are within the preset inter-chain curvature range.
[0116] This constraint is used to limit the relative bending tendency of the two joint chains at the end intersection area, ensuring that the curvature formed by the three joints to be processed (i.e., the two end virtual joints and the adjacent joint of one of the ends) is within the range of inter-chain curvature during motion simulation; this constraint can prevent multiple joint chains from exhibiting uncoordinated separation, reverse bending or local twisting near the free end, thereby maintaining the overall coherence and natural shape of the multi-chain rope structure during dynamic processes.
[0117] Through the synergistic effect of the aforementioned inter-chain constraints, the embodiments of this application can effectively maintain the spatial coordination and topological correlation between multiple joint chains. Specifically, the inter-chain distance constraint ensures that the ends of different joint chains maintain a reasonable relative spacing during dynamic processes, avoiding abnormal separation or penetration; the inter-chain curvature constraint restricts the cross-chain bending shape in the intersection area of multiple chains, preventing uncoordinated reverse swinging, twisting, or stiff angles at the free ends. Together, these two constraints ensure the overall coherence, spatial rationality, and visual naturalness of complex multi-chain rope structures such as forked necklaces and multi-strand ribbons in motion simulation, significantly improving the performance quality and physical credibility of multi-chain flexible objects in character animation.
[0118] After introducing the rope constraint conditions of the embodiments of this application, the following explanation will use the example of fixing the virtual joints at the beginning of each joint chain in the rope model to the target model to illustrate the specific process of how to use rope constraint conditions to correct the rope model. Figure 10 As shown, it includes the following steps: S3221, The preset animation position of the first virtual joint in each joint chain in the non-first frame is used as the physical position of the first virtual joint in the joint chain. As mentioned earlier, in this embodiment, the virtual joints at the beginning of each joint chain are fixed to the target model. Therefore, when simulating the motion of the rope model, there is no need to adjust the position of the virtual joints at the beginning; the animation position of the virtual joints at the beginning in the current animation frame can be directly used as the physical position obtained from the motion simulation.
[0119] S3222, Based on the chain constraints, and referring to the physical position of the first virtual joint in each joint chain, the initial positions of each virtual joint other than the first virtual joint in each joint chain are corrected to obtain the middle position of each other virtual joint. In this embodiment, intra-chain constraints are first used to correct the initial positions of the virtual joints in each joint chain. Then, inter-chain constraints are used to correct the virtual joints in each joint chain again. That is, the correction result obtained by using intra-chain constraints is not the final physical position of the virtual joint. For ease of distinction, the correction result obtained by using intra-chain constraints will be referred to as the intermediate position.
[0120] For each joint chain, firstly, the initial positions of all virtual joints in the chain, excluding the first virtual joint, are obtained in the current frame. Then, these initial positions are corrected based on the various constraints within the chain to obtain the intermediate positions of the other virtual joints.
[0121] In practice, it can be determined in advance whether there is a target joint Ji fixed to the target model in the joint chain. If there is a target joint Ji, the initial position of the target joint Ji is corrected in advance by binding constraint Pin. It should be understood that if there is no target joint Ji in the joint chain, then Pin constraint is not required.
[0122] This application does not limit the timing of the execution of the intra-chain distance constraint D and the intra-chain curvature constraint B; for example, the intra-chain distance constraint D can be executed first, followed by the intra-chain curvature constraint B. Alternatively, the intra-chain curvature constraint B can be executed first, followed by the intra-chain distance constraint D.
[0123] To make it easier to understand, the following explanation will be based on the following order: first, execute the binding constraint Pin; then, execute the intra-chain distance constraint D; and finally, execute the intra-chain curvature constraint D. First, if a target joint Ji exists in the current joint chain, the animation position of the associated joint Jbody of Ji in the current animation frame is obtained. Combined with the relative positions of Ji and Jbody recorded in the initial animation frame, the initial position of Ji is corrected to obtain its intermediate position. Then, following a preset order (e.g., the connection order from the first virtual joint to the last virtual joint), each pair of adjacent virtual joints with a parent-child connection is traversed sequentially, and the intra-chain distance constraint D is corrected.
[0124] Next, as follows Figure 11 As shown, for the i-th virtual joint and its sub-joint i+1, the distance L between their initial positions is calculated. If the distance L is outside the preset chain distance range d1, for example, L>d1, then according to the distance constraint projection method in position dynamics, a correction amount △d is generated to adjust the distance between the two points to within the chain distance range d1.
[0125] If neither of the two adjacent virtual joints i and i+1 is fixed (i.e., neither is the head virtual joint nor the target joint), the correction amount Δd can be applied directly to the sub-joint i+1 of the two virtual joints, or the virtual joints i and i+1 can be corrected separately according to a specific ratio (e.g., mass ratio).
[0126] If either of two adjacent virtual joints is fixed to the target model, the entire correction amount Δd is applied to the other unfixed joint, thereby ensuring the positional stability of the bound or anchored joints while maintaining the consistency of the chain structure length.
[0127] Subsequently, following the connection order from the first virtual joint to the last virtual joint, every three consecutive connected virtual joints are traversed sequentially, and the correction of the in-chain curvature constraint B is performed.
[0128] Specifically, such as Figure 12 As shown, for any three consecutive virtual joints i, i+1, and i+2, the bending angle formed by the line connecting virtual joints i and i+1 and the line connecting virtual joints i+1 and i+2 is calculated. If this bending angle θ is outside the preset in-chain bending range θ1 (e.g., θ < θ1), the initial position of the middle joint i+1 among the three joints to be processed can be adjusted so that the resulting bending angle θ′ is within the bending range θ1. Alternatively, the initial positions of virtual joints i, i+1, and i+2 can be adjusted separately so that the bending supervision among the three is within the bending range θ1.
[0129] It should be noted that if there is a target joint in the joint to be processed (i.e., the joint has been fixed to the target model by binding constraint Pin), its position must not be adjusted during the chain curvature correction process; in this case, it is possible to make fine adjustments to its adjacent non-fixed joints so that the overall curvature angle is restored to the preset chain curvature range θ1.
[0130] Furthermore, the correction of intra-chain curvature constraints may alter the positions of some virtual joints, potentially causing previously satisfied intra-chain distance constraints to deviate again. To address this issue, this embodiment of the application can repeatedly perform the correction process for intra-chain distance constraints and intra-chain curvature constraints after completing a full set of binding constraint, intra-chain distance constraint, and intra-chain curvature constraint corrections, until all constraints meet the preset tolerance or the preset maximum number of iterations is reached. This iterative mechanism effectively alleviates coupling conflicts between different constraints, improving the convergence and physical rationality of the correction results. The final obtained position is the intermediate position of each of the other virtual joints, used for subsequent re-correction of inter-chain constraints.
[0131] In the above-mentioned intra-chain correction process, by prioritizing the execution of binding constraints to fix the position of the target joint, and then sequentially applying intra-chain distance constraints and intra-chain curvature constraints along the parent-child connection sequence of the joint chain, each virtual joint can closely follow the motion posture of the target model while satisfying physical rationality. This maintains the smoothness of the local shape of the rope model and the naturalness of the overall dynamics, avoiding visual defects such as binding point drift, abnormal pulling, or uncoordinated bending.
[0132] The following section describes the in-chain constraint solving process in this application, using several practical application scenarios as examples: (i) In real-time interactive scenarios in 3D games, rope models (such as ornaments around a character's waist, ribbons on weapons, or climbable vines) need to respond quickly to character actions within a limited frame time, while avoiding visual defects such as overstretching, abnormal bending, or drifting of binding points. Therefore, a low-iteration-number in-chain constraint correction strategy can be adopted to generate structurally reasonable intermediate positions while ensuring performance.
[0133] For example, when a game character runs at high speed, the system first uses the animation position of the virtual joint at the beginning of each joint chain in the current animation frame as its physical position to ensure that it strictly follows the target model.
[0134] If a target joint is fixed to the target model within the joint chain, its position is first corrected based on the animation position and initial relative offset of its associated joints using binding constraints. Then, adjacent virtual joint pairs are processed sequentially from the beginning to the end of the joint chain, applying intra-chain distance constraints: if the distance between two joints exceeds a preset range, only the position of the unfixed sub-joints is adjusted. Next, intra-chain curvature constraints are applied to every three consecutive virtual joints; if the bending angle exceeds the intra-chain curvature range, the intermediate joints are fine-tuned to restore their natural curvature. The entire process typically completes one or two iterations within a single frame.
[0135] This not only effectively suppresses the "rubber band stretching" or "joint rotation" common in high-frequency movements, but also allows flexible components to closely fit the character's dynamics while maintaining computational efficiency, significantly improving the realism of the game screen and the credibility of the interaction.
[0136] (ii) In 3D animation production, animators often need to automatically correct rope structure conflicts (such as over-compression, reverse bending, etc.) caused by exaggerated movements while preserving the artistic expressiveness of keyframes. To this end, a high-precision, multi-round iterative intra-chain constraint correction strategy can be adopted. By repeatedly and alternately applying intra-chain distance constraints and intra-chain curvature constraints, the system can be finely converged to a physically reasonable intermediate position.
[0137] For example, in a shot of a character wielding a whip, the initial virtual joint is fixed to its animation position; several intermediate virtual joints are bound to the arm bones as target joints. The system first corrects the position of these target joints through binding constraints, and then sequentially applies intra-chain distance constraints (to prevent the chain from being stretched beyond its design limits) and intra-chain curvature constraints (to limit acute angles or reverse folds). If the distance between adjacent joints is too large due to animation stretching in a frame, the correction displacement is distributed proportionally according to the mass ratio; if a three-joint connection forms an unnatural bend, only the non-fixed joints are adjusted to restore a smooth curve. Since curvature correction may disturb distance relationships, the system can repeat these two types of constraints approximately five to eight times until all virtual joints meet the preset tolerance. The final intermediate position retains both the rhythm and tension of the original animation and has structural rationality.
[0138] This effectively reduces the amount of manual correction work in post-production, while ensuring the consistency of the form and the credibility of the dynamics of the flexible elements in the final product.
[0139] (iii) In special effects animation compositing scenes, rope models often undergo extreme deformation, which can easily lead to problems such as self-intersection, local collapse, or a sense of breakage. In this case, it is necessary to rely on a robust in-chain constraint process to maintain the basic topological structure under violent movement.
[0140] For example, when simulating a sail rope fixed to the top of a mast in a storm, the animated position of the forehead virtual joint in the current animation frame is used as its physical position to ensure it remains anchored to the mast; the initial positions of the remaining virtual joints are derived from the preliminary dynamic response. If there is a target joint connected to the hull in the middle of the rope, its position is first corrected to the animated position of the associated joint through binding constraints. Subsequently, the positions of all fixed virtual joints (including the forehead virtual joint and the target joint) are kept unchanged, and the correction displacement is applied only to the non-fixed joints. The intermediate positions of each virtual joint are stabilized and converged through a maximum of ten iterations.
[0141] In this way, even under continuous strong wind disturbance, the rope model can maintain a constant length and natural curvature, effectively avoiding anomalies such as "local collapse", "visual break" or "uncoordinated shaking", significantly improving the physical credibility and visual realism of high dynamic range special effects shots.
[0142] It should be understood that the above examples are for illustrative purposes only and are not intended to limit the specific application scenarios of the present application.
[0143] S3223, Based on the inter-chain constraints, the intermediate positions of each of the other virtual joints are corrected to obtain the physical position of each of the sub-joints.
[0144] After correcting the virtual joints in each joint chain using intra-chain constraints in step S3222, the intermediate position of each virtual joint needs to be corrected again in step S3223 based on inter-chain constraints to obtain its final physical position.
[0145] As mentioned above, the inter-chain constraints in the embodiments of this application include inter-chain distance constraints D. end Inter-chain bending constraint B end This application does not limit the timing of the execution of these two constraints; for example, the inter-chain distance constraint D can be executed first. end Then execute the inter-chain curvature constraint B. end Alternatively, the inter-chain curvature constraint B can be applied first. end Then execute the inter-chain distance constraint D. end .
[0146] For ease of understanding, the following assumes that the inter-chain distance constraint D is executed first. end Then apply the inter-chain curvature constraint B. end Let's take the order as an example to illustrate; For any two joint chains, obtain the middle position of their respective end virtual joints in the current animation frame; if the Euclidean distance between these two end virtual joints exceeds the preset chain distance range d2, then generate a correction amount according to the distance constraint projection method in position dynamics, and correct the initial position of these two end virtual joints.
[0147] Specifically, such as Figure 13 As shown, for joint chain 1 and joint chain 2, their respective terminal virtual joints are respectively and .if and If the initial distance L between the positions exceeds the distance d2 between the chains, a correction amount ΔD can be generated based on the distance constraint projection method in position dynamics.
[0148] The ΔD is used to adjust the distance L between the two points to within the range of d2. In practice, the correction amount ΔD can be distributed to the two end-effector virtual joints either on average or according to a specific ratio (e.g., mass ratio). and This is to control both of them to move in the direction that satisfies the inter-chain distance constraint, thereby achieving the expected distance.
[0149] Subsequently, for any two joint chains, their respective end virtual joints and the parent joint of one of the end virtual joints of the joint chain are selected to form three consecutive virtual joints for inter-chain curvature correction.
[0150] Specifically, such as Figure 14 As shown, for joint chain 1 and joint chain 2, let their terminal virtual joints be respectively and Virtual joints , ,as well as Father joint This forms a set of cross-chain three-joint structures. The calculation is performed using virtual joints. and The line A connecting the virtual joints and The bending angle formed by the line B connecting the three joints. If this bending angle θ exceeds the preset intra-chain bending range θ2, then the middle joint among the three joints to be processed can be adjusted. The initial position is adjusted so that the resulting bending angle θ′ is within the bending range θ2. Additionally, the virtual joint can also be adjusted. , and The initial positions are adjusted so that the resulting bending angle θ′ is within the bending range θ2. This application does not limit this.
[0151] Because the correction of inter-chain curvature constraints adjusts the position of one or more virtual joints in the end regions, it may cause previously satisfied inter-chain distance constraints to deviate again. To address this issue, embodiments of this application can repeat the correction process for both inter-chain constraints after completing a full correction of inter-chain distance and inter-chain curvature constraints, until all inter-chain constraint conditions meet the preset tolerance or reach the preset maximum number of iterations, thereby improving the spatial coordination and convergence stability of the multi-chain end structure.
[0152] In addition, the positional changes introduced by inter-chain constraint correction may also affect the geometric relationships that have been achieved within each joint chain through intra-chain constraint correction, such as causing the spacing between adjacent virtual joints to deviate from the intra-chain distance range, or the local bending angle to exceed the intra-chain bending range.
[0153] To balance the integrity of the intra-chain structure with the consistency of inter-chain coordination, this embodiment selectively performs a lightweight intra-chain constraint correction (including intra-chain distance constraints and intra-chain curvature constraints) on the affected joint chains after completing the inter-chain constraint correction. However, during this process, the end positions determined in the inter-chain correction results are preferentially retained as boundary conditions, and only non-end, non-fixed joints in the chain are fine-tuned. Thus, without destroying the multi-chain coordination effect, the physical rationality and morphological smoothness of each joint chain are restored. The final obtained positions are the physical positions of all other virtual joints (including all sub-joints) in the current frame, used to drive the final rendering and animation output of the rope model.
[0154] In the constraint correction process of steps S3221 to S3224 above, the intra-chain constraint correction is first performed independently for each joint chain along the parent-child connection sequence, so that each chain restores the length consistency and local smoothness, and fixes the position of the first virtual joint and the target joint. On this basis, the inter-chain distance constraint and inter-chain curvature constraint are applied to the last virtual joint. This allows the inter-chain correction to be based on the reasonable middle position of the structure, avoiding the misadjustment of the end position caused by the non-convergence of intra-chain deformation, thereby obtaining a more accurate physical position.
[0155] The following section describes the inter-chain constraint correction process in this application, using several practical application scenarios as examples: (i) In real-time interactive scenes of 3D games, when a character carries multiple flexible parts (such as shoulder ornaments, multiple ribbons on weapons, etc.), if each rope is simulated independently, the ends are very likely to intertwine, the spacing changes abruptly, or the orientations conflict during rapid turns or jumps, which will destroy the visual integrity.
[0156] Therefore, a lightweight, low-iteration-count inter-chain constraint strategy can be adopted to achieve spatial coordination of the ends of multiple chains while ensuring frame rate. For example, when a character performs a spinning attack, the midpoint position of each rope's virtual joint is first obtained through an intra-chain constraint process. Subsequently, for each pair of virtual joints at the ends of all ropes, inter-chain distance constraints are executed: if the distance between any two virtual joints at the ends does not meet the inter-chain distance constraint, the midpoint position of the two ends is corrected according to the mass ratio to prevent the ribbons from "sticking together" or "tearing".
[0157] Next, the ends of each pair of adjacent ropes and their parent joints are selected to form a cross-chain three-joint structure. Inter-chain curvature constraints are applied. If the included angle is too small and causes visual overlap, the middle joints are finely adjusted to separate them naturally. The entire inter-chain correction is usually performed in only 1–2 iterations, and a light intra-chain backtracking correction is performed on the non-end joints after completion to restore local smoothness.
[0158] This not only prevents the ends of multiple chains from penetrating or flipping each other during high-speed movement, but also gives the overall flexible structure an orderly and coordinated dynamic aesthetic, significantly improving the visual credibility of high-paced gameplay such as combat or parkour.
[0159] (ii) In 3D animation production, it is often required that multiple ropes (such as festival banners, ceremonial curtains, or multiple decorative ribbons) maintain an elegant collective rhythm when swaying in the wind, neither being completely synchronized nor completely independent. To address this, a high-precision, controllable chain constraint strategy can be adopted. By adjusting the distance between chains and the bending tolerance, multiple chains can be guided to form natural grouping and a sense of flow.
[0160] For example, in a scene of a ritual dance, five silk ribbons hang behind the character. After completing the internal correction of each chain, the system obtains the midpoint position of all the virtual joints at the ends. Then, it applies inter-chain distance constraints, setting a reasonable spacing range to prevent adjacent ribbon ends from getting too close. Next, it constructs a cross-chain three-joint structure and executes inter-chain curvature constraints to ensure that any two ribbons maintain a relaxed angle at their intersection, avoiding visual stacking. If a curvature correction causes the distance constraint to fail, it iterates 2–3 times until convergence. Finally, it performs a restricted intra-chain backtracking on the non-end portions of each chain, fixing the end positions and only fine-tuning the middle joints to restore local curvature.
[0161] In this way, multiple ribbons can each present a smooth undulation, while maintaining a clear hierarchy and spatial order at the group level. This achieves a rhythmic group dynamic effect without the need for manual adjustment frame by frame, greatly improving production efficiency and artistic expression.
[0162] (iii) In special effects animation compositing scenes (such as multiple anchor cables swinging violently in a storm), because one end of multiple joint chains is fixed, the ends are very prone to entanglement, collision, or uncoordinated phase under strong external forces, which seriously affects the physical realism. At this time, it is necessary to rely on a strongly coupled inter-chain constraint mechanism to maintain the relative layout rationality of the ends of multiple chains under extreme disturbances.
[0163] For example, in a simulated hurricane-hit port, multiple mooring lines are anchored to the same pier structure but violently swing due to the wind. After obtaining the midpoint positions of each chain, the system first applies inter-chain distance constraints to all end virtual joints, setting a minimum safe distance to prevent visual adhesion of the cables. Then, it constructs a cross-chain three-joint structure for adjacent cables, applying inter-chain curvature constraints to limit them from forming acute-angle crossings or reverse folds during the swing. Due to continuous wind disturbance, the system can perform up to five inter-chain constraint iterations, and after each inter-chain correction, it performs a light intra-chain backtracking (end position locking) on the midpoints of each chain to balance overall coordination and the integrity of individual chain morphology.
[0164] In this way, even under high-energy dynamics, multiple cables can still avoid each other and swing in an orderly manner, effectively avoiding special effects errors such as "end knots", "phase confusion" or "spatial congestion", significantly enhancing the immersiveness and physical credibility of disaster or action scenes.
[0165] It should be understood that the above examples are for illustrative purposes only and are not intended to limit the specific application scenarios of the present application.
[0166] S323, Based on the physical positions of the multiple virtual joints, correct the rope model in the non-first frame.
[0167] After obtaining the physical position of each virtual joint, the animation position of the virtual joint in the current animation frame can be corrected to the physical position, thereby ensuring that the geometry of the rope model strictly follows the physical structure determined by the constraints within and between the chains, improving positional accuracy and dynamic rationality.
[0168] Furthermore, if the animation position is directly replaced with the physical position, it may excessively suppress the original animation intention (such as the character actively swinging, wind-guided artistic movements, etc.), resulting in the rope model's movement process being relatively stiff and unnatural.
[0169] Based on this, in the embodiment of this application, when executing step S323, the following can be performed for each virtual joint: interpolation calculation is performed on the physical position of the virtual joint and the animation position of the virtual joint in non-first frames based on preset weights to obtain the target position of the virtual joint; and the animation position of the virtual joint in non-first frames is adjusted to be the same as the target position.
[0170] Specifically, after solving the intra- and inter-chain constraints in each frame, the physical position and animation position of each virtual joint are obtained. At this point, linear interpolation can be performed according to a preset blending ratio (e.g., 70% physical position + 30% animation position) to generate the final target position.
[0171] The target position reflects the reasonable structure determined by physical constraints, while also retaining the motion trends or artistic control intentions contained in the original animation. In this way, while ensuring that the rope model structure conforms to physical rationality, it can effectively retain the key motion characteristics in the original animation (such as active swinging, following the rhythm of the main skeleton, etc.), avoiding problems such as motion lag, excessive damping, or disconnection from character movements caused by relying entirely on physical simulation. This achieves a good balance between dynamic expressiveness and simulation accuracy, and enhances the naturalness and controllability of flexible objects in complex animation scenes.
[0172] In a 3D modeling scene, the pose of a model in an animation frame includes not only its animated position but also its animated rotational posture. This animated rotational posture represents the local orientation of a virtual joint in the current animation frame and is used to determine the orientation and posture of its bound mesh or child elements (such as rope surface vertices, ornaments, etc.) in three-dimensional space.
[0173] In motion simulation scenarios of rope models, if the animation rotation posture of virtual joints in animation frames is directly used for rendering, it is easy to cause the orientation of the virtual joints to be mismatched with their corrected positions, resulting in visual abnormalities such as correct position but skewed orientation, mesh distortion, and flipping.
[0174] Based on this, to further improve the visual realism of the motion simulation of the rope model, this application embodiment, after obtaining the physical position of each virtual joint in the rope model, can also correct the animation rotation posture of each virtual joint in the current animation frame. It should be understood that the correction of the animation rotation posture can be performed directly after obtaining the physical position of each virtual joint, or it can be performed after correcting each virtual joint in the rope model to the target position; this application does not limit this.
[0175] In this embodiment, a corresponding reference joint is pre-set for each virtual joint in the rope model. Any reference joint is an adjacent joint within the same joint chain as the corresponding virtual joint. That is, for the beginning and end virtual joints, their respective reference joints are their parent joints. For virtual joints other than the beginning and end, their corresponding reference joints are their child joints.
[0176] This ensures that each virtual joint, during subsequent rotational correction, always uses an adjacent joint within the same joint chain with a clearly defined physical connection as its directional reference. For the first and last virtual joints, using the parent joint as the reference avoids directional ambiguity caused by the lack of downstream child joints at the chain's end; for intermediate virtual joints, using their child joints as references maintains consistency in directional transmission along the parent-child connection sequence. This reference joint setting strategy provides a stable and unambiguous local coordinate reference for subsequent position-based rotational correction.
[0177] For ease of understanding, the following explanation uses the correction of the animated rotational posture of a single virtual joint as an example. It should be understood that the animated rotational postures of each virtual joint can be corrected simultaneously in parallel or one by one in a preset order; this application does not limit this.
[0178] In practice, a first physical direction pointing from the physical position of the virtual joint to the physical position of the corresponding reference joint can be predetermined; and a first animation direction pointing from the animation position of the virtual joint in the current animation frame to the animation position of the corresponding reference joint in the current animation frame can be predetermined. Then, a first rotation angle between the first physical direction and the first animation direction is obtained, and the current rotation angle of the virtual joint is corrected based on the first rotation angle.
[0179] like Figure 15 As shown, the child joint of virtual joint i in the joint chain is virtual joint i+1, meaning virtual joint i+1 is the reference joint of virtual joint i. First, the animation positions of virtual joint i and virtual joint i+1 in the current animation frame are obtained as PLocation_i and PLocation_i+1, respectively. Then, the animation position of virtual joint i is subtracted from the animation position of virtual joint i+1 to obtain the spatial vector representing the first animation direction. =PLocation_i+1-PLocation_i, then subtract the physical position Location_i of virtual joint i from the physical position Location_i+1 of virtual joint i to obtain the spatial vector representing the first physical direction. =Location_i+1-Location_i.
[0180] Next, according to and Calculate the minimum rotation angle (i.e., the first rotation angle) required to rotate from the first animation direction to the first physical direction. It should be noted that in three-dimensional space... and The minimum rotation angle between them is not a single angular scalar, but rather refers to the angle about a unit axis of rotation. Rotate to Alignment, minimum required rotation angle.
[0181] That is, in the embodiments of this application, the first rotation angle is constituted by a rotation axis and a rotation angle: wherein, the rotation axis is perpendicular to... and The unit vector spanned to the plane is rotated by an angle of . and The included angle between the axes of rotation and the rotation angle ranges from [0, π]. This axis of rotation and rotation angle can be directly determined by... and The complete definition of vectors is determined by the unique cross product and dot product of vectors. arrive Spatial rotation transformation.
[0182] After determining the first rotation angle, a corresponding quaternion-based rotation correction amount ΔR1 can be generated based on this first rotation angle. This ΔR1 represents the change in the virtual joint i's original orientation towards the first animation direction. The orientation is such that the axis of rotation is rotated by a first rotation angle around the aforementioned axis of rotation, so that it ultimately points to the first physical direction. .
[0183] Then, based on the animated rotation posture of virtual joint i in the current animation frame, this rotation correction amount ΔR1 is applied to ensure that the final orientation of the virtual joint is consistent with its corrected physical position. Specifically, the correction amount ΔR1 can be obtained directly by calling the minimum rotation calculation interface provided by the graphics engine (such as the FQuat:FindBetweenVectors() function in Unreal Engine), and then multiplying ΔR1 with the animated rotation posture of virtual joint i in the current animation frame according to a preset ratio using quaternion multiplication to obtain the corrected rotation posture.
[0184] This ensures that the rotational posture of each virtual joint is strictly matched with its physical position after correction by intra- and inter-chain constraints, effectively eliminating orientation inaccuracies caused by directly using the original animation rotation. As a result, the rope model not only has accurate positioning during dynamic processes, but the orientation of its surface mesh or child elements also naturally follows the geometric direction, significantly improving the deformation rationality and visual realism of flexible structures such as ribbons and ornaments under complex movements.
[0185] However, the above rotational attitude correction process does not consider the inter-chain coordination relationship of multiple joint chains in the end region. If the rope model is only a single-joint chain model, the above process can be directly used for rotational attitude correction. But when the rope model is a multi-joint chain model, each end virtual joint only performs rotational attitude correction based on its corresponding reference joint, which is prone to causing the orientation of adjacent ends to diverge due to the accumulation of local directional differences, thus disrupting the overall visual coherence.
[0186] Therefore, in this embodiment of the application, when correcting the animated rotation posture of a virtual joint, it is necessary to determine in advance whether the virtual joint is the terminal virtual joint of a certain joint chain. If the virtual joint is not the terminal virtual joint, then the aforementioned method is used. Figure 15 The process shown can be directly corrected by using △R1 to adjust the animation rotation posture of the virtual joint.
[0187] Correspondingly, if the virtual joint is an end-effector virtual joint, it means that there are inter-chain constraints on the virtual joint. In this case, the current rotation angle of the virtual joint needs to be corrected based on the first rotation angle, combined with the physical position of the end-effector virtual joints of the multiple joint chains, and the animation position of the end-effector virtual joints of the multiple joint chains in non-first frames.
[0188] In this way, while preserving the rationality of the local orientation of each joint chain, the rotational consistency of multiple joint chains in the end region can be coordinated, avoiding the divergence or flipping conflict of the end orientation of adjacent chains due to the independent correction of each virtual joint at the end, thereby improving the overall visual coherence and spatial coordination of multi-chain convergence or parallel structures in dynamic processes.
[0189] In this embodiment of the application, when the virtual joint is an end virtual joint, a physical centroid position can be determined based on the physical position of the end virtual joint of each joint chain in the rope model. The physical centroid position represents the actual center point of all end virtual joints in the physical world coordinate system.
[0190] Then, based on the animation position of each end virtual joint in the current animation frame, an animation centroid position is determined. This animation centroid position represents the center point of the positions of all end virtual joints in the animation coordinate system.
[0191] In practice, the average physical position of all end-effector virtual joints can be calculated to obtain the physical centroid position; similarly, the average animation position of all end-effector virtual joints in the current animation frame can be calculated to obtain the animation centroid position.
[0192] Next, a second physical direction is determined, pointing from the physical position of the virtual joint to the physical centroid; and a second animation direction is determined, pointing from the animation position of the virtual joint in the current animation frame to the animation centroid. Then, based on the first rotation angle, an interpolation operation is performed on the second rotation angle between the second physical direction and the second animation direction to obtain the corrected rotation angle of the virtual joint. Finally, the corrected rotation angle is used to correct the current rotation angle of the virtual joint.
[0193] Specifically, such as Figure 16As shown, the physical and animated centroid positions described above are considered as the physical and animated positions of a virtual centroid joint C. For the terminal virtual joint in the joint chain... Its reference joint is the corresponding parent joint. i end
[0194] In the aforementioned Figure 15 The process shown in the figure is calculated to obtain Compared to After applying the rotational correction ΔR1, the center of mass joint C can be considered as... Another reference joint, and adopts Figure 15 The process shown is for calculation The second rotational correction ΔR2 between the center of mass joint C and the center of mass joint.
[0195] In practice, the end-effector virtual joint can be used. The animation position of the joint C with respect to the center of mass in the current animation frame is denoted as PLocation_. Together with PLocation_C, calculate the spatial vector V representing the second animation direction. A2 =PLocation_C-PLocation_ The end-effector virtual joint The physical position of the joint C with respect to the center of mass is denoted as Location_ Using Location_C, calculate the spatial vector V representing the second physical direction. B2 =Location_C-Location_ .
[0196] Subsequently, according to V A2 With V B2 Calculate the minimum rotation angle required to rotate from the second animation direction to the second physical direction (i.e., the second rotation angle), and generate the corresponding quaternion form rotation correction amount ΔR2. Perform spherical quaternion interpolation on ΔR1 and ΔR2 to obtain the fused correction rotation amount ΔR, and then interpolate ΔR with the virtual joint. The corrected rotation posture is obtained by multiplying the animation rotation posture in the current animation frame by a preset ratio.
[0197] In this way, while preserving the rationality of the local orientation of each joint chain, the overall spatial distribution information of the ends of the multi-chain can be further integrated, avoiding conflicts or divergence in the rotation directions of adjacent virtual joints due to relying only on local reference joints, thereby improving the rotational coordination and dynamic consistency of the multi-chain in the convergence or parallel region.
[0198] Based on the same inventive concept, this application also provides a motion simulation device for a rope model, specifically as follows: Figure 17 As shown, the device includes: The data acquisition unit 171 is configured to acquire multiple animation frames; wherein the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; The motion simulation unit 172 is configured to: based on the playback order of the plurality of animation frames, execute sequentially for each non-first frame other than the first frame: Based on the preset external motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. Based on the preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between each virtual joint in each joint chain, and inter-chain constraint conditions for constraining the relative position between each joint chain. Based on the physical positions of the multiple virtual joints, the rope model in the non-first frame is corrected.
[0199] In this embodiment, the first virtual joint of each joint chain is bound to the target model; the initial position of each virtual joint is corrected based on the preset rope constraint conditions to obtain the physical position of each virtual joint in the non-first frame; the motion simulation unit 172 is specifically configured as follows: The preset animation position of the first virtual joint in each joint chain in the non-first frame is taken as the physical position of the first virtual joint in the joint chain. Based on the constraints within the chain, and referring to the physical position of the first virtual joint in each joint chain, the initial positions of each virtual joint other than the first virtual joint in each joint chain are corrected to obtain the middle position of each other virtual joint. Based on the inter-chain constraints, the intermediate positions of each of the other virtual joints are corrected to obtain the physical position of each of the sub-joints.
[0200] In this embodiment of the application, the intra-chain constraints include: The relative distance between any two adjacent virtual joints falls within a preset range of intra-chain distances. The curvature between every three consecutive virtual joints falls within a preset range of intra-chain curvature. The relative distance between each target joint and its associated joint falls within a preset association distance range; wherein, the target joint is a virtual joint bound to the target model in a joint chain, and the target joint is not a head virtual joint; the associated joint is a virtual joint in the target model.
[0201] In this embodiment of the application, the inter-chain constraints include: The relative distance between the end virtual joints of each pair of joint chains falls within a preset range of inter-chain distances. The curvature between multiple joints to be processed corresponding to each pair of joint chains falls within a preset range of inter-chain curvature; wherein, the multiple joints to be processed include: the end virtual joints of each of the two joint chains, and a virtual joint adjacent to an end virtual joint.
[0202] In this embodiment, each virtual joint corresponds to a reference joint; the reference joint is an adjacent joint within the same joint chain as the corresponding virtual joint; the motion simulation unit 172 is specifically configured to: perform the correction of the rope model in the non-first frame based on the physical positions of the multiple virtual joints; For each virtual joint, the following steps are performed: determining a first physical direction from the physical position of the virtual joint to the physical position of the corresponding reference joint; and determining a first animation direction from the animation position of the virtual joint in the non-first frame to the animation position of the corresponding reference joint in the non-first frame. Obtain the first rotation angle between the first physical direction and the first animation direction; Based on the first rotation angle, the current rotation angle of the virtual joint is corrected.
[0203] In this embodiment of the application, the motion simulation unit 172 is specifically configured to perform the correction of the current rotation angle of the virtual joint based on the first rotation angle. When the virtual joint is not the end virtual joint in the joint chain, the first rotation angle is used to correct the current rotation angle of the virtual joint; When the virtual joint is the end virtual joint in a joint chain, the current rotation angle of the virtual joint is corrected based on the first rotation angle, combined with the physical position of the end virtual joints of the plurality of joint chains and the animation position of the end virtual joints of the plurality of joint chains in the non-first frame.
[0204] In this embodiment, the motion simulation unit 172 is specifically configured to correct the current rotation angle of the virtual joint based on the first rotation angle, combined with the physical position of the end virtual joints of the plurality of joint chains, and the animation position of the end virtual joints of the plurality of joint chains in the non-first frame. The physical centroid position is determined based on the physical position of the terminal virtual joints of each of the plurality of joint chains; The animation centroid position is determined based on the animation position of the terminal virtual joints of the multiple joint chains in the non-first frame. Determine a second physical direction from the physical position of the virtual joint to the physical centroid position; and determine a second animation direction from the animation position of the virtual joint in the non-first frame to the animation centroid position. Based on the first rotation angle, an interpolation operation is performed on the second rotation angle between the second physical direction and the second animation direction to obtain the corrected rotation angle of the virtual joint; The current rotation angle of the virtual joint is corrected using the corrected rotation angle.
[0205] In this embodiment of the application, the motion simulation unit 172 is specifically configured to perform the correction of the rope model in the non-first frame based on the physical positions of the plurality of virtual joints: For each virtual joint, the following steps are performed: interpolation calculations are performed on the physical position of the virtual joint and its animation position in the non-first frame based on preset weights to obtain the target position of the virtual joint; Adjust the animation position of the virtual joint in the non-first frame to be the same as the target position.
[0206] Having introduced the motion simulation method and apparatus for a rope model according to an exemplary embodiment of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.
[0207] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0208] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. This electronic device can be a server, such as... Figure 2 The server 220 is shown. The structure of this electronic device can be as follows: Figure 18 As shown, it includes a memory 1801, a communication module 1803, and one or more processors 1802.
[0209] The memory 1801 is used to store computer programs executed by the processor 1802. The memory 1801 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0210] Memory 1801 may be volatile memory, such as random-access memory (RAM); memory 1801 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1801 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1801 may be a combination of the above-described memories.
[0211] The processor 1802 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 1802 is used to implement the motion simulation method of the rope model described above when it calls the computer program stored in the memory 1801.
[0212] The communication module 1803 is used to communicate with terminal devices and other servers.
[0213] This application embodiment does not limit the specific connection medium between the memory 1801, communication module 1803, and processor 1802. This application embodiment... Figure 18 The memory 1801 and the processor 1802 are connected via a bus 1804, and the bus 1804 is in Figure 18 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 1804 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 18 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.
[0214] The memory 1801 stores a computer storage medium containing computer-executable instructions. These instructions are used to implement the motion simulation method for the rope model according to embodiments of this application. The processor 1802 is used to execute the aforementioned motion simulation method for the rope model, such as... Figure 19 As shown.
[0215] The electronic device in the embodiments of this application can also be other electronic devices, such as... Figure 2 The client 210 is shown. The structure of the electronic device can be as follows: Figure 19 As shown, it includes components such as: communication component 1910, memory 1919, display unit 1930, camera 1940, sensor 1950, audio circuit 1960, Bluetooth module 1970, processor 1980, etc.
[0216] The communication component 1910 is used to communicate with the server. In this embodiment, it may include a Wireless Fidelity (WiFi) module. The WiFi module belongs to short-range wireless transmission technology, and the electronic device can help the requester send and receive information through the WiFi module.
[0217] The memory 1919 can be used to store software programs and data. The processor 1980 executes various functions of the client device 110 and performs data processing by running the software programs or data stored in the memory 1919. The memory 1919 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1919 stores an operating system that enables the client device 110 to run. In this application, the memory 1919 may store the operating system and various application programs, and may also store a computer program that executes the motion simulation method of the rope model disclosed in the embodiments of this application.
[0218] The display unit 1930 can also be used to display a graphical user interface (GUI) for information input by the requester or information provided to the requester, as well as various menus of the client device 110. Specifically, the display unit 1930 may include a display screen 1932 disposed on the front of the client device 110. The display screen 1932 may be configured as a liquid crystal display, a light-emitting diode, or the like. The display unit 1930 can be used to display answers to questions in the embodiments of this application.
[0219] The display unit 1930 can also be used to receive input digital or character information and generate signal inputs related to the requester settings and function control of the client device 110. Specifically, the display unit 1930 may include a touch screen 1931 disposed on the front of the client device 110, which can collect touch operations on or near the requester, such as clicking a button, dragging a scroll bar, etc.
[0220] The touchscreen 1931 can be placed on top of the display screen 1932, or the touchscreen 1931 and the display screen 1932 can be integrated to realize the input and output functions of the client device 110. After integration, it can be referred to as a touch display screen. In this application, the display unit 1930 can display the application and the corresponding operation steps.
[0221] Camera 1940 can be used to capture still images, and the requesting party can publish the images captured by camera 1940 through an application. There can be one or more cameras 1940. An object is projected onto a photosensitive element through a lens, generating an optical image. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to processor 1980 to be converted into a digital image signal.
[0222] The electronic terminal device in this application embodiment may further include at least one sensor 1950, such as an accelerometer 1951, a proximity sensor 1952, a fingerprint sensor 1953, and a temperature sensor 1954. The terminal device may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.
[0223] Audio circuitry 1960, speaker 1961, and microphone 1962 provide an audio interface between the requester and client device 110. Audio circuitry 1960 converts received audio data into electrical signals, transmits them to speaker 1961, and speaker 1961 converts them into sound signals for output. Client device 110 may also be equipped with volume buttons for adjusting the volume of the sound signal. On the other hand, microphone 1962 converts collected sound signals into electrical signals, which are then received by audio circuitry 1960, converted into audio data, and output to communication component 1910 for transmission to, for example, another client device 110, or to memory 1919 for further processing.
[0224] The Bluetooth module 1970 is used to interact with other Bluetooth devices that also have a Bluetooth module via the Bluetooth protocol. For example, a terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smartwatch) that also has a Bluetooth module through the Bluetooth module 1970, thereby exchanging data.
[0225] The processor 1980 is the control center of the terminal device. It connects various parts of the terminal through various interfaces and lines. It performs various functions of the terminal device and processes data by running or executing software programs stored in the memory 1919 and calling data stored in the memory 1919.
[0226] The processor 1980 in this application embodiment may include one or more processing units; the processor 1980 may also integrate an application processor and a baseband processor, wherein the application processor mainly handles the operating system, external interface, and applications, and the baseband processor mainly handles wireless communication. It is understood that the baseband processor may not be integrated into the processor 1980. In this application, the processor 1980 can run the operating system, applications, interface display and touch response, as well as the motion simulation method of the rope model in this application embodiment. Furthermore, the processor 1980 is coupled to the display unit 1930.
[0227] In this application embodiment, various aspects of the motion simulation method for the rope model provided in this application can also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to cause the electronic device to perform the steps in the motion simulation method for the rope model according to various exemplary embodiments of this application described above.
[0228] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0229] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include a computer program, and may run on an electronic device. It should be understood that the program product of this application is not limited thereto. In this application, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.
[0230] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.
[0231] Computer programs contained on readable media may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0232] Computer programs for performing the operations of this application may be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The computer program may execute entirely on the requester's local electronic device, partially on the requester's local electronic device, as a standalone software package, partially on the local electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device may be connected to the electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0233] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0234] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0235] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing a computer-usable computer program.
[0236] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a mechanism for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0237] These computer program commands can also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing the commands executed on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0238] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0239] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A motion simulation method for a rope model, characterized in that, The method includes: Multiple animation frames are acquired; wherein, the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; Based on the playback order of the multiple animation frames, for each non-first frame other than the first frame, the following steps are executed sequentially: Based on the preset external motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. Based on the preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between each virtual joint in each joint chain, and inter-chain constraint conditions for constraining the relative position between each joint chain. Based on the physical positions of the multiple virtual joints, the rope model in the non-first frame is corrected.
2. The method according to claim 1, characterized in that, The virtual joint at the beginning of each joint chain is bound to the target model; Based on preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame, including: The preset animation position of the first virtual joint in each joint chain in the non-first frame is taken as the physical position of the first virtual joint in the joint chain. Based on the constraints within the chain, and referring to the physical position of the first virtual joint in each joint chain, the initial positions of each virtual joint other than the first virtual joint in each joint chain are corrected to obtain the middle position of each other virtual joint. Based on the inter-chain constraints, the intermediate positions of each of the other virtual joints are corrected to obtain the physical position of each of the sub-joints.
3. The method according to claim 2, characterized in that, The intra-chain constraints include: The relative distance between any two adjacent virtual joints falls within a preset range of intra-chain distances. The curvature between every three consecutive virtual joints falls within a preset range of intra-chain curvature. The relative distance between each target joint and its associated joint falls within a preset association distance range; wherein, the target joint is a virtual joint bound to the target model in a joint chain, and the target joint is not a head virtual joint; the associated joint is a virtual joint in the target model.
4. The method according to claim 2, characterized in that, The inter-chain constraints include: The relative distance between the end virtual joints of each pair of joint chains falls within a preset range of inter-chain distances. The curvature between multiple joints to be processed corresponding to each pair of joint chains falls within a preset range of inter-chain curvature; wherein, the multiple joints to be processed include: the end virtual joints of each of the two joint chains, and a virtual joint adjacent to an end virtual joint.
5. The method according to any one of claims 1-4, characterized in that, Each virtual joint corresponds to a reference joint; the reference joint is an adjacent joint in the same joint chain as the corresponding virtual joint. The step of correcting the rope model in the non-first frame based on the physical positions of the multiple virtual joints includes: For each virtual joint, the following steps are performed: determining a first physical direction from the physical position of the virtual joint to the physical position of the corresponding reference joint; and determining a first animation direction from the animation position of the virtual joint in the non-first frame to the animation position of the corresponding reference joint in the non-first frame. Obtain the first rotation angle between the first physical direction and the first animation direction; Based on the first rotation angle, the current rotation angle of the virtual joint is corrected.
6. The method according to claim 5, characterized in that, The step of correcting the current rotation angle of the virtual joint based on the first rotation angle includes: When the virtual joint is not the end virtual joint in the joint chain, the first rotation angle is used to correct the current rotation angle of the virtual joint; When the virtual joint is the end virtual joint in a joint chain, the current rotation angle of the virtual joint is corrected based on the first rotation angle, combined with the physical position of the end virtual joints of the plurality of joint chains and the animation position of the end virtual joints of the plurality of joint chains in the non-first frame.
7. The method according to claim 6, characterized in that, The step of correcting the current rotation angle of the virtual joint based on the first rotation angle, combined with the physical position of the end virtual joints of each of the plurality of joint chains, and the animation position of the end virtual joints of each of the plurality of joint chains in the non-first frame, includes: The physical centroid position is determined based on the physical position of the terminal virtual joints of each of the plurality of joint chains; The animation centroid position is determined based on the animation position of the terminal virtual joints of the multiple joint chains in the non-first frame. Determine a second physical direction from the physical position of the virtual joint to the physical centroid position; and determine a second animation direction from the animation position of the virtual joint in the non-first frame to the animation centroid position. Based on the first rotation angle, an interpolation operation is performed on the second rotation angle between the second physical direction and the second animation direction to obtain the corrected rotation angle of the virtual joint; The current rotation angle of the virtual joint is corrected using the corrected rotation angle.
8. The method according to any one of claims 1-4, characterized in that, The step of correcting the rope model in the non-first frame based on the physical positions of the multiple virtual joints includes: For each virtual joint, the following steps are performed: interpolation calculations are performed on the physical position of the virtual joint and its animation position in the non-first frame based on preset weights to obtain the target position of the virtual joint; Adjust the animation position of the virtual joint in the non-first frame to be the same as the target position.
9. A motion simulation device for a rope model, characterized in that, The device includes: The data acquisition unit is configured to acquire multiple animation frames; wherein the multiple animation frames are used to describe the motion trajectory of the rope model, the rope model includes multiple joint chains, and each joint chain includes multiple virtual joints; The motion simulation unit is configured to, based on the playback order of the plurality of animation frames, sequentially execute the following for each non-first frame other than the first frame: Based on the preset external motion force and combined with the physical positions of the multiple virtual joints in the previous frame, position prediction is performed on each virtual joint to obtain the initial position of each virtual joint in the non-first frame; in the first frame, the physical position of each virtual joint is the animation position of the virtual joint. Based on the preset rope constraint conditions, the initial position of each virtual joint is corrected to obtain the physical position of each virtual joint in the non-first frame; the rope constraint conditions include: intra-chain constraint conditions for constraining the relative position between each virtual joint in each joint chain, and inter-chain constraint conditions for constraining the relative position between each joint chain. Based on the physical positions of the multiple virtual joints, the rope model in the non-first frame is corrected.
10. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the methods described in claims 1 to 8.
11. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the methods described in claims 1 to 8.
12. A computer program product, characterized in that, The method includes a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any one of claims 1 to 8.