Animation generation method and device, computer equipment and computer readable storage medium

By controlling the motion of the first model vertex and the second model vertex in the virtual object model, the problem of stiff animation effects in the prior art is solved, and a more vivid and fine animation generation effect is achieved.

CN119516049APending Publication Date: 2025-02-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411648871.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When creating virtual creatures or objects animations, the animation effect is relatively stiff and not fine enough due to the limitation of the number of bones.

Method used

By obtaining the virtual object model, determining the target deformation direction, controlling the movement of the first model vertex and the second model vertex, and generating deformation animations. The first model vertex controls movement through deformation control information, and the second model vertex is driven by the first model vertex, making the animation more vivid and refined.

Benefits of technology

The generated shape-change animation is more vivid and detailed, the animation generation effect is good, and the deformation of the virtual object model is more biological.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516049A_ABST
    Figure CN119516049A_ABST
Patent Text Reader

Abstract

Embodiments of the invention disclose an animation generation method and apparatus, a computer device and a computer readable storage medium. The method comprises the steps of obtaining a virtual object model; determining a first model vertex and a second model vertex from the virtual object model according to the target deformation direction of the virtual object model; determining first motion data of the vertex of the first model according to the deformation control information; simulating a first model vertex based on the first motion data to drive a second model vertex to move to obtain second motion data of the second model vertex; and generating a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data. According to the embodiment of the invention, the motion of the first model vertex and the second model vertex of the virtual object model is controlled in different modes, the first model vertex is controlled to move through the deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and fine, and the animation generation effect is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of animation technology, and in particular to an animation generation method, device, computer equipment and computer-readable storage medium. Background Art

[0002] In animation production technology, for the animation of virtual objects such as virtual creatures or virtual objects, bones are generally bound to the virtual objects, and the movement of the virtual objects is controlled by bone binding animation. Due to the limitation of the number of bones, the animation effect of the virtual objects is relatively stiff and not refined enough. Summary of the invention

[0003] The present application provides an animation generation method, apparatus, computer device and computer readable storage medium.

[0004] In a first aspect, an embodiment of the present application provides an animation generation method, comprising:

[0005] Get the virtual object model;

[0006] determining a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model;

[0007] Determine first motion data of the vertices of the first model according to the deformation control information;

[0008] Simulate the movement of the first model vertex driving the second model vertex based on the first motion data to obtain second motion data of the second model vertex;

[0009] A deformation animation corresponding to the virtual object model is generated based on the first motion data and the second motion data.

[0010] In a second aspect, an embodiment of the present application further provides an animation generating device, comprising:

[0011] A model acquisition unit, used for acquiring a virtual object model;

[0012] a vertex determination unit, configured to determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model;

[0013] a data determining unit, configured to determine first motion data of the vertices of the first model according to the deformation control information;

[0014] A motion simulation unit, configured to simulate, based on the first motion data, the movement of the first model vertex driving the second model vertex to obtain second motion data of the second model vertex;

[0015] The animation generating unit is used to generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0016] In a third aspect, an embodiment of the present application also provides a computer device, comprising a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any animation generation method provided in the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the animation generation methods provided in the embodiments of the present application.

[0018] The embodiments of the present application obtain a virtual object model; determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model; determine first motion data of the first model vertex according to deformation control information; simulate the movement of the second model vertex driven by the first model vertex based on the first motion data to obtain second motion data of the second model vertex; and generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0019] The embodiments of the present application control the movement of the first model vertex and the second model vertex of the virtual object model in different ways, wherein the movement of the first model vertex is controlled by deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and detailed, and the animation generation effect is good. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flowchart of the animation generation method provided in an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of a target deformation region provided in an embodiment of the present application;

[0023] Figure 3 It is a schematic diagram of the internal connection lines of a tetrahedron provided in an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of the internal connection lines of a part of the model provided in the embodiment of the present application;

[0025] Figure 5 is a schematic diagram of an animation generating device provided in an embodiment of the present application;

[0026] Figure 6 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0028] The embodiment of the present application provides an animation generation method, device, computer equipment and computer readable storage medium. The animation generation device can be integrated in a computer equipment, which can be a server or a terminal.

[0029] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.

[0030] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0031] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0032] This embodiment will be described from the perspective of an animation generating device. The animation generating device may be integrated into a computer device, which may be a server or a terminal.

[0033] An animation generation method provided in an embodiment of the present application is as follows: Figure 1 As shown, the specific process of the animation generation method can be as follows:

