ComfyUI Node

Panda3dBase

The node that boots a whole 3D game engine inside ComfyUI

By chaojie·Created 3 years ago·Updated 2 years ago· 17
Panda3dBase
    • base
    • loader
    • render

    Most "3D" nodes in the ComfyUI ecosystem are about generating geometry - meshes, splats, point clouds you then do something else with. The chaojie/ComfyUI-Panda3d pack goes a different way: it bolts a real game engine onto the node graph. Panda3D is the open-source engine that Disney's Toontown Online ran on, and this pack spins it up as an offscreen renderer, builds scenes out of nodes, and hands you back image tensors. Panda3dBase is the first node you place in any of those workflows, and it's the only one with zero inputs.

    What it actually is

    Panda3dBase is a thin ComfyUI wrapper around Panda3D's ShowBase class - the object that owns the window, the camera, the scene graph and the frame loop. When it instantiates, it creates an offscreen graphics window (window-type offscreen is set at import time, so it works headless, no X server or monitor needed), positions the camera at (0, -8, 2.5) facing the origin, and - the nice part - sets up a second render buffer that captures a depth pass alongside the color pass. That depth buffer is what makes the pack's Panda3dLoadDepthModel trick possible.

    You don't configure it. There are no inputs at all, which is honestly a little weird the first time you see it. You just add the node, and it hands you three things:

    • base (Panda3dBase) - the engine instance itself. Every other node in the pack takes this as its first input and passes it straight through, which is how they all share one running engine. Chain it into everything.
    • loader (Panda3dLoader) - the model/texture loader. Panda3dLoadModel and Panda3dLoadTexture expect it.
    • render (Panda3dModel) - the root of the scene graph. This is what you parent models to when you want them in the world rather than attached to something else.

    One quirk: the node's IS_CHANGED method returns the current timestamp, so it re-executes on every prompt run. That's deliberate - the engine is stateful, so you want a fresh frame each time.

    How to install it

    The README is nearly empty (it's a single-commit project, so set expectations accordingly), but installation is the usual deal. Easiest path is ComfyUI Manager: search for ComfyUI-Panda3d. Or by hand:

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

    Then restart ComfyUI. The requirements are panda3d, panda3d-gltf and panda3d-simplepbr - the gltf and simplepbr add-ons matter more than you'd think, because they're what let the engine load modern model and material formats. The demo models (the carousel, the panda, the environment) ship inside the repo's models/ folder, so there are no separate downloads. The only heavy thing is the engine itself; the first launch after install is slower while it compiles shaders.

    Troubleshooting

    • "It won't start on my Linux box." The offscreen window setting is there specifically to dodge the classic DISPLAY errors, so a fresh install should just work. If you see graphics pipe errors anyway, it's usually a missing system GL driver rather than anything this pack controls.
    • "The demo renders black / unlit." The base no longer calls the engine's built-in setupLights() - it's commented out in the source. The demo still renders because unlit models show as flat/fullbright, but if you were expecting nice shaded carousel shots, that's on the lighting nodes, which are rough (see Panda3dAmbientLight).
    • It's early software. One commit, a one-line README, and the author's community post literally just says "the real 3d engine." Rough edges are the norm, not the exception.

    Start with Panda3dBasePanda3dLoadModelPanda3dTest and you have a working 3D render inside ComfyUI. Everything else in the pack is optional dressing on top.

    CategoryPanda3d

    Inputs (0)

    No inputs

    Outputs (3)

    NameTypeDescription
    basePanda3dBase
    loaderPanda3dLoader
    renderPanda3dModel