Afrikaans
Akan
Albanian
Amharic
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
French
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
hello and welcome back to nuke 2 3
1 nuke compositing best practices
this is Victor Perez
and this week
we are going to start by analyzing
the issues of masking
masking by definition
is the application of a mat
but in this case
is allocated in the alpha of this rotonaude
and is delimitating the area
we want to apply the operation of this note
through the main input
so in this instance
I'm applying the mask through the mask input
but there are other ways to apply this mask
and also things can be complicated
when you apply the same mask through different nodes
okay so in this case
is the regular version of the masking
and that in this instance
I got a great
but any note that is having this mask input
can use this feature
but not only
you can apply the masking also to other notes
by using a work around
okay that saying work around must be used
when you are using the same mask for different notes
in the earliest versions of nuke
this mask input wasn't there
so the option to apply a mask through a node
was by using the multi channel feature of nuke
this was coming way later okay
and it was a feature request from many users
coming from shake and other software
that were already using their mask input
okay so this is a classic case scenario
you have when you are camping
okay this is what is called an explicit mask
we're going to distinguishing here
between explicit and implicit
when I'm talking about explicit
it means that the mask input is being used
so you have the graphical representation in here
that is telling you
this note is being applied here
through this input
so you have a practical view of the organic gram
of how this mask is being applied to the note
sometimes this case scenario
is going to be useful
to understand what's going on in your script
but some other times
is going to be tricky
just to apply the mask from the outside
when you are applying
certain modifications or combinations
to your image
okay so this case is the explicit mask okay
then you have the same
same result
with this implicit mask
so let's analyze the difference between those two
because there is no right or wrong in this case
they are both right
but in this case
my mat here
is just been traveling in a parallel basis okay
which means I can process this mask
and I'm using
does the RGBA set of channel
so in case I want to analyze
what's the alpha here
and what's the alpha here
I don't need to go through other channel sets okay
that's good
here the practical theme is
you don't need to get
other branches
in this little tree
so what if I want to apply
transformation
after my roto has been done
in that case
imagine that
of course I can do this
but imagine that
by some reason
I want to apply this transformation
before the great
or before the effect
remember that this great
is just representing an operation
random operation
okay so there are other operations
that you might need
to be applied after the transformation or maybe
because you have already a transformation in here
you don't want to break the concarcination
we were talking about in the previous class
so in this case
it would be way better
just to apply this transformation in here
but what happens
that I need to apply this transformation
also to this rotor
so of course
I can clone this
and apply here a clone
I called the clone
by selecting the notes
and pressing Alt K
okay so here
I'm doing exactly the same transformation
to my main image
and to the mats okay
but as you can imagine
this is kind of a double process
okay is again
is using clones
that some people
doesn't feel that comfortable
because they were creating
issues in the past
so you can use this for transformation
but in this case
if you apply the transformation in here
everything is going to be
way easier okay
so in this case
the transformation this
applying this
translation
or rotation
or any other operation
you want inside
to all channels
coming through
the main input of the transform
what if in this case
we have the other way
around imagine that
I mentioned before
that I have already
here a transform
so what if I put
a transforming here
and I did my rotor
after the transform
in this case
of course I'm breaking the concatenation
so what I need to do is
I need to split this
and then apply
the double transformation
so again the cloning
and then reformatting
just to call
the same mask in here
so what I was doing
is emulating this
the important thing is
when you can get
lesser strings here
for instance
is way better
just to use
one single string
okay here is not wrong
but believe me
nuke is going to be way faster
processing these
because everything is coming from
one single stream
okay I'm not talking about
dramatic times
but is always better
that architecture
of the software
has been designed to work in
a single stream
okay so just to let you know
in here the way of
selecting the
the mask is going here
in this mask knob
and then selecting
from the incoming image
what's the channel
I want to select
okay here I have
all other channels
by the way what's the difference
between having
the channels in here
and having the channels in this
other channels
well the main difference is that
the channels
you are list in here
in this main
pop up window
is the list of
available channels
for this image
you are analyzing
in this particular note
while the other channels
is telling me that
all those channels in here
are available
in the script
but not available
in this particular image
okay so they are
the layer sets
and layers themselves
that are being used
for this script
to be processed
so in case you
are using copying
or other channel manipulators
you can use
those channels already
without the need
to create a new
layer sets okay
so in this case
I select the mask
so what's the way of
applying this
roto through the same
stream well
what I did is
exactly the same spline
but in this option
what I did is
in the output
instead of leaving
the default alpha
what I did is
using the mask
channel okay
so of course
I can use any other channel I prefer
you can even create
your own channel
and then call it
for instance
Roto okay and
then in here
you can name
the channels
after the area
they are rotating
so for instance
you can called in here
for instance leaps
okay you can
of course create
the default
four channel sets
okay that red
green and blue
but if you want to create just
one single mat
is way better
that you put
the name okay
so leaps so
here now is
because my grade is missing
the mask input
so what I'm doing
is I create
a new layer set
that is called Roto
and in there
there is one
single channel
that is called leaps
see that they
color of that channel
is red is because
nuke every time
you are using
one of the channels
for an entire layer set
what is doing
is selecting
the first available
RGBA channel
which is the R
the red one okay
so if I go in here
a nice select
my roto layer set
the color of my lips
is going to be red
but not because
this is mean to be
red is because
the information
is allocated
in the first
available channel
okay and this is happening
even for multipass
layers of uh CG
so once I have my layer
that in here
has been a custom
made layer set
I go to the great
and then I select
the mask leaps
I like to use
this feature
of naming the areas
because it's going to be way easier
when you have
multiple mats
traveling around the
the streams
okay so then
this mat is
going to be available
not only for this great
but also after this great
so in case I want to shuffle out that channel
I just put it in here
then Roto and is telling me the first letter
of the name of that particular channel
that in this case is L for lips
okay and you see
this is still here
so in case I want to apply
that marked for other purposes
like primotuplication or other things
I can still use it um
talking about primotuplication
you can pre multiply this image that you have in here
Marcy with this okay
um by doing that
you can apply the primal
and here is multiplying the RGB
by the channel of my choice
that by the fold is the alpha
because it's the natural channel for transparency and
and stuff but I can use also this
okay so in this case
I'm doing the premotification by the same mask
but let me tell you
this is wrong
because I'm applying an effect through a mask
and then premotifying that by the same mask
so that is going to create issues in the edges
so instead of doing this
if you prefer
you can use this other warflow
so I'm going to reverse the order of my notes
so what I am going to do is press command or control
and then the arrows of direction
I'm going to press up if I want to move my note up
okay in this case
as you can see I'm moving
with the arrow up and down
okay so you can swap the position of a certain note
okay so in here
what I need to do is to promote apply
and then using this image to apply the grade
and then instead of using the mask
I'm going to use the primal duplication
by that particular
okay channel
the only problem in here is this image has no alpha
and this is because when I was pre multiplying
this image already has no alpha
of course you can do two things
you can apply here the RGBA
and then here generates an alpha by clicking Alto Alpha
Alto Alpha is going to create a white alpha
for every image that has no alpha channel
and remember
every image that has no alpha channel
because there are certain images
that have an black alpha
and that means that the image has an alpha
the only problem is that alpha is black
so in here to this
how to alpha to work
you need to have just the three okay
not the white rectangle
okay so in this case
what I did is apply my mat in here
then I premotify
and then in the premotify
I apply also the alpha
but if you don't want to apply that work around
or maybe because you are not interesting
in having that white alpha in there for any reason
what you can do is you can use this
then apply the correction using the primitiveligation
and now what I'm going to do
is I'm going to use the shuffle note
just to get in my alpha
these lips matte I create
so what I want is to preserve the RG
and B from the RGBA set
but then the alpha is coming from another set
so I'm going to use this second column
so I'm going to call my rotor
and then I'm going to say that
the alpha is coming from this layer set okay
so now I have this alpha okay
so this is in case I want to multiply this uh
mat for any reason okay
and as you can see here
this is possible
because I have this implicit mask already working here
it was a bit tricky
if I wanted to do it with the explicit
of course there is always a way
but what I'm trying to show you here is
what's the fastest way
or what's the smartest way
or what's the optimal in terms of calculations
okay so in here
you have the two ways for explicit and implicit mask
and we are going to use this concept
a lot through the next two classes okay
so it's going to change massively
the way you are applying mask and other processes
let's move ahead now
and let's have a look at the issue of double masking
so in here what I'm doing is applying a great
through an explicit mask
and that's okay
but the problem is
if I apply again the same mask to another note
the effect that I'm doing in here
is the same as a double pro multiplication
because actually
I'm applying twice the same mat
to promote apply an effect
because the pro multiplication
needs to be applied always
just once remember
never more than once
because it's creating issues in the edge probably
that tiny issue is going to be quite difficult to see
but in certain circumstances of high contrast
that particular edge can be held
um if you're not aware of
how the promote application of the effects are working
probably you're going to spend a lot of time um
maybe not the right way
to fix that issue
okay so this
is completely wrong
okay so how can I apply this mass through both effects
well you need to group those effects
as they were a chain of effects
remember the concept of concacination
okay so in order to do that
what I'm going to do is
I'm going to apply a separate process in here
and then the first one is just creating the pinky lips
and the second is darkening everything
okay so what I'm doing is
I apply my mat
through a key mix
so whatever is inside the mat
is being used from the a input
whatever is outside is going to be
from the B input
in this case
you are applying one mask
for one chain of processes okay
let's have a look at the difference between this
and this
can you see the difference
in this particular case
is quite gentle
and probably is not going to be that wrong
but believe me
it's not the right way of applying the effect
and sometimes
it's just getting unknown for the realistic result
so be very very careful when you are applying mask
okay and this is the most complex case scenario
for the masking which is using implicit masks
but applying them through a chain of effects
or operations okay
so with this
I can use the transform feature
I show you before
and here what I'm doing is I'm splitting my mat
after the transformation
I'm plugging inside my Chemix
and then applying the chain of operations okay
and this mat
can be applied for any other processes you have
by placing those operations in here okay
another thing to keeping consideration
is that that mask I put in here
is traveling still through the Chemics
so if I put in here my mask
I'm still having that mask available okay
um what happen if I want to get this mat available
but I'm using the explicit way
so the one that the mask is coming from the mask input
and not in the same mainstream
well let's go back to the first instance
so I'm going to delete that
and in here
I'm applying my effect okay
as you can see
but then if you want to get your mask to trouble now
through the main input
you need to go to an option of the mask in here
and click this inject
what you are doing is injecting this mask
through the main input
okay the source
so if I view in here my channels
as you can see
there is no mask okay
but as soon as I press inject
now in here
you have this mask available
okay so now
from this point
my mask is traveling in an implicit way
this is a hybrid
you are using an implicit method
to create an implicit stream okay
so that is the inject option
so as you can see
this is something quite easy to respect
when you are using the mask
but you can easily
get something wrong when you are using over processing
or simply getting a double per multiplication issue
okay so let's apply that now to the CG world
because usually
the CG is coming using many
many channels
and it's something that is getting quite popular now
to get one file containing all the channels
because before
it was tricky to get everything in one single file
because if something goes wrong in one single layer
you have to Bing everything
and then re render everything
just because of one single layer
since open the
XR 2.0 has been released
one of the most critical features of that
is that you can access an open the XR file
and then replace just one single layer
of the whole layer sets
that you have available in the file
so with that
you can get everything in one file
without the uncomfortable issue
of re rendering everything
just because one layer went wrong
so is quite tidy
just to get everything in one file
but you know
is not crucial
or is not better
is just easier
just to manipulate
when you are working
transferring files
just to get everything in one single file done
having 300 files for one single frame
okay so in this case
let's have a look at how many layers I have in here
so I'm going to use my layer
contour sheet
is going to the RGBA
okay so I'm going to show the names
I'm going to center and here you are
I have all those layers available okay
so what's the point of using
now the implicit and explicit
well as you can see
using all those channels is going to massively change
the way I'm going to distribute my notes in the script
so if I want to apply an explicit mask
for a certain feature of the image
imagine that I want to use
for instance
this hand okay
and I want to apply this great
I can always use the great
using the mass that in here
and using this mat from the Alpha okay
so I can change the aspect of that by using the
the great with the classic mask
but you can also use the implicit way in here
and then just select what's the layer
okay in this case is object ID
and then I'm going to use this alpha channel
that is the one storing that part of interest
okay so look at the difference
the difference is in here
you have a graphical representation of what's going on
in here you have to read what is happening here
so you are applying a correction through the RGB
and then using the inversion
which is the sign here
of the channel alpha within the layer
set object ID
and this is an implicit mask
is telling me this batch that I have inside my note
so is this better than this
no I cannot say that
but in here
you're going to get more notes
in here you have a contract version okay
so with these
you have to pay more attention to labeling in here
you can just get things rolling through the view
of the script
okay I will say this is smarter
because you are using less notes
and that is always something good
because you are storing less memory in your script
but is not something that is going to change your life
if you use this for one channel
but if you are using 30 mask
using the explicit method is going to be quite big
while using the implicit method
is just going to have a very tidy structure of masking
so then when you are applying certain operations
for secondary color corrections
that is this kind of isolation of one element
you can just apply for the whole chain of elements
one backdrop
so for instance
color corrections
and I can apply secondary color corrections okay
so all the color corrections you are applying for this
process can be in there
okay so yeah
is this going to be massively clear
that you are using the explicit way
well to be honest with you
not that much
because if I have a look at this image like this
with all those colours and stuff
actually the only channel I'm using
is the only one that is not been displaying in the RGB
so at the end of the day
if I want to understand what's the mat I'm using
I need to go in here
and then I going to the alpha channel
and then I'm going to discover that this mask
but is this invert
so I need to go in here
and then see how okay
I press the invert
because there is no graphical representation
for this invert of the mask in here
so if you want to be really
really explicit
you need to place in here
they invert okay
and then deactivate
of course they invert in here
so this is going to be a real case scenario for
splicit my mask
but this is over processing
because now I'm doing an operation
even if it's a very silly
fast operation
but I'm doing an unnecessary operation
so in here my nice thing is
I can read what's going on in this great
just by understanding this batch
and then seeing what's going on in my masking
okay so I would prefer
from those two
this option okay
another thing that can be good
when you are using an implicit way of masking
is just to specify what area
you are correcting
so for instance
you can say
left and uh
color correction okay
so with this
you can specify what's the area you are correcting
if the object ID
or the logo you are using for
the channel
masking is not specifying
as we did in the previous example of the leaps
okay and here is just a genetic object ID channel
and is using the alpha
but I don't know what's the alpha containing
okay so in here
you can just say
left hand okay
so when you are using the CG
this can save a lot of time
um many many nodes
that as you can imagine
when you are camping multipass
and you have plenty of passes
you can just get a massive script
okay and remember
when we are compositing
there is no award for crashing the computer
because you are using
more node than anybody else
actually a winner is someone that is using fewer nodes
for the same process
still representing the same quality
okay that is optimization
so that's all for this week
if you have any comments
questions or suggestions
feel free to post them in the forums
as always I will reply as soon as possible
this has been Victor Perez for FX PhD
thanks for watching
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.