[0034] 101. Obtain a virtual object model.

[0035] Among them, the virtual object model can be a two-dimensional or three-dimensional model corresponding to the virtual object. The virtual object can be a model of an object existing in the real world, such as a soft worm, jelly, a virtual heart, etc. The virtual object can also be a fictional object, such as a fictional mollusk, a fictional bacterial flora, etc.

[0036] The virtual object model can be constructed by multiple polygonal meshes (meshes), such as triangular patches. The mesh contains vertices (also known as model vertices), edges and faces. Each vertex represents a three-dimensional coordinate point in space. The edge is a line segment connecting two vertices. The edge defines the connection relationship between vertices, and the polygon surrounded by the edge is a face.

[0037] 102. Determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model.

[0038] Among them, deformation can refer to the change of the shape of the virtual object model, for example, the virtual object model stretches upward, stretches up and down, stretches left and right, or expands in all directions, causing the shape to change. Through the deformation of the virtual object model, the virtual object model can be made to "come alive", so that it has more "sense of life" and is more like a "living thing". For example, the virtual object model can be controlled to expand and contract to simulate the ups and downs produced by biological breathing. The model surface of the virtual object model can also be controlled to shake up and down to simulate the shaking of fat or muscle. For example, if the virtual object model is a model corresponding to a bacterial flora, the surface of the virtual object model can be controlled to jump slightly to simulate the changes in the surface of the flora caused by the activity of bacteria in the bacterial flora.

[0039] The target deformation direction may be the main direction in which the shape of the virtual object model changes. There may be one or more target deformation directions, for example, the virtual object model deforms upward, the virtual object model deforms upward and downward, or the virtual object model deforms in all directions.

[0040] The target deformation direction can be set in advance according to the deformation characteristics of the virtual object. For example, for the human body, when a person breathes, the chest will rise and fall with the person's breathing. If the deformation animation is used to simulate the breathing of the person, the target deformation direction can be determined according to the rising and falling direction of the chest. For example, when a person walks, the muscles and fat on the body will shake up and down. If the deformation animation is used to simulate the shaking of muscles and fat, the vertical upward and vertical downward directions in space can be determined as the target deformation direction; for example, the body of a jellyfish will constantly contract and relax in water, so the target deformation direction can be multiple directions corresponding to the contraction and relaxation movement of the jellyfish. The first model vertex is deformed in the target deformation direction. Driven by the movement of the first model vertex, the second model vertex can be deformed in the target deformation direction or in other directions other than the target deformation direction. In terms of visual effect, the deformation of the virtual object model in the target deformation direction is more obvious.

[0041] Determining the first model vertex and the second model vertex from the virtual object model according to the target deformation direction can be done by manually selecting the first model vertex from the virtual object model according to the target deformation direction, or by screening out the model vertices of the virtual object model that meet the specified conditions as the first model vertex, and using the model vertices that do not meet the specified conditions as the second model vertex. The specified condition can be, for example, the model vertex whose tangent direction or binormal matches the target deformation direction. The tangent direction matches the target direction, which means that the angle between the tangent direction and the target deformation direction is less than a preset angle threshold, or is equal to a preset angle threshold. Assuming that the virtual object model needs to be controlled to move back and forth to the left and right directions, the model vertex whose tangent direction in the virtual object model matches the target deformation direction can be used as the first model vertex. For example, it can be the normal direction, the tangent direction or the binormal direction, etc. The model vertex that does not match the target deformation direction can match the target direction by an angle that is not less than a preset angle threshold.

[0042] The specified conditions may also be model vertices whose normal directions match the target deformation direction. Suppose a virtual object model is set such that the virtual object model stretches its body up and down with breathing. In order to simulate this animation effect, the model vertices whose normal directions are vertically upward and vertically downward in the virtual object model must be offset. These model vertices can be considered as model vertices in active motion, that is, first model vertices. Optionally, model vertices whose normal directions have a smaller angle with the vertical upward direction and model vertices whose normal directions have a smaller angle with the vertical downward direction can also be used as first model vertices. Therefore, the first model vertex can be a model vertex whose normal direction matches the target deformation direction. The matching of the normal direction and the target deformation direction may include that the normal direction and the target deformation direction are the same, or that the angle between the normal direction and the target deformation direction is less than a preset angle threshold, etc.

[0043] The specified conditions can be flexibly set according to the application scenario needs and are not limited here.

[0044] The second model vertex can be a model vertex other than the first model vertex in the virtual object model. The second model vertex can be considered as a driven motion vertex. The second model vertex moves following the movement of the first model vertex. It can be considered that the second model vertex moves due to the pulling of the moving first model vertex. For example, the virtual object model stretches its body up and down, and the first model vertex of the virtual object model can move up or down. The movement of the second model vertex can be controlled to produce the effect of the virtual object model shrinking inward, which is equivalent to the model object becoming slender.

[0045] Optionally, the target deformation area of ​​the virtual object model may be determined according to the target vertex direction of the model vertex (the target vertex direction may include at least one of the tangent direction, the sub-tangent direction and the normal direction of the model vertex, which may be set according to the application scenario), and then the first model vertex is selected from the target deformation area. That is, in one embodiment, the step of "determining the first model vertex and the second model vertex from the virtual object model according to the target deformation direction of the virtual object model" includes:

[0046] Get the target vertex direction of the model vertex in the virtual object model;

[0047] Determining a target deformation region of the virtual object model according to the target vertex direction and the target deformation direction of the virtual object model;

[0048] The first model vertices are screened out from the target deformation region, and the model vertices other than the first model vertices in the virtual object model are used as second model vertices.

[0049] The target deformation region can be considered as the main deformation region in the virtual object model, and the first model vertex is the key point for controlling deformation in the target deformation region.

[0050] The target vertex direction may include at least one of the tangent direction, the sub-tangent direction and the normal direction of the model vertex. The target vertex direction is taken as the normal direction as an example for explanation below. For example, the normal direction of the model vertex can be obtained from the vertex data of the model vertex in the virtual object model; then, according to the normal direction and the target deformation direction of the virtual object model, the target deformation area of ​​the virtual object model is determined. For example, the angle between the normal direction and the target deformation direction can be calculated, and the target deformation area of ​​the virtual object model is determined according to the angle. The target deformation area includes at least one mesh. The angle between the normal direction of each model vertex in the target deformation area and the target deformation direction is less than a preset angle threshold. For example, the preset angle threshold can be 30°. The area where the model vertices whose angle between the normal direction and the target deformation direction is less than 30° is determined as the target deformation area.

[0051] Optionally, a target direction component corresponding to the target deformation direction can also be extracted from the normal direction, and the target deformation area can be determined based on the target direction component. For example, the normal vector of the model vertex is (x0, y0, z0). If the target deformation direction is in the y-axis direction, then the normal vector of the model vertex can be (x0, y0, z0), which is y0, as the target direction component; if the target deformation direction is in the x-axis direction, then the normal vector of the model vertex can be (x0, y0, z0), which is x0, as the target direction component; if the target deformation direction is in the z-axis direction, then the normal vector of the model vertex can be (x0, y0, z0), which is z0, as the target direction component.

[0052] After determining the target direction component of the model vertex, the target deformation area of ​​the virtual object model is determined according to the magnitude of the target direction component. That is, in one embodiment, the step of “determining the target deformation area of ​​the virtual object model according to the target vertex direction and the target deformation direction of the virtual object model” includes:

[0053] Extracting a target direction component corresponding to a target deformation direction from a direction vector corresponding to a target vertex direction of each model vertex of the virtual object model;

[0054] According to the magnitude relationship between the target direction component and the preset threshold, a target deformation region in which the target direction component corresponding to the model vertex is greater than the preset threshold is determined from the virtual object model.

[0055] The direction vector corresponding to the target vertex direction may be a vector indicating the target vertex direction, for example, may be a unit vector in the target vertex direction. If the target vertex direction is a normal direction, the direction vector may be a normal vector.

[0056] Exemplarily, if the target deformation direction of the virtual object model is upward or downward deformation, the upward and downward directions correspond to the y-axis, and the target vertex direction is the normal direction, then the y component in the normal vector of the model vertex can be used as the target direction component, and the target deformation area can be determined based on the size relationship between the target direction component and the preset threshold.

[0057] The normal vector can be a unit vector, so the components of the normal vector on each coordinate axis belong to the interval [-1,1]. Therefore, the target deformation area can be determined based on the size relationship between the target component and a preset threshold (which can be called the first preset threshold for distinction). For example, the preset threshold can be 0.6, and the target deformation area can be determined by the area where the model vertices whose absolute values ​​of the target direction components are greater than 0.6 are located. The preset threshold can also be other values, for example, 0.4 or 0.5, etc. It can be flexibly set according to application requirements and will not be elaborated here.

