Topic: Mecanim Generic Rig

Hey guys... has anyone worked with the Mecanim Generic rig in UFE? Is it supported? I am trying to set up my alternate model ahead of the 1.8 release and the model is not playing the animation from the other character. I wonder what I could be doing wrong. Right now, the character just stands in a bind pose, not doing anything. I used the avatar from the primary character and nothing is working sad

Re: Mecanim Generic Rig

Last I heard Mecanim Generic rig is not supported. Only Humanoid.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

That is not good sad... that means I would have to remove the bones from my rigging to make this work... I have accessories that are supposed to be rigid and it would be a total waste

Re: Mecanim Generic Rig

Actually Humanoid makes sense, otherwise, you would not be able to have all kinds of hit reactions for the characters

Re: Mecanim Generic Rig

Im using generic in my project.  It works fine

Re: Mecanim Generic Rig

immortalfray wrote:

Im using generic in my project.  It works fine


It really does... I am getting my work ready ahead of the 1.8 release. And I am going to assume it will use the same hitbox setup as the primary model... which will cut down on the work I have to do.

7 (edited by chrisb3d 2016-09-21 09:42:01)

Re: Mecanim Generic Rig

I've only seen the options in the character file drop down for Humanoid and Legacy. Are you saying you can set the fbx rigs to Generic then use Humanoid or Legacy in UFE character settings?

Unity Humanoid quality is okay if you really need to share animations from character to character within Unity but in order for it to work perfect they still need to have the same skeleton hierarchy and rotation axis. The down side is your animations are not one to one. Humanoid has degrees of freedom setting for the bones that will limit the bone rotations regardless of what your animation does. There are setting for it but I've never gotten them to do what I want.

For example if you have a sub object in your FBX of a melee weapon that's not part of your character skeleton hierarchy and in your animation it lines up with your hand. When you put it in Unity with Humanoid as the rig the hand and melee weapon wont line up and they'll be offset.

UFE supports legacy in the character file and this is what I've switched to using. My animations are 1 to 1 and any sub object I have as part of my character lines up where it should.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

That is what I am worried about too... my character works with his current rig which is set to generic... but let's say if I perform a throw and I have to make sure my opponent have that throw reaction in their moveset, i already see it breaking

9 (edited by chrisb3d 2016-09-21 10:22:15)

Re: Mecanim Generic Rig

I don't have UFE setup here at work so I can't check but from the setting in the character file it doesn't look like it supports Generic. It would be nice if it did. So, I hope I'm wrong. Generic is nice to keep your animations how you animated them and for non-bipedal rigs.

Legacy works but Unity recommends not using it.

Share

Thumbs up Thumbs down

10 (edited by KRGraphics 2016-09-21 10:26:54)

Re: Mecanim Generic Rig

chrisb3d wrote:

I don't have UFE setup here at work so I can't check but from the setting in the character file it doesn't look like it supports Generic. It would be nice if it did. So, I hope I'm wrong. Generic is nice to keep your animations how you animated them and for non-bipedal characters.

Legacy works but Unity recommends not using it.


And I have twist bones in my rig... it would be smart if UFE supported generic rigs... when using Humanoid, the animations will not always match up...  and it is a real pain setting up the avatars every time...

11 (edited by chrisb3d 2016-09-21 10:26:34)

Re: Mecanim Generic Rig

Twists should still work if you're using Humanoid. As long as the animation on the twist bones are baked when you export / save the animation to fbx from w/e animation package you're using and the twist bones are included in the mask in Unity.

Share

Thumbs up +3 Thumbs down

12 (edited by christougher 2016-09-21 10:29:43)

Re: Mecanim Generic Rig

The whole point of humanoid rig in mecanim is to easily retarget biped animations even if there are some differences in the humanoid rigging (up to a point). But in my understanding using generic rigs should work ok with ufe, but to retarget the animations to different models you have to have the same rigging. So yeah one size fits all throw reactions could be a huge problem if you don't have uniform rigging. You can however trigger character specific throw reactions though so it's not impossible, it just adds the tedium of creating individual throw reactions.   It's in the Opponent Override section.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

chrisb3d wrote:

Twists should still work if you're using Humanoid. As long as the animation on the twist bones are baked when you export / save the animation to fbx from w/e animation package you're using and the twist bones are included in the mask in Unity.


Already done... in the humanoid setup, all of the bones are set in the transform mask... another issue too is the characters bones will not always be the same size... like in my game Blade is 6'5", Aiko is 5'7"... I can already see issues when shorter characters fight taller ones. And I get a warning that the retargeting might not match up because the bones are rotated differently. I may end up in the animations making sure it uses the main avatar.

For the alternate model, it mentions using the same avatar as the main model... so I hope to see this.

Re: Mecanim Generic Rig

christougher wrote:

The whole point of humanoid rig in mecanim is to easily retarget biped animations even if there are some differences in the humanoid rigging (up to a point). But in my understanding using generic rigs should work ok with ufe, but to retarget the animations to different models you have to have the same rigging. So yeah one size fits all throw reactions could be a huge problem if you don't have uniform rigging. You can however trigger character specific throw reactions though so it's not impossible, it just adds the tedium of creating individual throw reactions.   It's in the Opponent Override section.


