ComfyUI Node

UV_options

Fine-tune the xatlas unwrap without touching code

By 807502278·Created 2 years ago·Updated 2 years ago· 23
UV_options
    • UV_options
    fix_windingfalse
    max_boundary_length0.00
    max_chart_area0.00
    max_cost2.0
    max_iterations1
    normal_deviation_weight2.0
    normal_seam_weight4.0
    roundness_weight0.01
    straightness_weight6.0
    texture_seam_weight0.50

    UV_options (from ComfyUI-3D-MeshTool) is a settings node, not a doer. It produces a chart_options object - a bundle of parameters - that you feed into the UnwrapUV_xatlas node to control how the unwrap runs. Skip it entirely and the unwrap uses xatlas's defaults, which are fine for most meshes. Connect it and you get a hand on the steering wheel.

    Every input maps one-to-one onto an xatlas.ChartOptions field, so what you see here is exactly what the C++ library exposes. There are ten of them, all sliders:

    • fix_winding (BOOLEAN) - correct face winding while unwrapping
    • max_boundary_length, max_chart_area - cut limits; 0 means no limit
    • max_cost - overall chart-merging cost ceiling
    • max_iterations - how many passes the packer does (default 1, range 1–64)
    • normal_deviation_weight, normal_seam_weight, roundness_weight, straightness_weight, texture_seam_weight - the weights xatlas uses to decide where to cut and how to pack

    Which ones actually matter

    For a beginner, two are worth touching:

    • max_iterations - bumping this from 1 toward 8–16 usually gives tighter packing on complex meshes at the cost of a little CPU time. The default of 1 is fast but not optimal.
    • fix_winding - turn this on if your mesh came in with inconsistent face winding and the unwrap produces flipped islands.

    The five weights are how you bias the unwrapper: raise texture_seam_weight to encourage fewer, cleaner seams for texturing, or raise straightness_weight if you want more regular charts. Don't touch them until you've seen a bad unwrap and know what you're trying to improve - defaults genuinely work.

    Output

    • UV_options (chart_options) - wire this into UnwrapUV_xatlas's UV_options socket.

    Install

    It's part of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/807502278/ComfyUI-3D-MeshTool
    cd ComfyUI-3D-MeshTool
    pip install -r requirements.txt
    

    Restart ComfyUI, or install via ComfyUI Manager (search "ComfyUI-3D-MeshTool"). This node imports xatlas just to construct the options object, so the same install requirement as the unwrap applies.

    Notes

    The connection is optional by design - UnwrapUV_xatlas checks for a None and falls back to xatlas defaults, so you can start without this node and add it only when the default output isn't good enough. That's the right workflow: unwrap, look, and only then start tweaking weights. One quirk to expect: these are raw library parameters, so they don't have friendly unit labels and the numbers are relative weights, not absolute settings - don't expect "0.5" to mean the same thing as a similar-looking slider in Blender.

    Category3D_MeshTool/Edit

    Inputs (10)

    NameTypeDefaultDescription
    fix_windingBOOLEANfalse
    max_boundary_lengthFLOAT0.000–1
    max_chart_areaFLOAT0.000–1
    max_costFLOAT2.00–10
    max_iterationsINT11–64
    normal_deviation_weightFLOAT2.00–10
    normal_seam_weightFLOAT4.00–10
    roundness_weightFLOAT0.010–1
    straightness_weightFLOAT6.00–10
    texture_seam_weightFLOAT0.500–1

    Outputs (1)

    NameTypeDescription
    UV_optionschart_options