Skip to content

feat: camera paths that circle the player, for HLAE (Stage 4 M6) - #64

Merged
duffarn-dev merged 1 commit into
developfrom
feat/orbit-campath
Nov 4, 2026
Merged

duffarn-dev merged 1 commit into
developfrom
feat/orbit-campath

Conversation

@duffarn-dev

Copy link
Copy Markdown
Owner

Stage 4 M6, part J: the camera path for the user's idea "film so we see the whole character", as an orbit around the player at the climax kill. With #60 (a clip's cfg), a clip can load the path:

mirv_campath clear
mirv_campath load "C:/fragforge-jobs/campaths/<file>.xml"
mirv_campath enabled 1

lib/campath.py:

  • orbit_samples(demo, steamid, ticks) gets the player's position and game_time at a few ticks from demoparser2, plus their view yaw at the first.
    • game_time is the time base mirv_campath uses. The tick isn't.
    • With demoparser2's own value, there's no server_start_tick to work out: the demo header doesn't have it.
  • orbit_keys places the camera:
    • 140 units from the player, 30 above the eyes
    • starting behind them and swinging 140° around
    • always aimed at the head
    • following the player as they move
  • campath_xml writes what mirv_campath save writes: <campath><points><p t x y z fov rx ry rz/>, where rx is roll, ry pitch and rz yaw. It adds a guard key one tick outside each end so the path eases in and out, and unwraps the yaw so the spline doesn't spin a full turn at ±180°.

The format and the two traps come from cs2cinema's notes, which were tested with HLAE 2.192 in October 2026. Only the facts are used; that repo has no license.

Nothing uses this in a film yet. The M6 spike renders it first, with the user: one job of the Stage 4 climax clip four ways (POV, spec_mode 3 in the cfg, spec_mode 3 through mirv_cmd, and this orbit). It needs the new worker.py on the render PC (already copied) and a restart. The spike answers whether the camera goes through walls, whether the timing is right, and whether it looks good enough to become a feature.

How it was tested

tests/test_campath.py (new):

  • look_at in Source's convention
  • the orbit:
    • radius, height, behind the player halfway
    • a 140° sweep
    • aimed at the head (0.000° off)
    • follows a moving player
  • the XML:
    • HLAE's layout and all attributes
    • the guard keys
    • rising game time
    • no yaw step over 90° while passing 180°

A path made from the real demo: 13 keys around the climax kill at game time ~1290.0 s, following the player as they run.

🤖 Generated with Claude Code

lib/campath.py turns the player's positions at a kill into an orbit (behind
them, swinging 140 degrees around, aimed at the head) and writes it as
mirv_campath XML in the demo's game time, with guard keys and the yaw
unwrapped. Nothing uses it in a film yet: the M6 spike renders it first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duffarn-dev duffarn-dev added this to the v0.4.0 milestone Nov 4, 2026
@github-actions github-actions Bot added the feature A new feature or effect label Nov 4, 2026
@duffarn-dev
duffarn-dev merged commit ebb5cc1 into develop Nov 4, 2026
5 checks passed
@duffarn-dev
duffarn-dev deleted the feat/orbit-campath branch November 4, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature or effect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant