Export shading passes with Arbitrary Output Variables in 3ds Max.
- [Instructor] For compositing and color correction, it's very common to save out render passes. For example you might want to save out the direct illumination separately from the indirect, separately from the shadows, and combine and balance those in a compositing application. For the 3ds Max scanline renderer, this is done with a feature called Render Elements. The Arnold Renderer does not support Render Elements. It has its own native system for saving out render passes, which is called AOVs.
It's an acronym for Arbitrary Output Variables. Let's create some AOV passes and combine them in Photoshop. Let's go into the Render Setup dialog. The first thing we need to do is define a file output. If we don't do this we'll get an error message in the AOV tab here. So scroll down in the Common tab, and under Render Output, click Files. I want to save into the renderoutput folder in my current project, and just to keep my assets organized, I'll create a folder within there.
Create a Folder, and I'll call it composite AOVs. Go into that folder, and define a file name. I'll also call it composite AOVs. For highest quality we can save this out to an OpenEXR file format. From the Save as type pull-down, choose OpenEXR. When we click Save, we'll automatically get the OpenEXR Configuration dialog.
We can accept the defaults here. We're going to be using a half float, or half precision format here, just to save a little bit of disk space. And likewise we have the compression, which is set to zip by default, and that'll just save a little bit of disk space. And click OK. We've now defined the file output for the so called beauty pass. Which is what we see in the rendered frame window. Now we can go into the AOVs tab, and start defining AOV files.
We'll use the EXR document format once again. Click Add AOV File, and the dialog changes to a different interface. We now need to choose an AOV channel. Let's go into the builtin section here. We're just going to use the stock AOVs, although you can define your own. We'll assign the direct illumination to the first AOV file, and I want to save these AOV passes out to separate files, rather than having them all stacked inside one EXR file.
To do that, I'll turn off Add AOVs to single file, and click Add, and with that option turned off, each one of the AOV passes will be saved to an individual document. Click Add AOV File once again, and go into builtin, and we'll choose indirect. And click Add. Finally, let's capture the shadows. Click Add AOV File again, and don't be confused by this entry here that says shadow_matte.
That only applies if you're using the shadow_matte map as we saw in a previous installment in the course. To just capture shadows ordinarily, let's go into builtin. Scroll down, and select shadow_matte. Click Add, and now we've got three EXR documents that will be saved out. We've got the direct, indirect, and shadow_matte. When we click Render, we'll start to see the beauty pass displayed here in the rendered frame window.
That beauty pass is showing the exposure control that I've added in the environment and effects dialog. We can see that the sculpture here has got a little bit of a blue cast to it, and that's coming from the color temperature settings I've made in the environment and effects dialog exposure control. All right so once that's done, we can take a look at it in Photoshop, so I'll jump over to Photoshop, minimize 3ds Max, and I'll load in all of those documents into a single Photoshop stack.
Go to the File menu, choose Scripts, Load Files into Stack. In the Load Layers dialog, click Browse. We'll now need to browse for the files that we just saved out of 3ds Max. In the current project inside renderoutput, composite AOVs, we've got the beauty pass, which is what's saved out even without any AOVs, and then we have the three AOV documents.
Select all of those and click OK. Once they're loaded into the Load Layers dialog, click OK again, and each one of those is going to be loaded as a layer inside the current Photoshop document. Once those are loaded in, we need to change the order of the layers. At the top we've got the beauty pass, so that's what that looks like. Let's disable visibility for the beauty pass. And below that we have the direct pass, indirect, and shadow.
We need to invert this order here. Indirect should be above direct, and shadow should be above indirect. All right so that's the order we want, and now let's hide visibility for the shadow pass. Select the indirect layer, and set its mode to Linear Dodge, Add. We're adding the light from the indirect pass to the light from the direct pass.
We can toggle visibility of that to see the effect, and it's most clear here, and here. We can see without any indirect lighting, it looks very harsh. We can adjust the balance of this if we wish. We can add an effect to this particular layer using an adjustment layer. We can also adjust the opacity if we just want to reduce the amount of indirect lighting. I can bring that opacity down. Okay so let's leave that at 100%. Now for the shadow pass, that's a little bit more complicated.
I'll turn the visibility back on again, and now we can invert the colors here. To do that, we'll add an adjustment layer. With that shadow layer selected, go to Layer, New Adjustment Layer, Levels. Click OK, and in the Properties for that Levels, we want to just invert the output. So bring the black flag over here up to the top, and the white flag to the bottom.
Now we just inverted the colors. Cool, so we only want that to affect that one layer. So we can associate this adjustment layer with the shadow layer. Hold down the Alt key on the keyboard, and click on the line that separates those two layers. Now we can see that the levels adjustment is linked to the shadow pass. All right and finally, we'll select that shadow pass and set its mode to Multiply.
Once that's done, we can play with the opacity for that shadow layer, and with no opacity, we're not adding any darkness to the scene. As we increase the opacity up to let's say 40% or so, we're increasing the shadows. All right very cool, that's the basic introduction to AOVs. If we turn the beauty pass back on again, we can see quite clearly that the AOVs do not respect the exposure control, and that's by design.
Usually you want to tone map the images in post rather than in the beauty pass as we see here. And that's why the beauty pass is sort of blue. Once again that's because of the exposure control color temperature settings I've chosen. If I wanted to achieve the look of that beauty pass, I could apply more color correction adjustments here in Photoshop, or in another compositing application. That's the basics of how to use AOVs in the Arnold Renderer, and combine those AOVs in a compositing program.
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.