[0058] If there are multiple target deformation directions, a preset threshold is set for each target deformation direction. For example, if there are two target deformation directions, the corresponding preset thresholds are -0.6 and 0.6. The target deformation area is determined by the area where the model vertices whose target direction components are greater than 0.6 and the model vertices whose target direction components are less than -0.6 are located.

[0059] It is understandable that a suitable target vertex direction and direction vector may be set according to the target deformation direction, which is not limited here.

[0060] In one example, the target deformation area can be Figure 2 The red area shown in Figure 2 The red area in the figure may be the target deformation area corresponding to the target deformation direction of upward and downward, the blue area is the area outside the target deformation area, and the red area is the main deformation area of ​​the virtual object model.

[0061] The first model vertices are screened out from the target deformation area. For example, the model vertices whose target direction components are greater than a second preset threshold value may be taken as the first model vertices. Another example is that the target direction components in the target deformation area may be arranged from large to small, and the front 30% of the model vertices may be taken as the first model vertices. Alternatively, the first M (for example, 100) model vertices with the target direction components in the target deformation area may be taken as the first model vertices. In this way, an appropriate number of first model vertices and the model vertices that are critical to the deformation of the virtual object model may be selected from the target deformation area.

[0062] Optionally, different parameters may be assigned to the model vertices in the target deformation region and the model vertices outside the target deformation region, and through smoothing, the parameters of the target deformation region and other regions transition naturally, and then the first model vertex is selected from them, and the first model vertex that is more important to the deformation movement of the virtual object model may be selected. That is, in one embodiment, the step of "selecting the first model vertex from the target deformation region" includes:

[0063] Assigning a first parameter to model vertices in a target deformation region, and assigning a second parameter to model vertices outside the target deformation region;

[0064] Based on the first parameter and the second parameter, smoothing the first parameter of the model vertex in the target deformation area to obtain a processed first parameter;

[0065] The first model vertices are selected from the target deformation region according to the processed first parameter.

[0066] Among them, the first parameter and the second parameter can be different. By assigning the first parameter to the model vertices in the target deformation area and assigning the second parameter to the model vertices outside the target deformation area, the model vertices located in the target deformation area and the model vertices located outside the target deformation area can be distinguished.

[0067] For example, you can set the red channel of the model vertices in the target deformation area to 1, and set the blue channel and green channel to zero, and set the blue channel of the model vertices outside the target deformation area to 1, and set the red channel to 0, and the green channel to 0, so you can get the following: Figure 2 In the model shown, the red channel is set to 1 (it can also be other values, which are set according to the application scenario) to make the model vertices appear red, and the blue channel is set to 1 to make the model vertices appear blue.

[0068] It is understandable that the target deformation area may be set to blue, and the area outside the target deformation area may be set to red. The specific settings may be flexibly made according to needs and are not limited here.

[0069] The parameters corresponding to the red channels of the model vertices in the virtual object model can be smoothed so that the red color decays along the model surface, which is equivalent to assigning the first parameter to the red channels of the model vertices in the target deformation area and assigning the second parameter to the red channels of the model vertices outside the deformation area.

[0070] In one embodiment, the first parameter may be 1, the second parameter may be 0, and the processed first parameter belongs to the numerical interval [0, 1].

[0071] The first parameter and the second parameter may also be set to other values. For example, the first parameter may be 2, the second parameter may be 1, and so on.

[0072] Based on the first parameter and the second parameter, the first parameter of the model vertex in the target deformation area is smoothed so that the first parameter of the model vertex located at the edge of the first target deformation area smoothly transitions to the second parameter to obtain the processed first parameter.

[0073] According to the processed first parameter, it can be determined that the first model vertex whose target vertex direction (for example, normal direction) is closer to the target deformation direction and farther from the model vertices outside the target deformation area, and more critical to the deformation of the virtual object model, is screened out from the target deformation area. Specifically, the first model vertex can be selected according to a preset parameter threshold. For example, the model vertex whose processed first parameter is greater than the preset parameter threshold can be used as the first model vertex. For different first and second parameters, different parameter thresholds can be set for screening the first model vertex. For example, the first parameter is 1, the second parameter is 0, and the preset parameter threshold can be 0.5, etc.

[0074] 103. Determine first motion data of a vertex of the first model according to the deformation control information.

[0075] Among them, the first motion data may include displacement information of the first model vertices at different times (the displacement information may include the position coordinates of the first model vertices after offset); the deformation control information may include program textures, noise, vertex animation or change amplitude value, etc. The noise may be turbulent noise, for example.

