In today's tutorial, K.Shane takes a further look at how to take elements rendered in 3DsMax into both Fusion and Photoshop for post-processing, in order to achieve the best result as quickly and efficiently as possible. Let's take a look!
People always ask me about the workflow involved in my last tutorial, so I decided to put together a post explaining some of my techniques in greater detail. I start with a few scene tips, followed by an overall test-rendering workflow and render-output setup, before moving into the compositing itself! I won't be discussing the modeling, texturing or lighting in this tutorial, as it's purely a focus on post-production.
Scene Setup Tips
In the Vray tab in the render settings, I've applied the same cloud/sky image to the environment override, reflection override and refraction override channels to ensure that we can see clouds reflected in the windows of the building. The Multiplier values have been raised from 1.0 to 3.0 to increase the strength of the reflections in our scene, which has the effect of brightening the glass and making it more vivid.
In this shot, I also created some low-poly buildings and placed them behind the camera so that they too would be reflected in the windows.
Finally, the glass material itself uses a bitmap in the bump channel which will produce a more realistic reflection of the whole scene.
Render Setup Workflow
Here are the very low quality render settings that I used in this shot when tweaking material settings. Make sure Glossy effects is turned off as it greatly increases the render time.
Here are the IndirectIllumination settings.
For the post production process, we'll also need a Color matte image so that we can easily make localised color corrections in both Fusion and Photoshop. Here is an example of the type of image we're after :
To create this image, we'll be using two built-in passes in Vray : Vray_MtlID and Vray_ObjID, however for them to work correctly we need to set up both material and object IDs within our scene. To help with this, there is an amazing script package called Track Script containing, amongst other things, EffectsChannelSet.mse. The script is free, very awesome and I highly recommend you install it! More Info : http://3d-kstudio.com/scripts/trackscripts/
As shown below, this script can help you quickly assign objectIDs and materialIDs to the objects within your scene. As a bonus, you can then also automatically select all of the objects that have the same IDs - very useful!
With our objectIDs and materialIDs setup, we can now go and setup the final render outputs. Hit F10 to bring up the Render Settings dialog, go to the Render Elements tab, and click Add. A dialog box pops up containing all of the passes available to you in the renderer.
Before we choose the elements required, we need to understand a little more about how they work! When we hit the render button, the image we get out normally is referred to as the BeautyPass. This BeautyPass can actually be recreated using the other render outputs, but only if they are combined correctly! I've included some of the formulas below to give you an idea of how some passes can be recreated by combining others :
Keeping these formulas in mind, we can actually recreate the entire BeautyPass by using the following formula :
And from this, we can now see exactly which render outputs we need to select!
As well as those calculated above, we'll also need the MaterialID and ObjectID passes mentioned earlier, as well as a ZDepth pass in order to add further lens blur if required, and a Background pass. Select all of these in the dialog and hit OK.
If you render now, you'll see all of the selected outputs listed in the viewer buffer list, as shown below.
At this point, once my render layers are setup, and my materials are as I want them, I move to my final render settings :
And here are the GI and DMC Sampler settings as well :
Go to the VrayFrameBuffer section in the Render Settings and enable Render to vray-raw image file, and choose a place to save the resulting .vrimg file to disk.
Once you've chosen the file path, you can go in and manually edit the filetype from .vrimg to .exr. The reason for this is that Fusion cannot read .vrimg files at all, whereas it has excellent .exr support, and luckily for us the file formats are extremely similar!
Once rendered, all of our outputs will be saved into a single file. Here is what those individual channels look like :
Compositing in Fusion
Here is a quick breakdown of how we'll be adding the individual elements back together in Fusion.
Open Fusion and drag the .exr file into the program. Right click the node and choose Force Source Tile Pictures so that you can see the thumbnails in NodeFlow.
Fusion makes it easy to select exactly which render element you want to work on. All you have to do is go to the Format panel, expand the Channels section and then and choose the elements you want to appear in that node's RGB. For example, here is the DiffuseFilter (or Diffuse) pass setup. Once you've setup the RGB channels, you can hit F2 and rename the node as Diffuse_Pass so you can easily keep track.
With the Diffuse Pass in place, we now need to create the other passes. Copy and paste the node, go back to the Format tab and once again setup the RGB channels to the next render pass. Continue this process until all of the passes are represented in different nodes.
Click and drag a Bol/Channelboolean node into the flow. This is where we'll combine our passes in order to recreate the beauty pass.
In Fusion, a node usually contains a foreground input (the Green triangle icon), a background input (the yellow triangle icon), and an output result (the red rectangle icon). We'll be connecting our passes up to these sections of the node.
Click and drag the Raw_LT node's output into the foreground input of our ChannelBoolean node, and the output of the Diffuse pass into the background input. After linking, drag the ChannelBoolean node onto the viewport to see it's effect. Now change it's Operation to Multiply. As I mentioned before, we're now multiplying the Diffuse pass by the Raw_lighting pass.
We're now going to do exactly the same thing, except this time we'll be multiplying the Diffuse pass by the Raw_GI pass. Copy the ChannelBoolean node and then right-click and select Paste Instance.
Set it up exactly as before, except this time substituting in Raw_GI instead of Raw_LT. (Note: The green arrow between the two ChannelBoolean nodes just means that one is an instance of the other - it's not an image connection!)
So now that we have the two ChannelBooleans set up correctly, we need to merge the results together. So drag a Mrg node into the flow.
Connect the top ChannelBoolean node the Merge's green input, and the bottom ChannelBoolean to the yellow input. The change the Apply mode to Normal and the Operator to Over, before turning down the Alpha Gain to 0. We now have GI+Lighting, multiplied with the diffuse texture pass!
Now we have this setup, we can go in and tweak any individual pass. For instance, you could drag a CC node under the Raw_LT node and make adjustments; turning up the Gamma or even changing the color of the lights!
If you wanted to make the columns a little bit darker, you could drag a CC node underneath the Diffuse pass, pick the column's ID (the same that you set it to within 3DsMax), and then turn down the Gamma. Using this ObjectID/MaterialIDmethod, it's extremely easy to make local color adjustments.
Drag another Mrg node into the flow and set it up as follows : ApplyMode=Normal, Operator=Over, AlphaGain=0. You can then add the Reflection pass into the above result, using a CC node in between to make the reflections a little more blue as well as a little darker :
Repeat the above process for the Refraction pass. Here however, I added a SoftGlow node to make the lighting a little more softer and brighter. The result is pretty cool and you can adjust it in realtime!
Here I've gone ahead and added in the Specular pass using the same technique - Notice that the Merge nodes are all instance copies.
I've also added a CC node to the end of the tree to adjust the whole image, giving it more contrast.
Finally, drag in an SV node, save the output as as a tga file with alpha channels so that we can continue our post-production in Photoshop.
Here is the final result of our work in Fusion :
Finishing in Photoshop
Start Photoshop. Bring in the original photo behind the building :
Here I've added a tree in front of the building :
To cover up the base of the tree, I made a selection from the original photo and added it back on top :
Activate the Gradient tool, set a light blue tint color and drag a blue gradient from left to right across the image :
Change the layer's transfer mode to Multiply and set it's Opacity to somewhere around 30% to make the whole image a little more darker and colder.
Using several separate layers, I drew in streaks of light coming from various points on the car, before adding glow effects, blurs and color corrections as required :