Plant growth animation generation method and device, electronic equipment and storage medium

By generating target curves and plant models in three-dimensional space and controlling the display position of model vertices using reference growth parameters, the high complexity of plant growth animation production in existing technologies is solved, achieving efficient animation generation and precise control.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies are cumbersome, time-consuming, and labor-intensive when producing large-scale plant growth animations, resulting in low production efficiency.

Method used

By determining the target curve and curve node positions in three-dimensional space, a plant model is generated, and the display position of the model vertices is controlled by the change of reference growth parameters over time, thereby realizing the automated generation of plant growth animation.

Benefits of technology

It simplifies the animation production process, improves the production efficiency of plant growth animation, and enables precise control of the overall plant growth animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089901A_ABST
    Figure CN122089901A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, electronic device, and storage medium for generating plant growth animations. The method involves: determining a target curve and the target node position of the curve nodes; determining the path value of the curve nodes; determining the target growth parameters of the curve nodes based on the path value; the path value indicating the distance between the curve node and the starting node of the target curve; generating a plant model based on the target curve; the model vertices in the plant model corresponding to the curve nodes, with preset target vertex positions for each model vertex; obtaining preset reference growth parameters; and, based on the relationship between the target growth parameters of the curve nodes and the reference growth parameters as the reference growth parameters change over time, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the corresponding model vertex; and displaying the plant model at the display position to obtain the animation effect of the plant model. This method improves the production efficiency of plant growth animations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of animation generation technology, and in particular to a method, apparatus, electronic device, and storage medium for generating plant growth animation. Background Technology

[0002] In related technologies, when producing large-scale plant growth animations, it is common practice to use skeletal rigging technology to individually bind animation bones to each branch, then manually adjust the bone posture frame by frame to match the growth pattern. Additionally, custom deformer programs need to be written to achieve the visual effect of plants growing from nothing. This method is cumbersome, time-consuming, and requires significant manpower, resulting in low production efficiency. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, apparatus, electronic device and storage medium for generating plant growth animation, so as to improve the efficiency of animation production.

[0004] In a first aspect, embodiments of the present invention provide a method for generating plant growth animation. The method includes: determining a target curve in three-dimensional space and the target node position of a curve node on the target curve; determining the path value of the curve node, and determining the target growth parameter of the curve node based on the path value; wherein the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; generating a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; obtaining preset reference growth parameters, wherein the reference growth parameters change over time; during the process of the reference growth parameters changing over time, based on the relationship between the target growth parameters of the curve node and the reference growth parameters, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, displaying the plant model at the display position, and obtaining the animation effect of the plant model.

[0005] Secondly, embodiments of the present invention also provide a plant growth animation generation apparatus, the apparatus comprising: a first determining module, configured to determine a target curve in three-dimensional space and the target node position of a curve node on the target curve; a second determining module, configured to determine the path value of the curve node and, based on the path value, determine the target growth parameter of the curve node; wherein the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; a first generating module, configured to generate a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; a first acquiring module, configured to acquire preset reference growth parameters, wherein the reference growth parameters change over time; and a first display module, configured to, during the process of the reference growth parameters changing over time, determine the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node from the relationship between the target growth parameter of the curve node and the reference growth parameter, and display the plant model at the display position to obtain the animation effect of the plant model.

[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for generating plant growth animations.

[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for generating plant growth animations.

[0008] The embodiments of the present invention bring the following beneficial effects: This invention provides a method, apparatus, electronic device, and storage medium for generating plant growth animation. The method includes: determining a target curve in three-dimensional space and the target node positions of curve nodes on the target curve; determining the path values ​​of the curve nodes, and determining the target growth parameters of the curve nodes based on the path values; wherein the path values ​​are used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; generating a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; obtaining preset reference growth parameters, wherein the reference growth parameters change over time; during the process of the reference growth parameters changing over time, based on the relationship between the target growth parameters of the curve nodes and the reference growth parameters, determining the display position of the model vertex corresponding to the curve node from the target node positions of the curve nodes and the target vertex positions of the model vertices corresponding to the curve nodes, and displaying the plant model at the display position to obtain the animation effect of the plant model.

[0009] In this method, the target curve for constructing the plant model is first determined, and the target growth parameters of each curve node are determined based on the distance between each curve node and the starting node of the target curve. Then, the target curve is meshed to generate the plant model. The model vertices of the plant model correspond to the curve nodes; that is, multiple model vertices correspond to one curve node, and each model vertex has a preset target vertex position in the plant model. Next, preset reference growth parameters are obtained. Based on the relationship between the target growth parameters and the reference growth parameters of each curve node on the target curve, the display position of the model vertex corresponding to each curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position. Specifically, when the display positions of multiple model vertices corresponding to a curve node are located at the target node position of the curve node, that is, multiple model vertices are all displayed at the same target node position, the model content corresponding to these multiple model vertices is not visible. When the display positions of multiple model vertices corresponding to a curve node are located at their respective preset target vertex positions, the model content formed by these multiple model vertices is displayed in three-dimensional space. Finally, as the reference growth parameters change dynamically over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0010] This method relies on a procedural production process to efficiently generate target curves and plant models. By simply adjusting the reference growth parameters, precise control of the overall plant growth animation can be achieved. The process is simple and controllable, greatly reducing the operational complexity of animation production and significantly improving the production efficiency of plant growth animation.

[0011] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0013] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1A flowchart for generating a plant growth animation provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the effect of a plant growth animation provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the effect of updating the length of the first curve according to an embodiment of the present invention. Figure 4 This is a schematic diagram illustrating the effect of a first target curve provided in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the effect of another first target curve provided in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the effect of another first target curve provided in an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating the effect of a vine plant model provided in an embodiment of the present invention; Figure 8 A schematic diagram of a plant growth animation generation device provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] Based on this, the present invention provides a method, apparatus, electronic device and storage medium for generating plant growth animations, which can be applied to the production of growth animations for vines and other types of plants.

[0017] To facilitate understanding of this embodiment, a method for generating plant growth animation disclosed in this invention will first be described in detail, such as... Figure 1 As shown, this method includes the following steps: Step S102: Determine the target curve in three-dimensional space and the target node positions of the curve nodes on the target curve.

[0018] The aforementioned target curve refers to the curve used to construct the plant model to be generated. It has been pre-processed to accurately reflect the characteristics and structure of the plant model.

[0019] For example, to match the natural growth patterns of plants in nature and avoid a mechanical feel caused by regular shapes, the target curve can be designed with different curvatures or varying lengths based on the actual growth characteristics of plants, such as the twining and bending of vines and the natural curvature of branches. At the same time, the curve shape can also be designed according to the specific characteristics of the plant, laying the foundation for generating realistic plant models later.

[0020] Furthermore, to align with the hierarchical growth patterns of plants in nature, the target curve can employ a multi-level architecture. It can be divided into first, second, third, and so on, from lowest to highest level. The starting node of a higher-level curve is directly anchored to a lower-level curve, forming a hierarchical relationship of main trunk, primary branches, secondary branches, etc. For example, the starting node of a second-level branch curve is anchored to the main trunk curve of the first level, extending along the shape of the main trunk curve; the starting node of a higher-level branch curve is anchored to the corresponding lower-level branch curve, ensuring that the subsequently generated plant growth animation is more natural and plausible.

[0021] It should be noted that each level of target curve has multiple curve nodes, and each curve node corresponds to a unique position coordinate in three-dimensional space. This position coordinate is used as the target node position of that curve node.

[0022] In this step, 3D graphics software such as Houdini can be used to construct the target curve in 3D space and accurately mark the 3D spatial coordinates of each curve node on each target curve, thereby determining the target node position of each curve node.

[0023] Step S104: Determine the path value of the curve node, and based on the path value, determine the target growth parameter of the curve node; wherein, the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve.

[0024] The path value mentioned above refers to the distance between a curve node on the target curve and the starting node of the target curve along the curve's extension direction. The target growth parameter mentioned above is related to the path value and indicates the order in which the model content composed of multiple model vertices corresponding to the curve node is visualized in 3D space. The larger the target growth parameter of the curve node, the later the model vertices corresponding to the curve node are displayed.

[0025] Specifically, for curve nodes on the same target curve, the larger the path value of the curve node, the larger the target growth parameter of that curve node. In the corresponding growth animation, the model vertex corresponding to the starting node of the target curve is displayed first, and then the model vertices corresponding to curve nodes with progressively increasing path values ​​are displayed along the extension direction of the curve, ultimately presenting a growth effect that gradually extends from the germination point to the growth end.

[0026] For multiple target curves at the same level, to simulate the differences in growth progress among different branches at the same level in nature and avoid the mechanical feeling of synchronous growth, a random perturbation mechanism can be set up. Specifically, taking multiple main trunk curves at the first level as an example, each main trunk curve can first be assigned a unique curve identifier. Then, using this curve identifier as a random seed, random numbers corresponding to each main trunk curve can be generated. Finally, the target growth parameters of each curve node are determined by combining the random number corresponding to the target curve where the curve node is located, the preset growth adjustment coefficient, and the path value of the curve node itself. Through this design, multiple branches at the same level can exhibit staggered growth effects, which are closer to the natural growth state.

[0027] If the target curve contains multiple levels of curves, such as a first-level trunk curve, a second-level curve with its starting node anchored on the trunk curve, and a third-level curve with its starting node anchored on the second-level curve, then the target growth parameters for the curve nodes on curves of other levels besides the first level can be determined in the following way: First, for each curve node, calculate the distance between it and the starting node of its respective curve, and use this distance as the path value of that curve node.

[0028] Then, locate the position of the lower-level curve where the starting node of the curve to which the curve node belongs is located, determine the curve nodes on the lower-level curve that are adjacent to the position, and perform weight calculation on the target growth parameters of the adjacent curve nodes to obtain a fusion growth parameter.

[0029] Then, trace back to the lower-level curve where the starting node of the lower-level curve is located, and repeat the above steps until the trunk curve of the first level is traced back, and finally obtain multiple fusion growth parameters.

