0% found this document useful (0 votes)
40 views

Tree Modeling and Dynamics Simulation

This document discusses tree modeling and dynamics simulation techniques in computer graphics. It compares several modeling methods and chooses geometry-based rendering. The tree is decomposed into branches and leaves. Quaternion rotation is used to animate the tree and avoid gimbal lock. Orge 3D is used as the rendering engine due to its good graphics programming abilities. The techniques allow for realistic visual quality with low computational cost.

Uploaded by

Zhang Xu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Tree Modeling and Dynamics Simulation

This document discusses tree modeling and dynamics simulation techniques in computer graphics. It compares several modeling methods and chooses geometry-based rendering. The tree is decomposed into branches and leaves. Quaternion rotation is used to animate the tree and avoid gimbal lock. Orge 3D is used as the rendering engine due to its good graphics programming abilities. The techniques allow for realistic visual quality with low computational cost.

Uploaded by

Zhang Xu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Available online at www.sciencedirect.

com

Physics Procedia 33 (2012) 1710 – 1716

2012 International Conference on Medical Physics and Biomedical Engineering

Tree Modeling and Dynamics Simulation


FU Tian-shuanga, LI Yi-binga ,SHEN Dong-xub
a
Department of Information and Communication Engineering College,Harbin Engineering University ,Harbin, China
[email protected],[email protected]
b
Department of Electrical and Electronic Engineering,Hong Kong University,Hong Kong, China
[email protected]

Abstract

This paper introduces the theory about tree modeling and dynamic movements simulation in computer graphics. By
comparing many methods we choose Geometry-based rendering as our method. The tree is decomposed into
branches and leaves, under the rotation and quaternion methods we realize the tree animation and avoid the Gimbals
Lock in Euler rotation. We take Orge 3D as render engine, which has good graphics programming ability. By the end
we realize the tree modeling and dynamic movements simulation, achieve realistic visual quality with little
computation cost.

©2012
© 2011Published
Published by Elsevier
by Elsevier Ltd. Selection
B.V. Selection and/or
and/or peer peer-review
review under responsibility
under responsibility of [name Committee.
of ICMPBE International organizer]
Open access under CC BY-NC-ND license.
Keywords:tree modeling; dynamic tree movements simulation; Orge; quaternion

1.Introduction

Real-time simulation of natural scenes is a main area in Computer Graphics, especially for the dynamic
tree movement simulation. The technology of tree modeling is mature, such as fractal processing method,
particle system method and so on. Today the keystones of study modeling have transformed into how to
achieve realistic visual quality with little computation cost. At earlier time, people have present the method
that s -linear dynamic equations and wave
equation [1], but this simulation achieves realistic visual quality with little computation cost. And people
used wind field simulation to simulate tree s swing [2], wind speed and wind field mechanics can be
simulated, but environment of wind field is complicated. If we consider more factors such as vortex, it will
be a very complicated field.
This paper chooses Image-based rendering methods through comparing with many methods, such as
fractal processing method, particle system method. And we get the tree modeling, which is realistic visual
quality with little computation cost. Tree animation synthesized from trunk motion, branch motion and
leaves motion. Branches are divided into many sub-nodes. We can get the branches motion through

1875-3892 © 2012 Published by Elsevier B.V. Selection and/or peer review under responsibility of ICMPBE International Committee.
Open access under CC BY-NC-ND license. doi:10.1016/j.phpro.2012.05.275
Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716 1711

superposing the rotated sub-nodes. The leaves motion use leaf cluster swinging to complete. So, we can
simulate the tree animation. Rotation algorithm chooses quaternion. Quaternion can avoid the Gimbals
Lock in Euler rotation.
We take advantage of 3D engine in scene management with programming. Orge 3D engine has many
advantages, such as better rendering ability.

2.Tree modeling and rendering theory

The tree has larger difference in the type and structure, so the modeling of different kind of trees is also
different. People have finished a lot of work about tree modeling. According to different researches, we
can build modeling by different methods.

2.1.Fractal processing method

Fractal processing method describes the self-similarity mathematical function to represent topology and
morphological structure of s growth, such as L system [3]. This model usually include as much as tens
of thousands or even hundreds of thousands of triangular face, so it is well realistic. But it sacrifices the
computation to achieve realistic visual quality, so the system runs slowly or even can not run. It is not
suitable for the simulation of real-time roaming system.

2.2.Particle system method

In this way, object is considered as innumerable small particles, every particle has its own property, and
particles caused random changes over time [4]. Nowadays, this method has been widely used in large 3D
games. Particle system can fully manifested dynamics and the randomness of objects. But it is suitable for
smoke, fog, forest and a wide range of modeling; it is not suitable for single plant modeling. If someone
observes carefully, individual model is not very realistic.

2.3.Image-based rendering methods

This method represents object through extracting information from the image [5].The advantages are as
follows: Realistic, High-speed rendering, having no connection with scene complexity. Image can be
rendered s surface, and then it can get many special effects.
Billboard technique
The technique that is used to determine the polygon direction according to the observe direction, called
billboard technology, and the polygon is called billboard [6]. The direction of billboard is changing with the
view changing. For every form of the billboard, surface vector and upward vector determine the bulletin
board generally so as to determine the direction of image oriented, as in figure 1 shown, n is the given
surface vector, and u is the approximate upward direction vector, the main purpose is establishing a set of
three orthogonal vectors to determine the direction of the billboard. But this method has an obviously
disadvantage parallax.

Figure 1. The direction of billboard


1712 Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716

Crossing plane technology


Billboard technique simulates the complex object by using one plane, and crossing plane technology
simulates complex object by using several crossing planes. It chooses map of texture pixels by alpha test.
There are several crossing planes, so it can be seen as texture plane from different angles [7]. It will show
good effect through this method. This method is made possible by different crossing plane and map
cooperating well with the plane. Figure 2 shows the crossing plane.

Figure 2. Crossing plane

3.Our Tree Modeling Method

The structure of one tree can be decomposed into three parts: trunk, branches and leaves. The
relationship of these parts is called parent child relation [8]. Trunk determines the size of tree; Branches
show ure and external shape; Leaves number is the largest and leaves shapes are various.
The modeling of the branch is based on branches details, that is to say, it expresses branches by certain
forks. The fork and branch are shown in figure 3.

Figure 3. The branch and fork

The modeling of the leaves must avoid multifarious calculation and ensure realistic. Plane is used to
express leaf cluster. A plane shows a leaf cluster. Using the full freedom of billboard can realize leaf
cluster swinging with tree branch. The principle of leaf arrangement in botany is used to confirm the leaf
s position. We use collision detection to avoid plane cross, which is caused by the leaf arranged
closely. It adopts images with alpha channel as texture of leaf cluster, and eliminates the black side of the
leaves, and then we finish the modeling of leaves.
Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716 1713

4.Tree Animation Theory

Trunk motion, branches motion and leaves motion mix to produce tree animation. Such a structure can
be represented as a simplified hierarchy of interconnected rigid segments with the trunk as the root of the
hierarchy. Trunk motion is shallow movement, and it is not evident on the vision, so this paper only
considers branches motion and leaves motion.
A branch can be divided into many nodes, parent-node control sub-node [10]. As figure 4 shown, a node
controls b node, b node controls c node. Branches motion is the rotation and translation of sub-nodes.

Figure 4. A branch can be divided into many sub-nodes

The branch motion can be obtained by matrix rotation. Firstly, each sub-node of branches is assigned
an only index; secondly, according to the predetermined elastic parameters distribution corresponding
weights; at last, according to rotation algorithm to get branch motion, bending and vibration effect as
nature. Rotation algorithm as the following formula:
Rotating around X-axis:
1 0 0 0
0 cos -sin 0
RX ( )
0 sin cos 0
0 0 0 1
Rotating around Y-axis:
cos 0 sin 0
0 1 0 0
RY ( )
-sin 0 cos 0
0 0 0 1
Rotating around X-axis:
cos -sin 0 0
sin cos 0 0
RZ ( )
0 0 1 0
0 0 0 1
Leaf clusters own swinging and branch motion mix to leaves motion. Leaf clusters own swinging is
simple pendulum motion around pendant point on the branch [11]. We can define movement cycle and
amplitude according to our requirement.
1714 Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716

5.Simulation of tree animation

5.1.About Orge

Nowadays, the developing of 3D engine rapidly increases. There are Orge, Irrlicht, Nebula, KlayGE
and so on. Most game businessman prefer Orge 3D engine, because Orge engine has many advantages:
Firstly, Orge engine support Direct3D and OpenGL, and it can support many computer operating system,
such as windows, Linux, Mac oc x. Secondly, Orge 3D engine has a powerful particle system, and it is
good at produce atomizing results. Thirdly, Orge 3D engine excel at graphics programming; it has visual
programming tools; it builds scripting language; and then it can modify external data and debug built-in
programming. To sum up, it can finish graphics programming quaintly and efficiently, support many kinds
of graphics algorithm. Orge 3D engine apply to tree animation, bone animation etc, which need many
textures and vertex [12].

5.2.Rotation in Orge

Computer graphics often uses Euler rotation. There is fixed API for Euler rotation in Orge 3D engine.
But Euler rotation has the Gimbals Lock problem. Gimbals Lock can be descript as following: It rotate X
axis, Y axis and Z axis around objects coordinate. When the Y axis rotates 90 degrees, the Z axis will point
to the original X axis. But we only rotate around the X axis and Y axis in fact. Obviously, the degree of
freedom of the third axis is lost.
In order to avoid Gimbals Lock, we choose quaternion in Orge 3D engine. The quaternion class will be
used for quaternion processing in Orge 3D engine. The quaternion class consists of four parts: X axis, Y
axis and Z axis and rotation component W, the formula is listed as following:
Q cos(angle / 2) i ( x *sin(a / 2))
j ( y *sin(a / 2)) k ( z *sin(a / 2))
Code
Q.w = cos (angle / 2)
Q.x = axis.x * sin (angle / 2)
Q.y = axis.y * sin (angle / 2)
Q.z = axis.z * sin (angle / 2)
Then we construct a quaternion to rotate: Quaternion q (Degree (-90), Vector3::UNIT_X); where, the
first parameter definite rotation angle, the second parameter define the axis of revolution. The above code
shows that it rotate -90 degrees around the X axis. The quaternion is used for Scene Node rotation:
SceneNode->rotate (q); and then it can realize this node around X axis rotation -90 degrees.

5.3.Tree animation

Rotation of sub-node and mutual control of sub-nodes with each other realize branches motion. Besides
leaf clusters own swinging, there are leaf clusters motion with branch motion. These two parts mix to leaf
motion. Tree animation includes branch motion and leaf motion. We synthesize realistic tree animation
from combining branch motion and leaf motion [13].

6.Simulation results

Hardware environment as following: System Memory is 2GB CPU Clock is 2.0GHz Display card
is NVIDIA GeForce 7300GT, Graphic Memory is 128MB. Algorithm completed in windows 7 system and
visual studio2008. We choose poplar tree as model. The number of triangular face is 12058. Figure 5 is
some key frames in simulation.
Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716 1715

Figure 5. Some key frames in simulation

7.Conclusion and future work

In this paper, we achieve realistic visual quality with little computation in tree modeling based on
Geometry-based rendering. Branch and leaf motions are simulated respectively, and then we synthesize tree
animation. Computational complexity can be greatly decreased through this method. By the use of
quaternion we avoid the Gimbals Lock problem in Euler rotation. The future work is to simulate animation
forest. And we can use LOD technology which is greatly efficiency to decrease faces number and details
for those trees in distance.

Acknowledgment

This paper is funded by the International Exchange Program of Harbin Engineering University for
Innovation-oriented Talents Cultivation.

References

[1] Wu EH, Chen Y Y, Tao Y, et al. Reconstruction and physically based animation of trees from static images [C]
Proceedings of Eurographics Animation Workshop, Italy: Springer, 1999:157- 166.
[2] WANG Chun-hua, LI Liu-qing. Physical animation of trees in wind based on GPU[J]. Application Research of
Computers, 2010,27(10):3988-3990.
[3] Xiong Zhuang, WANG Run-jie, CHEN Lei YAO Lian-yu. Design and realization of 3D dynamic tree simulation[J].
Computer Engineering and Design, 2009, 30(8):2004-2007.
[4] Song Chengfang. Simulating the Dynamic Movements and Growing of Plants[D]. Zhejiang University,2007.
[5] LIU You Quan, WANG Wen Cheng, WU En Hua, Fast and Realistic Simulation for Trees Swaying in Wind[J]. Chinese
Journal of Computers.2005,28(7):1185-1191.
[6] Ma Wei, Zha Hongbin. Realistic Rendering of Small Scale Plants[J]. Journal of Computer Aided Design & Computer
Graphics.2009,21(4):505-510.
[7] CHEN Hua guang, WANG Jing wen, ZHANG Xiao qing. Real istic Model ing of 3D Tree Based on LOD in Virtual
Scene[J]. Computer Technology and Development.2008,18(12):228-234.
[8] CHEN Jie, LIU Hong. Modeling 3D Tree Based on Growth[J]. Journal of System Simulation.2006,18(10):2862-2864.
[9] Song Chengfang, Tan Qifeng, Zhang Long. Real-time Simulation of Dynamic Forest Scene in the Wind[J]. Journal of
Computer Aided Design & Computer Graphics, 2007,19(3):323-328.
[10] GU Xinchao, YANG Yong. The Synthesis Algorithm for Shape of Bended Branches[J]. Journal of Changchun
University of Science and Technology.2005,28(3):39-41.
1716 Fu Tian-shuang et al. / Physics Procedia 33 (2012) 1710 – 1716

[11] ZHANG Feng-gang, YAN Guo-ming, XUE Qing. Computer Simulation of Three-dimension Tree[J]. Journal of System
Simulation.2006,18(1):407-413.
[12] JIN Xiao-jin, MA Yao-hai. Realistic simulation of three-dimensional trees[J]. Computer Engineering and
Design.2010,31(8):1753-1756.
[13] WANG Chun hua, HAN Dong, ZHANG Hong fei. movement in wind[J]. Application
Research of Computers.2009,26(7):2757-2764.

You might also like