Depth Map Blur (UTK):
The Depth Map Blur (UTK) node is designed to apply depth-based blur effects to images using depth maps, enhancing the visual depth and focus of your images. This node allows you to simulate a realistic depth of field effect by selectively blurring parts of an image based on their depth information. By leveraging depth maps, it can keep certain areas of an image sharp while blurring others, mimicking the way a camera lens focuses on a subject while blurring the background or foreground. This capability is particularly beneficial for creating artistic effects, emphasizing subjects, or simulating photographic techniques in digital art. The node's main goal is to provide a flexible and powerful tool for artists to control the focus and blur in their images, enhancing the overall composition and storytelling through visual depth.
Depth Map Blur (UTK) Input Parameters:
image
The image parameter represents the input image that you want to apply the depth-based blur effect to. It is a tensor that contains the pixel data of the image. The quality and resolution of this image will directly affect the final output, as the blur effect is applied based on the depth information relative to this image.
depth_map
The depth_map parameter is a tensor that provides the depth information for the corresponding input image. It indicates the distance of each pixel from the camera, which is used to determine the areas of the image that should be blurred or remain sharp. The depth map should be aligned with the image dimensions for accurate results.
blur_strength
The blur_strength parameter controls the overall intensity of the blur effect. A higher value results in a more pronounced blur, while a lower value keeps the image closer to its original sharpness. This parameter allows you to adjust the visual impact of the blur effect to suit your artistic needs.
focal_depth
The focal_depth parameter specifies the depth level in the image that should remain sharp. It determines the focal plane, where objects at this depth will be in focus, while objects at different depths will be blurred. This parameter is crucial for directing the viewer's attention to specific parts of the image.
focus_spread
The focus_spread parameter defines the range around the focal depth where the transition from sharp to blurred occurs. A larger value results in a smoother and wider transition, creating a more gradual blur effect around the focal area. This helps in achieving a natural-looking depth of field.
steps
The steps parameter determines the number of iterations used in the blur process. More steps result in a finer and more precise blur effect, but also increase the computational load. This parameter allows you to balance between performance and the quality of the blur effect.
focal_range
The focal_range parameter adjusts the depth range around the focal depth that remains sharp. A larger value increases the area that stays in focus, providing more flexibility in controlling the depth of field effect. This parameter is useful for emphasizing broader areas of interest in the image.
mask_blur
The mask_blur parameter controls the intensity of the blur applied to the depth map itself. This preprocessing step helps in smoothing out the depth transitions, leading to a more natural blur effect in the final image. It is essential for reducing artifacts and achieving a seamless depth-based blur.
Depth Map Blur (UTK) Output Parameters:
image_result
The image_result is the output tensor containing the image with the applied depth-based blur effect. This image reflects the adjustments made based on the input parameters, showcasing the enhanced depth and focus as intended by the artist.
mask_result
The mask_result is a tensor that represents the depth mask used during the blur process. It provides insight into how the depth information was utilized to achieve the final blur effect, serving as a useful reference for understanding the depth-based adjustments made to the image.
Depth Map Blur (UTK) Usage Tips:
- Experiment with different
focal_depthandfocal_rangevalues to highlight specific subjects or areas in your image, creating a strong focal point. - Use a moderate
blur_strengthto maintain a balance between artistic blur and image clarity, ensuring that the effect enhances rather than overwhelms the composition. - Adjust the
focus_spreadto control the smoothness of the blur transition, which can help in achieving a more natural depth of field effect.
Depth Map Blur (UTK) Common Errors and Solutions:
Mismatched Image and Depth Map Dimensions
- Explanation: The dimensions of the input image and depth map do not match, leading to incorrect blur application.
- Solution: Ensure that the depth map is resized to match the dimensions of the input image before processing.
Invalid Blur Strength Value
- Explanation: The
blur_strengthparameter is set to a non-positive value, which is not valid for applying blur. - Solution: Set the
blur_strengthto a positive integer to ensure a proper blur effect is applied.
Depth Map Not Normalized
- Explanation: The depth map values exceed the expected range, causing incorrect depth calculations.
- Solution: Normalize the depth map values to a range between 0 and 1 to ensure accurate depth-based processing.
