Create USD Vec4
A typed 4-float value, colors included
- vec4
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, withdouble4,int4,half4, plus the color quartetcolor4f,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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| x | FLOAT | 0.00 | — |
| y | FLOAT | 0.00 | — |
| z | FLOAT | 0.00 | — |
| w | FLOAT | 0.00 | — |
| vec4_type | COMBO | float4 | 7 options: float4, double4, int4, half4, color4f, color4d, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vec4 | VEC4 | — |