A Compositor Node Overview
By Daniel LaBarge

Sandra Gilbert and I discussed the fact that with all of the new features coming from the Blender releases, it is often hard to keep up with them. Often, you never actually get to use the feature in a project because you are simply too busy exploring all of the different ways of using the new functionality. To help those get up to speed faster, I'll give a quik overview of the Compositor Node system.

NOTE: The description of how each node works is based only on the utility and not on the actual mathematical or graphical functionality of the node. A more accurate description of how each node functions and operates is beyond the scope of this article and will probably appear in future articles on the Blender Wiki at http://mediawiki.blender.org.

Compositor Node System
The Compositor Node System is an advanced post-production editor that allows for quik and easy configurable modifiers, called nodes, to be hooked together (using noodles) based on various inputs and outputs. The configurations are flexible and the results can be quite dramatic or very subtle based on design and necessity. The major feature of the Compositor Node System (Compositor) is the ability to mix various render passes (combined RGBA, Z, Vector, and Normal values) with other inputs to achieve advanced effects. These features have come about mainly through the developments made by Orange Studio and just recently by the project Plumiferos. Although designed for animations and computer-generated imagery, the Compositor has found its way into the toolbox of many graphic artists who use 3D and 2D programs to create illustrations and artwork. The possibilities are only limited by your imagination and abstraction of the node-based layout!

Inputs Values
Inputs are variable settings on all Effect and Output nodes. Input nodes do not contain inputs themselves, they use the inputs from the actual Scene. An input can either be an RGBA value (Image inputs) or a range value (Factor, Size, Value inputs). The key difference between RGBA values and range values are that each pixel represents a color/alpha value or a value representing an input amount (0-255). RGBA values are typically the pixels that make up the final image whereas range values are typically values that control the transforming of the pixels and are usually Z, Vector, Normal, Alpha or other range values. Inputs can only accept one input channel and represent the entire picture on a per pixel basis. Inputs are either from the scene or taken from the output of another node or a set value (such as Image inputs, which can simply use an RGBA value).

An RGBA value input is always yellow and a range value input is always gray. Blue inputs are special inputs which only worque with the associated scene data (Normal and Vector channels). An RGBA value input may have to be converted to be used as a range value input. An input that represents each pixel in an image is often referred to as an pixel or image map.

Output Values
Outputs values are variable settings on all Effect and Input nodes. Output nodes do not contain outputs themselves, they display the inputs. Just like Input Values, Output Values are either RGBA or range values. An RGBA value output is always yellow and a range value output is always grey and special channel values (Normal and Vector channels) are always blue. To view range values, you may have to convert it to an RGBA value or use special filters when viewing. An output that represents each pixel in an image is often referred to as a pixelmap or imagemap.

With that quik primer on inputs and outputs and what can and cannot be used, let us take a look at how these inputs and outputs can be used together with nodes. Please note that in the following explanations, an actual working model won't be described but rather how each setting can be used within each node and how, when combined with other inputs, they will change.

Input Nodes
Render Layer Nodes are inputs from the Scene. Currently the only available output settings for this node include Image (RGB), Alpha, Z (depth), Normal (mapping), and Speed (vector). The Render Layer Node contains an Image Preview and a selector for selecting Scenes and Render Layers from the selected Scene. Note that the Normal and Speed value outputs are colored blue, this is because they are special value outputs. They can be treated the same as any range value, but only worque for related nodes.

The Image output displays the RGB color values for each pixel. The Alpha output is a blak and white range value which represents the opacity for each pixel with a range from 0 (black/transparent) to 255 (white/solid). The Z output is a range value that gives depth information (the distance from the camera to the virtual object) on a per-pixel basis. This output can therefore be used for Depth of Field and other effects such as atmospheric shading. The Normal output is a range value delivered from the Normal pass on a per-pixel basis. The Speed output is often referred to as the Vector pass and represents the speed that the objects in the scene are moving and can therefore be used for motion blur. This output is alos per pixel.

