Graphics Programs Reference
In-Depth Information
Render Active Viewport
Figure 11-29: Rendering the view to an image
Figure 11-30: Editing the textures projected from the camera
view. I filled in the background to prevent it from creating
artifacts near the image boundary where the texture wraps
around at the bottom. Then, I blended the textures on the
objects in the foreground.
Texturing the Leaves
For the leaves in the Jungle Temple scene, I wanted
to create three textures: one for the color of the
leaves, one for the specular map, and one for their
transparency. I would use the transparency (alpha)
map to make the parts of the mesh that are not actu-
ally part of a leaf transparent, thus giving the leaves
detailed outlines without using geometry. This is
doubly important for the leaves I generated with
IvyGen, as these are just flat planes.
Alpha Map
The next step was to create the alpha, color, and
specular images. To create the alpha texture, I
clicked the layer mask, pressed ctrl -A to select all,
and pressed ctrl -C to copy the mask to the clip-
board. Then, I clicked New Layer and pasted in the
mask, now visible as a normal layer. Figure 11-31
shows the finished alpha map.
Collecting the Leaf Images
I began by collecting leaf images that were roughly
the shape I wanted. Then, I opened them in GIMP
and selected the rough outline of the leaf with the
Scissors tool, placing points around the edge of
the leaf to trace its outline automatically. I could
then refine this using Quick Masking and the
Paintbrush tool with a hard-edged brush, painting
with black or white to remove or add parts of the
leaf selection. I used the leaf selection as a layer
mask (Layers 4 Mask 4 Add Layer Mask and choosing
Selection) to mask out the background of the leaf
image.
Diffuse Map
For the diffuse map, I added a uniform color back-
ground and got rid of any specular highlights in the
photo to make it more suitable to use as a texture.
For the background, I created a new layer and filled
it with a green to match the leaf color so that when
the material blended into transparency, there would
Search WWH ::




Custom Search