Join Brian Bradley for an in-depth discussion in this video Compositing V-Ray elements, part of V-Ray 2.0 for 3ds Max Essential Training.
As we have already set up and rendered out a number of elements to a multi-channel EXR file, it's time now to see how this workflow can have tremendous benefits by compositing our elements back together again inside of the composite application. We are essentially going to reconstruct the render as it would come straight out of V-Ray first of all. Now, we have provided a composite file for you to work with, so if you just follow along, as we go to File > Open, and then of course we need to locate our Exercise Files folder, which in our case is found on the desktop.
Go into our Exercise Files, and you'll there's a compositefiles folder. If we just open that up, we're just going to work, first of all, with this Ch09_Elements_01 file. So, if we click Open, you can see all of our file nodes load in the background, and then we just dismiss the File Browser. In here, as you can see, we have a number of image nodes, all containing different views of our multichannel EXR file. They are showing us all of the different elements that we have already rendered out. Now, of course you need to see how we can import footage into a composite and also how we get to view all of our render elements inside of that footage.
So, if we come up to File--this is just one way that we could perform this operation; we just use the Import option-- you can see we go into our compositefiles folder, and we just want to select another instance of our Elements.exr file. Let's import this. You can see that pops into our Player view and again, let's just dismiss the browser window. Now, using this particular file node, we can show you how you can gain access to all of the different elements that we've captured inside our multichannel EXR file.
So, with it selected, we come to our Options tab and you see we have a number of areas that we can work with here. The two we're interested in are the Channel Views and Channel Groups areas. If we click on this Channel Views option, you can see we have all of our rendered elements listed. If we select one of these, so for instance our V-RayDirt element, you can see that it shows up inside of this particular file node. Now of course, we don't want to work with yet another version of our ambient occlusion element because we already have this set up in the scene. What we really want is to set up our z-depth element.
But you really have noticed that in this particular list that element is not listed in that. So, now if I just, from this list, choose this Depth option, you can see our z-depth element appears in the work area. Now, it does look a little strange because we are only viewing the red channel of our z-depth map at this moment in time. We could set it up so that we can see all of the grayscale values, by placing it in each of the other channels. It doesn't really matter through because though, this will not affect how the map works in the scene. So, it's perfectly fine just the way it is.
Well, now we're really ready to start compositing our different elements back together. Now to do this, we need to add tools into the work area. The way we do this is to middle-mouse click, bring up the Composite Gate UI, and then just swipe across to the right to bring up our Tools list. Initially, we want to work with our composition tools and we want to go and grab a Blend & Comp tool. Drag that out and drop it into the work area. Now, as we are connecting our lighting elements together--so our direct light element and our GI element--we can pipe them into anyone of the two image input ports on our Blend & Comp tool.
So, for instance, we will take our lighting and we will pipe that into the front port. We will take our GI element and we will pipe that into the back port. And now all we need to do is basically add these two together using a blending mode. So, with the Blend & Comp tool selected, I'm just going to click on our Blend mode over here in the Blend & Comp tab. Now, you can see we get something a little bit strange going on here, because we only have a few options to choose from and they actually get cut off at the bottom. This is just a little quirk of the composite UI.
If I just drag this down and then we click again, you see we force all of our blending modes to pop into view. As we're working with lighting and all lighting passes should be combined together using the Additive mode, that's the one that we're going to choose. So, now we have those two connected together. And really, we just want to repeat this simple process to combine all of the other elements that will bring those up to this control image state. So, for instance if I take our Reflection element, middle-mouse click in the work area, swipe, grab another Blend & Comp tool, let's take our existing chain and pipe that into the back port, take our Reflections, pipe them into the front, select the Blend & Comp tool itself, change the Blending mode to Additive, you can see we have now added reflections into the mix.
And in exactly the same way, we're going to add our specularity. So, grab the element, middle-mouse click, swipe, pull the Blend & Comp tool into the work area for ourselves, pipe our existing chain into the back port, take our specularity, place that in the front import, and now you can see we have added specularity in there. All we need to do is take our Blending mode and set it to be Additive, and again, if we just step back through the chain, you can see how we're building up our composite.
And now if we just make a comparison between what we have and our control image, you can see that we do indeed have an exact replica of the render as it came out of V-Ray. Of course, the only thing that we haven't done to our control image is to apply a gamma correction to it. This was rendered out with a gamma value of 1 from V-Ray. So, let's just select this node, middle-mouse click in the work area. Let's swipe across. This time we want to come to the Color Correction tools. Let's grab our CC Basics and drop that in the work area. And if we pipe our controlled image into it, select that node and if I just gain a little bit of a clear view of the controls here, we can now select this gamma option, the master gamma option, and set a value of 2.2 in there, and we have a completely gamma-corrected image.
Now, we could of course add this Color Correct node on to our existing render element's chain as well. We're going to save that for the end of the process though. So, up to this point, we've successfully re-created our V-Ray render inside of the composite application. We've put all of the elements back together and we've even seen how we can work with a multichannel EXR file in Composite, accessing all of the different render elements stored in there. But of course if this was all we could do with render elements, well, we really would be better off just taking our straight render out of V-Ray and going with that.
We could cut out all of this extra work. What we want to do now is show you how we can make some quick and very powerful changes to our final image just using the render elements that we have at our disposal.
- Installing and setting up V-Ray
- Using the DMC Sampler
- Understanding color mapping modes
- Adding a spherical fill light
- Working with the V-Ray Dome Light
- Using irradiance mapping and Light cache
- Creating diffuse color
- Making reflective materials
- Creating translucency
- Ensuring quality with image sampling
- Controlling the V-Ray physical camera
- Creating a motion blur effect
- Compositing V-Ray elements