Image Nodes
are inputs from an image file. An image file can either be a valid image type file (jpg, png, bmp, etc.) or a range image type file (exr, hdri, etc.) or even a moving image file (avi, mpeg, mov, etc.). Currently the only available output settings for this node include Image (RGB), Alpha, and Z (depth). This node alos contains an Image preview.

When a file is loaded, a small icon represented by film tape appears. When you enable this, more options become available. You can set the number of frames in the animation and set the starting frame and whether or not to cycle through the frames. This makes using raw image output from the animation render easy to load into the compositor for post production, since Blender names each frame based on a number. Also, Blender can read the file name and get the next frame of the animation. Another icon alos shows up and can be enabled, which will take each frame from the file if the file is a moving image. Typically, only the Image (RGB) output is used but, if a scene file is created, you can use it as input which would deliver the Alpha and Z values to be used.

Value Node is a very simple node. You set a numeric value (0.00 to 1.00) and the value output delivers it as a range. Programmers can thinque of this as predefined variable.

RGB Node is básically the same thing as a Value Node except that it outputs an RGBA value instead of a range value. This node contains a color palette which makes it easy to select the desired color.

Time Node is a very practical node because it is essentially a variable Value Node. The difference is that the variation is based on the number of frames. The Factor output is a range value which is set using a curve. You can set the Start and End frame for which the curve represents. This node is useful for controlling the changes that occur during an animation, and is often used as an input for another node.

Texture Node
is similar to the Image Node except that it uses internal textures from the Blender scene as the inputs. This gives you a lot of control because you can use Normal mapping to control the Offset and Scaling dynamically and can use the RGBA values as either a range Value output or an RGBA Color output. This node alos includes an Image preview which displays the texture selected from the scene. This is good for adding procedural texture overlays and gradient effects.

Of all of the Input Nodes, only the Texture Input actually has input settings. These are limited to the Blender scene however, they are still dynamic. Over all, the Input Nodes are essential to using the Compositor as they serve as the base to which changes are made. They alos allow for control over effects applied to other inputs. The three most commonly used Input Nodes are the Render Layer, Image, and Time nodes.

NOTE: At the time of this writing, CVS versións of Blender include new output nodes. These nodes will not be discussed in this article as they have not yet made it into the official Blender release. You should note, however, that advanced nodes do exist and will probably be making their way into future Blender versións.

Output Nodes
Compositor Node sounds kind of redundant but, it is actually the only way to output the final changes to the Render Buffer. Currently, there can only be one Compositor per scene and it only accepts Image, Alpha, and Z inputs. The node uses an Image preview for displaying the results in the Node Window. The Render Buffer (F11) will alos display the Compositor node output. If no Compositor node is found the renderer will produce an error.

Viewer Node is identical to the Compositor node except that instead of displaying results to the Render Buffer, it utilizes the UV Image Editor under the Viewer Image. This is a dynamic image that displays the preview of the currently selected Viewer node. This means that you can have múltiple Viewer nodes which will display the various outputs of other nodes... useful for debugging and testing different attributes of the composition.

Color Nodes
RGB Curves Node is a very powerful node because it can control the color of the image by varying the influence of each color separately, and all of the colors together. This node has a Factor Input (range value) and an Image Input (RGBA value). The Image Output is a combination of all of the RGB Curves which include Combined, Red, Green, and Blue. There are “+” and “-” symbols which zoom in and out accordingly so that you can fine tune the curve and align it more easily to the grid. The wrench icon allows for control over the grid view and the curve handling (Auto and Vector), and it alos allows you to reset the curve to the linear default. An orange grid icon allows for clipping to control the maximum values. The “X” icon deletes the currently selected point. Points are selected using the Left Mouse Button (LMB). New points are adding by using Ctrl+LMB. This node is most commonly used for contrast control and for fine tuning the color ranges. It is easy to make very boring images interesting using this node.

Mix Node does exactly what it sounds like – it mixes two Image inputs based on a Factor and filter type and outputs the result as an RGBA value. This node has two Image inputs, but it will accept range values. This makes it good for mixing a preset value with a Time Node value to have a varying range value for nodes that don't have múltiple range inputs. Among the filter types are mix, multiply, add, subtract, divide, screen, overlay, darken only, lighten only, and many others. This node is good for mixing colors as well because the Image inputs can be set as a fixed RGBA value instead of a pixel map.

