realistic animation of interactive trees

10
Vis Comput (2012) 28:859–868 DOI 10.1007/s00371-012-0694-z ORIGINAL ARTICLE Realistic animation of interactive trees Shaojun Hu · Norishige Chiba · Dongjian He Published online: 24 April 2012 © Springer-Verlag 2012 Abstract We present a mathematical model for animating trees realistically by taking into account the influence of nat- ural frequencies and damping ratios. To create realistic mo- tion of branches, we choose three basic mode shapes from the modal analysis of a curved beam, and combine them with a driven harmonic oscillator to approximate Lissajous curve which is observed in pull-and-release test of real trees. The forced vibration of trees is animated by utilizing local coordinate transformation before applying the forced vibra- tion model of curved beams. In addition, we assume petioles are flexible to create natural motion of leaves. A wind field is generated by three-dimensional 1/f β noises to interact with the trees. Besides, our animation model allows users to inter- actively manipulate trees. We demonstrate several examples to show the realistic motion of interactive trees without us- ing pre-computation or GPU acceleration. Various motions of trees can be achieved by choosing different combinations of natural frequencies and damping ratios according to tree species and seasons. Electronic supplementary material The online version of this article (doi:10.1007/s00371-012-0694-z) contains supplementary material, which is available to authorized users. S. Hu ( ) College of Information Engineering, Northwest A&F University, Yangling, 712100 Shaanxi, China e-mail: [email protected] N. Chiba Dept. of Computer and Information Sciences, Faculty of Engineering, Iwate University, Morioka, Japan e-mail: [email protected] D. He Mechanical and Electronic Engineering, Northwest A&F University, Yangling, 712100 Shaanxi, China e-mail: [email protected] Keywords Natural phenomena · Physically based animation · Tree animation · Lissajous curve · 1/f β noise 1 Introduction Realistic animation of trees is a challenging problem in the field of natural phenomena simulation with wide applica- tions in film industry and video games. Recent research has suggested that both modal analysis method [1] and spec- tral method combined with damped harmonic oscillator [2] could be employed to animate trees in real time. Modal anal- ysis method is efficient for simulation of deformable objects because deformation basis can be pre-computed. For tree animation, it treats an entire tree as a complex mechanical structure and extracts low frequency mode shapes to approx- imate tree deformations. Once the mode shapes are calcu- lated, we can interact with the trees arbitrarily, i.e., by car- rying out the pull-and-release test. In addition, this method can compute the bended shapes of branches automatically and we do not have to find the deformed shapes of branches. However, modal analysis method suffers from some limita- tions. First, it ignores the effect of leaves and disregards high frequency modes that may include vivid movements of tiny twigs and leaves. Second, the pre-computed mode shapes take (occupy) a large memory. Third, it is hard to choose suitable stiffness matrices and damping matrices for a com- plex tree system. With regard to the spectral method in [2], it assumes that branches have no direct effect on each other; thus, the vibration of branches can be solved independently using damped harmonic oscillator, and then be synthesized to a 2D motion texture. Since it pre-computes the response function of branches to wind field in frequency space, tree with thousands of leaves can be animated in real time. How- ever, this method also has some disadvantages. First, it only

Upload: dongjian

Post on 22-Aug-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Vis Comput (2012) 28:859–868DOI 10.1007/s00371-012-0694-z

O R I G I NA L A RT I C L E

Realistic animation of interactive trees

Shaojun Hu · Norishige Chiba · Dongjian He

Published online: 24 April 2012© Springer-Verlag 2012

Abstract We present a mathematical model for animatingtrees realistically by taking into account the influence of nat-ural frequencies and damping ratios. To create realistic mo-tion of branches, we choose three basic mode shapes fromthe modal analysis of a curved beam, and combine themwith a driven harmonic oscillator to approximate Lissajouscurve which is observed in pull-and-release test of real trees.The forced vibration of trees is animated by utilizing localcoordinate transformation before applying the forced vibra-tion model of curved beams. In addition, we assume petiolesare flexible to create natural motion of leaves. A wind field isgenerated by three-dimensional 1/f β noises to interact withthe trees. Besides, our animation model allows users to inter-actively manipulate trees. We demonstrate several examplesto show the realistic motion of interactive trees without us-ing pre-computation or GPU acceleration. Various motionsof trees can be achieved by choosing different combinationsof natural frequencies and damping ratios according to treespecies and seasons.

Electronic supplementary material The online version of this article(doi:10.1007/s00371-012-0694-z) contains supplementary material,which is available to authorized users.

S. Hu (�)College of Information Engineering, Northwest A&F University,Yangling, 712100 Shaanxi, Chinae-mail: [email protected]

N. ChibaDept. of Computer and Information Sciences, Facultyof Engineering, Iwate University, Morioka, Japane-mail: [email protected]

D. HeMechanical and Electronic Engineering, Northwest A&FUniversity, Yangling, 712100 Shaanxi, Chinae-mail: [email protected]

Keywords Natural phenomena · Physically basedanimation · Tree animation · Lissajous curve · 1/f β noise

1 Introduction