That would be a SERIOUS pain in the ass... in my project, the rigs have the same hierarchy and everything... the only differences are the bone names prefixes such as BladeStreet_root or BladeDarkMercenary_root... same character in game, different costume.

I can see this causing issues for sharing animation... the only way to combat this is NOT using a prefix, but with my current tools, it needs a character name... I could go the humanoid route and hope for the best... My alternate model doesn't have animation on it, since it is just an alternate.

Re: Mecanim Generic Rig

The names don't have to be the same as long as you're using Humanoid. Humanoid is a control rig over top of your skeleton similar to MotionBuilders control rig. You would just need to setup Avatar Definition with the bones for each character. Then you should be able to apply one characters animation to another. But this will give you mixed results depending on how different your two rigs are.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

chrisb3d wrote:

The names don't have to be the same as long as you're using Humanoid. Humanoid is a control rig over top of your skeleton similar to MotionBuilders control rig. You would just need to setup Avatar Definition with the bones for each character. Then you should be able to apply one characters animation to another. But this will give you mixed results depending on how different your two rigs are.

The only real differences will be bone size because of the different character sizes.

Re: Mecanim Generic Rig

That shouldn't disqualify it. As Chrisb3d said unity's humanoid solution is pretty versatile. Have you tried  any of your rigs as humanoid? Some of the complex human rigs out there aren't compatible because the have too many extra bones.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

christougher wrote:

That shouldn't disqualify it. As Chrisb3d said unity's humanoid solution is pretty versatile. Have you tried  any of your rigs as humanoid? Some of the complex human rigs out there aren't compatible because the have too many extra bones.

My rig works as a humanoid... and I have extra bones that are baked into the skeleton and the animation seems to play nicely...

Extra twist bones in legs and arms...

https://dl.dropboxusercontent.com/u/158971/Screenshot%202016-09-21%2018.06.34.png


Humanoid Avatar

https://dl.dropboxusercontent.com/u/158971/Screenshot%202016-09-21%2018.18.17.png

Idle Animation (With Humanoid Rig) works like acharm...

https://dl.dropboxusercontent.com/u/158971/Screenshot%202016-09-21%2018.45.11.png

https://dl.dropboxusercontent.com/u/158971/Screenshot%202016-09-21%2018.46.15.png

19 (edited by christougher 2016-09-22 00:05:00)

Re: Mecanim Generic Rig

Interesting, those extra twist bones dont break it?! I didn't realize you could skip bones in the hierarchy. Good news for me actually. I knew extra bones outside of the humanoid hierarchy didn't break it but I didn't realize you could have extra bones within the hierarchy.

Share

Thumbs up Thumbs down

20 (edited by KRGraphics 2016-09-22 04:37:40)

Re: Mecanim Generic Rig

Though the hitboxes are kinda offset on player 2... any reason why it does this?

As long as those extra bones are baked into the skeleton and you turn on the transform masks. I was going to stick with generic, but I will be using humanoid big_smile

Re: Mecanim Generic Rig

I'm using humanoid. You can have extra bones in your rig. The point is you need to have the Avatar set up to tell it what the bones are.

So think of the Avatar as a translation system.

The model is told from some animation that "The left forearm is supposed to move 3* upwards." and it goes and processes "Hmmm, the left forearm should be character_larm as the user designated in the avatar file. So move character_larm 3* upwards".

Then you have an Avatar Mask which you set up in the animation to say "If you get references to these bones that are not labeled in the Avatar, move them anyways otherwise ignore any calls to them." So animations I've made specifically for one character I have every option checked in the Avatar Mask and every animation has that avatar mask linked to it along with linking to the initial character's Avatar.

Share

Thumbs up +2 Thumbs down

22 (edited by Meractus 2016-09-23 10:03:21)

Re: Mecanim Generic Rig

KRGraphics wrote:

Though the hitboxes are kinda offset on player 2... any reason why it does this?

As long as those extra bones are baked into the skeleton and you turn on the transform masks. I was going to stick with generic, but I will be using humanoid big_smile

Since your bones skipped the hierarchy because of the twist bones, the hitbox script gets lost somewhere when you put some kind of offset in the hitboxes. It will not mirror the offset for p2. I had the same problem with a character's weapon that was not connected to the model.

Share

Thumbs up Thumbs down

23 (edited by christougher 2016-09-23 10:24:17)

Re: Mecanim Generic Rig

Just for the record the hit boxes do not need to be attached to bones. My weapons have empty child gameobjects placed where I want my hit boxes to be. No worrying about offsets. big_smile

Share

Thumbs up +2 Thumbs down

Re: Mecanim Generic Rig

christougher wrote:

Just for the record the hit boxes do not need to be attached to bones. My weapons have empty child gameobjects placed where I want my hit boxes to be. No worrying about offsets. big_smile

How come I have never thought of that? Awesome, yet simple, idea.

Share

Thumbs up Thumbs down

Re: Mecanim Generic Rig

It just looked weird to me that's all. And I'm doing 3D hit detection so hopefully the hitboxes will connect properly