Method and apparatus for generating animation of virtual object, computer program product and device

By dividing the vehicle's carry-on space into layers of constraint space, and generating a bumpy animation effect of the prop during movement based on the prop's physical parameters and the vehicle's physical constraints, the problem of unrealistic mutual compression and bumpy effects in the physical simulation of props carried by vehicles is solved, achieving more natural prop movement and efficient animation production.

CN122156405APending Publication Date: 2026-06-05NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle multiple props of different volumes in the physical simulation of vehicles carrying props, resulting in unexpected physical behaviors such as objects squeezing, bouncing, and penetrating each other. Furthermore, it is difficult to achieve the natural bumping and swaying effect of props moving with the vehicle.

Method used

By dividing the space of a virtual mobile vehicle into layers of constraint space, and generating a bumpy animation effect of the prop during movement based on the prop's physical parameters and the vehicle's physical constraints, displacement and rotation thresholds are set to limit the range of movement of the prop within the constraint space and prevent the prop from detaching from the vehicle.

Benefits of technology

It improves the realism of the animation effects of props bumping on vehicles, avoids the problem of props squeezing each other, enhances the rationality and stability of the animation, reduces the workload of manually adjusting animation parameters, and improves the efficiency of animation production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156405A_ABST
    Figure CN122156405A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computers, and relates to a virtual object animation generation method and device, a computer program product and an electronic device. The virtual object animation generation method comprises: determining a target constraint space of a to-be-carried prop in a carriable space of a virtual mobile carrier according to physical parameters of the to-be-carried prop, the carriable space comprising a plurality of constraint spaces with different space capacities; determining a physical constraint condition corresponding to the to-be-carried prop according to the target constraint space, the physical constraint condition being used to limit a displacement threshold and / or a rotation angle threshold allowed for the to-be-carried prop in the target constraint space; and generating a jolt animation effect of the to-be-carried prop when the to-be-carried prop is carried by the virtual mobile carrier to move according to carrier motion data, the physical parameters and the physical constraint condition. The present disclosure can improve the jolt animation effect of the virtual mobile carrier carrying the prop and improve the animation realism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method for generating animation of virtual objects, an apparatus for generating animation of virtual objects, a computer program product, and an electronic device. Background Technology

[0002] In game development, especially in games involving vehicle systems, realistically representing the physical effects of vehicles (such as cars) carrying items is crucial for delivering realistic animation effects. While traditional game physics engines can simulate basic physical collisions and gravity effects, they often face numerous technical challenges when handling scenes with vehicles carrying items, particularly when dealing with multiple items of varying sizes, extremely large items, and achieving realistic bumpy and swaying effects. For example, in current physics simulations, if there are many or large objects, unexpected physical behaviors such as objects squeezing, bouncing, or penetrating each other can easily occur. During vehicle movement, items need to exhibit natural bumpy and swaying effects while the vehicle is in motion, while simultaneously preventing items from falling off. This places higher demands on the physics constraint system.

[0003] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this disclosure is to provide a method and apparatus for generating animations of virtual objects, a computer program product and an electronic device, thereby overcoming, to at least a certain extent, the defects of related technologies, improving the bumpy animation effect of virtual mobile vehicles carrying props, and enhancing the realism of the animation.

[0005] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0006] According to one aspect of this disclosure, a method for generating animation of a virtual object is provided, comprising: determining a target constraint space for the object to be mounted in the loadable space of a virtual mobile vehicle based on the physical parameters of the object to be mounted, wherein the loadable space includes multiple constraint spaces with different spatial capacities; determining physical constraint conditions corresponding to the object to be mounted based on the target constraint space, wherein the physical constraint conditions are used to limit the allowable displacement threshold and / or rotation angle threshold of the object to be mounted within the target constraint space; and generating a bumpy animation effect when the object to be mounted moves on the virtual mobile vehicle based on vehicle motion data, physical parameters, and physical constraint conditions.

[0007] In one exemplary embodiment of this disclosure, the method further includes: dividing the space to be carried into multiple constraint spaces according to the volume of the props required for generating the animation and the size of the space to be carried, and determining the space capacity of each constraint space to obtain multiple constraint spaces with different space capacities; wherein the space capacity of the constraint space is positively correlated with the volume of the props that the constraint space can accommodate.

[0008] In one exemplary embodiment of this disclosure, in the mountable space, adjacent constraint spaces include overlapping spatial regions.

[0009] In one exemplary embodiment of this disclosure, the physical parameters include the volume of the prop; determining the target constraint space of the prop to be mounted in the mountable space of the virtual mobile vehicle according to the physical parameters of the prop to be mounted includes: determining the target constraint space from multiple constraint spaces according to the volume of the prop to be mounted and the spatial capacity of multiple constraint spaces.

[0010] In one exemplary embodiment of this disclosure, the method further includes: determining the space level corresponding to each constraint space according to the space capacity of the constraint space, wherein the space level corresponds to the volume level of the prop that the constraint space can accommodate; determining the target constraint space of the prop to be carried in the carryable space of the virtual mobile vehicle according to the physical parameters of the prop to be carried, including: determining the target constraint space according to the target volume level corresponding to the volume of the prop to be carried and the corresponding relationship.

[0011] In one exemplary embodiment of this disclosure, the physical parameters further include the weight of the prop; determining the target constraint space of the prop to be mounted in the loadable space of the virtual mobile vehicle according to the physical parameters of the prop to be mounted further includes: determining the position of the prop to be mounted in the target constraint space according to the volume and / or weight of the prop corresponding to the prop allocated to the target constraint space.

[0012] In one exemplary embodiment of this disclosure, determining the physical constraint conditions corresponding to the prop to be mounted according to the target constraint space includes: determining a first reference constraint parameter corresponding to the prop to be mounted according to the target constraint space; determining a second reference constraint parameter corresponding to the category according to the category of the prop to be mounted; and determining the physical constraint conditions according to the first reference constraint parameter and the second reference constraint parameter.

[0013] In one exemplary embodiment of this disclosure, the method further includes: pre-creating candidate constraint components for different categories of props; determining a second reference constraint parameter corresponding to the category of the prop to be mounted, including: determining a target constraint component from the candidate constraint components according to the category of the prop to be mounted; loading the parameters corresponding to the target constraint component to obtain the second reference constraint parameter; or, adjusting the parameters corresponding to the target constraint component according to the category of the prop to be mounted to obtain the second reference constraint parameter.

[0014] In one exemplary embodiment of this disclosure, candidate constraint components are stored in an object pool, and the method further includes at least one or more of the following steps: creating candidate constraint components to maintain the total number of candidate constraint components in the object pool at no less than a preset number threshold; and, in response to an item deletion operation, returning the candidate constraint component corresponding to the deleted item to the object pool.

[0015] In one exemplary embodiment of this disclosure, the physical parameters include initial material data and initial mass data. The method for determining the jarring animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on vehicle motion data, physical parameters, and physical constraints, includes: determining a preset physical parameter configuration for the prop to be mounted; adjusting the initial material data and initial mass data according to the preset physical parameter configuration to obtain adjusted physical parameters; and determining the jarring animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on vehicle motion data, adjusted physical parameters, and physical constraints.

[0016] In one exemplary embodiment of this disclosure, if there are multiple props to be mounted, the target constraint space of the props to be mounted is determined in the mountable space of the virtual mobile vehicle according to the physical parameters of the props to be mounted. The method further includes: determining the order in which the target constraint space of each prop to be mounted is determined according to the volume of the prop and / or the weight of the prop.

[0017] In one exemplary embodiment of this disclosure, the method further includes: obtaining a candidate prop component corresponding to the prop to be equipped from a pre-created inactive candidate prop component; and creating the prop to be equipped based on the candidate prop component.