[0030] Finally, the multiple fusion growth parameters are summed with the path value of the curve node to obtain the target growth parameters of the curve node.

[0031] Step S106: Generate a plant model based on the target curve; wherein, the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions.

[0032] The aforementioned target vertex positions refer to the preset, fixed coordinates of each model vertex in three-dimensional space after a complete plant model is generated by performing a mesh lofting operation on the target curve. The plant model's model vertices and curve nodes have a many-to-one mapping relationship; that is, one curve node corresponds to a set of model vertices, and a set of model vertices constitutes the mesh surface of the plant model, thus forming the geometric outline of the plant. In this step, the target curve can be meshed to generate a plant model. Each model vertex has a preset target vertex position in the plant model. A group of model vertices corresponds to a curve node. Each group of model vertices can independently form a local mesh surface of the plant model. After multiple groups of model vertices complete spatial positioning at their respective target vertex positions, their corresponding mesh surfaces are spliced ​​together and seamlessly connected to finally form a complete three-dimensional plant model.

[0033] Step S108: Obtain preset reference growth parameters, wherein the reference growth parameters change over time.

[0034] The aforementioned reference growth parameters are used to compare with the target growth parameters of each curve node, thereby controlling the display position of the plant model vertices. Their core function is to drive the plant growth animation to advance along the time dimension.

[0035] In one approach, the reference growth parameters include: a first reference growth parameter and a second reference growth parameter. The second reference growth parameter can be determined by the first reference growth parameter and a preset growth coefficient, such as the sum of the first reference growth parameter and the growth coefficient. In this case, the reference growth parameter can be changed over time by controlling the first reference growth parameter to change accordingly.

[0036] When the reference growth parameters increase continuously over time, the plant model will exhibit a continuous dynamic growth process from local to complete formation.

[0037] Step S110: As the reference growth parameters change over time, based on the relationship between the target growth parameters and the reference growth parameters of the curve nodes, determine the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, and display the plant model at the display position to obtain the animation effect of the plant model.

[0038] In one approach, taking a first reference growth parameter with a smaller value and a second reference growth parameter with a larger value as an example, after determining a set of reference growth parameters, the stage type of each curve node can be determined based on the relationship between the target growth parameter and the reference growth parameter of each curve node on the target curve. The stage types include: no growth stage, growth stage, and growth completed stage. Then, the display position of the model vertex corresponding to the curve node is determined based on the stage type.

[0039] Specifically, if the target growth parameter of a curve node is not greater than the first reference growth parameter, the curve node is determined to be in the growth completion stage. For curve nodes in the stage type, the display positions of its corresponding multiple model vertices are the target vertex positions of the model vertices. At this time, the model content composed of the multiple model vertices corresponding to the curve node is displayed in three-dimensional space.

[0040] If the target growth parameter of the curve node is not less than the second reference growth parameter, the curve node is determined to be in the ungrown stage. For curve nodes in the stage type, the display position of the corresponding model vertex is the target node position of the curve node. Multiple model vertices are displayed at the same target node position. In this case, the multiple model vertices after convergence cannot form an effective mesh surface, and the corresponding model content and model vertices are not displayed.

[0041] If the target growth parameter of the curve node is between the first reference growth parameter and the second reference growth parameter, the curve node is determined to be in the growth stage. For the curve node in this stage, the display position of each model vertex is obtained by interpolating the target vertex position of the model vertex with the target node position of the corresponding curve node, so as to display the incomplete transition form in the process of the branch gradually extending.

[0042] Furthermore, after determining the display position of the model vertex corresponding to each curve node, the plant model is displayed at the display position to obtain the display content of the plant model.

[0043] As the reference growth parameters dynamically change over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0044] This invention provides a method for generating plant growth animation, which involves: determining a target curve in three-dimensional space and the target node positions of curve nodes on the target curve; determining the path values ​​of the curve nodes, and based on the path values, determining the target growth parameters of the curve nodes; wherein the path values ​​indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; generating a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; obtaining preset reference growth parameters, wherein the reference growth parameters change over time; during the process of the reference growth parameters changing over time, based on the relationship between the target growth parameters of the curve nodes and the reference growth parameters, determining the display position of the model vertex corresponding to the curve node from the target node positions of the curve nodes and the target vertex positions of the model vertices corresponding to the curve nodes, and displaying the plant model at the display position to obtain the animation effect of the plant model.

[0045] In this method, the target curve for constructing the plant model is first determined, and the target growth parameters of each curve node are determined based on the distance between each curve node and the starting node of the target curve. Then, the target curve is meshed to generate the plant model. The model vertices of the plant model correspond to the curve nodes; that is, multiple model vertices correspond to one curve node, and each model vertex has a preset target vertex position in the plant model. Next, preset reference growth parameters are obtained. Based on the relationship between the target growth parameters and the reference growth parameters of each curve node on the target curve, the display position of the model vertex corresponding to each curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position. Specifically, when the display positions of multiple model vertices corresponding to a curve node are located at the target node position of the curve node, that is, multiple model vertices are all displayed at the same target node position, the model content corresponding to these multiple model vertices is not visible. When the display positions of multiple model vertices corresponding to a curve node are located at their respective preset target vertex positions, the model content formed by these multiple model vertices is displayed in three-dimensional space. Finally, as the reference growth parameters change dynamically over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0046] This method relies on a procedural production process to efficiently generate target curves and plant models. By simply adjusting the reference growth parameters, precise control of the overall plant growth animation can be achieved. The process is simple and controllable, greatly reducing the operational complexity of animation production and significantly improving the production efficiency of plant growth animation.

[0047] The following embodiments provide a specific implementation method for determining the display position of the model vertex corresponding to the curve node.

[0048] Specifically, the reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the first reference growth parameter is smaller than the second reference growth parameter; during the change of the reference growth parameter over time, the stage type of the curve node is determined based on the relationship between the target growth parameter of the curve node and the reference growth parameter; wherein, the stage type includes: no growth stage, growth stage, and growth completed stage; based on the stage type, the display position of the model vertex corresponding to the curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

[0049] In other words, the stage type of the curve node is first determined based on the relationship between the target growth parameters and the reference growth parameters of the curve node; then, the display position of the model vertex corresponding to the curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

[0050] Specifically, if the target growth parameter of the curve node is not greater than the first reference growth parameter, the curve node is determined to be in the growth completed stage; if the target growth parameter of the curve node is between the first reference growth parameter and the second reference growth parameter, the curve node is determined to be in the growth stage; if the target growth parameter of the curve node is not less than the second reference growth parameter, the curve node is determined to be in the non-growing stage.

[0051] Specifically, if the target growth parameter of a curve node is not greater than the first reference growth parameter, the curve node is determined to be in the completed growth stage. If the target growth parameter of a curve node is not less than the second reference growth parameter, the curve node is determined to be in the ungrown stage. If the target growth parameter of a curve node is between the first and second reference growth parameters, the curve node is determined to be in the growth stage.

[0052] Furthermore, the display position of the model vertex corresponding to the curve node can be directly determined or calculated based on its stage type: If the curve node is in the growth completion stage, the display position of the model vertex corresponding to the curve node is determined as the target vertex position; if the curve node is in the non-growth stage, the display position of the model vertex corresponding to the curve node is determined as the target node position of the curve node; if the curve node is in the growth stage, the display position of the model vertex corresponding to the curve node is obtained by interpolating the target vertex position of the model vertex corresponding to the curve node with the target node position of the curve node.

[0053] In other words, if a curve node is in the completed growth stage, its corresponding model vertex display position is set as the target vertex position; if it is in the ungrown stage, the model vertex display position is set as the target node position of the curve node; if it is in the growth stage, the final display position is obtained by interpolating the target vertex position of the model vertex with the target node position of the corresponding curve node, thereby simulating the incomplete transitional form during the branch growth process.

[0054] The above interpolation calculation can be implemented using linear interpolation, and the specific process is as follows: In actual implementation, after determining the first reference growth parameter and the second reference growth parameter, the first reference growth parameter and the second reference growth parameter can be mapped to the (0,1) interval. In this way, the mapping value of the target growth parameter between the first reference growth parameter and the second reference growth parameter in the (0,1) interval can be determined. This mapping value is used as the weight parameter corresponding to the target vertex position. Based on the weight parameter, the target vertex position and the target node position, a weighted summation operation is performed to obtain the display position of each model vertex corresponding to the curve node of this growth stage.

[0055] This interpolation calculation logic allows the display position of the model vertex to smoothly transition with the dynamic changes of the reference growth parameters, gradually approaching the target vertex position from the target node position, accurately replicating the natural growth process of the branch from point to line, from incomplete to complete.

[0056] In one approach, the second reference growth parameter is determined by the first reference growth parameter and a preset growth coefficient; by controlling the first reference growth parameter to change over time, each reference growth parameter is driven to change over time.

[0057] The growth coefficient mentioned above is used to limit the range of nodes corresponding to the incomplete transitional form, and it can be set to a fixed value.

[0058] In other words, the second reference growth parameter can be determined by the first reference growth parameter and a preset growth coefficient. For example, the second reference growth parameter can be the sum of the first reference growth parameter and the growth coefficient. In this case, by controlling the first reference growth parameter to change over time, all reference growth parameters can be driven to change over time. Figure 2 The illustrated effect diagram shows, from Figure 2 In (a) to (c), the first reference growth parameter increases, and the corresponding effect diagram shows that as the first reference growth parameter increases, the growth range of the plant model continues to expand, the branches gradually extend and fill from the initial pruning form, and finally present a complete vine structure.

[0059] The following examples provide a specific implementation method for determining the target curve.

[0060] The target curves include multiple curves; the multiple target curves include multiple levels; in three-dimensional space, the first starting node corresponding to the first curve is determined, and the first curve is generated at the first starting node based on the preset growth direction of the plant; based on the first curve, the first target curve located at the first level is determined; on the first target curve, the second starting node corresponding to the second curve is determined, the tangent direction of the second starting node is determined, and the second curve is generated at the second starting node based on the tangent direction of the second starting node and the growth direction of the plant; based on the second curve, the second target curve located at the second level is determined.

[0061] The aforementioned preset plant growth direction refers to the pre-defined plant growth direction, specifically a direction vector defined based on a three-dimensional spatial coordinate system. It can be set according to the actual growth characteristics of the plant, such as the climbing direction of vines or the vertical upward direction of the trunk of a tree. It is used to constrain the generation orientation of curves at each level to ensure that the target curve structure conforms to the natural growth form of the plant.

[0062] The first target curve mentioned above refers to the first-level curve that serves as the main structure of the plant model after morphological optimization, also known as the trunk curve. The second target curve mentioned above refers to the second-level branch curve generated by anchoring on the first target curve, which together with the first target curve forms the basic hierarchical structure of trunk-branch.

[0063] For multi-branched plants, taking vines as an example, 3D graphics software such as Houdini can be used to define the entire coverage area at the bottom of the vine in 3D space using the circle node. Then, the scatter node is used to randomly scatter points throughout the coverage area. These scattered points serve as the first starting nodes for multiple first curves. Then, combined with the preset growth direction of the plant, a corresponding first curve is generated at each first starting node. The shape of the first curve is then processed in a targeted manner. It can be combined with the characteristics of the specific plant, such as the curvature and twisting degree of the branches, and the corresponding curve shape can be designed through noise perturbation, curvature adjustment and other operations to obtain the first target curve that reflects the characteristics and structure of the plant model.

[0064] Subsequently, based on plant characteristics, a suitable position is selected on the first target curve as the second starting node corresponding to the second curve. The tangent direction of this second starting node on the first target curve is determined using the curve analysis function of 3D software. A weighted fusion is performed based on the tangent direction of the second starting node and the plant's growth direction, and the fused direction is used as the generation direction of the second curve. The second curve is then generated at the second starting node. Finally, the second curve undergoes morphological optimization to obtain the second target curve located at the second level. The morphological optimization process for this second curve is similar to that of the first curve. Here, the weight parameter for fusing the tangent direction of the second starting node and the plant's growth direction can randomly approach 50%.

[0065] In one approach, the first curve can be obtained as follows: The first curve includes multiple curves; the node positions of the first starting nodes corresponding to the multiple first curves are located in a preset region, the region center position of the preset region is determined, and the first direction vector corresponding to the growth direction is determined; the node position of the first starting node and the region center position are determined as a second direction vector; the first direction vector and the second direction vector are fused to determine the extension direction of the first curve; at the first starting node, the first curve is generated along the extension direction of the first curve.

[0066] In one embodiment, taking the construction of a vine plant as an example, the first curve used to generate the main trunk curve includes multiple curves, and the node positions of the first starting nodes of the multiple first curves are located in a preset circular area, and the growth direction of the vine plant is upward.

[0067] Here, the center position of the circular region is determined, and the first direction vector corresponding to the growth direction is (0,1,0). Then, determine the second direction vector corresponding to the node position of each first starting node and the center position of the region. In actual implementation, the second direction vector can be a unit vector pointing from the node position of the first starting node to the center position of the region. Its function is to constrain the main trunk of the vine to grow towards the center and avoid the branches from being too scattered.

[0068] Then, the first direction vector and the second direction vector are fused to determine the extension direction of the first curve. It can be understood that vines grow in a clustered and close-to-each-other manner. By assigning preset weights to the two direction vectors and then performing a weighted summation operation, a fused direction vector that has both the characteristics of "growing upward" and "converging towards the center" can be obtained. This fused vector is the extension direction of the first curve.

[0069] Finally, at the first starting node, a first curve is generated along the extension direction of the first curve, so that the generated multiple first curves maintain the overall upward growth trend and present a natural form of vines clustering together, avoiding the disorderly distribution of branches.

[0070] In one approach, for the aforementioned vine plants, the first direction vector and the second direction vector can be fused as follows: Determine the first distance between the node position of the first starting node and the center position of the region; based on the first distance, determine the first weight parameter; wherein, the smaller the first distance, the larger the weight parameter corresponding to the first direction vector in the first weight parameter; based on the first weight parameter, perform fusion processing on the first direction vector and the second direction vector, and determine the direction indicated by the fused direction vector as the extension direction of the first curve.

[0071] In other words, the growth pattern of the vine trunk is differentiated by dynamically adjusting the distance from the first starting node to the center of the region. Specifically, the first distance between the position of each first starting node and the center of the circular region is calculated. A dynamic first weight parameter is determined based on the magnitude of this first distance: the smaller the first distance, the closer the first starting node is to the center of the region, and the greater the weight assigned to the first direction vector (upward growth direction) and the smaller the weight assigned to the second direction vector (centripetal convergence direction). Then, the dynamically adjusted weight parameter is substituted into the vector weighted summation formula to fuse the first and second direction vectors, obtaining the extension direction of the first curve corresponding to the first starting node.

[0072] Through this dynamic weight fusion mechanism, the main stems of the vines near the center of the area will grow in an almost vertical upward posture, while the main stems at the edge will show a growth trend of "gathering upward and centripetally". The resulting multiple first curves can simulate the natural growth form of the vines clustering from the edge to the center with distinct layers, further improving the realism of the plant model.

[0073] Furthermore, each first curve is configured with a preset length. To better match the growth characteristics of the vine's main stem, where the outer branches are shorter and the inner branches are longer, the final length of each first curve can be dynamically adjusted through the following steps: Assign a curve identifier to each first curve; determine the first random number corresponding to the first curve based on the curve identifier of the first curve; determine the length coefficient of the first curve based on the first distance between the node position of the first starting node and the center position of the preset area; wherein, the smaller the first distance, the larger the value of the length coefficient; determine the first length based on the length coefficient, the first random number corresponding to the first curve and the preset length, and update the length of the first curve to the first length.

[0074] Here, firstly, a unique curve identifier can be assigned to each first curve, and the curve identifier of each first curve can be used as a random seed to determine the first random number corresponding to the first curve. The value range of the first random number can be constrained to a preset interval such as (0.9, 1.1).

[0075] Then, calculate the first distance between the node position of the first starting node of all first curves and the center position of the preset area to obtain the range of the first distance. Then, use the fit mapping function to map the range of the first distance to the preset length coefficient range. The mapping rule is that the smaller the first distance, the larger the length coefficient value. Based on the first distance corresponding to each first curve, match the length coefficient of the first curve from the mapped length coefficient range to ensure that the length coefficient of the inner first curve closer to the center of the area is higher than that of the outer curve.

[0076] Finally, the first length is determined by multiplying the length coefficient, the first random number corresponding to the first curve, and the preset length, and the length of the first curve is updated to this first length.

[0077] like Figure 3 As shown, Figure 3 (a) in the figure is a schematic diagram of the effect before the length of the first curve is updated. The length of the first curve is the same within the preset circular area. Figure 3(b) in the image shows the effect after the length of the first curve is updated to the first length. In this image, the inner curve near the center of the circular area is longer and the outer curve is shorter, which is consistent with the natural growth characteristics of the vine trunk: "long inner branches and short outer branches". Due to the effect of the first random number, there are slight differences in the length of the curve within the same distance interval, which avoids a mechanically uniform visual effect and is closer to the growth state of real plant branches.

[0078] The following embodiments provide a specific implementation method for obtaining the first target curve.

[0079] In one approach, to match the natural bending and twisting characteristics of vines and other plants, a first target curve can be generated by adding noise perturbation to the first curve. Specifically, the position parameters of the curve nodes on the first curve are determined; wherein, the position parameters are used to indicate the distribution position of the curve nodes on the first curve; the position parameter of the first starting node is a first specified position parameter; the position parameter of the ending node of the first curve is a second specified position parameter; a first mapping relationship is established between multiple position parameters and a preset noise intensity curve; wherein, the first mapping relationship includes: as the position parameter increases, the noise intensity mapped by the position parameter increases from zero to a first noise intensity; based on at least two preset sets of noise of different frequencies and the noise intensity mapped by the position parameters of the nodes, the nodes on the first curve are offset to obtain a first target curve.

[0080] The aforementioned positional parameters are used to indicate the distribution positions of the curve nodes on the first curve. In actual implementation, preset node numbers can be assigned to the nodes on the first curve. For example, along the extension direction of the first curve, the node numbers of the curve nodes are sequentially: 0, 1, 2, 3, 4..., and the positional parameters of the curve nodes on the first curve can be obtained through the following formula:

[0081] in, These are the position parameters of the curve nodes; is the node number of the curve node; N is the number of curve nodes on the first curve.

[0082] This formula ensures that the position parameter of the first starting node is 0, the position parameter of the ending node is 1, and the position parameters of the remaining curve nodes are linearly distributed in the (0,1) interval.

[0083] Here, the position parameters of each curve node on the first curve are determined using the above formula.

[0084] Then, a first mapping relationship is established between the position parameters of each curve node on the first curve and the preset noise intensity curve. The first mapping relationship is that as the position parameter increases, the noise intensity mapped by the position parameter increases from zero to the first noise intensity, that is, the first starting node has no noise disturbance, and the noise influence is stronger the closer to the end node of the first curve.

[0085] Finally, based on at least two sets of noise of different frequencies, such as turbulence noise, and combined with the noise intensity mapped by the position parameters of the curve nodes, the nodes on the first curve are spatially offset. Finally, all the offset curve nodes are refitted to obtain the first target curve. This method ensures that the starting node of the first curve is free from noise offset, effectively preventing the first starting node from leaving the preset area and becoming suspended, while allowing the middle and later sections of the curve to present a natural irregular curve, conforming to the growth characteristics of plant branches.

[0086] like Figure 4 As shown, Figure 4 (a) in the middle is Figure 3 (b) is a schematic diagram of the effect after noise processing. The curve in the diagram shows a soft, low-amplitude bend, and the overall shape is relatively regular, retaining the original centripetal clustering trend. Figure 4 (b) in the middle is Figure 3 In (b), the effect diagram after two different frequencies of noise processing is shown. It can be seen that the curve is more distorted, the fluctuation is more complex, the irregularity of the branches is more obvious, and it is closer to the messy but orderly form of the natural growth of real plants.

