Visit ComfyUI Online for ready-to-use ComfyUI environment
Apply depth-based blur effect using depth maps for realistic depth of field control in images.
The ProPostDepthMapBlur node is designed to apply a depth-based blur effect to images, enhancing the visual depth and focus of your artwork. This node leverages depth maps to selectively blur parts of an image based on their distance from a specified focal plane, creating a realistic depth of field effect. By adjusting parameters such as blur strength, focal depth, and focus spread, you can control the intensity and transition of the blur effect, making certain areas of the image appear sharp while others are smoothly blurred. This technique is particularly useful for creating a sense of depth and focus in your images, making them more visually appealing and professional.
The input image to which the depth-based blur effect will be applied. This should be a tensor representing the image data.
The depth map corresponding to the input image. This tensor indicates the depth information for each pixel, which is used to determine the blur effect based on distance from the focal plane.
Represents the blur strength. This parameter controls the overall intensity of the blur effect; the higher the value, the more blurred the image becomes. Typical values range from 0.0 (no blur) to 1.0 (maximum blur).
Represents the focal depth. This parameter is used to determine which depth level in the image should remain sharp, while other levels are blurred based on depth differences. Values typically range from 0.0 (foreground) to 1.0 (background).
Represents the focus spread range. This parameter controls the size of the blur transition area near the focal depth; the larger the value, the wider the transition area, and the smoother the blur effect spreads around the focus. Values typically range from 0.0 to 1.0.
Represents the number of steps in the blur process. This parameter determines the calculation precision of the blur effect; the more steps, the finer the blur effect, but this also increases the computational load. Typical values range from 1 to 10.
Represents the focal range. This parameter is used to adjust the depth range within the focal depth that remains sharp; the larger the value, the wider the area around the focal depth that remains sharp. Values typically range from 0.0 to 1.0.
Represents the mask blur strength for blurring the depth map. This parameter controls the intensity of the depth map's blur treatment, used for preprocessing the depth map before calculating the final blur effect, to achieve a more natural blur transition. Typical values range from 1 to 10.
The resulting image after applying the depth-based blur effect. This tensor contains the blurred image data, with certain areas appearing sharp based on the specified focal depth and other parameters.
The depth mask used during the blur process. This tensor represents the adjusted depth map, indicating which areas of the image were blurred and to what extent.
blur_strength
parameter to control the overall intensity of the blur effect. Higher values will result in a more pronounced blur.focal_depth
parameter to specify which part of the image should remain in focus. This is useful for highlighting specific areas while blurring the rest.focus_spread
parameter to achieve a smooth transition between sharp and blurred areas. A larger value will create a more gradual blur effect.steps
parameter for a finer and more precise blur effect, but be aware that this will also increase the computational load.focal_range
parameter to adjust the depth range that remains sharp around the focal depth. This can help in achieving a more natural depth of field effect.mask_blur
value to preprocess the depth map, ensuring a smoother and more natural blur transition.blur_strength
parameter is set to a value outside the acceptable range.blur_strength
parameter to a value between 0.0 and 1.0.focal_depth
parameter is set to a value outside the acceptable range.focal_depth
parameter to a value between 0.0 and 1.0.focus_spread
parameter is set to a value outside the acceptable range.focus_spread
parameter to a value between 0.0 and 1.0.steps
parameter is set to a value outside the acceptable range.steps
parameter to a value between 1 and 10.focal_range
parameter is set to a value outside the acceptable range.focal_range
parameter to a value between 0.0 and 1.0.mask_blur
parameter is set to a value outside the acceptable range.mask_blur
parameter to a value between 1 and 10.© Copyright 2024 RunComfy. All Rights Reserved.