Realistic animation of trees is a challenging problem in thefield of natural phenomena simulation with wide applica-tions in film industry and video games. Recent research hassuggested that both modal analysis method [1] and spec-tral method combined with damped harmonic oscillator [2]could be employed to animate trees in real time. Modal anal-ysis method is efficient for simulation of deformable objectsbecause deformation basis can be pre-computed. For treeanimation, it treats an entire tree as a complex mechanicalstructure and extracts low frequency mode shapes to approx-imate tree deformations. Once the mode shapes are calcu-lated, we can interact with the trees arbitrarily, i.e., by car-rying out the pull-and-release test. In addition, this methodcan compute the bended shapes of branches automaticallyand we do not have to find the deformed shapes of branches.However, modal analysis method suffers from some limita-tions. First, it ignores the effect of leaves and disregards highfrequency modes that may include vivid movements of tinytwigs and leaves. Second, the pre-computed mode shapestake (occupy) a large memory. Third, it is hard to choosesuitable stiffness matrices and damping matrices for a com-plex tree system. With regard to the spectral method in [2],it assumes that branches have no direct effect on each other;thus, the vibration of branches can be solved independentlyusing damped harmonic oscillator, and then be synthesizedto a 2D motion texture. Since it pre-computes the responsefunction of branches to wind field in frequency space, treewith thousands of leaves can be animated in real time. How-ever, this method also has some disadvantages. First, it only

860 S. Hu et al.

considers one mode shape for each branch vibration and thatwill lose some visually important mode shapes which havebeen observed in tree pull-and-release test. Second, com-pared to modal analysis method, it is difficult to computethe bended shapes of a curved branch. Third, it only allowsthe trees to be interacted with a wind field rather than withan arbitrary force, i.e., impulsive force.

In this paper, we introduce a trade-off method betweenthe above-mentioned methods. Our method can generate re-alistic Lissajous-curve-like motion of branches similarly tomodal analysis method and allow users to manipulate treeinteractively. Meanwhile, it has the advantage of creatingnatural motion of individual leaves with flexible petioles.Furthermore, diverse motion of trees can be easily realizedjust by tuning few parameters.

In our model, we approximate the forced vibration ofthree-dimensional curved beams (branch) solved by modalanalysis method. For each branch, three dominant modes(two translational modes and one torsional mode) withslightly different natural frequencies and damping ratios areconsidered. The dynamics of tree is created by using the dy-namics of branches after carrying out the matrix transforma-tion. In addition, we employ natural frequencies and damp-ing ratios to identify different motions according to tree ge-ometries and seasons.

2 Related work

In the current research field of tree animation, we canroughly classify tree animation methods into mechanicalmethod, simplified mechanical method, stochastic method,data driven method and acceleration method.

The mechanical method considers tree as a complex nodestructure described in generalized coordinates and the trans-formation of a node position is affected by its adjacent nodes[1, 3, 4]. To solve the complex dynamics system, Stam [3]employs modal analysis method to animate a tree model, andDiener et al. [1] extend Stam’s method and introduce a windprojection basis to enhance the animation performance. We-ber [4] presents a fast simulation method that allows usersto interact with trees using a cloth dynamics model.

The simplified mechanical method ignores the global me-chanical structure of a tree and represents tree sways by adriven harmonic oscillator [2, 5–7] or by a static mechan-ical response [8–10]. Shinya and Fournier [5] create windmodel by using the power spectra of wind field and theyuse independent damped harmonic oscillator to model themotion of branches. Chuang et al. [6] and Habel et al. [2] in-troduce a spectral method that includes the motion spectrumof a damped harmonic oscillator. Hu et al. [7] use a 1/f β

noise and the simplified mechanical model to animate thedeformation of leaves in wind field. In [8–10], the dynamic

response of branch to the wind field is even simplified as astatic response process.

The stochastic method mainly utilizes noise functions,which is generated from inverse Fourier transformation ofwind spectrum, to directly control the deformation of a treemodel. Ota et al. [9] and Fujimoto et al. [10] propose aneffective 1/f β noise function and they can animate diversemotion of branches and leaves efficiently by adjusting pa-rameter β .

Data driven method animates trees or plants based on thereal motion data of branches and leaves captured by sensorsor videos. Diener et al. [11] use the method to retarget 2Dmotion data to animate tree models.

Acceleration method including LOD techniques [12–14],pre-computation method [2] and GPU-based method [2, 7,14] provides the possibility to animate large-scale dynamicforest scenes in real time.

In this paper, we do not consider data driven and acceler-ation methods. We use a stochastic method to create a three-dimensional wind field. For each branch, we model its vi-bration using a mechanical method. For an entire tree, wemodel its dynamics using a simplified mechanical method.Since we suppose branches and petioles are arbitrary bend-able curved beams, it greatly increases the computation cost.However, in comparison to the above-mentioned methods,our hybrid method can create realistic motion of trees with-out sacrificing too much performance.

3 Modal analysis of curved beams

