unity_animation_keyframe__compressor

0

Описание

Доработанный и исправленный форк проекта для сжатия анимационных клипов

https://github.com/txtxj/Unity-Animation-Compression-Keyframe-Reducer

Языки

  • C#100%
README.md

Keyframe Reducer In Unity

Solution

Read the animation curve into several tracks, each track compressed independently.

First, all components of the same variable are combined and stored in the

IKeyframeBase
implementation.

Then, for each curve, determine whether each keyframe can be interpolated by the two keyframes before and after it, and if so, this frame can be deleted.

Usage

The only interface is

You can use the scripts under inside the Editor:

  1. As Context Menu of file (
    RMB
    ->
    Citrine
    ->
    Fast Keyframe Reduction
    ):
  1. As Menu Item for selected file (
    Assets
    ->
    Citrine
    ->
    Fast Keyframe Reduction
    ):
  1. As Window (
    Tools
    ->
    Citrine
    ->
    Keyframe Reducer
    )

Advanced

You can easily derive curve classes of other data types and compress them by implement

IKeyframeBase<T>
and
AnimationCurveBase<T>
, and then add an error function to KeyframeReducer.

Result

Single Curve:

Origin

Reduced

Model Animation:

Model source: https://github.com/fish-ken/unity-animation-compressor

beforeafter
Attack176.3168.1
Dash97.787.9
Skill446.3415.0
Walk78.174.8

Error Rate: 0.5%

Reference