Nodes/Pixar's OpenUSD/Create USD Vec4
ComfyUI Node

Create USD Vec4

A typed 4-float value, colors included

By cjhosken·Created 3 months ago·Updated 2 months ago· 9
Create USD Vec4
    • vec4
    x0.00
    y0.00
    z0.00
    w0.00
    vec4_typefloat4

    Four floats are less common than three, but when you need them you need them typed. Create USD Vec4 manufactures a proper 4-component USD value - either a plain float4/double4/int4/half4 or, usefully, a color4* (RGBA as a single USD color type) - for feeding the pack's attribute and scripting nodes.

    The color4 angle is the genuinely handy part. In USD, an RGBA color is its own type, and if you're setting a color attribute directly (rather than using Create USD Color's hex workflow), a color4f from this node is the correctly-typed value to hand over. The VEC4 socket is also the input shape Create USD Quaternion expects - a quaternion's (w, x, y, z) is exactly four floats - so this node sits upstream of the whole rotation-value path too.

    The inputs

    • x, y, z, w - the floats, all defaulting to 0.
    • vec4_type - default float4, with double4, int4, half4, plus the color quartet color4f, color4d, color4h.

    Same naming logic as the other vector nodes: plain float4 when the semantics don't matter, color4* when the value is genuinely RGBA (the f/d/h suffixes are precision - float/double/half). The type label is part of the attribute's identity in USD, so choosing the right one at construction time avoids mismatch errors when you set the attribute.

    Output is a single VEC4 socket.

    Install & caveats

    Pack install, one time: ComfyUI Manager → search "ComfyUI-OpenUSD", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/cjhosken/ComfyUI-OpenUSD
    

    then restart. Deps: usd-core==26.5, numpy==2.5.0, trimesh.

    Same honest caveats as its siblings: the VEC4 socket is pack-private, so it feeds the pack's own nodes, not generic ComfyUI sockets. And half4 is stored as a plain float tuple rather than a true half - it's "labeled half," not a memory optimization. For a value node that's a footnote, not a flaw.

    Category3d/usd/type

    Inputs (5)

    NameTypeDefaultDescription
    xFLOAT0.00
    yFLOAT0.00
    zFLOAT0.00
    wFLOAT0.00
    vec4_typeCOMBOfloat47 options: float4, double4, int4, half4, color4f, color4d, +1

    Outputs (1)

    NameTypeDescription
    vec4VEC4