To create realistic motion of branches, the bended shape andthe dynamics of the branches should be considered. A com-mon geometrical model to represent a branch is that of can-tilever beams which has been described in [2, 5–7]. Shinyaand Fournier [5] and Chuang et al. [6] assume for simplic-ity that the cantilever beam is a uniform thin beam. Habel etal. [2] improve the beam model to a tapered one and use alength-correction method to avoid stretching when subjectedto a large load. Hu et al. [7] propose a static equilibriummodel to approximate the bending shape of a curved beamin three dimensions. However, these methods do not covera phenomenon that branches have many vibration modes inthree dimensions and the superposition of these modes willgenerate complex motion. For example, we observed Lis-sajous curve from the pull-and-release test of a real tree stud-ied by James [15].

3.1 Lissajous curve

Lissajous curve describes a complex harmonic motion con-trolled by two parametric equations with different naturalfrequencies. One important feature of Lissajous curve is that

Realistic animation of interactive trees 861

Fig. 1 Sway response of a tree after pull-and-release test (reproducedfrom [15])

the combination of the two equations will generate totallydifferent curve even when slightly varying the two frequen-cies. If we take into account the influence of damping, anextension of Lissajous curve termed harmonograph figurewill create more complicated curve.

From the study of dynamic loads on trees, James et al.[15, 16] recorded the motion of a tree when it is pulled witha rope and released. Figure 1 shows the recorded trace ofa Eucalyptus regnans tree with 15 m height. The motion ofthe tree is not just sway back and forth in one direction likea simple mass–spring system. We can observe a circular pat-tern and the sway gradually changes to the opposite direc-tion in which the tree is pulled. A similar pattern can alsobe observed from harmonograph figure. This phenomenonmight be explained by modal analysis because the vibrationof trees is determined by superposition of mode shapes withvarious frequencies and dampings. In most cases, the natu-ral frequency and damping ratio of a tree in north–south di-rection are different from those in east–west direction fromthe experiments in [17]. However, even a slight difference innatural frequency and damping ratio will create completelydifferent motion of trunk according to the feature of Lis-sajous curve.

3.2 Forced vibration of curved beams

The study of the vibration of a three-dimensional uniformbeam shows that the first four mode shapes, comprising onehorizontal translation, two vertical translations and one tor-sional translation, are dominant [18]. The forced vibrationof curved beams in three dimensions is more complicated.A common solution of this problem is based on a modalanalysis method. However, it is difficult to obtain a preciseanalytic solution. Using the Finite Element Method (FEM)is a possible approach, while it is expensive because a treepossibly has thousands of branches with various shapes.Thus, we propose an approximate analytic solution to ani-mate the forced vibration of curved beams. In our model, weonly consider three basic modes of a curved beam, compris-ing two translational modes and one torsional mode, with

Fig. 2 (a) The motion tendency of the three modes of a curved beamsubjected to an external local load (red arrow line) in local coordinates.Blue arrow lines represent the components of L(t). (b) The solution ofthe bending angle φi of a beam segment PiPi+1 in global coordinates

slightly different natural frequencies and damping ratios.This is a plausible assumption because three dominant modeshapes are sufficient for describing a relatively simple struc-ture like a beam rather than a tree.

The modal solution of the forced vibration of a curvedbeam is separable in time and space domains. Thus, our an-alytic method includes the solution of time functions for thebasic modes and the solution of the static deflection of thecurved beam.

Time functions For a curved beam consisting of n discretesegments (P0P1,P1P2, . . . ,PiPi+1, . . . ,Pn−1Pn) subjectedto an applied local load L(t) as seen in Fig. 2(a), we con-struct a local coordinates u,v and w, where

v = P0P1/|P0P1|,w = P0Pn × v/|P0Pn × v|, (1)

u = v × w/|v × w|.The time functions of three basic modes are described by

the equations of driven harmonic oscillator:

862 S. Hu et al.

q̈u(t) + 4πζufuq̇u(t) + 4π2f 2u qu(t) = ∣

∣Lw(t)∣∣/m (2)

q̈v(t) + 4πζvfvq̇v(t) + 4π2f 2v qv(t) = ∣

∣Lw(t)∣∣/m,

r = u · P0Pn, (3)

q̈w(t) + 4πζwfwq̇w(t) + 4π2f 2wqw(t) = ∣

∣Lu(t)∣∣/m (4)

where qu(t), qv(t) and qw(t) are the displacements foru-translational mode about u axis, v-torsional mode about v

axis and w-translational mode about w axis; fu,fv and fw

are the natural frequencies; ζu, ζv and ζw are the dampingratios; r is the approximate length of the lever arm of thebeam; Lu(t), Lv(t) and Lw(t) are the components of L(t)

in local coordinates as seen in Fig. 2(a). Note that Lv(t) forthe v-translational mode is ignored for simplicity. We solveEquations (2)–(4) by the explicit Euler method and generatecorresponding new loads L′

u(t),L′v(t) and L′

w(t) as follows:

L′u(t) = 4π2f 2

u qu(t)

L′v(t) = 4π2f 2

v qv(t) (5)

L′w(t) = 4π2f 2

wqw(t)

Next, we apply the new loads to control the static deflectionof the curved beam. Since our goal is the animation of anentire tree rather than a single branch, ultimately, the restposition of each branch must be represented in global coor-dinates. To simplify this process, we convert the loads L′

