Model deformation control method and device, equipment, medium and product
By responding to force events in a 3D model and calculating the global deformation modulation coefficient and target offset data, the high cost and computational resource consumption caused by relying on additional data structures in existing technologies are solved. This achieves efficient, stable, and real-time elastic deformation feedback, enhancing the immersiveness and realism of the animation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU BOGUAN TELECOMM TECH LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies for implementing elastic deformation feedback of 3D models rely on additional data structures, resulting in high art production costs, complex development processes, and large real-time computing overhead. This can easily cause frame rate fluctuations and deformation response delays, affecting the stability and immersion of the animation.
By responding to the force events of the target model, the force data is determined. Combined with the current animation frame time and elastic configuration information, the global deformation modulation coefficient is calculated, the target offset data of the elastic center point and the point to be deformed is determined, the displacement of the point to be deformed is controlled, and the deformation model is generated, avoiding reliance on additional data structures.
It achieves flexible deformation control without additional data structures, reduces art production costs and computing resource consumption, improves the efficiency, stability and real-time performance of deformation feedback, and enhances the immersiveness and realism of animation.
Smart Images

Figure CN121982166A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer processing technology, and in particular to a model deformation control method, apparatus, equipment, medium, and product. Background Technology
[0002] In interactive applications, to enhance players' perception of interactive events and improve immersion and realism, it is often necessary to add elastic deformation feedback effects to the 3D models subjected to forces. Examples include effects such as denting, stretching, shaking, or rebounding.
[0003] Currently, there are three main ways to achieve this type of elastic deformation feedback effect: One is to add elastic auxiliary skeletons to the model and map the skeleton motion to the model's surface vertices using skinning weights; when triggered by interaction or animation, these skeletons are driven to displace or vibrate, thereby causing the vertices to deform. The second method is to pre-create multiple target deformation meshes and, at runtime, perform weighted interpolation on the vertex positions of these target deformation meshes to achieve the deformation transition. The third method uses a cloth or soft body dynamics engine to perform force-driven physical calculations on a predefined physical proxy model to obtain the deformed vertex positions, and then updates the vertex positions of the rendered mesh through pre-calculated mapping relationships.
[0004] However, all three methods mentioned above rely on additional data structures, such as bone hierarchies, predefined deformation meshes, or physical proxy models, which leads to high art production costs and complex development processes. Furthermore, real-time computation based on bone-driven, vertex interpolation, or physical simulation has a large overhead, which can easily cause frame rate fluctuations or deformation response delays in performance-constrained scenarios, thereby affecting the stability of animation performance. Summary of the Invention
[0005] This invention provides a model deformation control method, device, equipment, medium, and product, which achieves the goal of ensuring the realism and physical rationality of elastic deformation without relying on additional data structures, while reducing the cost and complexity of art production and improving the efficiency, stability, and real-time performance of elastic deformation feedback.
[0006] According to one aspect of the present invention, a model deformation control method is provided, the method comprising:
[0007] Respond to force events acting on the target model in the currently playing animation and determine the corresponding force data;
[0008] Based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model, the global deformation modulation coefficient is determined;
[0009] Determine the elastic center point of the target model, and based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determine the target offset data of at least one point to be deformed.
[0010] Based on the target offset data, the displacement of the point to be deformed is controlled to generate the deformation model corresponding to the current animation frame.
[0011] According to another aspect of the present invention, a model deformation control device is provided, the device comprising:
[0012] The force data determination module is used to respond to force events acting on the target model in the currently playing animation and determine the corresponding force data;
[0013] The global deformation modulation coefficient determination module is used to determine the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model.
[0014] The target offset data determination module is used to determine the elastic center point of the target model, and based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determine the target offset data of at least one point to be deformed.
[0015] The deformation control module is used to control the displacement of the point to be deformed based on the target offset data, so as to generate the deformation model corresponding to the current animation frame.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and a memory communicatively connected to said at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the model deformation control method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the model deformation control method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the model deformation control method as described in any embodiment of the present invention.
[0021] The technical solution of this invention determines the corresponding force data by responding to the force event acting on the target model in the currently playing animation; determines the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model; determines the elastic center point of the target model, and determines the target offset data of at least one point to be deformed based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient; and controls the displacement of the point to be deformed based on the target offset data to generate the deformation model corresponding to the current animation frame. This solves the problem in the prior art that relies on additional data structures to achieve deformation feedback, resulting in high art production costs, complex processes, and large consumption of computing resources, which easily leads to instability in deformation animation. It realizes the accurate mapping of external force events to effective force data acting on the target model in the currently playing animation, and dynamically generates the global deformation modulation coefficient by combining the force data and elastic configuration information with the current animation frame time as the time base, ensuring that the elastic deformation effect conforms to the laws of elastic physics, thereby ensuring the realism and physical rationality of elastic deformation. Furthermore, by combining the current position information of the elastic center point, the point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, the target offset data of the point to be deformed is determined. Based on the target offset data, the vertices are driven to complete the deformation control of the target model in the current animation frame. This achieves the goal of controlling the deformation of the target model without relying on additional data structures, which not only reduces the cost and complexity of art production, but also reduces runtime computational overhead. It avoids performance fluctuations and animation jitter caused by physical simulation or high-dimensional interpolation, thereby realizing the dynamic deformation response of the target model under force, improving the efficiency, high stability, and real-time performance of elastic deformation feedback, thus enhancing the immersion and realism of the animation, and making the deformation behavior of the target model both visually expected and physically reasonable.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a model deformation control method provided according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of a model deformation control method provided according to an embodiment of the present invention;
[0026] Figure 3 This is a flowchart of a model deformation control method provided according to an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of an elastic deformation curve provided according to an embodiment of the present invention;
[0028] Figure 5 This is a schematic diagram of the structure of a model deformation control device according to an embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the model deformation control method of this invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security. It should also be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein are all conducted with the user's knowledge and consent, and comply with relevant privacy protection regulations.
[0033] Before introducing this technical solution, let's first describe the application scenarios. The technical solution provided in this embodiment can be applied to any scenario requiring deformation control of a 3D model. For example, in interactive 3D applications or game engines, when model collisions, model compression, model impacts, or model bounces occur, elastic deformation of the model is required. The technical solution provided in this embodiment can be used to control model deformation and achieve an elastic deformation feedback effect. Alternatively, in software with production capabilities, when it is necessary to add elastic deformation effects to a model, the technical solution provided in this embodiment can also be used to control model deformation.
[0034] Figure 1 This is a flowchart of a model deformation control method according to an embodiment of the present invention. This embodiment is applicable to situations where deformation control is performed on any model that requires elastic deformation. The method can be executed by a model deformation control device, which can be implemented in hardware and / or software and can be configured in a computing device. Figure 1 As shown, the method includes:
[0035] S110, Respond to the force event acting on the target model in the currently playing animation and determine the corresponding force data.
[0036] The currently playing animation refers to an animation sequence that is running or being presented. The currently playing animation can be a predefined animation resource (such as character walking, skill release, etc., animation sequences created by artists and imported into the engine); it can also be a responsive animation generated in real-time by program logic. For example, the currently playing animation can be a global scene animation, or a local responsive animation within the global scene animation driven by player clicks, collision detection, physical forces, AI decisions, or user interaction behaviors, such as deformation, elastic jitter, or cloth swaying. The target model can be a 3D geometric model that needs to produce elastic feedback (such as denting, jittering, or rebound) in a force event; that is, the subject bearing the force, composed of multiple vertices. A force event refers to an event triggered by user interaction, physical simulation, or other logic, representing an external force applied to the target model. Force events can be collisions, clicks, drags, strikes, applied force, bounces, or other events that apply force. For example, when applying a force event to a 3D model, the 3D model being applied can be considered the target model. Force data refers to the force information acting on the target model, used to describe the numerical attributes of the force.
[0037] In this embodiment, it is possible to detect in real time or periodically whether a force event has been triggered on a 3D model in the currently playing animation. Optionally, the force event includes, but is not limited to, at least one of the following: a click or drag force applied by the user through an input device, a collision impact force between other objects in the virtual environment and the target model, gravity or wind force simulated by the physics engine, an explosion thrust or suction pull actively triggered by program logic, external real-world forces based on sensor data mapping, and instantaneous or continuous forces preset in the animation keyframes.
[0038] When a force event is detected on a target model associated with the currently playing animation, the force event can be captured and force data can be extracted from it. Optionally, the force data may include, but is not limited to: force magnitude, force intensity, force triggering time, force direction, point of application or area of application, etc., which can be determined based on the force event.
[0039] S120. Based on the current animation frame time, force data, and elastic configuration information corresponding to the target model, determine the global deformation modulation coefficient.
[0040] The current animation frame time refers to the current time point or frame number during animation playback, used to identify the playback progress of the currently playing animation on its timeline. For example, the current animation frame time can be represented as the length of time elapsed since the start of the animation (e.g., if the animation has played to the 9th second, then the current animation frame time is 9 seconds); it can also be represented by associating with the system world timestamp (e.g., 13:00:00). Furthermore, the current animation frame time can also be: the time elapsed from the moment the model is subjected to a force event (e.g., if the target model is subjected to force at 6 seconds of global animation time, and the current global animation time is 10 seconds, then the current animation frame time is 4 seconds). For example, the animation start time can be recorded when the force event is triggered; in each subsequent animation frame, the current animation frame time can be obtained by subtracting the animation start time from the current animation time, with the animation frame time gradually increasing as elastic deformation feedback occurs.
[0041] In practical applications, the current animation frame can be determined in real-time or periodically during animation playback. Alternatively, when a force event triggering an object model in the currently playing animation is detected, the current animation frame can be determined. Based on this current frame and relevant information about the object model to be deformed (i.e., the target model), deformation control can be applied to the target model. To ensure continuous deformation control of the target model, the current animation frame can be determined continuously and in real-time during the deformation control process, allowing for precise deformation control of the target model at each frame.
[0042] It should be noted that in practical applications, different target models (or different parts of the same model) may be affected by force events at different points in time, so their respective force triggering times may be different. If a local time definition method is used, with the moment the force event occurs as the starting point, to determine the current animation frame time, it is necessary to maintain the corresponding current animation frame time for each independent target model to ensure the accuracy and visual consistency of subsequent deformation control in terms of timing. If a globally unified time base is used, such as the world timestamp of the animation or the global time length that has elapsed since the start of the auto-draw, to define the current animation frame time, then at the same current animation frame time, the corresponding deformation effects can be calculated and applied separately by combining the force data and elastic configuration information of each target model. In addition, it should be noted that the triggering time recorded in the force data must use the same timing definition method as the current animation frame time to ensure the correctness of time alignment and physical response.
[0043] The purpose of determining the current animation frame is to map the deformation animation progress of the target model onto the time curve of the deformation animation, so as to realize dynamic deformation feedback that decays, oscillates, or gradually changes over time, thereby improving the realism and consistency of interactive feedback.
[0044] It should be noted that during the playback of the current animation, deformation control of the target model can be performed at each animation frame update. The method of deformation control of the target model at each animation frame is the same. The technical solution provided in this embodiment takes any one of the animation frames as the current animation frame and describes the deformation control of the target model at the current animation frame as an example to generate the deformation model corresponding to the current animation frame.
[0045] In this embodiment, elastic configuration information refers to pre-defined control parameters for the target model, used to constrain the deformation behavior of the target model. For example, elastic configuration information includes, but is not limited to: elastic modulus, damping coefficient, maximum deformation, recovery speed, local sensitive region weight, deformation duration, decay curve type, oscillation frequency, intensity scaling factor, vertical component scaling factor, and masking parameters. The elastic configuration information for different target models can be the same or different. The global deformation modulation coefficient can be a scalar weight used to uniformly scale or modulate the deformation intensity of the model as a whole or in a region within the current animation frame. For example, the global deformation modulation coefficient can take values in the range [0,1], used to uniformly scale the offset vectors of all points to be deformed, thereby controlling the intensity of the overall elastic deformation.
[0046] In this embodiment, the amplitude and duration of the force can be extracted from the force data acting on the target model. A dynamically changing deformation intensity value over time can be calculated using a predefined physical heuristic function (e.g., an exponential decay function or a spring-damped response model), combined with the current animation frame time, the force amplitude and duration, and the elastic configuration information of the target model (e.g., elastic coefficients and decay rates). This value serves as the global deformation modulation coefficient. Alternatively, the force data may contain the initial force magnitude or interaction intensity level of the target model. This force magnitude or interaction intensity level can be mapped to an initial modulation amplitude, scaled using the current animation frame time and the decay strategy (e.g., linear, exponential, or custom decay) in the elastic configuration information, and output as the global deformation modulation coefficient. This method ensures that the deformation intensity not only changes over time but also reflects the degree of force applied during interaction, enhancing the realism of the elastic deformation feedback.
[0047] Alternatively, the elastic configuration information can include curves (such as Bézier curves, splines, or piecewise functions) describing the relationship between animation time and elastic intensity. These curves depict the decay or oscillation of deformation intensity over time. Specifically, the normalized animation progress (i.e., relative time) can be calculated based on the trigger time in the force data and the current animation frame time. This animation progress is then used as the x-axis, and the corresponding intensity value is sampled on the curve as the global deformation modulation coefficient. Alternatively, a mapping table between animation progress, force, and deformation response can be pre-configured, where each entry in the table corresponds to a set of inputs (animation progress, force magnitude, elastic parameters) and outputs (modulation coefficients). During runtime, multidimensional interpolation (such as bilinear or trilinear interpolation) can be performed in the mapping table based on the animation progress, force magnitude, and the elastic configuration information of the target model to determine the current global deformation modulation coefficient.
[0048] To avoid repeatedly acquiring the force data and elastic configuration information of the target model at different animation frames during deformation control, the force data corresponding to the target model can be determined and the elastic configuration information of the target model can be retrieved when a force event acting on the target model in the currently playing animation is detected. This way, the data will not be repeatedly acquired during subsequent continuous deformation control of the target model, reducing resource overhead.
[0049] S130. Determine the elastic center point of the target model, and based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determine the target offset data of at least one point to be deformed.
[0050] In this context, the elastic center point refers to the spatial coordinates of a reference point used to characterize the elastic behavior of the target model as a whole or in a local area. Target offset data refers to the displacement vector that the point to be deformed should generate in the current animation frame, describing the direction and magnitude of the offset from its original position to its new position, thus achieving a visual elastic deformation effect. The point to be deformed refers to one or more vertices (or control points) in the target model that participate in elastic feedback. Current position information refers to the world space or local space coordinates of the point to be deformed in the current animation frame. In this embodiment, determining at least one point to be deformed in the target model can be done by: considering all vertices on or inside the model surface as potential points to be deformed; or by selecting regions sensitive to force response from the target model based on local stiffness weights, material partitioning, or binding relationships in the elastic configuration information; or by identifying vertices within the force-affected area of the target model as points to be deformed through pre-marking, collision detection results, or spatial projection of the force application range, thereby ensuring that the deformation conforms to visual and physical expectations.
[0051] In this embodiment, the centroid, geometric center, or preset anchor point of the target model can be used as the elastic center point of the target model. Alternatively, the elastic center point can be dynamically calculated based on the force distribution of the target model. For each point to be deformed, the displacement vector of the current position of the point to be deformed relative to the elastic center point can be calculated. Then, the initial deformation offset can be generated by combining the displacement vector, force direction, and magnitude. Based on the distance from the point to be deformed to the elastic center point and the corresponding elastic configuration information, the initial deformation offset is attenuated according to a preset radial attenuation function (such as Gaussian or linear attenuation) to obtain the attenuated deformation offset. Combining the attenuated deformation offset and the global deformation modulation coefficient, the target offset data for the point to be deformed is determined. The advantage of using an attenuation function is that it can naturally simulate the deformation propagation effect of near-strong and far-weak deformation.
[0052] The force vectors (physical quantities describing the magnitude and direction of forces acting on an object) in the force data can also be projected onto the line connecting each point to be deformed relative to the elastic center point to obtain the deformation offset along that line. Based on the model region weights defined in the elastic configuration information (e.g., the tip of the nose is more prone to depression than the cheeks in a facial model), this deformation offset is locally enhanced or suppressed to obtain the deformation result. The deformation result is then multiplied by the global deformation modulation coefficient to obtain the target offset data. The advantage of this setup is that it allows for precise deformation control of different regions of the target model.
[0053] When the target model is subjected to multiple forces simultaneously, an elastic center point can be determined separately for each force, generating local offsets for each deformation point under different forces. Then, based on the force intensity, application time, and elastic configuration information, the local offsets of the same deformation point are weighted and fused to obtain a fused offset. This fused offset is then multiplied by the global deformation modulation coefficient to obtain the target offset data for that deformation point. The advantage of this setup is that it allows for the superposition of deformation forces at multiple points, ensuring a realistic sense of deformation under stress.
[0054] It should be noted that as the animation frames are updated, the real-time position of the elastic center point of the target model in the animation and the current position information of the point to be deformed may change dynamically. This change may originate from the deformation response caused by external force events, or it may be caused by the model's own movement, rotation, scaling, or interaction with other objects. The current position information of the point to be deformed directly reflects the geometric shape of the model in the current animation frame. Therefore, this position information can be accurately obtained and updated in each animation frame to ensure the physical rationality, visual consistency, and realism of the deformation effect.
[0055] S140. Based on the target offset data, control the displacement of the point to be deformed to generate the deformation model corresponding to the current animation frame.
[0056] The current animation frame refers to the frame being rendered or processed during the animation playback process, representing a single instant in the animation's progression. As the animation frames advance, corresponding target offset data is dynamically calculated and applied to each frame, resulting in a potentially different deformation model for each frame, thus creating a continuous and smooth deformation animation effect. The deformation model refers to the target model with a new geometric shape obtained after applying displacement to the points to be deformed in the current animation frame.
[0057] In this embodiment, the target offset data can be superimposed on the current position information of the point to be deformed to obtain the updated vertex position of the point to be deformed, thereby constructing the deformation model in the current animation frame. To prevent excessive deformation from causing model self-intersection or distortion, an interpolation algorithm can be used to interpolate between the current position information and the updated vertex position, gradually approaching the deformation endpoint indicated by the target offset, thereby producing natural effects such as concavity, jitter, stretching, or rebound, improving the dynamic realism and visual continuity of the deformation. Constraint mechanisms can also be introduced before or after superimposing the target offset data, such as cropping the target offset data based on the maximum offset limit in the elastic configuration information, or ensuring that the offset is along the surface outward normal or the direction of force through local normal direction projection.
[0058] It's important to note that deformation control can be performed within the vertex shader. Specifically, the target offset data can be stored in the vertex attribute buffer. During GPU rendering, the vertex shader reads the current position information of the point to be deformed and the corresponding target offset data, adds them together, and outputs the final vertex position. The advantage of this setup is that it leverages the GPU's parallel rendering capabilities to achieve simultaneous deformation of a large number of vertices, reducing the complex load on the CPU. Alternatively, the calculation of the target offset data can be performed on the GPU. This avoids complex logic or physical calculations on the CPU side, maintaining low performance overhead when deformation control is triggered simultaneously on a large number of models, improving runtime performance, and ensuring the stability and smoothness of elastic deformation.
[0059] Furthermore, masking parameters can be introduced to spatially modulate the target offset data, enhancing the controllability and presentation effect of deformation. In this embodiment, the elastic configuration information also includes root masking parameters and / or spherical masking parameters: the root masking weight of the point to be deformed can be determined based on the root masking parameters and the current position information of the point to be deformed; and / or, the spherical masking weight of the point to be deformed can be determined based on the spherical masking parameters and the current position information of the point to be deformed; the target offset data is modulated based on the root masking weight and / or the spherical masking weight, so as to control the deformation of the point to be deformed based on the modulated target offset data.
[0060] The root masking parameter defines the geometric or topological features of the root region in the target model (such as proximity to bone root nodes, fixed anchor points, or preset low-activity areas) to generate masking weights that decrease with increasing distance. The spherical masking parameter defines a spherical influence region centered at a spatial point, with a preset radius and attenuation function. This restricts deformation to be effective only within the sphere or allows the deformation intensity to smoothly decrease with increasing distance from the sphere's center. The root masking weight is a scalar value calculated based on the root masking parameter and the current position of the point to be deformed. It characterizes the degree to which the point to be deformed is affected by the root fixation effect; for example, the closer to the root region, the higher the weight (or lower, depending on the design intent), used to suppress or enhance deformation. The spherical masking weight is a scalar value calculated based on the spherical masking parameter and the current position of the point to be deformed. It characterizes the degree to which the point to be deformed lies within the spherical influence region, achieving localized deformation (e.g., producing a depression only near the stress point). Modulated target offset data refers to the final offset obtained by multiplying the target offset data by the root masking weight and / or spherical masking weight.
[0061] In this embodiment, when the elastic configuration information only includes root masking parameters, the distance from each point to be deformed to the root reference point can be calculated based on the root masking parameters (such as the root reference point and attenuation distance of the target model), and a root masking weight can be generated through a predefined attenuation function (such as linear or exponential). This root masking weight can approach 0 near the root region (indicating almost no deformation) and approach 1 away from the root (i.e., near the top of the model) (indicating free deformation); it can also be reversed according to actual deformation requirements, with 0 representing the near-top region and 1 representing the near-root region. Multiplying the target offset data by the root masking weight yields modulated target offset data. Deformation control of the points to be deformed based on this modulated target offset data can suppress the bottom position of the target model, stabilize the root, and achieve a flexible, swinging effect at the ends.
[0062] When the elastic configuration information only includes spherical masking parameters, the point of force application in the target model can be set as the center of the spherical masking when a force event (such as a click or collision) occurs. Based on the center of the spherical masking, the radius of the spherical masking in the elastic configuration information, and the current position information of each point to be deformed, the distance from each point to be deformed to the center of the spherical masking is calculated, and the spherical masking weight of the point to be deformed is derived based on this distance. For example, if the point to be deformed is located at the center of the sphere (i.e., the center of the spherical masking), the corresponding spherical masking weight is 1; as the distance to the point to be deformed increases, the corresponding spherical masking weight smoothly decreases to 0. Multiplying the target offset data by the spherical masking weight yields the modulated target offset data. Deformation control of the point to be deformed based on the modulated target offset data can achieve significant deformation only in local areas, effectively avoiding false responses in irrelevant areas.
[0063] When the elastic configuration information includes root masking parameters and spherical masking parameters, the root masking parameters and spherical masking parameters can be multiplied (or through other combinational logic, such as taking the minimum value, weighted averaging, etc.) to obtain a comprehensive masking weight. This comprehensive masking weight can control both the overall structure of the model (e.g., the root remains relatively stationary) and respond to local interactive positions (e.g., deformation only occurs near stress points). Further multiplying this comprehensive masking weight with the target offset data yields modulated target offset data, thereby achieving selective deformation suppression or enhancement in local areas. For example, it can cause the character's torso to shake strongly while the limbs remain still, improving the controllability and realism of deformation feedback.
[0064] The technical solution provided in this embodiment, by introducing root masking parameters and / or spherical masking parameters, generates spatially related masking weights to modulate the target offset data. This enables precise, intuitive, and efficient control of the spatial distribution of elastic deformation without increasing geometric complexity or relying on additional binding structures. This setup not only effectively prevents deformation in unintended areas and enhances the locality and structural controllability of deformation, but also improves the expressiveness, controllability, and visual consistency of interactive feedback.
[0065] The technical solution provided in this embodiment determines the corresponding force data by responding to the force event acting on the target model in the currently playing animation; determines the global deformation modulation coefficient based on the current animation frame time, force data, and elastic configuration information corresponding to the target model; determines the elastic center point of the target model, and determines the target offset data of at least one point to be deformed based on the elastic center point, the current position information of at least one point to be deformed in the target model, force data, elastic configuration information, and global deformation modulation coefficient; and controls the displacement of the point to be deformed based on the target offset data to generate the deformation model corresponding to the current animation frame. This solves the problem in the prior art that relies on additional data structures to realize deformation feedback, resulting in high art production costs, complex processes, and large consumption of computing resources, which easily leads to instability of deformation animation. It realizes the accurate mapping of external force events to effective force data acting on the target model in the currently playing animation, and dynamically generates the global deformation modulation coefficient by combining the force data and elastic configuration information with the current animation frame time as the time base, ensuring that the elastic deformation effect conforms to the laws of elastic physics, thereby ensuring the realism and physical rationality of elastic deformation. Furthermore, by combining the current position information of the elastic center point, the point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, the target offset data of the point to be deformed is determined. Based on the target offset data, the vertices are driven to complete the deformation control of the target model in the current animation frame. This achieves the goal of controlling the deformation of the target model without relying on additional data structures, which not only reduces the cost and complexity of art production, but also reduces runtime computational overhead. It avoids performance fluctuations and animation jitter caused by physical simulation or high-dimensional interpolation, thereby realizing the dynamic deformation response of the target model under force, improving the efficiency, high stability, and real-time performance of elastic deformation feedback, thus enhancing the immersion and realism of the animation, and making the deformation behavior of the target model both visually expected and physically reasonable.
[0066] Figure 2 This is a flowchart of a model deformation control method according to an embodiment of the present invention. Based on the foregoing embodiments, the force data includes the triggering time of the force event acting on the target model; the elasticity configuration information includes a preset elasticity duration, global elasticity strength parameters, and a deformation animation curve; correspondingly, "S120" is further refined. Specific implementation methods can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0067] like Figure 2 As shown, the method specifically includes the following steps:
[0068] S210. Determine the normalized animation progress based on the current animation frame time, trigger time, and preset elastic duration.
[0069] The trigger moment refers to the initial moment that causes the target model to undergo elastic deformation. For example, the moment of a collision, a button press, or keyframe activation can be used as the trigger moment for the deformation response. The preset elastic duration refers to the expected duration of the elastic deformation effect from the trigger moment, reflecting the total time required for the model to deform from initiation to termination. It should be noted that the preset elastic duration may differ for different target models due to their material properties, geometric structure, functional requirements, or artistic expression needs. Normalized animation progress refers to the time parameter that maps the current deformation process to a preset interval. For example, the preset interval is [0,1], where 0 represents the beginning of deformation (trigger moment) and 1 represents the end of the deformation cycle (deformation termination).
[0070] In this embodiment, the time difference between the current animation frame and the trigger time can be calculated. If the time difference is less than or equal to the preset elastic duration, the time difference is divided by the preset elastic duration to obtain a normalized animation progress between 0 and 1. If the time difference exceeds the preset elastic duration, the normalized animation progress is fixed at 1, indicating that the deformation cycle has been completed.
[0071] For example, the formula for determining the normalized animation progress can be expressed as: tNorm=saturate((GameTime-Now Time) / TimeLength); tNorm represents the normalized animation progress; Game Time represents the current animation frame time; Now Time represents the trigger time; TimeLength represents the preset elastic duration; saturate represents the normalization function.
[0072] To achieve precise control over the interactive feedback ratios of each stage of deformation, the preset elasticity duration can be divided into multiple sub-stages (such as "compression stage," "holding stage," and "recovery stage"). In this case, it can be determined which sub-stage the time difference falls into, and within that sub-stage, the time difference is locally normalized to obtain a normalized animation progress. Alternatively, after obtaining the time difference, it can be mapped to a non-linear normalized animation progress based on the time curve type specified in the elasticity configuration information (such as ease-in / ease-out, exponential decay, spring oscillation, etc.). For example, when simulating a rebound effect, the progress can be made to oscillate slightly near 1 before converging, thus naturally expressing the overshoot, rebound, and stabilization animation process.
[0073] S220. Based on the normalized animation progress, global elastic strength parameters, and deformation animation curve, determine the global deformation modulation coefficient.
[0074] The global elastic strength parameter characterizes the intensity of global positional offset and can be used to control the intensity or amplitude of the overall deformation of the model. For example, the larger the value of the global elastic strength parameter, the farther the vertices on the model surface offset from their original positions, and the more obvious the deformation; when the value of the global elastic strength parameter is 0, there is no deformation. The deformation animation curve can be a curve used to characterize the mapping relationship between elastic animation time and elastic strength, describing how the deformation intensity changes on the normalized progress time axis. For example, the deformation intensity can first rise rapidly and then slowly decay, or exhibit multiple rebound oscillations. The curve can be represented in the form of a Bézier curve, spline, or piecewise function. For example, to make the muscle contraction effect of a model slow at first, then fast, and then slow again, an S-shaped curve can be configured. The global deformation modulation coefficient can be a control parameter used to modulate the offset amplitude of all points to be deformed, reflecting the overall strength of the deformation effect in the current frame.
[0075] In this embodiment, the normalized animation progress can be used as an input parameter to query the deformation animation curve (e.g., through a predefined lookup table, curve graph sampling, or real-time curve evaluation) to obtain the queried elastic strength; alternatively, the normalized animation progress can be used to sample the deformation animation curve to obtain the sampled elastic strength. The queried or sampled elastic strength and the global elastic strength parameter are then fused (e.g., by addition, weighted summation, or multiplication) to obtain the global deformation modulation coefficient for the current frame.
[0076] In this embodiment, the global deformation modulation coefficient is determined based on the normalized animation progress, the global elastic strength parameter, and the deformation animation curve. This includes: inputting the normalized animation progress into the deformation animation curve to obtain the normalized elastic strength parameter; and determining the global deformation modulation coefficient based on the normalized elastic strength parameter and the global elastic strength parameter.
[0077] The normalized elastic strength parameter refers to the elastic strength output after substituting the normalized animation progress into the deformation animation curve. It represents the degree of deformation activity at the current animation frame. Its value can be in the range of [0,1] and may also include negative values (representing rebound or overshoot behavior).
[0078] Specifically, the normalized animation progress can be input into the deformation animation curve, and the normalized elastic strength parameter can be obtained by calculating the value from the curve. Furthermore, the normalized elastic strength parameter and the global elastic strength parameter can be multiplied to obtain the global deformation modulation coefficient.
[0079] For example, see Figure 3 , Figure 3This can be represented as a deformation animation curve, where the horizontal axis represents the animation progress (0-1), and the vertical axis represents the elastic strength. Normalized elastic strength parameters can be obtained by sampling within the deformation animation curve based on the normalized animation progress. The formula for determining the global deformation modulation coefficient can be expressed as: anim = Curve(tNorm) × WPO_Intensity; where anim represents the global deformation modulation coefficient; Curve represents the deformation animation curve; tNorm represents the normalized animation progress; and WPO_Intensity represents the global elastic strength parameter.
[0080] The advantage of this setup is that by mapping the normalized animation progress to the deformation animation curve, the normalized elastic strength parameter is obtained, and combined with the global elastic strength parameter to generate a global deformation modulation coefficient. This allows the elastic strength to change smoothly over time and naturally inherit the dynamic characteristics defined by the curve (such as rapid onset followed by slow decay). This allows artists and programmers to collaboratively define the deformation rhythm and intensity through intuitive parameters, reducing the reliance on the physics engine or complex binding system. While ensuring real-time performance, it achieves elastic feedback effects, effectively enhancing the user's perception of the force event and immersive experience.
[0081] It should be noted that the elastic configuration information can also include multiple deformation animation curves (such as the main deformation curve, micro-jitter curves, etc.). In this case, the elastic intensity on each deformation animation curve can be sampled according to the normalized animation progress to obtain multiple normalized elastic intensity parameters; the normalized elastic intensity parameters are then weighted and mixed to obtain a single normalized elastic intensity parameter value; this value is then multiplied by the global elastic intensity parameter to obtain the global deformation modulation coefficient. The advantage of this method is that it allows for the overlay of multiple layers of dynamic details (such as large deformation accompanied by high-frequency micro-jitter) in a single deformation event, enhancing visual richness.
[0082] The technical solution provided in this embodiment determines the normalized animation progress based on the current animation frame time, trigger time, and preset elastic duration. It further combines this normalized animation progress, global elastic strength parameters, and a preset deformation animation curve to generate a global deformation modulation coefficient. This achieves precise, flexible, and efficient control of elastic deformation intensity in the time dimension, ensuring that the deformation effect adheres to physical realism (e.g., slow rebound after rapid compression) while meeting performance requirements, and avoids dependence on physics engines or state machines. Since the normalized animation progress unifies the temporal semantics of different elastic forces, and the deformation animation curve and global elastic strength parameters support art-driven non-linear adjustment, it can achieve consistent rhythm, unified style, and timely deformation feedback with low computational overhead, improving the stability, expressiveness, and development efficiency of the animation.
[0083] Figure 4 This is a flowchart of a model deformation control method according to an embodiment of the present invention. Based on the aforementioned embodiments, the force data includes the force direction acting on the target model; the elastic configuration information includes the elastic offset type and the vertical component scaling factor; correspondingly, "S130" can be further refined. Specific implementation methods can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0084] like Figure 4 As shown, the method specifically includes the following steps:
[0085] S310. For at least one point to be deformed in the target model, determine the offset vector corresponding to the point to be deformed based on the elastic offset type, elastic center point, current position information of the point to be deformed, force direction and vertical component scaling factor.
[0086] The elastic offset type can be used to characterize different ways of generating the offset vector. For example, elastic offset types include, but are not limited to: radial offset (along the direction from or away from the elastic center point of the deformation point), force direction offset (along the direction of the applied force), or normal direction offset (along the normal direction of the model surface). The force direction refers to the force vector acting on the model, including the magnitude and orientation of the force. The vertical component scaling factor (also called the vertical component ratio) is used to adjust the proportion of the offset vector (i.e., deformation) in the vertical direction (such as the Z-axis), used to suppress unnatural lateral deformation or enhance the response in a specific direction. The offset vector can include the deformation direction and magnitude.
[0087] In this embodiment, when the elastic offset type is force direction offset, the force direction can be used as the basic offset direction. The displacement vector of the current position of the point to be deformed relative to the elastic center point is calculated, and the component perpendicular to the force direction is extracted as the vertical component. The vertical component is scaled based on a scaling factor to obtain a scaling vector. The scaling vector and the force direction component are then synthesized to obtain the final offset vector. This setting ensures that deformation mainly occurs along the force direction while allowing fine-tuning of the lateral diffusion through the scaling factor.
[0088] When the elastic offset type is radial offset, a radial direction (or the reverse) can be constructed from the elastic center point to the point to be deformed, using the center point as the origin. The force direction is projected onto this radial direction to obtain the principal deformation component. The portion of the force direction perpendicular to the radial direction is taken as the lateral disturbance component. The lateral disturbance component is attenuated by multiplying it by the scaling factor of the vertical component to obtain the attenuation vector. The attenuation vector and the principal deformation component are synthesized to obtain the offset vector. This setup can naturally simulate structured deformations such as center-loaded, outward expansion, or edge-fixed, inward concavity.
[0089] It should be noted that the elastic offset type can be different for different deformation areas (or points to be deformed). For example, the elastic offset type (such as "normal offset", "force offset", or "radial offset") can be specified for each point to be deformed (or by vertex, triangle, or region label). For instance, in character facial deformation, some areas can be set to normal offset to make the deformation conform to the surface undulations; while other areas can be set to force offset to reflect the action of external forces.
[0090] In this embodiment, the offset vector corresponding to the point to be deformed is determined based on the elastic offset type, elastic center point, current position information of the point to be deformed, force direction, and vertical component scaling factor. This includes: determining a relative vector based on the elastic center point and the current position information of the point to be deformed; determining a direction reference vector and a vertical component based on the force direction and the relative vector; determining a vertical scaling vector based on the vertical component and the vertical component scaling factor; and processing the vertical scaling vector and the direction reference vector according to the elastic offset type to obtain the offset vector corresponding to the point to be deformed.
[0091] The relative vector refers to the vector formed by pointing from the current position information of the point to be deformed to the elastic center point (or vice versa), used to describe the spatial relationship of the point to be deformed relative to the elastic center point. The directional reference vector is the unit vector used to dominate the principal direction of the offset of the point to be deformed. The directional reference vector includes the unit force vector obtained after normalizing the force direction, or the positive component obtained after decomposing the relative vector. That is, the directional reference vector specifically depends on the type of elastic offset; it may be the unit force vector or the projection of the relative vector onto the force direction (i.e., the positive component). The positive component is the projection vector of the relative vector onto the direction of the unit force vector, representing the alignment of the point to be deformed in the force direction. The vertical component is the part of the relative vector orthogonal to the unit force vector, i.e., the vector remaining after subtracting the positive component from the relative vector, reflecting the lateral offset of the point to be deformed perpendicular to the force direction. The vertical component scaling factor is used to control the contribution intensity of the vertical component to the final offset. If the vertical component scaling factor is less than 1, unnatural lateral deformation can be suppressed. The vertical scaling vector is the vector obtained by multiplying the vertical component by the vertical component scaling factor. It represents the attenuated lateral offset component and is used to control the magnitude of lateral deformation.
[0092] In practical applications, the current position information of the deformation point can be subtracted from the elastic center point to obtain a relative vector. The force direction is then normalized to obtain a unit force vector, and the relative vector is decomposed into a positive component parallel to the unit force vector and a vertical component perpendicular to it. Alternatively, the relative vector can be projected onto the force direction to obtain a positive component, which is then normalized to a direction reference vector (if the projection length is zero, it reverts to the direction of the relative vector itself). The vertical component can be obtained by subtracting the positive component from the relative vector. Multiplying the vertical component by a scaling factor yields a vertical scaling vector. Furthermore, based on the elastic offset type, it can be determined which direction reference vector the vertical scaling vector is added to, thus obtaining the offset vector.
[0093] For example, a relative vector is constructed with the elastic center point (Centre) as the origin; the relative vector rel = WorldPos - Centre. WorldPos represents the current position information of the point to be deformed. The relative vector can be decomposed using the normalized unit force vector Direction to obtain the positive and vertical components. The base displacement vector baseVec (i.e., the offset vector) is output according to the elastic offset type.
[0094] The technical solution provided in this embodiment constructs a relative vector based on the current position of the elastic center point and the point to be deformed, performs orthogonal decomposition in combination with the force direction, introduces a vertical component scaling factor to controllably attenuate the vertical component, and flexibly combines the direction reference vector and the vertical scaling vector according to the elastic offset type. This generates an offset vector that is both physically intuitive and controllable, improving the spatial rationality, dynamic accuracy and style adaptability of the deformation.
[0095] In this embodiment, determining the directional reference vector and vertical component based on the force direction and relative vector includes: normalizing the force direction to obtain a unit force vector; and decomposing the relative vector into a positive component and a vertical component based on the unit force vector. The unit force vector can refer to the unit vector obtained after normalizing the force direction.
[0096] Specifically, the normalization of the force direction can be achieved by dividing the force direction vector (e.g., a non-zero vector in three-dimensional space) by its own magnitude (i.e., the length of the vector or the Euclidean norm), resulting in a unit vector with the same direction but a length of 1. This unit vector is the normalized force direction, also known as the unit force vector. The advantage of normalization is that it eliminates information about the magnitude of the force, retaining only its spatial direction, which is convenient for subsequent direction projection operations. Furthermore, the dot product of the relative vector and the unit force vector can be calculated to obtain the scalar projection length; multiplying this scalar projection length by the unit force vector yields the positive component. Subtracting the positive component from the original relative vector gives the perpendicular component.
[0097] For example, after normalizing the force direction, we obtain the unit force vector `Direction`. The positive component is represented as `fwdScalar`. `fwdScalar = dot(rel, Direction)` Direction. The vertical component is represented as perp. perp = rel - fwdScalar.
[0098] Here, `rel` represents the relative vector; `dot` is the vector dot product function; the dot product result `dot(rel, Direction)` can be understood as the projection length of `rel` onto the unit force vector `Direction`. When performing orthogonal decomposition of vectors, the relative vector `rel` can be decomposed into two mutually perpendicular components along the specified direction `Direction`. The positive component `fwdScalar` represents the projection of `rel` onto the `Direction` direction (in vector form). The perpendicular component `perp` represents the portion of `rel` perpendicular to `Direction`.
[0099] It should be noted that when the force direction is close to zero (e.g., the force is extremely small), direct normalization may lead to numerical instability. In this case, the magnitude of the force direction can be detected. If the magnitude is below a preset threshold, the decomposition process can be skipped, and the positive component can be set as the zero vector, the perpendicular component as the relative vector itself, or the default direction (e.g., the local normal of the model) can be used as the unit force vector. This setting can avoid abnormal deformation or crashes caused by invalid input.
[0100] The technical solution provided in this embodiment normalizes the force direction and decomposes the relative vector into positive and perpendicular components, constructing a deformation analysis framework that is directionally decoupled, structurally clear, and numerically controllable. This decomposition not only accurately extracts the dominant force-driven response direction but also retains the lateral information from the model's geometry, laying the foundation for subsequent adjustment of the deformation intensity and lateral diffusion degree in the dominant direction. Therefore, while ensuring computational efficiency and numerical stability, it significantly improves the spatial rationality and expressive flexibility of deformation, enabling elastic feedback to faithfully reflect the interaction intent while naturally integrating into the model's own structure, thereby enhancing the overall visual realism and user immersion experience.
[0101] In this embodiment, the vertical scaling vector and the direction reference vector are processed according to the elastic offset type to obtain the offset vector corresponding to the point to be deformed. This includes: when the elastic offset type is an offset type based on the force direction axis, the unit force vector and the vertical scaling vector are combined to obtain the offset vector corresponding to the point to be deformed; when the elastic offset type is an offset type based on the model scale, the positive component and the vertical scaling vector are combined to obtain the offset vector corresponding to the point to be deformed.
[0102] Among them, the elastic offset types include offset types based on the force direction axis and offset types based on the model scale, which correspond to deformation control dominated by the force direction or deformation control dominated by the model structure scale, respectively.
[0103] When the elastic offset type is based on the force direction axis, the unit force vector can be used as the primary direction for offset guidance. In this case, deformation occurs along the axis of the external force (i.e., the force direction) (e.g., impact, pressure). In practice, the unit force vector and the vertical scaling vector can be added together to obtain the final offset vector. For example, the offset vector determined by the force direction axis offset type can be expressed as: baseVec = Direction + perpScaled. baseVec represents the offset vector; Direction represents the unit force vector; and perpScaled represents the vertical scaling vector.
[0104] The advantage of this setup is that it ensures that the deformation of the point to be deformed is guided by the direction of the force, enhancing the visual communication of the force, while retaining a slight sense of structural difference through the vertical scaling vector.
[0105] When the elastic offset type is a model-scale-based offset type, the positive component is used as the primary offset direction. In this case, the actual geometric distance of the point to be deformed relative to the elastic center in the direction of force makes the deformation more closely match the model's own scale and structure, reflecting soft body deformation (such as facial compression, jelly-like movement, etc.). In specific implementation, the positive component and the vertical scaling vector can be added together to synthesize an offset vector that takes into account both structural proportions and lateral details. For example, the offset vector baseVec determined by the model-scale-based offset type is baseVec = fwdScalar + perpScaled. fwdScalar represents the positive component; perpScaled represents the vertical scaling vector.
[0106] The advantage of this setting is that it is closer to physical intuition, can better maintain the proportional coordination of local volume or shape during deformation, achieves the elastic deformation feedback effect of soft extrusion or stretching, and improves the spatial rationality of deformation.
[0107] It should be noted that the elastic offset type can be preset before deformation control of the target model; or it can be dynamically determined based on various information such as the model structure and material properties of the target model during deformation control. In this embodiment, the elastic offset type of the model that needs to reflect deformation related to the extrusion direction can be set to an offset type based on the model scale.
[0108] Furthermore, the elastic offset type can differ across different regions of the target model. In practice, the elastic offset type can be dynamically determined based on the region labels of the target model. For example, in a character model, the impacted area uses an offset type based on the force direction axis to emphasize the impact, while the surrounding transition areas use an offset type based on the model's proportions to maintain volume consistency. Regardless of the offset type used, the vertical scaling vector always participates in the synthesis as a lateral correction term, ensuring that the overall deformation is both directional and structurally harmonious, thus guaranteeing the visual effect of the deformation.
[0109] The above method, by selecting different principal direction components (unit force vector or positive component) according to the elastic offset type and combining them with the vertical scaling vector, achieves flexible deformation control between force orientation consistency and structural proportional fidelity. It not only preserves the clear expression of force deformation, but also considers the geometric characteristics of the model itself, effectively avoiding problems such as excessive homogenization of deformation or structural distortion, and improving the accuracy and visual realism of elastic feedback.
[0110] S320. Based on the global deformation modulation coefficient and the offset vector corresponding to the point to be deformed, determine the target offset data of the point to be deformed.
[0111] In this embodiment, the global deformation modulation coefficient and the offset vector corresponding to the point to be deformed can be multiplied to obtain the target offset data of the point to be deformed. This facilitates deformation control of the point to be deformed based on the target offset data. Since the offset vector already contains information on direction and relative elastic amplitude, and the global deformation modulation coefficient provides time-related elastic strength, the combination of the two allows the final elastic deformation effect to not only express the geometric rationality and directional semantics carried by the offset vector, but also to provide deformation feedback according to a preset animation rhythm, thereby improving the coherence, controllability, and immersiveness of the interactive feedback.
[0112] For example, the target offset data can be represented as offsetVec. offsetVec = anim × perpScaled. anim represents the global deformation modulation coefficient; perpScaled represents the offset vector corresponding to the point to be deformed.
[0113] It should be noted that when the global deformation modulation coefficient is negative (e.g., during the spring rebound phase), its ± sign can be retained, causing the target offset data direction to be reversed, thereby automatically generating a reverse rebound effect and enhancing the visual realism.
[0114] The technical solution of this embodiment determines the offset vector corresponding to the point to be deformed based on the elastic offset type, elastic center point, current position information of the point to be deformed, force direction, and vertical component scaling factor. This achieves highly controllable deformation direction and deformation guidance. Furthermore, the vertical component scaling factor effectively suppresses visually unreasonable lateral deformation, ensuring the rationality and realism of the deformation effect. Further, based on the global deformation modulation coefficient and the offset vector corresponding to the point to be deformed, the final target offset data of the point to be deformed is determined. This allows the deformation effect to respond to force information and follow a preset animation rhythm, improving the coherence, controllability, and immersiveness of the deformation feedback.
[0115] As an optional embodiment of the above embodiments, specific application scenario examples are provided to enable those skilled in the art to further understand the technical solutions of the embodiments of the present invention. Specifically, please refer to the following detailed content.
[0116] In this embodiment, the model deformation control method provided can be integrated into the Shader (a vertex shader running on a graphics processing unit (GPU)). When a force event such as a collision or impact on the target model is detected from the physics system, the deformation control function is triggered, and the force data and elasticity configuration information of the target model are determined. The elastic center point of the target model, the current animation frame time, the force data of the target model, and the elasticity configuration information are passed into the Shader so that the Shader executes the model deformation control method to achieve unified elasticity feedback of the target model in the global animation.
[0117] The transmitted force data includes the impact direction (i.e., the force direction) of the target model and the trigger time of the force event. Elasticity configuration information includes elasticity duration (TimeLength), global elasticity intensity parameter (WPO_Intensity), deformation animation curve (e.g., a graph used to drive the elasticity change process), and vertical component scaling factor (VerticalScale). Passing the current animation frame time as NowTime informs the shader that elastic deformation begins from this point in time.
[0118] When implementing model deformation control methods based on shaders, the elastic offset type can be selected according to the desired deformation effect, flexibly achieving different deformation effects.
[0119] In this embodiment, the elastic configuration information may further include root masking parameters based on BoundingBox and spherical masking parameters based on SphereMask, and the masking weights calculated based on the two masking parameters are fused using a Multiply method. The spherical masking parameters can limit the impact area, while the root masking parameters suppress bottom displacement to stabilize the root. For example, the root masking parameters can be used to constrain the elastic deformation of the model with a bottom-up attenuation (or vice versa) of the root mask, for example, making the model jitter gradually increase or decrease from the root to the top. The spherical masking parameters can be used to constrain the impact point in the spherical region of the model to form concentrated elastic deformation.
[0120] Two types of masking parameters can be pre-configured, and the root masking weight and the spherical masking weight can be fused by multiplication to obtain the masking weight mask∈[0,1], which spatially restricts the final displacement (i.e. the target offset data).
[0121] The technical solution provided in this embodiment encapsulates the model deformation control method (i.e., elastic feedback logic) within a built-in function in the shader. This eliminates the need for additional skeletons, target deformation meshes, or physical configurations; only force data and elastic configuration parameters are required to quickly achieve unified model elastic feedback, reducing art and development costs. Furthermore, by using a unified interface function to pass force data and elastic configuration parameters, it eliminates the need to configure corresponding parameters for different bone points in the model, enabling the entire model to implement the same elastic feedback logic, thus achieving convenient elastic deformation and reducing production costs. Moreover, the calculation of the model deformation control method is completed at the GPU vertex stage, avoiding complex logic or physical calculations on the CPU side. This maintains low performance overhead and improves operational efficiency when a large number of models trigger deformation control simultaneously. Based on this, it achieves a reduction in implementation cost and operational overhead while ensuring rich deformation effects, and improves cross-object adaptability and parameter tuning efficiency. Additionally, this technical solution is applicable to both static meshes and skeletal meshes, does not depend on specific binding methods, and can be integrated as a general tool in engines such as Unreal Engine (UE).
[0122] Figure 5 This is a schematic diagram of the structure of a model deformation control device according to an embodiment of the present invention. Figure 5 As shown, the device includes: a force data determination module 410, a global deformation modulation coefficient determination module 420, a target offset data determination module 430, and a deformation control module 440.
[0123] The system includes a force data determination module 410, which responds to force events acting on the target model in the currently playing animation and determines the corresponding force data; a global deformation modulation coefficient determination module 420, which determines the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model; a target offset data determination module 430, which determines the elastic center point of the target model and, based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determines the target offset data of at least one point to be deformed; and a deformation control module 440, which controls the displacement of the point to be deformed based on the target offset data to generate a deformation model corresponding to the current animation frame.
[0124] The technical solution of this embodiment determines the corresponding force data by responding to the force event acting on the target model in the currently playing animation; determines the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model; determines the elastic center point of the target model, and determines the target offset data of at least one point to be deformed based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient; and controls the displacement of the point to be deformed based on the target offset data to generate the deformation model corresponding to the current animation frame. This solves the problem in the prior art that relies on additional data structures to realize deformation feedback, resulting in high art production costs, complex processes, and large consumption of computing resources, which easily leads to instability of deformation animation. It realizes the accurate mapping of external force events to effective force data acting on the target model in the currently playing animation, and uses the current animation frame time as the time base, combined with the force data and elastic configuration information to dynamically generate the global deformation modulation coefficient, ensuring that the elastic deformation effect conforms to the laws of elastic physics, thereby ensuring the realism and physical rationality of elastic deformation. Furthermore, by combining the current position information of the elastic center point, the point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, the target offset data of the point to be deformed is determined. Based on the target offset data, the vertices are driven to complete the deformation control of the target model in the current animation frame. This achieves the goal of controlling the deformation of the target model without relying on additional data structures, which not only reduces the cost and complexity of art production, but also reduces runtime computational overhead. It avoids performance fluctuations and animation jitter caused by physical simulation or high-dimensional interpolation, thereby realizing the dynamic deformation response of the target model under force, improving the efficiency, high stability, and real-time performance of elastic deformation feedback, thus enhancing the immersion and realism of the animation, and making the deformation behavior of the target model both visually expected and physically reasonable.
[0125] Based on the above-mentioned device, optionally, the force data includes the triggering time of the force event acting on the target model; the elastic configuration information includes a preset elastic duration, global elastic strength parameters, and deformation animation curve; the global deformation modulation coefficient determination module 420 includes:
[0126] The normalized animation progress determination unit is used to determine the normalized animation progress based on the current animation frame time, the trigger time, and the preset elastic duration.
[0127] The global deformation modulation coefficient determination unit is used to determine the global deformation modulation coefficient based on the normalized animation progress, the global elastic strength parameter, and the deformation animation curve.
[0128] Based on the above-mentioned device, the optional global deformation modulation coefficient determination unit includes:
[0129] The normalized elastic strength parameter determination unit is used to input the normalized animation progress into the deformation animation curve to obtain the normalized elastic strength parameter.
[0130] The global deformation modulation coefficient determination subunit is used to determine the global deformation modulation coefficient based on the normalized elastic strength parameter and the global elastic strength parameter.
[0131] Based on the above-mentioned device, optionally, the force data includes the force direction acting on the target model; the elastic configuration information includes the elastic offset type and the vertical component scaling factor; the target offset data determination module 430 includes:
[0132] The offset vector determination unit is used to determine the offset vector corresponding to at least one deformable point in the target model based on the elastic offset type, the elastic center point, the current position information of the deformable point, the force direction and the scaling factor of the vertical component.
[0133] The target offset data determination unit is used to determine the target offset data of the point to be deformed based on the global deformation modulation coefficient and the offset vector corresponding to the point to be deformed.
[0134] Based on the above-described apparatus, optionally, the offset vector determination unit includes:
[0135] The relative vector determination unit is used to determine the relative vector based on the current position information of the elastic center point and the point to be deformed;
[0136] A direction reference vector determination unit is used to determine a direction reference vector and a vertical component based on the force direction and the relative vector; wherein, the direction reference vector includes a unit force vector obtained by normalizing the force direction, or a positive component obtained by decomposing the relative vector.
[0137] A vertical scaling vector determination unit is used to determine a vertical scaling vector based on the vertical component and the scaling coefficient of the vertical component;
[0138] The offset vector determination subunit is used to process the vertical scaling vector and the direction reference vector according to the elastic offset type to obtain the offset vector corresponding to the point to be deformed.
[0139] Based on the above device, optionally, a direction reference vector determination unit is used to normalize the force direction to obtain a unit force vector; based on the unit force vector, the relative vector is decomposed into a positive component and a vertical component.
[0140] Based on the above device, optionally, an offset vector determination subunit is used to combine the unit force vector and the vertical scaling vector to obtain the offset vector corresponding to the point to be deformed when the elastic offset type is an offset type based on the force direction axis; and to combine the positive component and the vertical scaling vector to obtain the offset vector corresponding to the point to be deformed when the elastic offset type is an offset type based on the model scale.
[0141] Based on the above-described device, optionally, the flexible configuration information may also include root masking parameters and / or spherical masking parameters; the device further includes:
[0142] The masking weight determination module is used to determine the root masking weight of the point to be deformed based on the root masking parameters and the current position information of the point to be deformed; and / or, to determine the spherical masking weight of the point to be deformed based on the spherical masking parameters and the current position information of the point to be deformed.
[0143] The modulation module is used to modulate the target offset data based on the root mask weight and / or the spherical mask weight, so as to perform deformation control on the point to be deformed based on the modulated target offset data.
[0144] The model deformation control device provided in the embodiments of the present invention can execute the model deformation control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0145] Figure 6This is a schematic diagram of the structure of an electronic device implementing the model deformation control method of this invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0146] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 or a random access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or a computer program loaded from storage unit 18 into the random access memory 13. The random access memory 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and random access memory 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0147] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0148] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as model deformation control methods.
[0149] In some embodiments, the model deformation control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into random access memory 13 and executed by processor 11, one or more steps of the model deformation control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the model deformation control method by any other suitable means (e.g., by means of firmware).
[0150] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0151] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0152] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0153] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0154] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0155] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0156] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from read-only memory 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0157] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the model deformation control method provided in any embodiment of this invention.
[0158] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0159] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0160] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A model deformation control method, characterized in that, include: Respond to force events acting on the target model in the currently playing animation and determine the corresponding force data; Based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model, the global deformation modulation coefficient is determined; Determine the elastic center point of the target model, and based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determine the target offset data of at least one point to be deformed. Based on the target offset data, the displacement of the point to be deformed is controlled to generate the deformation model corresponding to the current animation frame.
2. The method according to claim 1, characterized in that, The force data includes the triggering time of the force event acting on the target model; the elasticity configuration information includes the preset elasticity duration, global elasticity strength parameters, and deformation animation curve; The determination of the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model includes: Based on the current animation frame time, the trigger time, and the preset elastic duration, the normalized animation progress is determined; The global deformation modulation coefficient is determined based on the normalized animation progress, the global elastic strength parameter, and the deformation animation curve.
3. The method according to claim 2, characterized in that, The step of determining the global deformation modulation coefficient based on the normalized animation progress, the global elastic strength parameter, and the deformation animation curve includes: Input the normalized animation progress into the deformation animation curve to obtain the normalized elastic strength parameter; The global deformation modulation coefficient is determined based on the normalized elastic strength parameter and the global elastic strength parameter.
4. The method according to claim 1, characterized in that, The force data includes the direction of the force acting on the target model; the elastic configuration information includes the elastic offset type and the vertical component scaling factor; The determination of target offset data for at least one of the deformable points based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient includes: For at least one point to be deformed in the target model, the offset vector corresponding to the point to be deformed is determined based on the elastic offset type, the elastic center point, the current position information of the point to be deformed, the force direction and the scaling factor of the vertical component. Based on the global deformation modulation coefficient and the offset vector corresponding to the point to be deformed, the target offset data of the point to be deformed is determined.
5. The method according to claim 4, characterized in that, The step of determining the offset vector corresponding to the point to be deformed based on the elastic offset type, the elastic center point, the current position information of the point to be deformed, the force direction, and the scaling factor of the vertical component includes: Based on the current position information of the elastic center point and the point to be deformed, determine the relative vector; Based on the force direction and the relative vector, a directional reference vector and a vertical component are determined; wherein, the directional reference vector includes a unit force vector obtained by normalizing the force direction, or a positive component obtained by decomposing the relative vector. Based on the vertical component and the scaling factor of the vertical component, determine the vertical scaling vector; Based on the elastic offset type, the vertical scaling vector and the direction reference vector are processed to obtain the offset vector corresponding to the point to be deformed.
6. The method according to claim 5, characterized in that, The determination of the direction reference vector and vertical component based on the force direction and the relative vector includes: The force direction is normalized to obtain a unit force vector; Based on the unit force vector, the relative vector is decomposed into a positive component and a vertical component.
7. The method according to claim 5, characterized in that, The process of processing the vertical scaling vector and the direction reference vector according to the elastic offset type to obtain the offset vector corresponding to the point to be deformed includes: When the elastic offset type is an offset type based on the force direction axis, the unit force vector and the vertical scaling vector are combined to obtain the offset vector corresponding to the point to be deformed. When the elastic offset type is a model-scale-based offset type, the positive component and the vertical scaling vector are combined to obtain the offset vector corresponding to the point to be deformed.
8. The method according to claim 1, characterized in that, The flexible configuration information also includes root masking parameters and / or spherical masking parameters; the method further includes: Based on the root masking parameters and the current position information of the point to be deformed, determine the root masking weight of the point to be deformed; and / or, based on the spherical masking parameters and the current position information of the point to be deformed, determine the spherical masking weight of the point to be deformed. Based on the root masking weight and / or the spherical masking weight, the target offset data is modulated to control the deformation of the point to be deformed based on the modulated target offset data.
9. A model deformation control device, characterized in that, include: The force data determination module is used to respond to force events acting on the target model in the currently playing animation and determine the corresponding force data; The global deformation modulation coefficient determination module is used to determine the global deformation modulation coefficient based on the current animation frame time, the force data, and the elastic configuration information corresponding to the target model. The target offset data determination module is used to determine the elastic center point of the target model, and based on the elastic center point, the current position information of at least one point to be deformed in the target model, the force data, the elastic configuration information, and the global deformation modulation coefficient, determine the target offset data of at least one point to be deformed. The deformation control module is used to control the displacement of the point to be deformed based on the target offset data, so as to generate the deformation model corresponding to the current animation frame.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model deformation control method according to any one of claims 1-8.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the model deformation control method as described in any one of claims 1-8.