Computer Representation and Rendering of Trees
Written by Paul Bourke
April 1989
Computer based models and rendering of natural objects is often very expensive
in terms of storage requirements and processing load. This is especially so
when attempting to incorporate plants into scenes for applications such as
landscape architecture where a complete 3D description is often desirable. Even
a very simple tree for example contains a large number of branches and leaves.
A number of techniques for representing trees in models designed for computer
based rendering will be discussed leading up to the ideal method of a full 3D
description.
Painting
A very common method of incorporating plants in computer generated images is to
paint the images on afterwards. This method has a place where the extra
complexity of actually putting plants in the 3D scene is too expensive. Given a
skilled operator of a photo-touchup package the results can be very good. Of
course there can be a considerable amount of operator time especially placing
trees partially behind other objects in the image. Adding shadows can also be
quite time consuming. The main objection is that every image that is generated
needs to be modified by hand thus negating one of the main advantages of
computer rendering from 3D models, that is, once a 3D model is generated it is
easy to create any number of views. Modifying the images after the rendering
also removes the possibility of computer generated animations.
Crude 3D models
One way to represent a tree in 3 dimensions is to approximate it with some of
the geometric building blocks provided by 3D modellers. In a very simple case,
the truck (or branches) may be made from cylinders. The leaves may be a sphere
sitting on top of the trunk.
If this is coloured appropriately then in the
context of a landscape it is easily recognised as a tree and not a toffee-apple.
This method has been used for quite a while, it doesn't add a lot of complexity
to the computer model and in fact most rendering packages can handle cylinders
and spheres more efficiently than other geometric primitives such as planes. An
extension is to map a leaf texture onto the sphere and this may even have a
transparency component, a bark texture can be mapped onto the trunk.
There are very serious limits to the realism of a tree created in this way.
While this may not be a problem for scenes which only have simple rendering
techniques applied to them (Gouraud or Phong shading), they can look quite out
of place if the rest of the scene is rendered with a high level of realism.
|
|
Silhouettes
A very common approach when improved realism is important but where it is still
desirable to keep the data content down is to create a 2D tree or slice that is
positioned in a 3D scene. This is usually accomplished by placing a plane in
the scene and mapping a photo of a tree onto that plane as a colour map and
placing a silhouette of the tree as a transparency map. It is straightforward
to scan a number of tree types for species variation and to scale the planes
for size variation.
|
|
The main problem with this approach is that the plane onto which the tree image
is placed must stay perpendicular to the camera.
As a result of this many 3D
modelling and rendering packages offer this feature, the camera can be "linked"
to the normal of the tree plane so that as the camera is moved the tree plane
rotates about its vertical axis to stay perpendicular. Another problem is
obtaining images which have the same lighting conditions as will be used in the
model. Otherwise the scene may be illuminated from one direction and the tree
appear to be illuminated from another. This tree also casts incorrect shadows
except in very special cases when the sun lies in the plane perpendicular to
the tree plane. When the sun is in any other position the shadows are shear
distorted projections of the correct shadow.
|
|
Detailed 3D models
The ideal way of representing trees in a 3D model which overcomes all the
rendering problems of other techniques is to create, as accurately as is
possible and reasonable, the geometry of the tree. The geometric primitives are
usually truncated tapered cones with spheres at the intersections embellished
with an appropriate colour and bump map for the trunk and branches.
|
|
Examples of bark texture/bump maps.
|
|
|
Polygons or possibly spline surfaces are used for the leaves.
Such trees can be generated in a number of ways both manually
or by automatic methods given some of the desired characteristics of the plant.
It is often possible to create a tree "by hand", that is, to specify all the lim
bs and leaf positions. This method is likely to be quite tedious and only
creates a single plant. Some variation of the trees in the scene can be
achieved by scaling and rotating a single description of a tree.
|
|
Another method is to use 3D L-Systems (Lindenmayer) to create the geometry, an
example of this is the image of the bush with flowers.
This entire bush is generated from a series of very simple string rewriting rule
s that are applied iteratively. It can be "grown" to any desired resolution and
complexity which
can be a great advantage when the scene is being composed. The plant can be
generated to a low level of complexity while the scene is being modelled when
interactivity and speed are important. When preview images are being created or
animation paths tested the plant can be created to a higher resolution, and the
plants can be formed at still higher complexity for the final renderings.
|
|
The third method is to use a design system specifically written for tree or
plant generation.
These programs take parameters such as the average number
branches per branch node, the average branch angle, a branch length reduction
factor, etc. The software then grows the plant to the stage required. This
method has the same advantage as L-Systems in that plant complexity can be
controlled. In specific plant generation software it is usually straightforward
to form plants of a desired species, size, foliage, etc
The obvious advantage with full 3D trees is that they appear as normal elements
in the scene to be rendered. They cast shadows as expected, they can be viewed
from any position, and they can offer a high degree of realism. The
disadvantages are the storage requirements and the increased processing time
for the rendering process. It is not uncommon for a single plant to be formed
from upwards of 100,000 polygons and/or cylinders, not all rendering
packages can handle this complexity.
The examples here are from a number of different packages and show that
software is readily available to handle complex plant descriptions. The other
techniques have a place depending on software capabilities and the demands of
the project being undertaken.
Further examples
Inside a tree
Simple shrub
Spiral leaf bush
Particle system twig
Particle system twig
Top view of pine tree
High view of pine tree
Worm eye view of pine tree
Palm tree
Palm tree
Simple bush
|