[0087] In one approach, to simulate the upward rotational movement of a plant, the first curve can be rotated to obtain the first target curve.

[0088] Specifically, a first coordinate axis corresponding to the growth direction of the plant is determined, the component values ​​of the node positions of the curve nodes on the first curve on the first coordinate axis are obtained, and a first component interval in which the component values ​​are located is determined; a second mapping relationship is established between the first component interval and a preset rotation intensity curve; wherein, the second mapping relationship includes: as the component value increases, the rotation intensity mapped by the component value increases from zero to a first rotation intensity; based on the rotation intensity mapped by the component values ​​of the curve nodes, the curve nodes of the first curve are rotated around the first coordinate axis to obtain the first target curve.

[0089] The first coordinate axis mentioned above refers to the coordinate axis corresponding to the growth direction of the plant. This coordinate axis is the core reference for the growth direction of the plant. For example, when the plant grows upward, the first coordinate axis is the axis perpendicular to the horizontal plane in the three-dimensional coordinate system, such as the Z-axis.

[0090] Here, taking the first coordinate axis as the Z-axis as an example, we extract the component values ​​corresponding to the Z-axis in the three-dimensional coordinates of all curve nodes on the first curve, count the range of Z-axis component values ​​of all curve nodes, and determine the first component interval in which the component value is located.

[0091] Then, a second mapping relationship is established between the first component interval and the preset rotation intensity curve; the second mapping relationship is: as the component value increases, the rotation intensity mapped by the component value increases from zero to the first rotation intensity, realizing the growth characteristics that become more obvious as the rotation goes higher.

[0092] Finally, based on the rotation intensity mapped by the component values ​​of the curve nodes, the curve nodes of the first curve are rotated around the first coordinate axis, and all the rotated curve nodes are refitted to obtain the first target curve with a rotational upward shape. Figure 5 This is a schematic diagram of the effect of the first target curve obtained after the first curve has been rotated. In this diagram, the curve shows a rotation trend of "gradually increasing from bottom to top" along the Z-axis (i.e., the growth direction of the plant). The initial node of the curve has a small rotation amplitude and a relatively regular shape; the rotation intensity of the middle and upper nodes increases, and the curves intertwine and intersect, accurately restoring the natural growth posture of vine plants that "rotate, climb, and extend upward".

[0093] The following embodiments provide a specific implementation of determining the tangent direction of the second starting node.

[0094] If the second starting node is a second node on the first target curve, determine the tangent direction of the second starting node based on the tangent direction of the second node; if the second starting node is not a node on the first target curve, determine the adjacent nodes of the second starting node on the first target curve; determine the first fusion parameter based on the distance between the second starting node and each adjacent node; and perform fusion processing on the tangent directions corresponding to multiple adjacent nodes based on the first fusion parameter to obtain the tangent direction of the second starting node.

[0095] In other words, the tangent direction of the second starting node will be calculated in two cases, depending on whether it is an existing curve node on the first target curve: In one scenario, if the second starting node is a curve node on the first target curve, i.e., the second node, the tangent direction of the second node on the first target curve is directly taken as the tangent direction of the second starting node.

[0096] In another scenario, if the second starting node is not a curve node on the first target curve, first locate the multiple neighboring nodes on the first target curve that are closest to the second starting node; then, calculate the spatial distance between the second starting node and each neighboring node, and assign a first fusion parameter based on the distance. For example, the closer the neighboring node is, the higher the weight of the fusion parameter; finally, using the first fusion parameter as the weight, perform weighted fusion on the tangent directions of multiple neighboring nodes on the first target curve to obtain the tangent direction of the second starting node. Here, the tangent direction of each neighboring node on the first target curve can be obtained as follows: using the neighboring node as a reference point, find the nearest curve node behind it along the extension direction of the curve; then, take the direction of the line connecting these two nodes, and define the direction from the rear node to the current neighboring node as the tangent direction of the neighboring node.

[0097] Specifically, the steps for determining the tangent direction of the second node are as follows: Identify the third node on the first target curve that is adjacent to the second node; wherein the third node is the node located after the second node in the extension direction of the first target curve; determine the tangent direction of the second node based on the direction of the line connecting the second node and the third node; wherein the tangent direction of the second node points from the third node to the second node.

[0098] In other words, first, find the adjacent node after the second node, i.e., the third node, in the extension direction of the first target curve; then, connect the second node and the third node in space, and directly determine the direction from the third node to the second node as the tangent direction of the second node.

[0099] The following examples provide specific implementation methods for determining the target growth parameters of curve nodes.

[0100] In one approach, the target curve includes: a first target curve at a first level and a second target curve at a second level; a third starting node corresponding to the second target curve is located on the first target curve at the first level; a curve identifier is assigned to each first target curve, and a second random number is determined based on the curve identifier of the first target curve; target growth parameters of the curve nodes on the first target curve are determined based on the second random number corresponding to the first target curve, a preset growth adjustment coefficient, and the path value of the curve nodes on the first target curve; target nodes adjacent to the third starting node on the first target curve are determined, and fusion growth parameters are determined based on the target growth parameters of the target nodes; and target growth parameters of the curve nodes on the second target curve are determined based on the fusion growth parameters and the path value of the curve nodes on the second target curve.

[0101] The aforementioned third starting node refers to the starting node of the second target curve.

[0102] Here, the target curves include: the first target curve located in the first level and the second target curve located in the second level. First, a unique curve identifier is assigned to each first target curve. Using the curve identifier as a random seed, a second random number corresponding to each first target curve is obtained.

[0103] For the curve nodes on the first target curve, the target growth parameters can be determined in the following way: First, the distance between each curve node on the first target curve and its starting node along the extension direction of the first target curve is determined, serving as the path value of the curve node on the first target curve. Finally, the target growth parameters for each curve node on the first target curve are determined by combining the random number corresponding to the first target curve where the curve node is located, the preset growth adjustment coefficient, and the path value of the curve node itself.

[0104] In practical implementation, each first target curve can be assigned a unique numerical sequence number as a curve identifier. This numerical sequence number is added to a fixed value to generate a second random number within the range of 0 to 1, ensuring that the node growth parameters of different first target curves have differentiated characteristics. Finally, the second random number corresponding to the first target curve where the curve node is located, a preset growth adjustment coefficient, and the path value of the curve node itself are summed to determine the target growth parameter of the curve node. The growth adjustment coefficient is a preset fixed value, whose main function is to control the influence of the second random number on the target growth parameter. For example, multiplying the growth adjustment coefficient by the second random number corresponding to the first target curve, and then summing the product with the path value of the curve node, yields the target growth parameter of the curve node on the first target curve.

[0105] For the curve nodes on the second target curve, the target growth parameters can be determined in the following way: First, identify the target nodes on the first target curve that are adjacent to the third starting node on the second target curve. Then, based on preset fusion rules (e.g., target nodes closer to the third starting node have higher weights), perform weighted fusion calculations on the target growth parameters of each target node to obtain the fused growth parameters. Finally, along the extension direction of the second target curve, calculate the distance between the current curve node and the third starting node to obtain the path value of that curve node. Add the fused growth parameters to this path value, and the final result is the target growth parameter of that curve node on the second target curve.

[0106] Specifically, the fusion growth parameters can be determined in the following ways: Identify the target nodes on the first target curve that are adjacent to the third starting node; determine the second fusion parameter based on the distance between the third starting node and each target node; and perform fusion processing on the target growth parameters of multiple target neighbor nodes based on the second fusion parameter to obtain the fused growth parameter.

[0107] In other words, firstly, locate all target nodes adjacent to the third starting node of the second target curve on the first target curve, calculate the distance between the third starting node and each target node, and assign the second fusion parameter based on this distance. The closer the target node is, the higher the weight of the corresponding fusion parameter. Finally, use the second fusion parameter as the weight to perform a weighted summation of the target growth parameters of each target node. The final result is the fusion growth parameter.

[0108] In one approach, multiple target curves include multiple levels; before generating a plant model based on the target curves, the coarseness parameters of the curve nodes in each target curve are determined; wherein, for curve nodes on the same target curve, the coarseness parameters of the curve nodes decrease along the extension direction of the target curve; the higher the level of the target curve, the smaller the coarseness parameter of the starting node of the target curve.

[0109] In other words, the variation law of the thickness of a single curve is as follows: for any target curve, along its extension direction, the thickness parameters of all curve nodes on the curve show a decreasing trend, which conforms to the natural shape formed by the nutrient transport gradient of plant branches. The difference in thickness of target curves at different levels follows this pattern: the higher the level of the curve (e.g., the main trunk curve is level 1, the branch curves on the main trunk curve are level 2, and the twigs on the branches are level 3), the smaller the thickness parameter of its starting node. That is, the higher the level, the thinner the branches, which conforms to the growth structure logic of plants: "the main trunk is thick, the branches are thin, and the twigs are even thinner".

[0110] In practice, all curve nodes on each target curve can be assigned consecutive node numbers along the curve's extension direction. For example, along the extension direction of the target curve, the node numbers of the curve nodes on the target curve are sequentially: 0, 1, 2, 3, 4..., and the position parameters of each curve node on the curve where the curve node is located are calculated. Among them, the position parameter of the starting node of the curve is 0, the position parameter of the ending node is 1, and the position parameters of the remaining curve nodes are linearly distributed in the interval (0,1).

[0111] Then, the position parameters of the curve nodes are mapped to the thickness range of their respective curves. The mapping rule is: the smaller the position parameter value of the curve node, the larger the thickness parameter corresponding to the curve node.

[0112] Here, the relationship between the level of the target curve and the corresponding coarseness interval is as follows: the higher the level of the curve, the smaller the starting value of its corresponding coarseness interval.

