Nodes/Avatar Graph/Object Lightprobe Cache Bake
ComfyUI Node

Object Lightprobe Cache Bake

The step that actually makes your avatar's indirect light exist

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Lightprobe Cache Bake
  • BPY_OBJ
  • BPY_OBJ
delay0
subset

Here's the thing nobody warns you about light probes: adding them does nothing. A grid probe is just an empty volume until you bake the irradiance data into it. In Blender's EEVEE that's a bake step, and in the Avatar Graph pack that step is Object_LightprobeCacheBake - the node that calls bpy.ops.object.lightprobe_cache_bake() and turns your probes from decorations into actual lighting.

If your avatar's preview looks flat and you've already added a probe with Object_LightprobeAdd, the missing piece is almost certainly this node. It's the difference between "I set up indirect lighting" and "I have indirect lighting."

The inputs that matter

  • subset - which probes to bake: ALL, DIRTY, SELECTED, or ACTIVE. ALL is the obvious choice for a first bake; DIRTY re-bakes only probes that changed since the last bake (saves time when you're iterating); SELECTED/ACTIVE bake just the ones you picked. For a small avatar scene, ALL is usually fine and you don't need to think about it.
  • delay - an integer frame delay (0–2000, default 0) between bake steps. It's mostly there to avoid stalling the UI/real-time preview during a long bake. For a character scene with a grid or two, leave it at 0.

BPY_OBJ sets the active context and passes through unchanged. No other knobs - the bake operates on the scene's probes.

How it works

The operator bakes the probe cache for the selected subset: it samples the scene's direct lighting from each probe's position and stores the result as irradiance/reflection data that EEVEE reads every frame. Since the pack rebuilds the scene from scratch each run, your graph must add the lights, add the probes, and bake them in that order - bake before lights exist and you've baked nothing.

When you'd use it in an avatar graph

Straight after your light and probe setup, before the AvatarMainOutput export or preview. The order matters: Object_LightAddObject_LightprobeAddObject_LightprobeCacheBake. Skip the bake and your character renders with hard shadows and no bounce; include it and the undersides and ambient shadows soften up.

Installing it

Ships in Avatar Graph (avatechai/avatar-graph-comfyui). ComfyUI Manager: search "Avatar Graph". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

Pack constraints: bpy==3.6.0 wants Python 3.10.x, and first launch pulls the SAM ViT-H checkpoint (~2.5 GB) and MediaPipe models.

Common issues

Baking before lights exist (results in a dark, useless cache) and baking when probes are missing (errors or no-ops) are the two classics. If the bake runs but the preview doesn't improve, verify the grid probe's volume covers the character - a bake can succeed and still be irrelevant if the character sits outside the probe. And free the cache with Object_LightprobeCacheFree when you rebuild, or stale data can linger. The README marks the pack as work-in-progress, so re-verify after updates.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
delayoptINT00–2000
subsetoptCOMBO4 options: ALL, DIRTY, SELECTED, ACTIVE

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