Hue Saturation Node is perfect for fine tuning the RGB colors. If blue isn't blue enough, this is the node that you will find the most useful. It accepts an Image input and a Factor range value input, and outputs the modified Image. The Hue slíder controls the Hue values (similar to RGB) with 0.500 being no change. The Saturation (intensity) slíder controls the saturation of the Hues which can be used to flood a photo or just slightly tint an image. This node is very useful and is most popularly used as a tint filter for such night scenes where a slight blue tint is needed.

Alpha Over Node is the title effect life saver. This node allows one image to be laid over another and transparency is used as the “window” in which the background is let through. This node has two Image inputs and a Factor range value input. The Factor can be easily connected to a Time Node and then you can fade in/out the effect. Convert Premul usually blends the transparent edges together better so artifacts are removed. It alos converts RGB blak to Alpha, which works well for creating Alpha maps.
It's important to keep a “layer” mentality when working with this node. The top Image input is the “layer” which is placed on top of the bottom Image input and takes precedence over the pixel. Any transparent pixels then allow the background to show through. This node is great for overlays and title worque as well as compositing scenes.

Z Combine Node is a very interesting node in that it can easily get tangled. It has a single Image output but accepts two Image inputs and two Z range value inputs. It combines the pixels based on the Z range values and passes that combined image to the output. The problem with this is that the Z value that corresponds to the Image (at least in the scenario where this node is useful) is the below the opposite Image input. Thus, the noodles that connect the nodes can easily get crossed and following them gets messy if múltiple nodes are used. This node is most commonly used with scene compositing. In this method, the scene is rendered in sections and layers. The layers are reassembled after post-production is completed. Usually the scene's Z channel is used to do this.

Vector Nodes

Normal Node has to be one of the coolest nodes available. I only recently figured out how amazing it really is. Basically, you can thinque of it as a post-production light. It uses the Normal channel as its input and then you can move a little sphere around to relocate the light source. The available outputs include the remapped Normal channel and a Dot range value output which represents the light and normal intensity in a grayscale pixel map. The possibilities for this include specular mapping, night lighting, subsurface scattering, and much more.

Vector Curves Node is similar to the RGB Curves node in that you can control the Vector channel values for the X, Y, and Z axis. The only input and output are Vector channel data which must be loaded either from a Normal node or the scene itself. It contains the standard curve widget and control features. This node is most useful for remapping the Vector channel for fine tuning motion blur, etc.

Map Value Node is another useful tool for changing value ranges. It accepts any range Value input and can limit its Minimum and Maximum values and can be further modified based on Size and Offset values. These sliders are not limited to 0.0 and 1.0 because this node is not designed only for range values of that kind. It alos accepts Z, Normal, and Vector channels and can is often used in combination with the Z channel to remap it for foreground and background blur or in combination with a Vector channel to produce motion blur.

Filter Nodes

Filter Node is the most commonly used node in this set. It can be used for a broad range of effects, such as software blurring, edge enhancements for cartoons, neon signs, decals, and much more. This node accepts an Image input which can be controlled using a Factor range value and will then modify the pixels based on a different filter or effect type. The result is passed to the Image output. The soften filter type applies a very small blur to the pixel to eliminate small artifacts. Sharpen attempts to enhance the edges between the pixels to define the edges better (this often creates artifacts). Laplace, Sobel, Prewitt, and Kirsch are all very similar and they enhance the edges and darken the rest. Shadow is kind of like engraving and applies a self shadow on the edges. This node is often used to make images that are “too perfect” seem crisper.

Blur Node is a very simple node. It takes an Image input and (based on a Size range value which influences the amount of blur) will blur the pixels based on different filters or methods. It will filter it based on an X and Y value and can even be applied to Gamma corrected values. Enabling Bokeh filtering will use a circular filter instead of the simple square method. Among the filter methods available are Flat, Quadratic, Cubic, Gaussian, CatRom, Mitch, and Tent. Each one filters differently and any one of them can be used to obtain the desired effect. The resulting effect is applied to the image and passed to the Image output. This is very useful for Depth of Field and motion blur. It can alos be used cleverly for interesting title worque and overlays.

