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.
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.
I use windows 7 and I can't open the .mask file properly. I can't see the numbers. :( May I ask how did u manage to open the file? I hope Unity fix this serious bug in the next version.
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.
it doesn't work.. bodymasks (on the layers level) remains broken.
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.
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
it seems that bodymasks are broken making mecanim layers useless.
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. Mixing whole body animations with body masked animations IN THE SAME layer however is broken. You will have to use layers and a bit o creativity for avoiding this issue.
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.
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!
try this code in the script attached to the mecanim animated object: void Start () { Animator animatorComponent = gameObject.GetComponent<Animator>(); animatorComponent.SetLayerWeight(1,1); }
I cannot open the .mask file as text correctly. I don't see the numbers, etc.. May I ask which text editor you used?
– ColdPlutoI used mac default text editor, you can't just drag 'n drop into it. You need to open manually.
– ottolbSounds interesting, but inside the .mask.meta file, this is all I see: fileFormatVersion: 2 guid: 006bd53670a9e4dd8ba42f7c75a4a493 NativeFormatImporter: userData: The .mask file is fully unreadable.
– ColdPlutoThank you - I just had to force meta files to text, quit Unity, do as you said and re-open. Thanks!
– ColdPlutoI use windows 7 and I can't open the .mask file properly. I can't see the numbers. :( May I ask how did u manage to open the file? I hope Unity fix this serious bug in the next version.
– Emptiness