Panda3dLoadTexture
Feed an image into your 3D scene as a material
- base
- loader
- base
- texture
Panda3dLoadTexture is the small-but-necessary sibling of Panda3dLoadModel. Where its big brother brings geometry into the scene, this one brings images - as textures the engine can slap onto surfaces. In the chaojie/ComfyUI-Panda3d pack it exists for one specific purpose: getting a texture into the textures input of Panda3dTest so the renderer can swap materials on a model from one frame to the next. The demo's blinking carousel lights are literally this: two texture files, loaded separately, toggled per frame.
How it works
The mechanism could not be simpler. The node takes the loader from Panda3dBase and calls loader.loadTexture(texture_path), which returns a Panda3D Texture object. That's it - no mesh, no scene-graph placement, no transform. It reads whatever image format the engine supports (JPG and PNG cover everything you'll realistically throw at it) straight from disk.
Textures on their own don't do anything in the node graph, which is worth understanding. A loaded texture only becomes visible when something uses it. In this pack that something is Panda3dTest: merge a couple of textures with Panda3dTextureMerge, feed the list into the test node's textures input, and then reference them by index from an animation JSON - {"texture": [0, 1, 0, 1]} - to swap them across frames.
The inputs that matter
There are only three inputs and two of them are pass-through plumbing:
- base and loader - both from
Panda3dBase. Chain them through, as with every node in this pack. - texture_path - absolute path to the image file. The default is the repo's own
carousel_lights_off.jpg, which is a good smoke test: if that one loads, your install is fine.
Outputs are base (passthrough) and texture (Panda3dTexture). Wire texture into Panda3dTextureMerge, then the merge output into Panda3dTest.
Installing it
It ships with the whole pack, so install once:
cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-Panda3d
cd ComfyUI-Panda3d
pip install -r requirements.txt
Or use ComfyUI Manager and search ComfyUI-Panda3d. Restart ComfyUI afterward. The demo textures live in the repo's models/ folder, so there's nothing extra to download.
Common issues
- "Texture loads but the model doesn't show it." Textures only matter if something applies them - the test node's per-frame
texturearray, in practice. A texture floating in the graph does nothing visible. - "The default path points at /tmp." Older copies of the pack hardcoded
/tmp/ComfyUI/...as the default. If your texture input resolves to a nonexistent path, replace it with the real absolute path to the image. - Unlit look. The base's lighting setup is commented out in the shipped source, so models render flat/fullbright and textures can look washed out. It's a pack-wide limitation, not this node.
It's a utility, not a showpiece - but every per-frame texture trick in this pack runs through it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| base | Panda3dBase | — | |
| loader | Panda3dLoader | — | |
| texture_path | STRING | /tmp/ComfyUI/custom_nodes/ComfyUI-Panda3d/models/carousel_lights_off.jpg | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| base | Panda3dBase | — |
| texture | Panda3dTexture | — |