u(t)

and L′w(t) in local coordinates to a load F(t) in global coor-

dinates by

F(t) = (u v w)

L′w(t)

0L′

u(t)

⎠ (6)

Mode shapes of curved beams We employ the static equi-librium model of curved beam in [7] to find the rest positionof a curved beam. Figure 2(b) shows the bending process ofa segment PiPi+1 subjected to a load Fi (t), where

Fi (t) =∑n−1

j=i F(t)

n(7)

To compute the bending angle ϕi , we derive a proportionalrelationship between a bending moment and the bending an-gle similarly to Hooke’s law:∣∣Fi (t)

∣∣|si | sin(θi) − ϕiki with si = PiPi+1, (8)

θi = arccos[

Fi (t) · si/(∣∣Fi (t)

∣∣|si |

)] − ϕi, (9)

ki = EImax

[

Dr − (Dr − Dt)i

n − 1

]m

(10)

where θi is the equilibrium angle as seen in Fig. 2(b); ki isthe flexural rigidity of segment i;EImax is the maximumflexural rigidity of a beam; Dr and Dt denote the diameterat the root and at the tip of a beam; m is the exponent from1 to 4 (m = 4 for a tapered circular beam). Readers whoare interested in the derivation of Eqs. (8)–(10) are referred

Fig. 3 The three basic mode shapes of (top) a uniform beam and (bot-tom) a curved branch generated by our method

Fig. 4 Simulation results of two different Lissajous curves.(a) fu = 0.75, fw = 0.8, ζu = 0.045, and ζw = 0.04; (b) fu = 1.0,fw = 1.1, ζu = 0.035, and ζw = 0.03

to Refs. [7] and [21]. The bending angle ϕi can be solvedby Newton’s method. However, the loads L′

u(t) and L′w(t)

cannot generate a twist effect. We utilize L′v(t) in Eq. (5) to

derive the rotation angle γ of segment PiPi+1 about the v

axis by

γ = 0.5πsgn(

L′v(t)

)(

1 − e−c0L′v(t)

)

/n (11)

where c0 is a constant. Figure 3(c) and (f), shows the twisteffects after using Eq. (11). An important feature of Eqs. (8)and (11) is the capability to keep the rest beam’s shape stableeven under large load conditions.

In comparison to modal analysis method using FEM, wedo not directly superpose the three mode shapes. Instead,for each segment PiPi+1, we first rotate it about the v axiswith an angle γ , and then we rotate it about the vector Ni

(Ni = Fi (t) × PiPi+1) with a bending angle ϕi . Figure 3shows the three mode shapes generated by our method.

We record the trace of the pull-and-release test of a three-dimensional beam with slightly different natural frequenciesand damping ratios as seen in Fig. 4. Simulation results showthat the vibration model is capable of creating motion pat-terns that are plausible to the vibration of a real tree (seeFig. 1). In the accompanying video, we tested two vibrationcases of a beam with different settings of natural frequenciesand damping ratios. The one is the vibration of the beam

Realistic animation of interactive trees 863

Fig. 5 (a) The hierarchy of a cheery tree (branches having the samecolor are in the same level) and (b) the local coordinates (blue line is uaxis; green line is v axis; red line is w axis) of leaves in the tree

having three modes with the same natural frequencies anddamping ratios, and the other is the vibration of the beamhaving three modes with slightly different natural frequen-cies and damping ratios. We found that the latter generatesmore realistic motion than the former.

4 Forced vibration of trees

Because of the complex geometric structure of trees, it isdifficult to solve the forced vibration of trees using a puremechanical method. While Diener et al. [1] employed modalanalysis method to provide a convincing motion of branches,they did not realize the motion of leaves. Similarly to [2], weassume that branches vibrate in their local coordinates andwill not affect each other. The vibration model of curvedbeam described in Sect. 3 is used to achieve the forced vi-bration of trees.

4.1 Tree hierarchy and coordinate transformation

A typical tree model in our animation system is a cherrytree with a 7-level hierarchy as seen in Fig. 5(a). We assumethat the level l (1 ≤ l ≤ 7) has nl branches, and each branchconsists of local coordinate information (ulk,vlk,wlk) (1 ≤k ≤ nl), node positions, natural frequencies, damping ratios,etc. In order to generate the motion of the tree, we carry outthe forced vibration from trunk to twig. First, we apply theforced vibration model of curved beams to the trunk and thedeformation of the ith segment of the trunk is described bya transformation matrix Ci . Next, we update the kth branchinformation in the second level based on a correspondingparent transformation matrix Ci by matrix multiplication:

(u2k,v2k,w2k) = (Ci × u2k,Ci × v2k,Ci × w2k) (12)

For each branch in the second level, we use the forcedvibration model of curved beams to bend it in the new localcoordinate and we repeat the procedure until the lowest levelbranches are reached.

Fig. 6 The local coordinate of a cherry leaf

4.2 Forced vibration of leaves

