Create USD Vec2
A typed 2D value for USD attributes
- vec2
This is a plumbing node, and it owns that label proudly. USD attributes don't hold "a number" - they hold typed values, and a 2D vector in USD is not the same thing as a 2D vector in the ComfyUI primitive world. Create USD Vec2 is how you build a proper typed Vec2 value (or TexCoord2, or Int2…) that the pack's attribute-setting nodes can actually write into a stage.
You'll reach for it when you're working at the attribute level - the territory of Get/Set USD Attribute and the scripting node. If you're setting a primvars UV on a mesh or a clippingRange on a camera, those are float2/texCoord2 attributes, and this is the node that manufactures the value with the right type so SetUSDAttribute doesn't choke on it. If you never touch raw attributes, you'll probably never touch this node - and that's fine.
The inputs
- x, y - the two floats. Defaults to 0,0.
- vec2_type - the type label, default
float2. The dropdown coversfloat2,double2,int2,half2, and the texture-coordinate triotexCoord2f,texCoord2d,texCoord2h. PicktexCoord2*when the value is a UV; pickfloat2for anything else. The choice matters because the type is part of the attribute's identity in USD - afloat2and atexCoord2fare different attribute types even if the numbers match.
Output is a single VEC2 socket carrying the typed value - wire it into the value input of the pack's attribute nodes.
Install & the honest 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.
Honest caveats: the VEC2 output socket is this pack's type, so it only plugs into consumers that expect it - mostly the pack's own attribute/scripting nodes. And note that the half-precision options (half2, texCoord2h) are stored as plain float tuples in the pack rather than native half types - USD will happily take them, but it's worth knowing the pack treats half as "float that we label half." For a value node this is a minor detail; just don't assume half2 buys you memory savings.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| x | FLOAT | 0.00 | — |
| y | FLOAT | 0.00 | — |
| vec2_type | COMBO | float2 | 7 options: float2, double2, int2, half2, texCoord2f, texCoord2d, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vec2 | VEC2 | — |