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
1
Question by LukaKotar · Mar 31, 2013 at 11:30 PM · mecanimissue

Body Mask feature broken in 4.1.2?

Hi.

I am having a weird problem with Body Masks in the model/animation import settings. I open the 'Body Mask' arrow, it shows the mask, and everything is selected. I try to deselect ex. the head, but it won't let me apply the settings.

Is there a workaround? Perhaps I can set the Body Mask through script?

EDIT:

I have included a screenshot below, to help the understanding of the issue.

Screenshot

screen shot 2013-04-01 at 1.48.46 am.png (245.0 kB)
Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by ottolb · Apr 16, 2013 at 08:32 PM

Yeah, I had the same issue. I solve doing this:

1 - Create a Avatar Mask. Assets->Create->Avatar Mask

2 - Setup as you like.

3 - Open that .mask file as text.

4 - Find a line like: m_Mask: 0100000000000000010000000100000001000000000000000

5 - Copy that bunch of 0 and 1

6 - Open the FBX meta file as text find the 'bodyMask:' and replace it.

7 - Save and that's it.

Comment
Add comment · Show 7 · 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
avatar image LukaKotar · Apr 18, 2013 at 05:56 AM 0
Share

I cannot open the .mask file as text correctly. I don't see the numbers, etc.. $$anonymous$$ay I ask which text editor you used?

avatar image ottolb · Apr 25, 2013 at 07:33 PM 0
Share

I used mac default text editor, you can't just drag 'n drop into it. You need to open manually.

avatar image LukaKotar · Apr 25, 2013 at 08:53 PM 0
Share

Sounds interesting, but inside the .mask.meta file, this is all I see:

fileFormatVersion: 2 guid: 006bd53670a9e4dd8ba42f7c75a4a493 NativeFormatImporter: userData:

The .mask file is fully unreadable.

avatar image LukaKotar · May 20, 2013 at 01:48 AM 0
Share

Thank you - I just had to force meta files to text, quit Unity, do as you said and re-open. Thanks!

avatar image Emptiness · May 23, 2013 at 10:31 AM 0
Share

I use windows 7 and I can't open the .mask file properly. I can't see the numbers. :(
$$anonymous$$ay I ask how did u manage to open the file?

I hope Unity fix this serious bug in the next version.

Show more comments
avatar image
-1

Answer by BrutalMax · Jun 08, 2013 at 07:26 AM

it seems that bodymasks are broken making mecanim layers useless.

Comment
Add comment · Show 11 · 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
avatar image atomicjoe · Jun 08, 2013 at 12:39 PM 0
Share

Sorry but you are wrong: I'm using bodymasks and layers intensively in my game. However, you must use bodymasks PER LAYERS, not per animations. If you want some animations to only affect the upper body, you have to create a bodymask in your assets specifying wich parts will be affected and then assign this bodymask to a new layer in the animator editor and put your animations in it. $$anonymous$$ixing whole body animations with body masked animations IN THE SA$$anonymous$$E layer however is broken. You will have to use layers and a bit o creativity for avoiding this issue.

avatar image BrutalMax · Jun 09, 2013 at 06:13 AM 0
Share

dude no matter what i tried; the bodymasks feature (in the animator's layers of course) doesn't work. it's like they're being ignored. i did the character modeling, skining and animations myself using 3dsmax.

avatar image atomicjoe · Jun 10, 2013 at 05:20 AM 0
Share

by default, when you run your game all layer weight values will be zero. You need to set it to 1 in order to activate it (0.5 would make it mix with the underneath layers by 50%, 1.0 would be 100%) If you want to fade in and fade out that layer, you will have to handle it manually by increasing and decreasing the layer weight property. Every animator layer has it's own weight, so if you want all of them to be active at the same time, you will have to set every layer,s weight property to 1 for them to be active. I think about it as an audio mixer, with every layer being an audio source: you will have to fade-in and fade-out every layer to make them into the mix.

avatar image BrutalMax · Jun 10, 2013 at 08:07 AM 0
Share

but how? the weight scrollbar is disabled. how can i enable it? do i have to use code for that? and if so; can you add an example?

avatar image BrutalMax · Jun 10, 2013 at 08:52 AM 0
Share

i've added this code to the character object:

 void Start () {
     Animator animator = GetComponent();
     Debug.LogError(animator.GetLayerName(1));
     animator.SetLayerWeight(1,1);
     Debug.LogError(animator.GetLayerWeight(1));
 }

but unity just kept ignoring the mask, letting the animation in the second layer completely override the first.

It's very frustrating because I'm trying to solve this problem for months now!

Show more comments
avatar image
0

Answer by atomicjoe · May 24, 2013 at 11:57 PM

Sadly, even forcing unity to use a body mask per animation using the method above, it's still broken if you try to use those animations in a mecanim layer. In my case I wanted to have some upper body animations only in a layer without a body mask. Using this method, unity will just make a mess of the masked parts of the character during animation. It seems bodymasks per animation isn't supported anymore. Unity 4.1.3

edited: bodymasks are broken only in a PER ANIMATION BASE. If you eant to use bodymasks, create a new one in your assets (right click, new bodymask) , create a new layer in the animator (mecanim) view, assign this bodymask you just creatd TO THE WHOLE LAYER and then put your animatons in this layer.

Comment
Add comment · Show 2 · 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
avatar image BrutalMax · Jun 10, 2013 at 05:52 PM 0
Share

it doesn't work.. bodymasks (on the layers level) remains broken.

avatar image Griffo · Jun 11, 2013 at 08:26 AM 1
Share

I'm using Unity 4.1.3 and body masks on layers and all working fine ..

avatar image
0

Answer by Ardivaba · Jun 10, 2013 at 05:49 AM

Uhm, why don't you just disable and enable some other options there and then apply modified body mask? Works perfectly for me, you just need to enable the Apply button by changing other settings, body mask settings will stick after you press apply.

Comment
Add comment · Show 1 · 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
avatar image atomicjoe · Jun 10, 2013 at 10:12 PM 0
Share

I already checked this, but has rechecked it right now and bodymask is just reseted to the default as soon as I change anything. Wich version of unity are you running? (slightly lower versions didn't have this bug) Unity 4.1.3f3 here

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

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mecanim - Body Mask specific bones ( Body Mask for the spine not the hips ) 1 Answer

Bizarre non-responsive button/Mecanim issues 1 Answer

Mecanim animation layers with a body mask kills the base animation? 1 Answer

TPS using Mecanim 0 Answers

How to maintain FIFO in Animator controller when you set multiple parameter in one frame ? 0 Answers


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