A common leaf model is a textured quad as described in[2, 9], while we represent a leaf by a detailed structure thatincludes a flexible petiole and a lamina. Similarly to the vi-bration of branches, we treat a petiole as a special branchand update its local coordinate according to the transforma-tion matrix of the parent branch. However, the definition ofthe leaf’s local coordinates is different from Eq. (1). Figure 6illustrates the local coordinates of a cherry leaf where v axispoints to the petiole direction, w axis is perpendicular to theleaf lamina, and u = v × w. Figure 5(b) illustrates the localcoordinates of all of the leaves.

4.3 Three-dimensional wind field

The applied external force on a tree could be a turbulentwind load or an impulsive force, while the former is hard tomodel. Differently from one- or two-dimensional wind fielddescribed in [2, 5, 9], we employ three dimensional 1/f β

noise functions to model a wind field. Many approaches ex-ist to implement the 1/f β noise functions, while we prefera spectral method because we can generate diverse turbu-lence in time domain just by simply tuning β in frequencydomain. Similarly to the wind field synthesis method pro-posed by Khorloo et al. [19], we assume that the wind ve-locity U(x, y, z, t) consists of three components along lon-gitudinal (u-component), vertical (v-component) and lateral(w-component) directions denoted by:

U(x, y, z, t) = (

Uu(x, y, z, t),Uv(x, y, z, t),

Uw(x, y, z, t))T (13)

where x, y, and z are scaled values between 0 and 1 basedon the bounding box of a tree. To simplify the description,we will shorten the U(x, y, z, t) and its components as U,Uu, Uv and Uw . Then, we employ a spectrum function torepresent the spectrum of the wind components:

S(β,f1, f2, f3) = 1√

f 21 + f 2

2 + f 23

(β+2)/2(14)

864 S. Hu et al.

where fi (1 ≤ i ≤ 3) is the ith temporal frequency. We setβ = 1.67 for u-component wind speed and β = 1.33 for v-and w-component wind speed, respectively. Small β meansmore turbulent signal in the time domain, and vice versa.Next, we obtain three discrete noise functions in time do-main with size N based on Inverse Fast Fourier Transform(IFFT):

FBMu(i, j, k) = IFFT[

S(1.67, f1, f2, f3),N]

FBMv(i, j, k) = IFFT[

S(1.33, f1, f2, f3),N]

(15)

FBMw(i, j, k) = IFFT[

S(1.33, f1, f2, f3),N]

where 0 ≤ i, j, k ≤ N − 1. We standardize the discrete noisevalues from −0.5 to 0.5, for convenience. To avoid generat-ing identical noise for the same β , we vary starting points fora random number generator to create different phases whenusing IFFT. In addition, a trilinear interpolation method isemployed to convert the discrete noise functions to continu-ous functions. Since the wind speed changes as a function ofheight, we describe mean wind speed W(z) at a given heightz by

W(z) = c1 ln(c2z) (16)

where c1 and c2 are two constants. Next, we generate athree-dimensional wind field by the following equations:

(Ur,Uv,Uw) = (

sU ′u, sU

′v, sU

′w

)

U ′u = FBMu

(

x(N − 1) − c5t, y(N − 1), z(N − 1) − c6t)

+ 0.5

U ′v = c3FBMv

(

x(N − 1) − c5t, y(N − 1),

z(N − 1) − c6t)

(17)U ′

w = c4FBMw

(

x(N − 1) − c5t, y(N − 1),

z(N − 1) − c6t)

s1 =√

1 + c23/4 + c2

4/4

s2 =√

U ′2u + U ′2

v + U ′2w

s = W(z)(

1 + λ(s2/s1 − 0.5))

/s2

where c3 and c4 are coefficients to scale the wind magni-tude in vertical and lateral directions, c5 and c6 are phasesto control the sampling speed of the noises, and λ is the scal-ing factor of the noise between 1 and 2. Equation (13) workswhen the wind direction is parallel to the x-axis. However,an interactive tree animation system should have the capa-bility of adjusting the wind direction and magnitude dynam-ically. Therefore, we can extend the turbulent wind velocityU by a user-controlled wind vector vwind as follows:

U = |vwind|(Uuu + Uvv + Uww)

(u,v,w) = (

vwind/|vwind|,u × vy/|u × vy |,u × v/|u × v|)(18)

Fig. 7 (a) The local coordinates of a wind vector; (b) Screenshots of athree-dimensional wind field (32 × 32 × 32). Red line with small bluesquares represents the wind vector

where vy is a unit vector which is parallel to the y-axis and(u,v,w) represent longitudinal, vertical and lateral direc-tions of the wind velocity as seen in Fig. 7(a). Here, we in-tentionally denote wind local coordinate symbols (u,v,w)

in non-italic style to distinguish them from the (u,v,w) initalics for branches and leaves. Since the vibration problemof branches or petioles is solved in local coordinates as de-scribed in Sect. 3.2, the wind load U on a branch or a petioleeventually is to be transformed to the local load L(t) as fol-lows:

L(t) = (U · u,U · v,U · w)T (19)

Figure 7(b) illustrates the selected three slices of a three-dimensional wind field generated by our method. Note thatthe left slice intuitively shows the logarithmic growth ofwind magnitude in the height direction.

4.4 Choosing parameters

Although we derived the forced vibration model of trees,it is still hard to create realistic motion of trees if we do

Realistic animation of interactive trees 865

not consider the properties of trees (i.e., natural frequenciesand damping ratios). The botanical research on the dynamicsof trees in wind field [16] shows that the natural frequencyof trees is linearly related to the ratio of diameter at breastheight to the tree height squared. We extend this relation-ship to compute the natural frequency of the j th (1 ≤ j ≤ n)

branch of a tree in our model as follows:

f ′j = dj

h2j

f ′min = min

{

f ′1, f

′2, . . . , f

′j , . . . , f

′n

}

f ′max = max

{

f ′1, f

′2, . . . , f

′j , . . . , f

′n

}

fj = fmin + (

f ′j − f ′

min

)

(fmax − fmin)/(

f ′max − f ′

min

)

(20)

where dj is the average diameter of the branch, hj is thelength of the branch, fmin and fmax are the user defined min-imum and maximum natural frequencies of the tree. Sincewe do not consider the hierarchies of the branches whencomputing the natural frequencies, the j th branch corre-sponds to the kth branch in the lth level as described inSect. 4.1.

It is difficult to estimate damping ratios only from branchdiameter and length. Studies of the effect of branches andleaves on damping ratios [6, 17, 20] suggest that a branchwith abundance of sub-branches and leaves may have agreater damping ratio than a branch with few branches andleaves. Thus, we use an empirical equation to approximatethe damping ratio of the j th branch of a tree:

ζj = ζmin + (rj − rmin)(ζmax − ζmin)/(rmax − rmin)

rj = mbranchj + mleaf

j /6(21)

where mbranchj and mleaf

j represent the number of sub-branches and leaves which are attached to the j th branch,ζmin and ζmax are the user defined minimum and maximumdamping ratios of the tree. Note that Eq. (21) is not the pre-cise description of damping ratios. From the experimentsof tree pruning in [17] and branch removing in [20], thedamping ratio of a certain branch will decrease sharply onlywhen the most of sub-branches are removed. Furthermore,the damping ratio may not be a constant even for the samebranch because of the influence of aerodynamics. However,we have to make compromise to pursue visually plausibleanimation in computer graphics. Using Eq. (21), first, wecan cover the phenomenon that the bare branch or the branchwith few branches or leaves will have a small damping ratiothat is close to ζmin; second, we can just use two simple pa-rameters ζmin and ζmax to control the damping ratios of thebranches of an entire tree.

While we generate a natural frequency and a damping ra-tio for the j th branch, our forced vibration model of curvedbeam requires three different pairs of natural frequenciesand damping ratios. In order to generate more realistic mo-tion of branches, we slightly vary two pairs of them by:

Fig. 8 Animation frame sequences of the pull-and-release tests of(top) a cherry tree and (bottom) a tulip poplar tree

fju = fj , ζ

ju = ζj

f jv = fj [1 + 0.1noise()], ζ j

v = ζj [1 + 0.1noise()] (22)

f jw = fj [1 + 0.1noise()], ζ j

w = ζj [1 + 0.1noise()]where the noise() function returns a random value between−0.5 and 0.5. For leaves, we increase the damping ratio in w

direction and decrease it in v direction (see Fig. 6) becausethe leaf will create more aerodynamic drag in the directionperpendicular to its surface.

5 Results

