ComfyUI > Nodes > Nuke Nodes for ComfyUI > Nuke Defocus

ComfyUI Node: Nuke Defocus

Class Name

NukeDefocus

Category
Nuke/Filter
Author
sumitchatterjee13 (Account age: 2375days)
Extension
Nuke Nodes for ComfyUI
Latest Updated
2025-12-08
Github Stars
0.03K

How to Install Nuke Nodes for ComfyUI

Install this extension via the ComfyUI Manager by searching for Nuke Nodes for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Nuke Nodes for ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Nuke Defocus Description

Simulate depth-of-field effect with adjustable blur intensity and depth map support for realistic depth representation in artwork.

Nuke Defocus:

The NukeDefocus node is designed to simulate a depth-of-field effect, which is a common technique in photography and cinematography used to focus on a specific subject while blurring the background or foreground. This node allows you to apply a defocus blur to an image, creating a realistic depth effect that can enhance the visual appeal of your artwork. By adjusting parameters such as defocus amount, aspect ratio, and quality, you can control the intensity and style of the blur. Additionally, the node supports the use of a depth map to create variable blur effects based on the distance from the focus point, offering a more dynamic and realistic representation of depth. This feature is particularly useful for creating images with a sense of depth and focus, making it an essential tool for artists looking to add a professional touch to their compositions.

Nuke Defocus Input Parameters:

image

The image parameter is the input image to which the defocus effect will be applied. It serves as the base layer for the depth-of-field simulation, and the quality of the input image can significantly impact the final result.

defocus

The defocus parameter controls the intensity of the blur effect. It is a float value with a default of 1.0, a minimum of 0.0, and a maximum of 20.0. A higher value results in a stronger blur, simulating a shallower depth of field.

aspect_ratio

The aspect_ratio parameter adjusts the shape of the blur effect. It is a float value with a default of 1.0, a minimum of 0.1, and a maximum of 3.0. This parameter allows you to stretch or compress the blur, which can be useful for artistic effects or to match the aspect ratio of the image.

quality

The quality parameter determines the level of detail in the blur effect. It offers three options: "low," "medium," and "high," with "medium" as the default. Higher quality settings produce more detailed and smoother blur effects but may require more processing time.

method

The method parameter specifies the shape of the blur effect. It provides three options: "gaussian," "disk," and "hexagon," with "disk" as the default. Each method offers a different visual style, allowing you to choose the one that best fits your artistic vision.

mix

The mix parameter controls the blending of the original image with the blurred version. It is a float value with a default of 1.0, a minimum of 0.0, and a maximum of 1.0. A value of 1.0 applies the full blur effect, while a value of 0.0 retains the original image without any blur.

depth_map

The depth_map parameter is an optional input that provides a grayscale image representing the depth information of the scene. When used, it allows the node to apply variable blur based on the distance from the focus point, creating a more realistic depth-of-field effect.

focus_distance

The focus_distance parameter is an optional float value that specifies the distance at which the image should be in focus. It has a default of 0.5, a minimum of 0.0, and a maximum of 1.0. This parameter is used in conjunction with the depth map to determine which areas of the image should remain sharp.

Nuke Defocus Output Parameters:

IMAGE

The output of the NukeDefocus node is an IMAGE that has been processed to include the depth-of-field blur effect. This output image reflects the adjustments made based on the input parameters, providing a visually enhanced version of the original image with a realistic depth effect.

Nuke Defocus Usage Tips:

  • To achieve a realistic depth-of-field effect, use a depth map to guide the blur application, ensuring that the focus distance is set appropriately to highlight the subject of interest.
  • Experiment with different blur methods such as "gaussian," "disk," and "hexagon" to find the style that best complements your image and artistic intent.

Nuke Defocus Common Errors and Solutions:

Depth map size mismatch

  • Explanation: The depth map provided does not match the dimensions of the input image, causing an error in processing.
  • Solution: Ensure that the depth map has the same width and height as the input image. You can resize the depth map using image editing software or adjust it programmatically to match the input image dimensions.

Invalid defocus value

  • Explanation: The defocus value is set outside the allowed range, leading to unexpected results or errors.
  • Solution: Check that the defocus value is within the range of 0.0 to 20.0. Adjust the value to fall within this range to ensure proper functionality of the node.

Nuke Defocus Related Nodes

Go back to the extension to check out more related nodes.
Nuke Nodes for ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.