Nodes/ComfyUI-Panda3d/Panda3dAmbientLight
ComfyUI Node

Panda3dAmbientLight

A fill-light node that's a promise more than a tool right now

By chaojie·Created 3 years ago·Updated 2 years ago· 17
Panda3dAmbientLight
  • base
  • base
  • light
r0.40
g0.40
b0.35
a1.00

In a properly lit 3D scene you need two kinds of light: a directional one that acts as the sun, and an ambient one so the shadowed sides don't fall to pure black. Panda3dAmbientLight is the latter, for the chaojie/ComfyUI-Panda3d pack. It builds a Panda3D AmbientLight - the directionless fill that lights everything evenly regardless of angle - and hands it back to you with a color you control.

How it works

The mechanism is as bare as it gets. The node constructs an AmbientLight object, calls setColor((r, g, b, a)) with your four float inputs, and returns it. No scene-graph placement, no falloff, no intensity curve. That's all an ambient light is: one even color applied everywhere.

Here's the honest part, though. The node's light output is typed as a Panda3dModel, but it's actually a raw light object - and there is no node in the pack that attaches a light to the scene. In the engine you'd do render.setLight(render.attachNewNode(light)), and nothing in this pack exposes that step. The base's own demo lighting (setupLights()) is commented out in the shipped source, so the default scene runs unlit. What that means in practice: you can build the light, but as of the current commit there's nowhere to plug it in, so don't expect it to change your render yet.

That sounds more damning than it is. This is a single-commit, one-line-README pack that was posted to r/StableDiffusion with the one-line pitch "the real 3d engine." The lighting nodes are clearly scaffolding for a system that hasn't been wired up - the color values even match the demo's original lighting setup. If you're poking around the pack's internals, it's a useful building block; if you just want your carousel shaded, you'll be waiting on a fix.

The inputs

  • base - the engine, from Panda3dBase. Passed through unchanged.
  • r / g / b - color components, 0–1 floats. Defaults are .4 / .4 / .35, a neutral warmish gray - a sensible fill.
  • a - alpha, default 1.

Outputs are base and light (Panda3dModel).

Installing it

Same as every node in the pack - one install, all nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-Panda3d
cd ComfyUI-Panda3d
pip install -r requirements.txt

Or search ComfyUI-Panda3d in ComfyUI Manager, then restart. No downloads; models and demo assets ship in the repo.

Should you reach for it?

Honestly, not yet - there's no consumer for its output in the shipped code. If you're the tinkering type, the fix is a small node that does render.setLight(...), and if you write one, this node suddenly makes sense. Until then it's a learning aid for how the pack represents lights, not something that'll improve your renders. The Panda3dDirectionalLight sibling shares the same problem, so don't assume the grass is greener there.

CategoryPanda3d

Inputs (5)

NameTypeDefaultDescription
basePanda3dBase
rFLOAT0.40
gFLOAT0.40
bFLOAT0.35
aFLOAT1.00

Outputs (2)

NameTypeDescription
basePanda3dBase
lightPanda3dModel