CN-121982166-A - Model deformation control method, device, equipment, medium and product
Abstract
The invention discloses a model deformation control method, a device, equipment, a medium and a product. The method comprises the steps of responding to a stress event acted on a target model in a current playing animation, determining corresponding stress data, determining a global deformation modulation coefficient based on the moment of a current animation frame, the stress data and elastic configuration information corresponding to the target model, determining an elastic center point of the target model, determining 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 stress data, the elastic configuration information and the global deformation modulation coefficient, and controlling the point to be deformed to displace based on the target offset data so as to generate a deformation model corresponding to the current animation frame. The technical scheme provided by the invention realizes the effects of ensuring the authenticity and physical rationality of elastic deformation, reducing the art manufacturing cost and complexity and improving the high efficiency, high stability and real-time performance of elastic deformation feedback.
Inventors
- XIANG YU
Assignees
- 广州博冠信息科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260107
Claims (11)
- 1. A model deformation control method, characterized by comprising: responding to a stress event acting on a target model in the current playing animation, and determining corresponding stress data; Determining a global deformation modulation coefficient based on the current animation frame time, the stress data and the elastic configuration information corresponding to the target model; Determining an elastic center point of the target model, and determining target offset data of at least one point to be deformed based on the elastic center point, current position information of the at least one point to be deformed in the target model, the stress data, the elastic configuration information and the global deformation modulation coefficient; And controlling the point to be deformed to displace based on the target offset data so as to generate a deformation model corresponding to the current animation frame.
- 2. The method of claim 1, wherein the force data comprises a trigger time of a force event acting on the target model, and wherein the elastic configuration information comprises a preset elastic duration, a global elastic strength parameter and a deformation animation curve; the determining the global deformation modulation coefficient based on the current animation frame time, the stress data and the elastic configuration information corresponding to the target model comprises the following steps: Determining a normalized animation progress based on the current animation frame time, the trigger time and the preset elastic duration; And determining a global deformation modulation coefficient based on the normalized animation progress, the global elastic strength parameter and the deformation animation curve.
- 3. The method of claim 2, wherein the determining a global deformation modulation coefficient based on the normalized animation progress, the global elastic intensity parameter, and the deformation animation curve comprises: Inputting the normalized animation progress into the deformation animation curve to obtain normalized elastic intensity parameters; and determining the global deformation modulation coefficients based on the normalized elastic strength parameter and the global elastic strength parameter.
- 4. The method of claim 1, wherein the force data comprises force directions acting on the target model, and wherein the elastic configuration information comprises an elastic offset type and a vertical component scaling factor; The determining the target offset data of at least one point to be deformed based on the elastic center point, the current position information of the at least one point to be deformed in the target model, the stress data, the elastic configuration information and the global deformation modulation factor includes: Determining an offset vector corresponding to at least one point to be deformed in the target model based on the elastic offset type, the elastic center point, current position information of the point to be deformed, the stress direction and a vertical component scaling factor; And determining 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.
- 5. The method of claim 4, wherein determining the offset vector corresponding to the point to be deformed based on the elastic offset type, the elastic center point, current location information of the point to be deformed, the stress direction, and a vertical component scaling factor comprises: determining a relative vector based on the current position information of the elastic center point and the point to be deformed; determining a direction reference vector and a vertical component based on the stress direction and the relative vector, wherein the direction reference vector comprises a unit stress vector obtained by normalizing the stress direction or a forward component obtained by decomposing 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 an offset vector corresponding to the point to be deformed.
- 6. The method of claim 5, wherein determining a direction reference vector and a vertical component based on the force direction and the relative vector comprises: normalizing the stress direction to obtain a unit stress vector; the relative vector is decomposed into a forward component and a vertical component based on the unit force vector.
- 7. The method of claim 5, wherein the 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 comprises: When the elastic deviation type is based on a deviation type of a stress direction shaft, combining the unit stress vector and the vertical scaling vector to obtain a deviation vector corresponding to the point to be deformed; and when the elastic offset type is an offset type based on a model proportion, combining the forward component and the vertical scaling vector to obtain an offset vector corresponding to the point to be deformed.
- 8. The method according to claim 1, wherein the elastic configuration information further comprises root mask parameters and/or sphere mask parameters, the method further comprising: Determining the root mask weight of the point to be deformed based on the root mask parameter and the current position information of the point to be deformed, and/or determining the spherical mask weight of the point to be deformed according to the spherical mask parameter and the current position information of the point to be deformed; And modulating the target offset data based on the root mask weight and/or the spherical mask weight so as to control the deformation of the point to be deformed based on the modulated target offset data.
- 9. A model deformation control device, characterized by comprising: The stress data determining module is used for responding to a stress event acted on a target model in the current playing animation and determining corresponding stress data; The global deformation modulation coefficient determining module is used for determining a global deformation modulation coefficient based on the current animation frame moment, the stress data and the elastic configuration information corresponding to the target model; The target offset data determining module is used for determining an elastic center point of the target model and determining target offset data of at least one point to be deformed based on the elastic center point, current position information of at least one point to be deformed in the target model, the stress data, the elastic configuration information and the global deformation modulation coefficient; and the deformation control module is used for controlling the point to be deformed to displace based on the target offset data so as to generate a deformation model corresponding to the current animation frame.
- 10. An electronic device, the electronic device comprising: and a memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the model deformation control method of any one of claims 1-8.
- 11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the model deformation control method according to any one of claims 1-8.
Description
Model deformation control method, device, equipment, medium and product Technical Field The present invention relates to the field of computer processing technologies, and in particular, to a method, an apparatus, a device, a medium, and a product for controlling model deformation. Background In interactive applications, to enhance the perceived intensity of players on interactive events and to enhance the immersion and realism, it is often necessary to add elastic deformation feedback effects to the stressed three-dimensional model. Such as dishing, stretching, shaking, or rebounding. At present, the mode for realizing the elastic deformation feedback effect mainly comprises three modes, namely adding an elastic auxiliary skeleton into a model, combining skin weights to map the skeleton motion to the vertex of the surface of the model, and driving the skeletons to displace or vibrate when interaction or animation triggering is carried out, so as to drive the vertex to deform. And secondly, manufacturing a plurality of target deformation grids in advance, and realizing deformation transition by carrying out weighted interpolation on the vertex positions of the target deformation grids in operation. Thirdly, carrying out physical solution driven by stress on a predefined physical agent model by means of a cloth or soft dynamics engine to obtain the vertex position after deformation, and updating the vertex position of the rendering grid through a pre-calculated mapping relation. However, the above three methods all rely on additional data structures, such as skeleton level, predefined deformation grid or physical agent model, which results in high art manufacturing cost and complex development flow, and furthermore, the real-time calculation cost based on skeleton driving, vertex interpolation or physical simulation is large, and frame rate fluctuation or deformation response delay is easily caused in a scene with limited performance, thereby affecting the stability of animation expression. Disclosure of Invention The invention provides a model deformation control method, device, equipment, medium and product, which are used for realizing the purposes of ensuring the authenticity and physical rationality of elastic deformation without depending on additional data structures, reducing the art manufacturing cost and complexity and improving the high efficiency, high stability and real-time performance of elastic deformation feedback. According to an aspect of the present invention, there is provided a model deformation control method including: responding to a stress event acting on a target model in the current playing animation, and determining corresponding stress data; Determining a global deformation modulation coefficient based on the current animation frame time, the stress data and the elastic configuration information corresponding to the target model; Determining an elastic center point of the target model, and determining target offset data of at least one point to be deformed based on the elastic center point, current position information of the at least one point to be deformed in the target model, the stress data, the elastic configuration information and the global deformation modulation coefficient; And controlling the point to be deformed to displace based on the target offset data so as to generate a deformation model corresponding to the current animation frame. According to another aspect of the present invention, there is provided a model deformation control apparatus comprising: The stress data determining module is used for responding to a stress event acted on a target model in the current playing animation and determining corresponding stress data; The global deformation modulation coefficient determining module is used for determining a global deformation modulation coefficient based on the current animation frame moment, the stress data and the elastic configuration information corresponding to the target model; The target offset data determining module is used for determining an elastic center point of the target model and determining target offset data of at least one point to be deformed based on the elastic center point, current position information of at least one point to be deformed in the target model, the stress data, the elastic configuration information and the global deformation modulation coefficient; and the deformation control module is used for controlling the point to be deformed to displace based on the target offset data so as to generate a deformation model corresponding to the current animation frame. According to another aspect of the present invention, there is provided an electronic apparatus including: and a memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the model deformation control method according to any one