Using twist links on a biped with Unity

So I’ve got a rigged / skinned / animated base character model which I am trying to import into Unity, but I’m encountering some . . . strange things.

I exported my model using the FBX exporter (version 2013.1) and with the preset “Autodesk media and entertainment.” When I imported my model into Unity, I changed the animation type to Humanoid in the Rig tab, hit apply, and got a check mark next to the configure button, so I assumed everything was ok.

Then I tried playing the animation I made, but the hands were moving in ways not humanly possible (in ways not possible to move using the biped in 3ds max, for that matter). So I go back and hit the configure button under avatar definition and this is what I see:

[8257-unity+issues.jpg|8257]

Just as a point of interest, I’m using the biped that 3ds max provides, but I’m using twist links to help the forearm deform more naturally when the wrist twists and I’m using knuckles instead of a single hand bone. I’m not sure why either of these would be an issue, but since they’re right next to the problem area, I thought I’d mention it.

It also looks like the 3rd twist link (between the wrist and grey twist link) is missing in the scene, though you can see that it’s there in the hierarchy.

This is my first time using Unity 4 (albeit not my first time using Unity), so even if a suggestion seems obvious, please post it just in case.

EDIT:

I believe I’ve found the cause of the problem, though it’s not really a solution. 3ds max assigns the forearm twist links to be children of the UPPER arm, NOT the forearm. I tried correcting the hierarchy in Unity and the the model works as it should, but to do so I had to break the Prefab connection and mark the animations as legacy.

I know of no way to adjust the built in biped bone hierarchy with 3ds max. Is there some way I can do that, or some way I can change it in Unity without breaking the prefab connection?

If worst comes to worst I just re-rig the model without twist links, but that will make the wrist movements look bad.

Alright, I finally found a solution on my own. Hopefully this saves someone else a LOT of hassle.

It seems this is an issue Autodesk has been aware of since 2009, and at first glance it appears that the only way to fix the problem is to own motion builder.

However, after some searching I found that a similar tool exists in 3ds max, though I’m not sure when it was implemented. Schematic view will allow people to fix this problem in 3ds max before exporting as an fbx.

http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/index.html?url=files/GUID-842CD36E-9E73-4733-9BAA-C7876013CA72.htm,topicNumber=d30e528336

The solution is:

Upper Arm - ForeTwist - ForeTwist 1 - ForeTwist 2 - Hand.

ForeArm has no child and you will not use this bone for skin.

But thank for Luna remind me of Schematic View, that made me got this solution.

bump… I’m currently considering how useful Mechanim is for our Biped-based pipeline. Are these issues still not resolved?

Hello,
I am experiencing that even though you can map the joints fine, all other extra joints like twist are getting ignored and therefore animations do to transfer correctly down the hierarchy. Anyone found a solution to this?

This is ridiculous. I’m still having massive issues with this. I used the schematic view to rearrange the twist links and it worked for weeks. Now all of a sudden when I repeat the same process I’ve performed over a hundred times it utterly destroys the skinning information in Unity. Now my project is useless until I fix this issue, which will undoubtedly take the usual arbitrary time of about 2 weeks.

And you guys reckon you don’t need coders :slight_smile:

using UnityEngine;

public class DyamicParentBone : MonoBehaviour {

public Transform Parent;

void Start()
{
    if (Parent != null)
        transform.SetParent(Parent.transform);        
}	

}