WO2019200683A1 - 一种基于草图实现形状保持的树木变形动画方法 - Google Patents

一种基于草图实现形状保持的树木变形动画方法 Download PDF

Info

Publication number
WO2019200683A1
WO2019200683A1 PCT/CN2018/091223 CN2018091223W WO2019200683A1 WO 2019200683 A1 WO2019200683 A1 WO 2019200683A1 CN 2018091223 W CN2018091223 W CN 2018091223W WO 2019200683 A1 WO2019200683 A1 WO 2019200683A1
Authority
WO
WIPO (PCT)
Prior art keywords
tree
silhouette
leaf cluster
deformation
dimensional
Prior art date
Application number
PCT/CN2018/091223
Other languages
English (en)
French (fr)
Inventor
王雨桐
王露苑
金小刚
Original Assignee
浙江大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江大学 filed Critical 浙江大学
Priority to US16/618,752 priority Critical patent/US11217010B2/en
Publication of WO2019200683A1 publication Critical patent/WO2019200683A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation

Definitions

  • the invention relates to the field of computer graphics, tree modeling and computer animation, in particular to a sketch-based shape maintaining tree deformation animation method.
  • trees are an integral part of describing the environment.
  • computer-generated three-dimensional trees have appeared widely in film and television entertainment, three-dimensional games and virtual reality scenes.
  • the three-dimensional modeling of trees dates back to the 1960s. Despite a long history, experts in various fields such as computer and botany continue to pay high attention to this direction, and many modeling methods have been proposed to create more realistic and beautiful three-dimensional tree models. . According to different modeling purposes, these methods can be roughly divided into two categories: static 3D tree modeling methods and dynamic tree animation methods.
  • the core of the static 3D tree modeling method is to generate realistic 3D tree geometry.
  • the purpose of the dynamic tree animation method is to generate visually beautiful 3D animation effects, including tree growth effects and trees in light, obstacles, wind and rain. Interaction with the environment under the influence of factors such as fire.
  • Tree animation to achieve shape retention needs to address two key technical challenges: first, how to maintain the continuity of the topology in the tree deformation animation, that is, the branches that do not break and float; the second how to preserve the topology hierarchy while Deformation is made to form a morphologically significant crown.
  • the shape-maintained 3D tree deformation animation is closely related to the three directions of shape-guided 3D tree modeling, traditional 3D tree animation, and the topology-maintaining tree deformation animation proposed in recent years.
  • ACM Transactions onGraphics (TOG), 32(4): 84, 2013) generated animated effects of visually beautiful trees shaking in the wind; Pirk et al. Pirk, Ondrej Stava, Julian Kratt, Michel Abdul Massih Said, Boris Neubert, Randomir Mech, Bedrich Benes, and Oliver Deussen. Plastic trees: interactive self-adapting botanical tree models [J].
  • ACMTransactions on Graphics (TOG), 31 (4 ): 50, 2012) Realistically simulates the interaction of trees with the environment under the influence of light and obstacles. Although the shape of the tree changes depending on the environment, the existing method does not explicitly preserve the morphological meaning of the crown during the animation, and therefore does not meaningfully change the tree into a shape defined by the user.
  • the present invention provides a tree deformation animation method based on a sketch for shape retention, which can smoothly transform a tree into a tree having a specific crown shape as specified on the sketch.
  • a tree deformation animation method based on a sketch to achieve shape retention comprising the following steps:
  • the three-dimensional tree model is represented by a skeleton and a cluster of leaves, including:
  • the leaf clusters also obey the strict parent-child hierarchical relationship, so the hierarchical relationship between different leaf clusters can be described as a multi-scale leaf cluster topology tree.
  • the outer leaf cluster is regarded as the surrounding mesh of the inner leaf cluster. Therefore, at a selected viewing angle, the silhouette contour of the outer leaf cluster can also be regarded as the surrounding polygon of the inner leaf cluster silhouette. By using this property, the relative positional relationship between the inner leaf cluster silhouette and the outer leaf cluster silhouette contour can be represented by mean coordinates.
  • step (3) Selecting the angle of interest, detecting the crown silhouette of the three-dimensional tree model described in step (2), drawing a silhouette of the deformed animation target crown silhouette based on the sketch, and then mapping the sketch to the crown silhouette of the object space on;
  • the method for creating a three-dimensional tree model described in step (1) is: reconstructing a three-dimensional tree model based on point cloud data of real trees, and the obtained three-dimensional tree model is more realistic.
  • the virtual tree model can also be generated by a computer based on the L-system or by a three-dimensional modeling software such as Maya, 3Ds Max.
  • the above method is highly flexible and expandable, and it can generate shape-changing deformation animations for different kinds of trees (including trees and shrubs) with different topologies.
  • the Laplacian contraction algorithm is used to extract the skeleton of the trunk in the three-dimensional tree model: the model vertex of the three-dimensional tree trunk is moved in the opposite direction of its normal, that is, contracted. Because the trunk is similar to the characteristics of the cylinder, the vertices on the trunk cross-section finally converge and converge into a point, that is, the skeleton point, and the skeleton points are connected according to the topological structure of the trunk to obtain the skeleton of the trunk to shrink all the vertices of the front trunk model cross section. The average distance to the skeleton point is taken as the radius of the skeleton point, thereby simplifying the three-dimensional trunk model into a skeleton + radius description.
  • the skeleton extracted using the Laplacian contraction algorithm in step (2.2) is restored to a three-dimensional model of the trunk using a sphere sweeping method.
  • the object space silhouette contour of the three-dimensional tree model canopy is detected, and the object space silhouette contour is formed by a series of edges on the three-dimensional tree model, the vertex normal vectors n i and n j of these edges and the direction of the line of sight v satisfies the following relationship:
  • the advantage of the object space silhouette contour is its accuracy, which facilitates direct manipulation and control of the 3D model.
  • the deformed animated target canopy silhouette contour is drawn, the region of interest on the crown silhouette line is redrawed, and the shape of the existing canopy is slightly modified as a sketch, and local deformation can be realized. Does not affect the whole.
  • step (3) a new sketch can also be redrawn as the silhouette outline of the target axis of the deformation animation.
  • step (4) transmits the deformation of the canopy to the trunk through the multi-scale leaf cluster topology and the Laplace deformation algorithm, the specific process is:
  • the outer leaf cluster is regarded as the surrounding grid of the inner leaf cluster, and a multi-scale leaf cluster topology tree is established;
  • step (4.1) establishes a multi-scale leaf cluster topology tree and then prunes the branches outside the contour outline of the deformation animation target crown.
  • the step (4.1) is specifically: using a Vatti polygon clipping algorithm to intersect the contour of the deformed target crown silhouette and the original crown silhouette, and calculating the ratio of the intersection area to the area of the original crown silhouette contour surrounding area, For r, it is determined whether the leaf cluster is trimmed based on r, and it is determined that the branches surrounded by the trimmed leaf cluster gradually disappear in the deformation animation, and a more natural deformation result is obtained.
  • the step (4.2) is specifically: first calculating the mean coordinate of the silhouette layer of the inner layer leaf cluster relative to the outline of the outer leaf cluster silhouette. Subsequently, after the outer leaf cluster silhouette contour is deformed, the Cartesian coordinates of the inner leaf cluster silhouette contour vertex are updated by using the inner leaf cluster silhouette contour relative to the mean coordinate of the outer leaf cluster silhouette contour. Next, continue to deform the inner leaf clusters using the following formula to cover the outer leaf cluster silhouette as much as possible:
  • V is the set of vertices
  • E is the set of edges
  • v i and v′ i are the Cartesian coordinates of the vertices on the outline of the leaf cluster before and after the deformation, respectively.
  • ⁇ i is the differential coordinate of v i
  • C is the set of vertices locally matched by the leaf cluster and the outer silhouette contour line
  • v j and v′ j are the silhouette contours of the inner leaf cluster before and after deformation in the set C, respectively.
  • step (4.3) are:
  • v i and v′ i are Cartesian coordinates of the model vertices on the leaf cluster before and after deformation
  • ⁇ i is the differential coordinate of v i
  • C is the set of vertices on the silhouette of the leaf cluster silhouette
  • v j and v′ j are respectively The vertices Cartesian coordinates of the silhouette of the leaf cluster silhouette after deformation before and after deformation.
  • the three-dimensional model of the new leaf cluster conforming to the contour of the leaf cluster after deformation in the selected angle of view in step (3) is obtained by the least square method
  • the innermost leaf cluster is regarded as the surrounding mesh of the end of the branch. Due to the deformation of the crown, the new position of the end of the branch after deformation is calculated by the mean coordinate of the end of the branch relative to the innermost leaf cluster;
  • step (4.3.4) Solving the cotangent weight Laplacian operator of the branches in the three-dimensional tree model, establishing the differential coordinate equation, and using the end point of the branch as the fixed point, the end of the branch obtained in step 4.3.3) The new position is used as the moving point, and the full rank linear equation system of step (4.3.2) is established to solve the deformed branches;
  • the invention provides a tree deformation animation method for realizing shape retention based on a sketch, and has the following effects:
  • the tree deformation animation method based on sketch to realize shape retention according to the present invention allows interactively designing and controlling deformation animation effects, maintaining tree topological consistency and canopy morphological meaning;
  • the present invention provides an intuitive three-dimensional tree editing operation, which can effectively edit a three-dimensional tree model by simply drawing a sketch, and transform it into a crown shape depicted by a sketch.
  • the method is clear, the interface is friendly, and the result is Lu. Great, can be used in computer animation, digital entertainment, 3D games and other fields.
  • FIG. 1 is a flow chart of a tree deformation animation method based on a sketch to achieve shape retention according to the present invention
  • a is a schematic diagram of a created three-dimensional tree model
  • b is a schematic diagram of a skeleton and a leaf cluster representing a three-dimensional tree model
  • c is a sketch-based deformation animation target crown silhouette profile Line diagram
  • d is a schematic diagram of the process of tree deformation animation
  • FIG. 3 is a schematic diagram of a process for establishing a multi-scale leaf cluster topological tree in an embodiment of the present invention, wherein a is a schematic diagram of an input three-dimensional tree model, b is a schematic diagram of a three-dimensional tree model represented by a skeleton and a cluster of leaves, and c is a multi-scale for a three-dimensional tree model.
  • a schematic diagram represented by a cluster of leaves, d is a schematic diagram of a multi-scale leaf cluster topology tree;
  • FIG. 4 is a diagram showing an effect of an animation of a tree deformation in an embodiment of the present invention.
  • the tree deformation animation method based on the sketch to realize shape retention of the present invention includes the following steps:
  • S101 Create a three-dimensional tree model, as shown in a of FIG. 2;
  • a point cloud and texture information of real-world three-dimensional trees are acquired by a hardware device such as a laser scanner to create a three-dimensional tree model.
  • S102 The three-dimensional tree model is represented by a skeleton and a cluster of leaves, as shown by b in FIG. 2, and the specific steps are:
  • S1021 separating the leaves and trunks of the step (1) three-dimensional tree model using a three-dimensional modeling software such as Maya, 3DsMax, and the trunk includes a trunk portion and a branch portion of the tree;
  • the Laplacian contraction algorithm is used to extract the skeleton: the model vertex of the three-dimensional tree trunk is moved in the opposite direction of its normal, that is, contracted. Because the trunk is similar to the characteristics of the cylinder, the vertices on the trunk cross-section will eventually converge and converge into a point, the skeleton point. The skeleton points are connected according to the topological structure of the trunk to obtain the skeleton of the trunk. The average value of the distance from all the vertices on the cross section of the trunk model to the skeleton point is used as the radius of the skeleton point, thereby simplifying the three-dimensional trunk model into a skeleton. + radius description;
  • S1023 Based on the human's visual cognition of the trunk structure and the overall shape of the canopy, the canopy is split into outer contours composed of leaves, ie, clusters of leaves. Among them, the cluster of leaves composed of all the leaves is called the canopy of the three-dimensional tree model. Due to the inherent hierarchical relationship of trees, these clusters of leaves are strictly subject to such hierarchical relationships. Establish a multi-scale leaf cluster topology tree to describe the hierarchical relationship between them, the steps are as follows:
  • S201 input a three-dimensional tree model, as shown by a in FIG. 3;
  • S202 The three-dimensional tree model is represented by a skeleton and a cluster of leaves, as shown by b in FIG. 3;
  • the crown silhouette contour is composed of a series of edges on the model, and the vertex normal vectors n i and n j of the edges satisfy the line of sight direction v.
  • the contour of the object space is obtained by the method proposed by Hertzmann et al. Specifically, for a closed three-dimensional mesh model, each side of the model has two adjacent triangular patches. Under one viewpoint, if one of the triangular patches is visible and the other triangular patch is not It can be seen that if the above formula is satisfied, the edge is the edge of the silhouette line of the model under the viewpoint. Traverse the entire model, collect all the edges that satisfy the above formula, and connect them with the depth-first algorithm to form the object space silhouette contour of the model.
  • mapping the sketch from the screen space to the canopy silhouette line of the object space is established by parameterizing the arc length. The specific steps are as follows:
  • l i is the length from the starting point of the silhouette contour to the vertex v i
  • l is the total length of the silhouette contour, thereby completing the dispersion of the silhouette contour into the [0, 1] space
  • S1032 Perform arc length parameterization on the redrawed sketch in the screen space, and discretize it into the [0, 1] space;
  • S104 The crown profile of the three-dimensional tree model is gradually deformed into a silhouette contour of the deformation animation target crown, and the deformation of the crown silhouette of the three-dimensional tree model is transmitted to the branches to obtain a smooth deformation process of the tree, as shown in FIG. 2 As shown in d, the specific steps are:
  • the outer leaf cluster After obtaining the silhouette target silhouette of the canopy, the outer leaf cluster is regarded as the surrounding network of the inner leaf cluster according to the hierarchical relationship between the crown and the leaf cluster and the nature of the outer leaf cluster wrapped by the outer leaf cluster And establish a multi-scale leaf cluster topology tree;
  • S1042 Detecting the positional relationship between the branches and the target silhouette contours in the three-dimensional tree model, and appropriately pruning the branches located outside the outline of the deformation target silhouette. Based on the multi-scale leaf cluster topology tree, the pruning process starts from the coarsest scale.
  • the deformation target crown silhouette line and the original crown silhouette line are intersected, and the ratio of the intersection area to the area of the original canopy outline surrounding area is calculated, denoted as r, based on r, the branches are trimmed by the following test .
  • r is approximately 1, it means that the silhouette contour of the reference silhouette contour surrounding the leaf cluster is almost completely inside the deformation target silhouette contour, and no more trim test is needed, and the leaf cluster and the leaf cluster are included. Branches of all leaf clusters do not need to be pruned;
  • the silhouette contour of the outer leaf cluster is regarded as the enclosing polygon of the inner leaf cluster silhouette contour line at a selected viewing angle.
  • the relative positional relationship between the outline of the inner leaf cluster and the silhouette of the outer leaf cluster is represented by the mean coordinate. The expression is:
  • p i and v j are the vertices Cartesian coordinates of the inner and outer leaf cluster silhouette lines
  • ⁇ ij is the mean coordinate
  • C is the vertex set of the outer leaf cluster silhouette contour.
  • p' i and v' j are respectively the vertices Cartesian coordinates of the deformed inner and outer leaf cluster silhouette lines
  • ⁇ ij is the mean coordinate
  • C is the vertex set of the outer leaf cluster silhouette contour.
  • S10431 segmenting the outline of the outer layer of the leaf cluster according to the coverage of the outline of the outer layer of the leaf cluster;
  • S10432 Maximally covering the silhouette contour of the outer leaf cluster by a greedy algorithm. The process is completed by performing Laplace deformation on the inner leaf cluster silhouette contour;
  • the area matching the F area locally is used as the constraint point, Perform Laplace deformation, the specific process is as follows:
  • ⁇ i is the differential coordinate of v i
  • N(i) is the set of neighbor vertices of v i and satisfies:
  • L( ⁇ ) is the Laplacian adjacency matrix of the vertex of the silhouette of the leaf cluster silhouette
  • v j is the Cartesian coordinate of the vertex of the outline of the outer layer of the leaf cluster
  • v′ i and v′ j are the outer leaves of the deformation
  • ⁇ i is the differential coordinate of v i
  • C represents the set of outer vertices
  • the unique solution is obtained by the least squares method, and the contoured outline of the inner leaf cluster is obtained.
  • the mean coordinate formula is continuously updated.
  • the silhouette contour of the layer of leaf clusters completes the downward transfer of the silhouette of the leaf cluster silhouette, and the deformation is transmitted to the innermost leaf cluster.
  • S1044 The three-dimensional model of the leaf cluster is deformed according to the deformed leaf cluster silhouette contour and transmitted to the branch.
  • the main steps are as follows:
  • S10441 Solving the cotangent weight Laplacian operator of the original three-dimensional model of the leaf cluster, establishing a differential coordinate equation, and transforming the vertices on the three-dimensional model of the leaf cluster from the Cartesian coordinate system to the differential coordinate space.
  • ⁇ i is the differential coordinate of v i , that is, the Laplace coordinate of the cotangent weight
  • C is the set of constraint points
  • v j and v′ j are the coordinate positions of the constraint points before and after deformation, respectively.
  • i is the Cartesian coordinates of the vertex of the leaf cluster model after deformation
  • L( ⁇ ) is the Laplacian adjacency matrix of the vertex of the leaf cluster model, expressed as:
  • is the weight of the constrained vertices
  • I m ⁇ m is the unit matrix of m rows and m columns
  • v′ 1:m is the column vector (v′ 1 , v′ 2 ,...v′ m T
  • L is the Laplacian adjacency matrix of the vertex of the leaf cluster model
  • is the differential coordinate of v i ;
  • V (x) (A T A) -1 A T B (x)
  • V (y) (A T A) -1 A T B (y)
  • V (z) (A T A) -1 A T B (z)
  • the above algorithm is used to solve the deformed leaf cluster model, thereby realizing the transformation from the leaf cluster silhouette contour to the leaf cluster three-dimensional model.
  • p' and v' j are the apex of the deformed branch end apex and the innermost leaf cluster model M, respectively, and ⁇ j is the mean coordinate.
  • step S10444 Solving the cotangent weight Laplacian operator of the three-dimensional model of the branch, establishing a differential coordinate equation, and taking the root end of the branch as a fixed point, taking the new position of the end of the branch obtained in step S10443 as a moving constraint point, Establishing a linear equation system in step S10442, and solving the deformed branches by a least squares method;
  • step S105 Record the deformation process of the tree branches in step S1044 on a frame-by-frame basis, and obtain a tree deformation animation of the shape retention, as shown in FIG.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开了一种基于草图的形状保持树木变形动画方法,包括:创建三维树木模型;将三维树木模型用骨架和树叶簇的形式表示;选择感兴趣的视角,检测三维树木模型的树冠侧影轮廓线,并在草图上绘制变形动画目标树冠侧影轮廓线,将三维树木模型的树冠侧影轮廓线逐渐变形成为变形动画目标树冠侧影轮廓线,并将三维树木模型的树冠侧影轮廓线的形变传递到枝条上,得到平滑的树木变形过程;逐帧记录树冠侧影轮廓线和枝条的变形过程,得到形状保持的树木变形动画。本发明保持树木拓扑一致性和树冠形态学意义,还提供了一种直观的三维树木编辑操作,仅需要绘制简单的草图就能够有效地编辑三维树木模型。

Description

一种基于草图实现形状保持的树木变形动画方法 技术领域
本发明涉及计算机图形,树建模与计算机动画领域,特别是涉及一种基于草图的形状保持树木变形动画方法。
背景技术
无论是在现实世界还是虚拟世界,树木都是描述环境不可或缺的一部分。近些年,伴随着数字化科技的蓬勃发展和日渐普及,在影视娱乐,三维游戏以及虚拟现实场景中也广泛出现了计算机合成三维树木的身影。
树木三维建模工作可以追溯到上世纪六十年代。尽管有着很长一段历史,截止到现在,计算机和植物学等各领域的专家们对该方向依旧保持着较高的关注,提出了很多建模方法,以致力于创建更真实美观的三维树木模型。根据不同的建模目的,这些方法大致可以分为两类:静态三维树木建模方法和动态树木动画方法。静态三维树木建模方法的核心在于生成视觉效果真实的三维树木几何造型;动态树木动画方法的目的在于生成视觉美观的三维动画特效,包括树木的生长特效以及树木在光、障碍物、风、雨、火等因素的影响下与环境发生的相互作用。除此之外,在电影和动画行业中,为了营造缥缈虚幻的虚拟环境并烘托其神秘氛围,一些个性化特殊树木变形动画的需求也应运而生。其中,最典型的例子是在2010年迪士尼动画《长发公主》中一匹白马将自己藏在一棵大树后面,然后树枝平滑地变形成为马的形状。因此,风格化的树木变形动画成为树木变形动画领域的一个值得关注的研究方向。
实现形状保持的树木动画需要解决两个关键技术挑战:第一,如何保 持树木变形动画中拓扑结构的连续性,即不会产生断裂漂浮的枝条;第二如何在保留拓扑层次结构的同时对树枝进行变形,使其形成有形态学意义的树冠。
从宏观上看,形状保持的三维树木变形动画与基于形状引导的三维树木建模、传统三维树木动画以及近些年提出的拓扑保持树木变形动画这三个方向密切相关。
迄今为止,计算机领域的专家们提出多种基于形状引导的三维树木建模方法,旨在生成符合给定的特定树冠形状的三维树木模型。其中,较经典的方法有剪枝L系统、空间殖民地算法以及变分式逆向树木建模。但是,它们都只能生成静态树,并且对引导形状的变化很敏感。也就是说,当引导形状发生变化时,这些算法需要重新运行以生成符合新的引导形状的三维树木模型。由于该类方法需要针对动画的每一帧重新生成新的树木模型,并且不能保证帧与帧之间树枝的拓扑一致性,因此不适合用来生成需要保持形状的树的动画。
现有关于树木动画的文献大致可以分为两类:树木生长特效动画和树木与环境发生相互作用。针对树木生长动画,现有技术中存在通过插值预定义生长参数来创建具有植物学意义的树的生长动画的算法。但是,它们都不能针对任意一棵树木将其平滑地变形成为用户自定义的形状,并且保证该过程树冠形状的一致性和树枝拓扑的连续性。其主要原因在于这些预定义的生长参数与树冠形状没有直接联系,因此直接对这些参数进行插值并不能保证在动画过程中生成连续而有意义的树冠。除了生长动画之外,还有许多方法致力于模拟并生成树木与环境因素的交互动画效果,如Zhao和
Figure PCTCN2018091223-appb-000001
(参见Yili Zhao and Jernej
Figure PCTCN2018091223-appb-000002
Interactive authoring of simulation-ready plants.ACM Transactions onGraphics(TOG),32(4):84,2013)生成了视觉上美观真实的树木在风中晃动的动画效果;Pirk等人(参见
Figure PCTCN2018091223-appb-000003
Pirk,Ondrej Stava,Julian Kratt,Michel Abdul Massih Said,Boris  Neubert,Randomir Mech,Bedrich Benes,and Oliver Deussen.Plastic trees:interactive self-adapting botanical tree models[J].ACMTransactions on Graphics(TOG),31(4):50,2012)逼真地模拟了树木在光和障碍物等因素作用下与环境的相互作用。尽管树的形状根据环境而发生了改变,然而现有方法没有明确地保留动画过程中树冠的形态学意义,因此并不能将树木有意义地变化成用户所定义的形状状。
最近Wang等人(参见Yutong Wang,Xiaowei Xue,Xiaogang Jin,and Zhigang Deng.Creative virtual tree modeling through hierarchical topology-preserving blending[J].IEEETransactions on Visualization and Computer Graphics,23(12):2521–2534,2017和Yutong Wang,Luyuan Wang,Zhigang Deng,and Xiaogang Jin.Topologically consistent leafy tree morphing[J].Computer Animation and Virtual Worlds,28(3-4),2017)提出了能够两个拓扑不同的树之间生成拓扑一致的动画方法。然而这些算法并不能保持变化中树冠的形态学意义,导致在具有特定树冠形状的树木之间变形时生成不理想的视觉效果。此外,这些方法严格要求输入两棵树分别作为变形动画的源模型和目标模型。
发明内容
本发明提供了一种基于草图实现形状保持的树木变形动画方法,该方法能够将树木平滑地变形为草图上所规定的具有特定树冠形状的树。
一种基于草图实现形状保持的树木变形动画方法,包括以下步骤:
(1)创建三维树木模型;
(2)将三维树木模型用骨架和树叶簇的形式表示,包括:
(2.1)分离三维树木模型的树叶和树干,所述树干包括树木的主干部分和枝条部分;
(2.2)提取三维树木模型中树干的骨架;
(2.3)基于人对树木主干结构和树冠整体形状的视觉认知确定三维树木模型中的树冠部分,将树冠部分拆分为由树叶组成的若干个外轮廓几何结构,以树叶簇表示,并用均值坐标表示内层树叶簇侧影轮廓线与外层树叶簇侧影轮廓线的相对位置关系。其中,由所有树叶组成的树叶簇即为该三维树木模型的树冠。
根据树木固有的枝条父子层级关系,树叶簇也服从严格的父子层级关系,因此可以将不同树叶簇之间的层级关系描述为多尺度树叶簇拓扑结构树。
考虑到树冠与树叶簇之间的父子层级关系以及外层树叶簇包裹内层树叶簇的性质,将外层树叶簇看作是内层树叶簇的包围网格。因此,在选定的视角下,外层树叶簇的侧影轮廓线也可以看作是内层树叶簇侧影轮廓线的包围多边形。利用该性质,内层树叶簇侧影轮廓线与外层树叶簇侧影轮廓线的相对位置关系可以通过均值坐标表示。
(3)选择感兴趣的视角,检测步骤(2)中所述的三维树木模型的树冠侧影轮廓线,基于草图绘制变形动画目标树冠侧影轮廓线,而后将草图映射到物体空间的树冠侧影轮廓线上;
(4)将三维树木模型的树冠侧影轮廓线逐渐变形成为变形动画目标树冠侧影轮廓线,并将三维树木模型的树冠侧影轮廓线的形变传递到枝条上,得到平滑的树木变形过程;
(5)逐帧记录步骤(4)中的树木变形过程,得到形状保持的树木变形动画。
作为优选,步骤(1)所述的创建三维树木模型采用的方法为:基于真实树木的点云数据重建三维树木模型,这样得到的三维树木模型更加真实。也可以通过基于L-系统由计算机生成虚拟树木模型,或者使用如Maya,3Ds Max等三维建模软件自由创建虚拟树木模型。使用上述方法具有较强 的灵活性和可拓展性,对拓扑迥异的不同种树木(包括乔木和灌木)均能够生成形状保持的变形动画。
作为优选,步骤(2.2)中使用拉普拉斯收缩算法提取三维树木模型中树干的骨架:将三维树干的模型顶点沿其法线的逆方向进行移动,即收缩。由于树干近似圆柱体的特征,树干横截面上的顶点最终收敛并汇聚成为一点,即骨架点,将骨架点按照树干的拓扑结构连接起来得到树干的骨架,以收缩前树干模型横截面上所有顶点到该骨架点距离的平均值则作为骨架点的半径,从而将三维树干模型简化成为骨架+半径描述。
作为进一步优选,步骤(2.2)中使用拉普拉斯收缩算法提取的骨架使用球体扫成方法重新恢复成树干的三维模型。
作为优选,步骤(3)中检测三维树木模型树冠的物体空间侧影轮廓线,物体空间侧影轮廓线由三维树木模型上的一系列边构成,这些边的顶点法向量n i和n j与视线方向v满足如下关系:
(n i·v)*(n j·v)=0
物体空间侧影轮廓线的好处在于其精确性,从而方便对三维模型进行直接操作和控制。
作为进一步的优选,步骤(3)中所述的绘制变形动画目标树冠侧影轮廓线,重绘树冠侧影轮廓线上感兴趣的区域并略微修改现有树冠的形状作为草图,可以实现局部的变形而不影响整体。
步骤(3)中也可重新绘制一个新的草图作为变形动画目标树冠的侧影轮廓线。
作为优选,步骤(4)通过多尺度树叶簇拓扑结构和拉普拉斯变形算法将树冠的形变传递到树干上,具体过程为:
(4.1)将外层树叶簇当作内层树叶簇的包围网格,并建立多尺度树叶簇拓扑结构树;
(4.2)根据内层树叶簇侧影轮廓线相对于外层树叶簇侧影轮廓线的均值坐标更新内层树叶簇的侧影轮廓线,依据多尺度树叶簇拓扑结构树,不断地更新内层树叶簇的侧影轮廓线,并将外层树冠侧影轮廓线的形变沿多尺度树叶簇拓扑结构树由外及内逐渐传递到最内层最细尺度的树叶簇为止;
(4.3)依据发生形变的树叶簇侧影轮廓线对树叶簇三维模型进行形变并传递到枝条上。
作为进一步的优选,步骤(4.1)建立多尺度树叶簇拓扑结构树后对处于变形动画目标树冠侧影轮廓线外的枝条进行剪枝。
更进一步的优选,步骤(4.1)具体为:使用Vatti多边形裁剪算法对变形目标树冠侧影轮廓线和原始树冠侧影轮廓线求交,计算该相交区域与原始树冠侧影轮廓线包围区域面积的比率,记为r,基于r判断该树叶簇是否修剪,确定修剪的树叶簇包围的枝条在变形动画中逐渐消亡,得到更自然的变形结果。
作为进一步的优选,步骤(4.2)具体为:首先计算内层树叶簇侧影轮廓线相对于外层树叶簇侧影轮廓线的均值坐标。随后,当外层树叶簇侧影轮廓线发生形变后,利用内层树叶簇侧影轮廓线相对于外层树叶簇侧影轮廓线的均值坐标更新内层树叶簇侧影轮廓线顶点的笛卡尔坐标。接着,利用如下公式继续对内层树叶簇进行变形,使其尽可能覆盖外层树叶簇侧影轮廓线:
Figure PCTCN2018091223-appb-000004
其中S=(V,E)是内层侧影轮廓线,其中V是顶点集合,E是边集合,v i和v′ i分别为形变前后的该树叶簇侧影轮廓线上顶点的笛卡尔坐标,δ i为v i的微分坐标,C是该树叶簇与外层侧影轮廓线上局部匹配的顶点集合,v j 和v′ j分别为集合C中变形前和变形后的内层树叶簇侧影轮廓线上顶点笛卡尔坐标。
作为进一步的优选,步骤(4.3)的具体步骤为:
(4.3.1)求解步骤(2)中的树叶簇的余切权值拉普拉斯算子,并建立微分坐标方程,从而将三维树木模型中树叶簇的顶点从笛卡尔坐标系变换到微分坐标空间;
(4.3.2)将树叶簇在步骤(3)中选定的视角下侧影轮廓线上的顶点作为约束点集合,与形变后该轮廓线顶点的新位置一起建立满秩线性方程系统:
根据三维树木模型给定树叶簇三维模型,记作M=(V,E,F),其中V是顶点集合,E是模型边集合,F是面的集合,则满秩线性方程系统表达式如下:
Figure PCTCN2018091223-appb-000005
其中,v i和v′ i分别为形变前后树叶簇上模型顶点的笛卡尔坐标,δ i为v i的微分坐标,C表示树叶簇侧影轮廓线上顶点集合,v j和v′ j分别为形变前后变形后树叶簇侧影轮廓线上顶点笛卡尔坐标。
通过最小二乘法求解得到在步骤(3)中选定的视角下符合形变后树叶簇侧影轮廓线的新树叶簇三维模型;
(4.3.3)将最内层树叶簇看作是枝条末端的包围网格,由于树冠的形变,通过枝条末端相对于最内层树叶簇的均值坐标计算出形变后枝条末端的新位置;
(4.3.4)求解三维树木模型中枝条的余切权值拉普拉斯算子,建立微分坐标方程,并将枝条根端点作为不动点,将步骤4.3.3)中求得的枝条末端的新位置作为移动点,建立步骤(4.3.2)的满秩线性方程系统,求解得到形变后的枝条;
(4.3.5)由于枝条间的层级关系,当父枝条发生形变后,其子枝条也会发生相应的形变,该形变过程与步骤(4.3.4)中描述的过程一致。
本发明提供了一种基于草图实现形状保持的树木变形动画方法,并具有以下效果:
(1)本发明提供的基于草图实现形状保持的树木变形动画方法允许交互式地设计和控制变形动画效果,保持树木拓扑一致性和树冠形态学意义;
(2)本发明提供了一种直观的三维树木编辑操作,仅需要绘制简单的草图就能够有效地编辑三维树木模型,将其变形成为草图所描绘的树冠形状,方法明确,界面友好,结果鲁棒,可用于计算机动画,数字娱乐,三维游戏等领域。
附图说明
图1为本发明提供的基于草图实现形状保持的树木变形动画方法流程图;
图2为本发明实施例中的树木变形动画过程示意图,其中a为创建的三维树木模型示意图,b为骨架和树叶簇表示三维树木模型的示意图,c为基于草图绘制的变形动画目标树冠侧影轮廓线示意图,d为树木变形动画的过程示意图;
图3为本发明实施例中建立多尺度树叶簇拓扑结构树过程的示意图,其中a为输入三维树木模型示意图,b为用骨架和树叶簇表示三维树木模型示意图,c为三维树木模型用多尺度树叶簇表示的示意图,d为多尺度树叶簇拓扑结构树示意图;
图4为本发明实施例中树木变形动画效果图。
具体实施方式
下面结合附图及具体实施例对本发明进行详细说明。
如图1所示,本发明的基于草图实现形状保持的树木变形动画方法包括以下步骤:
S101:创建三维树木模型,如图2中的a所示;
通过激光扫描仪等硬件装置获取真实世界三维树木的点云以及纹理信息,创建三维树木模型。
S102:将三维树木模型用骨架和树叶簇的形式表示,如图2中的b所示,具体步骤为:
S1021:使用Maya,3DsMax等三维建模软件将步骤(1)三维树木模型的树叶和树干分离,树干包括树木的主干部分和枝条部分;
S1022:对于三维树木模型中的树干部分,使用拉普拉斯收缩算法提取其骨架:将三维树干的模型顶点沿其法线的逆方向进行移动,即收缩。由于树干近似圆柱体的特征,树干横截面上的顶点会最终收敛并汇聚成为一点,即骨架点。将骨架点按照树干的拓扑结构连接起来就得到了树干的骨架,以收缩前树干模型横截面上所有顶点到该骨架点距离的平均值则作为骨架点的半径,从而将三维树干模型简化成为骨架+半径描述;
S1023:基于人对树木主干结构和树冠整体形状的视觉认知,将树冠拆分为由树叶构成的外轮廓几何结构,即树叶簇。其中,由所有树叶构成的树叶簇被称为该三维树木模型的树冠。由于树木固有的枝条层级关系,这些树叶簇也严格地服从这样的层级关系。建立多尺度树叶簇拓扑结构树对它们之间的层级关系进行描述,其步骤如下:
S201:输入三维树木模型,如图3中的a所示;
S202:将三维树木模型用骨架和树叶簇表示,如图3中的b所示;
S203:将三维树木模型用多尺度树叶簇表示,如图3中的c所示;
S204:建立多尺度树叶簇拓扑结构树,如图3中的d所示。
S103:选择感兴趣的视角,检测步骤(2)中所述的三维树木模型的树冠侧影轮廓线,基于草图上绘制变形动画目标树冠侧影轮廓线,如图2中的c所示;
检测步骤(2)中所述的三维树木模型的物体空间的树冠侧影轮廓线,该树冠侧影轮廓线由模型上一系列边构成,这些边的顶点法向量n i和n j与视线方向v满足如下关系:
(n i·v)*(n j·v)=0
采用Hertzmann等人提出的方法获取物体空间侧影轮廓线。具体来说,对于一个封闭的三维网格模型,模型上的每一条边都有两个相邻的三角面片,在某一视点下,如果其中一个三角面片可见而另外一个三角面片不可见,即满足上述公式,则这条边就是该模型在该视点下侧影轮廓线上的边。遍历整个模型,采集所有满足上述公式的边,并采用深度优先算法将它们首尾连接起来,就构成了模型的物体空间侧影轮廓线。
重绘侧影轮廓线上的一部分(即感兴趣区域)并略微地修改现有树冠的形状作为草图。
在草图绘制结束后,将草图从屏幕空间映射到物体空间的树冠侧影轮廓线上。该映射过程通过弧长参数化建立,具体步骤为:
S1031:提取树冠侧影轮廓线上被重绘的部分,将其投影到屏幕空间,并对其进行弧长参数化,表达为:
Figure PCTCN2018091223-appb-000006
其中,l i为从侧影轮廓线起始点到顶点v i的长度,l为侧影轮廓线的总长度,从而完成将侧影轮廓线离散到[0,1]空间;
S1032:对屏幕空间中重绘的草图进行弧长参数化,将其离散到[0,1]空间;
S1033:将屏幕空间中草图的顶点投影到屏幕空间中树冠侧影轮廓线上参数化数值相同的顶点,完成对应关系的确立;
S1034:得到对应关系后,为屏幕空间中草图的顶点添加深度信息,使其获得对应的物体空间树冠侧影轮廓线顶点的深度,以此完成草图从屏幕空间到物体空间的变换过程;
S1035:将变换到物体空间的草图与树冠侧影轮廓线上未重绘的部分拼接起来,得到完整的变形动画目标树冠侧影轮廓线。
S104:将三维树木模型的树冠侧影轮廓线逐渐变形成为变形动画目标树冠侧影轮廓线,并将三维树木模型的树冠侧影轮廓线的形变传递到枝条上,得到平滑的树木变形过程,如图2中的d所示,具体步骤为:
S1041:得到树冠的变形目标侧影轮廓线后,根据树冠与树叶簇之间的层级关系以及外层树叶簇包裹内层树叶簇的性质,将外层树叶簇看作是内层树叶簇的包围网格,并建立多尺度树叶簇拓扑结构树;
S1042:检测三维树木模型中枝条与目标侧影轮廓线的位置关系,并适量地对位于变形目标侧影轮廓线外的枝条进行剪枝。基于多尺度树叶簇拓扑结构树,剪枝过程从最粗糙尺度开始进行。
使用Vatti多边形裁剪算法对变形目标树冠侧影轮廓线和原始树冠侧影轮廓线求交,计算该相交区域与原始树冠侧影轮廓线包围区域面积的比率,记为r,基于r,通过以下测试来修剪树枝。
S10421:如果r小于30%,则该参考侧影轮廓线包围的树叶簇被标记为修剪。基于多尺度树叶簇拓扑结构树,该树叶簇内包含的所有内层树叶簇也被标记为修剪,以保持枝条拓扑结构的一致性;
S10422:如果r近似于1,意味着该参考侧影轮廓线包围树叶簇的侧影轮廓线几乎完全处于变形目标侧影轮廓线内部,不需要更多的修剪测试,该树叶簇内以及该树叶簇内包含的所有树叶簇的树枝都不需要进行剪枝;
S10423:在其他情形下,则按照多尺度树叶簇拓扑结构树的层级关系下移到更细尺度进行测试,直到测到最内层的树叶簇或者满足(4.2.1)或(4.2.2)中的情况为止;
S10424:标记为修剪的树叶簇包围的枝条在变形动画中逐渐消亡。
S1043:基于多尺度树叶簇拓扑结构树,在选定的视角下,外层树叶簇的侧影轮廓线看作是内层树叶簇侧影轮廓线的包围多边形。利用该性质,用均值坐标表示内层树叶簇侧影轮廓线与外层树叶簇侧影轮廓线的相对位置关系,表达式为:
Figure PCTCN2018091223-appb-000007
其中p i和v j分别是内层和外层树叶簇侧影轮廓线上顶点笛卡尔坐标,ω ij是均值坐标,C表示外层树叶簇侧影轮廓线的顶点集合。
这意味着包围多边形内的任何点都可以表示为包围多边形的顶点线性组合。因此,在保证相对位置关系不变的约束下,当外层树叶簇侧影轮廓线发生形变时,通过如下公式快速更新内层树叶簇的侧影轮廓线:
Figure PCTCN2018091223-appb-000008
其中,p′ i和v′ j分别是形变后的内层和外层树叶簇侧影轮廓线上顶点笛卡尔坐标,ω ij是均值坐标,C表示外层树叶簇侧影轮廓线的顶点集合。
为了让三维树木模型更好地变形成为变形动画目标树冠的形状,在使用均值坐标更新内层树叶簇侧影轮廓线后需要进一步调整其形状,使处于该外层树叶簇内的所有内层树叶簇的侧影轮廓线尽可能地覆盖该外层树叶簇的侧影轮廓线,具体步骤如下:
S10431:依据内层树叶簇侧影轮廓线对外层树叶簇侧影轮廓线的覆盖情况对外层树叶簇侧影轮廓线进行分割;
设有n个内层树叶簇侧影轮廓线
Figure PCTCN2018091223-appb-000009
和包围它们的外层 树叶簇侧影轮廓线s e。将S i集合中的每一个元素与s e进行屏幕空间的局部匹配,并将s e上与S i中元素匹配的部分标记为覆盖区域并标记为O,s e上未与S i中元素匹配的部分标记为未覆盖区域并标记为F,从而完成对外层树叶簇侧影轮廓线s e的分割;
S10432:采用贪心算法最大化地覆盖外层树叶簇的侧影轮廓线该过程通过对内层树叶簇侧影轮廓线进行拉普拉斯变形完成;
外层树叶簇侧影轮廓线s e对于s e上与覆盖区域O i和O j区域相邻的未覆盖F区域,对于所有与O i或者O j区域局部匹配的内层树叶簇侧影轮廓线
Figure PCTCN2018091223-appb-000010
将整个
Figure PCTCN2018091223-appb-000011
作为感兴趣区域,
Figure PCTCN2018091223-appb-000012
上与F区域局部匹配的区域作为约束点,对
Figure PCTCN2018091223-appb-000013
进行拉普拉斯变形,具体过程如下:
给定树叶簇侧影轮廓线,记作S=(V,E),其中V是树叶簇侧影轮廓线上顶点集合,E为树叶簇侧影轮廓线的顶点间的边。关于树叶簇侧影轮廓线顶点间相对位置关系的微分坐标,即拉普拉斯坐标,表示为:
Figure PCTCN2018091223-appb-000014
其中,δ i为v i的微分坐标,N(i)是v i的邻居顶点集合,且满足:
N(v i)={v j|(v i,v j)∈E}
其中,d i=|N(v i)|,表示顶点的邻居顶点数目。
侧影轮廓线的拉普拉斯形变符合如下线性方程系统:
Figure PCTCN2018091223-appb-000015
其中L(·)为树叶簇侧影轮廓线顶点的拉普拉斯邻接矩阵,v j为外层树叶簇侧影轮廓线上顶点笛卡尔坐标,v′ i、v′ j为形变后的外层树叶簇侧影轮廓线上顶点笛卡尔坐标,δ i为v i的微分坐标,C表示外层顶点的集合;
通过最小二乘法求得唯一解,得到变形后的内层树叶簇侧影轮廓线。
在树冠侧影轮廓线发生变后,依据多尺度树叶簇拓扑结构树和内层树叶簇在该视点下侧影轮廓线相对外层树叶簇的侧影轮廓线的均值坐标,使用均值坐标公式不断地更新内层树叶簇的侧影轮廓线,完成树叶簇侧影轮廓线形变的向下传递,该形变一直传递到最内层树叶簇为止。
S1044:依据发生形变的树叶簇侧影轮廓线对树叶簇三维模型进行形变并传递到枝条上,主要步骤为:
S10441:求解原始树叶簇三维模型的余切权值拉普拉斯算子,建立微分坐标方程,将树叶簇三维模型上的顶点从笛卡尔坐标系变换到微分坐标空间。
根据三维树木模型给定树叶簇三维模型,记作M=(V,E,F),其中V为顶点集合,E为树叶簇三维模型边集合,F为面的集合。
该模型上顶点的笛卡尔坐标表示为v i=(x i,y i,z i),关于顶点间相对位置关系的微分坐标,即拉普拉斯坐标,表示为:
Figure PCTCN2018091223-appb-000016
其中,δ i为顶点v i的微分坐标,ω j是余切权值,N(v i)是v i的邻居顶点集合,且满足N(v i)={v j|(v i,v j)∈E}。
S10442:将树叶簇在该视点下侧影轮廓线上的顶点作为约束点集合,与形变后该轮廓线顶点的新位置一起建立满秩线性方程系统,表达式为:
Figure PCTCN2018091223-appb-000017
其中,δ i为v i的微分坐标,即余切权值的拉普拉斯坐标,C为约束点集合,v j和v′ j分别为形变前和形变后的约束点坐标位置,v′ i为形变后树叶簇模型顶点的笛卡尔坐标,L(·)为树叶簇模型顶点的拉普拉斯邻接矩阵,表示为:
Figure PCTCN2018091223-appb-000018
由于集合C中约束顶点的顺序不影响变形结果,所以假设集合C中顶点为C={v 1,v 2,…v m},且变形后的顶点笛卡尔坐标为{v′ 1,v′ 2,…v′ m},因此,上述线性方程系统可以写作如下形式:
Figure PCTCN2018091223-appb-000019
其中,m为约束顶点数目,ω为约束顶点的权值,I m×m为m行m列的单位矩阵,v′ 1:m是列向量(v′ 1,v′ 2,…v′ m) T,L为树叶簇模型顶点的拉普拉斯邻接矩阵,δ为v i的微分坐标;
通过最小二乘法求解该线性方程系统:将系数矩阵
Figure PCTCN2018091223-appb-000020
记为A,列向量
Figure PCTCN2018091223-appb-000021
记为B,则该线性方程系统可以写作AV=B的形式。通过V=(A TA) -1A TB对该线性方程系统求解。由于顶点的笛卡尔坐标由(x,y,z)三个维度分量构成,因此对三个分量进行求解:
V (x)=(A TA) -1A TB (x)
V (y)=(A TA) -1A TB (y)
V (z)=(A TA) -1A TB (z)
从而得到在该视点下符合形变后侧影轮廓线的新树叶簇模型;
对于所有发生形变的内层树叶簇侧影轮廓线,使用上述算法求解形变后的树叶簇模型,由此实现从树叶簇侧影轮廓线的形变传递到树叶簇三维模型上。
S10443:由于最内层树叶簇直接生长在枝条顶端,因此将其看作是枝条末端的包围网格。当最内层树叶簇发生形变后,通过枝条末端相对于最内层树叶簇的均值坐坐标可以快速计算得出形变后枝条末端的新位置,表达式为:
Figure PCTCN2018091223-appb-000022
其中p′和v′ j分别是形变后的枝条末端顶点和最内层树叶簇模型M上的顶点,ω j是均值坐标。
S10444:求解枝条三维模型的余切权值拉普拉斯算子,建立微分坐标方程,并将枝条根端点作为不动点,将步骤S10443中求得的枝条末端的新位置作为移动约束点,建立步骤S10442中的线性方程系统,并通过最小二乘法求解得到形变后的枝条;
S10445:由于枝条间的层级关系,当父亲枝条发生形变后,其子枝条也会发生相应的形变,该形变过程与步骤S10444中描述的过程一致。
S105:逐帧记录步骤S1044中树木枝条的变形过程,得到形状保持的树木变形动画,如图4所示。

