Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
hi everybody and welcome back to Nuke 2 14
this is class 3
we're gonna be discussing some 3D paint techniques um
and exploring some of the 3D features of nuke
how to use projections
how to use cards
how to use the scanline render
um all these things to eventually make a
make a clean plate out of this shot
we're gonna be focusing mainly on the roads here
taking out some of these cars
all of these cars actually um
so that there's no moving objects
uh left on the road because we might
you know if this were a
in a real life situation
you might be asked to do something like this if uh
if the shot called for
some objects to be placed on the roads
someone would need to
generate a clean plate of this shot
uh for use by
by compositor so this is
the shot that we're going to be clean plating today
um and eventually when we're done
it's gonna turn into something like
something like this where we've removed
all the cars from the shot
alright so now we're in nuke
and I've gone ahead and imported our
uh plate that we're gonna be working on
uh so the first
thing we need to do is uh
is get a 3D track for the scene
now um you could do a 3D track in um
any software really that does 3D tracking um
if you're more familiar with Synthize or
PF track or Bourgeo or something like that
by all means
go ahead and use that
um but for right now I'm just gonna explore the uh
the camera tracker node and Nuke X
you just have to make sure that you have Nuke
X installed
um and you're using that
otherwise uh
you can't generate a 3D track
if you're using non x nuke
uh you can still utilize uh the node
but it just won't let you do the actual tracking
um this is just to make it more affordable for
for studios and things like that
so typically
you might have one or two seats of Nuke X and um
everyone else can use regular nuke to
to work with those files
so I've gone ahead and I've
made our first camera tracker node
and uh all you have to do is plug it into um
into the source and uh
and you can try tracking features right off the bat
but let's just take a look at the uh
at the clip that we're gonna be tracking today um
so that's got some great parallax
it's an excellent candidate for a 3D track um
because there's so many um
different planes of motion
for the camera tracker to grab onto
so that's a good sign uh
the one thing that I just know is gonna cause problems
if we just try and track it right off the bat is um
there's a lot of moving cars
on this southern road right here
and there's a few slightly moving cars on uh
this road over here as well
so what we need to do first is
generate a mat to take those areas out of the
plate before we can track it
so building upon some of the
um the skills that we picked up in my first class
the roto class
um I've gone ahead and I've actually
generated mats for that part already
so I'm gonna go ahead and import that roto
that I've saved out
tracking Roto
and uh now we have uh
a collection of notes that I put on a backdrop
backdrops are great ways to um
to organize your script
uh you can create one
it's just called backdrop
uh if you don't have any notes selected
it'll just make a
uh a backdrop that
an empty backdrop that you can put notes into
and so if I move a note onto it and I move the backdrop
it moves those notes with it
so it's a great way to uh
to organize your script like that
you can also select a collection of nodes
and make a backdrop
and it'll automatically make a backdrop
that's the size of the nodes that you had selected
um if you wanna select
just the backdrop node without grabbing the ones
that are on top of it
you can hold down command on a Mac or control on a PC
and that'll select just the backdrop node
um so now that I have that roto
I'm gonna copy it into our um
into our plate
so the a side is our alpha channel
and the B side is gonna be our RGB channels
so if I look through that
I've got the plate in my RGB and my mat in the
in the Alpha
so that's just basically taking out that
that southern road so the tracker won't get confused
and let's just
check that roto real quick
so you can see what's going on
so there we go
and it's really just really simple roto just uh
just like we did in class 1 um
it's not perfect
I'm not using it to
to extract any of these objects just yet
I'm just using it to kinda take out the uh
the road so that the camera tracker has
useful points to track to
so now we plug our camera tracker into um
into the bottom of that network
and we can tell the camera tracker to um
use as a mask the source alpha
so it's gonna ignore anything inside that alpha channel
um you can tell it to invert the alpha or
use the luminance from the
RGB channels or all kinds of different things like that
but basically it's just looking for um
for one channel
uh that it can use to um
that it can use to
discern which points to track and which to ignore so uh
let's just try the track features button um
and see what that gets us
so what it's doing now is
it's just tracking a bunch of features in the shot
might take a little bit uh
it has to go backwards and forwards
and as you can see
it's not picking up any features in the uh
in the southern road where the cars are moving um
which is exactly what we want
so it's not gonna throw off um
throw off our track in any way
so now that it the
it's tracked a number of different points on the uh
on the plate
I'm just gonna quickly
scrub through and make sure that there's no
points that are um
totally inaccurate
uh there's a couple that uh
that aren't perfect
but for the most part
I'm pretty happy with the features that it tracked
good so that's pretty good um
now I'm just gonna tell it to go ahead
and solve the camera
so now it's going to uh
look through all the features that it's tracked and um
and basically figure out uh
where to put the camera so that each of those points
lines up excuse me
lines up in 3D space
so you can see it did paint one of the trackers red
um it paints them red just to
tell you that it doesn't have a lot of faith in um
in what that track is doing
you see it gives you some statistics about that point
um it's it's a good long track
but it's it has a pretty high error rating
um compared to points that are surrounding it
see this green one has a error point too
and whereas this uh
this point has a error of two
which is I guess about 10 times
um more prone to to error than the other one
so we can just go ahead and
get rid of that track right
click and delete selected
and I'm just gonna tell it to
to solve that camera again
without that point
that point probably wasn't gonna cause us any
real problems um
if there were more
we might have uh
gone back and been a little more detailed about that
but um now that that track's gone
and feel pretty confident about it
so now all we need to do
is just have it create the scene
so what the
what that does is it gives us a bunch of 3D notes
so these are the first
3D notes that we'll be using in nuke um
the whenever a notice is red
um that usually means that it's a
it's a um 3 dimensional
it contains some kind of 3 dimensional information um
so it's given us uh
it's given us a note that contains all the 3D points
so if we switch to 3D mode by pressing tab
I can pan around using the middle mouse button
zoom in and out using the right mouse
button and rotate with the left mouse button
and you can kinda get an idea of what's going on
um these points over here
are that really tall building in the foreground
and then uh
all the points over here
represent all the other points in the scene
you can see that there's a bunch of big clumps for
the tops of some of the buildings and stuff like that
and uh so basically I'm just making sure that it's not
uh you know
creating something that's absolutely wrong
um this looks pretty good
um but I also noticed that it's um
horizontally wrote oriented
um you know
the camera tracker
really has no idea what it's looking at
it orients the camera on the Z axis
which isn't exactly what we want
um you could leave this alone
and it wouldn't cause you a lot of problems
but just so um
so it makes a little more sense to us
uh it's really easy to orient your scene
uh you just go into the scene tab and tell it to uh
rotate everything by uh
in this case we want negative 90 degrees
so now what that's done is it's just moved
everything so that the uh
the top of the building is the highest point in y
and the lowest point in y is the uh
is the furthest point away from the camera
and the it's also generated the camera for us
right here and if we press play
you can see that camera moving
just like the
the shot really would
and if you wanna look through that camera in um in 3D
you can choose up here in the upper right
to tell it to look through the camera
and press that little red button
so it locks it
and let's also open up our uh
point cloud
so there we have a pretty good representation of
of uh what's going on in the scene
and now um if we wanna see the output of that
or go back into two dimensions into 2D
and at the bottom
coming out of the scene note
the scene note is basically just a way of
combining a bunch of different pieces of geometry
or cameras it's just
it's just basically a metanode that combines all
a bunch of different things
so out of that note
we can make
our first scanline render node
and the scan line render node
basically just takes all those uh
3D objects with their textures that uh
that are plugged into them
and uh and renders them through a camera
which we plug in here
so when we look through that now we see
all those 3D points rendered through the camera
and if we want to put the plate behind it
I'm just gonna copy that plate and use the background
and now it's putting the points
on top of the background
so now we can
um play through this and just do a final check of
the track and make sure that there's no points that are
floating like crazier or
some points that don't make any sense
um most of these points are looking pretty good to me
so I'm not terribly concerned about it uh
if you do have some points that seem to be floating
erratically or aren't really locked down to any
object in particular
you might wanna take a second look at your track
and just make sure that uh
everything is kosher and um
and uh you know
revise it as needed
um but that's looking pretty good
so I'm gonna move on from here
so one thing that uh
we also wanna do um
while we're in the track is uh
is take care of any lens distortion that's
taking place in the scene
it's not too bad in this particular shot um
but if you study it a little bit
you can see that areas along the uh
the edge of the frame do distort a tiny bit
and that's just gonna throw off um
throw off some of the clean plate work that we do so um
let's just go over how to deal with that quickly
um Nuke X also comes with a lens distortion feature
it's also a note that you can use in uh
in regular nuke
you just can't um
actually execute the analysis
um so you can plug in these values manually
but what you can't
do in regular nuke that you can do
in Nuke X is have it do um
the image analysis
so the um the lens distortion node uh
does it's working much the same way as
the camera tracker node
we just have to tell it to use our
source Alpha as a mask and
and the camera motion for the shot is a free camera
it's translating as well as rotating
so we'll just leave that as default
and then just go ahead and tell it to analyze the image
and uh this part takes a little bit longer um
for this particular shot anyway to uh
to calculate the lens distortion um
so I'm just gonna let that cook and uh
we'll see what it gets us when uh
when it's done
so now that's
so now that's finished um
all it's done is just filled in um
filled in values for the two lens distortion
um attributes and also found where the
center of the distortion is taking place
which isn't always
always necessarily in the center of frame um
and if we uh
look through that node um
we can see that it is doing um
the understortion
it's uh it's squeezing it a little bit
so it's leaving some space at the uh
at the top and bottom and edges of
and the sides of the um
of the plate
and we can turn that on and off to uh
to see what it's doing
so it's not terribly extreme
but it is gonna affect our work a little bit
so it's just a step that uh
is good to get out of the way early
so now I'm just gonna save that file out
and we're gonna move on to the next task
which is actually doing some of the clean plate
so now let's start uh
the clean plate process
like I said
this is uh something that can be started um
as someone else is tracking the shot um
I was just one person so I'm doing it um in serial
but someone else can start working on this while
somebody else is working on the track
so I'm gonna utilize a lot of the same techniques that
that Charles talked about in the last class
um really very similar stuff um
with some slight tweaks
what we can't do here in the
like we did in the previous class is just use um
a straight frame blend to uh
degrain the plate um
if you'll notice
there's actually quite a bit of uh
of green in this shot um
as opposed to the other uh
shots that we've dealt with so far um
it's pretty heavy in uh
in all three channels uh
which is gonna make our painting a little difficult
so um you could use a plug in to uh
get rid of the
the grain in
in the shot
uh it's perfectly acceptable method um
but if you're just
tryna get started quickly
um we definitely recommend using the
the frame blend method
it's really solid and does a great job
so I'm I'm still gonna try and use that method here
so now that we have a nice clean frame to paint on
just gonna go ahead and make our roto note
our roto paint note excuse me
so this process is very
very very similar to
the process that Charles went over in the last class
we're just going to be painting out the cars and uh
and trying to get
the frame clean
um don't worry about integrating it into the
into the actual plate just yet
we'll get to that for sure um
but there are a
couple things that I just wanted to mention um
about the Roto paint node um
if you'll notice there's a
there's a little bit of a
I wouldn't call it error but um
when I do my paint strokes
you can see that the values are kind of getting
softened and blurred a little bit
which isn't too preferable
when we're doing work like this
we kind of want it to look exactly like what we're
what we're painting with so see
I kind of created like
blurry values
especially on the edges of the
of the paint stroke um
a one way we can mitigate that is by changing the
pixel filter that the Roto Paint node is using
so if you look at the um
clone tab of your Roto Paint node
you can see that the filter is by default set to cubic
this is the default in nuke for all pixel filters um
so to get that a little sharper
we can choose a different one
the one that I like to use the most is
is Riffman um
so Riffman does a cubic
but it also sharpens a little bit
um so let's
use that one and
and see the difference
so let's look at some
some painting that I had already done
and it might be a little hard to see on the um
on my uh my screencast
my recording um
but I'm sure when you
when you give it a shot
you'll definitely see the difference um
it's it is a little bit hard to see
but just trust me
give it a shot and
and switch between the two for a while
and you'll definitely notice the difference
so I'm gonna keep painting and you should too
and I'll meet you back here when uh
when I finished the um
when I finish the clean plates
I'm gonna go through
and do uh each of the roads
so I'll meet you back here and uh
and we'll discuss how to use
these clean plates with our 3D track
so I've gone ahead and I've generated clean plates for
all three sections of road that we want to replace
so here's the one that we started with and
here's the southern road
and here's the um
the middle road
so I've done it um
for three separate frames
um I did 50
30 and 90 um
I just I basically just chose uh areas that uh
that had the most of the particular
part of the image in frame um
and I went from there and I also used our
the lens distortion that um
that we did in the track to undistort that paint um
that's gonna come into play shortly when we
um when we use these clean plates
in the 3D track that we made
so if I just turn uh
one of them on and off
you can see that um
that it actually affects this road in particular
a great deal um
so that's gonna come in really handy when we go to
integrate the uh
when we go to integrate the clean plate
so now what I'm gonna do is I'm gonna import our uh
import our track into this scene
so import
import our track
I actually don't need um
any of the the tracking roto that we did
and I'm gonna get rid of uh
any parts of the scene that uh that we don't need
um for use in the track so oops
here we go
so um if we look at uh
look through the scan line render
I also put um a lens distortion node
these are all copies of each other
you could clone them if you want but
um some of them need to be
distorting and some of them need to be un distorting
so I just choose to copy them
and if I turn that on and off
you see it's distorting the
the rendered image that we have
so now let's um
now what we need to do is we need to put this um
clean plate and this clean plate
all the clean plates
um on separate
layers or separate levels inside our 3D scene
what we need to
what we need to do is basically
find where in 3D space the uh
the plane of the road actually lives
um so if we look around here um
it I'm pretty confident that um
the points near the bottom are where the
the road is
so uh I'm just gonna go ahead and make a
make a card
um make sure use the card node
not a card 3D node because they do different things um
we might talk about the card 3D note later in the class
but for right now we're gonna be using a card
so the card is just a um
a three dimensional plane
well it's a two dimensional plane
but in 3 in 3D um
so it just comes in by default at the center
um horizontally rotated or oriented
excuse me and uh
I'm just gonna open up my uh
my tracking points at the same time
so I can see them both together and right
off the bat I can rotate the card by oops
not 19 y 90 and x
so now it's it's vertically oriented for us
and uh I'm just gonna
put it towards the bottom of these points
um just because I feel like that's probably
where it should live
I don't know if that's exactly where it's gonna end up
but uh it's a good place to start
so now um we're gonna do our first little bit of uh
of compositing
I need the uh
I need the plate first of all
so I'll just copy it from here instead of uh
bringing in a whole new node and change its uh
frame range back to normal
and do our first merge
and also uh plug the card into your C note
so when I do that it uh it turns it black
that's because there's really
there's nothing plugged into the card
so um just for uh
testing purposes
I'll just put a checkerboard in the image
uh by default
all of nukes 3D nodes come with um
UV coordinates on all the geometry
um UV coordinates are basically just a way of um
of defining in uh
two dimensional terms
where a point is on a three dimensional surface
um that's a little confusing
or if you're not familiar with 3D um
terminology
you can go look up UV coordinates
or I'll be happy to answer more questions about them on
the forms but basically it's just
a way of mapping a two dimensional image onto a 3D
object so luckily
nukes 3D notes come with those by default
so it puts it right in the right place for us
this checkerboard does
so uh let's just scale it down
cause it's obviously way too big
and now we get to see our uh
our plate behind it
and I'll just rotate it
and now we can just
play through that and see
how well it lines up with the road
so right off the bat
that looks pretty good
it might need some tweaking once we get
the actual clean plate on top of it
um but I'm pretty happy with its position right now
I'm just gonna disable those tracking points
so we can see what's uh
going on a little more clearly
so now we'll actually um
go ahead and put this uh
clean plate into the card and uh
and see what we get
so I can say that this is not going to work
right off the bat
um first of all the uh
the alpha channel obviously needs to be pre multiplied
we can see that um
that the road is being cut out
that's the solid part
but we're getting this um
this addition because of the uh
the overnode
it's actually adding the values from
this part of the card where the alpha is zero to um
to what we're putting it over which is
which is the plate um
so to get rid of that
we just do a pre multiply right underneath it
and now we have just the road
but it's horribly too small
and it's not even in the right place
um so that's where projections come in
so I'm actually gonna take a little bit of an aside and
um and set up a quick 3D scene
um so we can explore what
what exactly projection does
so I'm gonna make a separate card
a separate camera
and another checkerboard
plug the camera into our scan line
and the scene into our scan line
now I'm gonna look through that and then um
change the position of the camera
so that it's looking whoops
so that it's looking at the card
so there we go
so now this is our just basic vanilla setup
um if we you know rotate the card
it does all that great stuff
and it's moving the checkerboard pattern
in lock step with the uh
with the card
because that's the image that's mapped onto it
um but one of the great features about nuke and um
dysfunctionality
uh has been really well thought out and other um
tools from the foundry like Mari
um but I suspect that a lot of the
the ideas for that came from how uh
people use the project 3D note in nuke
so what the Project 3D note is
is it's a material
it's a 3D material
um you can tell by the way the icon looks
it has these kind of two um
two chevrons on either side of it um
that that means that it's a material that's used for um
used for other 3D objects
so it's a material that defines the
kind of surface properties
of whatever geometry that we plug into it
so it gives us black by default
we don't have anything plugged into it yet
if we plug in a camera to it and then an image
so now what we have is instead of uh the the um
instead of the image just being uh
applied in UV space onto the object
we have the camera
or a camera
it can actually be a different camera
and will be a different camera
but this image is getting projected through the camera
so now if I rotate my card
the uh
the image actually stays oriented towards the camera
you see it's just kind of projecting
the image onto the card
no matter how it's uh oriented
so if I look at it in 3D
you can see that actually the
the texture is getting stretched across the uh
across the card and
and just to exaggerate that a little bit
um when it's almost perfectly perpen
uh parallel
excuse me with the uh
with the camera
um the texture gets stretched
but when you look through that camera
it's still um
oriented properly um
so we're gonna use this technique to uh
to put our uh clean plates onto those cards
so I'll just delete that for now and um
go back to our main comp and make a Project 3D node
and use the clean plate as the image
for that for the surface for the Project 3D surface
now we just need a camera
so what I can do is I can copy this camera and use that
and then let's look through the bottom
and uh our card actually probably isn't big enough
yeah so let's make that card nice and big
there we go
now we're seeing it
but it's still not lining up quite right
and now I'll uh I'll explain why in just a second
so like I said
the projection is uh
is getting projected through
through a camera that we define
but what's happening is it's actually getting projected
through this moving camera
so if we look at it here
we can see that image um
moving across the card
and that's because the camera is also moving
so instead of of um
a projecting through the moving camera or seeing camera
what we're gonna do is basically uh
freeze this camera on a particular frame
and which frame depends on which frame you uh
you did your clean plate on
so in this particular uh clean plate
um we did it I actually did it on frame uh 100
that was my reference frame
so I'm gonna go to uh frame 100
the last frame
and uh delete the animation
so uh it this is basically going to um
freeze this camera in place
so that that projection won't move
and just don't forget to get rid of the animation in
all the channels
and also just
just be sure that you name your
your cameras
cause it can get confusing when you get a lot of them
so this is the naming
convention that I stick to is proj cam
and then the hunt the
frame number that I
that I locked it to
so there we go
Proge Cam 100
so now when I look at the card
great so that card
that image is now getting projected on a uh
on a card with this still camera
so if we open up both cameras at once
you can see that the camera is now going to be looking
at that projection at that card
um and it's always gonna line up on on the last frame
frame 100 because that's where we
uh froze the camera to
so if I go back to 2D and uh look at our results now
now you can kinda get the idea of uh
what's going on
so since I made the clean plate on frame 100 and I'm uh
I locked the camera on frame 100
the clean plate is now lining up pretty well
with the plate
it's still not perfect
but now what we can do
it's it's always gonna line up on frame 100
because that's the
the reference frame
but as you can see
the farther away it gets from um
from that reference frame
the uh the farther away the
the projection
the farther way the clean plate
gets from where it should be um
so this is where uh
going in and tweaking the uh
the position of that card really comes in into play
so what we all
we basically wanna do is just move that card
up or down depending on
you know how it's lining up
and just find that it's kind of
just find that sweet spot of where it should be
and just switch between your plate and your
and your and your clean plate your output rather
and just kind of find that spot
and what I'm looking
at is the lines and making sure that they're
they're looking good
so now I'm just gonna scan through
and that's looking much
much much better
great
so at this point
you can bring each other clean plate to
the stage we're at now
each on its own card and we'll meet back up when
when we finished with that
so now I've gotten all the uh
clean plates roughly into position
um if I uh I'll just play through this a little bit um
as you can see um
I just spent some time um
tweaking the the position of all the
of all the separate clean plates and just getting them
um to match as close as I could without doing
doing anything too special um
so now we're gonna do is talk about um
ways to just
to get that a little
um more perfect
so if I uh oops
if I switch back to my uh plate
you can see that there's some
areas that don't line up perfectly
um like over here
and the further way we get from this reference frame
you know things kind of start floating a little bit
up here especially
um so we're gonna talk about ways to um ways
ways to solve those problems
um as well and just to keep you apprised of um
little solutions that I arrived at um
while I was doing it um
these two um
parts of the road um
this part and this part
um I found out could actually live on the same card
so I just optimized my script a little bit
and the way I accomplished that um
getting both projections onto one
and you can use this technique in a
number of different situations
um is you can use a merge material note
and a merge material note is basically uh
the same thing as a regular merge note
except it's merging between um
material nodes
um instead of uh
instead of two dimensional images
um that options are
are pretty similar
but it doesn't have all the same ones um
and it actually has another one called replace um
but they basically
do the same kind of operations that emerge node does
um so you can
it just make sure that your alpha channels are
are basically the
setup in the same way that you would use a uh
a regular merge node to do that that stuff
so if I look through um
looking 3D and I look at the card that I made
you can see that uh
that both roads
that are two separate project 3 D's um
are on the same card
so that's just a way to consolidate your work
and speed up your script a tiny bit um
so um also what I've done is uh
as I was going through it
I realized I didn't need so many of the uh
of the camera tracking stuff
I just left the original camera tracking note in there
um linked to the scene camera so that um
so that's what's driving the animation of that camera
so just again
little ways you can
you can speed up your script
and get rid of stuff that you don't need to see anymore
you should have been saving
different versions of your script
at different times so that
you always have something to go back to
uh so don't worry about deleting stuff that
you don't think you'll need because you should
always be able to get it back by going back a version
um so anyway um
so I'm a little concerned about this area
right off the bat um
it uh the farther way we get from the
the source frame
which was uh 25 um
the farther away this line gets from where it should be
uh so rather than going back and uh
and tweaking the card to get it perfect and
and match um
matching 3D
um cause that can be quite time consuming
and ultimately you need a perfectly accurate track
um to do it
which also can be quite time consuming
but since we kind of wanna keep moving forward
we don't wanna have to take too many steps backwards
let's just isolate this area
and what we wanna do is just kind of uh
smoothly warp it over a number of frames to get it into
the position we want
so uh one of the best ways to do that is
by using a grid warp node
so I'm going to go ahead
and make one of those right before my pre multiply
and what that does is it gives us
a source and destination grid in the lower left
and let's just make those the size of the image
uh you can use those two buttons to
to do that really quick
and uh we don't wanna touch the source grid
um and just to give
you a quick preview of what it's gonna do is it
based on these points and the curves that you specify
it warps the image
um according to
to those points
so um this note can get quite um processor intensive
so it's good to optimize it a little bit before
you start using it
and uh you can change the the
where the grid lines are
um by using add and remove
so first of all
I'm gonna get rid of the uh
the inner points
so I have kind of a fresh canvas to work off of
and then I'm gonna make the uh
make a bunch more lines that uh
that surround the area that I'm going to be um
that I'm going to be warping oops
so I'm basically just drawing a box
around the clean plate at this point
and now I can add
add detail only to
the parts of the image that I want to distort
so I basically just drew a box around this area
because that's the area that I wanna focus on
and then I can go ahead
and remove parts of the image or parts of the uh
the grid that aren't going to be affected at all by um
by uh the grid warp
so now if I look back through
um my output
I can see that nothing's changed yet
this part's a little tricky because it can't draw the
uh grid points through
all the various transformations that are happening
uh you know
it's trying to draw the
the points through um
through a card
through a scan line render
um so I can't figure out where those points would
lie once it's been transformed
so you kind of have to do this part blind
but basically what we wanna do is just kind of
guess and check and move that uh
move that grid warp um
so that uh we get the
the image to kinda line up so uh
so there we go
um that lines up pretty good
um actually what we wanna do first is just undo all
those transformations and
go to your reference frame first
so on frame 25
that's our that's our first frame
we don't want it to distort our warp at all on frame 25
so I'm gonna set a
keyframe on my destination grid first
and then I will go to uh the extreme end of the clip
and move that warp into place
oops so it's a little tricky to get to work
just because you can't see exactly
you know where it's going
and it automatically sets a keyframe
for us on frame 100
and now I'm just gonna spot check the rest
and uh you know
you may have to animate this a little bit um
more finely
um but usually
it's best to um
set as few key frames on this as possible just because
um you know
you don't want people to notice what's going on
so the more it moves around
the more chance um
you have noticing what's happening
and then go to the other
extreme end and just make sure that's lining up
so it looks like I have to move that again
just a little bit more
great
so I'm pretty happy with that and now now we can just
you know preview that and see how it looks
so now it's
it's lining up pretty well on all the frames
which is great
so just go ahead and tweet that and um
and get that looking right
and uh now let's uh
let's also talk about um
about how the uh
the clean plate is actually still going over
all these buildings
so that's what we're gonna address next um
um that's really um a simple task
all we wanna do is basically um
do some roto for the buildings
uh basically isolate all the parts of the
original plate that uh are going over the roads
and then we'll use that roto to basically put the uh
the buildings back on top
so let's take care of that
I've actually already done some roto for that
so I'm gonna go ahead and uh import that roto
so I'm gonna go import script
and building roto
so I did this roto exactly the same way as as I roto
um object in class 1 nothing too special
so to use that what we need to do is uh
use the alpha from the Roto and the red
green and blue channels from the plate
and now we have uh
have those two things
cutting each
the Alpha is gonna be basically cutting out the plate
and we're going to merge it back on top
of our clean plate
and also don't forget to pre multiply
so now if I uh
AB between those
now we get the buildings back on top of the plate
um you could use that alpha channel to cut out
what's going on in the scanline render
um but this way is just really straightforward
um and you have much less of a chance of
of degrading the image in any way
um so as much as you can
try and put things on top of other things
instead of trying to cut out alpha channels
and generating a map that way
um it just makes things a lot easier to read
and a lot simpler
um to understand what's going on
so there we go
there's that
and uh now let's talk about the fact that uh
as I'm sure you've already noticed in doing your
your clean plates is that um
our clean plate is only as wide
or it covers as much area as the format of the image
so we end up with these lines where um
where the bottom of the format was
uh so let's go
take a closer look at that clean plate that I did
um this one I did on frame 100
so as you can see
this is the line that
that we were seeing in the output
um it really just
it doesn't have anything
else to to put there so it just stops
um and also you can't just move your card because again
this is a projection
so no matter how we move our card that that um
image is always gonna be in the same place on the card
um so one way to get around that um
is basically uh
what we wanna do is kind of bake this texture out
think of it as a texture in 3D
and we wanna bake it um into a
into an image so we can paint on top of that image
and then reapply it to the card
so I'll show you how to go about doing that right now
um one of the great features about the scanline render
is that you can change the way it's uh
it's projecting or the change the way it's rendering um
so instead of using a camera to render
what we wanna do is leave the camera input blank
and change its projection mode to UV
so what this is going to do is uh
if I plug it into the card
and if I look at it
this is actually now rendering out that
texture in UV space according to the card so it just
because of the way the UVs were laid out on the card
it's coming in upside down
but that's okay
it doesn't really matter
because what I'm gonna do next is copy that card
make its input
the scan line render because what we've done is um
like I said before
all 3D objects in nuke come with UVs already and uh
when you plug in image
when you plug an image directly into a 3D note
it basically just maps it onto
that object using the Uvs um
so since we rendered out our projection into UV space
when we put the card
when we put that into an identical card
and use that instead
you see nothing changed
if you zoom in
you can see a little bit of image degradation
but that's just the nature of the beast
you can always render
your UV texture out
a little bigger
actually that wasn't the input
this is the input
so if I switch back and forth between these
you can see it changing very very slightly
but it's not a big deal
because you know we'll be painting and graining this
later so now we can do is on top of our UV image
now we can paint some more
so I'm gonna make a roto paint node
and I can just paint directly on this
so I'll just now I'm just extending the road
so once again paying
close attention to where these lines go
you know the lines on the road are definitely
the biggest
the biggest visual cue that we have
for where things are supposed to be
so I'm not exactly sure how much road I need
but I'm just gonna keep painting just so that uh
you know something is there for it to
for it to use
good so now if I if I look back through my output
let that update
there we go
now I've extended the road um
now I just have to go back and uh
paint in this uh
this kind of outcropping that what is this a uh
you know side street and uh
and do that and also um
go ahead and uh
and paint the other areas of your clean plates
um that need extension like right here
and you can use the exact same method um
and then up here as well
and then um
so once you do that um
we can move on to
on to the final step of this
of this little clean plate exercise um
which is kind of those little finishing touches
we're gonna add grain and then um
add some motion blur to
to our clean plates
so we wanna do now is just talk about um
doing those finishing touches to
to integrate the uh
the clean plate into the shot completely um
so up until this point
you know we've been uh
working on this painting and it's been great
but we haven't been paying much attention to the green
um like we said in the beginning of the class this uh
this particular plate is uh
is fairly grainy
so um we're definitely gonna need to deal with that
because the uh
the the plates that we were painting on um
the the images that we're painting on with d grain
so we need to reintroduce that grain uh
so we're gonna use basically the same approach that uh
that Charles use was using in uh
in the previous class so uh
let's go ahead and set that up um
and will will get that green working pretty well
so I want to put it
I want to put this grain right
underneath the scan line render
because I only want it to apply grain to
the parts of my image that that I'm replacing
so um actually it's gonna go on top of the
lenses distortion as well
so we're gonna put it right here and just
start off with our grain node
so since we covered a lot of regraining techniques
in Class 2 with Charles
I'm gonna skip ahead a little bit and uh
and do that step
and then I'll show you a little
something cool that you can do with
the grain node to get a little finer control out of uh
out of that note
and the blue channel is really
always pretty tricky um
if we look at it in motion
you can see that it does have that
really fine grain that all the other channels have
but it also has this kind of blocky grain um
that that's probably coming from um
from compression I
I would wager um
so that's gonna be a little difficult to deal with
um you know
it's matching pretty well for uh
for right now
but I know we can get it a little better
uh so if we look back at our RGB channels um
probably have the right frequency of green
but clearly the
the green is way too saturated and multicolored
and you know
the intensities aren't really quite right
um so one thing that we can do is uh
it's actually open up the grain node
and kinda dissect it and make it do uh
make it a little more powerful than what it already is
so if we uh
take a look at that grain node um
if you go into the node
tab of the grain node
um there's a little button copied to group
what that's gonna do is it's gonna break up
break out the uh
the grain node
into a group
and like we discussed in Class 1
you can open up groups using the s button
on the side of uh
on the top of the uh
the note itself
and now we can see exactly how
the default grain node is uh
is doing its work
it's actually nothing too
um too fantastic
it's uh it's basically three separate
noise nodes
all generating uh
noise for each channel
and then um
then there's a mathematical
you know explanation for how each of those
each of those noise notes gets applied to the image
and so we end up with is just a bunch of noise
so if we look at what's going on
at the end of this and uh
isolate just the blue so you can see what's happening
it's just putting the blue right on top
and if we look through the expression
you can see it even better um
and there's the final result
so what I wanna do is that I really wanna add some
uh some finer controls to uh
to adjust how the frequency and look of this
of this blue channel specifically uh
is getting applied so uh
um what I think I wanna do is uh
is add some
I wanna get some of that blockiness
um into the um
into the grain
so um there's a
there's a node for that
and it's not a very well known node
it's not even terribly useful um
and you can't even get to it through the regular menus
it I to the best of my knowledge
it doesn't exist in uh
in the regular menus
um but if you go into the all plugins option
or menu and say update and then go back to it
um under the B category is a no called blocky
and what blocky does is it basically
takes whatever input and uh
and kind of turns it into a mosaic
so it's basically just roughly resampling the image
um and use this note at your own risk
you know it's not the uh
it's not useful for much
but in this case it's gonna get get us what we want
so I'm also gonna um blur these blocks by a little bit
uh so that we can get kind of that uh
that blurriness that uh
that I think we were missing in the
in the default grain
so it's a little hard to judge um
just looking at the channel by itself
uh so uh what we can actually do is um
do what we did in Class 1 and uh
externalize some of these controls
um just before I do that we have to of course add um
these blocks these
add the modified blue channel that we did
so I'm just gonna copy
the blue channel to the blue channel using a copy node
so now the the output of the
of the new of the art kind of break off network is uh
is getting added to the grain
so now if we wanna externalize those controls
we just open up the group like we did before and we can
uh manage user knobs and I'm gonna pick the uh
blocky size and pick the blur
size and so now we have controls for each of those
so if I look through that
um and now let's uh
pay close attention to the uh
to the blue channel I can uh
I can kind of adjust all of these right outside uh
looking at my comp
so uh let's see
something like that um
so it's still a little saturated so um
why don't we since we um
always need to at a dissolve node um
just to mix back and forth between the
the grain um
this is a good way to um
to quickly mix back and forth um
and just adjust the overall intensity of the
of the grain without having to go into the note itself
and we can just add a saturation node oops
right after the grain and just kinda tone down
tone down the
the colors um
let's have it not affect the blue
because I see some of those nice blues coming through
well be careful not to crank on it too hard because
uh you know
you'll obviously affect the uh
the actual values in the image too
so something like that feels pretty good
and now I'm just gonna bring up
the intensity a little bit
there that'll probably do as fine
let's look at it at 100%
good so if we just disable and enable that
we can see big difference um
the green really adds a lot and makes it look uh
looks like it was actually shot which is
you know exactly what we're going for
so uh I'm pretty happy with that and um
so good that's the grain and uh
now let's add uh
add something that's gonna
also give it a little touch of reality is uh
motion blur
you can add motion blur
blur very easily
um with a uh
with a vector blur um
so coming out of our scanline render node
um is not just the RGB channels uh
there's actually also um
motion vectors coming out of it so this uh
red channel and the green channel are defining uh
x and y motion
uh and velocity that the Vector Blur node can use
uh in order to uh
in order to motion blur the um
the clean plates
um very effectively
so uh I'm gonna tell it to blur all the channels
and I'm gonna tell it to use the motion channels as a
uh as UV channels as basically uh
you know values for blurring
and as you can see
I'm disabling this on and off and it is in fact
um blurring in the direction of the motion
which is great
um that's really cool
um it's a really quick way to
to get motion blur
so if we uh
just play through that
you can see it gets heavier where there's more motion
and kinda slows down um
or the blur gets shorter where the motion slows down
so now if we look at that back through our plate
I mean our output
and that's pretty cool
it does look like it's a little too heavy um
the shutter speed of the camera probably wasn't as
as uh as slow as um
as the one nuke is using so
um now I need to do is just kinda go back
and forth between the plate in my comp and uh
and you know find a
find out where that shutter value should really be yeah
see these lines aren't getting nearly as blurred as
as they are in the plate
oops that's the wrong value
I meant to change the multiply
so the multiply just kind of um
is a coefficient for the U in V values
so I'm just using that to kind of tone them down
that looks better
so if I enable and disable that
we're still getting the blur
it's not as not as heavy as before
so I think that's gonna match pretty well if we
if we play it back
the other thing that the plate has
that our clean plates missing is it just kinda has this
uh this little bit of
of sharpness that that got lost somehow
so we can just kinda reintroduce that if we uh
just use a sharpened node
um not gonna go heavy with it
by default goes way too heavy
um I'm gonna probably set it down to a size of one
and see how that looks maybe a little bigger
yeah that's starting to feel alright
and let's enable and disable that
see it's it's gotten rid of this kind of Halo that's uh
that's kinda cropped up
around our images are around our uh harsh lines um
so it's kinda taken the uh
the haziness out of it
a tiny bit which is um
which is probably
which is definitely helping us a lot so
so now the last thing to do is just uh render this out
um so that's what I'm gonna do right now um
so I'm gonna render that and uh
we'll flip book it and uh see how it looks
so here's my finished rendered clean plate
um so what we
so just to recap what we covered in Class 3 was
using projections
using the 3D tracker node to generate a camera and
and a point cloud for us so we can put
planes in our image that will
that will move appropriately
or rather the camera will move appropriately
to render those in three dimensions to make
paint work a snap um
it may seem like a lot to um
a lot to think about for um
for just generating a clean plate
but once you get into the habit of doing it
and once you get really used to it um
it it'll become really second nature to you um
to just make those
those networks and
and make quick work of any clean plates
so as always
Charles and I will be available in the forums
to answer any and all questions that
you guys have about this class and
and the other classes that we've covered
uh next class is gonna be taught by Charles
who's gonna be covering uh
keen techniques and uh
best practices for for doing that
so thanks for joining me again
and I'll see you in the forms
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.