Tree animation simulation method and system based on sketch
By converting two-dimensional sketches into graph structures and assigning physical properties, realistic three-dimensional tree animations are generated using graph neural networks and tree growth algorithms. This solves the problem of lack of authenticity in tree animations in existing technologies and realizes the simulation of branch force and shape changes.
Patent Information
- Application Number
- CN202410262308.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2025-09-09
AI Technical Summary
Existing tree animation simulation methods lack realism and cannot simulate the pulling and breaking of individual branches, and users cannot modify the tree shape to achieve rich simulation effects.
The two-dimensional sketch is converted into a graph structure, and physical properties are assigned to the edges. The three-dimensional branch structure is predicted through a graph neural network, and a three-dimensional tree model is generated by combining it with a tree growth algorithm. Physical simulation is performed to generate realistic animations, taking into account the force and bearing capacity of the branches.
The generated tree animation is more realistic and reliable, can simulate the shaking and breaking of branches, supports users to draw tree models of any shape, and provides realistic animation effects.
Smart Images

Figure CN120612411A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer graphics technology, and in particular to a sketch-based tree animation simulation method and system. Background Art
[0002] Existing interactive tree modeling methods typically specify tree morphological characteristics through interactive operations and combine them with traditional tree growth algorithms to generate realistic 3D tree models. For example, some methods draw a 2D tree outline to guide the tree's final growth shape, others use a directional field to direct the growth direction of tree branches, some sketch the branches and leaves to specify the generated tree species characteristics, and still others use VR devices to draw a bounding box of a specified shape to accurately obtain the tree's 3D spatial information, guiding the growth range of each tree branch.
[0003] There are two approaches to simulating tree animation. The first uses a predefined noise function to cause the input branch structure to vibrate at a certain frequency, thereby generating simulated branch animation. While this method is relatively simple to implement, the resulting tree animation lacks a certain degree of realism. The second approach is to assign physical properties to the tree model structure and combine it with Newtonian mechanics to perform physical simulation of the branches, resulting in more realistic and reliable tree animation.
[0004] Existing tree animation solutions are mostly designed for scenarios where trees sway in the wind. They simulate wind forces affecting all branches, but lack the physical simulation required to pull individual branches. Furthermore, the input data is often in the form of tree point clouds or 3D models, preventing users from modifying the tree's shape to achieve richer simulation effects. Finally, existing physical simulation methods assume that tree branches will not break, which can sometimes produce simulation effects that contradict reality. Summary of the Invention
[0005] In view of this, the present invention provides a sketch-based tree animation simulation method and system to solve the above problems.
[0006] The present invention provides a sketch-based tree animation simulation method, comprising: representing a two-dimensional sketch as a graph structure consisting of nodes and edges, wherein the information contained in the nodes is the corresponding two-dimensional coordinates, and the edges represent the topological information of the connection between the nodes; assigning physical properties to each edge in the graph structure, and performing physical simulation based on the physical properties, wherein the physical properties include mass, velocity, angular acceleration, etc.; predicting the graph structure through a graph neural network to obtain a three-dimensional branch structure of the tree; growing small branches and leaves on the three-dimensional branch structure through a tree growth algorithm to obtain a three-dimensional tree model; and changing the spatial structure of the three-dimensional tree model accordingly according to the two-dimensional node position of each frame during the physical simulation process, and keeping the relative orientation of the small branches, leaves, etc. generated on the three-dimensional branch structure and the main branches unchanged to generate a three-dimensional tree animation.
[0007] In another implementation of the present invention, the physical simulation includes: when the user pulls the two-dimensional branch, the branch bends and generates corresponding resistance inside to balance the external force; when the user releases the two-dimensional branch, the resistance is calculated based on the current angular deviation value of the branch under force, and the damping force is calculated based on the current linear velocity; the resistance, damping and the transmission force of the parent branch from the child branch are formed into a resultant force, and the motion data of the branch under the action of the resultant force is calculated through Newton's laws of motion, and the new position, speed and other information of the branch are updated.
[0008] In another implementation of the present invention, the sketch-based tree animation simulation method further includes: calculating a bearing capacity threshold of each edge according to the physical properties of each edge; when the force applied by the user is less than the bearing capacity threshold, the tree will shake; when the force applied by the user is greater than the bearing capacity threshold, the branches will break.
[0009] Another aspect of the present invention provides a sketch-based tree animation simulation system, comprising: a data processing module: representing a two-dimensional sketch as a graph structure consisting of nodes and edges, wherein the information contained in the nodes is their corresponding two-dimensional coordinates, and the edges represent the topological information of the connection between nodes; assigning physical properties to each edge in the graph structure, and performing physical simulation based on the physical properties, wherein the physical properties include mass, velocity, angular acceleration, etc.; a model generation module: predicting the graph structure through a graph neural network to obtain a three-dimensional branch structure of the tree; using a tree growth algorithm to grow small branches and leaves on the three-dimensional branch structure to obtain a three-dimensional tree model; an animation generation module: changing the spatial structure of the three-dimensional tree model accordingly according to the two-dimensional node position of each frame in the physical simulation process, and keeping the relative orientation of the small branches, leaves, etc. generated on the three-dimensional branch structure and the main branches unchanged to generate a three-dimensional tree animation.
[0010] The sketch-based tree animation simulation method of the present invention performs simulation interaction based on a two-dimensional sketch input by the user, and generates realistic and reliable animations of trees of arbitrary shapes by mapping the two-dimensional sketch to a three-dimensional model. In view of the problem that existing tree simulation methods do not consider the bearing capacity of branches and trunks, a force model based on two-dimensional branches and trunks is proposed, so that the generated animation is more in line with actual conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. By reading the detailed description of the embodiments below, the advantages and benefits of the solutions will become clear to those skilled in the art. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. In the drawings:
[0012] Figure 1 The figure is a flowchart of a sketch-based tree animation simulation method according to an embodiment of the present invention.
[0013] Figure 2 Schematic diagram of the process of generating a three-dimensional tree animation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0014] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and detailedly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0015] Figure 1 The present invention provides a method for simulating tree animation based on sketches, such as Figure 1 As shown, this embodiment mainly includes the following steps:
[0016] S101. Represent the two-dimensional sketch as a graph structure consisting of nodes and edges, wherein the information contained in the nodes is the corresponding two-dimensional coordinates, and the edges represent the topological information of the connections between the nodes.
[0017] S102. Assign physical properties to each edge in the graph structure and perform physical simulation based on the physical properties, where the physical properties include mass, velocity, angular acceleration, etc.
[0018] For example, Figure 2As shown, the two-dimensional sketch drawn by the user is converted into a two-dimensional edge structure, and the edge is given real-world physical properties such as mass, velocity, angular acceleration, etc. to achieve high-quality physical simulation.
[0019] S103. Predict the graph structure through a graph neural network to obtain the three-dimensional branch structure of the tree.
[0020] For example, a graph neural network is used to process the graph structure corresponding to the two-dimensional sketch, and the prediction ability of the neural network is used to obtain the spatial information of all nodes, thereby obtaining the corresponding three-dimensional branch structure.
[0021] S104: Using a tree growth algorithm, small branches and leaves are grown on the three-dimensional branch structure to obtain a three-dimensional tree model.
[0022] For example, a three-dimensional tree model similar to the shape of the two-dimensional sketch can be obtained based on the three-dimensional branch structure. However, since the obtained model is too monotonous, a tree growth algorithm is used to grow some small branches and leaves on the original branch structure to enrich the final tree model.
[0023] S105. According to the two-dimensional node position of each frame in the physical simulation process, the spatial structure of the three-dimensional tree model is changed accordingly, and the relative orientation of the small branches, leaves, etc. generated on the three-dimensional branch structure and the main branches is kept unchanged to generate a three-dimensional tree animation.
[0024] For example, a 2D sketch-based physical simulation records the position of each node in each frame. The node positions in the first frame are selected as the initial form of the tree model. The static tree model is then generated using the 3D branch structure information inferred by the graph neural network. The spatial structure of the 3D branches is then modified accordingly based on the 2D node positions in each frame, while maintaining the relative orientation of the small branches and leaves generated on the branch structure relative to the main branch. This allows for the generation of realistic 3D tree animations while maintaining authenticity.
[0025] The sketch-based tree animation simulation method of the present invention performs simulation interaction based on a two-dimensional sketch input by the user, and generates realistic and reliable animations of trees of arbitrary shapes by mapping the two-dimensional sketch to a three-dimensional model. In view of the problem that existing tree simulation methods do not consider the bearing capacity of branches and trunks, a force model based on two-dimensional branches and trunks is proposed, so that the generated animation is more in line with actual conditions.
[0026] In another implementation of the present invention, the physical simulation includes: when the user pulls the two-dimensional branch, the branch bends and generates corresponding resistance inside to balance the external force; when the user releases the two-dimensional branch, the resistance is calculated based on the current angular deviation value of the branch under force, and the damping force is calculated based on the current linear velocity; the resistance, damping and the transmission force of the parent branch from the child branch are formed into a resultant force, and the motion data of the branch under the action of the resultant force is calculated through Newton's laws of motion, and the new position, speed and other information of the branch are updated.
[0027] For example, when the user pulls a two-dimensional branch, the branch bends and generates corresponding resistance internally to balance the external force. When the branch is released, the branch edge under force will calculate the resistance based on the current angle deviation value, and the damping force value will be calculated based on the current linear velocity. In order to represent the influence of the child branch on the parent branch, it will also be affected by the transmission force of the child branch. The above forces will form a resultant force, and through Newton's laws of motion, the new position, speed and other information of the branch will be updated.
[0028] It should be understood that the tree animation generation framework based on two-dimensional stroke interaction allows users to draw tree models of any shape to generate tree animations with dragging branches, which solves the problem of the existing technology requiring the formulation of tree models. At the same time, generating animations based on two-dimensional sketch interaction is also more conducive to user operation.
[0029] In another implementation of the present invention, the sketch-based tree animation simulation method further includes: calculating a bearing capacity threshold of each edge according to the physical properties of each edge; when the force applied by the user is less than the bearing capacity threshold, the tree will shake; when the force applied by the user is greater than the bearing capacity threshold, the branches will break.
[0030] For example, to more realistically simulate the effects of branches under load, a maximum load capacity is calculated for each edge. When the force applied by the user is within the threshold, the tree will shake normally. If the force exceeds the threshold, the branch may break. Considering the branch's load capacity, a force model based on two-dimensional branches is proposed, which can more realistically simulate the animation effects of tree branches under load in real life.
[0031] Another aspect of the present invention provides a sketch-based tree animation simulation system, comprising:
[0032] Data processing module: Represents the two-dimensional sketch as a graph structure consisting of nodes and edges, where the information contained in the nodes is their corresponding two-dimensional coordinates, and the edges represent the topological information of the connection between nodes; assigns physical properties to each edge in the graph structure, and performs physical simulation based on the physical properties, including mass, velocity, angular acceleration, etc.
[0033] Model generation module: The graph structure is predicted through a graph neural network to obtain the three-dimensional branch structure of the tree; small branches and leaves are grown on the three-dimensional branch structure through a tree growth algorithm to obtain a three-dimensional tree model.
[0034] Animation generation module: Based on the 2D node positions in each frame during the physical simulation process, the spatial structure of the 3D tree model is changed accordingly, while the relative orientation of the small branches, leaves, etc. generated on the 3D branch structure and the main branches remains unchanged to generate a 3D tree animation.
[0035] The sketch-based tree animation simulation system of the present invention performs simulation interaction based on a two-dimensional sketch input by the user, and generates realistic and reliable animations of trees of arbitrary shapes by mapping the two-dimensional sketch to a three-dimensional model. In view of the problem that existing tree simulation methods do not consider the bearing capacity of branches and trunks, a force model based on two-dimensional branches and trunks is proposed, so that the generated animation is more in line with actual conditions.
[0036] Thus far, specific embodiments of the present invention have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing may be advantageous.
[0037] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0038] In the description of the present invention, the terms "first" and "second" are used solely to facilitate description of different components or names and should not be construed as indicating or implying a sequential relationship, relative importance, or implicitly specifying the quantity of the technical features being described. Therefore, features specified as "first" or "second" may explicitly or implicitly include at least one of such features.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0040] It should be noted that although the specific embodiments of the present invention are described in detail in conjunction with the accompanying drawings, this should not be construed as limiting the scope of protection of the present invention. Within the scope described by the claims, various modifications and variations that can be made by those skilled in the art without creative effort still fall within the scope of protection of the present invention.
[0041] The examples of the embodiments of the present invention are intended to briefly illustrate the technical features of the embodiments of the present invention so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to improperly limit the embodiments of the present invention.
[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A sketch-based tree animation simulation method, characterized in that: include: Representing a two-dimensional sketch as a graph structure consisting of nodes and edges, wherein the information contained in the nodes is their corresponding two-dimensional coordinates, and the edges represent the topological information of the connections between nodes; Assigning physical properties to each edge in the graph structure and performing physical simulation based on the physical properties, wherein the physical properties include mass, velocity, angular acceleration, etc.; The graph structure is predicted through a graph neural network to obtain the three-dimensional branch structure of the tree; Using a tree growth algorithm to grow small branches and leaves on the three-dimensional branch structure to obtain a three-dimensional tree model; According to the two-dimensional node position of each frame in the physical simulation process, the spatial structure of the three-dimensional tree model is changed accordingly, and the relative orientation of the small branches, leaves, etc. generated on the three-dimensional branch structure and the main branches remains unchanged to generate a three-dimensional tree animation.
2. The method according to claim 1, characterized in that The physical simulation includes: When the user pulls the two-dimensional branches, they bend and generate corresponding resistance internally to balance the external force; When the user releases a two-dimensional branch, the resistance is calculated based on the current angle deviation of the branch under force, and the damping force is calculated based on the current linear velocity; The resistance force, damping force and the transmission force of the parent branch from the child branch are formed into a resultant force, and the motion data of the branch under the action of the resultant force is calculated using Newton's law of motion to update the new position, speed and other information of the branch.
3. The method according to claim 2, characterized in that Also includes: Calculate the tolerance threshold of each edge based on the physical properties of each edge; When the force applied by the user is less than the tolerance threshold, the tree will shake; When the force applied by the user is greater than the bearing capacity threshold, the branch will break.
4. A sketch-based tree animation simulation system, characterized in that: include: Data processing module: represents the 2D sketch as a graph structure consisting of nodes and edges, where the nodes contain information about their corresponding 2D coordinates and the edges represent the topological information of the connections between nodes; assigns physical properties to each edge in the graph structure and performs physical simulation based on the physical properties, including mass, velocity, angular acceleration, etc.; Model generation module: predicts the graph structure through a graph neural network to obtain a three-dimensional branch structure of the tree; uses a tree growth algorithm to grow small branches and leaves on the three-dimensional branch structure to obtain a three-dimensional tree model; Animation generation module: According to the two-dimensional node position of each frame in the physical simulation process, the spatial structure of the three-dimensional tree model is changed accordingly, and the relative orientation of the small branches, leaves, etc. generated on the three-dimensional branch structure and the main branches remains unchanged to generate a three-dimensional tree animation.