[0018] According to one aspect of this disclosure, an animation generation apparatus for virtual objects is provided, comprising: a constraint space determination module, configured to determine a target constraint space for the prop to be mounted in the loadable space of a virtual mobile vehicle based on the physical parameters of the prop to be mounted, wherein the loadable space includes multiple constraint spaces with different spatial capacities; a physical constraint determination module, configured to determine physical constraint conditions corresponding to the prop to be mounted based on the target constraint space, wherein the physical constraint conditions are used to limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted within the target constraint space; and an animation generation module, configured to generate a bumpy animation effect when the prop to be mounted is mounted on the virtual mobile vehicle for movement based on vehicle motion data, physical parameters, and physical constraint conditions.

[0019] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements any of the above methods.

[0020] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above methods by executing the executable instructions.

[0021] The virtual object animation generation method in the exemplary embodiments of this disclosure determines a target constraint space for the prop to be mounted within the mountable space of a virtual mobile vehicle based on the physical parameters of the prop to be mounted. The mountable space includes multiple constraint spaces with different capacities. Based on the target constraint space, physical constraint conditions corresponding to the prop to be mounted are determined. These physical constraint conditions limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted within the target constraint space. Based on the vehicle motion data, physical parameters, and physical constraint conditions, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle. On one hand, by layering constraint spaces within the mountable space of the virtual mobile vehicle and setting corresponding displacement and rotation thresholds for constraint spaces of different capacities, the movement range of the prop within the constraint space is limited by physical constraint conditions. This prevents phenomena that violate visual logic, such as prop clipping through or detaching from the vehicle, ensuring the rationality of the animation performance. This allows the virtual mobile vehicle to stably place props with different physical parameters, avoiding problems such as mutual compression between props, and enhancing the realism of the bumpy effect. On the other hand, the animation behavior is determined based on the physical parameters of the props and the capacity of the constrained space, which reduces the workload of manually adjusting the animation parameters and improves the efficiency of animation production.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation.

[0024] Figure 1 An application environment according to an exemplary embodiment of this disclosure is shown.

[0025] Figure 2 A flowchart of a method for generating animations of virtual objects according to an exemplary embodiment of the present disclosure is shown.

[0026] Figure 3 A pyramid-shaped distribution structure diagram is shown according to an exemplary embodiment of the present disclosure.

[0027] Figure 4 A complete flowchart of an animation generation method for a virtual object according to an exemplary embodiment of the present disclosure is shown.

[0028] Figure 5 A schematic diagram of the composition of an animation generation apparatus for a virtual object according to an exemplary embodiment of the present disclosure is shown.

[0029] Figure 6 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown.

[0030] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0031] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and therefore their detailed description will be omitted.

[0032] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details described, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known structures, methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, or in one or more software-hardened modules, or in different network and / or processor devices and / or microcontroller devices.

[0034] Currently, in physics simulations, when multiple objects are constrained within a limited space, the physics engine calculates the collisions and interactions between each object. If there are many objects or their volumes are large, unexpected physical behaviors such as objects squeezing, bouncing, or penetrating each other can easily occur. Especially during vehicle movement, props need to produce natural bumps and swaying effects with the vehicle's movement, while ensuring that the props do not fall out of the truck bed. This places higher demands on the physics constraint system.

[0035] One approach in related technologies involves directly fixing the prop to the vehicle, binding it through parent-child relationships or fixed constraints. While simple to implement, this method results in the prop completely following the vehicle's movement, lacking natural physical swaying effects, creating a stiff visual presentation, and failing to provide players with a realistic carrying experience, leading to a poor player experience. Another approach uses a physics engine's constraint system to confine the prop within the truck bed, allowing it to move freely within the constraints. While this produces some physical swaying effects, when there are many or large props, issues such as props squeezing each other or bouncing off can easily occur. Especially when the truck bed is nearly full, the physics engine's computational load increases dramatically, potentially causing performance problems, and collisions between props can easily cause them to fly out of the truck bed, resulting in visually chaotic effects. Alternatively, limiting the prop's volume to ensure it is much smaller than the vehicle's volume can guarantee a natural swaying effect within a limited space. While it avoids the problem of items squeezing each other, it cannot support the carrying of extremely large items, which limits the richness of gameplay and visual presentation.

[0036] Based on one or more of the above-mentioned problems, an exemplary embodiment of this disclosure provides a method for generating animation of virtual objects, which dynamically generates realistic bumpy animation of virtual objects during movement by layering the loadable space of virtual mobile vehicles and combining the physical parameters of the props with the physical constraints of the loadable space of the vehicle.

[0037] It should be noted that the methods of the exemplary embodiments disclosed herein can be applied to fields such as game and video animation production involving vehicle-mounted props, and no specific limitations are imposed thereon.

[0038] The virtual object animation generation method provided in the exemplary embodiments of this disclosure can be applied to, for example... Figure 1The application environment shown is illustrated. Terminal 101 communicates with server 102 via a network. A data storage system can store the data that server 102 needs to process. The data storage system can be integrated onto server 102, or it can be located in the cloud or on another network server.

[0039] In one exemplary embodiment, the provided virtual object animation generation method can be executed by server 102, and the corresponding virtual object animation generation device is disposed in server 102. Correspondingly, in this method executed by server 102, server 102 can start executing the steps in the technical solution of the exemplary embodiment of this disclosure in response to a triggering command, wherein the triggering command can be sent by a terminal used by a user, or can be triggered locally by the server in response to some automated event.

[0040] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Server 102 can execute background tasks.

[0041] Furthermore, in another exemplary embodiment, terminal 101 may also have similar functions to server 102, thereby executing the virtual object animation generation method provided by the exemplary embodiments of this disclosure. Terminal 101 may be a smartphone, tablet, laptop, desktop computer, IoT device, or portable wearable device. IoT devices may include smart TVs and smart in-vehicle devices, etc. Portable wearable devices may include smartwatches, smart bracelets, head-mounted devices, etc. Terminal 101 may also be referred to as a mobile terminal, terminal device, mobile device, etc., and the exemplary embodiments of this disclosure do not limit the type of terminal 101.

[0042] Furthermore, the technical solutions of the exemplary embodiments of this disclosure can also be executed collaboratively by terminal 101 and server 102. In this collaborative execution method, some steps of the technical solutions provided in the exemplary embodiments of this disclosure are executed by terminal 101, while other steps are executed by server 102. In this collaborative execution method, the steps executed by terminal 101 and server 102 respectively can be dynamically adjusted according to actual conditions, and no special restrictions are placed on this. Terminal 101 and server 102 can be directly or indirectly connected via wireless communication, and no special restrictions are placed on this in the exemplary embodiments of this disclosure.

[0043] refer to Figure 2The diagram shown is a flowchart of an animation generation method for a virtual object, as an exemplary embodiment of this disclosure. Figure 2 As shown, the animation generation method for this virtual object includes steps S210 to S230, as detailed below: In step S210, based on the physical parameters of the prop to be mounted, the target constraint space of the prop to be mounted is determined in the mountable space of the virtual mobile vehicle. The mountable space includes multiple constraint spaces with different spatial capacities.

[0044] In exemplary embodiments of this disclosure, a virtual mobile vehicle refers to an object model capable of displacement in a virtual environment. Examples include trucks, ships, airplanes, trolleys, conveyor belts, and spaceships. A "to-be-loaded item" refers to a virtual object that needs to be placed and moves along with the virtual mobile vehicle. Examples include cargo boxes, oil drums, furniture, characters (which can be considered special items), and liquid containers. For example, in response to an item pickup operation, the item to be picked up can be determined as a "to-be-loaded item," or a new item generated by the user during game interaction can also be used as a "to-be-loaded item." This disclosure does not specifically limit the method of triggering the virtual mobile vehicle to load items.

