Create USD Matrix
Build a transform from translation, rotation, scale
- translation
- rotation
- scale
- matrix
Transforms in USD are matrices, and nobody wants to type a 4×4 matrix by hand. Create USD Matrix is the friendly front door: you feed it translation, rotation, and scale as three separate VEC3 values, and it composes them into a proper USD transform matrix with the precision you choose. If you're writing a transform attribute directly onto a prim - or building a value for the pack's attribute/scripting nodes - this is how you do it without opening a spreadsheet.
This is the node you'd reach for instead of Create USD Quaternion in the common case: Euler rotation (three angles, which is how most people think) beats quaternion math until you have a reason to care about gimbal lock or interpolation. The catch is that it expects VEC3 inputs, so it sits downstream of a Create USD Vec3 node (or three of them) - that's the price of typed inputs in this pack.
The inputs
- translation, rotation, scale - three VEC3 sockets. Rotation is degrees around X, then Y, then Z, applied in that order; scale applies first, then rotation, then translation (the standard USD transform order). Defaults are whatever the upstream Vec3 nodes give you.
- matrix_precision -
matrix4d(default; the standard 4×4),matrix3d,matrix2d, orframe4d. For 99% of use,matrix4dis correct - a 4×4 double-precision matrix is what USD uses for its standardxformOptransforms. The smaller ones are for niche attribute contracts.
Output is a single USD_VALUE socket carrying the typed matrix.
How it works
Under the hood it builds a Gf.Transform, sets scale, rotation (as a rotation product around the three axes), and translation, then extracts the composed matrix and wraps it in the requested precision. The result is the same 4×4 you'd get from hand-composing the TRS - without the arithmetic.
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.
Caveats: the VEC3 inputs and USD_VALUE output are all pack-private sockets, so this node lives entirely inside the OpenUSD graph - it can't take a generic ComfyUI number, and its output won't feed a non-pack node. And remember it composes a matrix from TRS; it doesn't read one. If you already have a matrix and want its parts, that's a scripting-node job.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| translation | VEC3 | — | |
| rotation | VEC3 | — | |
| scale | VEC3 | — | |
| matrix_precision | COMBO | matrix4d | 4 options: matrix4d, matrix3d, matrix2d, frame4d |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| matrix | USD_VALUE | — |