Nodes/camera-comfyUI/CameraTrajectoryNode
ComfyUI Node

CameraTrajectoryNode

Walk through your point cloud and record the path

By Alexankharin·Created about a year ago·Updated about a month ago· 36
CameraTrajectoryNode
  • pointcloud
  • initial_matrix
  • trajectory

Most camera paths in this pack start as numbers - two matrices, an interpolation node, done. But sometimes you want to be there: fly through your point cloud like a tiny drone, decide on the spot where the interesting views are, and record the whole route. That's what CameraTrajectoryNode is for. Instead of typing poses, you walk.

It opens an interactive Open3D window showing your point cloud, lets you navigate around inside it, and records your camera waypoints into a trajectory tensor you can save and reuse. It's the "record" half of the pack's record_trajectory.json workflow, and it's the most tactile node in the whole pack - genuinely fun the first time you use it, and genuinely the right tool when a fly-through needs to feel right rather than just be mathematically smooth.

How it works

The only required input is pointcloud - a (N,7) XYZRGBA tensor, the standard cloud format in this pack, straight out of DepthToPointCloud or LoadPointCloud. That's what you fly through. There's one optional input, initial_matrix (MAT_4X4): pass a camera pose if you want the view to start somewhere specific, or leave it empty and the camera spawns at the identity pose (origin, looking down +Z).

You navigate with the usual Open3D controls (drag to orbit, WASD-style movement, scroll to fly), and the node records waypoints as you go. When you close the window, it hands you a trajectory tensor of shape (K,4,4) - one pose per recorded waypoint. That tensor is immediately compatible with everything else in the pack: feed it to CameraMotionNode for a render, compose it with other paths via TrajectoryCompose, or save it with SaveTrajectory and reload it later with LoadTrajectory. The recorded paths are coarser than interpolated ones (you get exactly the waypoints you planted, not a hundred smooth steps), so in practice people record the shape of the move and let CameraMotionNode's per-segment n_points fill in the smooth motion between waypoints.

It depends on Open3D, which is in the pack's requirements.txt (pinned to 0.19.0) - that's the one dependency you need for this node specifically, and it's a plain pip install that comes along automatically with the pack.

Install

Standard camera-comfyUI install. ComfyUI Manager → search "camera-comfyUI" → Install, or clone https://github.com/Alexankharin/camera-comfyUI into custom_nodes/ and run python install.py. No model downloads for this node - the heavy optional deps (gsplat, VGGT, SHARP) are for other nodes, and you can skip them entirely if all you're doing is recording paths.

Troubleshooting

  • No window opens / the node hangs: the Open3D GUI needs a display. It won't work over a headless SSH session without X forwarding or a virtual display - run it where ComfyUI has a real screen.
  • Nothing to fly through: an empty or broken point cloud (NaNs) makes the viewport useless. Pipe the cloud through PointCloudCleaner first if it looks sparse or has flying pixels.
  • Path too jumpy when rendered: you recorded sparse waypoints and CameraMotionNode interpolated naively between them. Record more, smaller waypoint steps, and keep n_points moderate.
  • Save it: record_trajectory.json shows the save path - a recorded route you liked is worth keeping, because re-walking a long path by hand rarely comes out identical twice.
CategoryCamera/Trajectory

Inputs (2)

NameTypeDefaultDescription
pointcloudTENSOR
initial_matrixoptMAT_4X4

Outputs (1)

NameTypeDescription
trajectoryTENSOR