Skip to content

InsideDev 0.9.0

Choose a tag to compare

@sashaok123 sashaok123 released this 30 Oct 07:15

Film a planned camera over live play, from the game's own picture

Two console commands of the Play extension turn a camera plan into a real film of the running game. Both run only when
called and are stopped by restore or a game quit; nothing changes for anyone who does not use them.

  • Live director camera (campath). The main game camera follows a pose path planned in advance (mcam passes writes
    one for every camera of a MultiCam spec, or any script can write the two CSV files) while the game itself plays. Every
    frame is the game's own picture: live particles, shaders animated by time, mod effects and temporal anti-aliasing,
    which a replay of a recording cannot fully rebuild. The pose goes on the camera in Camera.onPreCull, after the game's
    camera script, so the game's camera logic, its culling and the input are untouched. In director mode the plan also
    drives the clock: the game is held still during the plan's pauses and runs at the plan's speed otherwise, with the drift
    corrected (measured under 0.04 s). campath mount rides the camera on a transform, for example the boy's head for a
    first-person pass, with optional smoothing of the head bob, a level horizon and timed looks at points or objects.
  • Video of the game's own frames (grec). At the end of every n-th rendered frame the back buffer is copied on the
    GPU by the native InsideReadback plugin; a background thread hands the frames to a separate ffmpeg process that
    encodes them with NVENC H.265. Windows over the game, focus changes and other programs never reach the file, unlike the
    desktop recorder of 0.8.0. 2560x1440 at 30 fps: 3222 frames grabbed, 0 dropped (laptop, RTX 3070 Laptop GPU).
  • Input tracks wait for the director camera. While campath holds the game still, an input_track playback no longer
    ends as stalled.

Where the work runs. The heavy part of grec runs off the game's main thread: the copy happens on the GPU on the
render thread, the hand-over on a background thread, the encoding in a separate ffmpeg process on the video engine of the
graphics card, so Windows spreads it over other CPU cores and the game keeps its frame time. Anything that touches game
objects (the camera pose, state, input) still runs on the game's main thread, as Unity 5.0 requires. Nothing is pinned to
a particular CPU core.

How to use them: docs/PLAY.md section 4.6 and workflow 7.7.

Everything you need is in the zip: copy bin\InsideDev.dll, bin\InsideDev.Mcp.dll and bin\InsideDev.Play.dll over the old ones in <game>\_mod\ (and tools\mcp\InsideDev.McpStdio.exe if you use the stdio launcher).