Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by TheSwain · Apr 07, 2015 at 01:36 AM · mecanimmasktransitionlayerlayermask

What is the proper way to blend between two Mecanim States in a Layer, when both animation clips have different Masks?

Thanks for the help in advance. This is the first time when rigorous Google and Unity forum searching has not given me any kind of answer.

The Scenario:

I have two Layers in Mecanim. Layer 0 contains all everyday full-body animations (idle, running, dodging, etc). Layer 1 is an Override layer which has the things that appear over top of a character, which overrides all or some of the animations underneath (blocking, hand gestures, etc). Some clips like blocking have leg motions masked out so you can still run. Others, like hand motions, have all but the arm masked out so you can wave to friends while doing anything else.

The Problem:

During transitions between two states in Layer 1 (Override Mask Layer), and ONLY during transitions, any parts of my character armature that use a Mask on EITHER state where the masks don't identically match...slowly transition into the Base Pose (T-Pose) of the armature. When the transition completes, the character snaps to his properly masked pose.

So, an example: if a Hand Wave animation has everything masked out but the arm/hand/fingers, and I try to transition into a base Idle pose with nothing masked, everything but the arm will snap to Base Pose (T-Pose) and transition into the Idle from there. The other way around (Idle->Wave), the character will transition from Idle to T-Pose (except the arm, again), then when the transition ends, snap to where he ought to be in his Hand Wave animation.

Keep in mind, this only occurs when two animation clips do not have the same parts masked. Any parts that are both either MASKED or UNMASKED do what they ought to.

Also, I cannot use Avatar Masks because in [Override] Layer 1, the same parts won't always be masked. Hence the problem.

The Solution?

I understand that you can't transition from a keyframe to an absent keyframe, if that's what masks actually are. Yet when the transition completes, the character's parts are in their proper place, so I know that works. How can I transition into that proper place?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TheSwain · May 04, 2015 at 06:18 PM 0
Share

I've tried cracking this many more times over the last month, still having difficulty with this problem. I'm eager to hear about workarounds, even, if there is no solution.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by drolak · Oct 07, 2015 at 12:08 PM

I had similar problems when my clips didn't animate some curves or simply when had states without animation. There's this "write defaults" checkbox on the animation state.

From the docs: Write Defaults Whether or not the AnimatorStates writes back the default values for properties that are not animated by its Motion.

Did you try to uncheck it?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Mecanim- change Layer mask at runningTime 0 Answers

Dealing with multiple crosshairs 0 Answers

Layer hidden in Scene view, visible in game 3 Answers

Detecting that I'm clicking a unit even though I'm not? 0 Answers

LayerMask is incorrect 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges