Answered

Clarify workflow for editing animations 'in place'

Kennard Consulting 1 year ago updated 1 year ago 8

At the moment, I:

1. Start my scene running

2. Watch my character animate to a certain point (that I want to fix)

3. Pause my scene running

4. The 'Pose Editor' says 'Select a GameObject to animate' with 'None (GameObject)'. So I drag my character into the Pose Editor box

5. My paused character's animation resets to frame 0

Is this intentional? Can I jump into UMotion at the exact frame that is currently paused, without it resetting?

Note that after I unpause the 'Pose Editor' resets back to 'None (GameObject)'.

UMotion Version:
1.29p02
Unity Version:
3.3.1

Answer

Answer
Answered

Hi,
thank you very much for your support request.

Is this intentional? Can I jump into UMotion at the exact frame that is currently paused, without it resetting?

Your runtime pose can be a mix of several animations (if e.g. the runtime animator is doing a transition or if you use animation layers to animate separate parts of the character with separate animations). When you assign a character to thePose Editor,  UMotion just previews the animation it has currently loaded in the clip editor (and the frame where the frame cursor is currently pointing at in the Clip Editor).

Note that after I unpause the 'Pose Editor' resets back to 'None (GameObject)'.

Yes that's intentional and necessary for the runtime Animator to take over again.

Best regards,
Peter

I should note I am using a runtimeAnimationController and setting the animation dynamically at runtime.

Answer
Answered

Hi,
thank you very much for your support request.

Is this intentional? Can I jump into UMotion at the exact frame that is currently paused, without it resetting?

Your runtime pose can be a mix of several animations (if e.g. the runtime animator is doing a transition or if you use animation layers to animate separate parts of the character with separate animations). When you assign a character to thePose Editor,  UMotion just previews the animation it has currently loaded in the clip editor (and the frame where the frame cursor is currently pointing at in the Clip Editor).

Note that after I unpause the 'Pose Editor' resets back to 'None (GameObject)'.

Yes that's intentional and necessary for the runtime Animator to take over again.

Best regards,
Peter

Okay I understand your reasons, but it does make it rather unhelpful for me. I need to be able to pause my scene and edit my model 'as is'.

At the moment, I can get close if I a) know what clip is playing and b) know what frame it is on. I can do that, and I can preset the Clip Editor with both of those. But when I drag my GameObject into the Pose Editor, although it displays the correct clip with the correct frame, it moves the model (based on the root motion from the start of the animation, I presume).

Is there any way I can select the GameObject and have it ready to edit without it also moving?

Is there any way I can select the GameObject and have it ready to edit without it also moving?

UMotion uses the current scene position of the model as starting position for it's root motion preview. That's why you see it shifting if you are currently not previewing frame 0. You could disable the root motion preview in UMotion as a workaround though ("RM" button in the playback section of the pose editor).

I need to be able to pause my scene and edit my model 'as is'.

For simple cases (where animation transitions etc. are not considered) you could do some custom scripting by using the UMotion API to automatically load the correct animation at the correct frame. You could also apply the reverse of the root motion first before assigning the character to the Pose Editor to have it standing at the correct position. But this would require you to read the root motion information from the current animated clip (in the Animator Controller). Not sure if it is possible to even get this 100% accurate.

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


Best regards,
Peter

> You could disable the root motion preview in UMotion as a workaround


This sounds promising. I had not noticed this button (blue 'RM', in the bottom bar?) because it's always greyed out for me (locked on). What causes it to be greyed out?

Oh I see now. The 'RM' button is only available when using 'looping animation'.


I tried 'tricking' UMotion by enabling looping motion for my project, disabling 'RM', then disabling looping motion again. However it appears UMotion ignores this 'RM' setting for my use case (i.e. if I preset the correct animation clip and frame in the Clip Editor, then drag my GameObject into the Pose Editor, I do not want UMotion to apply the Root Motion when it 'swaps in' the clip).

Could you please fix this?

Ah sorry this was my fault, I wrote this out of my had but the docs clearly state that the 'RM' button functions differently:

When enabled, the root motion of the animated character is not reset once the playback reaches the end and loops to the first frame. If root motion is not enabled in the current animation clip, this setting has no effect (see Root Motion).

But you could cancel your root motion by adding an overriding animation layer to the root bone. Add just a single key frame at frame 0 to the override layer. Then use the mute button of the override layer to enable/disable root motion preview. Make sure to have the override layer muted when you export your animation, otherwise no root motion is going to be included in the exported anim. More info about animation layers: https://www.soxware.com/umotion-manual/Layers.html


Let me know if that works for you.

Best regards,
Peter

I'd say there's an argument to have RM function in an enhanced way for non-looping cases :)

Anyway, your suggestion about using the UMotion API was a good one. I coded up what I needed. Thanks.