Nodes/ComfyUI-TRELLIS2_Motion/Camera Trajectory (TRELLIS2)
ComfyUI Node

Camera Trajectory (TRELLIS2)

Trajectory controls for your 3D render

By styletransfer·Created 8 months ago·Updated 8 months ago· 6
Camera Trajectory (TRELLIS2)
    • camera_trajectory
    trajectory_typestatic
    angle_x0.0
    angle_y0.0
    angle_z0.0
    distance2.5
    fov60
    center_x0.0
    center_y0.0
    center_z0.0
    animatefalse
    animation_range30
    animation_axisy

    Every renderer in this pack needs to know where the camera is, and this node is where you tell it. CameraTrajectory (class CameraTrajectory_T2) takes a handful of sliders and turns them into a CAMERA_TRAJECTORY object - a bundle of camera settings that MeshRenderer and MeshSequenceRenderer both consume. It doesn't render anything itself and it doesn't produce an image; it's pure setup, the "where do we look from" node in the graph.

    It's also where the difference between a boring turntable GIF and something that looks like it was shot comes from. The pack ships example workflows (single_image_novel_view.json, video_angle_shift.json) and they all route through this node, so it's worth understanding the few knobs that matter.

    How it works

    The node itself is honest about being a config packer: it builds a dict with your chosen trajectory type, angles, distance, field of view, and scene center, and passes it along. The real math happens later in the renderers, via the pack's camera utilities - an orbital camera is placed on a sphere around the scene center (spherical-to-Cartesian conversion in an OpenGL y-up convention), then a 4x4 view matrix is computed. If animate is on, the renderer sweeps through the animation_range across your frames, interpolating camera matrices between the start and end.

    So think of the node as three questions: what kind of move, where's the pivot, and how wide.

    The inputs that matter

    • trajectory_type - the one that defines everything: orbit (camera swings around the scene), dolly (camera moves in and out), pan (the scene center slides sideways, so the framing shifts like a real pan), and static (locked-off, the sensible default for a single render).
    • angle_x / angle_y - pitch and yaw in degrees. angle_x positive looks down from above (range ±89, so it won't flip upside down), angle_y positive rotates right (±180). For a product-shot look you'll spend most of your time on angle_y.
    • distance - camera-to-center distance (0.5–20, default 2.5). Wide for context, tight for a hero shot. If you leave the default, the renderers quietly auto-compute a sensible distance from the mesh bounds - a nice touch, but set it yourself if you want it consistent across frames.
    • fov - field of view (10–120°, default 60). This is your lens. 60 is normal-ish; go up for that dramatic wide look.

    If you're animating (this is the fun part):

    • animate - flip this on and the camera moves across the sequence instead of holding still.
    • animation_range - how far the move goes: degrees for orbit/pan, distance units for dolly (5–360°).
    • animation_axis - y orbits horizontally, x sweeps vertically. Combined with angle_x/angle_y as the base pose, this gives you the classic turntable or the crane shot.

    There's also angle_z (roll, if you want dutch angles) and center_x/y/z (the orbit pivot - leave at 0 and the renderer auto-centers on the mesh, which is almost always what you want).

    Installing

    Same story as the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/styletransfer/ComfyUI-TRELLIS2_Motion
    cd ComfyUI-TRELLIS2_Motion
    python install.py --full
    pip install git+https://github.com/microsoft/TRELLIS.git
    pip install git+https://github.com/NVlabs/nvdiffrast.git
    

    Restart ComfyUI and find TRELLIS2/Camera in the node menu. Note the node's internal class name is CameraTrajectory_T2, which is what ComfyUI Manager and API workflows will reference - the _T2 suffix is how the pack keeps it distinct from any other "Camera Trajectory" node you might already have installed, so don't be surprised to see both in your graph.

    Common issues

    • Nothing renders differently when you change sliders. Check that the trajectory is actually wired into the renderer's camera_trajectory input. This node outputs data, not an image, so a disconnected wire is the most common "why is nothing happening."
    • Your orbit flips or looks off-axis. Remember angle_x is capped at ±89 and positive means from above; if the camera seems to be orbiting from underneath, your sign is backwards.
    • Animated renders come out static. animate defaults to off, and the renderers only sweep the camera when it's on and you've rendered more than one frame (num_frames in MeshRenderer). Both conditions need to be true.
    CategoryTRELLIS2/Camera

    Inputs (12)

    NameTypeDefaultDescription
    trajectory_typeCOMBOstaticType of camera movement
    angle_xFLOAT0.0-89–89Vertical angle in degrees (pitch) - positive looks from above
    angle_yFLOAT0.0-180–180Horizontal angle in degrees (yaw) - positive rotates right
    angle_zoptFLOAT0.0-180–180Roll angle in degrees
    distanceoptFLOAT2.50.5–20Distance from scene center
    fovoptFLOAT6010–120Field of view in degrees
    center_xoptFLOAT0.0-10–10Scene center X coordinate
    center_yoptFLOAT0.0-10–10Scene center Y coordinate
    center_zoptFLOAT0.0-10–10Scene center Z coordinate
    animateoptBOOLEANfalseEnable camera animation over sequence
    animation_rangeoptFLOAT305–360Range of animation in degrees (orbit/pan) or distance (dolly)
    animation_axisoptCOMBOyAxis to animate around (y=horizontal, x=vertical)

    Outputs (1)

    NameTypeDescription
    camera_trajectoryCAMERA_TRAJECTORY