[0045] The physical parameters of the prop to be loaded are a set of data describing the prop's physical properties, including its volume, weight, mass, material data, shape, and size. The loadable space refers to a predefined physical area on the virtual mobile vehicle where props can be placed, such as a vehicle bed or ship cabin. The constraint space is a specific sub-region within the loadable space, possessing a defined spatial capacity (i.e., three-dimensional dimensions) and potentially fixed spatial attributes (such as position, orientation, and shape). A vehicle can include multiple constraint spaces. Spatial capacity can refer not only to volume but also to shape characteristics. The target constraint space is the best-matched constraint space selected from multiple constraint spaces based on the matching relationship between the prop's physical parameters and the constraint space's spatial capacity. "Accommodation" can be understood as ensuring that the prop's collider is completely within the boundary of the constraint space, with a certain safety margin to prevent initial collisions, and that the selected space capacity does not significantly exceed the prop's requirements to guarantee the effectiveness of subsequent physical constraints and the realism of the animation. A unique target constraint space is defined, which will serve as the reference frame for calculating the range of motion of the props. Its boundaries and capacity directly determine the subsequent physical constraints.

[0046] In step S220, the physical constraints corresponding to the prop to be mounted are determined according to the target constraint space. The physical constraints are used to limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted in the target constraint space.

[0047] In the exemplary embodiments of this disclosure, physical constraints are used to define the legal range of movement of the prop to be mounted within its target constraint space. These constraints are not fixed animation sequences, but rather boundary conditions from real-time physical simulation, determined based on the target constraint space allocated to the prop. This can be understood as allowing the prop to move within the space due to external forces (such as vehicle bumps), but limiting its range of motion to a reasonable threshold and preventing it from falling off the vehicle.

[0048] The displacement threshold is the maximum allowable movement distance of an item's center of mass or a specific anchor point relative to its default stationary position (such as the center of space) within the target constrained space. It can be represented as a three-dimensional vector or the maximum displacement radius centered at the stationary position. The displacement threshold prevents items from sliding off the vehicle horizontally, jumping excessively vertically, or unreasonably penetrating the vehicle model. The rotation angle threshold is the maximum allowable rotation angle of an item around its own coordinate axes (such as roll, pitch, and yaw). It can be represented as Euler angles, etc., without specific limitations. The rotation angle threshold prevents items from unreasonably rolling, tipping, or excessively shaking, causing them to fall off the vehicle or unreasonably penetrate the vehicle model. Transforming abstract space into concrete, physical constraints makes the movement of items no longer random or uniform, but strictly related to their specific physical environment (constrained space), further enhancing the realism of bumpy animations.

[0049] In step S230, based on the vehicle motion data, physical parameters, and physical constraints, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle.

[0050] In the exemplary embodiments disclosed herein, the bumpy animation effect refers to the dynamic response motion of the prop to be carried due to the movement of the virtual mobile vehicle (such as acceleration, deceleration, turning, crossing uneven roads, wave undulations, air turbulence, etc.), including but not limited to a combination of motion forms such as shaking, swaying, sliding, jumping, trembling, and rebounding. It is not a pre-recorded, fixed animation clip, but a dynamic process generated in real time by an algorithm and changing with input conditions. Vehicle motion data refers to the motion state data of the virtual mobile vehicle, including but not limited to acceleration, speed, and direction of movement. Physical parameters may also include prop material and mass.

[0051] This disclosure determines the bumpy animation effect when a prop is mounted on a virtual mobile vehicle, based on vehicle motion data, physical parameters, and physical constraints. This effect is generated through calculation or simulation, involving input physical parameters, constraints, and vehicle motion data. The processing involves physical simulation and animation hybrid algorithms, which output the pose transformation matrix of the prop for each frame. Finally, the precise position and rotation angle of the prop relative to the vehicle in each frame are generated, thus forming the bumpy animation effect.

[0052] The virtual object animation generation method in the exemplary embodiments of this disclosure, on the one hand, by layering and constraining the space that can be carried by the virtual mobile vehicle, and setting corresponding displacement and rotation thresholds for constrained spaces of different capacities, limits the range of motion of the props within the constrained space through physical constraints, preventing phenomena that violate visual logic, such as props clipping through or detaching from the vehicle, thus ensuring the rationality of the animation performance. This allows the virtual mobile vehicle to stably place props with different physical parameters, avoiding problems such as props squeezing each other, and enhancing the realism of the bumpy effect. On the other hand, by determining the animation behavior based on the physical parameters of the props and the capacity of the constrained space, the workload of manually adjusting animation parameters is reduced, thereby improving the efficiency of animation production.

[0053] The plan will be explained in more detail below.

[0054] In one exemplary embodiment, a method for partitioning the constraint space of a virtual mobile vehicle is provided. This method includes: Based on the volume of the props required to generate the animation and the size of the space that can be carried, the space that can be carried is divided into multiple constrained spaces, and the space capacity of each constrained space is determined to obtain multiple constrained spaces with different space capacities. Among them, the spatial capacity of the constrained space is positively correlated with the volume of the props that the constrained space can accommodate.

[0055] Specifically, the volume of props required for animation generation refers to the total volume of all props planned to be loaded onto the virtual mobile vehicle in this animation generation task, or it can be the average volume of the required props. Dividing the loadable space into multiple constraint spaces is a spatial segmentation process. Taking the original, continuous loadable space on the vehicle (such as the entire cargo box or the entire deck) as input, it is discretized and structured into multiple independent, clearly defined sub-regions (i.e., constraint spaces) according to requirements. The spatial capacity of a constraint space is positively correlated with the volume of props it can accommodate. This means that the size (spatial capacity) of each defined constraint space is not arbitrarily specified, but rather has a positive correlation with the volume of the props expected to be placed in that space. The larger the expected prop volume, the larger the capacity of the constraint space allocated to it. This mapping relationship can be a simple linear ratio, a tiered matching, or determined based on an optimization algorithm. For example, space capacity = prop volume × safety factor; for example, setting small, medium, and large props to correspond to small, medium, and large constraint spaces, or dynamically determined based on two-dimensional rectangular layout and three-dimensional spatial packing algorithms.

[0056] Optionally, the vehicle constraint space can be divided into multiple constraint spaces with a pyramid structure, such as... Figure 3 As shown, the first level (bottom of the tower) corresponds to the smallest volume item with a small constrained space range (spatial capacity), while the sixth level (top of the tower) corresponds to the largest volume item. Each level has a corresponding constrained space range; the higher the level, the larger the constrained space, forming a pyramid-shaped distribution structure to ensure the stability of the physical structure. Of course, this... Figure 3 This is just an example.

[0057] As an example, the average volume of the props needed to generate the animation can be obtained first. Based on a multiple of this average, the available space can be divided into multiple constrained spaces with different capacities. This division can be performed using a pre-trained partitioning model (trained based on sample data of prop volume and vehicle volume). The partitioning model can be constructed using lightweight neural networks, such as CNN (Convolutional Neural Network), RNN (Recurrent Neural Networks), and DNN (Deep Neural Networks). Alternatively, more complex partitioning models, or even large models with hundreds of millions of units, can be used, without specific limitations on the network architecture. Optionally, the space capacity can also be determined by multiplying the prop volume by α, where α provides a margin for movement, such as a range of 1.2 to 1.5. Optionally, multiple space capacities can be preset, and space is allocated according to the range the prop volume falls into.

[0058] Based on this, by dynamically dividing the constraint space in real time according to the volume of the prop and the size of the carrying space, it no longer relies on a fixed space layout arranged manually in advance. It can automatically adapt to any unknown or randomly combined prop carrying needs. Furthermore, based on the division rules of positive correlation mapping, it ensures that the capacity of each constraint space matches the volume of the prop inside, thereby avoiding unreasonable phenomena such as small props shaking excessively in large spaces or large props clipping through small spaces. This makes the subsequently generated physical constraints and bumpy animations more in line with the real physical situation, enhancing the realism and credibility of the animation.

[0059] In an exemplary embodiment, the physical parameters include the volume of the prop; determining the target constraint space of the prop to be mounted within the mountable space of the virtual mobile vehicle based on the physical parameters of the prop to be mounted includes: Based on the volume of the prop to be mounted and the spatial capacity of multiple constraint spaces, the target constraint space is determined from the multiple constraint spaces.