[0076] The displacement of the first model vertex can be determined according to the deformation control information, and the first motion data of the first model vertex can be obtained according to the position of the first model vertex at different times.

[0077] Optionally, the deformation control information can determine the displacement of the first model vertex, and interpolate the displacement of the first model vertex based on the time function, so that the displacement of the first model vertex has a periodic change. The time function can be a function related to time, such as a function with time as the independent variable. Exemplarily, the time function can be sin(t), and the displacement of the first model vertex is multiplied by sin(t), and the displacement of the first model vertex becomes a periodic sinusoidal change. The time function can also be cos(t), etc., and the displacement of the first model vertex is multiplied by cos(t), and the displacement of the first model vertex becomes a periodic cosine change.

[0078] Optionally, a weight mask graph may be generated according to the parameters (second parameters or processed first parameters) corresponding to the model vertices obtained in step 102. The weight mask graph may be used to control the intensity of the offsets of different first model vertices. That is, in one embodiment, before the step of "determining the first motion data of the first model vertex according to the deformation control information", the following steps are included:

[0079] Generate a weight mask map corresponding to the virtual object model according to the processed first parameter and second parameter;

[0080] The step of “determining first motion data of a vertex of a first model according to deformation control information” includes:

[0081] Determine displacement information of a first model vertex of the virtual object model according to the deformation control information;

[0082] The displacement information is adjusted based on the weight mask graph to obtain first motion data of the first model vertex.

[0083] For example, a weight mask map corresponding to the virtual object model can be generated based on the processed first parameter and second parameter; and the displacement information of the first model vertex of the virtual object model can be determined based on the deformation control information; the displacement information is weighted based on the weight mask map to obtain the first motion data of the first model vertex. By weighting the displacement information through the weight mask map, the motion intensity of the first model vertex can be smoothly changed and naturally transitioned to the second model vertex. The motion change between the first model vertex and the second model vertex is not split or abrupt, which can improve the animation generation effect.

[0084] In one embodiment, the second parameter may be 0, and the processed first parameter belongs to the numerical interval [0, 1]. Therefore, after the displacement information is processed based on the weight mask map, the model vertices corresponding to the second parameter do not shift, and for the model vertices of the processed first parameter, the corresponding offset intensity of the model vertices corresponding to the processed first parameter changes smoothly along the surface of the virtual object model.

[0085] Optionally, the displacement information may be processed in combination with the weight mask graph and the time function. That is, in one embodiment, the step of “adjusting the displacement information based on the weight mask graph to obtain the first motion data of the first model vertex” includes:

[0086] Performing displacement amplitude adjustment processing on the displacement information corresponding to the vertex of the first model based on the time function to obtain adjusted displacement information;

[0087] The adjusted displacement information is weighted based on the weight mask graph to obtain first motion data of the first model vertex.

[0088] For example, the displacement of the vertex of the first model can be interpolated based on the time function to obtain processed displacement information, so that the displacement of the vertex of the first model has a periodic change. For example, the time function can be sin(t). The displacement of the vertex of the first model is multiplied by sin(t), and the displacement of the vertex of the first model becomes a periodic sinusoidal change; the time function can be cos(t). The displacement of the vertex of the first model is multiplied by cos(t), and the displacement of the vertex of the first model becomes a periodic cosine change.

[0089] The adjusted displacement information is weighted based on the weight mask map. For example, the weight corresponding to the first model vertex in the weight mask map is multiplied by the adjusted position information to obtain first motion data of the first model vertex. The motion of the first model vertex is controlled based on the first motion data. The motion of the first model vertex not only has periodic changes, but also the motion change from the first model vertex to the second model vertex is smooth, natural and unobtrusive.

[0090] 104. Simulate the movement of the first model vertex driving the second model vertex based on the first motion data to obtain second motion data of the second model vertex.

[0091] Among them, the second motion data may include displacement information of the second model vertex at different times (the displacement information may include the position coordinates of the second model vertex after offset), etc. The first motion data of the first model vertex can be used as a constraint to drive the movement of the second model vertex, and the motion of the second model vertex can be simulated to obtain the second motion data corresponding to the movement of the second model vertex driven by the first model vertex. Based on the second motion data, the second model vertex can be controlled to move with the movement of the first model vertex.

[0092] In one embodiment, a solver such as a dynamic solver, a fluid solver, or a cloth solver can be used to simulate the motion of the vertices of the second model using the first motion data of the vertices of the first model as a constraint to obtain the second motion data of the vertices of the second model.

