How to set up the RayRender node with reflecting and reflection geometry and use the Reflection shader to render a true ray-traced reflection lighting pass.
- [Instructor] At last, The Foundry has released the long awaited RayRender node, which allows you to render ray traced reflections and other passes in NUKE without using RenderMan. So here's our setup. Got this little 3D scene, got a camera and a light, two spheres. The sphere on the left is animated to bounce up and down and to rotate, which will give us some nice reflections, which we will then bounce off of this sphere here. I also have this checkerboard, which I just used a grade node to turn red, 'cause I want to use that as a map on top of my spheres.
So, we'll hook that up there and go back to our 3D scene. So you can see my red guy right there. Let's turn on the headlights, so that's a little bit brighter. So there you go. That's going to be what I'm going to reflect off of the other sphere back in frame one. Okay, let's get into it. Push in here. Now this is the object that's going to do the reflecting, so that's this sphere over here. So, what we'll do is to this we'll add an apply material node, so coming over to 3D, Shader, ApplyMaterial.
Nice. Next, we want to add the reflection node. So, back to 3D, Shader, all the way down to RenderMan, Reflection. We'll just hook that up to the material input right there. Okay, and we haven't adjusted anything, just stacking nodes up here. Okay, last we need our RayRender node, so it'll see the reflections, all right.
The scanline render node will ignore that completely. So, selecting the scene node, 3D, RayRender BETA, but soon they'll get the bugs ironed out. Here we go, and hook up our camera to that. Okay, now we're ready to switch to our viewer and a reflection, showing you the alpha channel, it's rendering both geometries, but on this one here, the only RGB we're seeing is just the reflection.
In a minute we'll add some more materials so we can see it, but that's the whole idea right there. So, let's play this and admire it. There we go. Looks very nice. Okay, back to frame one. Now, let's add some more materials to both of our spheres. So let's start by tricking up the sphere on the left, our reflection object. Right now it's just got the default diffuse, so we'll select that grade node, which turns it red without a Phong shader, so 3D, Shader, Phong.
Now we need to hook up all three map inputs to the picture map. Now, I can play some games with this guy here. We'll undo that. I can dial down my shiny spots. I could add a little bit of an emission to my guy here, and they all show up in the reflection, see? I want to punch up my diffuse, and the reflect got brighter, okay? All right, so all the materials you put on the reflection object will show up on the reflecting object.
Very nice. Now, let's say we want to trick up our reflecting object. We would like to see some more surface attributes here. So, let's start by adding a Phong shader. So, we'll go 3D, Shader, Phong. Hook that up to the reflection input, okay. Now, this is adding a Phong shader to just the raw geometry, so we get this 50% gray thing. And of course, I can dial in the shader here and give it a little bit of emission there, okay but this is going to look much more interesting if I hook up maps to my inputs.
So, let's just go borrow this checkerboard here. Hook it up there, and then we'll just hook up all three of the map inputs like so. Okay, now let's see how that looks. And there we have it. The reflection is now added to all of the materials that are on our reflecting object. Okay, we'll stop this and jump to frame 50 actually because I want to show you the motion blur. Now frame 50 is our fastest frame.
We have guys moving really fast on frame 50, so that'd be a good place to punch up the motion blur. Now by the way, in this reflection node, you can adjust the reflection color. Right now by default it's white, but you could open this guy up and, for example, mock down the red and increase the green. Okay, if you wanted to change the color of the reflection from the original object.
Let's undo that, that's hideous, and then we'll go back to the value slider allows you do increase or decrease how much reflection you're seeing. Okay, now let's return to our motion blur. We're going to find that in the RayRender node. Let's double click to open that up. First, we go to the MotionBlur tab, and we set the number of samples. So what we have here is what's called stochastic motion blur, which means it does randomized pixel samples every frame instead of a constant steady smear.
So, let's say we want to have five samples. Ew, that's not very nice, that looks pretty ugly doesn't it? No worries. We then go to the RayRender tab and the stochastic samples, we'll increase this to, let's just say, five. There we go. That looks much better. So now our reflection will have lovely stochastic motion blur baked into it. So this gives you the basic setup for a RayRender reflection. In the next movie, we'll take a look at a more sophisticated workflow to give you more control over your reflections.