Nodes/Avatar Graph/Object Set Visible Shadow
ComfyUI Node

Object Set Visible Shadow

Make an avatar element stop casting shadows

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Set Visible Shadow
  • BPY_OBJ
  • BPY_OBJ
valuetrue

Object Set Visible Shadow is probably the most reachable of Avatar Graph's ray-visibility nodes, because it answers a question every avatar builder hits eventually: how do I stop this thing from casting a shadow? It's the pack's wrapper around Blender's "Ray Visibility" shadow toggle - set it to false and the object still sits in the scene, still renders, still gets lit, but it stops casting shadows onto everything around it.

What it actually does

In a Cycles render, shadow rays are the rays that determine whether a point is in shadow. An object is visible to those rays by default (visible_shadow defaults to true), which is what makes it block light and cast a shadow. Flip the flag to false and the object becomes invisible to shadow rays: light passes through it as if it weren't there, so it casts no shadow, while everything else about it - its own appearance, its reflections, its effect on diffuse light - stays intact.

That's exactly what you want for a whole category of avatar elements. A glow plane or light-emitting accessory that dumps a hard shadow onto your character's face is a classic mess, and this is the surgical fix: the object keeps rendering, it just stops participating in shadow math. It's also how you'd set up a light-catcher (an invisible surface that receives light) or make a duplicate object that shouldn't darken the scene. This is one of the few ray-visibility toggles where the practical payoff is immediate and visible - you'll see the shadow disappear.

The inputs and outputs that matter

  • BPY_OBJ - the object whose shadow behavior you're setting.
  • value - boolean, default true. false makes the object cast no shadow.

Output is the same BPY_OBJ, passed on to the next node.

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

Two things to watch. First, this only governs shadows cast by the object - if the object is receiving a shadow you don't want, that's the shadow-catcher's visibility, not this flag. Second, ray visibility is render-time math; in Avatar Graph's live preview the shadow may still show or the change may look subtle, so confirm against the exported .glb/.gltf or a full render. And if you're hiding an object from the camera too, remember that's a separate flag (ObjectSet_VisibleCamera).

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