[0060] The volume of the prop to be mounted is a measure of the three-dimensional space occupied by the prop model. In implementation, it can be the volume of its axial bounding box (AABB) or, more precisely, the volume of the collider, serving as a direct basis for measuring the space required by the prop. This process matches volume with spatial capacity. For a given prop volume Vprop, it finds the optimal output (target constraint space) among multiple spatial capacities {Ci}. The matching goal is to find a constraint space that satisfies the following conditions: its capacity Ctarget is greater than or equal to Vprop (satisfying containment), and the difference between Ctarget and Vprop (i.e., the margin) is as small as possible or within a reasonable preset range (satisfying matching degree). The specific preset range is the ideal safety factor, which can be flexibly adjusted according to actual needs.

[0061] As an example, all constraint spaces can be traversed, and all spaces with a capacity Ci greater than or equal to Vprop can be selected to form a candidate list. Then, the space with the smallest Ci-Vprop value can be selected, or a space whose difference between its capacity Ci and Vprop is closest to the preset ideal safety factor can be selected. This creates a target constraint space that can both accommodate the equipment to be mounted and be stable.

[0062] This disclosure, by quantifying and comparing the volume of a prop with the capacity of each constraint space, can automatically and accurately assign a suitable mounting position to any prop. Since the prop is matched with the most appropriately sized constraint space, the accuracy and rationality of the physical constraints calculated in subsequent steps are directly determined. A tightly fitted space will produce strict motion restrictions, simulating a stable effect, while a moderately loose space allows for reasonable swaying. This matching relationship provides accurate prerequisites for ultimately generating physically believable and varied bumpy animations.

[0063] In an exemplary embodiment, the spatial level corresponding to each constraint space can be determined based on the spatial capacity of the constraint space, and the spatial level corresponds to the volume level of the prop that the constraint space can accommodate. Based on this, the target constraint space of the prop to be carried is determined in the carryable space of the virtual mobile vehicle according to the physical parameters of the prop to be carried, including: determining the target constraint space according to the target volume level corresponding to the volume of the prop to be carried and the corresponding relationship.

[0064] The spatial hierarchy is based on the size of the constrained space, dividing it into several discrete, ordered categories, such as spatial hierarchy 1 to 6. This can be a simple capacity range division, such as 0-1m³ for level 1, 1-3m³ for level 2, and above 3m³ for level 3, and so on. It can also be a pre-defined label based on the vehicle's design logic, such as luggage compartments or cargo holds. The volume hierarchy refers to the size of the equipment to be carried, dividing it into discrete categories similar to the spatial hierarchy. For example, it can also be divided into volume hierarchy 1 to 6 for standardized classification of equipment, allowing for rapid matching with spaces of the same level. In other words, there is a correspondence between the spatial hierarchy and the volume hierarchy of the equipment that the constrained space can accommodate; there is a mapping rule between the spatial hierarchy and the volume hierarchy. This can be same-level matching, such as a level 2 volume item should be placed in a level 2 space. Alternatively, this mapping rule can be backward compatible, such as a level 2 volume item can be placed in either level 2 or level 3 spaces, but level 2 is preferred, thus providing a more flexible matching rule.

[0065] As an example, taking the center of the bottom of the truck bed as the origin, and assuming the truck bed's space is 240mm long, 100mm wide, and 100mm high (with no obstruction at the top, it can be considered a 5-sided truck bed), the item levels are divided into 1-6 levels. The item's level determines its automatic allocation to level 1-6 of the truck bed space. Therefore, the truck bed space is divided into 6 levels (1-6) according to height and volume. For example, a level 6 item has a size of 1 and is located in level 6. Its range of movement is [-120, -50, 0]~[120, 50, 30], meaning it can move horizontally within the range of -120 to 120, vertically within the range of -50 to 50, and within the range of 0 to 30 from the bottom of the truck bed. Similarly, for items at space level 1, the movement range is between [-120, -50, 60] and [-120, -50, 140]. Other levels follow the same pattern: level 2 ranges from [-120, -50, 50] to [-120, -50, 120], level 3 ranges from [-120, -50, 40] to [-120, -50, 100], level 4 ranges from [-120, -50, 30] to [-120, -50, 80], and level 5 ranges from [-120, -50, 20] to [-120, -50, 60]. Furthermore, the height movement ranges for items from level 1 to 6 are 80, 70, 60, 50, 40, and 30 respectively.

[0066] This disclosure transforms the problem of matching specific capacity with volume into querying and comparing discrete level labels, avoiding the overhead of traversing all constraint spaces for comparison and sorting. The matching process is simplified to one or several query logic judgments, greatly reducing the time complexity and making it more suitable for achieving millisecond-level response in real-time interactive scenarios (such as in game frame updates).

[0067] In one exemplary embodiment, in the mountable space, adjacent constraint spaces include overlapping spatial regions.

[0068] In this context, adjacent constraint spaces refer to multiple constraint spaces within the drivable space of a virtual mobile vehicle that are spatially connected or close to each other, with their boundaries being geometrically adjacent. For example... Figure 3 The layer 3 shown is adjacent to both layers 2 and 4. Overlapping spatial regions refer to shared three-dimensional areas between adjacent constrained spaces. Logically, these areas do not belong exclusively to any one space but are shared, vaguely defined buffer zones. This allows props a certain degree of freedom of movement between different constrained spaces.

[0069] It should be understood that the overlap here does not mean that the models of the two props can penetrate each other without any cost, but rather that there is an intersection in the physical constraints within which they are allowed to move.

[0070] In actual implementation, considering that objects in simulated real-world scenarios are not always separated by absolutely rigid barriers—for example, cargo secured by ropes may experience slight compression, cargo boxes may briefly encroach on adjacent areas during bumps, and soft packages may deform and occupy some intermediate space—the physical constraint boundaries of adjacent spaces (i.e., the range defined by the previously defined displacement threshold) are intentionally partially overlapped when dividing or defining constraint spaces, rather than having their movable areas strictly tangent. This can be understood as follows: in some cases, when only one prop enters this overlapping area, it is considered a legal movement. When props from two adjacent spaces simultaneously enter this overlapping area, interaction processing can be triggered.

[0071] This disclosure avoids the stiffness of props always maintaining a safe distance during movement by simulating slight compression and interaction between objects, making the collective movement animation of numerous props on a vehicle more vivid and believable. Furthermore, since numerical errors and simulation step sizes may cause props to briefly and slightly exceed boundaries in actual calculations, the overlapping area acts as a buffer, absorbing these minor calculation deviations and preventing unstable jitter or penetration phenomena caused by extremely strict boundary checks.

[0072] In one exemplary embodiment, a method for determining the position of an item within a target constraint space is also provided. Where the physical parameters also include the item's weight, determining the target constraint space for the item to be carried within the carryable space of the virtual mobile vehicle, based on the physical parameters of the item to be carried, further includes: The position of the prop to be mounted in the target constrained space is determined based on the volume and / or weight of the prop corresponding to the prop allocated to the target constrained space.

[0073] The prop weight refers to the mass of the prop to be mounted, which determines the object's inertia and its impact on balance. The position within the target constraint space refers to the coordinates of the prop's local coordinate system origin (e.g., center of mass) relative to the target constraint space's local coordinate system after placement. This position is not fixed but is determined for props assigned to the same constraint space, based on the prop's volume and / or weight.

[0074] Specifically, the props assigned to the target constraint space refer to the set of all props that have been determined to be placed within that target constraint space, including the prop currently being processed and other props that may already exist in that space. Therefore, the physical parameters (volume, weight) of all props in this set can be considered to comprehensively calculate an optimal placement coordinate for the prop currently being processed.

[0075] Optionally, heavier, smaller props can be prioritized for placement in the lower-middle part of the target constraint space, while lighter, larger props can be placed in the upper-middle part. The target constraint space can be divided into different vertical levels (e.g., upper, middle, and lower), each with a specified volume and weight range (or density range). This allows the placement of the props within the target constraint space to be determined based on their volume and weight. By prioritizing the placement of heavier, smaller (high-density) props in the lower-middle part of the space, the overall center of gravity of the vehicle is directly lowered. This fundamentally simulates real-world loading safety principles, resulting in more stable and reasonable attitude changes during subsequent motion simulations (such as turning and bumping), significantly enhancing the credibility of the physical simulation.

