Camera Movement to Prompt
ComfyUI node that computes relative camera movement between two extrinsics matrices and injects it into a prompt template as JSON.
Nodes (1)
Camera Movement to Prompt
A ComfyUI custom node that computes the relative camera movement between two 4×4 extrinsics matrices and injects it into a prompt template as JSON.
Inputs
| Input | Type | Description |
|---|---|---|
| original_extrinsics | EXTRINSICS | 4×4 camera matrix from the original view |
| new_extrinsics | EXTRINSICS | 4×4 camera matrix from the new view |
| prompt_template | STRING | Text with {camera_movement} placeholder |
| decimal_places | INT | Rounding precision (0–6, default 2) |
Outputs
| Output | Type | Description |
|---|---|---|
| prompt | STRING | Template with {camera_movement} replaced by JSON |
| camera_json | STRING | The raw JSON camera delta |
Example output JSON
{"x": 0.15, "y": -0.02, "z": 0.31, "pitch": 5.2, "yaw": -12.0, "roll": 0.0}
Installation
Clone into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/Lil0k/comfyui_camera_movement_to_prompt.git