how to comp cg behind in camera lens flare?


i have a few shots for my personal project where i would keep the in camera lens flares
and rain drop distortions as they are and would like to comp a cg character behind them.
not sure if this is possible though.

there is no easy separation (like a flat sky color) behind the lens flare and the background
so i’m looking for tutorials, books or theory on this subject.

in district 9 they had a shot where the sun shines down the lens and the actor just breaks
down the door entering one of the prawns home in mocap gear and later they composited the
cg christopher onto him while keeping the in camera lens flare intact from the original plate
above him, if that makes a sense.

normally you would have to recreate the flare but somehow they seem to have managed to
subtract the actor from the lens flare with all of his complex shading variations and keep
that lens flares unusual and beautiful characteristics and comp it over the cg render seamlessly.

to me this is magic.

can’t find any info on this. is this possible? am i just overthinking this?

for my shots i have flares from a fluorescent tube in a parking garage with various architectural
shapes/tonaly different textures and some digital noise.
something like this, except much more darker:
industrial sunflare on flickr
how would i go about to keep the flare and comp a digital character ‘behind’ it?
any tips, info or link for tutorials for any kind of comp app would be appreciated.

1 Like

Do you know that they used the lens flare from the footage or do you assume they did? Couldn’t it just be that the made a fantastic lens flare? If you know that they did use the original lens flare, can you point to a source? Is there a breakdown video? I would be really interested to learn more about this as I have no clue how one would do this.

click on view breakdown reel and the shot i’m talking about is 50-sec in.
they might have used a nice digital flare, i don’t really know.
seems like they’ve kept the original flare though.

the question is still valid.
is it possible to keep the original in camera scratch/flare/smudge effects
to comp a cgi character behind it? or the simple answer is just no.

Commercial lens flare generators are actually amazing, done wonders for JJ’s Star Trek as they were generated in 3d. In camera was not an option.
I don’t recall the district 9 breakdown but I would doubt that they bothered to retain practical lens effects. Much easier to reproduce it no magic required.

It is called rotoscoping.

You duplicate your source layer and place it on top of the original.
On the duplicate layer you trace out all parts that you want to be considered “foreground”.
Then you can layer in something between the two layers effectively behind the in camera lens flare.

If possible, I would always shoot real footage without flare, then digitally add flare effects i-f you think they actually add to the shot.

I have a somewhat diluted view on “flare,” because, in my days as a commercial photographer, the slightest hint of “flare” is one thing that was certain to cause your negative to hit the wastebasket beside the editor’s desk. And the reason was actually pretty simple: “lens flare doesn’t print.” It prints as a white streak on the paper, which immediately catches your eye, and it wipes-out detail underneath and nearby. So, for those same reasons, I’d keep flare completely out of any film that you have. Add the flare with digital compositing such that you can precisely control what the flare does … whether or not “what the flare does” is physically-accurate or not.

Within the (defocused) region marked by the flare, the flare will inject its own color, desaturate the colors beneath it, greatly reduce contrast … and you need precise control over all of these things, ergo “in post.”

According to the lens flare was actually in-camera.

do you know of any tutorials demonstrating this roto technique with lens flares?

thanks for input guys, appreciate it.

Don’t know of any tutorials specifically about rotoscoping lens flare, but rotoscoping itself is just horribly tedious. In the case of lensflare, it is not so bad since it it mainly straight lines. In the movie clip editor, you can make a feathered rectangle for each of the lines of the lens flare. Then you have to keyframe those rectangles to follow the flare. I don’t know how good it will look though.

i have posted the same question on cgtalk and one guy gave an interesting answer:

Originally Posted by kyrgr

			<i>Think about it as if you want to apply

a similar color LUT with that of the
lens flare regions to underlying parts
of a CG object. I can think of some
ways. The important concept is that
nothing is " behind" the lens flare,
from a compositors point of view,
it is just colorwise affected or distorted
by it. Remember that if keyer is not
maybe find edges or blur edges could
be your friend in this case

i find this to be more in line with what my gut feeling
is telling me, that this could be acchieved with comp
tricks, adding plates, differentiating, creating masks &
pixiedust with different blending layers.

the reason this thing is bugging me is that i try to think
of pixels, colors and shapes differently than i do now
since i have found out about a nice trick in one of
nicolo zubbini’s (texture artist on tears of steel) tutorials on
using the wavelet decompose plugin in gimp to get various
slices or frequencies of the image.

Recent Star Trek 3d couldn’t record lens flares in stereo. Had to be added in post.

Oh, ok. I read something about the dp of into darkness shining with flashlights into the lens to create the ridiculously long horizontal flares. Could be all bs though.

I’m sure that I heard the stereo team on fxguide talking about recreating it all, due to inequalities between offset cameras.