Fridays for Fusion: ZDefocus Adds a More Practical Z-Depth Blur

Millolab’s ml_ZDefocus macro processes normalized Z-buffers, visualises the focus region and reduces edge artefacts in Fusion.
A close-up of elegant chess pieces crafted from pale materials, set against a softly illuminated backdrop. The warm, glowing circles of light create a dreamy atmosphere, while the blurred focus enhances the sense of depth and intrigue in this exquisite game.

Fusion already includes DepthBlur, but its handling of Z-depth defocus leaves room for alternatives. Millolab, also known as Emilio, has released ml_ZDefocus, a Fusion macro intended to produce more controllable depth-dependent blur while dealing with the edge artefacts that so often turn a respectable Z-pass into a halo generator.

A sleek digital interface displaying various controls for ZDFocus software. The window features a dark background, with neatly arranged sections labeled'Controls,' 'Advanced,' and 'Settings.' Each section showcases intricate sliders for parameters such as 'Blur Size,' 'Depth of Field,' and 'Sharpen,' all set against a sophisticated layout that emphasizes usability.

The macro accepts either depth data stored in the main image’s auxiliary channels or an externally connected depth map. When a Z-buffer is present in the AUX channels, ml_ZDefocus reads it directly from the primary input. Separate maps can be connected through the additional input.

Input images must contain an alpha channel. The Z-buffer must use a normalised range with the far plane represented by a value of 1. Depth maps that do not already meet this requirement can be normalised inside the macro. Controls for working with layered images are located in Fusion’s Common tab.

Focus inspection and Z-buffer processing

ml_ZDefocus can display the incoming depth map after its internal Z-remapping and falloff processing. During forum testing, users requested a clearer indication of the active focus region. Millolab subsequently restored the Sharp Zone display, which visualises the area currently intended to remain sharp.

Highlight controls were added in another update. These provide additional control over bright areas affected by the defocus operation, a useful addition when depth blur starts converting every specular highlight into a small weather system.

The macro also includes edge preprocessing and a Reduce Artifacts function. Version 1 revised the artefact-reduction stage and introduced several interface adjustments. A forum tester specifically noted the usefulness of the edge preprocessing, although that remains an individual assessment rather than a controlled comparison.

A vibrant lounge area filled with oversized bean bags in bright colors, including green, purple, and blue, arranged around a circular, cozy patch of soft grass. Above, artistic pendant lights hang from a sculptural ceiling design resembling interwoven branches, adding warmth to the modern interior.

Variblur at the centre

The actual blur operation is based on Fusion’s Variblur tool. This means ml_ZDefocus does not support custom blur kernels. Millolab confirmed that this limitation follows directly from the underlying Variblur implementation rather than merely from an omitted interface control.

Z-buffer preparation relies partly on CustomTools. Alternative approaches were tested during development but reportedly performed more slowly. Version 0.2 introduced a small performance improvement, although the macro was still described by one tester as slower than a simpler defocus macro. Millolab stated that further acceleration would require a different method of processing the Z-buffer.

Release status

The development thread is up to Version 1, followed by an Official Release build. An initial official package contained a bug and was replaced, so anyone who downloaded the first release should obtain the reupload. A version 0.1 user manual is also available from the thread. Millolab has mentioned a possible Reactor submission, but no release is confirmed.

The current ml_ZDefocus .setting file and manual can be downloaded from the We Suck Less development thread. As with any community tool, it should be tested on representative shots before being introduced into an active production.