Nodes/ComfyUI-Panda3d/Panda3dLoadModel
ComfyUI Node

Panda3dLoadModel

How you get actual geometry into your ComfyUI scene

By chaojie·Created 3 years ago·Updated 2 years ago· 17
Panda3dLoadModel
  • base
  • loader
  • parent
  • base
  • model
model_path/tmp/ComfyUI/custom_nodes/ComfyUI-Panda3d/models/carousel_base
x0.0
y0.0
z0.0
h0.0
p0.0
r0.0
sx1.0
sy1.0
sz1.0

In the chaojie/ComfyUI-Panda3d pack, Panda3dBase gives you the engine and Panda3dTest turns the scene into frames. But between them, nothing happens unless something puts geometry into the world - and that's this node's entire job. Panda3dLoadModel loads a 3D model file off disk, drops it into the scene graph, and positions it for you. If you've ever used Blender's "import" button, this is that, minus the interface.

How it works

The mechanism is a one-liner in spirit. The node takes the loader output from Panda3dBase and calls loader.loadModel(path), which returns a NodePath - the game-engine handle for an object in the scene. It then parents that handle to whatever you give it as parent and applies a transform.

Because the loader is backed by Panda3D's p3assimp importer (with panda3d-gltf and panda3d-simplepbr installed alongside it), the model_path string is surprisingly flexible. Egg files, OBJ, glTF/glb, even assorted assimp-supported formats all work. The carousel_base.egg.pz in the repo's models/ folder is the canonical example, but you can point this at your own .glb just as easily.

The inputs that matter

The transform fields all work the way you'd hope, but only a few are worth fiddling with on a first pass:

  • model_path - absolute path to the model file. The shipped default is .../ComfyUI-Panda3d/models/carousel_base, and it's the most common source of user error: the default points at /tmp/ComfyUI/... in older copies, which doesn't exist on a normal install. Set this to a real path on your machine.
  • parent - where in the scene the model gets attached. Wire it to Panda3dBase's render output for a world-space object, or to another model's output to make it a child (which inherits the parent's motion - handy for the carousel demo's rotating mounts).
  • x / y / z - position in engine units.
  • h / p / r - orientation as heading, pitch, roll (degrees).
  • sx / sy / sz - scale on each axis. Defaults to 1.

Outputs are base (the engine, passed through unchanged - always chain it onward) and model, the Panda3dModel handle you'll feed into Panda3dTest or into another parent input.

Installing it

This is one node in the chaojie/ComfyUI-Panda3d pack, so install the pack once and you get it. ComfyUI Manager, search ComfyUI-Panda3d:

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

Restart ComfyUI and the Panda3d category appears. No model downloads - the demo assets ship in the repo.

Common issues

  • "Nothing shows up." Check the path first, then check that you've actually chained base and loader from Panda3dBase. The node silently does nothing useful if the file doesn't load.
  • "The model is tiny / gigantic / sideways." All model files come in with their own scale and orientation conventions. Fix with sx/sy/sz and h/p/r; there's no auto-normalize, so expect some fiddling when you switch from the carousel to your own assets.
  • It's a young pack. Single commit, one-line README. If a format fails to load, it's usually an assimp limitation, not your file.

The natural next step: wire the model output into Panda3dTest, set frame_length, and watch it render.

CategoryPanda3d

Inputs (13)

NameTypeDefaultDescription
basePanda3dBase
loaderPanda3dLoader
parentPanda3dModel
model_pathSTRING/tmp/ComfyUI/custom_nodes/ComfyUI-Panda3d/models/carousel_base
xFLOAT0.0-1000–1000
yFLOAT0.0-1000–1000
zFLOAT0.0-1000–1000
hFLOAT0.0-1000–1000
pFLOAT0.0-1000–1000
rFLOAT0.0-1000–1000
sxFLOAT1.0-1000–1000
syFLOAT1.0-1000–1000
szFLOAT1.0-1000–1000

Outputs (2)

NameTypeDescription
basePanda3dBase
modelPanda3dModel