[0076] Optionally, the weight and current coordinates of all items already placed within the target constraint space can be obtained, and the current center of mass position formed by these items can be calculated. Based on the weight of the item to be loaded, the new center of mass position of the entire target constraint space can be calculated when it is placed in multiple candidate positions within the target constraint space. The candidate position that makes the new center of mass closest to the geometric center of the target constraint space is selected as the placement position of the item to be loaded. If the space is empty, the item can be placed directly in the center of the space. By calculating and optimizing the overall center of mass position after loading, making it as close as possible to the geometric center of the space (i.e., the ideal stable point), the core influence of load balance on vehicle stability in the real world is directly simulated from the perspective of mechanical principles. This allows the vehicle to exhibit a physically consistent attitude response in subsequent movement, turning, and bumping animations, enhancing the credibility and immersion of the virtual scene.

[0077] Furthermore, a location decision-making model can be constructed to acquire scenario data, including various spatial states, prop combinations, and corresponding optimal placement locations. This data can be obtained through simulation optimization algorithms, expert rules, or historical success cases. The model can then be trained directly using state-optimal location data pairs, enabling it to learn to predict the optimal location. This model can utilize network structures such as CNN, RNN, and large language models; there are no restrictions on its architecture.

[0078] Based on this, the three-dimensional geometric information of the target constraint space can be acquired in real time, and the physical parameters of all props assigned to this space, mainly including volume and weight, as well as their current position coordinates, can be collected. The volume and weight of the prop to be loaded can be obtained, and the above information can be encoded into a unified format that the model can process. For example, the space can be discretized into a grid, and the occupancy and attributes can be represented by tensors, or the space and prop information can be summarized into a structured numerical vector. The encoded state data is input into a pre-trained position decision model. Based on the parameters and patterns it has learned, the model processes the input information, evaluates the merits of different candidate positions, and outputs the coordinates of an optimal placement position. Through training data, the model can automatically learn the implicit patterns and patterns of high-quality positions, thereby making near-optimal decisions, finding a balance point with the highest overall benefit, and thus achieving a globally better loading scheme, directly improving the overall operating efficiency and animation realism of the virtual vehicle.

[0079] In one exemplary embodiment, a method for determining physical constraints is provided. Determining the physical constraints corresponding to the prop to be mounted, based on a target constraint space, includes: First, based on the target constraint space, determine the first reference constraint parameters corresponding to the prop to be mounted; then, based on the category of the prop to be mounted, determine the second reference constraint parameters corresponding to the category; finally, based on the first and second reference constraint parameters, determine the physical constraint conditions.

[0080] The first reference constraint parameter refers to the physical constraint suggestion value determined based on the geometric attributes (size, shape, and prop margin) of the target constraint space. It reflects the limitations imposed by the objective physical capacity of the space on prop movement. The first reference constraint parameter can be proportional to the spatial margin (length, width, height) of the target constraint space, or the spatial margin of the target constraint space can be used as the first reference constraint value. The second reference constraint parameter refers to the physical constraint suggestion value determined based on the category of the prop to be loaded. The category of the prop to be loaded is a classification based on its function, physical characteristics, material, or business rules. For example, it may be categorized as fragile items, liquid containers, rigid goods, flexible packaging, loose particles, etc. The physical constraint parameters corresponding to each category are a set of parameters pre-configured for each prop category. This set of parameters describes the motion restriction characteristics generally applicable to this type of prop during loading, and may include, but is not limited to, the basic displacement proportionality coefficient and the basic rotation angle threshold.

[0081] Determine the physical constraint conditions based on the first reference constraint parameter and the second reference constraint parameter. This is a parameter fusion and decision-making process that can synthesize the first reference constraint parameter and the second reference constraint parameter into a final, unified physical constraint condition. Optionally, an intersection can be taken or the stricter one can be selected, that is, in the two suggestions, select the set with stricter (smaller numerical value) displacement and rotation restrictions as the final constraint to ensure that both the space limit and the item safety / feature requirements are satisfied simultaneously.

[0082] Specifically, when determining the first reference constraint parameter corresponding to the to-be-carried prop according to the target constraint space, the internal dimensions (Ls, Ws, Hs) of the target constraint space in the three main axes (such as length, width, height) can be measured, and then the bounding box dimensions (Lp, Wp, Hp) of the to-be-carried prop can be obtained. Calculate the linear margin in each direction: Margin X = Ls - Lp, Margin Y = Ws - Wp, Margin Z = Hs - Hp, and introduce a global or direction-related safety factor k (0 < k <= 1). This factor represents the proportion of the safety activity margin that will not cause the prop to immediately collide with the boundary. Then multiply the linear margin in each direction by the safety factor to obtain the proposed displacement threshold, that is, the first reference constraint parameter. Optionally, a set of space shape classifications can also be defined, such as a truck bed, a narrow pipeline, an open platform, a high-top cabin, a spherical cabin, etc. Then extract the shape features of the current target constraint space, such as the aspect ratio, the height-width ratio, whether it is a closed surface, etc., match the extracted features with the predefined classifications, and then directly read a set of preset first reference constraint parameters from the lookup table according to the matched category.

[0083] The first reference constraint parameter of the present disclosure ensures that the constraint conditions conform to the objective physical capacity of the current space, preventing unreasonable penetration or extrusion caused by forcibly implementing loose rules for large-category items in a narrow space. The second reference constraint parameter ensures that the constraint conditions respect the subjective category characteristics and safety rules of the items, preventing unreasonable large-amplitude shaking of fragile items, dangerous goods, etc. caused by ordinary prop rules in a spacious space. By fusing the two, the final constraint simultaneously satisfies the above business logics, realizes the establishment of strict physical constraints, and provides an accurate parameter basis for subsequent jolt rendering.

[0084] In an exemplary embodiment, an implementation method of cache-based constraint creation is also provided. Among them, candidate constraint components for different categories of props can be created in advance; based on this, according to the category of the to-be-carried prop, determine the second reference constraint parameter corresponding to the category, including: First, determine the target constraint component from the candidate constraint components according to the category of the to-be-carried prop; then load the parameters corresponding to the target constraint component to obtain the second reference constraint parameter; or adjust the parameters corresponding to the target constraint component to obtain the second reference constraint parameter.

[0085] Candidate constraint components are reusable, pre-configured data objects that encapsulate a complete or basic set of physical constraint parameters and / or potentially associated behavioral logic for a specific item category. They can be generated during initialization or resource loading, rather than calculated on demand. They can be preset game assets, serialized configuration files, or instantiated class objects. Examples include Fragile - Standard, Fragile - High Sensitivity, Liquid - Water, Liquid - Oil, etc. Target constraint components are selected from the candidate constraint component pool based on the category of the item to be equipped, using matching rules to determine the most suitable constraint component instance for the current item. They can be directly mapped using category name or category ID.

[0086] Specifically, loading the parameters corresponding to the target constraint component means directly reading the parameters stored in the target constraint component (such as displacement scaling factor and rotation angle threshold) into memory as the second reference physical constraint parameters. This process is a low-overhead reference or copy operation, achieving the effect of reuse and avoiding the increase of overhead with each creation.

[0087] Optionally, after loading the basic parameters of the component, these parameters can be fine-tuned according to the current specific context. For example, the specific context includes the current scene, the current vehicle's bump intensity coefficient, and specific variants of the prop. If the rotation threshold defined by the basic component is 10 degrees, and the current vehicle is marked as a bumpy road surface, the threshold can be temporarily adjusted to 8 degrees. Different context information and parameter correspondences can be pre-set. Based on this, the parameters obtained from loading the target constraint component, the current context information, and the correspondence can be used to adjust the parameters to the relevant information set in the correspondence according to the current context. For example, a set of real-time updated context variables can be maintained. After loading data from the target constraint component according to the prop category, the basic parameters are multiplied by the relevant context coefficients (obtained based on the context variables) to obtain the adjusted parameters.

[0088] This disclosure moves the time-consuming calculation and configuration of constraint parameters to the initialization or resource loading stage and establishes an efficient component cache pool in memory. This simplifies the operation of determining the second reference constraint parameters at runtime from complex calculations or I / O readings to instant memory queries and data loading, thereby reducing computational overhead. For application scenarios that require high-frequency, real-time processing of a large number of load requests (such as large-scale games), this can help ensure stable frame rates and smooth interaction.

[0089] In one exemplary embodiment, a component management method based on an object pool is also provided. Candidate constraint components are stored in the object pool. Optionally, candidate constraint components can be created to ensure that the total number of candidate constraint components in the object pool is not less than a preset threshold.

[0090] The object pool is a cache container that centrally manages candidate constraint component instances. It pre-allocates and maintains a set of initialized component objects for the system to quickly retrieve and return at runtime, rather than recreating and destroying them each time. The preset threshold indicates the minimum number of available component instances that should be maintained in the pool. When the number of available objects in the pool falls below this threshold, dynamic creation logic is triggered to prevent sudden high concurrency requests from causing threads to be blocked while waiting for object creation, thereby ensuring the smoothness of the service.

[0091] Optionally, in response to an item deletion operation, the candidate constraint component corresponding to the deleted item can be returned to the object pool. Item deletion refers to the operation in a virtual environment of removing an already equipped item from its virtual mobile vehicle and destroying it or putting it into an inactive state. This can be a player's active action (such as discarding an item from their inventory), game logic (such as consuming resources upon completing a mission), or cleanup during vehicle destruction or scene switching. This operation signifies that the physical constraint corresponding to the item immediately becomes invalid, and the computing resources it occupies (including associated constraint components) should be released for reuse. In other words, it's not simply about destroying the constraint component instance associated with the deleted item, but rather resetting its state, remarking it as idle, and inserting it back into the corresponding object pool. This may involve clearing all references between the component instance and the deleted item; if the component's parameters have been dynamically adjusted during service (such as context-based adjustments as mentioned above), resetting its internal state to an initial, clean baseline state; and placing the processed component instance into the idle queue of the object pool. Based on this, each created constraint component instance can be reused to the maximum extent through recycling, effectively reducing the pressure of garbage collection and the burden of memory allocation, which is conducive to further improving performance and reducing latency.

[0092] In one exemplary embodiment, a method for determining the implementation of animation effects is also provided, wherein the physical parameters include initial material data and initial mass data; based on vehicle motion data, physical parameters, and physical constraints, a bumpy animation effect is generated when the prop to be mounted is mounted on a virtual mobile vehicle for movement, including: First, determine the preset physical parameter configuration of the prop to be mounted; then, adjust the initial material data and initial mass data according to the preset physical parameter configuration to obtain the adjusted physical parameters; finally, generate the bumpy animation effect when the prop to be mounted is mounted on the virtual mobile vehicle and moves, based on the vehicle motion data, the adjusted physical parameters and physical constraints.

[0093] The initial material data is the original set of parameters defining the physical properties of the prop's surface, including but not limited to the coefficient of friction, elasticity coefficient, and hardness parameters. The initial mass data refers to the prop's initial mass value. The preset physical parameter configuration is a predefined set of parameter adjustment rules, a set of mapping relationships or calculation rules. For example, it includes adjustment rules for mass parameters and physical material parameters (such as elasticity, damping value, and coefficient of friction). Specifically, it could be setting the prop's mass scaling ratio to a smaller value (e.g., 0.1) to adjust the prop's physical response characteristics, making the prop produce a smoother motion response when subjected to external forces while maintaining the realism of the physical effects; it could also be setting a low-elasticity physical material to ensure the prop's stable placement within the vehicle and reduce bouncing between props; it could also be adjusting the damping value to achieve a stable constraint effect on the prop and reduce unnecessary swaying; furthermore, it could be adjusting the friction parameters to ensure stable contact between the prop and the bottom of the vehicle. Based on experience or scenario requirements, multiple preset physical parameter configurations can be set in advance. After obtaining initial material and mass data, these can be adjusted to obtain adjusted physical parameters that better meet current needs. Then, based on vehicle motion data, adjusted physical parameters, and physical constraints, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle.

[0094] This disclosure dynamically adjusts initial physical parameters through preset configurations, enabling the same item to exhibit different and physically intuitive motion characteristics depending on the environment, its own state, or vehicle mode. For example, the coefficient of friction of wet goods increases, and the mass and center of mass dynamically change when the liquid is half full, thus making the physical reactions in the virtual world realistic and full of detail.

[0095] In one exemplary embodiment, a method for controlling the loading order of props is also provided. If there are multiple props to be loaded, determining the target constraint space of the props to be loaded within the loadable space of the virtual mobile vehicle based on the physical parameters of the props to be loaded further includes: determining the order in which the target constraint spaces of each prop to be loaded are determined based on the volume and / or weight of each prop.

[0096] Each frame requires calculating the constrained motion state of each prop based on the latest vehicle motion data. This is a real-time calculation process executed during the physical simulation or animation update phase of the rendering loop. The creation order (i.e., the determination order) refers to the logical sequence in which multiple props to be mounted are traversed and processed during the animation calculation of each frame. This not only affects the subtle details of the final animation but also directly relates to the priority of computing resource allocation and performance. According to natural laws, higher density materials tend to be distributed lower than lower density materials; at the same density, larger volumes are more likely to be distributed at the top, while smaller volumes are more likely to be distributed at the bottom. Based on this, this disclosure determines the order in which the target constraint space of each prop to be mounted is determined based on its volume and / or weight.

[0097] Specifically, a priority score can be calculated based on the volume and / or weight of each prop. Then, based on the calculated priority scores, all props to be equipped are sorted in descending order. In the physics simulation / animation hybrid loop of this frame, the target constraint space for each prop is determined sequentially according to this sorted order. Optionally, the priority score can be equal to the prop weight, or the priority score can be equal to the prop volume, or the priority score = A. Normalized weight + B Normalized volume. A and B are adjustable weights used to balance the effects of weight and volume. Alternatively, density can be calculated based on volume and weight, and the creation order can be determined based on density, prioritizing higher-density elements.

[0098] This disclosure determines the calculation order of each frame of animation based on the weight and volume of the props. Within a limited computing budget, low-priority, small props are processed later. This not only avoids the overall frame rate drop caused by computing overload, ensuring the smoothness and stability of the core experience, but also avoids the impact of large props on the layout of subsequent props.

[0099] In an exemplary embodiment, candidate item components corresponding to the item to be equipped can also be obtained from pre-created inactive candidate item components, and the item to be equipped can be created based on the candidate item components. Similar to the above-described cached management of constraint components, this disclosure can also use a buffer queue to manage the items to be created. For example, a fixed number of candidate item components, such as 20, can be pre-created and not displayed. If there are 10 items initially, 10 can be taken out and used to directly update the item's appearance. During the game process, new items will be generated by player interaction, and the corresponding number of items can be directly obtained and used. If 20 are not enough, more items can be created and put back into the buffer queue. Similarly, deleting an item will put the item entity back, achieving the effect of reuse and avoiding the increase of overhead each time it is created. The specifics are similar to the constraint components described above and will not be repeated.

[0100] Alternatively, a timer mechanism can be used, which involves creating multiple items to be equipped in batches through a customizer mechanism. For example, if all items are loaded at the beginning, or multiple new items are generated simultaneously during interaction, creating them at the same time would cause a surge in performance overhead at that moment, potentially leading to lag. By triggering timer tasks at predetermined time intervals, a certain number of item creation tasks are executed through these timer tasks, thus distributing the creation logic evenly over a period of time in the future, ensuring stable performance during this period.