[0113] Furthermore, based on the target curve and the coarseness parameters of the curve nodes in the target curve, the target curve is subjected to mesh lofting processing to generate a plant model, and the target vertex position of the plant model vertex corresponding to the curve node is determined.

[0114] Here, the Polywire node in Houdini graphics software can be used to achieve the lofting conversion from curve to mesh model. The Polywire node automatically calculates the target vertex positions of all model vertices of the plant model to be generated, based on the target node positions of the curve nodes and the thickness parameters of the curve nodes, using a built-in algorithm. It then constructs a continuous topology along the curve's extension direction, ultimately generating plant mesh models with differentiated thicknesses. The mesh shape perfectly matches the growth trend and thickness gradient of the target curve, such as... Figure 6 The vine model shown features vines at different levels with thick trunks and thin branches. The thickness of each vine decreases naturally from the root to the tip, conforming to the design of decreasing thickness along the direction of the curve, thus avoiding mechanically uniform thickness.

[0115] It should be noted that by adjusting the position and distribution of the starting nodes and the growth direction of the first-level main stem curves, plant models with different shapes can be created, such as... Figure 7 As shown, Figure 7 In model (a), the main stem curves start at nodes concentrated in the central region, and the growth direction radiates outwards, eventually forming a clustered, entwined, and centrally converged form, similar to the growth characteristics of clump-forming vines. Figure 7 The main trunk curve of model (b) is arranged along a straight line, which is closer to the growth posture of creeping vines.

[0116] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 8 The diagram shows a device for generating plant growth animations, the device comprising: The first determining module 802 is used to determine the target curve in three-dimensional space and the target node position of the curve node on the target curve. The second determining module 804 determines the path value of the curve node and, based on the path value, determines the target growth parameters of the curve node; wherein, the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve. The first generation module 806 is used to generate a plant model based on the target curve; wherein, the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions. The first acquisition module 808 is used to acquire preset reference growth parameters, wherein the reference growth parameters change over time; The first display module 810 is used to determine the display position of the model vertex corresponding to the curve node based on the relationship between the target growth parameter and the reference growth parameter of the curve node during the process of the reference growth parameter changing over time, from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, and display the plant model at the display position to obtain the animation effect of the plant model.

[0117] In this method, the target curve for constructing the plant model is first determined, and the target growth parameters of each curve node are determined based on the distance between each curve node and the starting node of the target curve. Then, the target curve is meshed to generate the plant model. The model vertices of the plant model correspond to the curve nodes; that is, multiple model vertices correspond to one curve node, and each model vertex has a preset target vertex position in the plant model. Next, preset reference growth parameters are obtained. Based on the relationship between the target growth parameters and the reference growth parameters of each curve node on the target curve, the display position of the model vertex corresponding to each curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position. Specifically, when the display positions of multiple model vertices corresponding to a curve node are located at the target node position of the curve node, that is, multiple model vertices are all displayed at the same target node position, the model content corresponding to these multiple model vertices is not visible. When the display positions of multiple model vertices corresponding to a curve node are located at their respective preset target vertex positions, the model content formed by these multiple model vertices is displayed in three-dimensional space. Finally, as the reference growth parameters change dynamically over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0118] This method relies on a procedural production process to efficiently generate target curves and plant models. By simply adjusting the reference growth parameters, precise control of the overall plant growth animation can be achieved. The process is simple and controllable, greatly reducing the operational complexity of animation production and significantly improving the production efficiency of plant growth animation.

[0119] The first display module is used to determine the stage type of the curve node based on the relationship between the target growth parameters and the reference growth parameters of the curve node; wherein, the stage type includes: no growth stage, growth stage and growth completed stage; based on the stage type, the display position of the model vertex corresponding to the curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

[0120] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the first reference growth parameter is less than the second reference growth parameter; the aforementioned first display module is used to determine that the curve node is in the growth completion stage if the target growth parameter of the curve node is not greater than the first reference growth parameter; to determine that the curve node is in the growth stage if the target growth parameter of the curve node is between the first reference growth parameter and the second reference growth parameter; and to determine that the curve node is in the non-growth stage if the target growth parameter of the curve node is not less than the second reference growth parameter.

[0121] The first display module is used to determine the display position of the model vertex corresponding to the curve node as the target vertex position of the model vertex if the curve node is in the growth completion stage; to determine the display position of the model vertex corresponding to the curve node as the target node position of the curve node if the curve node is in the non-growth stage; and to obtain the display position of the model vertex corresponding to the curve node by interpolating the target vertex position of the model vertex corresponding to the curve node with the target node position of the curve node if the curve node is in the growth stage.

[0122] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the second reference growth parameter is determined by the first reference growth parameter and a preset growth coefficient; by controlling the first reference growth parameter to change over time, each reference growth parameter is driven to change over time.

[0123] The aforementioned target curves include multiple curves; the multiple target curves include multiple levels; the first determining module is used to determine the first starting node corresponding to the first curve in three-dimensional space, and generate the first curve at the first starting node based on the preset growth direction of the plant; based on the first curve, determine the first target curve located at the first level; determine the second starting node corresponding to the second curve on the first target curve, determine the tangent direction of the second starting node, and generate the second curve at the second starting node based on the tangent direction of the second starting node and the growth direction of the plant; based on the second curve, determine the second target curve located at the second level.

[0124] The aforementioned first curve includes multiple curves; the node positions of the first starting nodes corresponding to the multiple first curves are located in a preset region; the aforementioned device further includes a second generation module, used to determine the region center position of the preset region and the first direction vector corresponding to the growth direction; determine the node position of the first starting node and the second direction vector corresponding to the region center position; perform fusion processing on the first direction vector and the second direction vector to determine the extension direction of the first curve; and generate the first curve at the first starting node along the extension direction of the first curve.

[0125] The second generation module is used to determine the first distance between the node position of the first starting node and the center position of the region; based on the first distance, determine the first weight parameter; wherein, the smaller the first distance, the larger the weight parameter corresponding to the first direction vector in the first weight parameter; based on the first weight parameter, perform fusion processing on the first direction vector and the second direction vector, and determine the direction indicated by the fused direction vector as the extension direction of the first curve.

[0126] The first curve has a preset length; the device further includes a first update module, used to assign a curve identifier to each first curve; determine a first random number corresponding to the first curve based on the curve identifier of the first curve; determine the length coefficient of the first curve based on the first distance between the node position of the first starting node and the center position of the preset area; wherein, the smaller the first distance, the larger the value of the length coefficient; determine the first length based on the length coefficient, the first random number corresponding to the first curve and the preset length, and update the length of the first curve to the first length.

[0127] The aforementioned device further includes: a third determining module, used to determine the position parameters of curve nodes on the first curve; wherein the position parameters are used to indicate the distribution position of the curve nodes on the first curve; the position parameters of the first starting node are first specified position parameters; the position parameters of the ending node of the first curve are second specified position parameters; establishing a first mapping relationship between multiple position parameters and a preset noise intensity curve; wherein the first mapping relationship includes: as the position parameters increase, the noise intensity mapped by the position parameters increases from zero to a first noise intensity; based on at least two preset sets of noise of different frequencies and the noise intensity mapped by the position parameters of the nodes, offsetting the nodes on the first curve to obtain a first target curve.

[0128] The third determining module described above is further configured to: determine a first coordinate axis corresponding to the growth direction of the plant, obtain the component values ​​of the node positions of the curve nodes on the first curve on the first coordinate axis, and determine the first component interval where the component values ​​are located; establish a second mapping relationship between the first component interval and a preset rotation intensity curve; wherein the second mapping relationship includes: as the component values ​​increase, the rotation intensity mapped by the component values ​​increases from zero to a first rotation intensity; based on the rotation intensity mapped by the component values ​​of the curve nodes, perform a rotation operation on the curve nodes of the first curve around the first coordinate axis to obtain the first target curve.

[0129] The third determining module is further configured to: if the second starting node is a second node on the first target curve, determine the tangent direction of the second starting node based on the tangent direction of the second node; if the second starting node is not a curve node on the first target curve, determine the adjacent nodes of the second starting node on the first target curve; determine the first fusion parameter based on the distance between the second starting node and each adjacent node; and perform fusion processing on the tangent directions corresponding to multiple adjacent nodes based on the first fusion parameter to obtain the tangent direction of the second starting node.

[0130] The aforementioned third determining module is further configured to: determine a third node on the first target curve that is adjacent to the second node; wherein the third node is a node located after the second node in the extension direction of the first target curve; and determine the tangent direction of the second starting node based on the line direction connecting the second node and the third node; wherein the tangent direction of the second starting node points from the third node to the second node.

[0131] The aforementioned target curves include: a first target curve located at the first level and a second target curve located at the second level; the third starting node corresponding to the second target curve is on the first target curve located at the first level; the aforementioned second determining module is used to assign a curve identifier to each first target curve, determine a second random number corresponding to each first target curve based on the curve identifier of the first target curve; determine the target growth parameters of the curve nodes on the first target curve based on the second random number corresponding to the first target curve, a preset growth adjustment coefficient, and the path value of the curve nodes on the first target curve; determine the target nodes on the first target curve adjacent to the third starting node, and determine the fusion growth parameters based on the target growth parameters of the target nodes; and determine the target growth parameters of the curve nodes on the second target curve based on the fusion growth parameters and the path value of the curve nodes on the second target curve.

[0132] The second determining module is used to determine the target nodes on the first target curve that are adjacent to the third starting node; based on the distance between the third starting node and each target node, determine the second fusion parameter; based on the second fusion parameter, perform fusion processing on the target growth parameters of multiple target neighboring nodes to obtain the fused growth parameter.

[0133] The aforementioned device further includes: a fourth determining module, used to determine the coarseness parameter of the curve nodes in the target curve; wherein, for curve nodes on the same target curve, the coarseness parameter of the curve nodes decreases along the extension direction of the target curve; the higher the level of the target curve, the smaller the coarseness parameter of the starting node of the target curve.

