by Tim Montiq on Mar 8, 2010 at 8:43:42 pm
I'm wondering if someone could discuss the steps involved in multipass rendering and importing into After Effects. I can't seem to get the process to work after installing ProEXR plugin (http://www.fnordware.com/ProEXR/).
Any help is much appreciated.
Improper planning on your part doesn't necessarily constitute and emergency on my part
After testing how the OpenEXR plugin works I found that it's much much simpler to render the layers to separate image sequences using PNG/TIFF files.
But, if you prefer OpenEXR be aware that Blender has two different flavors of it. If you select the reender to use OpenEXR the resulting files will only have one layer. If you use the "Multilayer" output format then you will have an OpenEXR file with all the layers that you have selected in the "Render Layers" tab.
Remember that you have to explicitly name the render file and to give them the ".exr" extension because the Multilayer option doesn't do that for you.
I was afraid that you would ask :)
The workflow goes like this:
- The combined pass is the only one for which you can directly set a file name in the output tab. You also must have a default pass so the combined is a good example but you could use it to render directly the Color/Diffuse pass. Up to you.
- If you need to create a separate pass, for example for the shadows, you need to create a new render layer in the "Render Layer" tab.
First rename the default layer, which is called "1 RenderLayer" something like "Combined" or "Color".
Drop down the list of render layers and select "ADD NEW".
Rename the new render layer "Shadow"
In that "Shadow" layer deselct "Solid, Halo" etc. and select only the shadow pass.
- Now open a Node Editor window. You will need to use Blender's compositor for the multipass.
In the Node Editor click on the button with the little face, it activates the Compositor
- Make the "Use Node" button active if it's not already
- Press "Home" to see the default Noddles and nodes. It should show a network of a render layer node, defaulting to the first layer, connected to a "Composite" output layer. Leave them alone.
- Press Shift-A, select Add/Input/Render Layers
- In the newly created node drop down the list of the layer names and select "Shadow". Now the output sockets of the node should show Image, Alpha and Shadow.
- Shift-A and select Add/Output/File Output. The new node shoudl be already connected. If not Drag a noodle from the Image socket of the Shadow Layer node, to the image input socket of the File Output node.
- In the File Output node set the file format to PNG and to a location of your choice, possibly a separate directory.
- Go back to the output tab and, below the "Anim" button, find the "Do Composite" button. That tells Blender to go through the Compositor whenever it renders a frame. That in turn will pass the action to each of the Render Layer node and that in turn will output the shadow pass via the File Output node.
- Click on the "Anim" button and Blender will render all the layer per each frame.
- Collect the files and start compositing.
There's no need to create separate Render Layers for passes.
Just activate all the passes you need. In the input node you'll see additional sockets that represent activated passes. Connect them to "File outputs".
There is also another way of doing it.
I like to render MultiLayer with all the Render Layers and Render Passes I need (without any compositing), then I open a new blend file and use this MultiLayer sequence as an input instead of using Scene's Render Layer. (In this new blend scene I deactivate everything that can be deactivated).
This way I have an easy access to the passes, because they are already rendered, and I don't have to wait ages to see the result of the nodes I use. All the sockets are available as if this was a render layer, even though this is an external file.
Bartek is right in saying that you don't need to create a new render layer but the workflow that I described has one reason. By using a separate render layer you can regenerate a single pass, Shadow, Specular etc, by enabling/disabling the render layers that you need. For example, if you need to re-render the AO pass alone you can click on the "Single" button next to the Render Layer name and hit "Anim" again.
Well - that's right, but every render layer requires another analysis of the scene by the render engine, so the scene simply renders longer.
In simple scenes you can afford this, but in more complicated ones? Well...
Changing settings of the render layer takes about a minute, or two.
Render time difference may be several hours.
Hey Bartek, BTW, good to see you, we haven't talked since our series of patches to the AEE.
You are correct that the rendering calculations takes time but in a scenario where you split the rendering to many passes, color, shadow, spec, AO, etc. you might need to adjust parameter for the AO alone, or the depth pass for the DOF, and it does take additional time to render and output all the other, unchanged, layers.
On top of that, I found myself in the situation of needing to re-render only a subset of the frames, so the "finer granularity" helps in saving time.
Just a suggestion, as always, there is more than a way of doing something in Blender :)
It is very good to have such discussions in public, as many other users can have a look at it and take what's useful for him or her.
Every scene is different and before you hit Ctl-F12 it's good to take some time to make analysis.
Let me present the way I like to work on scenes that require a lot of rendering time:
First I prepare the scene, set up Render Layers and render passes.
I chose to have as little amount of render layers as possible.
I don't do any compositing. I just chose MultiLayer as the output format and render the sequence.
Then I open fresh, new blend file (or create new scene), set the Render Layer so that it renders nothing, activate "Do Composite", add an input node of "image", select the sequence of *.exr (MultiLayer), and take a look at the passes. (Just add a viewer node and link it to what I want).
Because all those passes are already rendered, I don't wait hours for the frame to render, I just chose the frame to look at, and see if I like the result or not.
When I like what I see, I just link File Output nodes to the passes. (This additional render takes seconds, so it's worth doing it in many cases).
If I don't like what I get as passes - I try to fix it by adding some nodes. If I have to - I rerender some passes. I just reopen the file with my scene and then create render layer that I need to rerender the pass.
Most of the scenes require compositing. I do compositing both in blender and in After Effects. I just try to take advantage of both apps.
Having rendered MultiLayer gives me possibility to go back to the fresh render without any blender compositing any time I want.
That's just a way I like to work. It may seem weird at first, but believe me... I tested it, tried many other workflows - and the one I just presented suits me best.
It IS working better. Much better.
In fact in After Effects CS4 you don't have to install any additional stuff to have the access to the passes stored in MultiLayer exr. You just select "Extractor" from 3D channel, but I don't recommend using it, because it takes ages even to see the single frame.
I extract the passes using blender, and then composite separate sequences in AE.
Try also this one:
Render the MultiLayer from blender. Include the vector pass.
Composite the stuff in AE. Render it out.
Go back to blender and add vector blur to the result from AE using vector pass from your Multi Layer.
You will need the input of the MultiLayer to have the vector data, and your final render from AE as the image.
Add a "vector blur" node. Connect the image to your final render from AE, and Speed to vector socket of the MultiLayer, and Z to the Z socket of your MultiLayer.
You have the nice motion blur in seconds.
EXR files are waaaay better in After Effects if you have the space (and time for some extra processing). The advantage of EXR files is that they contain extra information about lights and darks (like an HDR image), so your composites get much more interesting. To do this, make sure you have After Effects running in 16- or 32-bit space, preferably the latter.
Bartek: Why are you passing your render's Speed information through the Set Alpha node before it reaches the Vector Blur node??
I must say that I don't really remember why I do this. I know that I had a problem once, so just to be sure I don't have that problem again - I Set Alpha of 1 to the vector data. If it has Alpha of 1 anyway - nothing will change, but sometimes it has Alpha of zero in some places, so this limits the blur to the borders of the object. Setting alpha doesn't change color values, so I just do it to be sure everything goes right.
I checked one of my scenes and it appeared that adding Set Alpha didn't work good.
In some scenes it works better with this node, and in some it works better without, so just check what is better in your particular case.