ComfyUI > Nodes > WAS Node Suite > Image SSDO (Direct Occlusion)

ComfyUI Node: Image SSDO (Direct Occlusion)

Class Name

Image SSDO (Direct Occlusion)

Category
WAS Suite/Image/Filter
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Image SSDO (Direct Occlusion) Description

Enhance image realism with accurate shadows and highlights using SSDO technique for improved visual depth and lighting effects.

Image SSDO (Direct Occlusion):

Image SSDO (Direct Occlusion) is a node designed to enhance the realism of your images by simulating the effects of Screen Space Directional Occlusion (SSDO). This technique calculates how light interacts with surfaces in a scene, taking into account both the depth and color information of the image. By doing so, it creates more accurate shadows and highlights, which can significantly improve the visual depth and realism of your artwork. The node processes each image by considering its depth map and applying occlusion effects based on specified parameters such as strength, radius, and specular threshold. This results in a composited image with enhanced lighting effects, an occlusion map, an occlusion mask, and a light source map. The primary goal of this node is to provide artists with a tool to add sophisticated lighting effects without needing to manually paint shadows and highlights, thereby saving time and improving consistency.

Image SSDO (Direct Occlusion) Input Parameters:

images

This parameter takes a list of images that you want to process. Each image should be in tensor format. The images serve as the base upon which the occlusion effects will be applied.

depth_images

This parameter takes a list of depth maps corresponding to the input images. Each depth map should be in tensor format. The depth maps are used to calculate how light interacts with the surfaces in the image, which is crucial for generating accurate occlusion effects.

strength

This parameter controls the intensity of the occlusion effect. A higher value will result in more pronounced shadows and highlights, while a lower value will produce subtler effects. The value should be a float, typically ranging from 0.0 to 1.0, with a default value of 1.0.

radius

This parameter determines the radius of the area around each pixel that is considered when calculating occlusion. A larger radius will result in softer, more diffused shadows, while a smaller radius will produce sharper shadows. The value should be an integer, with a typical range from 1 to 20, and a default value of 10.

specular_threshold

This parameter sets the threshold for specular highlights. Pixels with intensity values above this threshold will be considered as light sources. The value should be an integer, typically ranging from 0 to 255, with a default value of 200.

colored_occlusion

This boolean parameter determines whether the occlusion effect should be colored or grayscale. If set to True, the occlusion will be colored, blending with the original image colors. If set to False, the occlusion will be in grayscale. The default value is False.

Image SSDO (Direct Occlusion) Output Parameters:

composited

This output is a tensor containing the final composited image with the occlusion effects applied. It combines the original image with the calculated occlusion to produce a more realistic rendering.

occlusions

This output is a tensor containing the occlusion map, which represents the areas of the image where occlusion effects have been applied. This map can be used for further processing or analysis.

occlusion_masks

This output is a tensor containing the occlusion mask, which is a binary map indicating the areas of the image that are affected by occlusion. This mask can be useful for isolating occluded regions.

light_sources

This output is a tensor containing the light source map, which highlights the areas of the image identified as light sources based on the specular threshold. This map can be used to understand the lighting dynamics in the scene.

Image SSDO (Direct Occlusion) Usage Tips:

  • To achieve more pronounced occlusion effects, increase the strength parameter. However, be cautious as too high a value can make the image look unnatural.
  • Adjust the radius parameter to control the softness of the shadows. A smaller radius will produce sharper shadows, while a larger radius will create softer, more diffused shadows.
  • Use the specular_threshold parameter to fine-tune the detection of light sources in your image. This can help in achieving more accurate lighting effects.
  • Experiment with the colored_occlusion parameter to see if colored or grayscale occlusion better suits your artistic vision.

Image SSDO (Direct Occlusion) Common Errors and Solutions:

"IndexError: list index out of range"

  • Explanation: This error occurs when the number of depth images does not match the number of input images.
  • Solution: Ensure that the list of depth images is the same length as the list of input images.

"ValueError: invalid literal for int() with base 10"

  • Explanation: This error occurs when a non-integer value is provided for parameters that expect integers, such as radius or specular_threshold.
  • Solution: Double-check that all integer parameters are provided with valid integer values.

"TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'"

  • Explanation: This error occurs when a required parameter is not provided, resulting in a NoneType being used in calculations.
  • Solution: Ensure that all required parameters are provided with valid values before running the node.

Image SSDO (Direct Occlusion) Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.