Graphics Programs Reference
In-Depth Information
Creating tree shaders - the bark
There are several different ways to build trees in a 3D package: starting from the
simpler low poly objects such as the billboards used in video games (simple planes
mapped with tree images on a transparent background) to slightly complex objects
where a trunk mesh is attached to a foliage mass made of little alpha textured planes,
each one representing a leaf or even a twig, to more complex and heavy meshes
where every little branch and leaf is actually modeled.
For this two-parts tree shader recipe, we will use a model coming from the many en-
vironment assets of the CG short film
Big Buck Bunny
, the second Open Movie pro-
duced by the Blender Foundation. All the movie assets are free to be downloaded,
distributed, and reused, even for commercial projects, because they are licensed un-
der the Creative Commons Attribution 3.0 (
http://creativecommons.org/licenses/by/
The general shape of the tree and of the leaves as well is pretty "toyish". This is be-
cause they are the elements that have been drawn to match the toon style of the furry
characters, but actually, it's perfectly suited for our demonstration purposes.
The tree model is made up of several parts: on the first layer there are the
tree_trunk
,
tree_branch
, and
tree_branches
meshes and on the second layer the leaves, made
up of a single leaf object dupliverted on the tiny faces of the
leaves_dupli
object
(that is the
leaf_tobeswitched
object is parented to the
leaves_dupli
object and
then, in the
Object
window, under the
Duplication
tab, the
Faces
duplication meth-
od has been selected, the
Scale
option checked and the
Inherit Scale
value set
to
1110.000
. This way the
leaf_tobeswitched
object is instanced on the many
leaves_dupli
faces according to their location, rotation, and scale).