Auto Director

5min read
Sheet 42 of 47 · Filming

The auto director films a place without a shot list. /scan finds the player builds around a point and ranks them, /autofilm plans camera angles that can see each of the best ones and films them, and /edl writes the plan or the result out as a timeline. Like the rest of filming, it is API only. /autofilm, /edl, /produce and /render need the API token in the default token mode, /scan only reads and does not.

curl "localhost:8767/takeover?bot=Cam" -H "X-ITT-Token: $TOKEN"
curl "localhost:8767/scan?bot=Cam&x=120&z=-40&radius=48"
curl "localhost:8767/autofilm?bot=Cam&x=120&z=-40&top=3" -H "X-ITT-Token: $TOKEN"

Scan

/scan looks at every block in a box around x, z:

  • A block counts as built when it is solid, its name holds a building word (planks, bricks, glass, wool, concrete, stairs, slab, fence, door, lantern and about thirty more) and it is not natural terrain such as stone, dirt, logs, leaves or ore.
  • Built blocks are grouped into 8 block cells, touching cells are merged into one structure, and each structure gets a score from its block count, height, number of materials and how dense it is.
  • The scan stops after 250000 built blocks.
ParameterDefaultMeaning
botThe bot (usually taken over) whose world is read
x, zThe centre
radiusscanRadius (48)1 to 96
ymin, ymax170 below to 40 above the botThe height band, both or neither

The answer holds the 15 best structures, each with center, bbox, size, materials, topY, span (width, height, depth), score and a suggested orbit distance, plus how many were found.

Autofilm

/autofilm scans, then for each of the top structures plans the shots and films them.

Planning. It tries orbit rings of the suggested distance (and 0.8, 1.3, 1.8 and 2.4 times it) at 8 bearings, and keeps the ring with the most clear shots, then adds aerials above the roof. A shot counts as clear when the camera's own block is open and it can see at least one of six points on the build. The path the camera travels during the move is not checked.

ParameterDefaultMeaning
bot, x, z, radius, ymin, ymaxAs for /scan
top3Structures to film, 1 to 15
maxShotsautofilmMaxShots (12)Shots across the whole run, 1 to 60. Structures past it are listed with maxShots reached
drivefilmDrive (cine)See Drives. A name that is not a drive is an error
recorderfilmRecorder (internal)recorder=obs without an obsScript is refused before anything is filmed
stageBotsAccounts to stage around each build, with host, port, version
seedrandomFixes the variety below, so the same seed plans the same run
time, weather, particles, hud, fps, hzPassed to every shot
light=auto or bestLightbestLightDefault (false)Picks a time of day from the sun angle, off when time is given

Variety. With a seed, or with autofilmSeedVariety on (the default), each structure gets small changes: the bearing within 15 degrees, the orbit within 15 percent, the pitch within 5 degrees, some of the medium, close and detail shots dropped (at least two moves stay), a time of day out of day, gold and night, and particles half of the time.

The answer lists every structure with its rank, whether it was planned, a reason when not (no clear camera angle found, maxShots reached), the bearing, orbit, light and variety it got, and its clips.

Timeline export

/edl writes a timeline next to the clips, as <name>.edl.json and <name>.csv, in the film folder or dir.

curl -H "X-ITT-Token: $TOKEN" "localhost:8767/edl?bot=Cam&x=120&z=-40&plan=1&name=spawn-tour&bpm=120"
curl -H "X-ITT-Token: $TOKEN" -X POST "localhost:8767/edl?name=spawn-tour" -d @autofilm-result.json
  • With plan=1 (or no body) it scans and plans like /autofilm, takes the same parameters, and films nothing. Each shot lasts its ms.
  • With an /autofilm result as the body it lays out the clips that were filmed, clipSeconds (4) each.
  • bpm adds beat times, music and concept are written into the file as given.
  • The CSV columns are subject,rank,shot,x,y,z,yaw,pitch,move,duration,in,out,clip. It is a JSON and CSV timeline, not a CMX 3600 EDL.

Render kit

Config keybuild.cjs/produce runs /autofilm and hands each build's clips to an external Node render kit, and /render runs that kit on one concept file. The kit is a folder with a build.cjs that the tool calls as node build.cjs <concept> --out <file>. It is not part of IgniteTestTool. Point renderKitDir (Settings > Auto director) at it, or pass kitDir= on the call, which wins.

RouteParameters
/producekitDir (renderKitDir), shortsPerBuild (1, at most 3), maxShorts (produceMaxShorts, 6, at most 24), renderTimeout (renderTimeoutSeconds, 1200 s, 30 to 3600), outDir (out in the kit), seed, endCardUrl, cta, grade, and every /autofilm parameter
/renderkitDir (renderKitDir), concept (a file inside the kit), out, timeout (renderTimeoutSeconds, 1200 s, 30 to 3600)

/produce writes one concept file per short into the kit's my folder and returns, per short, the concept, the output file and the last 60 lines of the kit's log, plus the endCard address it used, or null.

What goes into a short comes from Settings > Auto director, picked at random per short with the seed:

KeyWhat it sets
produceConcepts, produceStyles, produceAccentsThe kit template, the music style and the accent colour. An empty list stops /produce with produceConcepts is empty (or the other two)
produceLinesThree of them go on screen
produceGradeThe CSS filter of the short, grade= on the call wins. Empty sends none
produceFpsThe fps of the short, 30
produceEndCardUrlThe address on the end card, endCardUrl= on the call wins. Empty leaves the end card out, so a short never shows a server nobody set
produceEndCardCta, produceTaglinesThe button text (Join, cta= wins) and one tagline on the end card

When something is missing the call says what to do:

ErrorFix
no render kit set: /render and /produce run build.cjs from a shorts render kit with nodeSet renderKitDir or pass kitDir=
render kit folder X does not existThe path is wrong
no build.cjs in X, renderKitDir must point at the shorts kit folderPoint it at the kit folder itself, not one above it
could not start node, install Node.js or set nodePath in Settings > FilmingNode is not on the PATH

Loading the index

Enter openUp Down moveEsc close