All our examples were tested in an Intel Core2 Duo CPUat 2.8 GHz and an NVIDIA GeForce 9500 GT video card.Figure 8 shows the pull-and-release test of a cherry tree anda poplar tree. In this case, the manipulation of trees withoutleaves can be carried out interactively around 50 FPS. In theaccompanying video (the video submitted with the paper canbe accessed at the site http://www-cg.cis.iwate-u.ac.jp/lab/gallery1-e.html), we demonstrate that different combina-tions of natural frequencies and damping ratios will generatetotally different motion of trees. The combination of highnatural frequencies and small damping ratios will give a vi-sually hard vibration that lasts for a long time before comingto rest, which is suitable for animating trees in winter. On theother hand, the combination of low natural frequencies andlarge damping ratios will create visually soft vibration thatwill come to rest in a very short time, and we can utilize thiscombination to animate trees in summer.

According to the research in Ref. [16], trees with differ-ent canopy shapes and branch structure show different spec-trum which possibly corresponds to different combinationsof natural frequencies and damping ratios. Thus, we mayneed to take the geometric structure into account when an-imating a specific tree species. Figure 9(a–d) illustrates thetest examples including a small cherry tree, a large cherrytree in summer, a tulip poplar tree, and the large cherrytree in early winter. The parameters of the four models anda grassland model are shown in Table 1. The large cherrytree has a bushy-like structure without obvious trunk struc-ture, while the tulip poplar tree has a clear trunk structure.

866 S. Hu et al.

Table 1 Animation statistics ofvarious models Model name Object

typeNo. ofobjects

No. ofnodes

No. oftriangles

f min f max ζmin ζmax FPS

Small cherry tree Branch 60 123 3936 0.5 1.0 0.2 0.5 –

Leaf 816 3264 115,056 1.2 1.8 0.08 0.12 –

Total obj. – 3387 118,992 – – – – 45

Large cherry treein summer

Branch 546 1160 37,120 0.4 0.8 0.12 0.30 –

Leaf 5460 21,840 769,860 1.0 1.4 0.08 0.12 –

Total obj. – 23,000 806,980 – – – – 10

Large cherry treein winter

Branch 546 1160 37,120 0.6 1.3 0.07 0.15 –

Leaf 344 1376 48,504 1.6 2.8 0.03 0.07 –

Total obj. – 2536 85,624 – – – – 41

Tulip poplar tree Branch 322 1410 45,120 0.4 0.5 0.12 0.14 –

Leaf 1932 9660 241,500 1.3 1.7 0.07 0.09 –

Total obj. – 11,070 286,620 – – – – 20

Grassland Blade 5000 20,000 35,000 0.8 1.2 0.13 0.17 23

Fig. 9 (a) (b) (d) Cherry trees and (c) a tulip poplar tree animated in wind field. Animation of trees (a–c) in summer and (d) in early winter

Thus, we empirically choose a large damping ratio (0.3)for the cherry tree and a small damping ratio (0.14) for thepoplar tree. To animate the cherry tree in winter as shownin Fig. 9(d), we increase the natural frequencies of the treein summer from 0.8 to 1.3 and decrease the damping ratiofrom 0.3 to 0.15. The few leaves attached on the winter treeare assigned a very high natural frequency (2.8) and a smalldamping ratio (0.07). In addition, we consider three modesfor each branch and petiole with slightly different naturalfrequencies and damping ratios described by Eq. (22) to gen-erate Lissajous-curve-like motion. The accompanying videodemonstrates the realistic motion of the various trees.

The frame rates of the five models range from 10 FPSto 45 FPS as shown in Table 1. For a large cherry tree with23 k nodes and almost 807 k triangles, the frame rate canstill be kept around 10 FPS. From the statistical data, wefound that the FPS is related to the number of nodes ratherthan the number of triangles as shown in Fig. 10. However,the large cherry tree in winter with less number of nodesruns more slowly than the small cherry tree. This could be

Fig. 10 Relationship between FPS and the number of nodes for fivemodels

explained by the more complex structure of the large cherrytree with 546 branches compared to the small cherry treewith 60 branches. In addition, the animation of grasslandwith 20,000 nodes has a larger FPS than the poplar tree with

Realistic animation of interactive trees 867

Fig. 11 Animation results of (a) a small cherry tree and (b) a tulippoplar tree swaying in a gale. A close range view of (c) the small cherrytree and (d) the tulip poplar tree

smaller nodes (11,070). The abnormal increase of FPS ismainly because the blades of the grassland do not have thecomplex branch structure.

One typical advantage of our animation is the large de-formation of trees even in an extremely strong wind field asshown in Fig. 11(a) and (b). This is achieved by employ-ing Eqs. (8) and (11) to compute a stable bending angle anda rotation angle according to the wind direction. The closerange view of our animation is still acceptable as shown inFig. 11(c) and (d).

6 Conclusion and future work

We presented an analytic method to approximate the forcedvibration of curved beams based on modal analysis method.Then, we applied this method to animating a tree by in-troducing a three-dimensional wind field constructed by aspectral method. Petioles are considered as curved beamsand some guidelines were given to set natural frequenciesand damping ratios according to the tree structure. The an-imation results showed that the integration of the dynam-ics of curved beam, three-dimensional wind field, flexiblepetioles and tree properties created the realistic motion oftrees at a reasonable frame rate without pre-computation orGPU acceleration. Diverse motions of trees can be realizedby choosing different combinations of natural frequenciesand damping ratios according to tree species and seasons.

From the observation of the motion of real trees in windfield we found that aerodynamics will create impressivemovements that may not be easily modeled by traditionalmethods. In the near future, we would like to introduce aero-dynamics to our model. Also, the extension of our model to

interactively handle collision detection with rigid body byconsidering GPU acceleration is also an interesting topic.

Acknowledgements This work was partially supported by the Doc-toral Start-up Funds (2010BSJJ059), the Fundamental Research Funds(QN2011135) of Northwest A&F University, and the National Science& Technology Supporting Plan of China (2011BAD29B08). The au-thors would like to thank anonymous reviewers for their helpful sug-gestions.

References

1. Diener, J., Rodriguez, M., Baboud, L., Reveret, L.: Wind projec-tion basis for real-time animation of trees. Comput. Graph. Forum28(2), 533–540 (2009)

2. Habel, R., Kusternig, A., Wimmer, M.: Physically guided anima-tion of trees. Comput. Graph. Forum 28(2), 523–532 (2009)

3. Stam, J.: Stochastic dynamics: simulating the effects of turbu-lence on flexible structures. Comput. Graph. Forum 16(3), 159–164 (1997)

4. Weber, J.P.: Fast simulation of realistic trees. IEEE Comput.Graph. Appl. 28(3), 67–75 (2008)

5. Shinya, M., Fournier, A.: Stochastic motion—motion under theinfluence of wind. Comput. Graph. Forum 11(3), 119–128 (1992)

6. Chuang, Y.Y., Goldman, D.B., Zheng, K.C., Curless, B., Salesin,D., Szeliski, R.: Animating pictures with stochastic motion tex-tures. Proc. ACM SIGGRAPH Conf. 24(3), 853–860 (2005)

7. Hu, S., Fujimoto, T., Chiba, N.: Pseudo-dynamics model of a can-tilever beam for animating flexible leaves and branches in windfield. Comput. Animat. Virtual Worlds 20(2–3), 279–287 (2009)

8. Akagi, Y., Kitajima, K.: Computer animation of swaying treesbased on physical simulation. Comput. Graph. 30(4), 529–539(2006)

9. Ota, S., Tamura, M., Fujimoto, T., Muraoka, K., Chiba, N.: A hy-brid method for real-time animation of trees swaying in wind field.Vis. Comput. 20(10), 613–623 (2004)

10. Fujimoto, T., Miyauchi, S., Suzuki, T., Chiba, N.: Noise-basedanimation of waving phenomena. In: IWAIT 2005, pp. 459–464(2005)

11. Diener, J., Reveret, L., Fiume, E.: Hierarchical retargeting of 2Dmotion fields to the animation of 3D plant models. In: ACM-SIGGRAPH/EG Symposium on Computer Animation 2006, pp.187–195 (2006)

12. Beaudoin, J., Keyser, J.: Simulation levels of detail for plant mo-tion. In: Proceedings of the SIGGRAPH/ Eurographics Sympo-sium on Computer Animation 2004, pp. 297–304 (2004)

13. Giacomo, T.D., Capo, S., Faure, F.: An interactive forest. In: Pro-ceedings of the Eurographic Workshop on Computer Animationand Simulation 2001, pp. 65–74 (2001)

14. Zhang, L., Song, C., Tan, Q., Chen, W., Peng, Q.: Quasi-physicalsimulation of large-scale dynamic forest scenes. In: ComputerGraphics International 2006, pp. 735–742 (2006)

15. James, K.R.: Dynamic wind loads on trees. In: ISAAC (2005)16. James, K.R., Haritos, N., Ades, P.K.: Mechanical stability of trees

under dynamic loads. Am. J. Bot. 93(10), 1522–1530 (2006)17. Moore, J.R., Maguire, D.A.: Natural sway frequencies and damp-

ing ratios of trees: Influence of crown structure. Trees 19(4), 363–373 (2005)

18. Nealen, A., Müller, M., Keiser, R., Boxerman, E., Carlson, M.:Physically based deformable models in computer graphics. Com-put. Graph. Forum 25(4), 809–836 (2005)

19. Khorloo, O., Gunjee, Z., Sosorbaram, B., Chiba, N.: Wind fieldsynthesis for animating wind-induced vibration. Int. J. VirtualReal. 10(1), 53–60 (2011)

868 S. Hu et al.

20. James, K.R., Haritos, N.: The role of branches in the dynamicsresponse characteristics of trees. In: Australian Earthquake Engi-neering Society Conference (2010)

21. Rao, B.N., Rao, G.V.: Large deflections of a non-uniform can-tilever beam with end rotational load. J. Sound Vib. 304(24), 969–973 (2007)

Shaojun Hu is currently a lecturerin College of Information Engineer-ing at Northwest A&F University.He is engaged in research on Com-puter Animation. He received a B.E.and M.E. in Computer Science andTechnology from Northwest A&FUniversity, China and a D.E. inComputer Science from Iwate Uni-versity, Japan in 2003, 2006 and2009, respectively.

Norishige Chiba is currently a Pro-fessor in Department of ComputerScience at Iwate University. His re-search interests include computergraphics, laser graphics and interac-tive graphics. He received a B.E. inElectrical Engineering from IwateUniversity and an M.E. and D.E. inInformation Engineering from To-hoku University in 1975, 1981 and1984, respectively. He worked atNippon Business Consultant Co.,Ltd. from 1975 to 1978. He was aResearch Associate in the Depart-ment of Communication Engineer-

ing at Tohoku University from 1984 to 1986, an Associate Professorof Computer Science at Sendai National College of Technology from1986 to 1987, and an Associate Professor of Computer Science at IwateUniversity from 1987 to 1991. He is a member of The Society for Artand Science, IEICE, IPS, IEEE and ACM.

Dongjian He is currently a Profes-sor in College of Mechanical andElectronic Engineering at North-west A&F University. His researchinterests include computer graph-ics, image analysis and machinevision. He received a B.E., M.E.and D.E. in agricultural engineeringfrom Northwest A&F University in1982, 1985 and 1998, respectively.He was a lecturer in the Collegeof Mechanical and Electronic En-gineering at Northwest A&F Uni-versity from 1987 to 1992, and anAssociate Professor from 1992 to

1999. He is a member of the China Computer Federation, vice chair-man of Shaanxi Society of Image and Graphics, vice chairman of Elec-trical Information and Automation Committee of CSAE, and a memberof a council of Chinese Society for Agricultural Machinery.