- [Instructor] Here we'll take a look
at how to set up a 3D scene.
Now this is a watch only demo
but we'll be building 3D scenes together soon enough.
I'm trying to give you an overview of how things work
before we dive in and start building things.
Now the first example here is the minimum setup,
if we look at what we got here in our 3D world,
I have just this sphere and just this camera,
those are the minimum requirements for a 3D scene.
If you just have those two items
you can hook them directly
to the scan line render node
so the sphere comes right in here on the OBJ scene input,
the camera comes here on the camera input,
this gets us our scan line render.
There's my alpha channel,
now we got the jaggies here,
and that's because I've turned off the anti-aliasing
in order to speed up the rendering demos.
Once we have a scan line render we're in the 2D world
we can then, you know,
attach any kind of thing we want to it to do our
color correcting or blurring,
or any other such operation as that.
Now one of the things I wanted to point out
here at this point,
is the scan line render node has this
input here called BG, that's a background plate.
With nothing connected, you get a black background,
and the resolution of the render
is whatever the project settings are.
However, if you take an image
like for example this one,
which is not the same resolution as the project settings,
and if you hook it up to the scan line render BG input,
watch what happens, boom,
it changes the output render to match the attached image,
and of course it puts the background image
behind your CG render.
But the big issue is,
that it changes the output resolution
if this image is not the same size as the job settings.
So an image attached to the BG input
will override the resolution of the job.
Okay, so I'm going to disable this,
and cruise on over to the next demo,
which will show a more typical set up,
and I'll enable all of this, hook up to there,
so this is a somewhat more typical scene,
I have a card,
now this is one of Nuke's geometric primitives,
and there's a sphere,
another one of Nuke's geometric primitives.
But I can also bring in external geometry
like this guy here.
So all of the geometry hooks up to the scene node,
we then bring in all of the lights,
okay, we can see our lights here.
One, two, three,
there they are.
So I have a key light, a fill light, and a rim light,
and again, they all connect to the scene node.
And of course I have a camera,
now in this particular case,
I have a moving camera,
just to make the scene very exciting and very sexy, okay?
All right, so, now all of this then,
builds our 3D world and remember it is the scene node
that groups everything together into one logical group
and that says to Nuke, this is what I want to render.
But I can't render it until I attach
the scan line render node.
So now let's take a look what happens
if we render our scene,
now these are my lights,
so if I were disable the key light
you can see I've lost
all my lighting in the scene there, okay,
so I could also, you know,
detach one of the lights if I want, okay.
So the lights can be attached and detached,
the geometry attached and detached, but the key is
the scene node is what pulls everything together
into a single, logical group to be rendered,
so let's play this and see what we get,
and there we go, don't forget I have my moving camera, okay?
Very nice.
Okay let's look at another possible set up,
and I'm going to disable all of these,
move over here,
and enable this set up here,
where I have added multiple cameras.
We'll hook up to our scene node,
and we have the exact same set up, okay,
but what I have done, is I've added these two cameras.
Here's the punchline,
you can only have one camera
attached to the scan line render node,
and that makes perfect sense
because that's the camera I want to render to the screen.
However, I can have multiple cameras
hooked up to the scene node,
and the purpose of those cameras is,
so I can see the scene, or view the scene
from different angles that I may want, okay?
And here's another one,
this gives me kind of a side view of things, okay?
Now of course the Nuke viewer as we will learn shortly,
has built in orthogonal views
down the X, Y, and Z axis.
But this is if you want a camera,
for instance get you a close up of the face or something.
So be advised, you can hook up
many cameras to the scene node,
but only one camera to the scan line render node.
Okay, let's disable this,
and move to perhaps the most powerful example.
Select these, turn this one on,
all right, here's what's going on here,
and this is a very common set up,
where you have multiple, separate renders.
Now this is the same scene,
I've got my critter here,
I've got my globe there,
and I've got my star card, here, okay?
But the key is
I'm going to render each 3D object separately, okay?
So I have my geometry,
let's go over to this guy here,
I have my geometry for the character
hooked up to a scene node,
I have all three lights hooked up to the scene node,
a scan line render node and my scene camera.
As a result, this scan line render node
will only render this one object,
so I can go here and say show me that one object,
okay, there it is, the nice alpha channel.
So this outputs just the one piece of geometry,
over here it just outputs the Earth, again,
it only uses this geometry
but it also includes these three lights, okay?
So I'm going to be rendering that globe
with the exact same lights,
and the exact same camera as the character was,
and that render would look like this.
Finally we have our star field background,
it gets its own separate scan line render node
and again shares the same camera,
so that it's being seen from exactly the same point of view,
and we'll get that render here.
Now I have three separate renders, okay?
So this render for the character,
this render for the Earth,
that render for the star field background.
Now I composite them all together
to make the same exact scene we saw a minute ago,
but here's the difference,
I can now intervene in the composite.
I can take the output of the character,
add a blur node for example,
and blur the character if I want to.
I can also tap the output of the globe,
add a grade node or any other thing I want,
and adjust the brightness of the grade node.
So by doing these multiple renders in one Nuke script,
and then compositing them together,
that workflow gives me maximum control
over the final look of the comp.
As we've seen, Nuke's 3D environment
is perfectly integrated with a 2D environment,
making it seamless to move between 2D and 3D.