Nodes/Avatar Graph/Object Set Visible Camera
ComfyUI Node

Object Set Visible Camera

Hiding avatar helpers from the render

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

Every avatar has a few objects you want to exist but never want the camera to see. Object Set Visible Camera is the Avatar Graph node for exactly that. It's one of the pack's ray-visibility setters - the family that maps to Blender's "Ray Visibility" panel, which decides how an object interacts with each kind of light path in a Cycles render. This one controls whether the object appears to the camera at all.

What it actually does

In Blender, ray visibility isn't one switch, it's several - the object can be visible to the camera, to diffuse light, to glossy (reflection) rays, to shadows, to transmission, and to volume scatter, each independently. visible_camera is the "disable in camera rays" toggle: with it true (the default) the object shows up in the render normally; set it false and the object vanishes from the camera's view without being removed from the scene. Crucially, it can still catch light, cast shadows, and appear in reflections - you've hidden it from the camera, not from physics.

That's the avatar workflow payoff. Think rig helpers, tracking markers, duplicate meshes used only to catch shadows, or the invisible geometry that drives a constraint. You get the behavior without the visual clutter. It's also how you do the classic "object exists but the camera can't see it" compositing trick: render the character normally, render a helper-pass with the object invisible to the camera, and you can do clean-up and matte work on both. It defaults to true because every object should start visible; the node exists to opt specific ones out.

The inputs and outputs that matter

  • BPY_OBJ - the object whose camera visibility you're setting.
  • value - boolean, default true. false hides the object from camera rays.

Output is the same BPY_OBJ, passed on.

How to install it

Ships with the full 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. The pack-wide snag: bpy==3.6.0 only ships wheels for Python 3.10.x, so install fails on modern Python. python=3.10 conda env, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows.

Gotchas

The easy trap is expecting this to hide an object from everything. It doesn't - the object can still show up in reflections, and can still cast shadows. If you set it to false and a reflection still contains the object, that's the glossy flag (ObjectSet_VisibleGlossy) you actually want. And since Avatar Graph's live preview may render differently than a full Cycles pass, verify visibility flags in the exported .glb/.gltf rather than trusting the in-UI preview.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