Nodes/was-node-suite-comfyui/Image SSDO (Direct Occlusion)
ComfyUI Node Runs on cloud

Image SSDO (Direct Occlusion)

A game-engine lighting trick faked from a flat 2D image

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Image SSDO (Direct Occlusion)

      This one's borrowed straight from real-time 3D rendering. Screen Space Ambient Occlusion (SSAO) is a game-engine technique that fakes soft shadows in crevices and corners using only the depth buffer, no real light-tracing. SSDO - Direct Occlusion is its sibling: instead of the soft ambient shadowing SSAO produces, it approximates direct lighting highlights - where light would actually hit and where it wouldn't - again without doing real lighting simulation. WAS ported the idea to work on an ordinary 2D image, no 3D scene or real depth data required.

      The README flags it plainly as an "[Experimental Beta Node]" - worth knowing going in, since it means the effect and its edge cases haven't been fully shaken out the way the pack's older, more established filters have.

      How it works

      It works from the image alone, using a depth approximation (WAS pairs this conceptually with its MiDaS depth nodes elsewhere in the suite, which estimate depth from a single image with a MiDaS model) to figure out where surfaces would be closer or farther, then derives a lighting-highlight pass from that estimate - brightening areas that would catch direct light, similar in spirit to how SSAO in a game finds the dark crevices, but inverted toward highlights instead of shadows. Because there's no actual 3D geometry behind it, the result is an approximation, not physically accurate lighting - treat it as a stylistic post-process rather than a lighting-correction tool.

      What it takes and gives back

      It takes an IMAGE input and returns an IMAGE with the direct-occlusion lighting effect applied - a single-image-in, single-image-out filter, the same shape as most of WAS's other image filters (Bloom, Chromatic Aberration, fDOF, and the rest of that family), so it slots into a filter chain the same way any of those do.

      How to install it

      ComfyUI Manager: search "WAS Node Suite," install, restart. Manual:

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/was-node-suite-comfyui
      

      then, from inside that folder, install requirements - path/to/ComfyUI/python_embeded/python.exe -s -m pip install -r requirements.txt on portable, pip install -r requirements.txt on system Python. Restart ComfyUI; find it under WAS Suite.

      Common issues & troubleshooting

      Because it's flagged experimental/beta by the author, don't be surprised if results are inconsistent across very different kinds of images - flat illustrations, photos, and busy textured scenes will all produce a depth-approximation-derived effect that varies a lot in how convincing it looks, since there's no ground-truth depth to work from. If the effect looks wrong or noisy on a particular image, that's the expected limitation of estimating depth and lighting from a single flat image, not necessarily a misconfiguration on your end.

      The pack-wide caveat applies here as much as anywhere: WAS Node Suite has had no active development since the author marked it retired in December 2023, and an experimental node like this one is exactly the kind of thing least likely to see further polish. The recurring general failure mode is the whole suite going "Import Failed" after a ComfyUI update - usually a shared-dependency version clash rather than anything wrong with this node specifically. If that happens, reinstall the requirements using your embedded Python interpreter, not a system one.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs