- C# 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| external | ||
| patches | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| global.json | ||
| README.md | ||
Rewind
The After Effects of CS2: open any CS2 demo and get a live 3D scene, rendered with the game's real assets from your CS2 install (never shipped with the app). No game launch, no HLAE, no VAC concerns.
Status: v0.1 proof of concept
- Demo parsing (DemoFile.Net): per-tick positions, aim, velocity, crouch, weapon; kills; rounds
- Map rendering via ValveResourceFormat's renderer (PBR, lightmaps, shadows, sky)
- Players as CS2 agent models, animated by CS2's own world-model anim graph fed from demo data
- Playback: POV / chase cam / free cam, seek, speed, jump to rounds and kills
- Gunfire: muzzle flashes (from each weapon model's shoot events), tracers (weapons.vdata), impact decals and particles, blood; recoil (aim + view punch) in POV and on the viewmodel
- Utility: grenades in flight, HE and flash blasts, molotov/incendiary fires (CS2's groundfire effect fed fire snapshots like the game), flashbang whiteout, smokes (map-aware voxel fill on CS2's smoke grid, marched like CS2's decompiled smoke_volume_cs)
- Scoped POV: zoom FOV from the demo, CS2's sniper scope overlay (Z or --noscope turns it off)
- Sound: CS2 sound events for shots, surface footsteps per side, grenades, hits (WASAPI)
- CS2 kill feed to the game's own stylesheet and icons; H cycles full HUD / kill feed only / none
--shotheadless-ish capture for automated visual checks
Build & run
Requires the .NET 11 SDK and CS2 installed.
git submodule update --init
git -C external/vrf apply ../../patches/vrf-rewind.patch
dotnet run -c Release --project src/Rewind -- <demo.dem|demo.dem.zst> [--pov <name>] [--at round:N|kill:N|death:N|stab:N|slash:N|<sec>] [--chase] [--free] [--cam x,y,z,pitch,yaw] [--clean|--nohud] [--noscope] [--skins] [--shot out.png]
Keys: space play/pause, left/right seek 5s (shift 30s), up/down speed, PgUp/PgDn round, J/K prev/next kill, 1-0 / Tab POV player (first person with viewmodel), T chase cam, F free cam, H HUD mode, Z scope on/off (WASD, hold right mouse to look), F11 fullscreen, Esc quit. Timeline at the bottom: click/drag to scrub, mouse wheel to zoom.
Vendored renderer
external/vrf is ValveResourceFormat (MIT), pinned. patches/vrf-rewind.patch exposes
its internal CS2 player animator to this assembly (signed with VRF's public dev key for that reason)
and adds a weapon-skin paint layer to the csgo_weapon shader.