Image Image Image Image Image
Scroll to Top

To Top




In Nuke

By antiform

Nuke tips – cleaning out crap

On 01, Feb 2017 | In Nuke | By antiform

Removing dirt or tracking markers semi automatic!

In an attempt to make this site come to life, I’ll post some quick tips now and then. So here’s the first attempt.

Not seldom does shots land on my desk with blemishes like dirt on the lens. This last one was particularly bothersome, since it featured a zoomed-in eagle, a changing background and a lens full of water droplets.

The droplets are static, which makes everything easier. But since the background is changing so much, a paint node with cloning brush strokes didn’t work at all. Trust me, I tried it.

But there is a way to fix this, and getting pretty consistent results. Enter a free plugin called “Extend Egdes”. It is meant for cleaning up scruffy greenscreen edges, and what it does is to extend the last pixel before a matte, and repeating it outwards.

So, I already had a matte from the clone brush attempt, so I set the output to none and premult by alpha to get the strokes out as a matte I could use.

Now for the trick: Extend Edges is built for extending edges outwards, but we need it to go inwards. Here’s how to trick it into doing what we want: Branch of the alpha from the paint, invert it and shuffle in the orignal RGB from the plate. Premultiply and apply Extend Edges. Extend it as much as you need. Shuffle the original, non-inverted  alpha from your paint node in again, and premult again.

Now you’ve got a plate with spots defined by the alpha, colored by the last pixels surrounding the orignal spot. Blur this to get a smoother color, regrain them to match the origial plate and merge back over the spotty plate. Voila!

Since this is a bit of a hack and Extend Egdes probably wasn’t written with this technique in mind, it is very crash-prone, so save like there was no tomorrow, and disable Extend Edges until your roto/matte is complete. It will render fairly fast however, as long as it doesn’t crash. Good luck!

Tags | , ,