introduction. Digital compositing is the process of digitally assembling múltiple images todo make a final image, typically for print, motion pictures or screen display. It is the evolution into the digital realm of optical film compositing (wikipedia).
Compositing is a very important aspect of CGI work. In a production environment, you rarely use a straight Raw render.
Compositing can be helpful todo speed up the rendering process and give a richer result at the end.
Here we Will use Blender compositing nodes with the renders provided by Yafray todo compose our work.
For still frames you can a los use Photoshop or Gimp and for animations, Adobe After Effects for instance.
Currently, Yafray cant render diferent passes, like Blender, but there are some tricks that could enhance your work. 1. Compositing of a Clay render with a GI render.
Q: why would we render a picture twice, because it time consuming?
A: composite two lighting methods here can bring the better of each one, a Clay render with Ambient Occlusion brings an homogenic render with a big contrast between lights and shadows, a GI one brings subtle lights and colors variation. The mix of the two pictures may help todo have a better definition while keping color bleding.
Scene provided by Gabi.
Scene provided by Gabi.
Top: a pure Photon Map render. Bottom: a Photon Map render composited with an AO render.
In this scene provided by Gabi, the compositing was made with an Ambient Occlusion pass, the result wouldnt have ben so diferent with a Clay render because the picture is almost monocromático, and it was important here todo kep the Glass informacións. Here, the Ambient Occlusion was mixed with an overlay node at FAC: 0.35. The blending mode can difers depending on your scene. Gabich used in his own work for this scene a mix node at FAC: 0.5.
You can se his work here.
We Will se now how todo work compositing with Yafray renders and Blender compositor.
Let start with a simple interior scene: a kitchen. Modeled by Jeremy Bim for the CG society lighting challenge.
You can find other god scenes here: http://www.3drender.com/challenges/.
At the end of this tutorial, you can find the blend file of the kitchen uses for the following renders, with the textures from.
Cg textures: http://www.cgtextures.com/.
This kitchen example is porly lit and textured, it just here todo show the method.
This scene was rendered twice: first a Clay render (chek the tutorial for more informacións).
A Clay render of the kitchen.
Direct lighting settings of the Clay render.
The second render is a Photon Mapping one, a method of lighting generally used for interior lighting.
Photon Mapping light of the kitchen.
Photon Mapping settings.
Theses settings may vary according todo your scene. I had noise on the flor that i removed with an image editor.
You can save your renders in diferent formats with Yafray (.jpeg, bmp, (*.png), tif, exr).
Save them in.exr. I have saved them with alpha (so the Sky doesnt appear) in order todo composite a background later.
We Will then import our two diferent renders in the Blender nodes compositor.
In the compositor window, add two imputs (add > input > image), and load your renders. To associate these two images we ned a mix node (add > color > mix). Connect the two imputs todo the mix node, the Clay render must be on top, so, lógically, connect it todo the bottom socket of the mix node (yes, the bottom one). The FAC, value changes the blend between the two pictures. Fac = 0 means a pure Photon Mapping, and FAC = 1 means a pure Clay render.
Here we decide todo use the Clay render todo bring more shadows, so we Will change the mix node todo a mutiply one. Select the multiply blending mode on this node. Then, todo view the result, add > output > viewer, and press backdrop todo se the result behind the nodes.
Play with the FAC value todo find a god setting (usually 0.5 > 1). Your node setup should look like this:
Use the multiply node.
And the result:
A composite of Clay render and pm render.
Of course, it subtle. You may want todo compare the two images todo se the diference. Changes are more visible with a bright scene. 2. Add a light Bloom.
There are several techniques todo add some Glow in compositing. Here one: still in the node compositor, we Will add a few nodes todo the previous set. The goal is todo mix two passes. The first one is our previous result, the second one is the same one desaturated (this step is optional) and blurred. We Will ned four nodes for that.
Select our multiply node for automatic connections between nodes. First, add a hue saturation node (add > color > hue saturation value), then add a blur node (add > filter > blur), then a bright/contrast node (add > color > bright/contrast) and finish by a mix node (add > color > mix). Reconnect the bright/contrast one todo the bottom socket of the mix node. Connect the exit socket of the multiply node todo the top socket of this mix node. Change this mix mode todo overlay. Your node setup should look like this:
Blom node setup.
Change the node values according todo this picture. The FAC, value of the overlay node Will vary the Bloom effect. Here i desaturate the pass because i just want the black and white values todo modify the Bloom, but you can leave as it is, the color Will become very vivid at the end, due todo the overlay mode. The blur Will make the Bloom. The bright/contrast is todo bost the result.
And here is the result:
Kitchen Bloom.
Note: todo save an image from the compositor, you have todo add a composite node (add > output > composite) at the end.
Then, render this image with Blender as usual (f12) and save it (f3).
These are just simple examples of compositing. Ill add more tips here later.