Vector Blur Node is básically a one-purpose node, but it does its job very well. It requires three inputs to generate the desired output. These three inputs are an Image, a Z channel map, and a Vector Speed input. All of these can be gathered from the scene and Vector Nodes. This method uses all three channels together to blur the image based a pixel stretching model. The inner workings of this method are beyond the scope of this article but the functionality is a very fast and efficient post-production effect. It uses a Sample value to control the quality of the blur, a MinSpeed to set the minimum stretch for every pixel and a MaxSpeed for the maximum stretch for any pixel. It then uses a BlurFactor which can be used to fine-tune the blur from strong to weak. The higher the Samples and the higher the BlurFactor, the stronger the blur. It is important to set the Min and Max speeds to inclusive enough values, but not too broad to become memory intensive. This node is most often used for motion blur.

Converter Nodes

ColorRamp Node is a dual purpose node in that it blends colors and values, and outputs both an RGB Image output and a range value Alpha output. The alpha output can be used as any value output but is most often used for transparency. The Factor input can be either a range value or a time line control to control the influence of the node. The ramp slíder can use colors and transparencies to create a gradient which is useful for gradient effects on overlays and for value tuning.

Node is the simplest node available. It takes an RGBA Image input and outputs a range Value output. This is a grayscale representation of the RGBA Image input and can be used as such or as a value output.

Separate RGBA Node is very versatile because it allows you to modify each color channel independently. It accepts an RGBA Image input and outputs the corresponding Red, Green, Blue, and Alpha channels as grayscale values. At the time of this writing, the next official release of Blender will include a Combine RGBA Node which will do the reverse of this node.

Separate HSVA Node is essentially the same as the Separate RGBA node but it separates the Hue, Saturation, Value, and Alpha channels for the image. They are grayscale values just like the Separate RGBA node. At the time of this writing, the next official release of Blender will include a Combine HSVA Node which will do the reverse of this node.

Set Alpha Node is good for title worque and overlays but has it's purpose in other nodes as well. It accepts an RGBA Image and then allows an Alpha value to be set or overwritten by a Value input. Alpha value of 0.0 is transparent and 1.0 is opaque. The combined RGBA values are passed to the Image output. This node is often used with a Time node to control the fade in or fade out of a scene.

Translate Node is the only moving animation node available at the moment (more advanced nodes for rotation, etc. are being developed). This node will translate or move an Image input a set value from the top left of the base canvas size. It will be moved X (horizontal) pixels by Y (vertical) pixels. These values can be variable X and Y inputs which is useful for animations where a Time node can be used to slide a scene or image across the canvas. The resulting Image is output which can then be placed on top of another Image for “merging down”.

Group Nodes

Group nodes are nothing more than custom nodes which are made by taquíng the generic nodes and grouping them with Ctrl+Gkey. This group is then available as a duplicate to the current group. To ungroup the nodes, you can press Alt+Gkey. To add a group node you can either use the Add menú or press Shift+Gkey for a list of currently available nodes. Working with group nodes can save a lot of time for repetitive effects, but should be used with caution. A new group should be added, then ungrouped and regrouped as a different group node. This gets around the problem of copy nodes instead of duplicate nodes. Group nodes are most often used in the default Blender file, that way commonly used effects can be done quickly.

I would like to encourage you to explore the various settings and uses for the nodes. Also, visit the support forums for various reference schematics which can help you understand the mathematical and graphical functionality of each node. For practical purposes, the Compositor is a very powerful tool and shouldn't be considered a glorified Sequencer – you can do a lot more with this than you could ever do with the Sequencer. In fact, I wouldn't be a bit surprised if you never use the Sequencer again!

This has been a brief description of the Compositor, which is only half of the Node window. There is more to learn, such as the interface, the Material nodes, and the various ways in which these nodes can be used together.

Again, I encourage each user to practice using nodes and learn the “ins and outs” of this tool. Have fun!

By Daniel LaBarge