Extrinsics to Pose
Turn a 4x4 camera matrix into numbers you can actually read
- extrinsics
- x
- y
- z
- pitch
- yaw
- roll
- pose_string
Every 3D camera in ComfyUI is secretly a pile of numbers nobody wants to read. Gaussian splat renderers, multi-view generators, camera-estimation nodes - they all talk in 4x4 "extrinsics" matrices, which look exactly like the output of a broken spreadsheet formula. ExtrinsicsToPose is the decoder ring: feed it one of those matrices and it hands back what your brain actually wants - a position (x, y, z) and an orientation (pitch, yaw, roll) in degrees, plus a formatted string you can paste into a prompt or a text node.
It ships in the same pack as GaussianViewer, and that's the pairing to remember. GaussianViewer outputs an extrinsics matrix for whatever camera you ended up at; ExtrinsicsToPose is the cheapest way to read it, log it, or describe it to another node. It's a debugging and interop utility, not a creative one - a "convert widget to numbers" helper in the GeometryPack lineage, which is why it's filed under geompack/camera.
How it works
Reassuringly simple. The translation is just the 4th column of the matrix - that's your x, y, z. The 3x3 rotation block gets decomposed into Euler angles with a YXZ convention (pitch around X, yaw around Y, roll around Z), with a gimbal-lock guard so it doesn't blow up near ±90° pitch. Everything is rounded to two decimals, which keeps the pose_string tidy.
Inputs and outputs
extrinsics(required, EXTRINSICS) - the 4x4 matrix. That's the entire input list, which is the whole charm.
Outputs, all FLOAT except the last:
x,y,z- camera positionpitch,yaw,roll- camera rotation in degreespose_string(STRING) - formatted as"x":1.0,"y":2.0,"z":3.0,"pitch":..., readymade for a text, prompt, or LLM node.
The honest caveats
It's a converter, not a source. Nothing here generates an extrinsics matrix, so you need something upstream that produces the EXTRINSICS type - GaussianViewer's own extrinsics output, or another GeometryPack camera node. And Euler angles are inherently a little lossy: near gimbal lock the numbers can look jumpy, and the same physical orientation has more than one valid Euler spelling. If you need an unambiguous pose, keep the matrix. If you need to tell a human - or another node - where the camera is, this is the point.
Install
Same as the pack's main node. ComfyUI Manager (search "GaussianViewer") or:
cd ComfyUI/custom_nodes
git clone https://github.com/CarlMarkswx/comfyui-GaussianViewer.git
then restart. Dependencies are just numpy / torch / Pillow, all standard in ComfyUI. No models, no downloads.
Troubleshooting
Mostly "am I sure my input is a matrix." If extrinsics arrives as None, the node prints an error and returns all zeros plus an empty string rather than crashing - which is fine, but it means your upstream camera node didn't actually produce a matrix. Wire GaussianViewer's extrinsics output straight in and you're set.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| extrinsics | EXTRINSICS | 4x4 camera extrinsics matrix |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| x | FLOAT | — |
| y | FLOAT | — |
| z | FLOAT | — |
| pitch | FLOAT | — |
| yaw | FLOAT | — |
| roll | FLOAT | — |
| pose_string | STRING | — |