That researchers in the field of computer games usually find it is difficult to simulate the motion of actual 3D model trees lies in the fact that the tree model itself has very complicated structure, and many sophisticated factors need to be considered during the simulation. Though there are some works on simulating 3D tree and its motion, few of them are used in computer games due to the high demand for real-time in computer games. In this paper, an approach of animating trees in computer games based on a novel tree model representation—Ball B-Spline Curves (BBSCs) are proposed. By taking advantage of the good features of the BBSC-based model, physical simulation of the motion of leafless trees with wind blowing becomes easier and more efficient. The method can generate realistic 3D tree animation in real-time, which meets the high requirement for real time in computer games.

In current computer games, plants in scenes are usually consisted of simple plane pictures positioned in four orthogonal directions. 3D models of plants are seldom used in computer games. Recently, 3D plants come forth in some computer games which make users feel more realistic. For example, in [

However, in the scope of our knowledge, we do not find any research publications on discussing 3D tree motion in computer games. In fact, many researchers have made contributions in tree modeling and its motion, but none is actually applied in computer games. In tree modeling, the main methods include the followings: L-system [

However, because of the high demand for real time in computer games, most of the above work cannot be applied directly in computer games. Some can be used to animating trees in computer games like Akagi’s work as extra speeding technique was employed to reduce the computational complexity, and thus real-time animation can be generated [

There are two main factors hampering the application of 3D tree motions in computer games. For one thing, most of the tree representations are too complicated to implement real-time animation; for another, the simulation of tree animation is a sophisticated work because many physical computations like animation aerodynamics, material mechanics, and pole kinematics are involved.

In our paper, a novel tree model based on BBSC is introduced, and the method of simulating tree motions based on this model is proposed [

Ball B-Spline Curve (BBSC) is a parametric solid representation of freeform tubular objects, which are skeleton-based parametric solid model. BBSC directly defines objects in B-Spline function form by using control sphere instead of control point in B-Spline curve. BBSC not only to describe every point inside 3D solid objects but also provides its center curve in B-Spline form directly. So the representation is more flexible for modeling, manipulation, and deformation.

Let

The Ball B-Spline Curve (BBSC) is therefore defined as

As

A BBSC created by interpolation.

The data spheres (red) and the control spheres (green)

The BBSC after transformation

The rendered BBSC

The BBSC presented above has many features which make it very suitable to construct 3D trees in games.

Solid mathematical fundamentals.

Precise evaluation.

Flexibility of manipulations and deformations.

More compact dataset than discrete or linear representations when defining a freeform 3D object.

Therefore, we can generate real-time animation of the BBSC-based trees easily.

BBSC is a parametric representation of 3D freeform solid objects [

Geometrical model represented by BBSCs.

Tessellated BBSC-based tree.

Mesh mode

Rendering result

A graph-based data structure (tree data structure) is built to represent the complex hierarchical structures of trees shown in Figure

Topological structure of representing a tree.

In the wind model, we adopt Feng Jinhui’s method for physical simulation of wind [

In our method, the users are allowed to choose the wind force model and set the wind direction according to their requirements. Two kinds of wind force model are provided, and arbitrary wind direction in

The gust of wind increases gradually from zero to the highest point and then decreases gradually to zero again. The model can be represented in the following equation:

The stable wind increases gradually from zero to certain grade, and for some seconds retains at this grade, then finally decreases gradually to zero. The model can be represented in the following equation:

Figure

The relationship between the wind force and the time.

The gust of wind model

The stable wind model

Users are allowed to set arbitrary wind direction in

The later computation of the motion of the branches is based on the above wind model.

In the introduction part, we have noticed that when computing the motion of a certain branch, those researchers generally segment a certain tree branch into several segments and then view those little segments as poles. Therefore, the deformation method of a pole can be applied to the little segment very easily to generate relatively natural-looking tree animation.

As described in Section

As shown in Figure

BBSC model’s bending by simulating pole’s bending.

Pole’s bending

BBSC model’s bending

And the BBSC-based tree’s bending by simulating a pole’s bending is shown in Figure

In our model, the branches have been already divided into several segments, and each segment between two data spheres can be viewed as a pole. Considering the high request for real-time in computer games, we just apply simple deformation method of a pole to each segment. Therefore only bending is taken into account. The rotation along the cross section and the deformation along the axis direction are both neglected. The bending of a branch can then be described as three Eula angles which represent the rotation angles of the data spheres around the

Suppose the coordinate vectors of the data point before and after deformation are

The three angles can be obtained by applying the pole deformation theory under the situation of decomposing the wind vector and the pole segment vector, respectively. The wind force vector can be decompounded into two vectors which are along

Wind decomposition and pole decomposition.

Then there are four situations about the wind force acting on the segment vector.

The wind force along the

The wind force along the

The wind force along the

The wind force along the

In each above situation, the related angle can be computed through (

And finally, the rotation angle of the data points can be computed as follows:

In fact, the solution of motion described as above just aims to the little segment between two data spheres. And the motion of the whole branch is obtained by computing the motion of its data spheres from bottom to top one by one and then interpolating the new data spheres after motion. For a backbone branch, the initial data sphere is the root; otherwise the initial data sphere is also within another branch. The root data sphere is obviously not moving. But the motion of the data spheres contained by more than two branches should be computed carefully. If the current branch is an upper level one, then the position of the initial data sphere could just employ the position obtained in lower level branch. For example, in Figure

Data spheres contained by more than two branches.

As the tree has been constructed in accordance with the hierarchical structure as in Figure

Giving related parameters and certain time

Six states extracted from the 20 seconds animation of a tree.

Eight states extracted from the 40 seconds animation of a tree.

In this paper, an approach of generating real-time animation of trees based on a novel model—BBSC—is proposed, which can be applied in computer games. BBSC is a good representation for 3D trees and plants in particular for computer games as its solid mathematical representation and more compact dataset. Moreover, animation of trees can be generated easily as the data spheres have divided the branches into little segments automatically thus the motion of the tree can be obtained by computing the motion of each of these data spheres. By interpolating these data spheres after moving, the motion of the branch, and finally the motion of the whole tree can be implemented. The experimental results show that this method is proper and efficient for simulating tree animation in computer games.

The project is sponsored by the Scientific Research Foundation for the Returned Overseas Chinese Scholars, State Education Ministry.