[0093] Exemplarily, the movement of the vertices of the second model can be solved by Houdini's solving tool Velum, which can be used for cloth simulation. The calculation process of Vellum can be to input the movement data of the vertices of the first model as the constraint force into the solving process of Vellum, and set the virtual object model as a soft body attribute. The Vellum solver calculates the displacement information of the vertices of the second model after the vertices of the first model are pulled and subjected to force, thereby obtaining the second movement data.

[0094] In one embodiment, an internal connection line may be constructed for the virtual object model to generate tension inside the virtual object model so that the deformation of the virtual object model is more realistic, that is, the step of "simulating the first model vertex to drive the second model vertex to move based on the first motion data to obtain the second motion data of the second model vertex" includes:

[0095] Constructing internal connection lines for the virtual object model, wherein the internal connection lines enable mutual pulling forces to exist between the connected multiple model vertices;

[0096] Based on the first motion data and the internal connection lines, it is simulated that the first model vertex drives the second model vertex to move under the action of the internal connection lines, so as to obtain second motion data of the second model vertex.

[0097] For example, internal connection lines may be constructed for the virtual object model, and each internal connection line may connect at least two model vertices, so that at least two model vertices have a pulling force on each other inside the virtual object model.

[0098] In one embodiment, the internal connection lines of the virtual object model can be constructed by using the tetconform tool in Houdini. The internal connection lines established with tetrahedrons can be constructed as follows: Figure 3 As shown, points that are not directly connected on the surface of the virtual object model can be connected inside the model through internal connecting lines, and have mutual pulling force, so that pulling force can be generated inside the virtual object model, rather than only on the surface of the virtual object model. The deformation of the virtual object model has a stronger sense of volume and reality.

[0099] For example, Figure 4 The local part of the virtual object model shown in (1) can be constructed as follows: Figure 4 shown in (2).

[0100] 105. Generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0101] Among them, the deformation animation can be used to control the deformation of the virtual object model, so that the virtual object model appears to be shaking, wriggling, breathing, twitching or twisting, that is, the deformation animation can be a wriggling animation, a shaking animation, etc.

[0102] The first motion data includes displacement information of the first model vertices at different times, and the second motion data includes displacement information of the second model vertices at different times. A deformation animation corresponding to the virtual object model can be generated based on the first motion data and the second motion data.

[0103] Through deformation animation, the virtual object model can be controlled to deform and simulate dynamic effects such as shaking and crawling. In the deformation animation of the virtual object model, the first model vertex produces more intense movement, and the second model vertex is driven by the first model vertex, making the virtual object model have a biological feel.

[0104] As can be seen from the above, the embodiments of the present application obtain a virtual object model; determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model; determine first motion data of the first model vertex according to deformation control information; simulate the movement of the second model vertex driven by the first model vertex based on the first motion data to obtain second motion data of the second model vertex; and generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0105] The embodiments of the present application control the movement of the first model vertex and the second model vertex of the virtual object model in different ways, wherein the movement of the first model vertex is controlled by deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and detailed, and the animation generation effect is good.

[0106] In order to better implement the animation generation method provided in the embodiment of the present application, an animation generation device is also provided in one embodiment. The meanings of the terms are the same as those in the above animation generation method, and the specific implementation details can refer to the description in the method embodiment.

[0107] The animation generating device can be integrated into a computer device, such as Figure 5 As shown, the animation generation device may include: a model acquisition unit 301, a vertex determination unit 302, a data determination unit 303, a motion simulation unit 304 and an animation generation unit 305, which are specifically as follows:

[0108] (1) Model acquisition unit 301, used to acquire a virtual object model.

[0109] (2) A vertex determination unit 302, configured to determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model.

[0110] In one embodiment, the first model vertex is a model vertex that satisfies a specified condition.

[0111] In one embodiment, the specified condition is the model vertex whose normal direction matches the target deformation direction.

[0112] In one embodiment, the vertex determination unit 302 may also be used to:

[0113] Obtaining target vertex directions of model vertices in the virtual object model;

[0114] Determining a target deformation region of the virtual object model according to the target vertex direction and the target deformation direction of the virtual object model;

[0115] The first model vertices are selected from the target deformation region, and the model vertices other than the first model vertices in the virtual object model are used as second model vertices.

[0116] In one embodiment, the vertex determination unit 302 may also be used to:

