Nodes/BrainDead Nodes/BD Cache Bundle
ComfyUI Node

BD Cache Bundle

Cache the whole mesh + textures + colors package in one shot

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Cache Bundle
  • bundle
  • bundle
  • status
cache_namebundle
seed0
force_refreshfalse
name_prefix

Somewhere in a serious 3D pipeline you stop having "a mesh" and start having a bundle: the geometry, the PBR textures, the vertex colors, the metadata, all moving together as one unit. That's what this pack calls a MESH_BUNDLE - and BD Cache Bundle is how you freeze that whole package so you don't regenerate any of it.

The node description is unusually specific about what it saves, because the format split matters:

  • Mesh as GLB - preserves material, UVs, and vertex colors
  • Textures as individual PNGs - lossless, so the albedo/normal/roughness maps survive unmodified
  • Color field + vertex colors + metadata as pickle - the deferred-color and edge-metadata bits that GLB can't hold

On a cache hit, the whole thing loads back as a complete MESH_BUNDLE, and the lazy-evaluation machinery skips the upstream generation entirely. You wire it after the node that produced the finished bundle (usually the pack/unpack or bake side of the pipeline) and the expensive part runs once.

The inputs

  • bundle - the MESH_BUNDLE to cache. Comes out of BD Pack Bundle or the OVoxel bake pipeline.
  • cache_name - label (default bundle). Name it after the asset, e.g. character_pbr or prop_03.
  • seed - invalidation key, hashed into the filename. Change it to force a fresh bundle.
  • force_refresh - True to overwrite and regenerate.
  • name_prefix - optional path prefix under output/BrainDead_Cache/.

Outputs: bundle (MESH_BUNDLE) and status (STRING).

The workflow shape

[OVoxel bake / pack bundle] → [BD Cache Bundle] → [export to GLB/FBX / game-engine step]
                               cache_name: "letti_pbr"
                               seed: 42

First run bakes and caches the whole package. Every run after that skips the bake - which, if you've ever watched a PBR bake run, is a serious chunk of time - and hands you the identical bundle. Because it round-trips all the components, it's the right cache for the moment between "finished baking" and "exporting to the engine," where you're still fiddling with export settings and engine orientation.

Installing it

Part of BizaNator/ComfyUI-BrainDead (BrainDeadGuild). ComfyUI Manager → search "BrainDead" → install, or:

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

Restart; it's under 🧠BrainDead/Mesh.

Gotchas

The seed trap is in full force here and the storage cost is highest: each bundle is a GLB plus several PNGs plus a pickle, and every seed you try leaves a full copy. Bump the seed only when the bundle genuinely changed. Also note the distinction this pack draws between a MESH_BUNDLE and a bare TRIMESH - if you only need the geometry, BD Cache Mesh is lighter; if you need the complete asset with textures, this is the one. Caching the wrong granularity is how you end up re-baking anyway.

Category🧠BrainDead/Mesh

Inputs (5)

NameTypeDefaultDescription
bundleMESH_BUNDLE
cache_nameSTRINGbundle
seedINT00–18446744073709550000
force_refreshBOOLEANfalse
name_prefixoptSTRING

Outputs (2)

NameTypeDescription
bundleMESH_BUNDLE
statusSTRING