Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
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
welcome to this new Pixel fudger video
today we have an epic showdown between the
said the focus node
the new bouquet node and will also throw in
pxfid focus into the mix
we are gonna do a more creative type of defocus
something that simulates the effect of a tilt shift
lens if you are interested in a more
traditional depth of field
defocus based on a depth channel
this will come in a separate video very soon
so make sure you're subscribed to the channel
so you don't miss it
alright so I have a beautiful photo of a city here
I've made sure to convert it to linear properties
so all my highlights are
now nice and punchy around 10 12
13 something like that
so that's gonna really bloom nicely when we defocus it
and I also have
an animated gradient that I've built with a
couple roto shapes here just to give us
a control channel to drive the amount of the focus
I've combined the two images together
with a copy node by copying the alpha
of my roto to the depth layer
the default depth dot Z layer that's built into nuke
and that's gonna
make both images travel through the same pipe here
and we're gonna create a Z defocus node
and a Boca node
and we're gonna use the main input for Zeti
Focus is called image as it should
and bouquet node is using the input input
so that's a little bit weird
for a name but that's fine that's the main input here
all right so we're gonna connect both nodes
like so
and now we have a few items to adjust on both sides
so first we got to pick
which channels we want to defocus
by default zdfocus picks all
I don't want to do all channels I just want to do RGBA
and
here on the bouquet side it's already set to our GBA
that's fine then we're gonna pick
which channel we want to use for the control channel
so both are set by default to
depth Z so that's fine here and that's fine here also
next on the ZD Focus side we have to pick
which type of mask we want to use
so for this demo we want to use a direct
mask so that's going to
directly drive our defocus by using the
control channel
we don't need to adjust that here on the bouquet side
next we need to adjust the focus plane
so that's the
area of the control channel that's gonna be sharp
so we want the black to be sharp
so we want the focus plane set to zero
on the bouquet side the focal plane is set to 100
by default we're gonna change that to
0
and next we need to adjust the size
we want a big old defocus
we want lots of defocus in the corners
so I'm gonna increase that to a big number like 80
pixels and notice that my defocus is not that big here
that's because I'm hitting the
maximum limit here
so I need to increase the maximum to at least 80
I'm gonna give myself a bit of headroom
and increase it all the way up to 100
on the bouquet side
the size is called multiplier and I'm gonna
change that to 80
so now I have a very similar result on both
sides all right cool now we can start comparing so
right off the bat
I can tell that bouquet is much
slower I've made sure to enable
render all lines
on both
viewers so zooming in and out won't affect performance
so if I render both their their
nuke renders
both viewers one after the other so we can compare
the the speed and ZD Focus renders much much faster
and bouquet because mainly
ZD focus is GPU accelerated
and bouquet isn't bouquet is 100% CPU bound so
this result can be
very different from one machine to the other
it really depends on how fast your CPU is
compared to your GPU alright so both
renders are done so I can look at the
difference in quality
they look
pretty similar on the surface but when you start
paying attention and zooming into details
can see they're not totally identical so on the
bouquet side the result is pretty smooth
and if you look on the ZD Focus side
it's pretty steppy it's pretty jittery or frame skippy
for example if you look at this area here
if I toggle between frame 22 and 23 you can see the
circle is not moving
where is it on the bouquet side
it is moving on this side it is changing as it should
so when your
renders are really steppy with a ZD focus note
it means your
depth layers aren't set up properly
you can see that more clearly if we turn
off automatic layers spacing
and set the layers to a really low number
like say 10 layers
so now this is going to render really fast
so that's really great for performance
but the quality suffers quite a bit
you can see when we
playback in motion
we can actually see the boundary between each layer
so if we look at this we can see
different defocuses and the transition from one band to
another so this is great for performance
but this is terrible for quality
so
adjust this
the best way to do that would be to change our output
to layer setup
and now we can see the actual bands
individual bands here
and this is
not optimal at all
so one way to optimize this
would be to bring our maximum down to the same
value as our size
so that's going to optimize this a little bit
so this will create
more bands for the same coverage
and then we can increase the number of bands of course
so for this we need to increase the bands quite a lot
about 150 so we don't see the transition from one band
to the other and now
if we buffer just a few frames we should see our
little bouquet circle will progressively change size at
every frame instead of skipping frames
so we won't see
the banding artifacts
so that's great we fixed our
our problem but now our render is much
slower it's a
three times slower than it used to be at 50 bands
you can see that the focus now is
slower than it used to be
so now in terms of speed we're pretty much similar
another thing we can compare
is if the results actually match between each other
so if we compare a Z Focus
and Boca
here you can see that there is a difference
so for some reason
Boca as an arbitrary
maximum limit that I can't seem to get away from
so no matter what I change I cannot reach
the actual size that I'm supposed to get
in the corners here
so it's not a true linear match to my roto values here
this is a bit annoying this bouquet is
too small compared to what it
should be according to the
control channel
so this is quite annoying
I think this is because I'm hitting the limit of
the maximum kernel size here
but I can't make this bigger if I
try to put a bigger number
it caps out at 256
so I'm not sure what the solution is
if you know the answer put it in the comments below
I would love to know
alright so that's
another difference between both bouquet and ZD focus
now that we have pretty similar results let's compare
bouquet shapes so right now both are set to circles
we can change that
so for right now we're set to disc here
on the zdfocus side
if we change that to bladed then we'll have a little
pentagon
if we do that on the bouquet side that's in the
kernel tab and kernel type
circular means circles of course
and aperture blades will give
us little shapes
and if we change that to
five blades we'll get little pentagons as well
if you want to inspect
the bouquet shape more closely you can go in the
output type and pick filter shape
and on the Z focus side
you can pick
output
filter shape setup
so now we're comparing the
bouquet shape generator on both sides
so on the
Z focus side you can adjust the roundness to make the
edges straight or round
you can adjust the
inner brightness to give your bouquet
a little bit more of
a ring type of effect
so if we go to our result now we can see
we've got a little ringy bouquet
and you have a few other
adjustments so you can adjust the
thickness of the ring and so on
the bouquet side we have similar controls
so if I adjust the curvature I can make the bouquet
round or flat
but I can't seem to get really flat edges here
so I need to go to negative curvature
but
it's always kind of a bit wonky
and it seems to be worse if I have less blades
so if I want a true triangle
there's no way to do an actual triangle here
which
you know arguably is not that common but it does exist
and I can't seem to get straight lines here
so this is a bit
annoying but if we're stick with a little pentagon
it's not too bad I guess
but you hit the limits pretty
early and if you want to have a ring effect
that would be under
optical artifacts and spherical aberration
and it does kind of a center
that's darker but it's a different type of shape
so we can't really match them perfectly
another thing that's
available here in bouquet that's not is
chroma aberration
so if we go back to our result
and enable
chroma aberration
or chromic aberration as they call it
and you can see
does a little chroma aberration type of effect on the
edge here
you can do that natively with a
bouquet generator and ZD focus
but you could fake that afterwards with a
chroma aberration
after the zdfocus or feed a
bouquet shape that already has chroma aberration
built in we'll get to that in a second
all right so let's turn off Chrome laboration for now
so if we look at our results
now of course
they won't be exactly the same
because I'm not using the same
bouquet shape but they are
fairly similar
if you're not satisfied with the bouquet generator in
either
zdfocus or bouquet
you can feed it your own bouquet image
so here I have a little image 255 by 255
I'm gonna
connect that to the filter input of the ZD focus node
and the kernel input of the bouquet node
and in zdfocus I'm gonna switch that to
filter type image
and for bouquet I'm gonna do kernel type input
you can see they look similar
but one is upside down compared to the other
so if we want a true match between both
nodes we need to put a mirror node
set it to vertical flip and put that
in between our image and our
kernel input here
so now we have a
true match between them
if we didn't have the actual
upper limit that I'm hitting in the corners here
they would be very very similar if not
identical images here
so this is
pretty close so you can use obviously
custom shapes here little hearts or whatever to
have a creative output
but you could also capture the true bouquet
of a true lens
so this is a photograph of a
tiny light source that was
shot out of focus
and this is the actual real shape of the
real Iris of a real lens
and we can use that instead here
and now we have
the
actual
bokeh of a real lens
that's synthetically applied to an image
so if you need to match a true lens
you could shoot a bouquet sample and use that in your
filter or kernel inputs here
note that my bouquet sample here has
chroma aberration built in
so we want to have that in our
result as well
so bouquet does that natively
we don't have to adjust anything
we do have the little red Halo around our bouquet shape
if we look at the ZD focus node
we don't have the chroma aberration
that's because it's using the alpha channel as the
filter we could click E
use input channels to
use the individual RGB channels to defocus our image
and it looks a little bit wonky
that's because it's using an impulse filter
to resize our defocus
so we can uncheck
legacy resize mode and use a qbic filter
and that's gonna be much smoother on the edge
so I'm not sure why legacy is turned on by default
this should be off by default
maybe a little update to our
preferences should be in order here
so let's compare
both sides now we have very very close results
bouquet still is capped
to some random maximum here so that's very annoying
but otherwise they are
almost interchangeable
in terms of result and render speeds
mostly because Foundry doesn't give us any
blending controls of the depth layers
if we did have blending controls
then we could reduce the amount of layers quite a bit
still get a very acceptable result
and speed up our renders massively
unfortunately we don't have that here in the ZD Focus
if there was only a way
to do that that would be awesome but wait there is
we can use PXF ID Focus so let's do that instead
I'm gonna put bouquet aside
and we're gonna compare ZD Focus to
ID Focus really quick just to see
what's the difference between them
alright so now we've replaced our
bouquet node with an pxfiid focus
that's a pixel fudger gizmo
of course it doesn't come with nuke
you have to install it separately
we connected our image input to our
photo of the city and we've connected the map input
to our control channel
and by default here we've got a
size of 20 let's make that bigger to 80 to match
and already we have a pretty
similar result
the main benefit here is that we can get away with
much fewer bands of the focus
so by default we have 10 bands here called slices
if we turn off the overlap completely
we'll be able to see our bands very clearly
so here we can see the transition from one
band of defocus to the next
to the next here
there is zero feathering between our bands
so we need to adjust the overlap
if we adjust the overlap a little bit
to like let's say point two
then we'll have a result that's very similar to
the zdfocus feathering between the bands
so we can see the transition still
it's a bit smoother but it's not invisible
however unlike zdfocus
we have full control on our feathering here
so we can increase the feathering a lot
so if we crank that up to the maximum of 1
then we have a full feather
between each band and it becomes much harder
to spot the line between each band
so even though I only have 10 bands here
which is very low
it's almost usable as is
however you can kind of see both
values blended together here
so maybe 10 bands is a bit extreme
let's make that 25 bands
just to have a bit more precision
and now we get a result that's pretty smooth and
almost interchangeable with our 150 bands here
so this is gonna render much much faster
so if I turn off set the focus for a second
and just update the ID Focus
you can see it's rendering at 11 frames per second
so it's really really fast here
so this is so much faster than ZD Focus that I would
just for that I would pick pxf ID Focus
there's also other benefits here besides the speed
we have a more complete bouquet generator
so the built in bouquet generator has more options
compared to zdfocus
and just like zdfocus and Boca we can feed it our own
shape if we're not satisfied with this
we have the Boca input
there you go so we can feed it our own Boka
so there you go
that was our epic battle between
the bokeh node the ZD focus node and PXF ID focus
if you want to achieve this type of creative defocus
that's similar to a tilt shift lens where you
control the defocus with a random
control channel
I would definitely use PXF ID focus
if only just for the speed
improvement for the performance
if you don't have Pxfid Focus I would use zdfocus
I would not use the bouquet node because of the
upper limit on the control channel
so let's compare the features of our different tools
here in a nutshell
Zdfocus Bouquet and ID Focus all have variable
size d focus that's great
zdfocus has a variable
number of bands which is great to optimize performance
so does ID Focus
but ID Focus enables you to adjust the overlap
between the bands
which enables you to lower the number of bands
quite a bit makes the render
much much faster
so that's the main benefit I think of ID Focus here
you can generate your own bouquet shape
and all three of them
ID Focus has the most complete bouquet generator
you can do straight corners
rounded corners noisy bouquet
chrome aberration
so it does it does almost everything
bouquet and Z Focus can generate bouquet shapes
but they're much more limited
all of them have a
custom bouquet input
so if you're not satisfied with the bouquet shapes
you can feed your own
and ZD Focus and ID Focus are GPU accelerated and
bouquet isn't so that's a difference there
between bouquet and the other two
so there you go
that was an
overview of the different tools you can use for a
manual tilt shift type of effect
if you want to do a
depth based defocus
on a full CG image for example
stay tuned there will be another video
about that soon
so make sure to subscribe to the channel
know when that's gonna happen
in the meantime
have a good one and I'll see you in the next video
goodbye
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.