0 votes
asked in General Help by Advanced User (420 points)
Is it possible to trigger animation events when previewing in the Clip Editor?

We have an animation event triggered function that changes facial expressions. It's be great if we were able to preview this while scrubbing through the Clip Editor timeline while animating the rest of the body in UMotion.

1 Answer

0 votes
answered by Expert (80k points)
selected by
Best answer
thanks for your feature request.

How are the facial expressions implemented? Are these blend shapes? You might consider animating blend shapes directly in that case (using the Custom Property Constraint)?

I have some a few concerns with such a feature: The code you write for animation events is often not designed to be executed during edit time. Remember that during edit time the methods Start(), Update(),... are either not called or have a different behavior than during in-game. That means that you might not have access to local variables that would have been initialized in Start() and so on.
Also some Unity methods have different behavior when used during edit time (removing a object for example will remove it from the scene without a possibility to undo that)...

I know that this might not be an issue for an experienced programmer, but it might be easy for less advanced users to break things.

Best regards,
commented by Advanced User (420 points)

The facial expressions are using a UV texture offset to display different parts of what is essentially a sprite sheet. This is a common technique for cartoon animation - where you have a 2D face on a 3D body.

I understand the potential danger of allowing users to call methods that are not consistent between edit-time and game-time. It would be great to have an option to enable this feature for more advanced users - perhaps hidden away in the settings menu.

The current workflow to preview the results of animation events is very slow:

  1. Set Animation Event Keyframe in UMotion
  2. Export Animation Clip
  3. Exit UMotion
  4. Select Timeline
  5. Add animation track
  6. Add animation clip to animation track
  7. Play Game mode
It would greatly improve our ability to iterate if we were able to view the facial expression changes directly by scrubbing through the UMotion Clip Editor.
commented by Expert (80k points)

thanks for detailing your use case. That helps me understand your situation.

In the past you've tried animating the texture values directly: http://support.soxware.com//471/animating-settextureoffset?show=471#q471

Do you have a specific reason why you switched to animation events?

As mentioned in your last support request, previewing the texture animation is not supported in UMotion yet but I have this on my to-do list for the next update. I personally like this approach more because there is no risk with calling user code from within Unity. What do you think?

Best regards,

Soxware Support

Here you get official product support by the developer and the community for all Soxware Products for Unity®.

Post as guest, login via Facebook or create an account.

Ask questions, report bugs or provide feedback. Please use the correct category and always post in english.

For private email support, please use the Support Form to create a support ticket.

Copyright © 2017 Soxware Interactive | All Rights Reserved | Impressum