[0134] The first generation module is used to perform mesh lofting on the target curve based on the target curve and the coarseness parameters of the curve nodes in the target curve, generate a plant model, and determine the target vertex position of the model vertex of the plant model corresponding to the curve node.

[0135] This embodiment also provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor. The processor executes the computer-executable instructions to implement the above-described method for generating plant growth animations. This electronic device can be a server or a terminal device.

[0136] See Figure 9 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores computer-executable instructions that can be executed by the processor 100. The processor 100 executes the computer-executable instructions to implement the above-described method for generating plant growth animations.

[0137] Furthermore, Figure 9 The illustrated electronic device also includes a bus 102 and a communication interface 103. The processor 100, communication interface 103, and memory 101 are connected via the bus 102. The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk drive. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless). The interface can use the Internet, wide area network, local area network, metropolitan area network, etc. The bus 102 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 9The diagram uses only a single bidirectional arrow, but this does not imply a single bus or a single type of bus. Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0138] The processor in the aforementioned electronic device, by executing computer-executable instructions, can perform the following operations of the above-mentioned method for generating plant growth animation: determining the target curve in three-dimensional space and the target node position of the curve node on the target curve; determining the path value of the curve node, and determining the target growth parameter of the curve node based on the path value; wherein the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; generating a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; obtaining preset reference growth parameters, wherein the reference growth parameters change over time; during the process of the reference growth parameters changing over time, based on the relationship between the target growth parameters of the curve node and the reference growth parameters, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, displaying the plant model at the display position, and obtaining the animation effect of the plant model.

[0139] In this method, the target curve for constructing the plant model is first determined, and the target growth parameters of each curve node are determined based on the distance between each curve node and the starting node of the target curve. Then, the target curve is meshed to generate the plant model. The model vertices of the plant model correspond to the curve nodes; that is, multiple model vertices correspond to one curve node, and each model vertex has a preset target vertex position in the plant model. Next, preset reference growth parameters are obtained. Based on the relationship between the target growth parameters and the reference growth parameters of each curve node on the target curve, the display position of the model vertex corresponding to each curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position. Specifically, when the display positions of multiple model vertices corresponding to a curve node are located at the target node position of the curve node, that is, multiple model vertices are all displayed at the same target node position, the model content corresponding to these multiple model vertices is not visible. When the display positions of multiple model vertices corresponding to a curve node are located at their respective preset target vertex positions, the model content formed by these multiple model vertices is displayed in three-dimensional space. Finally, as the reference growth parameters change dynamically over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0140] This method relies on a procedural production process to efficiently generate target curves and plant models. By simply adjusting the reference growth parameters, precise control of the overall plant growth animation can be achieved. The process is simple and controllable, greatly reducing the operational complexity of animation production and significantly improving the production efficiency of plant growth animation.

[0141] The processor in the aforementioned electronic device can execute computer-executable instructions to perform the following operations of the above-mentioned method for generating plant growth animation: determining the stage type of the curve node based on the relationship between the target growth parameters and the reference growth parameters of the curve node; wherein, the stage type includes: no growth stage, growth stage, and growth completed stage; based on the stage type, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

[0142] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the first reference growth parameter is less than the second reference growth parameter; the processor in the aforementioned electronic device, by executing computer-executable instructions, can implement the following operations of the above-mentioned plant growth animation generation method: if the target growth parameter of the curve node is not greater than the first reference growth parameter, the curve node is determined to be in the growth completion stage; if the target growth parameter of the curve node is between the first reference growth parameter and the second reference growth parameter, the curve node is determined to be in the growth stage; if the target growth parameter of the curve node is not less than the second reference growth parameter, the curve node is determined to be in the non-growth stage.

[0143] The processor in the aforementioned electronic device, by executing computer-executable instructions, can perform the following operations of the above-mentioned method for generating plant growth animation: if the curve node is in the growth completion stage, the display position of the model vertex corresponding to the curve node is determined as: the target vertex position of the model vertex; if the curve node is in the non-growth stage, the display position of the model vertex corresponding to the curve node is determined as: the target node position of the curve node; if the curve node is in the growth stage, the display position of the model vertex corresponding to the curve node is obtained by interpolating the target vertex position of the model vertex corresponding to the curve node with the target node position of the curve node.

[0144] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the second reference growth parameter is determined by the first reference growth parameter and a preset growth coefficient; by controlling the first reference growth parameter to change over time, each reference growth parameter is driven to change over time.

[0145] The aforementioned target curves include multiple curves; the multiple target curves include multiple levels; the processor in the aforementioned electronic device, by executing computer-executable instructions, can implement the following operations of the aforementioned plant growth animation generation method: determining a first starting node corresponding to a first curve in three-dimensional space, generating a first curve at the first starting node based on a preset plant growth direction; determining a first target curve at a first level based on the first curve; determining a second starting node corresponding to a second curve on the first target curve, determining the tangent direction of the second starting node, generating a second curve at the second starting node based on the tangent direction of the second starting node and the plant growth direction; and determining a second target curve at a second level based on the second curve.

[0146] The aforementioned first curve includes multiple curves; the node positions of the first starting nodes corresponding to the multiple first curves are located in a preset area; the processor in the aforementioned electronic device, by executing computer-executable instructions, can implement the following operations of the aforementioned plant growth animation generation method: determining the center position of the preset area and the first direction vector corresponding to the growth direction; determining the node position of the first starting node and the second direction vector corresponding to the center position of the area; performing fusion processing on the first direction vector and the second direction vector to determine the extension direction of the first curve; generating the first curve at the first starting node along the extension direction of the first curve.

[0147] The processor in the aforementioned electronic device can execute computer-executable instructions to perform the following operations of the above-mentioned method for generating plant growth animation: determining a first distance between the node position of the first starting node and the center position of the region; determining a first weight parameter based on the first distance; wherein, the smaller the first distance, the larger the weight parameter corresponding to the first direction vector in the first weight parameter; and performing a fusion process on the first direction vector and the second direction vector based on the first weight parameter, and determining the direction indicated by the fused direction vector as the extension direction of the first curve.

[0148] The aforementioned first curve has a preset length; the processor in the aforementioned electronic device, by executing computer-executable instructions, can perform the following operations of the aforementioned plant growth animation generation method: assigning a curve identifier to each first curve; determining a first random number corresponding to the first curve based on the curve identifier of the first curve; determining a length coefficient of the first curve based on a first distance between the node position of the first starting node and the center position of the preset area; wherein, the smaller the first distance, the larger the value of the length coefficient; determining a first length based on the length coefficient, the first random number corresponding to the first curve, and the preset length, and updating the length of the first curve to the first length.

[0149] The processor in the aforementioned electronic device, by executing computer-executable instructions, can perform the following operations of the above-mentioned method for generating plant growth animation: determining the position parameters of curve nodes on a first curve; wherein, the position parameters are used to indicate the distribution position of the curve nodes on the first curve; the position parameter of the first starting node is a first specified position parameter; the position parameter of the ending node of the first curve is a second specified position parameter; establishing a first mapping relationship between multiple position parameters and a preset noise intensity curve; wherein, the first mapping relationship includes: as the position parameters increase, the noise intensity mapped by the position parameters increases from zero to a first noise intensity; based on at least two preset sets of noise of different frequencies and the noise intensity mapped by the position parameters of the nodes, offsetting the nodes on the first curve to obtain a first target curve.

[0150] The processor in the aforementioned electronic device, by executing computer-executable instructions, can perform the following operations of the above-mentioned method for generating plant growth animation: determining a first coordinate axis corresponding to the growth direction of the plant, obtaining the component values ​​of the node positions of the curve nodes on the first curve on the first coordinate axis, and determining the first component interval where the component values ​​are located; establishing a second mapping relationship between the first component interval and a preset rotation intensity curve; wherein, the second mapping relationship includes: as the component values ​​increase, the rotation intensity mapped by the component values ​​increases from zero to a first rotation intensity; based on the rotation intensity mapped by the component values ​​of the curve nodes, rotating the curve nodes of the first curve around the first coordinate axis to obtain a first target curve.

[0151] The processor in the aforementioned electronic device, by executing computer-executable instructions, can implement the following operations of the above-mentioned method for generating plant growth animation: if the second starting node is a second node on the first target curve, determine the tangent direction of the second starting node based on the tangent direction of the second node; if the second starting node is not a curve node on the first target curve, determine the adjacent nodes of the second starting node on the first target curve; determine the first fusion parameter based on the distance between the second starting node and each adjacent node; and perform fusion processing on the tangent directions corresponding to multiple adjacent nodes based on the first fusion parameter to obtain the tangent direction of the second starting node.

[0152] The processor in the aforementioned electronic device can execute computer-executable instructions to perform the following operations of the above-mentioned method for generating plant growth animation: determining a third node on the first target curve that is adjacent to the second node; wherein the third node is a node located after the second node in the extension direction of the first target curve; determining the tangent direction of the second starting node based on the line direction connecting the second node and the third node; wherein the tangent direction of the second starting node points from the third node to the second node.

[0153] The aforementioned target curves include: a first target curve located at the first level and a second target curve located at the second level; the third starting node corresponding to the second target curve is on the first target curve located at the first level; the processor in the aforementioned electronic device, by executing computer-executable instructions, can implement the following operations of the aforementioned plant growth animation generation method: assigning a curve identifier to each first target curve; determining a second random number corresponding to each first target curve based on the curve identifier of the first target curve; determining the target growth parameters of the curve nodes on the first target curve based on the second random number corresponding to the first target curve, a preset growth adjustment coefficient, and the path value of the curve nodes on the first target curve; determining the target nodes on the first target curve adjacent to the third starting node; determining the fusion growth parameters based on the target growth parameters of the target nodes; and determining the target growth parameters of the curve nodes on the second target curve based on the fusion growth parameters and the path value of the curve nodes on the second target curve.

[0154] The processor in the aforementioned electronic device can execute computer-executable instructions to perform the following operations of the above-mentioned method for generating plant growth animation: determining target nodes on the first target curve that are adjacent to the third starting node; determining second fusion parameters based on the distance between the third starting node and each target node; and performing fusion processing on the target growth parameters of multiple target neighboring nodes based on the second fusion parameters to obtain fused growth parameters.