Claims (10)

  1. 一种基于草图实现形状保持的树木变形动画方法,其特征在于,包括以下步骤:
    (1)创建三维树木模型;
    (2)将三维树木模型用骨架和树叶簇的形式表示,包括:
    (2.1)分离三维树木模型的树叶和树干,所述树干包括树木的主干部分和枝条部分;
    (2.2)提取三维树木模型中树干的骨架;
    (2.3)基于人对树木主干结构和树冠整体形状的视觉认知确定三维树木模型中的树冠部分,将树冠部分拆分为由树叶组成的若干个外轮廓几何结构,以树叶簇表示,并用均值坐标表示内层树叶簇侧影轮廓线与外层树叶簇侧影轮廓线的相对位置关系;
    (3)选择感兴趣的视角,检测步骤(2)中所述的三维树木模型的树冠侧影轮廓线,基于草图绘制变形动画目标树冠侧影轮廓线,而后将草图映射到物体空间的树冠侧影轮廓线上;
    (4)将三维树木模型的树冠侧影轮廓线逐渐变形成为变形动画目标树冠侧影轮廓线,并将三维树木模型的树冠侧影轮廓线的形变传递到枝条上,得到平滑的树木变形过程;
    (5)逐帧记录步骤(4)中的树木变形过程,得到形状保持的树木变形动画。
  2. 根据权利要求1所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(1)所述的创建三维树木模型采用的方法为:基于真实树木的点云数据重建三维树木模型、基于L-系统由计算机生成虚拟树木模型或者使用三维建模软件自由创建虚拟树木模型。
  3. 根据权利要求1所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(2.2)中使用拉普拉斯收缩算法提取三维树木模型中树干的骨架:将三维树干的模型顶点沿其法线的逆方向进行收缩,由于树干近似圆柱体的特征,树干横截面上的顶点最终收敛并汇聚成为一个骨架点,将骨架点按照树干的拓扑结构连接起来得到树干的骨架。
  4. 根据权利要求3所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(2.2)中使用拉普拉斯收缩算法提取的骨架使用球体扫成方法重新恢复成树干的三维模型。
  5. 根据权利要求1所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(3)中所述的树冠侧影轮廓线为物体空间侧影轮廓线,由三维树木模型上的一系列边构成,这些边的顶点法向量n i和n j与视线方向v满足如下关系:
    (n i·v)*(n j·v)=0。
  6. 根据权利要求1所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(3)中所述的绘制变形动画目标树冠侧影轮廓线采用的方法为:在草图上重绘树冠侧影轮廓线上感兴趣的区域并略微修改现有树冠的形状;重新绘制一个新的草图作为变形动画目标树冠侧影轮廓线。
  7. 根据权利要求1所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(4)通过多尺度树叶簇拓扑结构和拉普拉斯变形算法将树冠的形变传递到树枝上,具体过程为:
    (4.1)将外层树叶簇当作内层树叶簇的包围网格,并建立多尺度树叶簇拓扑结构树;
    (4.2)根据内层树叶簇侧影轮廓线相对于外层树叶簇侧影轮廓线的均值坐标更新内层树叶簇的侧影轮廓线,依据多尺度树叶簇拓扑结构树,不 断地更新内层树叶簇的侧影轮廓线,并将外层树冠侧影轮廓线的形变沿多尺度树叶簇拓扑结构树由外及内逐渐传递到最内层最细尺度的树叶簇为止;
    (4.3)依据发生形变的树叶簇侧影轮廓线对树叶簇三维模型进行形变并传递到枝条上。
  8. 根据权利要求7所述的基于草图实现形状保持的树木变形动画方法,其特征在于,
    步骤(4.1)建立多尺度树叶簇拓扑结构树后对处于变形动画目标树冠侧影轮廓线外的枝条进行剪枝;
    步骤(4.2)将外层树叶簇侧影轮廓线的变形传递到内层树叶簇侧影轮廓线,并在该过程中调整内层树叶簇的侧影轮廓线,使其尽可能覆盖外层树叶簇侧影轮廓线。
  9. 根据权利要求8所述的基于草图实现形状保持的树木变形动画方法,其特征在于,所述的步骤(4.1),对处于变形动画目标树冠侧影轮廓线外的枝条进行剪枝,使用Vatti多边形裁剪算法对变形目标树冠侧影轮廓线和原始树冠侧影轮廓线求交,计算该相交区域与原始树冠侧影轮廓线包围区域面积的比率,记为r,基于r判断该树叶簇是否修剪,确定修剪的树叶簇包围的枝条在变形动画中逐渐消亡,得到更自然的变形结果;
    所述的步骤(4.2),当外层树叶簇侧影轮廓线发生形变后,利用内层树叶簇侧影轮廓线相对于外层树叶簇侧影轮廓线的均值坐标更新内层树叶簇侧影轮廓线顶点的笛卡尔坐标,然后利用如下公式继续对内层树叶簇进行变形,使其尽可能覆盖外层树叶簇侧影轮廓线:
    Figure PCTCN2018091223-appb-100001
    其中S=(V,E)是内层侧影轮廓线,其中V是顶点集合,E是边集合,v i和v′ i分别为形变前后的该树叶簇侧影轮廓线上顶点的笛卡尔坐标,δ i为 v i的微分坐标,C是该树叶簇与外层侧影轮廓线上局部匹配的顶点集合,v j和v′ j分别为集合C中顶点变形前和变形后的内层树叶簇侧影轮廓线上顶点笛卡尔坐标。
  10. 根据权利要求7或8所述的基于草图实现形状保持的树木变形动画方法,其特征在于,步骤(4.3)的具体过程为:
    (4.3.1)求解步骤(2)中的树叶簇的余切权值拉普拉斯算子,并建立微分坐标方程,从而将三维树木模型中树叶簇的顶点从笛卡尔坐标系变换到微分坐标空间;
    (4.3.2)将树叶簇在步骤(3)中选定的视角下侧影轮廓线上的顶点作为约束点集合,与形变后该轮廓线顶点的新位置一起建立满秩线性方程系统:
    根据三维树木模型给定树叶簇三维模型,记作M=(V,E,F),其中V是顶点集合,E是模型边集合,F是面的集合,则满秩线性方程系统表达式如下:
    Figure PCTCN2018091223-appb-100002
    其中,v j为外层树叶簇侧影轮廓线上顶点,v′ j为形变后的外层树叶簇侧影轮廓线上顶点,v′ i是变形后树叶簇三维模型上顶点,δ i为v i的微分坐标,C表示外层顶点的集合;
    通过最小二乘法求解得到在步骤(3)中选定的视角下符合形变后树叶簇侧影轮廓线的新树叶簇三维模型;
    (4.3.3)将最内层树叶簇看作是枝条末端的包围网格,由于树冠的形变,通过枝条末端相对于最内层树叶簇的均值坐标计算出形变后枝条末端的新位置;
    (4.3.4)求解三维树木模型中枝条的余切权值拉普拉斯算子,建立微分坐标方程,并将枝条根端点作为不动点,将步骤(4.3.3)中求得的枝条末端 的新位置作为移动点,建立步骤(4.3.2)的满秩线性方程系统,求解得到形变后的枝条。
