Nodes/ComfyUI-Leputen-Utils/Cubemap Assembler
ComfyUI Node

Cubemap Assembler

Pack six faces into a DDS cubemap without touching a texture tool

By lilquail·Created 9 months ago·Updated 9 months ago· 1
Cubemap Assembler
  • pos_x
  • neg_x
  • pos_y
  • neg_y
  • pos_z
  • neg_z
    filename_prefixcubemap
    formatBC6H_UF16
    output_color_spaceLinear
    output_path
    mipmap_levelsFull Chain
    mipmap_filterBox

    Every game artist has been there: you've rendered out six nice cubemap faces, and now you have to hand them to a tool that wants one .dds file with a specific face order, and the moment you get the order wrong the sky looks like a funhouse mirror. Cubemap Assembler does that packing step inside ComfyUI - it takes six images and writes a proper DDS cubemap with compression and mipmaps, no external texture utility required.

    It's the natural endpoint of this pack's DDS pipeline: generate or load six faces (the sibling Equirectangular to Cubemap node produces them from a panorama), then feed them straight in here and get a cubemap.dds out.

    How it works

    Under the hood it uses the bundled DirectXTex tooling (texassemble/texconv) that the pack ships in its bin/ folder. The face inputs follow the DirectX convention, which is the order every game engine and most texture tools expect:

    • pos_x (+X, Right), neg_x (−X, Left)
    • pos_y (+Y, Top/Up), neg_y (−Y, Bottom/Down)
    • pos_z (+Z, Front), neg_z (−Z, Back)

    Get this order wrong and the node still produces a valid file - it'll just be wrong when your engine loads it. That's the single most common mistake, so label your faces as you go.

    Inputs that matter

    • The six faces - pos_x/neg_x/pos_y/neg_y/pos_z/neg_z, all IMAGE. They don't have to be the same size; the node normalizes them.
    • format (default BC6H_UF16) - BC6H is the right call for HDR environment cubemaps; BC1_UNORM for diffuse/skybox color; BC7_UNORM for highest quality at bigger files.
    • output_color_space (default Linear) - environment maps are almost always Linear. Only flip to sRGB if you're baking a color cubemap for a tool that expects it.
    • filename_prefix (default cubemap) - output is named <prefix>.dds.
    • output_path (optional) - absolute path; empty means ComfyUI's output folder.
    • mipmap_levels and mipmap_filter - Full Chain with the default Box filter is fine for 99% of cases.

    It's an output node: no outputs, it just writes the file.

    Install

    Same pack as the rest of Leputen-Utils:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lilquail/ComfyUI-Leputen-Utils
    

    Restart ComfyUI, find it under Leputen-Utils → DDS. The texconv/texassemble binaries come bundled in bin/ - on Windows they just work.

    Troubleshooting

    • "texconv not found" - on Windows the DLL ships in bin/, but if you moved things around, check it's there. On macOS/Linux you need to drop the right libtexconv.dylib/libtexconv.so from the Texconv-Custom-DLL releases into bin/.
    • Sky looks mirrored/wrong after load - face order. Recheck +Y (top) vs −Y (bottom) and +Z (front) vs −Z (back) first, before suspecting the compression.
    • E_NOINTERFACE / RPC_E_CHANGED_MODE warnings in the console - the pack's docs say ignore these; the node falls back to the texconv.exe subprocess and continues.
    • HDR env maps look washed out - you probably picked sRGB. BC6H + Linear is the pairing for HDR.

    One tip: keep filename_prefix descriptive (env_street_day not cubemap) because every subsequent save in this pack is also called prefix_00001 by default. You'll thank yourself later.

    CategoryLeputen-Utils/DDS

    Inputs (12)

    NameTypeDefaultDescription
    pos_xIMAGEPositive X (+X) face - Right side of the cubemap.
    neg_xIMAGENegative X (-X) face - Left side of the cubemap.
    pos_yIMAGEPositive Y (+Y) face - Top/Up side of the cubemap.
    neg_yIMAGENegative Y (-Y) face - Bottom/Down side of the cubemap.
    pos_zIMAGEPositive Z (+Z) face - Front side of the cubemap.
    neg_zIMAGENegative Z (-Z) face - Back side of the cubemap.
    filename_prefixSTRINGcubemapPrefix for the output filename. The output will be named 'prefix.dds'.
    formatCOMBOBC6H_UF16DDS compression format. BC6H for HDR cubemaps, BC1 for diffuse, BC7 for highest quality.
    output_color_spaceCOMBOLinearColor space of the output. HDR/environment maps are typically Linear.
    output_pathoptSTRINGOptional: Absolute path for output. If empty, saves to ComfyUI output directory.
    mipmap_levelsoptCOMBOFull ChainMipmap levels: 'Full Chain' = all, 'None' = disabled, or specify count.
    mipmap_filteroptCOMBOBoxMipmap filter. Box: fast default. Linear/Cubic: smoother.

    Outputs (0)

    No outputs