Scene kit command

camera.move

Camera Move

Keys a preset camera move round `target` (an object or a point) from frame `start` for `duration` frames, turning to aim at the target, as one undo step: pushIn (dolly in by `amount`), pushHover (push in 18 frames swinging `yaw` and `tilt`, hover creeping in, settle back), orbit (`degrees` round at constant speed, `easeEnds` only at the ends), craneRise (from close and low, `scale` 3 to 1, rise and pull back to where the camera is), reveal (from a close-up out to where the camera is), pullBack (out by `amount`), whip (a fast pan to `to`, turning motion blur on), follow (keeps an `offset` from a moving object, aimed `lead` seconds ahead, lagging by `smoothing` seconds), zoomThrough (straight in to the target's surface, the distance shrinking in log space so the approach looks steady; `through` arrives at full speed with the surface's colour filling the frame), pullOut (the reverse: from filling the frame with the surface back out to a wide shot). Moves start where the camera is and as it looks at `start` (`from: "current"`), so they chain into one continuous take; `position` builds the move round that place instead. Optional `lens` to reach and `ease` [x1, y1, x2, y2]. Eases are baked as one linear key per frame.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes

Parameters

Parameters of camera.move
NameTypeRequiredDescription
amountnumbernopushIn: share of the distance closed (0.3); pushHover: share closed by the push (0.22); pullBack: how many times farther it ends (1.6)
camerainteger | stringnoThe camera; the scene's camera when left out
creepnumbernopushHover: share of the distance it drifts in while hovering, 0 to 0.015 (0.015)
degreesnumbernoorbit: degrees round the target, counter-clockwise seen from above; negative turns clockwise (90)
distancenumbernopullOut: metres from the target to the wide shot it ends on, back along the camera's line of sight (the camera's distance, or 8 times the target's half-size when it is closer than its size)
durationnumbernoFrames the move takes, 1 to 10000 (pushIn 45, pushHover 90, orbit 90, craneRise 110, reveal 60, pullBack 45, whip 10, follow 90)
easenumber[]noA cubic-bezier [x1, y1, x2, y2] instead of the preset's main ease (x1 and x2 from 0 to 1)
easeEnds"none" | "in" | "out" | "inOut"noorbit: speed up and slow down only at the ends (none: constant speed throughout)
from"current" | "position"noWhere the move starts: current, where the camera is and how it looks at `start` (the default), so moves chain without a jump; position, round `position` aimed at the target from the first frame (the default when `position` is given)
gapnumbernozoomThrough and pullOut: metres from the surface where the move ends or starts (1.5 times the camera's near clipping distance)
heightnumbernoorbit: height above the target in metres (where the camera is)
leadnumbernofollow: seconds ahead of the object the camera aims, 0 to 10 (0.1)
lensnumbernoFocal length in millimetres to reach by the end, 1 to 5000 (unchanged)
motionBlurbooleannowhip: turn the scene's motion blur on with a 0.5-frame shutter (true); it shows in path-traced renders
offsetnumber[]nofollow: where the camera keeps to, from the object's centre, in metres (the camera's offset at `start`) [x, y, z]
positionnumber[]noWhere the camera is, instead of where it is at `start` (implies `from: "position"`) [x, y, z]
preset"pushIn" | "pushHover" | "orbit" | "craneRise" | "reveal" | "pullBack" | "whip" | "follow" | "zoomThrough" | "pullOut"yesThe move
radiusnumbernoorbit: horizontal distance from the target in metres (where the camera is)
risenumbernocraneRise: degrees the camera rises over the target (25)
scalenumbernocraneRise and reveal: how many times larger the target looks at the start (3, 2.5)
smoothingnumbernofollow: seconds the camera lags behind (a critically damped spring), 0 to 10; 0 sticks rigidly (0.3)
startnumbernoThe first frame of the move (the current frame)
targetinteger | string | number[]noWhat the camera looks at and moves around (required, except for whip from where the camera is); follow: the object it follows
throughbooleannozoomThrough: arrive at full speed instead of slowing to rest, for a cut on the colour that fills the frame (false)
tiltnumbernopushHover: degrees it rises during the push (8)
tointeger | string | number[]nowhip: what the camera swings to
yawnumbernopushHover: degrees the camera swings round the target during the push (34)

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "camera.move", "params": { "preset": <"pushIn" | "pushHover" | "orbit" | "craneRise" | "reveal" | "pullBack" | "whip" | "follow" | "zoomThrough" | "pullOut"> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: amount, camera, creep, degrees, distance, duration, ease, easeEnds, from, gap, height, lead, lens, motionBlur, offset, position, radius, rise, scale, smoothing, start, target, through, tilt, to, yaw. scene_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "amount": {
      "description": "pushIn: share of the distance closed (0.3); pushHover: share closed by the push (0.22); pullBack: how many times farther it ends (1.6)",
      "type": "number"
    },
    "camera": {
      "description": "The camera; the scene's camera when left out",
      "oneOf": [
        {
          "description": "the object's id",
          "type": "integer"
        },
        {
          "description": "the object's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "creep": {
      "description": "pushHover: share of the distance it drifts in while hovering, 0 to 0.015 (0.015)",
      "type": "number"
    },
    "degrees": {
      "description": "orbit: degrees round the target, counter-clockwise seen from above; negative turns clockwise (90)",
      "type": "number"
    },
    "distance": {
      "description": "pullOut: metres from the target to the wide shot it ends on, back along the camera's line of sight (the camera's distance, or 8 times the target's half-size when it is closer than its size)",
      "type": "number"
    },
    "duration": {
      "description": "Frames the move takes, 1 to 10000 (pushIn 45, pushHover 90, orbit 90, craneRise 110, reveal 60, pullBack 45, whip 10, follow 90)",
      "type": "number"
    },
    "ease": {
      "description": "A cubic-bezier [x1, y1, x2, y2] instead of the preset's main ease (x1 and x2 from 0 to 1)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "easeEnds": {
      "description": "orbit: speed up and slow down only at the ends (none: constant speed throughout)",
      "enum": [
        "none",
        "in",
        "out",
        "inOut"
      ],
      "type": "string"
    },
    "from": {
      "description": "Where the move starts: current, where the camera is and how it looks at `start` (the default), so moves chain without a jump; position, round `position` aimed at the target from the first frame (the default when `position` is given)",
      "enum": [
        "current",
        "position"
      ],
      "type": "string"
    },
    "gap": {
      "description": "zoomThrough and pullOut: metres from the surface where the move ends or starts (1.5 times the camera's near clipping distance)",
      "type": "number"
    },
    "height": {
      "description": "orbit: height above the target in metres (where the camera is)",
      "type": "number"
    },
    "lead": {
      "description": "follow: seconds ahead of the object the camera aims, 0 to 10 (0.1)",
      "type": "number"
    },
    "lens": {
      "description": "Focal length in millimetres to reach by the end, 1 to 5000 (unchanged)",
      "type": "number"
    },
    "motionBlur": {
      "description": "whip: turn the scene's motion blur on with a 0.5-frame shutter (true); it shows in path-traced renders",
      "type": "boolean"
    },
    "offset": {
      "description": "follow: where the camera keeps to, from the object's centre, in metres (the camera's offset at `start`) [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "position": {
      "description": "Where the camera is, instead of where it is at `start` (implies `from: \"position\"`) [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "preset": {
      "description": "The move",
      "enum": [
        "pushIn",
        "pushHover",
        "orbit",
        "craneRise",
        "reveal",
        "pullBack",
        "whip",
        "follow",
        "zoomThrough",
        "pullOut"
      ],
      "type": "string"
    },
    "radius": {
      "description": "orbit: horizontal distance from the target in metres (where the camera is)",
      "type": "number"
    },
    "rise": {
      "description": "craneRise: degrees the camera rises over the target (25)",
      "type": "number"
    },
    "scale": {
      "description": "craneRise and reveal: how many times larger the target looks at the start (3, 2.5)",
      "type": "number"
    },
    "smoothing": {
      "description": "follow: seconds the camera lags behind (a critically damped spring), 0 to 10; 0 sticks rigidly (0.3)",
      "type": "number"
    },
    "start": {
      "description": "The first frame of the move (the current frame)",
      "type": "number"
    },
    "target": {
      "description": "What the camera looks at and moves around (required, except for whip from where the camera is); follow: the object it follows",
      "oneOf": [
        {
          "description": "an object's id (its bounding box's centre)",
          "type": "integer"
        },
        {
          "description": "an object's name (its bounding box's centre)",
          "type": "string"
        },
        {
          "description": "a point [x, y, z] in metres",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "through": {
      "description": "zoomThrough: arrive at full speed instead of slowing to rest, for a cut on the colour that fills the frame (false)",
      "type": "boolean"
    },
    "tilt": {
      "description": "pushHover: degrees it rises during the push (8)",
      "type": "number"
    },
    "to": {
      "description": "whip: what the camera swings to",
      "oneOf": [
        {
          "description": "an object's id (its bounding box's centre)",
          "type": "integer"
        },
        {
          "description": "an object's name (its bounding box's centre)",
          "type": "string"
        },
        {
          "description": "a point [x, y, z] in metres",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "yaw": {
      "description": "pushHover: degrees the camera swings round the target during the push (34)",
      "type": "number"
    }
  },
  "required": [
    "preset"
  ],
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.