- Home /
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:
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.
I am encountering the problem, Dose it have any way to solve??
Answer by LunaArgenteus · Mar 07, 2013 at 09:27 PM
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.
http://usa.autodesk.com/adsk/servlet/ps?siteID=123112&id=18551967&linkID=9241657
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.
I'm just encountering this problem too. Haven't find the better way to sovle.
It seems this is cause by the Avatar T-Pose(Unity T-Pose), when you click "Enforce T-Pose", Unity transform your rig's pose to Unity T-Pose.
Then as you said, 3ds$$anonymous$$ax Biped twist bone's parent is the upper level(upperarm twist bone is child of Clavicle), so Unity rotate your Upperarm to fit the Unity pose, not Clavicle, then your twist bones stay in original position without rotating.
maybe 3 ways to solve it:
1.Don't use twist bone(Like you said, it looks bad)
2.Correct the rig hierarchy(forearm twist bones are child of forearm)
3.Don't use Enforce T-Pose(but it will cause other problems??)
I'm thinking about what will happen if using I$$anonymous$$ function with Twist Bones Rig... haven't try yet. But i think it must require the proper hierarchy.
Sorry for my english...
Answer by Pixeldamage · Mar 07, 2013 at 10:57 AM
bump... I'm currently considering how useful Mechanim is for our Biped-based pipeline. Are these issues still not resolved?
I'm still struggling with getting mechanim to work for me, but I seem to have found the solution for this particular issue.
Answer by antiqas · Apr 05, 2013 at 08:52 AM
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?
Even after I fixed this, some of the extra bones did not behave properly because of these mapping limitations. The only way I found to get around this was to treat your model like a generic rig.
Thanks, after testing we went generic rig way too. Just way too many limitations with humanoid AT$$anonymous$$, great concept, but it seems to be for a vary basic character out of the box.
Answer by MikeErty · Aug 06, 2014 at 02:15 PM
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.
For anyone that is using legacy in Unity with a biped from max (like myself) I wrote a $$anonymous$$axscript to retarget all the bip data onto a new biped. For example, say you have all your animations done and exported into Unity as @idle etc. Now you make some changes to your characters proportions / add bones etc. This will break all of Unity's fbx animations or worse, stretch bones to fit the original animation's transform/scale/rotation. $$anonymous$$y script will load each bip file onto the biped/reload the fig data/export as an fbx (using the length of that anim).
In case it helps you guys I've put the script up on Scriptspot and on my site. It saves me a tonne of time each time I alter the skeletal mesh.
http://www.scriptspot.com/3ds-max/scripts/biped-bip-animation-batch-retargeting-fbx-export
Answer by HotActionGames · Sep 09, 2017 at 05:37 AM
And you guys reckon you don't need coders :)
using UnityEngine;
public class DyamicParentBone : MonoBehaviour {
public Transform Parent;
void Start()
{
if (Parent != null)
transform.SetParent(Parent.transform);
}
}
Your answer
Follow this Question
Related Questions
Character Animation Import Problem 0 Answers
Assigning avatar during runtime 1 Answer
Removing Bone From Hierarchy Animation/Bone Rotation During Animation Problem[Humanoid] 0 Answers
Impulse not applied when animator is enabled 0 Answers
I can preview the animation but in scene it doesn't work 0 Answers