[0117] Assigning a first parameter to the model vertices in the target deformation region, and assigning a second parameter to the model vertices outside the target deformation region;

[0118] Based on the first parameter and the second parameter, smoothing the first parameter of the model vertex in the target deformation area to obtain a processed first parameter;

[0119] The first model vertices are selected from the target deformation region according to the processed first parameter.

[0120] In one embodiment, the vertex determination unit 302 may also be used to:

[0121] Extracting a target direction component corresponding to the target deformation direction from the direction vector corresponding to the target vertex direction of each model vertex of the virtual object model;

[0122] According to the magnitude relationship between the target direction component and the preset threshold, a target deformation region in which the target direction component corresponding to the model vertices is greater than the preset threshold is determined from the virtual object model.

[0123] (3) A data determination unit 303, used to determine the first motion data of the vertices of the first model according to the deformation control information.

[0124] In one embodiment, the present application provides an animation generation device, which may also include:

[0125] A mask map generating unit, used for generating a weight mask map corresponding to the virtual object model according to the processed first parameter and the second parameter;

[0126] The data determination unit 303 may also be used to:

[0127] Determine the displacement information of the first model vertex of the virtual object model according to the deformation control information;

[0128] The displacement information is adjusted based on the weight mask graph to obtain first motion data of the first model vertex.

[0129] In one embodiment, the data determination unit 303 may also be used to:

[0130] Based on the time function, the displacement information corresponding to the vertices of the first model is adjusted to obtain adjusted displacement information;

[0131] The adjusted displacement information is weighted based on the weight mask map to obtain the first motion data of the first model vertex.

[0132] (4) a motion simulation unit 304, configured to simulate the motion of the first model vertex driving the second model vertex based on the first motion data, and obtain second motion data of the second model vertex.

[0133] In one embodiment, the motion simulation unit 304 may also be used to:

[0134] Constructing internal connection lines for the virtual object model, wherein the internal connection lines enable mutual pulling forces to exist between the connected multiple model vertices;

[0135] Based on the first motion data and the internal connection lines, it is simulated that the first model vertex drives the second model vertex to move under the action of the internal connection lines, so as to obtain second motion data of the second model vertex.

[0136] (5) Animation generation unit 305, used to generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0137] As can be seen from the above, the animation generation device of the embodiment of the present application obtains the virtual object model through the model acquisition unit 301, and the vertex determination unit 302 determines the first model vertex and the second model vertex from the virtual object model according to the target deformation direction of the virtual object model; the data determination unit 303 determines the first motion data of the first model vertex according to the deformation control information, the motion simulation unit 304 simulates the movement of the second model vertex driven by the first model vertex based on the first motion data to obtain the second motion data of the second model vertex, and the animation generation unit 305 generates the deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

[0138] The embodiments of the present application control the movement of the first model vertex and the second model vertex of the virtual object model in different ways, wherein the movement of the first model vertex is controlled by deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and detailed, and the animation generation effect is good.

[0139] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal. Figure 6 As shown, Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. It will be understood by those skilled in the art that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0140] The processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect the various parts of the entire computer device 500, executes various functions of the computer device 500 and processes data by running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the computer device 500 as a whole.

[0141] In the embodiment of the present application, the processor 501 in the computer device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:

[0142] Get the virtual object model;

[0143] determining a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model;

[0144] Determine first motion data of the first model vertex according to the deformation control information; simulate the first model vertex driving the second model vertex to move based on the first motion data to obtain second motion data of the second model vertex;

[0145] A deformation animation corresponding to the virtual object model is generated based on the first motion data and the second motion data.

[0146] The embodiments of the present application control the movement of the first model vertex and the second model vertex of the virtual object model in different ways, wherein the movement of the first model vertex is controlled by deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and detailed, and the animation generation effect is good.

[0147] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0148] Optional, such as Figure 6 As shown, the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. The processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507, respectively. Those skilled in the art can understand that Figure 6 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0149] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of computer equipment, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 503 can also be used as a part of the input unit 506 to realize the input function.

[0150] The radio frequency circuit 504 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.

[0151] The audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data, and then the audio data is output to the processor 501 for processing, and then sent to another computer device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between an external headset and the computer device.

[0152] The input unit 506 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0153] The power supply 507 is used to supply power to various components of the computer device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 507 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0154] although Figure 6 Not shown, the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0155] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0156] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0157] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any animation generation method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0158] Get the virtual object model;

[0159] determining a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model;

