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
| Name | Type | Required | Description |
|---|---|---|---|
amount | number | no | 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) |
camera | integer | string | no | The camera; the scene's camera when left out |
creep | number | no | pushHover: share of the distance it drifts in while hovering, 0 to 0.015 (0.015) |
degrees | number | no | orbit: degrees round the target, counter-clockwise seen from above; negative turns clockwise (90) |
distance | number | no | 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) |
duration | number | no | Frames the move takes, 1 to 10000 (pushIn 45, pushHover 90, orbit 90, craneRise 110, reveal 60, pullBack 45, whip 10, follow 90) |
ease | number[] | no | A 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" | no | orbit: speed up and slow down only at the ends (none: constant speed throughout) |
from | "current" | "position" | no | 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) |
gap | number | no | zoomThrough and pullOut: metres from the surface where the move ends or starts (1.5 times the camera's near clipping distance) |
height | number | no | orbit: height above the target in metres (where the camera is) |
lead | number | no | follow: seconds ahead of the object the camera aims, 0 to 10 (0.1) |
lens | number | no | Focal length in millimetres to reach by the end, 1 to 5000 (unchanged) |
motionBlur | boolean | no | whip: turn the scene's motion blur on with a 0.5-frame shutter (true); it shows in path-traced renders |
offset | number[] | no | follow: where the camera keeps to, from the object's centre, in metres (the camera's offset at `start`) [x, y, z] |
position | number[] | no | Where 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" | yes | The move |
radius | number | no | orbit: horizontal distance from the target in metres (where the camera is) |
rise | number | no | craneRise: degrees the camera rises over the target (25) |
scale | number | no | craneRise and reveal: how many times larger the target looks at the start (3, 2.5) |
smoothing | number | no | follow: seconds the camera lags behind (a critically damped spring), 0 to 10; 0 sticks rigidly (0.3) |
start | number | no | The first frame of the move (the current frame) |
target | integer | string | number[] | no | What the camera looks at and moves around (required, except for whip from where the camera is); follow: the object it follows |
through | boolean | no | zoomThrough: arrive at full speed instead of slowing to rest, for a cut on the colour that fills the frame (false) |
tilt | number | no | pushHover: degrees it rises during the push (8) |
to | integer | string | number[] | no | whip: what the camera swings to |
yaw | number | no | pushHover: degrees the camera swings round the target during the push (34) |
Call through scene_run
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
{
"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.