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
in this lesson
we're gonna learn about everyone's favorite topic
lens flares
so even though I'm sure everyone
understands what a lens flare is
I just wanna take a look at a few examples
so whenever there's a very bright
element inside of our shot
there's a high chance that that element will begin
reflecting through our various lens
elements and lead to flaring
so we can see here
we've got some spike flares
we've also got these aperture shapes
uh that are very subtle in this case
now if we take a look at this video here
we can see uh
a much more uh
explicit lens flare
and you just
you can see it looks like there's a 1
2 3 4 5 6 7 bladed aperture on this lens
and as you can see
some of these flares have some very complex
characteristics
as the camera is moving
we're not gonna be able to get into
uh all of these characteristics
as you can see
it's incredibly
uh complex interactions
so how do lens flares come about
well if we take a look at our lens
we can see again
we have our glass elements
and glass and
somethings by nature are reflective and so
what happens is these glass elements are highly treated
highly coated
highly processed to not be reflective at all
because if they are changing the image
then it is not a true picture of what is happening
but for very bright elements
when there's an incredible amount of energy
like with sun or spotlights pointing into our camera
even the best
elements have a small percentage of light reflected
so lens flares are light reflecting inside of our lens
so the number of flares you can technically have is
I believe the number of elements times itself minus 1
or some sort of mathematical equation like that
because for every ray of light that enters
it can reflect off the first element
and then reflect off the filter
or can go through the first element
reflect off the second element
bounce back
reflect off that element
and then go through
or it can bounce again
and again and again
and again and again and again and again and again
so what's happening
is that a certain percentage of this light
is bouncing all over inside of our lens
and it might go through one lens
and bounce off the next lens and go through yet another
another element
bounce off that element
and then finally hit the sensor
so as you can see here
an incredible amount of reflections going on
and the refractive element and the
bending of the light is also affecting these flares
so a pretty complex interaction with a lot of physics
and a lot of re
casting necessary to get photorealistic flares so again
we're not gonna be able to do all of that just yet
what we're gonna focus on are the more
salient elements of the flare
in our case
we do not have such a direct light source
so we're gonna be focusing on these angular flares
that we get when there's a light source
outside of our frame or
uh perpendicular to our frame
so in the cinema world
most of our lenses are quite complex
and the more elements we have
the more flares we can have
so some of our lenses are
a simple four element lenses
and those will exhibit much less lens flaring
then say this kind of a zoom lens
which probably has around 15 elements
now better or high quality
lenses will have less flaring and less light leaking
and lens hoods will also help with flaring
so if you're trying to match
either of those two environments
you can have less light flares or lens flares
one last thing that again
we're not gonna be able to touch too much
because again
this is a more complex interaction
but lens flares do decrease the contrast and decrease
the saturation
you'll notice that
uh our color or our picture here is desaturated
and de contrast or we're
uh moving towards a middle gray
because lens flares
add light without any discrimination of the
objects in our scene
and so we lose contrast
we can get flares
and we lose saturation whenever we have heavy
lens flaring
so that's always something to keep in mind okay
enough talk
let's go into nuke
so to begin with
I like to identify what
the brightest parts of my image are
since those are going to cause flares
so if you have an obvious
object like the sun
uh in this case
we have our reflections
we can turn on zebras
and see we have
a few different areas of intense flaring
if you're not sure what the brightest pixel is
you can use the curve tool
which is a great tool
and we can change the type to Max Luma
and let's just calculate the max Luma for this frame
frame 82 and if you go to the
um max Luma data
you can see that this pixel right here
has the highest color value
so this is likely where uh
one if not all of our flaring is going to appear from
so again that's just an optional
way of actually measuring the color information inside
okay so now that we have that data
let's now track this
so I'm gonna drop in a tracker note
uh because obviously
the flare moves with the brightest element
we could actually do this with the maximum pixel
so let's run this out through our entire scene
I have a feeling that
what's going to jump between this area here
and the front of our ship
uh but I'm not 100% sure
so let's just try and run this for
let's say 50 frames
so let's go 50 to 100
and nuke is gonna run through that
and while it does that
I'm just gonna pause the video
as you can see
this does take a few minutes
so you can uh
save time by tracking what you want
or if you're relatively sure
the maximum pixel is gonna stay consistent
you can use this automated process
okay so as we can see here
our maximum pixel is jumping around
uh to various parts of our image
so we're not gonna use that
so it's now take a look at our tracker
and of course
we have a course completely
dedicated to the tracker node
but it's a relatively easy node to use
especially when tracking these kind of highlights
so I'm gonna decrease the size of the pattern area
increase the size of the search area a little bit
and let us track
so I'm gonna track backwards and then track forwards
so once this tracks through
uh I'll unpause the video and we can continue on
now actually
my track kept failing
so uh the tracker doesn't
really like high dynamic range values or
values outside of the normal 0 to 1 spectrum
so I'm just gonna clamp this before we track it
and then we can remove the clamp later
um and that's just so the tracker has a little bit
easier time with the data
so if you're having trouble tracking uh
a highlight that has high dynamic range information
you might wanna go in and
uh clamp that data
so the track has
uh sort of a
better number space to work in
now at certain points
the ship is gonna begin moving rather quickly
so you might need to increase the size of your search
area or update your
uh pattern location as we had to do here
now I'm just gonna let this track finish out
and once it's done
I'm probably gonna track one more area
I'm gonna track the gun portion of this
so right here
I think I'd like a lens flare coming off this as well
let's cancel this for a second
right this area
so I'm gonna track that
and then let's actually jump in the next lesson
and begin adding in our flare
so once you have both of your tracks or
whatever you want to track tracked
let's now jump into the next lesson and take a look at
how we can add these lens flares with our tracker
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.