Files
ReSkate/Extension/ReplayKeyframes/replay_settings.h
T
samitakkulaandClaude Opus 5.5 51dddf3d91 Keyframe smoothing for the replay editor's free camera
The game plays the replay camera's framing keys as cubic Hermite segments whose speed changes at
every key (the acceleration jumps there, and it brakes where a channel slows or turns back), so a
free-camera shot surges and settles around each key. keysmooth on rewrites each segment as the game
builds it, so that the game's own player plays the natural cubic spline through every key: speed
and acceleration carry on through the keys, and every key is still met exactly, at its time.

- keysmooth on|off (off by default), keysmooth amount 0..1 (1 by default; 0 is the game's curve)
  and keysmooth status; kept in %LOCALAPPDATA%\ReSkate\KeySmooth.settings. Only the free camera
  (Behaviour 1) is smoothed; the other camera modes keep the game's curve.
- A switch in Mod Options > Visuals and in the overlay's Skater > Freecam.
- The curve apart from the game, with tests (DINGOSDK_BUILD_REPLAY_KEYFRAMES_TESTS); the hooked
  functions are fingerprinted, and a build that differs gets no hook.
- contrib/keyframe-smoothing.md: what it does, how, and what was seen in game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 08:33:32 -07:00

16 lines
608 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <string>
#include <string_view>
// Keyframe smoothing's settings as the player left them, kept between game runs
// (%LOCALAPPDATA%\ReSkate\KeySmooth.settings, a line each: on=1, amount=1).
namespace dingosdk::replay_keyframes {
struct Settings {
bool on = false; // off: the game's own curve, whatever the rest says
float amount = 1.0f; // smoothness σ when on, 0..1
};
std::string to_text(const Settings& settings);
// Lines it doesn't know, or values out of range, keep the defaults.
Settings from_text(std::string_view text);
} // namespace dingosdk::replay_keyframes