Model effect control parameter generation method and device, storage medium and computer equipment
By generating model effect control parameters and wind field animation methods, the effect control parameters of the model vertex are automatically generated, and the vertex displacement is calculated based on wind field information, which solves the problem of single wind field animation effects in the existing technology, and achieves a more realistic and diverse wind Scene animation performance.
Patent Information
- Application Number
- CN202310833853.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art has a single effect when simulating wind blowing plants and leaves, and it is difficult to effectively simulate diverse wind field animation effects.
By generating model effect control parameters, determine the control reference path, basic control parameters and effect gradient parameters of the target vertex, automatically generate the effect control parameters of each vertex of the model, calculate the vertex displacement based on wind field information, and generate wind field animation.
The generation efficiency of effect control parameters and model performance are improved, and a more realistic and diverse wind field animation performance is achieved.
Smart Images

Figure CN119273819A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of animation technology, and in particular to a method and device for generating model effect control parameters, a storage medium, and a computer device. Background Art
[0002] In order to improve the game graphics, some dynamic elements are often set in the game to make the game more vivid. For example, there are usually many virtual plants in the game scene. In order to improve the sense of reality, some games use sine functions to simply disturb and bend the model vertices to create the illusion that the plants are blown by the wind. However, this method can only simulate the disturbance effect of branches and leaves, which is relatively simple and not realistic enough. Summary of the invention
[0003] In view of this, the present application provides a method and device for generating model effect control parameters, a storage medium, and a computer device, which can automatically generate effect control parameters corresponding to each vertex of the model according to user needs, thereby improving the generation efficiency of the effect control parameters and the model performance effect.
[0004] According to one aspect of the present application, a method for generating a model effect control parameter is provided, wherein the method comprises:
[0005] Determine at least one target vertex based on the target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a starting point and an end point;
[0006] Determining a target parameter determination mode, and determining a basic control parameter of the target vertex based on the target parameter determination mode and the control reference path;
[0007] Determine the effect gradient parameter corresponding to the target vertex;
[0008] The effect control parameter of the target vertex is generated according to the effect gradient parameter and the basic control parameter.
[0009] According to another aspect of the present application, a method for generating a wind field animation is provided, comprising:
[0010] Obtaining axis point information, effect control parameters corresponding to each target vertex in the target model, and wind field information of the wind field where the target model is located, wherein the effect control parameters are determined by the above-mentioned method for generating model effect control parameters;
[0011] Calculating the vertex displacement of the target vertex according to the axis point information, the wind field information and the effect control parameter, and determining a target model after displacement based on the vertex displacement;
[0012] Based on the initial target model and the displaced target model, a wind field animation of the target model is generated.
[0013] According to another aspect of the present application, a device for generating a model effect control parameter is provided, the device comprising:
[0014] A reference path determination module, used to determine at least one target vertex based on the target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a starting point and an end point;
[0015] A basic parameter determination module, used to determine a target parameter determination mode, and determine a basic control parameter of the target vertex based on the target parameter determination mode and the control reference path;
[0016] A gradient parameter determination module, used to determine the effect gradient parameter corresponding to the target vertex;
[0017] A control parameter generation module is used to generate the effect control parameter of the target vertex according to the effect gradient parameter and the basic control parameter.
[0018] According to another aspect of the present application, a wind field animation generating device is provided, comprising:
[0019] An acquisition module, used to acquire the axis point information, effect control parameters corresponding to each target vertex in the target model and the wind field information of the wind field where the target model is located, wherein the effect control parameters are determined by the above-mentioned model effect control parameter generation device;
[0020] A displacement calculation module, used to calculate the vertex displacement of the target vertex according to the axis point information, the wind field information and the effect control parameter, and determine the displaced target model based on the vertex displacement;
[0021] An animation generation module, used to generate a wind field animation of the target model based on the initial target model and the target model after displacement
[0022] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for generating the above-mentioned model effect control parameters is implemented.
[0023] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned wind field animation generation method is implemented.
[0024] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned method for generating model effect control parameters when executing the program.
[0025] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned wind field animation generation method when executing the program.
[0026] Through the above-mentioned technical scheme, the present application provides a method and device for generating model effect control parameters, a storage medium, and a computer device, which can determine the mode and effect gradient parameters according to the target parameters specified by the user, and automatically generate the effect control parameters of each vertex of the model, thereby automating and standardizing the generation process and greatly speeding up the generation efficiency.
[0027] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0029] FIG. 1( a ) is a schematic diagram showing a flow chart of a method for generating model effect control parameters provided in an embodiment of the present application;
[0030] FIG1( b ) shows a schematic diagram of a basic control parameter calculation provided by an embodiment of the present application;
[0031] FIG1( c ) shows a schematic diagram of a gradient curve provided in an embodiment of the present application;
[0032] FIG1( d ) shows a schematic diagram of the use of an auxiliary model provided in an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a flow chart of a method for generating a wind field animation provided in an embodiment of the present application is shown;
[0034] Figure 3 A schematic diagram of the structure of a device for generating model effect control parameters provided in an embodiment of the present application is shown;
[0035] Figure 4A schematic diagram of the structure of a wind field animation generating device provided in an embodiment of the present application is shown;
[0036] Figure 5 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0037] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0038] In this embodiment, a method for generating model effect control parameters is provided, as shown in FIG1( a ), the method comprising:
[0039] Step 101: determine at least one target vertex based on a target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a start point and an end point.
[0040] At present, some games simulate the rotation and scaling of objects by setting pivot points, so as to achieve the performance of plants in real wind fields. However, the wind field effect achieved by using pivot points is relatively simple. For example, for a single element (such as a leaf), the existing solution has the same rotation and scaling effects for each vertex on a leaf.
[0041] The embodiment of the present application is used to generate an effect control parameter mask for each vertex on the model to solve the problem of unrealistic animation caused by the deviation of the pivot setting. Specifically, it can be implemented based on a tool that can perform visual operations. The tool batch calculates the effect control parameters of all or part of the vertices contained in the model. The effect control parameters mentioned in the embodiment of the present application are specifically parameters that affect the vertex position of the model. Taking the wind field effect as an example, the effect control parameter is used to control the range of the wind field effect and the local effect change within the range. The smaller the parameter value, the smaller the influence of the wind field on the vertex displacement of the model. When the effect control parameter of a vertex is 0, the wind field has no effect on the vertex.
[0042] First, determine the target vertices in the target model that need to be controlled by the effect. The target vertices can be all the vertices of the model or some of the vertices. Then, determine the control reference path that needs to be referred to when calculating the effect control parameters for the target vertices. The control reference path can be specifically composed of two reference points, one is the starting point and the other is the end point.
[0043] Optionally, determining the control reference path corresponding to the target vertex includes: determining a starting point set and an ending point set, wherein the starting point set includes at least one candidate starting point and the ending point set includes at least one candidate ending point; determining a target path determination mode; determining the control reference path corresponding to the target vertex based on the starting point set, the ending point set and the target path determination mode.
[0044] In this embodiment, the operator can select candidate starting points and candidate ending points in batches and manually select the target path determination mode, or the tool can automatically match the corresponding target path determination mode according to the type of the target model. Further, according to the target path determination mode, the starting point and the ending point corresponding to each target vertex are determined to form a control reference path for the target vertex.
[0045] Step 102: determine a target parameter determination mode, and determine basic control parameters of the target vertex based on the target parameter determination mode and the control reference path.
[0046] Next, after determining the target vertex for which effect control parameters need to be calculated, and the control reference path that needs to be referred to when performing the calculation, the basic control parameters of the target vertex are calculated according to the target parameter determination mode selected by the operator or automatically matched by the tool. The basic control parameters can be directly used as the effect control parameters of the target vertex, or they can be adjusted on this basis.
[0047] The embodiment of the present application provides two optional parameter determination modes: a straight mode and a radial mode. Optionally, step 102 includes:
[0048] Step 102-1, when the target parameter determination mode is the straight mode, establish a plane containing the starting point and perpendicular to the control reference path, determine the vertical distance from the target vertex to the plane, and determine the basic control parameters of the target vertex based on the ratio of the vertical distance to the path length of the control reference path.
[0049] As shown in Figure 1(b), in the straight mode, for any target vertex, based on the control reference path corresponding to the target vertex, a vector line segment A is made from the starting point (i.e., the initial point in the figure) to the end point, and a spatially parallel vector line segment B is made with the target vertex as the end point. The starting point of line segment B is located in the same plane as the starting point of line segment A, and the plane is perpendicular to the space of vector line segment A. The vector length ratio of line segment B to line segment A is used as the basis for drawing the mask, i.e., the basic control parameter. If the ratio is equal to or less than 0 (the vector direction is opposite), the mask value is set to 0; if the ratio is between 0 and 1, the mask value remains consistent with the ratio; if the ratio is equal to or greater than 1, the mask value is set to 1.
[0050] Step 102-2, when the target parameter determination mode is the radial mode, determine the straight-line distance from the target vertex to the starting point, and determine the basic control parameter of the target vertex based on the ratio of the straight-line distance to the path length of the control reference path.
[0051] In radial mode, for any target vertex, based on the control reference path corresponding to the target vertex, the distance from the end point to the starting point is taken as the radius R, and the length from the target vertex to the starting point is L. The ratio of L to R is used as the basis for drawing the Mask. If the ratio is equal to 0, the mask value is set to 0; if the ratio is between 0 and 1, the mask value remains consistent with the ratio; if the ratio is equal to 1 or greater than 1, the mask value is set to 1.
[0052] Step 103: determine the effect gradient parameter corresponding to the target vertex.
[0053] Step 104: Generate the effect control parameter of the target vertex according to the effect gradient parameter and the basic control parameter.
[0054] Finally, the effect gradient parameters can be used to adjust the basic control parameters calculated above to make the animation effect of the model more in line with expectations. A variety of effect gradient parameters can be set. As shown in Figure 1(c), the effect gradient parameters are presented in a gradient curve, and the gradient curve is used to characterize the correspondence between the basic control parameters and the effect gradient parameters. For example, gradient curve three can be used to calculate the effect control parameters of the model vertices of the snake model. After calculating the basic control parameters of each target vertex, the effect gradient parameters corresponding to the basic control parameters are obtained in the effect gradient curve, and then the basic control parameters are further optimized and adjusted using the effect gradient parameters, such as multiplying the effect gradient parameters with the basic control parameters to obtain the vertex effect control parameters of the final target vertex. The vertex effect control parameters can be stored in the alpha channel of the model vertex.
[0055] By applying the technical solution of this embodiment, it is possible to determine the mode and effect gradient parameters according to the target parameters required by the user, automatically generate the effect control parameters of each vertex of the model, automate and standardize the generation process, and greatly speed up the generation efficiency.
[0056] In an embodiment of the present application, multiple modes for determining control reference paths are provided. Optionally, when the target path determination mode is a model unique path mode, a unified control reference path corresponding to each target vertex on the target model is determined based on the center starting point corresponding to the candidate starting point and the center ending point corresponding to the candidate ending point.
[0057] In the model unique path mode, each target vertex on the target model adopts a unified control reference path. The starting point in the unified control reference path is the central starting point corresponding to each candidate starting point. The central starting point can be the center of all candidate starting points or the candidate starting point closest to the center. Similarly, the end point in the unified control reference path is the central end point corresponding to each candidate end point. The central end point can be the center of all candidate end points or the candidate end point closest to the center.
[0058] Optionally, when the target path determination mode is the element unique path mode, the target vertex groups are divided based on the model elements where the target vertices are located; for any target vertex group, the candidate starting point among the candidate starting points that is closest to the target vertex group is obtained as the first starting point, and the candidate ending point among the candidate ending points that is closest to the target vertex group is obtained as the first ending point, and based on the first starting point and the first ending point, the control reference path of each target vertex in the target vertex group is determined.
[0059] In the element unique path mode, first, according to the model element to which each target vertex belongs, the target vertices belonging to the same model element are divided into a group to form different target vertex groups. Subsequently, a control reference path is determined for each target vertex group, and the target vertices in the group adopt a unified control reference path. Among them, for a model, a model can be an element, and a model can also be divided into multiple elements. Whether to divide the model into multiple elements depends on whether the parts of the model are relatively independent. For example, a tree model can include multiple branch elements. For any target vertex group, the distance between each target vertex in the group and each candidate starting point is calculated, and a pair of target vertices and candidate starting points with the smallest distance is determined. The candidate starting point with the smallest distance is used as the first starting point, and the first starting point is the starting point in the control reference path corresponding to this target vertex group. Similarly, the distance between each target vertex in the group and each candidate ending point is calculated, and a pair of target vertices and candidate ending points with the smallest distance is determined. The candidate ending point with the smallest distance is used as the first ending point, and the first ending point is the ending point in the control reference path corresponding to this target vertex group. At this point, a control reference path can be formed according to the starting point and the end point corresponding to the target vertex group, and this control reference path serves as the control reference path of all target vertices in the target vertex group.
[0060] Optionally, when the target path determination mode is the element initial filling mode, the target vertex groups are divided based on the model elements where the target vertices are located; then for any target vertex group, the vertex in the target vertex group that is closest to the candidate starting point is obtained as the second starting point, and the candidate ending point in the candidate ending point that is closest to the target vertex group is obtained as the second ending point, and based on the second starting point and the second ending point, the control reference path of each target vertex in the target vertex group is determined.
[0061] In the element initial filling mode, the target vertices belonging to the same model element share a control reference path. The target vertex groups are first divided according to the model elements to which the target vertices belong. Then, the second starting point is obtained in the target vertex group to complete the filling of the candidate starting points. Specifically, the distance between each target vertex in the group and each candidate starting point is calculated, and a pair of target vertices and candidate starting points with the smallest distance is determined. The target vertex with the smallest distance is used as the second starting point, and the second starting point is the starting point in the control reference path corresponding to this target vertex group. As for the second end point in the control reference path, the same method as that used in the element unique path mode is used to calculate the end point, that is, the distance between each target vertex in the group and each candidate end point is calculated, and a pair of target vertices and candidate end points with the smallest distance is determined. The candidate end point with the smallest distance is used as the second end point, and the second end point is the end point in the control reference path corresponding to this target vertex group.
[0062] Optionally, when the target path determination mode is the element end fill mode, for any target vertex group, the vertex in the target vertex group that is closest to the candidate end point is obtained as the third end point, and the candidate starting point in the candidate starting point that is closest to the target vertex group is obtained as the third starting point, and based on the third starting point and the third end point, the control reference path of each target vertex in the target vertex group is determined.
[0063] In the element end filling mode, the target vertices belonging to the same model element share a control reference path. The target vertex groups are first divided according to the model elements to which the target vertices belong. Then, the third end point is obtained in the target vertex group to complete the filling of the candidate end points. Specifically, the distance between each target vertex in the group and each candidate end point is calculated, and a pair of target vertices and candidate end points with the smallest distance is determined. The target vertex with the smallest distance is used as the third end point, and the third end point is the end point in the control reference path corresponding to this target vertex group. As for the third starting point in the control reference path, the method of calculating the end point in the element unique path mode is adopted, that is, the distance between each target vertex in the group and each candidate starting point is calculated, and a pair of target vertices and candidate starting points with the smallest distance is determined. The candidate starting point with the smallest distance is used as the third starting point, and the third starting point is the end point in the control reference path corresponding to this target vertex group.
[0064] Optionally, when the target path determination mode is the element full fill mode, for any target vertex group, the vertex in the target vertex group that is closest to the candidate starting point is obtained as the fourth starting point, and the vertex in the target vertex group that is closest to the candidate ending point is obtained as the fourth ending point, and based on the fourth starting point and the fourth ending point, the control reference path of each target vertex in the target vertex group is determined.
[0065] In the element full fill mode, the target vertices belonging to the same model element share a control reference path. The target vertex groups are first divided according to the model elements to which the target vertices belong. Then, the fourth starting point and the fourth ending point are obtained in the target vertex group to complete the full filling of the candidate starting points and the candidate ending points. Specifically, the distance between each target vertex in the group and each candidate starting point is calculated, and a pair of target vertices and candidate starting points with the smallest distance is determined. The target vertex with the smallest distance is used as the fourth starting point, and the fourth starting point is the starting point in the control reference path corresponding to this target vertex group. Similarly, the distance between each target vertex in the group and each candidate ending point is calculated, and a pair of target vertices and candidate ending points with the smallest distance is determined. The target vertex with the smallest distance is used as the fourth ending point, and the fourth ending point is the ending point in the control reference path corresponding to this target vertex group.
[0066] In an embodiment of the present application, the starting point and the ending point can be determined in batches. Optionally, the determination of the starting point set and the ending point set includes: selecting an editable auxiliary model, and using the auxiliary model to cover at least a portion of the target model, wherein the auxiliary model includes at least one preset point; in response to a truncation instruction for the auxiliary model, truncating the auxiliary model, and obtaining the preset points on the truncated auxiliary model as the candidate ending points to constitute the ending point set; based on the selection data of at least some of the vertices on the target model, determining the candidate starting points to constitute the starting point set. Similarly, the preset points on the auxiliary model can be used as candidate starting points to constitute the starting point set, and at least some of the vertices on the target model can be selected as ending points to constitute the ending point set.
[0067] In this embodiment, as shown in FIG1(d), an auxiliary model can be used to determine the candidate end point. Taking the target model as a vegetation model as an example, the auxiliary model can be a spherical model. Since the grass is relatively messy and the leaf tips are not uniform, a hemisphere is used as an auxiliary object: a new sphere is created to wrap the vegetation model, the ball is given a suitable segment, and a suitable latitude line is selected for segmentation. After the segmentation is completed, the lower half is deleted and the model is adjusted to a suitable size and position. The point formed at the intersection of the longitude and latitude lines on the spherical model is used as a candidate end point to form an end point set. The root vertex of the vegetation model is selected as a candidate starting point to form a starting point set.
[0068] In an embodiment of the present application, optionally, the method also includes: determining a target calculation axis of the control reference path, wherein the target calculation axis is at least two of the X, Y, and Z coordinate axes, and the coordinate axis data that does not belong to the target calculation axis does not participate in the calculation of basic control parameters.
[0069] In this embodiment, when calculating the basic control parameters, it is defaulted that both XYZ axes participate in the calculation, which can be determined based on the target calculation axis selected by the operator. The operator can also select at least two of the XYZ coordinate axes as the target calculation axes (XYZ, XY, XZ, YZ) according to needs. The selected target calculation axes participate in the calculation of the basic control parameters, and the unselected target calculation axes are ignored in the calculation process of the basic control parameters.
[0070] Furthermore, the present application also provides a method for generating a wind field animation, such as Figure 2 As shown, the method includes:
[0071] Step 201 : obtaining axis point information, effect control parameters corresponding to each target vertex in the target model and wind field information of the wind field where the target model is located.
[0072] Step 202: Calculate the vertex displacement of the target vertex according to the axis point information, the wind field information and the effect control parameter, and determine the displaced target model based on the vertex displacement.
[0073] Step 203: Generate a wind field animation of the target model based on the initial target model and the displaced target model.
[0074] In this embodiment, the effect control parameters can be obtained using the method described above, and the implementation process of the wind field animation is as follows:
[0075] 1) Obtain the pivot point data of the model in the wind field;
[0076] 2) Obtaining effect control parameters (mask data), which are used to control the range of wind farm effects and local effect changes within the range. The mask data can be determined by the above method;
[0077] 3) Obtain wind field information. Wind field information is generally customized by art production personnel in the wind field system of the game engine. Wind field information includes wind field intensity, wind field direction, eye distance, and periodic change information of wind field, etc.;
[0078] 4) Calculate the displacement of the corresponding vertex of the model according to the wind field information, pivot data, and mask data. In simple terms, the displacement of the vertex can be calculated according to the existing method (using wind field information and pivot data), and then the effect control parameter mask is superimposed to determine the final displacement of the vertex;
[0079] 5) Determine the target model after displacement according to the generated final displacement, and interpolate the intermediate model according to the positions of the corresponding vertices of the initial model and the target model. Render the initial model, the intermediate model and the target model in sequence to obtain the wind field animation.
[0080] By applying the technical solution of this embodiment, the wind field effect defects caused by the misalignment of the pivot and the vertex can be corrected through mask information, and a variety of local effect adjustments can be achieved.
[0081] Further, as a specific implementation of the method of FIG. 1 , the present application embodiment provides a device for generating model effect control parameters, such as Figure 3 As shown, the device comprises:
[0082] A reference path determination module, used to determine at least one target vertex based on the target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a starting point and an end point;
[0083] A basic parameter determination module, used to determine a target parameter determination mode, and determine a basic control parameter of the target vertex based on the target parameter determination mode and the control reference path;
[0084] A gradient parameter determination module, used to determine the effect gradient parameter corresponding to the target vertex;
[0085] A control parameter generation module is used to generate the effect control parameter of the target vertex according to the effect gradient parameter and the basic control parameter.
[0086] Optionally, the basic parameter determination module is further used to:
[0087] When the target parameter determination mode is the straight mode, a plane is established that includes the starting point and is perpendicular to the control reference path, a vertical distance from the target vertex to the plane is determined, and a basic control parameter of the target vertex is determined according to a ratio of the vertical distance to the path length of the control reference path;
[0088] When the target parameter determination mode is the radial mode, the straight-line distance from the target vertex to the starting point is determined, and the basic control parameter of the target vertex is determined according to the ratio of the straight-line distance to the path length of the control reference path.
[0089] Optionally, the reference path determination module is further used to:
[0090] Determine a starting point set and an ending point set, wherein the starting point set includes at least one candidate starting point, and the ending point set includes at least one candidate ending point;
[0091] Determine the target path determination mode;
[0092] A control reference path corresponding to the target vertex is determined according to the starting point set, the ending point set and the target path determination mode.
[0093] Optionally, the reference path determination module is further used to:
[0094] When the target path determination mode is the model unique path mode, a unified control reference path corresponding to each target vertex on the target model is determined based on the central starting point corresponding to the candidate starting point and the central ending point corresponding to the candidate ending point;
[0095] When the target path determination mode is the element unique path mode, the target vertex groups are divided based on the model elements where the target vertices are located; for any target vertex group, the candidate starting point closest to the target vertex group among the candidate starting points is obtained as the first starting point, the candidate ending point closest to the target vertex group among the candidate ending points is obtained as the first ending point, and the control reference path of each target vertex in the target vertex group is determined based on the first starting point and the first ending point;
[0096] When the target path determination mode is the element initial filling mode, the target vertex groups are divided based on the model elements where the target vertices are located; then for any target vertex group, the vertex in the target vertex group closest to the candidate starting point is obtained as the second starting point, the candidate ending point in the candidate ending point closest to the target vertex group is obtained as the second ending point, and the control reference path of each target vertex in the target vertex group is determined based on the second starting point and the second ending point;
[0097] When the target path determination mode is the element end filling mode, for any target vertex group, the vertex closest to the candidate end point in the target vertex group is obtained as the third end point, the candidate start point closest to the target vertex group in the candidate start points is obtained as the third start point, and based on the third start point and the third end point, the control reference path of each target vertex in the target vertex group is determined;
[0098] When the target path determination mode is the element full fill mode, for any target vertex group, the vertex in the target vertex group that is closest to the candidate starting point is obtained as the fourth starting point, and the vertex in the target vertex group that is closest to the candidate ending point is obtained as the fourth ending point, and based on the fourth starting point and the fourth ending point, the control reference path of each target vertex in the target vertex group is determined.
[0099] Optionally, the reference path determination module is further used to:
[0100] Selecting an editable auxiliary model, and using the auxiliary model to cover at least a portion of the target model, wherein the auxiliary model includes at least one preset point;
[0101] In response to a truncation instruction for the auxiliary model, the auxiliary model is truncated, and preset points on the truncated auxiliary model are obtained as the candidate end points to form the end point set;
[0102] Based on the selection data of at least part of the vertices on the target model, the candidate starting points are determined to form the starting point set.
[0103] Optionally, the effect gradual change parameter is presented as a gradual change curve, and the gradual change curve is used to characterize the corresponding relationship between the basic control parameter and the effect gradual change parameter.
[0104] Optionally, the device also includes: a calculation axis determination module, used to determine the target calculation axis of the control reference path, wherein the target calculation axis is at least two of the X, Y, and Z coordinate axes, and the coordinate axis data that does not belong to the target calculation axis does not participate in the calculation of basic control parameters.
[0105] Further, as Figure 2 The specific implementation of the method, the embodiment of the present application provides a wind field animation generation device, such as Figure 4 As shown, the device comprises:
[0106] An acquisition module, used to acquire the axis point information, effect control parameters corresponding to each target vertex in the target model and the wind field information of the wind field where the target model is located, wherein the effect control parameters are determined by the above-mentioned model effect control parameter generation device;
[0107] A displacement calculation module, used to calculate the vertex displacement of the target vertex according to the axis point information, the wind field information and the effect control parameter, and determine the displaced target model based on the vertex displacement;
[0108] The animation generation module is used to generate a wind field animation of the target model based on the initial target model and the displaced target model.
[0109] It should be noted that for other corresponding descriptions of the functional units involved in the device for generating model effect control parameters provided in the embodiment of the present application, reference can be made to the corresponding descriptions in the method of FIG. 1 , which will not be repeated here. Figure 2 The corresponding description in the method will not be repeated here.
[0110] Those skilled in the art should understand that the device for generating the above-mentioned model effect control parameters can be used as a part of the wind field animation generating device, or only provide corresponding effect control parameters therefor. The effect control parameters can also be generated / provided by other methods or devices, which is not a limitation of the present invention.
[0111] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 5As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in the various method embodiments described above are implemented.
[0112] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the method embodiments described above are implemented.
[0114] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0117] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating model effect control parameters, characterized in that: The method comprises: Determine at least one target vertex based on the target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a starting point and an end point; Determining a target parameter determination mode, and determining a basic control parameter of the target vertex based on the target parameter determination mode and the control reference path; Determine the effect gradient parameter corresponding to the target vertex; The effect control parameter of the target vertex is generated according to the effect gradient parameter and the basic control parameter.
2. The method according to claim 1, characterized in that: The determining the basic control parameter of the target vertex based on the target parameter determination mode and the control reference path includes: When the target parameter determination mode is the straight mode, a plane is established that includes the starting point and is perpendicular to the control reference path, a vertical distance from the target vertex to the plane is determined, and a basic control parameter of the target vertex is determined according to a ratio of the vertical distance to the path length of the control reference path; When the target parameter determination mode is the radial mode, the straight-line distance from the target vertex to the starting point is determined, and the basic control parameter of the target vertex is determined according to the ratio of the straight-line distance to the path length of the control reference path.
3. The method according to claim 1, characterized in that The determining of the control reference path corresponding to the target vertex includes: Determine a starting point set and an ending point set, wherein the starting point set includes at least one candidate starting point, and the ending point set includes at least one candidate ending point; Determine the target path determination mode; A control reference path corresponding to the target vertex is determined according to the starting point set, the ending point set and the target path determination mode.
4. The method according to claim 3, characterized in that Determining a control reference path corresponding to the target vertex according to the starting point set, the ending point set, and the target path determination mode includes: When the target path determination mode is the model unique path mode, a unified control reference path corresponding to each target vertex on the target model is determined based on the central starting point corresponding to the candidate starting point and the central ending point corresponding to the candidate ending point; When the target path determination mode is the element unique path mode, the target vertex groups are divided based on the model elements where the target vertices are located; for any target vertex group, the candidate starting point closest to the target vertex group among the candidate starting points is obtained as the first starting point, the candidate ending point closest to the target vertex group among the candidate ending points is obtained as the first ending point, and the control reference path of each target vertex in the target vertex group is determined based on the first starting point and the first ending point; When the target path determination mode is the element initial filling mode, the target vertex groups are divided based on the model elements where the target vertices are located; then for any target vertex group, the vertex in the target vertex group closest to the candidate starting point is obtained as the second starting point, the candidate ending point in the candidate ending point closest to the target vertex group is obtained as the second ending point, and the control reference path of each target vertex in the target vertex group is determined based on the second starting point and the second ending point; When the target path determination mode is the element end filling mode, for any target vertex group, the vertex closest to the candidate end point in the target vertex group is obtained as the third end point, the candidate start point closest to the target vertex group in the candidate start points is obtained as the third start point, and based on the third start point and the third end point, the control reference path of each target vertex in the target vertex group is determined; When the target path determination mode is the element full fill mode, for any target vertex group, the vertex in the target vertex group that is closest to the candidate starting point is obtained as the fourth starting point, and the vertex in the target vertex group that is closest to the candidate ending point is obtained as the fourth ending point, and based on the fourth starting point and the fourth ending point, the control reference path of each target vertex in the target vertex group is determined.
5. The method according to claim 3, characterized in that: The determining of the starting point set and the ending point set includes: Selecting an editable auxiliary model, and using the auxiliary model to cover at least a portion of the target model, wherein the auxiliary model includes at least one preset point; In response to a truncation instruction for the auxiliary model, the auxiliary model is truncated, and preset points on the truncated auxiliary model are obtained as the candidate end points to form the end point set; Based on the selection data of at least part of the vertices on the target model, the candidate starting points are determined to form the starting point set.
6. The method according to claim 1, characterized in that The effect gradient parameter is presented as a gradient curve, and the gradient curve is used to characterize the corresponding relationship between the basic control parameter and the effect gradient parameter.
7. The method according to claim 1, characterized in that Before generating the effect control parameter of the target vertex according to the effect gradient parameter and the basic control parameter, the method further includes: Determine a target calculation axis of the control reference path, wherein the target calculation axis is at least two of the X, Y, and Z coordinate axes, and coordinate axis data that does not belong to the target calculation axis does not participate in the calculation of the effect control parameter.
8. A method for generating a wind field animation, characterized in that: include: Obtaining axis point information, effect control parameters corresponding to each target vertex in the target model, and wind field information of the wind field where the target model is located, wherein the effect control parameters are determined by the method according to any one of claims 1 to 7; Calculating the vertex displacement of the target vertex according to the axis point information, the wind field information and the effect control parameter, and determining a target model after displacement based on the vertex displacement; Based on the initial target model and the displaced target model, a wind field animation of the target model is generated.
9. A device for generating model effect control parameters, characterized in that: The device comprises: A reference path determination module, used to determine at least one target vertex based on the target model, and determine a control reference path corresponding to the target vertex, wherein the control reference path includes a starting point and an end point; A basic parameter determination module, used to determine a target parameter determination mode, and determine a basic control parameter of the target vertex based on the target parameter determination mode and the control reference path; A gradient parameter determination module, used to determine the effect gradient parameter corresponding to the target vertex; A control parameter generation module is used to generate the effect control parameter of the target vertex according to the effect gradient parameter and the basic control parameter.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
