Object Set Visible Diffuse
Fine-grained control over what your avatar's lighting sees
- BPY_OBJ
- BPY_OBJ
Most people never think about the different kinds of light bouncing around a render. Object Set Visible Diffuse is an Avatar Graph node for the people who do. It's part of the pack's ray-visibility family - the setters that mirror Blender's "Ray Visibility" panel, letting you turn an object's presence off for one specific category of light path without touching the others. This one is the diffuse knob: whether the object participates in diffuse lighting at all.
What it actually does
When Cycles renders, light isn't one thing - it's several kinds of ray. Diffuse rays are the "bounce everywhere" rays: light that hits a surface and scatters in all directions, which is what gives matte materials their look. visible_diffuse controls whether a given object can be hit by those diffuse rays. With it true (the default) the object behaves normally - it catches diffuse light and is itself lit. Set it false and the object becomes invisible to diffuse paths: it won't be lit by, or participate in, diffuse bounces.
That's a subtle but real tool for avatar compositing. Say you have an object you want to keep out of the diffuse lighting math - a light-emitting element that shouldn't be "lit," a helper surface that shouldn't affect indirect light, or a shadow-catcher-style plane whose job isn't to scatter bounce. Flipping visible_diffuse off isolates the object from exactly that part of the lighting equation while leaving it visible to the camera and to other ray types.
Like the rest of the ObjectSet_ family, this node is auto-generated from Blender's object attributes (blender/ops_mesh.py), sets one property on the object at its BPY_OBJ input, and passes the object back. It defaults to true, and for the standard avatar pipeline - generate a plane, rig it, light it - you'll leave it that way. It's the object to reach for when your lighting has a specific problem to solve.
The inputs and outputs that matter
BPY_OBJ- the object whose diffuse visibility you're setting.value- boolean, defaulttrue.falseremoves the object from diffuse light paths.
Output is the same BPY_OBJ, passed on.
How to install it
Part of the Avatar Graph pack - ComfyUI Manager, search "Avatar Graph", or:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
restart ComfyUI. Pack-wide snag: bpy==3.6.0 only has wheels for Python 3.10.x, so install fails on newer Python. python=3.10 conda env on Linux/macOS, Avatech's prebuilt Python-3.10 ComfyUI zip on Windows.
Gotchas
The trap is expecting visible results. Ray-visibility tweaks are only visible when they're wrong - turn visible_diffuse off on a normal character and you'll notice lighting oddities, not a clean "hidden" effect. The object is still fully visible to the camera; you've just pulled it out of the diffuse math. If the object keeps affecting lighting in ways you didn't want, check its siblings (visible_glossy, visible_shadow) - they cover the other ray paths.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| valueopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |