Graphics Reference
In-Depth Information
and move them apart to make some room to work. Notice that on the Render Layers node, the pop-up
menu at the bottom allows you to select either the “Sun” or “Earth” layer. We want “Sun” for now.
Add an Alpha Over node from the Color section (Shift-A > Color > Alpha Over) and place it between
the two other nodes. Alpha Over is the workhorse of the compositor. It takes two image inputs and
combines them based on the Alpha values of the primary image. The socket stack order is counterintuitive,
so be careful. The lower Image input socket is primary, meaning that if all of your images were printed
on clear plastic and layered, it would be at the top of the stack. Personally, I think that's silly, but it's just
the way it is.
Connect the Image output of the “Sun” Render Layer to the lower (primary) Image input of the
Alpha Over node. Add a Viewer node and pipe the Alpha Over result to it so we can see what we're
doing.
Add a new kind of input node: Image (Shift-A > Add > Input > Image). This lets you bring an image
directly into the compositor. You can choose one that is already in use in Blender by clicking the image
icon on the node—the control is the standard image selection set, shown in Figure 12.29 . You can also
click the Open button on the node, which sends you to the file browser to choose an image. In this case,
open a new image and find monkey_stars.jpg from the Web Bucket. Connect the Image node's output to
the upper (secondary) Image input socket of Alpha Over. Figure 12.30 shows the setup.
The compositing workspace is filled with beautiful stars! Notice that the Sun-monkey floats on top of the
stars. Everywhere that had been designated as Alpha = 0.0 in the render lets the secondary image show
through when pumped through the Alpha Over node. Alpha Over is the primary method for combining
renders with imported images and renders with other renders.
Let's add the Earth-monkey into the mix. LMB select the original Render Layers node. Press Shift-D to
duplicate it and move it away from the original. To get a new Render Layers node, you could also do
Shift-A > Input > Render Layers, but this works just as well. Change the layer selector on this new node
to the one marked “Earth.”
Duplicate the Alpha Over node in the same fashion. For positioning of these new nodes, refer to Figure
12.31 . The exact location of the nodes doesn't really matter, but it's nice to try to keep the workspace
organized. Node trees can quickly become complicated, and having to follow a connection the whole way
across the screen and under a dozen nodes just to find its source isn't something you want to have to do
on a regular basis.
The nodes in Figure 12.31 have already been connected. The result of the original Alpha Over node,
which contains both the star background and the sun, is piped to the secondary input of the new Alpha
Over node. The Image output of the Render Layers > Earth node becomes the primary input. The Viewer
node has been set to preview the output of this new node.
This is how you build up layers of inputs in the compositor: a series of Alpha Over nodes, bringing dif-
ferent inputs together.
Search WWH ::




Custom Search