Join Dariush Derakhshani for an in-depth discussion in this video Diffuse, reflection, and refraction, part of Learning V-Ray for Maya: A Professional Reference Guide.
In this video, we'll be taking a look at the render elements in V-Ray for diffuse, reflection and refraction. I've added a sphere to our scene. And we'll be adding this V-Ray material to it. And, of course, to make it refractive, I'll add a refractive color to make it very glass-like. And in the Render settings, I'll be adding a Raw Refraction pass, as well as a Regular Refraction pass so we can see the difference between the two. Now, we already have a raw reflection, as well as a regular reflection. And of course, a Diffuse pass already built into our list of elements. We'll go ahead and render into the V-Ray frame buffer. And you can see all of the distributed nodes kicking off. Extra nodes provided with the HP Z220.
Quite a hefty machine. Seems to be tearing through the buckets pretty fast. We've also turned on GI, and this is the GI calculation taking place right now. And as the frame begins to render off of the GI pass, we can see that our glass ball, is indeed quite refractive. And here is our final frame we can see a very nice refractive glass along with the prerequisite elements that we set up in the Render settings, we can access them right through here. And we've got our raw light, our raw shadow but more effectively, we will take a look at our raw reflection and we will take a look at our raw refraction which is the ball, and we will take a look at the regular refraction. And there's not much difference between the raw refraction and the refraction itself.
But, if we take a look at the raw reflection, you'll see there's no reflection on this glass ball. We'll go ahead and add that in a moment. But we've got a very strong reflection, on all of these objects. If we look at the regular reflection, element, you'll see that a lot of that is mitigated. Meaning that the surface isn't 100% reflective, like it is in the raw reflection.
The idea is we have to take the raw reflection and multiply that in composite to get the regular surface reflection. And we need to multiply that with an element called the Reflection filter. We'll go ahead and add that, and also on the glass ball, we'll select it's material and we'll make it a little bit more fun by adding some reflection to it and also turning it into a green beer bottle glass by adding some color to the fog color, giving the glass just a little bit of a color.
Let's turn down the refraction ever so slightly and we'll go head and render into the V-Ray frame buffer and take a look at how these passes come out. And as our render finishes, we can see a little bit of that green in our new glass and a little bit of fog. As a matter of fact our raw refraction and our refraction which are the same are a little bit green and foggy.
Taking a look at the reflection. We have the multiplied reflection. Let's take a look at the raw reflection, see it's much brighter and what's happening is the raw reflection is being multiplied by the reflection filter, and this winds up being an alpha channel of sorts. Acting on the raw reflection to give you the surface reflections for your scene.
Let's go ahead and take a look at this After Effects. Here we have all of our passes output, we'll import our reflection and refraction passes along with the diffuse into After Effects. Now, taking a look at the beauty pass in After Effects you notice that it seems a lot darker than what we rendered before, which is seen here. But keep in mind we're in linear space, which means we are looking at this in linear, so we have to convert to SRGB to get a proper view.
So we have to put a gamma correction on our frames. And since I've rendered 16 bit tiff, that is quite easy by adding an Exposure Effect found in Color Correction found in After Effects. And setting the Gamma Correction to 2.2. This will give us exactly. The frame that we see in sRGB mode through V-Ray and Maya in After Effects once we have that exposure we need to add it to all the other layers, with that 2.20 copied and pasted Exposure so that we can see them.
Now we'll take a look at the diffuse pass first. That gives us flat colors. You can add on top of this to create your beauty. And the first thing you want to do is you want to multiply by. The raw light. So I'm going to take the Diffuse, and put it below the Raw light. And I will change Raw light to a Multiply. (SOUND) This way, this gives us something very similar to our lighting pass, which is the first step in going back to our beauty with our comp.
This of course is a larger topic that we'll discuss in a later video. Now similarly, we'll do this with our reflection passes as well. Now here I have the reflection pass which is quite dark, but keep in mind you have to add your gamma. Since you're rendering in linear. And now that's the reflection pass that we've seen in the V-Ray buffer. We'll have to make sure to copy and paste the gamma correction to the others as well.
Take a look at the Reflection filter. This will act as an alpha channel of sorts, that must be multiplied on top of the raw reflection to give you the surface reflection, which is indicated by this pass. So we'll set the transfer mode to multiply. And this gives us basically the same as our reflective pass. Now, what is the purpose of rendering a Raw reflection as well as a reflection filter if your reflection element contains what you need for resurface reflections anyway and this may be answered by the needs of your job.
If you find that you'll need ultimate control over your reflection passes, you'll want to break out your reflection into the filter and the raw reflection to have the utmost in control over your reflection. However, if you don't need that much control over your reflection a simple reflection element will suffice. In this video we took a look at creating and using the Diffuse pass as well as different reflection passes including the Raw reflection and the Regular reflection. As well as the Reflection filter, we took a look at the refraction passes as well.
- What is V-Ray?
- V-Ray integration with Maya UI
- V-Ray lights and shaders
- Working with global illumination
- Object properties and render layers
- Creating passes and elements
- Rendering and optimizing