Nodes/ComfyUI_HYWorld2/Camera Trajectory Builder
ComfyUI Node

Camera Trajectory Builder

Scripting the camera moves before the video model rolls

By AHEKOT·Created 4 months ago·Updated about a month ago· 74
Camera Trajectory Builder
    • trajectory
    presetstereo_orbit
    num_frames5
    radius1.0
    speed0.080
    elevation_deg15
    median_depth1.0
    fov_deg70
    image_width768
    image_height480
    custom_json[]

    WorldStereo-style video models don't just need a prompt - they need to know where the camera is going. VNCCS_CameraTrajectoryBuilder is a pure math node that generates those camera paths for you: pick a preset, and it emits a CAMERA_TRAJECTORY - a set of camera poses and intrinsics the video generator will fly along. It's the "shot list" for your world-model video, built without any machine learning at all.

    It sits in the pack's VNCCS/Video category, and it's the bridge between this pack's 3D side and its video side: you build a trajectory here, and downstream WorldStereo nodes condition on it to generate a coherent flythrough instead of a camera-less wobble.

    How it works

    Pick a preset and the node does the trigonometry. Eleven presets, and the tooltip is genuinely the whole manual:

    • circular - classic orbit; radius sets orbit size, median_depth the look-at distance.
    • stereo_orbit - compact parallax orbit (the default, tuned for stereo/detail capture); speed sets the parallax radius.
    • forward_orbit - move forward while orbiting; radius is forward distance, speed parallax.
    • forward_lookaround - move forward, then sweep the camera 90° left to right.
    • forward, zoom_in, zoom_out, left_right, up_down - the straight moves; radius/speed set travel or span.
    • aerial - tilt/orbit upward; elevation_deg sets the angle.
    • custom - paste a JSON list of N 4×4 C2W camera matrices into custom_json and it uses those verbatim. This is the power-user escape hatch: any path you can express as matrices, you can fly.

    num_frames (default 5, max 21) is the count of final WorldStereo frames - the tooltip notes dense conditioning frames are calculated internally, so you don't have to. fov_deg (70), image_width (768) and image_height (480) define the camera's projection for the intrinsics.

    The inputs that matter

    • preset - the whole node, really.
    • num_frames - how many final frames; more frames = smoother but longer video generation.
    • radius / median_depth - the two knobs that shape the orbit; get median_depth roughly right or the orbit will look at empty space.
    • fov_deg - match this to your generator's native FOV.

    Outputs

    • trajectory (CAMERA_TRAJECTORY) - the poses/intrinsics bundle for the video-generation node. That's the whole output.

    Install & troubleshooting

    Pack install: ComfyUI Manager (search HY-World 2.0) or clone + pip install -r requirements.txt + python install.py. This node has no model, no VRAM, no downloads - it's instant math.

    The classic mistake is expecting "orbit" to look at the scene you built and feeding no depth reference: median_depth defaults to 1.0, and if your scene is bigger, you'll orbit at the wrong radius - bump it to match your scene scale. For custom, a malformed JSON (wrong nesting, non-4×4 matrices) fails loudly, so validate it in a JSON checker first. And if your flythrough has visible judder, it's usually too few num_frames for a big radius, not a bug in the builder.

    CategoryVNCCS/Video

    Inputs (10)

    NameTypeDefaultDescription
    presetoptCOMBOstereo_orbitTrajectory preset: circular: classic orbit around the scene; radius controls orbit size, median_depth controls look-at distance. stereo_orbit: compact parallax orbit for stereo/detail capture; speed controls parallax radius. forward_orbit: moves forward while orbiting/parallaxing; radius controls forward distance, speed controls parallax radius. forward_lookaround: moves forward, then looks 90 deg left and sweeps to 90 deg right; radius controls forward distance. forward: straight forward camera move; speed controls per-frame movement. zoom_in: forward zoom over the whole path; radius controls total distance. zoom_out: backward zoom over the whole path; radius controls total distance. left_right: lateral slide from left to right; radius controls span. up_down: vertical slide from up to down; radius controls span. aerial: tilt/orbit upward camera motion; elevation_deg controls angle. custom: use custom_json list of 4x4 C2W camera matrices.
    num_framesoptINT51–21Final WorldStereo frames. Dense conditioning frames are calculated internally.
    radiusoptFLOAT1.00.1–10Orbit radius, travel distance, or lateral/up-down span depending on preset. For forward_orbit/forward_lookaround this is the forward distance.
    speedoptFLOAT0.0800.001–1Per-frame translation for forward preset or parallax radius for stereo_orbit/forward_orbit.
    elevation_degoptFLOAT15-90–90Camera elevation for aerial preset.
    median_depthoptFLOAT1.00.1–100Estimated scene depth — orbit center distance.
    fov_degoptFLOAT7010–150Camera field of view in degrees for all generated trajectory frames.
    image_widthoptINT76864–2048Generation/conditioning width used to build camera intrinsics.
    image_heightoptINT48064–2048Generation/conditioning height used to build camera intrinsics.
    custom_jsonoptSTRING[]JSON list of N 4x4 C2W matrices. Used when preset=custom.

    Outputs (1)

    NameTypeDescription
    trajectoryCAMERA_TRAJECTORY