[0155] The processor in the aforementioned electronic device can execute computer-executable instructions to perform the following operations of the above-mentioned method for generating plant growth animation: determining the coarseness parameter of curve nodes in the target curve; wherein, for curve nodes on the same target curve, the coarseness parameter of the curve nodes decreases along the extension direction of the target curve; the higher the level of the target curve, the smaller the coarseness parameter of the starting node of the target curve.

[0156] The processor in the aforementioned electronic device can perform the following operations of the above-mentioned plant growth animation generation method by executing computer-executable instructions: performing mesh lofting processing on the target curve based on the target curve and the thickness parameters of the curve nodes in the target curve, generating a plant model, and determining the target vertex position of the model vertex of the plant model corresponding to the curve node.

[0157] This embodiment also provides a storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the above-described method for generating plant growth animations.

[0158] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining a target curve in three-dimensional space and the target node position of the curve node on the target curve; determining the path value of the curve node, and determining the target growth parameter of the curve node based on the path value; wherein the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; generating a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; obtaining preset reference growth parameters, wherein the reference growth parameters change over time; during the process of the reference growth parameters changing over time, based on the relationship between the target growth parameters of the curve node and the reference growth parameters, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, displaying the plant model at the display position, and obtaining the animation effect of the plant model.

[0159] In this method, the target curve for constructing the plant model is first determined, and the target growth parameters of each curve node are determined based on the distance between each curve node and the starting node of the target curve. Then, the target curve is meshed to generate the plant model. The model vertices of the plant model correspond to the curve nodes; that is, multiple model vertices correspond to one curve node, and each model vertex has a preset target vertex position in the plant model. Next, preset reference growth parameters are obtained. Based on the relationship between the target growth parameters and the reference growth parameters of each curve node on the target curve, the display position of the model vertex corresponding to each curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position. Specifically, when the display positions of multiple model vertices corresponding to a curve node are located at the target node position of the curve node, that is, multiple model vertices are all displayed at the same target node position, the model content corresponding to these multiple model vertices is not visible. When the display positions of multiple model vertices corresponding to a curve node are located at their respective preset target vertex positions, the model content formed by these multiple model vertices is displayed in three-dimensional space. Finally, as the reference growth parameters change dynamically over time, the real-time display positions of each model vertex are updated synchronously to obtain the animation effect of the plant model.

[0160] This method relies on a procedural production process to efficiently generate target curves and plant models. By simply adjusting the reference growth parameters, precise control of the overall plant growth animation can be achieved. The process is simple and controllable, greatly reducing the operational complexity of animation production and significantly improving the production efficiency of plant growth animation.

[0161] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining the stage type of the curve node based on the relationship between the target growth parameters and the reference growth parameters of the curve node; wherein, the stage type includes: no growth stage, growth stage, and growth completed stage; based on the stage type, determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

[0162] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the first reference growth parameter is less than the second reference growth parameter; the computer-executable instructions stored in the aforementioned storage medium, by executing the computer-executable instructions, can realize the following operations in the aforementioned method for generating plant growth animation: if the target growth parameter of the curve node is not greater than the first reference growth parameter, the curve node is determined to be in the growth completion stage; if the target growth parameter of the curve node is between the first reference growth parameter and the second reference growth parameter, the curve node is determined to be in the growth stage; if the target growth parameter of the curve node is not less than the second reference growth parameter, the curve node is determined to be in the non-growth stage.

[0163] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: if the curve node is in the growth completion stage, the display position of the model vertex corresponding to the curve node is determined as the target vertex position of the model vertex; if the curve node is in the non-growth stage, the display position of the model vertex corresponding to the curve node is determined as the target node position of the curve node; if the curve node is in the growth stage, the display position of the model vertex corresponding to the curve node is obtained by interpolating the target vertex position of the model vertex corresponding to the curve node with the target node position of the curve node.

[0164] The aforementioned reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the second reference growth parameter is determined by the first reference growth parameter and a preset growth coefficient; by controlling the first reference growth parameter to change over time, each reference growth parameter is driven to change over time.

[0165] The aforementioned target curves include multiple curves; the multiple target curves include multiple levels; the computer-executable instructions stored in the aforementioned storage medium, by executing the computer-executable instructions, can realize the following operations in the aforementioned plant growth animation generation method: determining a first starting node corresponding to a first curve in three-dimensional space, generating a first curve at the first starting node based on a preset plant growth direction; determining a first target curve at a first level based on the first curve; determining a second starting node corresponding to a second curve on the first target curve, determining the tangent direction of the second starting node, generating a second curve at the second starting node based on the tangent direction of the second starting node and the plant growth direction; determining a second target curve at a second level based on the second curve.

[0166] The aforementioned first curve includes multiple curves; the node positions of the first starting nodes corresponding to the multiple first curves are located in a preset region; the computer-executable instructions stored in the aforementioned storage medium can perform the following operations in the above-mentioned plant growth animation generation method by executing the computer-executable instructions: determining the region center position of the preset region and the first direction vector corresponding to the growth direction; determining the node position of the first starting node and the second direction vector corresponding to the region center position; performing fusion processing on the first direction vector and the second direction vector to determine the extension direction of the first curve; generating the first curve at the first starting node along the extension direction of the first curve.

[0167] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining a first distance between the node position of the first starting node and the center position of the region; determining a first weight parameter based on the first distance; wherein, the smaller the first distance, the larger the weight parameter corresponding to the first direction vector in the first weight parameter; and fusing the first direction vector and the second direction vector based on the first weight parameter, and determining the direction indicated by the fused direction vector as the extension direction of the first curve.

[0168] The aforementioned first curve has a preset length; the computer-executable instructions stored in the aforementioned storage medium, by executing the computer-executable instructions, can realize the following operations in the aforementioned method for generating plant growth animation: assigning a curve identifier to each first curve; determining a first random number corresponding to the first curve based on the curve identifier of the first curve; determining a length coefficient of the first curve based on a first distance between the node position of the first starting node and the center position of the preset area; wherein, the smaller the first distance, the larger the value of the length coefficient; determining a first length based on the length coefficient, the first random number corresponding to the first curve, and the preset length, and updating the length of the first curve to the first length.

[0169] The computer-executable instructions stored in the aforementioned storage medium can, by executing these computer-executable instructions, perform the following operations in the above-mentioned method for generating plant growth animation: determining the position parameters of curve nodes on a first curve; wherein, the position parameters are used to indicate the distribution position of the curve nodes on the first curve; the position parameter of the first starting node is a first specified position parameter; the position parameter of the ending node of the first curve is a second specified position parameter; establishing a first mapping relationship between multiple position parameters and a preset noise intensity curve; wherein, the first mapping relationship includes: as the position parameters increase, the noise intensity mapped by the position parameters increases from zero to a first noise intensity; based on at least two preset sets of noise of different frequencies and the noise intensity mapped by the position parameters of the nodes, offsetting the nodes on the first curve to obtain a first target curve.

[0170] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining a first coordinate axis corresponding to the growth direction of the plant, obtaining the component values ​​of the node positions of the curve nodes on the first curve on the first coordinate axis, and determining the first component interval where the component values ​​are located; establishing a second mapping relationship between the first component interval and a preset rotation intensity curve; wherein, the second mapping relationship includes: as the component values ​​increase, the rotation intensity mapped by the component values ​​increases from zero to a first rotation intensity; based on the rotation intensity mapped by the component values ​​of the curve nodes, rotating the curve nodes of the first curve around the first coordinate axis to obtain a first target curve.

[0171] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: if the second starting node is a second node on the first target curve, determine the tangent direction of the second starting node based on the tangent direction of the second node; if the second starting node is not a curve node on the first target curve, determine the adjacent nodes of the second starting node on the first target curve; determine the first fusion parameter based on the distance between the second starting node and each adjacent node; and perform fusion processing on the tangent directions corresponding to multiple adjacent nodes based on the first fusion parameter to obtain the tangent direction of the second starting node.

[0172] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining a third node on the first target curve that is adjacent to the second node; wherein the third node is a node located after the second node in the extension direction of the first target curve; determining the tangent direction of the second starting node based on the line direction connecting the second node and the third node; wherein the tangent direction of the second starting node points from the third node to the second node.

[0173] The aforementioned target curves include: a first target curve located at the first level and a second target curve located at the second level; the third starting node corresponding to the second target curve is on the first target curve located at the first level; the computer-executable instructions stored in the aforementioned storage medium, by executing the computer-executable instructions, can realize the following operations in the aforementioned method for generating plant growth animation: assigning a curve identifier to each first target curve; determining a second random number corresponding to each first target curve based on the curve identifier of the first target curve; determining the target growth parameters of the curve nodes on the first target curve based on the second random number corresponding to the first target curve, a preset growth adjustment coefficient, and the path value of the curve nodes on the first target curve; determining the target nodes on the first target curve adjacent to the third starting node; determining the fusion growth parameters based on the target growth parameters of the target nodes; and determining the target growth parameters of the curve nodes on the second target curve based on the fusion growth parameters and the path value of the curve nodes on the second target curve.

[0174] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining target nodes on the first target curve that are adjacent to the third starting node; determining a second fusion parameter based on the distance between the third starting node and each target node; and fusing the target growth parameters of multiple target neighboring nodes based on the second fusion parameter to obtain fused growth parameters.

[0175] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: determining the coarseness parameter of curve nodes in the target curve; wherein, for curve nodes on the same target curve, the coarseness parameter of the curve nodes decreases along the extension direction of the target curve; the higher the level of the target curve, the smaller the coarseness parameter of the starting node of the target curve.

[0176] The computer-executable instructions stored in the aforementioned storage medium can be executed to perform the following operations in the above-mentioned method for generating plant growth animation: based on the target curve and the coarseness parameters of the curve nodes in the target curve, perform mesh lofting processing on the target curve to generate a plant model, and determine the target vertex position of the model vertex of the plant model corresponding to the curve node.

