Median Rank Filter VFX Masterclass
Tiny dust particles find their way onto nearly EVERY screen. But the dust is usually mixed with wonderful reflections we want to keep in order to help sell a photorealistc composite. And in the commercial world - the client wall almost ask to cleanup that screen in post. So you think - lets use Paint, right? Nope - there’s a better, faster, (non-generative AI) old school way. I’m taking about the unsung hero - the Fusion Rank Filter - You may have never heard of it before. The beauty of the rank tool, which is a median filter, is that it doesn’t average pixels; it replaces them with a nearby surrounding pixel, so you can KEEP SHARP EDGES and still use original reflections to add back on top of a screen insert.
Lets do some Fusion comping together. We’ll planar track the phone, reduce the noise, clean the dust, composite a graphic, add controllable original reflections, and match the original grain. If you’d like to follow along with the 4k footage, you can download it by joining the cutting club at creativevideotips.com/cuttingclub. Thanks to those who joined - get your clip, and lets start compositing in DaVinci Resolve Fusion.
Fusion Linear setup
Media In Nodes - Remove the gamma with the checkbox and choose sRGB or 709 scene for the source color space
Gamut View LUT set to output sRGB to add gamma to the viewer
Add gamut node to end of setup to add gamma to add 709 scene gamma back to the footage
For Log encoded footage I suggest the ACES workflow in this Tutorial
16 bit Float
You can save render times and file size by converting with a change depth node after the media in to work in 16 bit float instead of the Resolve native 32 bit float.
Noise Reduction
This is a paid studio-only feature that uses both a temporal (time-based) noise reduction algorithm and a spatial (single-frame) noise reduction algorithm.
Dust removal + Calculate Regrain
Crop
Reduces work area of pixels to shorten render times.
Use negative values on an inverted crop at the end of the cleanup task and restore the native 4K (or higher) resolution.
Dust Removal
Rank Filter to replace pixels with surrounding pixels
Blur Filter to do an overall smoothing of any super sharp artifacts left over
Planar Track (for the insert, for the clean reflection cutout)
Don’t try to track reflections or occlusions. The reference frame should be LARGEST and SHARPEST.
Steady mode to quality check the accuracy of the tracking data
Operation Mode - Corner Pin - Checkerboard (from fusion reactor)
Enable Motion Blur
Match the aspect ratio of the insert graphic to the physical screen
Matte Control - Rectangle Mask - Corner Radius
Special note - sometimes the mask takes on the Media In 1 resolution. If so, you can change the mask resolution to match the screen graphic so that corner rounding works as expected.
Channel Booleans Add Reflection On Top of insert
Green FG is important - this controls the Blend Slider, which is the transparency for “how much” reflection we want to add. Values can go past 1 for more reflection.
Matte Control
Cutout with Planar Tracker Alpha with Combine Alpha AND Post Multiply
Invert the Crop back to the full 16x9 image
Regrain
Milo Labs - Regrain Reactor Tool soon - Go to We Suck less forums and sign in to get it now
You will need both the .setting file and the fuse (time hold) installed on your machine to make it work
Full Original Plate, DN Plate, Comp Input, Effect Mask (with multiply by mask)
Brightness Contrast to Clip Float values over or under 1
Merge Comp over Original Plate
Touchups
BC lower gain on insert
Blur insert to take the sharp edge off
Saver Node
EXR Render
This has the advantage to only render individual frames if those need adjustments without making an entirely new QuickTime ProRes file.
Loader to do a texas switch and feed the loader directly into the media out for playback on the edit page timeline.