Depth from Focus Plugin for The Foundry Nuke

Ask for a demo
 Depth from Focus
2D to 3D Suite
Also available for After Effects
Depth from Focus

Technical requirements

  • The Foundry Nuke version: 6.2 or above
  • Memory requirements: 2 GB minimum, 4 GB recommended
  • Works with: Depth Brushes and Depth Propagation, also generates particle mask for Stereo Generator
  • Main use cases: depth key frame creation and mask generation for small particles (rain drops, snowflakes, etc.)

Depth from Focus

YUVsoft Depth from Focus uses edge blur information to create a depth map for your input 2D image. Depth from Focus yields plausible depth maps for scenes with snow, rain, explosions and underwater videography, as well as for scenes with out-of-focus content. In other words, this plugin is designed to process particularly difficult scenes that stymie other tools and to dramatically reduce the required amount of manual work. There is also a special plugin called Particle Detection which is based on the Depth from Focus engine and was specifically designed to process scenes with large numbers of raindrops or snowflakes, because these depth maps must avoid a flat appearance of the resulting stereo video.

Key features of YUVsoft Depth from Focus are:

  • Automatic depth map creation
  • Processing of scenes with snow, rain, explosions and underwater footage
  • Processing of scenes with defocused background
  • Automatic determination of sky boundaries using Sky detection mode

YUVsoft Depth from Focus in use:

Rain mask

The rain mask created using YUVsoft Depth from Focus, you then can combine the result with a depth map created manually or using another tool like YUVsoft Depth Effects.


You can choose from three presets with optimum parameter values: Standard, Sharp edges and Smooth edges. In addition, you can set all the parameter values manually using Custom mode.

The following multiview image was obtaineed with the help of rain mask from YUVsoft Depth from Focus:

The multiview image obtained with Stereo-to-Multiview, Depth Effects and Depth from Focus plugins

The multiview image obtained with YUVsoft Stereo-to-Multiview, YUVsoft Depth Effects and YUVsoft Depth from Focus plugins



The Spatial smoothness parameter allows you to assign the same depth to the entire object (high parameter values) or to assign different depth values to various parts of the same object (low parameter values). This parameter value affects the level of detail and determines the apparent uniformity of the resulting depth map.

The Color smoothness option governs depth smoothness for areas with similar color.

The Global smoothness option allows you to expand the smoothness range of resulting depth maps compared with standard presets. You can choose among three Global smoothness modes: Decreased, Normal and Increased. Increased global smoothness mode yields fuzzy depth maps with blurry edges, and Decreased global smoothness yields clear depth maps with rigid boundaries.

Depth from Focus options

Depth from Focus options


The Foundry Nuke composition for Depth from Focus plugin

The Foundry Nuke Depth from Focus plugin interface


Depth from Focus and Particle Detection plugins yield fine results when you want your final scene to be spectacular but that scene is particularly difficult to process—such scenes might include rain or snow, explosions or underwater footage.

Ask for a demo


See also: