Nodes/KJNodes for ComfyUI/Camera Pose Visualizer
ComfyUI Node Runs on cloud

Camera Pose Visualizer

Checking a camera path before you render it

By kijai·Created 3 years ago·Updated about 18 hours ago· 2,930
Camera Pose Visualizer
  • cameractrl_poses
  • IMAGE
pose_file_path
base_xval0.20
zval0.30
scale1.00
use_exact_fxfalse
relative_c2wtrue
use_viewerfalse

Camera-controlled video generation is a great way to burn GPU minutes on a clip where the camera does something you didn't intend - the dolly moves the wrong direction, the orbit is way too aggressive, the intrinsics are off. This node exists so you can catch that before you render, by plotting the actual camera path in 3D and looking at it as a static image.

Why you'd want this

It reads camera pose data - either from AnimateDiff-Evolved's CameraCtrl pose format, or from a plain .txt file in the RealEstate10K-style layout (per-frame camera intrinsics plus a camera-to-world transform) - and renders the trajectory as a 3D plot you can eyeball. If you're building a camera-controlled animation and something about the motion looks off in the final clip, the first thing worth doing next time is running the same pose data through this node first, so you're debugging a plot instead of re-rendering a whole video to find out the camera was pointed the wrong way the entire time.

This is squarely a sanity-check tool, not a generation node. It doesn't touch your image or video pipeline at all - it just answers "does this camera path do what I think it does" before you commit compute to it.

How it works

Give it either a path to a pose file, or a CAMERACTRL_POSES object coming from an upstream AnimateDiff-Evolved node, and it parses the per-frame camera positions and orientations, then draws them as a 3D scatter/line plot - camera positions in space, connected in sequence - and returns that plot as a single image.

The inputs and outputs that matter

  • pose_file_path - a string path to a .txt pose file, if you're loading from disk rather than feeding it live from another node.
  • cameractrl_poses (optional) - a CAMERACTRL_POSES input, for wiring this directly downstream of an AnimateDiff-Evolved CameraCtrl node instead of round-tripping through a file.
  • base_xval (default 0.2) and zval (default 0.3) - plotting-space reference values used to scale how the camera frustum/axes are drawn.
  • scale (default 1) - overall scale of the plotted path.
  • use_exact_fx - whether to use the exact focal length value from the pose data rather than an approximation.
  • relative_c2w (default true) - whether camera-to-world transforms are interpreted relative to the first frame rather than in absolute world space.
  • use_viewer - toggles an interactive viewer instead of (or alongside) the static plot.

One output: IMAGE - the rendered 3D plot. It's for looking at, not for feeding into a generation pipeline.

How to install it

  • ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt (portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), then restart.

If you're feeding it live cameractrl_poses rather than a file, you'll also need AnimateDiff-Evolved installed and a CameraCtrl-producing node earlier in your graph - this node visualizes that data, it doesn't generate it.

Common issues & troubleshooting

Blank or empty-looking plot. Almost always a bad pose_file_path - either the file doesn't exist at that path, or it's not in the RealEstate10K-style format the node expects (per-frame intrinsics + camera-to-world matrix rows). Double-check the path is correct for wherever ComfyUI is actually running, not just where you're editing the workflow from.

Path looks flattened or squashed. Try adjusting scale, base_xval, and zval - these are display-space parameters, not properties of your actual camera data, so a path that looks wrong purely visually may just need re-scaling to be legible, not a fix to the pose data itself.

Plot doesn't match what you expect for a relative move. Check relative_c2w - with it on (the default), the path is drawn relative to the starting camera position; with it off, you're looking at absolute world coordinates from the source data. Toggling it can make an otherwise-correct path look completely different.

CategoryKJNodes/misc

Inputs (8)

NameTypeDefaultDescription
pose_file_pathSTRING
base_xvalFLOAT0.200–100
zvalFLOAT0.300–100
scaleFLOAT1.000.01–10
use_exact_fxBOOLEANfalse
relative_c2wBOOLEANtrue
use_viewerBOOLEANfalse
cameractrl_posesoptCAMERACTRL_POSES

Outputs (1)

NameTypeDescription
IMAGEIMAGE