Visit ComfyUI Online for ready-to-use ComfyUI environment
Simulate depth-of-field effect with adjustable blur intensity and depth map support for realistic depth representation in artwork.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.