[0160] Determine first motion data of the first model vertex according to the deformation control information; simulate the first model vertex driving the second model vertex to move based on the first motion data to obtain second motion data of the second model vertex;

[0161] A deformation animation corresponding to the virtual object model is generated based on the first motion data and the second motion data.

[0162] From the above, it can be seen that the embodiments of the present application control the movement of the first model vertex and the second model vertex of the virtual object model in different ways, wherein the movement of the first model vertex is controlled by deformation control information, and the second model vertex is driven by the first model vertex, so that the generated deformation animation is more vivid and detailed, and the animation generation effect is good.

[0163] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0164] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0165] The above is a detailed introduction to an animation generation method, device, computer equipment and computer storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An animation generation method, characterized in that: include: Get the virtual object model; determining a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model; Determine first motion data of the vertices of the first model according to the deformation control information; Simulate the movement of the first model vertex driving the second model vertex based on the first motion data to obtain second motion data of the second model vertex; A deformation animation corresponding to the virtual object model is generated based on the first motion data and the second motion data.

2. The method according to claim 1, characterized in that The first model vertex is a model vertex that meets a specified condition.

3. The method according to claim 2, characterized in that The specified condition is a model vertex whose normal direction matches the target deformation direction.

4. The method according to claim 1, characterized in that: The determining, from the virtual object model according to the target deformation direction of the virtual object model, a first model vertex and a second model vertex, comprises: Acquire target vertex directions of model vertices in the virtual object model; determining a target deformation region of the virtual object model according to the target vertex direction and the target deformation direction of the virtual object model; First model vertices are screened out from the target deformation region, and model vertices other than the first model vertices in the virtual object model are used as second model vertices.

5. The method according to claim 4, characterized in that The step of determining a target deformation region of the virtual object model according to the target vertex direction and the target deformation direction of the virtual object model comprises: Extracting a target direction component corresponding to the target deformation direction from the direction vector corresponding to the target vertex direction of each model vertex of the virtual object model; According to the magnitude relationship between the target direction component and a preset threshold, a target deformation region in which the target direction component corresponding to the model vertices is greater than the preset threshold is determined from the virtual object model.

6. The method according to claim 4, characterized in that The step of selecting a first model vertex from the target deformation region includes: Assigning first parameters to model vertices in the target deformation region, and assigning second parameters to model vertices outside the target deformation region; Based on the first parameter and the second parameter, smoothing the first parameter of the model vertex in the target deformation area to obtain a processed first parameter; The first model vertices are screened out from the target deformation region according to the processed first parameter.

7. The method according to claim 6, characterized in that Before determining the first motion data of the first model vertex according to the deformation control information, the method includes: Generating a weight mask map corresponding to the virtual object model according to the processed first parameter and the second parameter; The determining the first motion data of the first model vertex according to the deformation control information includes: Determine displacement information of the first model vertex of the virtual object model according to the deformation control information; The displacement information is adjusted based on the weight mask graph to obtain first motion data of the first model vertices.

8. The method according to claim 7, characterized in that The adjusting and processing the displacement information based on the weight mask graph to obtain first motion data of the first model vertex includes: Performing displacement amplitude adjustment processing on the displacement information corresponding to the vertices of the first model based on the time function to obtain adjusted displacement information; The adjusted displacement information is weighted based on the weight mask graph to obtain first motion data of the first model vertex.

9. The method according to any one of claims 1 to 8, characterized in that: The simulating, based on the first motion data, the first model vertex driving the second model vertex to move, to obtain second motion data of the second model vertex, includes: Constructing internal connection lines for the virtual object model, wherein the internal connection lines enable mutual pulling forces to exist between the connected multiple model vertices; Based on the first motion data and the internal connection lines, it is simulated that the first model vertex drives the second model vertex to move under the action of the internal connection lines, so as to obtain second motion data of the second model vertex.

10. An animation generating device, characterized in that: include: A model acquisition unit, used for acquiring a virtual object model; a vertex determination unit, configured to determine a first model vertex and a second model vertex from the virtual object model according to a target deformation direction of the virtual object model; a data determining unit, configured to determine first motion data of the vertices of the first model according to the deformation control information; A motion simulation unit, configured to simulate, based on the first motion data, the movement of the first model vertex driving the second model vertex to obtain second motion data of the second model vertex; The animation generating unit is used to generate a deformation animation corresponding to the virtual object model based on the first motion data and the second motion data.

11. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the animation generation method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the animation generation method according to any one of claims 1 to 9.