A Unity editor tool that automatically reduces AnimationClip asset size via RDP compression that converts Stream curves to Constant + missing-binding cleanup
Problem
Character AnimationClip assets are excessively large.
Curves whose values never actually change are also stored as Stream (keyframe-based), which is wasteful
Bone/component-path bindings that vanished when the character rig changed remain in the clips
Manually optimizing hundreds of clips is not realistic
Constraints
Animation quality must not change after compression — if tolerance is exceeded, keep the original automatically
Previously, converting to Linear Tangent caused animations to stutter visibly
Implementation
01
1. RDP keyframe compression
Convert Stream → Constant for curves with no variation or with deltas inside the tolerance.
After compression, validate the actual curve error and automatically retain the original when tolerance is exceeded.
Unify on SetEditorCurve instead of clip.SetCurve() → prevents YAML format duplication (fixes a bug where the previous approach actually increased size)
Tangent: Linear → ClampedAuto — resolves the prior stutter issue and allows a more generous error tolerance
Expanded the Weighted-mode removal scope to all non-Rotation curves
02
2. Missing-binding cleanup
Automatically detect and remove bindings whose bone/component paths no longer exist in the prefab.
Auto-locate prefabs via the Animation/ → Prefab/ folder mapping
Handles all curves including Rotation, plus ObjectReference curves (Sprite swap, etc.)
Built-in safety check for mixing different character folders — must run per Cookie (per character folder) to behave correctly
03
3. Safety-first design
Risky options like Scale removal and missing-binding cleanup are OFF by default
"Test Run" button — preview results before actually applying
Settings are auto-persisted via EditorPrefs (survives window close)
Conclusion
Results
Single clip (CH_MelonSoda_A001_Emotion_Happy_01)
Before
After
Reduction
File size
468.3 KB
290.9 KB
−37.9%
Stream curves
257
206
−51
Constant curves
263
314
+51
Batch (CH_MelonSoda 50 clips)
Value
Clips processed
50
Keyframes
565,028 → 231,918 (−333,110)
Bindings
26,891
Removed bindings
7,839
Before / After
Before / After compression
Default (0.0005) compression Before / After
BEFORE
AFTER
Tradeoffs & Future Work
Tradeoffs
Missing-binding cleanup must be run per character folder — running across mixed character folders can cause false positives
The default tolerance (0.0005) suits most characters, but special motions need a separate check
Future Work
A shared editor tool for all characters — a self-service structure the animation team uses directly
애니메이션 압축 · Cookie Run: Oven Smash · Choi Hongsu · Hongsu