[0101] In one exemplary embodiment, during animation generation, if the object to be loaded needs to be picked up first and then placed in a vehicle, the object will fall from above the vehicle into the vehicle while it is moving. If the object's speed is not synchronized, it will fall behind the vehicle due to inertia and fail to accurately land in the vehicle's target storage space. Therefore, in response to the object pickup operation, when the object begins to fall from above the vehicle, the vehicle's motion is detected, triggering an inertial synchronization process. Specifically, during the object's fall, the vehicle's horizontal speed information can be synchronized in real-time to the object to be loaded, ensuring that the object maintains the same horizontal speed as the vehicle during its fall. This ensures the object accurately lands within the target constraint space and prevents it from falling behind the vehicle due to inertia. Correspondingly, while synchronizing the horizontal speed, the object's vertical gravity effect is maintained, ensuring that the object falls naturally into the target constraint space. Furthermore, after the prop falls into the vehicle, the method of the exemplary embodiments of this disclosure is used to control the relative position of the prop and the vehicle to stabilize, so as to prevent the prop from leaving the corresponding constraint range.

[0102] like Figure 4 The diagram shown is a complete flowchart of a virtual object animation generation method according to an exemplary embodiment of this disclosure. The following is in conjunction with... Figure 4 The method for generating animations of virtual objects disclosed herein is explained.

[0103] Step S410, in the item pickup phase. When a player picks up an item in the game scene, the item pickup process is triggered in response to the item pickup event. An interactive UI is created and displayed on the item, and the player can trigger the pickup operation by clicking on it.

[0104] Step S420, Item Allocation Stage. Items are allocated to their corresponding spatial levels based on their volume level. The weight and volume of the items are considered during allocation to ensure the stability of the physical structure. Simultaneously, items are sorted according to their volume and weight, with smaller, lighter items given priority.

[0105] Step S430, Constraint Creation Phase. Determine the corresponding physical constraints for each prop, confining it within the constraint space of the corresponding level. Simultaneously, determine the physical parameters for the props (mass scaling, low elasticity material, high damping value, etc.).

[0106] Step S440, Item Placement Phase. The item is placed on top of the vehicle and falls naturally into the corresponding level of the constraint space within the vehicle through physical simulation. During the fall, if the vehicle is in motion, inertial synchronization technology is used to synchronize the vehicle's horizontal velocity to the item's physical form in real time, ensuring that the item maintains the same horizontal velocity as the vehicle during the fall. This ensures that the item lands accurately within the vehicle and prevents it from falling behind the vehicle due to inertia. The item's position can be detected in real time to ensure that it lands in the correct constraint space.

[0107] Step S450, Physics Simulation Stage. After the prop falls into the vehicle, a physics simulation is performed within the constrained space, producing a bumpy and swaying effect. The prop's position is continuously monitored to ensure it remains within the constrained area. When the vehicle moves, the prop naturally produces a bumpy and swaying effect that follows the vehicle's movement, through the constraint system and physics parameter settings.

[0108] In addition, during the dynamic management phase, when the number of props changes (increases or decreases), the number of prop entities is dynamically adjusted. New props are redistributed to appropriate spatial levels through the constraint system. During dynamic adjustment, new props will go through steps 420, 430, 440, and 450 again to maintain the stability of the pyramid-shaped distribution structure.

[0109] It should be noted that the details of each step have been described in the exemplary embodiments above, and will not be repeated here.

[0110] The virtual object animation generation method in the exemplary embodiments of this disclosure determines a target constraint space for the prop to be mounted within the mountable space of a virtual mobile vehicle based on the physical parameters of the prop to be mounted. The mountable space includes multiple constraint spaces with different capacities. Based on the target constraint space, physical constraint conditions corresponding to the prop to be mounted are determined. These physical constraint conditions limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted within the target constraint space. Based on the vehicle motion data, physical parameters, and physical constraint conditions, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle. On one hand, by layering constraint spaces within the mountable space of the virtual mobile vehicle and setting corresponding displacement and rotation thresholds for constraint spaces of different capacities, the movement range of the prop within the constraint space is limited by physical constraint conditions. This prevents phenomena that violate visual logic, such as prop clipping through or detaching from the vehicle, ensuring the rationality of the animation performance. This allows the virtual mobile vehicle to stably place props with different physical parameters, avoiding problems such as mutual compression between props, and enhancing the realism of the bumpy effect. On the other hand, the animation behavior is determined based on the physical parameters of the props and the capacity of the constrained space, which reduces the workload of manually adjusting the animation parameters and improves the efficiency of animation production.

[0111] In an exemplary embodiment of this disclosure, an apparatus for generating animations of virtual objects is also provided. (See reference...) Figure 5 As shown, the animation generation device 500 for the virtual object may include a constraint space determination module 510, a physical constraint determination module 520, and an animation generation module 530. Specifically: The constraint space determination module 510 is used to determine the target constraint space of the prop to be mounted in the available space of the virtual mobile vehicle based on the physical parameters of the prop to be mounted. The available space includes multiple constraint spaces with different spatial capacities. The physical constraint determination module 520 is used to determine the physical constraint conditions corresponding to the prop to be mounted based on the target constraint space. The physical constraint conditions are used to limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted in the target constraint space. The animation generation module 530 is used to generate a bumpy animation effect when the prop to be mounted moves on the virtual mobile vehicle based on the vehicle motion data, physical parameters and physical constraint conditions.

[0112] In one exemplary embodiment of this disclosure, the constraint space determination module 510 is further configured to perform: dividing the loadable space into multiple constraint spaces according to the volume of the props required for generating the animation and the size of the loadable space, and determining the space capacity of each constraint space to obtain multiple constraint spaces with different space capacities; wherein the space capacity of the constraint space is positively correlated with the volume of the props that the constraint space can accommodate.

[0113] In one exemplary embodiment of this disclosure, in the mountable space, adjacent constraint spaces include overlapping spatial regions.

[0114] In one exemplary embodiment of this disclosure, the physical parameters include the volume of the prop; determining the target constraint space of the prop to be mounted in the mountable space of the virtual mobile vehicle according to the physical parameters of the prop to be mounted includes: determining the target constraint space from multiple constraint spaces according to the volume of the prop to be mounted and the spatial capacity of multiple constraint spaces.

[0115] In one exemplary embodiment of this disclosure, the constraint space determination module 510 is further configured to perform: determining the space level corresponding to each constraint space according to the space capacity of the constraint space, wherein the space level corresponds to the volume level of the prop that the constraint space can accommodate; determining the target constraint space of the prop to be carried in the carryable space of the virtual mobile vehicle according to the physical parameters of the prop to be carried, including: determining the target constraint space according to the target volume level corresponding to the volume of the prop to be carried and the corresponding relationship.

[0116] In one exemplary embodiment of this disclosure, the physical parameters further include the weight of the prop; determining the target constraint space of the prop to be mounted in the loadable space of the virtual mobile vehicle according to the physical parameters of the prop to be mounted further includes: determining the position of the prop to be mounted in the target constraint space according to the volume and / or weight of the prop corresponding to the prop allocated to the target constraint space.

[0117] In one exemplary embodiment of this disclosure, determining the physical constraint conditions corresponding to the prop to be mounted according to the target constraint space includes: determining a first reference constraint parameter corresponding to the prop to be mounted according to the target constraint space; determining a second reference constraint parameter corresponding to the category according to the category of the prop to be mounted; and determining the physical constraint conditions according to the first reference constraint parameter and the second reference constraint parameter.

[0118] In one exemplary embodiment of this disclosure, the physical constraint determination module 520 is further configured to perform: pre-creating candidate constraint components for different categories of props; determining a second reference constraint parameter corresponding to the category of the prop to be mounted, including: determining a target constraint component from the candidate constraint components according to the category of the prop to be mounted; loading the parameters corresponding to the target constraint component to obtain the second reference constraint parameter; or, adjusting the parameters corresponding to the target constraint component according to the category of the prop to be mounted and the vehicle's motion state to obtain the second reference constraint parameter.

[0119] In one exemplary embodiment of this disclosure, candidate constraint components are stored in an object pool, and the physical constraint determination module 520 is further configured to perform at least one or more of the following steps: creating candidate constraint components to maintain the total number of candidate constraint components in the object pool at no less than a preset number threshold; and, in response to an item deletion operation, returning the candidate constraint components corresponding to the deleted item to the object pool.

[0120] In one exemplary embodiment of this disclosure, the physical parameters include initial material data and initial mass data. The method for determining the jarring animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on vehicle motion data, physical parameters, and physical constraints, includes: determining a preset physical parameter configuration for the prop to be mounted; adjusting the initial material data and initial mass data according to the preset physical parameter configuration to obtain adjusted physical parameters; and determining the jarring animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on vehicle motion data, adjusted physical parameters, and physical constraints.

[0121] In one exemplary embodiment of this disclosure, if there are multiple props to be mounted, the target constraint space of the props to be mounted is determined in the mountable space of the virtual mobile vehicle according to the physical parameters of the props to be mounted. The method further includes: determining the order in which the target constraint space of each prop to be mounted is determined according to the volume of the prop and / or the weight of the prop.

[0122] In one exemplary embodiment of this disclosure, the animation generation module 530 is further configured to perform: obtaining a candidate prop component corresponding to the prop to be equipped from a pre-created inactive candidate prop component; and creating the prop to be equipped based on the candidate prop component.

[0123] Since the details of each functional module of the virtual object animation generation apparatus of the exemplary embodiments of this disclosure have been described in the exemplary embodiments of the virtual object animation generation method described above, they will not be repeated here.

[0124] It should be noted that although several modules or units of the virtual object animation generation apparatus have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0125] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the above-described method for generating animations of virtual objects.

[0126] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.

[0127] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.

[0128] Computer program code can be written in one or more programming languages. Examples of programming languages ​​include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).

[0129] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic fields, and infrared radiation. Electronic devices can convert the signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, the processor of the electronic device to execute) the method steps of various exemplary embodiments of this disclosure, such as the virtual object animation generation method described above.

[0130] Furthermore, in exemplary embodiments of this disclosure, an electronic device capable of implementing the above-described methods is also provided. Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be specifically implemented as: entirely hardware embodiments, entirely software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, collectively referred to herein as "circuit," "module," or "system."

[0131] The following reference Figure 6To describe an electronic device 600 according to such an embodiment of the present disclosure. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0132] like Figure 6 As shown, the electronic device 600 is manifested in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including storage unit 620 and processing unit 610), and a display unit 640.

[0133] The storage unit stores program code that can be executed by the processing unit 610, causing the processing unit 610 to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this disclosure.

[0134] Storage unit 620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 621 and / or cache memory 622, and may further include read-only memory (ROM) 623.

[0135] Storage unit 620 may also include a program / utility 624 having a set (at least one) of program modules 625, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0136] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0137] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. As shown, network adapter 660 communicates with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0139] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0140] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for generating animations of virtual objects, characterized in that, include: Based on the physical parameters of the item to be mounted, the target constraint space of the item to be mounted is determined in the mountable space of the virtual mobile vehicle. The mountable space includes multiple constraint spaces with different spatial capacities. Based on the target constraint space, the physical constraint conditions corresponding to the prop to be mounted are determined. The physical constraint conditions are used to limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted within the target constraint space. Based on the vehicle motion data, the physical parameters, and the physical constraints, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle.

2. The method according to claim 1, characterized in that, The method further includes: Based on the volume of the props required to generate the animation and the size of the space that can be carried, the space that can be carried is divided into multiple constraint spaces, and the space capacity of each constraint space is determined, so as to obtain the multiple constraint spaces with different space capacities. The spatial capacity of the constrained space is positively correlated with the volume of the props it can accommodate.

3. The method according to claim 2, characterized in that, In the equitable space, there are overlapping spatial regions between adjacent constrained spaces.

4. The method according to claim 2, characterized in that, The physical parameters include the trace volume; The step of determining the target constraint space of the item to be loaded within the loadable space of the virtual mobile vehicle based on the physical parameters of the item to be loaded includes: The target constraint space is determined from the plurality of constraint spaces based on the volume of the prop to be mounted and the spatial capacity of the plurality of constraint spaces.

5. The method according to claim 4, characterized in that, The method further includes: Based on the spatial capacity of the constrained space, the spatial level corresponding to each constrained space is determined, and the spatial level has a corresponding relationship with the volume level of the props that the constrained space can accommodate; The step of determining the target constraint space of the item to be loaded within the loadable space of the virtual mobile vehicle based on the physical parameters of the item to be loaded includes: The target constraint space is determined based on the target volume level corresponding to the volume of the prop to be mounted and the corresponding relationship.

6. The method according to claim 4, characterized in that, The physical parameters also include the weight of the prop; The step of determining the target constraint space of the prop to be mounted within the mountable space of the virtual mobile vehicle based on the physical parameters of the prop to be mounted further includes: The position of the prop to be mounted in the target constraint space is determined based on the prop volume and / or prop weight corresponding to the prop allocated to the target constraint space.

7. The method according to claim 1, characterized in that, The step of determining the physical constraints corresponding to the prop to be mounted based on the target constraint space includes: Based on the target constraint space, determine the first reference constraint parameters corresponding to the prop to be mounted; Based on the category of the prop to be mounted, determine the second reference constraint parameter corresponding to the category; The physical constraint conditions are determined based on the first reference constraint parameter and the second reference constraint parameter.

8. The method according to claim 7, characterized in that, The method further includes: Pre-create candidate constraint components for different categories of props; The step of determining the second reference constraint parameter corresponding to the category of the prop to be mounted includes: Based on the category of the prop to be mounted, a target constraint component is determined from the candidate constraint components; Load the parameters corresponding to the target constraint component to obtain the second reference constraint parameters; or, adjust the parameters corresponding to the target constraint component to obtain the second reference constraint parameters.

9. The method according to claim 8, characterized in that, The candidate constraint components are stored in an object pool, and the method further includes at least one or more of the following steps: Create candidate constraint components to ensure that the total number of candidate constraint components in the object pool is not less than a preset threshold. In response to the item deletion operation, the candidate constraint component corresponding to the deleted item is returned to the object pool.

10. The method according to claim 1, characterized in that, The physical parameters include initial material data and initial mass data. The step of generating a bumpy animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on the vehicle motion data, the physical parameters, and the physical constraints, includes: Determine the preset physical parameter configuration of the prop to be mounted; Based on the preset physical parameter configuration, the initial material data and the initial mass data are adjusted to obtain the adjusted physical parameters; Based on the vehicle motion data, the adjusted physical parameters, and the physical constraints, a bumpy animation effect is generated when the prop to be mounted moves on the virtual mobile vehicle.

11. The method according to any one of claims 1 to 10, characterized in that, If there are multiple items to be loaded, the step of determining the target constraint space of the items to be loaded within the loadable space of the virtual mobile vehicle based on the physical parameters of the items to be loaded further includes: Based on the volume and / or weight of each of the props to be mounted, determine the order in which the target constraint space is determined for each of the props to be mounted.

12. The method according to claim 11, characterized in that, The method further includes: Obtain the candidate item component corresponding to the item to be equipped from the pre-created inactive candidate item components; Based on the candidate prop components, create the prop to be equipped.

13. An animation generation device for virtual objects, characterized in that, The device includes: The constraint space determination module is used to determine the target constraint space of the prop to be mounted in the mountable space of the virtual mobile vehicle based on the physical parameters of the prop to be mounted. The mountable space includes multiple constraint spaces with different spatial capacities. The physical constraint determination module is used to determine the physical constraint conditions corresponding to the prop to be mounted based on the target constraint space. The physical constraint conditions are used to limit the allowable displacement threshold and / or rotation angle threshold of the prop to be mounted within the target constraint space. An animation generation module is used to generate a bumpy animation effect when the prop to be mounted moves on the virtual mobile vehicle, based on the vehicle motion data, the physical parameters, and the physical constraints.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 12.

15. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 12 by executing the executable instructions.