[0177] The computer program product of the method, apparatus, electronic device and storage medium for generating plant growth animation provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0178] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0179] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0180] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0181] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0182] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating plant growth animation, characterized in that, The method includes: Determine the target curve in three-dimensional space and the target node positions of the curve nodes on the target curve; The path value of the curve node is determined, and the target growth parameter of the curve node is determined based on the path value; wherein the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; A plant model is generated based on the target curve; wherein, the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; Obtain preset reference growth parameters, wherein the reference growth parameters change over time; As the reference growth parameters change over time, based on the relationship between the target growth parameters of the curve nodes and the reference growth parameters, the display position of the model vertex corresponding to the curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node. The plant model is then displayed at the display position to obtain the animation effect of the plant model.

2. The method according to claim 1, characterized in that, The step of determining the display position of the model vertex corresponding to the curve node from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node based on the relationship between the target growth parameters of the curve node and the reference growth parameters includes: Based on the relationship between the target growth parameters and the reference growth parameters of the curve node, the stage type of the curve node is determined; wherein, the stage type includes: no growth stage, growth stage, and growth completed stage; Based on the stage type, the display position of the model vertex corresponding to the curve node is determined from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node.

3. The method according to claim 2, characterized in that, The reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the first reference growth parameter is smaller than the second reference growth parameter; The step of determining the stage type of the curve node based on the relationship between the target growth parameters and the reference growth parameters of the curve node includes: If the target growth parameter of the curve node is not greater than the first reference growth parameter, the curve node is determined to be in the growth completion stage. If the target growth parameter of the curve node is located between the first reference growth parameter and the second reference growth parameter, the curve node is determined to be in the growth stage. If the target growth parameter of the curve node is not less than the second reference growth parameter, the curve node is determined to be in the ungrown stage.

4. The method according to claim 2, characterized in that, The step of determining the display position of the model vertex corresponding to the curve node based on the stage type, from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, includes: If the curve node is in the growth completion stage, the display position of the model vertex corresponding to the curve node is determined as: the target vertex position of the model vertex; If the curve node is in the ungrown stage, the display position of the model vertex corresponding to the curve node is determined as: the target node position of the curve node; If the curve node is in the growth stage, the display position of the model vertex corresponding to the curve node is obtained by interpolating the target vertex position of the model vertex corresponding to the curve node with the target node position of the curve node.

5. The method according to claim 1, characterized in that, The reference growth parameters include: a first reference growth parameter and a second reference growth parameter; the second reference growth parameter is determined by the first reference growth parameter and a preset growth coefficient; the reference growth parameter is driven to change over time by controlling the first reference growth parameter to change over time.

6. The method according to claim 1, characterized in that, The target curve includes multiple curves; The multiple target curves include multiple levels; The steps for determining a target curve in three-dimensional space include: In the three-dimensional space, a first starting node corresponding to the first curve is determined, and a first curve is generated at the first starting node based on the preset growth direction of the plant. Based on the first curve, determine the first target curve located in the first level; On the first target curve, determine the second starting node corresponding to the second curve, determine the tangent direction of the second starting node, and generate the second curve at the second starting node based on the tangent direction of the second starting node and the growth direction of the plant. Based on the second curve, a second target curve located at the second level is determined.

7. The method according to claim 6, characterized in that, The first curve includes multiple curves; the node positions of the first starting nodes corresponding to the multiple first curves are located in a preset area; The step of generating a first curve at the first starting node based on the preset growth direction of the plant includes: Determine the center position of the preset region and the first direction vector corresponding to the growth direction; Determine the second direction vector corresponding to the node position of the first starting node and the center position of the region; The first direction vector and the second direction vector are fused to determine the extension direction of the first curve; At the first starting node, the first curve is generated along the extension direction of the first curve.

8. The method according to claim 7, characterized in that, The step of fusing the first direction vector and the second direction vector to determine the extension direction of the first curve includes: Determine the first distance between the node position of the first starting node and the center position of the region; Based on the first distance, the first weight parameter is determined; wherein, the smaller the first distance, the larger the weight parameter corresponding to the first direction vector in the first weight parameter; Based on the first weight parameter, the first direction vector and the second direction vector are fused, and the direction indicated by the fused direction vector is determined as the extension direction of the first curve.

9. The method according to claim 7, characterized in that, The first curve has a preset length; after the step of generating the first curve along its extension direction, the method further includes: Assign a curve identifier to each of the first curves; determine a first random number corresponding to the first curve based on the curve identifier of the first curve; The length coefficient of the first curve is determined based on the first distance between the node position of the first starting node and the center position of the preset area; wherein, the smaller the first distance, the larger the value of the length coefficient; Based on the length coefficient, the first random number corresponding to the first curve, and the preset length, a first length is determined, and the length of the first curve is updated to the first length.

10. The method according to claim 6, characterized in that, The step of determining the first target curve located at the first level based on the first curve includes: Determine the position parameters of the curve nodes on the first curve; wherein, the position parameters are used to indicate the distribution position of the curve nodes on the first curve; the position parameter of the first starting node is a first specified position parameter; the position parameter of the ending node of the first curve is a second specified position parameter; A first mapping relationship is established between multiple location parameters and a preset noise intensity curve; wherein, the first mapping relationship includes: as the location parameters increase, the noise intensity mapped by the location parameters increases from zero to a first noise intensity; Based on the noise intensity mapped from at least two sets of noise of different frequencies and the position parameters of the nodes, the nodes on the first curve are offset to obtain the first target curve.

11. The method according to claim 6, characterized in that, The step of determining the first target curve located at the first level based on the first curve includes: Determine the first coordinate axis corresponding to the growth direction of the plant, obtain the component value of the node position of the curve node on the first curve on the first coordinate axis, and determine the first component interval where the component value is located. A second mapping relationship is established between the first component interval and a preset rotation intensity curve; wherein, the second mapping relationship includes: as the component value increases, the rotation intensity mapped by the component value increases from zero to a first rotation intensity; Based on the rotation intensity mapped by the component values ​​of the curve nodes, the curve nodes of the first curve are rotated around the first coordinate axis to obtain the first target curve.

12. The method according to claim 6, characterized in that, The step of determining the tangent direction of the second starting node includes: If the second starting node is a second node on the first target curve, the tangent direction of the second node is used to determine the tangent direction of the second starting node; If the second starting node is not a curve node on the first target curve, determine the adjacent nodes of the second starting node on the first target curve; determine the first fusion parameter based on the distance between the second starting node and each of the adjacent nodes; and perform fusion processing on the tangent directions corresponding to the multiple adjacent nodes based on the first fusion parameter to obtain the tangent direction of the second starting node.

13. The method according to claim 12, characterized in that, The step of determining the tangent direction of the second node includes: Determine the third node on the first target curve that is adjacent to the second node; wherein the third node is a node located after the second node in the extension direction of the first target curve; Based on the direction of the line connecting the second node and the third node, the tangent direction of the second node is determined; wherein, the tangent direction of the second node is from the third node to the second node.

14. The method according to claim 1, characterized in that, The target curve includes: a first target curve located at the first level and a second target curve located at the second level; the third starting node corresponding to the second target curve is on the first target curve located at the first level; The step of determining the target growth parameters of the curve node based on the path value includes: Assign a curve identifier to each of the first target curves, and determine a second random number corresponding to each first target curve based on the curve identifier of the first target curve; Based on the second random number corresponding to the first target curve, the preset growth adjustment coefficient, and the path value of the curve node on the first target curve, the target growth parameter of the curve node on the first target curve is determined. Identify the target node on the first target curve that is adjacent to the third starting node, and determine the fusion growth parameter based on the target growth parameter of the target node; determine the target growth parameter of the curve node on the second target curve based on the fusion growth parameter and the path value of the curve node on the second target curve.

15. The method according to claim 14, characterized in that, The step of determining the target node adjacent to the third starting node on the first target curve, and determining the fusion growth parameters based on the target growth parameters of the target node, includes: Determine the target node on the first target curve that is adjacent to the third starting node; Based on the distance between the third starting node and each of the target nodes, the second fusion parameter is determined. Based on the second fusion parameter, the target growth parameters of multiple target neighbor nodes are fused to obtain the fused growth parameter.

16. The method according to claim 1, wherein prior to the step of generating the plant model based on the target curve, the method comprises: Determine the coarseness parameters of the curve nodes in the target curve; Among them, the thickness parameter of the curve nodes on the same target curve decreases along the extension direction of the target curve; the higher the level of the target curve, the smaller the thickness parameter of the starting node of the target curve.

17. The method according to claim 16, characterized in that, The step of generating the plant model based on the target curve includes: Based on the target curve and the coarseness parameters of the curve nodes in the target curve, a mesh lofting process is performed on the target curve to generate the plant model, and the target vertex position of the plant model vertex corresponding to the curve node is determined.

18. A device for generating plant growth animation, characterized in that, The device includes: The first determining module is used to determine the target curve in three-dimensional space and the target node positions of the curve nodes on the target curve. The second determining module determines the path value of the curve node and, based on the path value, determines the target growth parameter of the curve node; wherein, the path value is used to indicate the distance between the curve node and the starting node of the target curve along the extension direction of the target curve; The first generation module is used to generate a plant model based on the target curve; wherein the model vertices in the plant model correspond to the curve nodes, and the model vertices have preset target vertex positions; The first acquisition module is used to acquire preset reference growth parameters, wherein the reference growth parameters change over time; The first display module is used to determine the display position of the model vertex corresponding to the curve node based on the relationship between the target growth parameter of the curve node and the reference growth parameter during the change of the reference growth parameter over time, from the target node position of the curve node and the target vertex position of the model vertex corresponding to the curve node, and display the plant model at the display position to obtain the animation effect of the plant model.

19. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the method for generating plant growth animations according to any one of claims 1-17.

20. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for generating plant growth animations according to any one of claims 1-17.