Logo Removal with Lighting Change and Lens Flare Occlusion

Hi all,

Is there an elegant approach to removing the Mustang logo in this shot, or should I be applying brute force?

I was able to get a decent track and apply a projection with 3D Shape, but the lighting change and the lens flare undo a lot of that work for a handful of frames.

I didn’t see anything online that spoke specifically to object removal and restoring underneath a lighting change. Am I missing a good one or is there maybe an opportunity for a pro to weigh-in with a tutorial? I read Randy’s note in a similar post that there would be no magic bullet for their particular lens flare issue and it would take ‘a little bit of this, a little bit of that and a whole lot of manual work.’ Does the same apply here?

@rroth42086 -
if you have a good 3d track, attach a static camera to your 3d shape.
from this static cam you can analyze the projection as if it were a still frame.
find good frames that bookend the bad frames and use motion estimation to develop intermediate frames.
now project your cleanup from a static projector connected to the 3d shape.
render from the tracked camera.

1 Like

If you have a very stable 3D projection of the area and the only thing left is the lensflare - you can experiment with the ‘Average’ node and sizable frame range. That won’t remove the lens flare entirely but will smooth it out, to where a key framed color correction may be feasible to push it back to where it belongs. Anchor the correction on the two ends, and then push down in the center with one keyframe.

To add to it, if you’re on 2025.1 or after, do a frequency separation. The lens flare will be primarily in the low frequency. So do the average on the low frequency and then put the high frequency back on top of it afterwards to protect it from the average operation. (pre-2025 use the Lumps matchbox).

Track in the clean grill of the car using your 3d track. Don’t apply any cc, just use your hero frame and track it in. Then output that from action. Take that ugly un-color-corrected comp and the original plate with the logo and apply the exact same blur to each. Plug the blurred bad comp into the front of a comp node, plug the blurred original into the back of a comp node and set the comp node to “divide” blend mode. Take the output of this comp node, plug it into a comp node as the front, plug your un-color-corrected clean comp into the back (not the blurred one, just straight out of the tracking action), and plug in the matte for the fix, set this comp node to multiply. This will start to get you into the ballpark in terms of color/lighting shifts. Play with the w-linked blurs on the original plate and the un-cc’d comp if you need to.

3 Likes

Here’s a possible solution. Off the YT mp4, so a bit lo-fi: Frame.io

Uses a double-subtraction to isolate the sun flare.

Then you can paint out the logo on the unflared version with good stability. Paint is a whole sequence clone, not frame by frame painting.

Before you comp the flare back on top, since it has a ghost image of the logo, use some pixelspread to in-fill it. It’s low frequency, so that should be fine.

Then combine and unstabilize.

Stabilize is a basic perspective grid 2D invert. With a mask just on the grill, does a decent enough job for this demo. For the full 4K plate you may have to do something better and some finessing. And requires a solid track.

Result of the double sub:

Same frame, isolated flares, before the pixel spread.

5 Likes

Thanks @BrittCiampa @philm, @allklier ,

Jan I think I’m dangerously close with your solution. I have my batch setup just like yours, but having problems with the second subtract unflared node. What’s the theory behind double subtraction here? Blending modes in Flame are uncharted territory for me

1st sub flares

2nd sub unflared (same frame)

Downstream Action node set to Blend

By ‘base exposure’ I assume you’re isolating a frame without the flare? Thanks again, all your feedback was incredibly helpful

I need to check my batch. I think I may have used the ‘switch inputs’ button on that node, which makes a misleading screenshot as the order of operations matters. I can send you my batch if that would help?

The idea here is: the first subtractions takes a freeze frame that has frame without flare. So on the frames where there is flare, this subtractions yield the flare in isolation.

Now that you have the flare isolated, you can subtract it from the original frames, getting you a sequence of the shot without flares. That allows you to do the paint without the shifting exposure.

And finally you put the isolated flare back on top to re-stablishe what was there. The nice thing is that this is a non-destructive operation.

You may be familiar with the ‘stolen grain’ technqiue, which does the same - it removes the grain temporarily, so you can work on the shot, and then adds it back in just as it was.

1 Like

@rroth42086

Setup: Dropbox

Archive: Dropbox (for Flame 2025.1)

2 Likes

Wanted to share an update. Thanks for your setup @allklier - this is a case study for working Action and Comp nodes in ACEScg and transforming downstream to Rec709 before Color Correction. There’s a few pixels of slight discoloration, but it plays. Thanks again all - really learned something huge with this post!

If you’re curious:

Above setup without any Color Transform
Above setup with Rec709 - ACEScg Input Transform + inverted downstream + crude Color Correction

4 Likes

Good point. A lot of comp/blend math works different, often better in linear gamma.

Some tools default to that. In Flame you can choose.

1 Like