PCT/CN2018/091223 2018-04-19 2018-06-14 一种基于草图实现形状保持的树木变形动画方法 WO2019200683A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/618,752 US11217010B2 (en) 2018-04-19 2018-06-14 Sketch-based shape-preserving tree animation method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810351876.9A CN108717723B (zh) 2018-04-19 2018-04-19 一种基于草图实现形状保持的树木变形动画方法
CN201810351876.9 2018-04-19

Publications (1)

Publication Number Publication Date
WO2019200683A1 true WO2019200683A1 (zh) 2019-10-24

Family

ID=63899204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/091223 WO2019200683A1 (zh) 2018-04-19 2018-06-14 一种基于草图实现形状保持的树木变形动画方法

Country Status (3)

Country Link
US (1) US11217010B2 (zh)
CN (1) CN108717723B (zh)
WO (1) WO2019200683A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111341392A (zh) * 2020-02-26 2020-06-26 西安理工大学 一种多域物质体数据内部结构特征表达方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110176058B (zh) * 2019-04-25 2020-12-11 浙江大学 一种基于草图和卷积曲面的沉浸式快速建模方法
CN111199571A (zh) * 2019-12-20 2020-05-26 江苏原力动画制作股份有限公司 一种基于连接关系的控制物体变形方法
CN112132935A (zh) * 2020-09-22 2020-12-25 上海米哈游天命科技有限公司 模型元素的形变处理、画面渲染方法、装置、设备及介质
CN112541460B (zh) * 2020-12-21 2022-05-13 山东师范大学 一种车辆再识别方法及系统
CN112712509B (zh) * 2020-12-31 2023-09-01 重庆大学 基于点云的树木参数获取方法、生长评估方法、装置及系统
CN112381825B (zh) * 2021-01-13 2021-09-03 首都医科大学附属北京友谊医院 用于病灶区图像几何特征提取的方法和相关产品
CN112951056B (zh) * 2021-02-19 2022-07-22 武汉市中心医院 虚拟模型三维映射装置及方法
CN112799517B (zh) * 2021-02-23 2022-08-16 中国科学院深圳先进技术研究院 基于手势交互的植物建模方法及其植物建模装置、设备
CN112991519B (zh) * 2021-03-16 2023-10-31 中国林业科学研究院资源信息研究所 一种解决林分中针叶树三维模型树冠分枝交叉重叠的方法
CN114494586B (zh) * 2022-01-10 2024-03-19 南京林业大学 晶格投影的深度学习网络阔叶树枝叶分离与骨架重建方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866495A (zh) * 2010-06-01 2010-10-20 中国科学院自动化研究所 基于骨架点云的树木建模方法
CN102289836A (zh) * 2011-07-25 2011-12-21 北京农业信息技术研究中心 植物动画合成方法
CN103914869A (zh) * 2014-02-26 2014-07-09 浙江工业大学 支持骨架个性化编辑的轻量化三维树木模型构建方法
CN104392484A (zh) * 2014-11-13 2015-03-04 中国科学院深圳先进技术研究院 一种三维树木建模方法及装置
US9367944B2 (en) * 2013-06-04 2016-06-14 Electronics And Telecommunications Research Institute Tree model and forest model generating method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866495A (zh) * 2010-06-01 2010-10-20 中国科学院自动化研究所 基于骨架点云的树木建模方法
CN102289836A (zh) * 2011-07-25 2011-12-21 北京农业信息技术研究中心 植物动画合成方法
US9367944B2 (en) * 2013-06-04 2016-06-14 Electronics And Telecommunications Research Institute Tree model and forest model generating method and apparatus
CN103914869A (zh) * 2014-02-26 2014-07-09 浙江工业大学 支持骨架个性化编辑的轻量化三维树木模型构建方法
CN104392484A (zh) * 2014-11-13 2015-03-04 中国科学院深圳先进技术研究院 一种三维树木建模方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111341392A (zh) * 2020-02-26 2020-06-26 西安理工大学 一种多域物质体数据内部结构特征表达方法
CN111341392B (zh) * 2020-02-26 2023-05-02 西安理工大学 一种多域物质体数据内部结构特征表达方法

Also Published As

Publication number Publication date
US20200160596A1 (en) 2020-05-21
CN108717723B (zh) 2019-06-11
US11217010B2 (en) 2022-01-04
CN108717723A (zh) 2018-10-30

Similar Documents

Publication Publication Date Title
WO2019200683A1 (zh) 一种基于草图实现形状保持的树木变形动画方法
Longay et al. TreeSketch: Interactive Procedural Modeling of Trees on a Tablet.
Ji et al. Easy mesh cutting
US9367944B2 (en) Tree model and forest model generating method and apparatus
CA2772530C (en) Hair meshes
Ijiri et al. Seamless integration of initial sketching and subsequent detail editing in flower modeling
CN108629834B (zh) 一种基于单张图片的三维头发重建方法
US11010952B1 (en) Method and user interface for generating tangent vector fields usable for generating computer-generated imagery
CN111583408B (zh) 基于手绘草图的人体三维建模系统
Zhang et al. Virtual reality design and realization of interactive garden landscape
CN114049426A (zh) 植物的建模方法、电子设备及计算机存储介质
US11393180B2 (en) Applying non-destructive edits to nested instances for efficient rendering
Favorskaya et al. Realistic tree modelling
US11348286B1 (en) Method for controlling digital feather generations through a user interface in a computer modeling system
Salval et al. Multiresolution surface blending for detail reconstruction
Li Creating for 3D digital Chinese ink-wash landscape paintings based on Maya
CN117576280B (zh) 一种基于3d数字人的智能端云一体化生成方法及系统
CN117853320B (zh) 一种基于多媒体操控的图像映射方法、系统及存储介质
WO2023023404A1 (en) Method for controlling digital object generations through a user interface in a computer modeling system
Liu et al. Approach for 3d reconstructing bonsai plant
Pellegrin et al. Curvature analysis of sculpted hair meshes for hair guides generation
Teng et al. An interactive method for modeling leaves
Petrenko Simulation of flowering plants
Ding et al. A visualization system for rice plant modeling
CN103460252B (zh) 从2d草图重建3d表面的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18915658

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18915658

Country of ref document: EP

Kind code of ref document: A1