Answered

How to compare/diff two clips?

Anonymous 3 years ago updated by Peter - Soxware Developer 3 years ago 5

Is there any way to take two clips that are similar but not identical, and diff them to get a frame-by-frame report on what the difference between the two is?

Use case:  I have a rigged character with three walk animations: walk straight, walk turning left, and walk turning right.  I have another rigged character that only has a walk straight animation.  The two rigs are not compatible, so I can't just add the clips from character 1 to character 2.  Instead, I want to analyze the difference between the straight and the turning walk clips, so I can duplicate the walk-straight clip on character 2 and turn it into a turning clip.

UMotion Version:
1.22p14
Unity Version:
2019.4.12f1

Answer

Answer
Answered

Hi,
thank you very much for your support request.

You can sync UMotion with Unity's Animation Window (or Unity Timeline). That way you can preview the turning animation on one character using one of Unity's windows, and the one you want to edit/adjust using UMotion. The frame cursors are synchronized which makes comparing the animations very easy.


See it in action: https://www.facebook.com/1783887595207715/videos/1968103476786125/

For more information regarding the sync feature, please check out the manual at the "Unity Timeline Integration" chapter. There is also another video where you can see the sync feature (using Unity Timeline) in action:

Please let me know in case you have any follow-up questions.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

You can sync UMotion with Unity's Animation Window (or Unity Timeline). That way you can preview the turning animation on one character using one of Unity's windows, and the one you want to edit/adjust using UMotion. The frame cursors are synchronized which makes comparing the animations very easy.


See it in action: https://www.facebook.com/1783887595207715/videos/1968103476786125/

For more information regarding the sync feature, please check out the manual at the "Unity Timeline Integration" chapter. There is also another video where you can see the sync feature (using Unity Timeline) in action:

Please let me know in case you have any follow-up questions.

Best regards,
Peter

This appears to be about editing two things visually, in sync with one another.  What I'm looking for is not visual editing, but rather a diff, textual report on how two things diverge from one another, that I can analyze and comprehend its principles to apply them elsewhere.

A textual diff/report wouldn't be of much use as it would just be a huge row of numbers (e.g. angular differences per frame per bone).

With the sync feature, you can do a visual diff (and if desired, make adjustments accordingly). You can even put the two characters exactly at the same origin/position and give them both a half transparent material to make it even easier to spot differences.


Best regards,
Peter

A textual diff/report wouldn't be of much use as it would just be a huge row of numbers (e.g. angular differences per frame per bone).

Yes, and that would be of immense use to me.  A bunch of exact numbers are far more precise than trying to eyeball a bunch of points in 3D space projected onto a 2D plane that can only ever be viewed from one angle at a time!

I would create the analysis myself, but that's not exactly possible when the project doesn't come with source.

If you really need such a log file, you can write a simple script to generate it. Just let Unity play both animations (at runtime) simultaneously on two instances of your character. The assigned script should then measure the differences of each bone/transform and log them to a file. Should be doable in a few lines of code.

Best regards,
Peter