Graphics Programs Reference
In-Depth Information
leaves and flowers and then replaced the faces
in the original leaf mesh with an instance of this
object. Conveniently, this branch object also renders
quickly: Cycles recognizes that each instance of the
duplicated branch shares the same mesh data, so
it stores the object only once, keeping the memory
requirements for rendering reasonably low.
Duplicating with Face Duplication
To use the branch object to create some extra foli-
age, I turned on Face Duplication in the Duplication
panel, which you can find in the Object tab of the
Properties editor. To duplicate a branch, I parented
it (selecting the branch, then the IvyGen mesh, and
hitting ctrl -P) to the IvyGen leaf mesh. Then, I
set the duplication type to Faces in the Duplication
panel. This created a duplicate of the branch object
for each face of the IvyGen mesh.
The objects must have the same origin or the
duplicates will be offset from the parent mesh, so I
selected my branch object and snapped my cursor
to it ( shift -S 4 Cursor to Selection). Next, I selected
the IvyGen leaf mesh, clicked Origin operator in the
3D Viewport Tool Shelf, and selected Origin to 3D
Cursor, giving the two objects the same origin.
Face duplication allows each duplicate to
inherit the scale of the face it is duplicated from.
I took advantage of this by enabling Scale in the
Duplication panel and then adding some random
variation to the scale of the IvyGen faces. To do
so, I used Select 4 Random in Edit mode to select
a random sample of the faces in the mesh. Next, I
scaled them down slightly with the Pivot Point set to
Individual Faces in the 3D Viewport header (so the
faces would scale down toward their centers). This
scaled down a random selection of the faces. Then,
I repeated the process—this time selecting different
faces—and scaled them up a bit.
To create a mix between the two branch objects,
I split the IvyGen mesh by selecting it, switching
to Edit mode, and setting the selection method to
Faces from the 3D Viewport header. Then, I used
Select 4 Random—again choosing 20 percent of the
faces in the mesh (you can adjust the percentage
in the Tool Options panel of the Tool Shelf)—and
pressed P to part them from the mesh and turn
them into their own object. Next, I parented the
branch without flowers to the original IvyGen object
and the branch with flowers to the new one, creating
some branches with flowers and some without. The
result is shown in Figure 15-2.
Creating the Branch Object
To create a branch, I began by subdividing a plane
and giving it a slightly curved shape. This formed
the basis of my leaf, which I duplicated a few times
and arranged in an arching group of five leaves. I
created a flower using a five-vertex circle, which I
then filled in and extruded out to create the petals.
Next, I unwrapped the flower and the leaf. I used
the same texture and material for the leaves of the
branch as before. For the flower, I used a flower
photo from CGTextures. I created a texture and
material from it as I had done for the leaves. I also
modeled some basic twigs for the new leaves to
attach to by creating a cube and extruding from it
to roughly line up with the leaves. In the end, I cre-
ated two branch objects: one with flowers and one
without, as shown in Figure 15-1.
Creating Pebbles
To give the ground in the scene a little more varia-
tion, I used another particle system to scatter pebbles
on the ground. I created a group of pebble objects,
Figure 15-1: The branch objects I used to increase the com-
plexity of the foliage in the Jungle Temple. Above: The branch
objects in the 3D Viewport. Below: The branch objects
rendered.
 
Search WWH ::




Custom Search