I seem to be having an strange issue with bones orientation in Unity. I have a character I have rigged and animated. The animations are perfectly fine in 3Ds Max. All the skin weights on verts have been checked, they seem fine. Once the model makes it into unity it seems fine as well. Also Im exporting from Max as an FBX, there are no error messages whatsoever, everything seems green.
But upon hitting the play button in unity to see the characters animation run, Ive got an issue where the bone for the characters right breast seems to be inverting itself only on play. None of my bones have been mirrored, but where the bones connect to the spine these two breast bones happen to live on the same parent.
Anyone have any expertise in this area? I would really like the correct fix for this. Right now Im prepping a work around to essentially take a new helper dummy, key frame it exactly how the previous bone was oriented frame per frame, and then re-skin weight the character’s breast with the new dummy. Im 99% sure that patch fix will work, but this is not the best way to go about fixing this. I would like to know what causes this error so I can avoid it in the future. Thanks for all your help. Below are some screens of the issue at hand.
The rigged, weighted, and animated model and how it looks in Max:
Edit: I take it back, I just took the floating bone (almost like a bone end) and linked it to the keyframed dummy that I had track frame per frame with the old animation. Then I aligned that floating bone to the keyframed dummy and got my nice clean animation back. About to re export to unity now to see if this temporarily fixes the bone issue.
I’ve heard in this instances export the FBX with the X Y (or is it the Y Z?) flipped. Search these forums via google or bing and you’ll find the solution.
I’m glad my skeleton isn’t based on software. I’d hate to suddenly be rotated 180* in the wrong direction.
I use Blender, not Max, but there’s a few issues I’ve encountered that might be similar:
Does the right-breast bone have any negative scaling factors? This seems most likely, and it looks like the kind of effect I’d expect.
Is the bone rotated along its own length axis in Max? Try setting rotation along that axis to zero (this confused my FBX exporter at one point).
Are your shoulders also both parented to the same bone? If so, compare the right-shoulder to the right-breast and see if you can spot any differences at all.
If they’re not, try using the same setup for breast that you’re using for shoulder.
Were the bones created by using a mirror command of some kind? Try creating the bone using duplicate instead of mirror, then manually set only the one axis rotation you need.
Heres the thing, these breast connector bones are where the problem is. I have since corrected the issue visually because luckily for me I had two bones involved on the breast animation, and the skin was weighted to the furthest bone out, not the one connected to the spine. The problem bone was infact the one connected to the spine, essentially the only one possible for a Y-fork in the road sort of deal. Im new to animation on Max so of course when I found out bones dont actually have to be 100% connected to each other like in Maya, when I went about doing the shoulders hips and wings, I simply did not attach those joints to the main body by bones at all. What I did was just linked them instead so I could do with them as I pleased and constrained them to other helpers/IKs to make sure they didnt move anywhere. No rubbery people.
My work around worked but before even setting the skin weights, long before animating or anything, the regular rig pose skeleton had no errors and all the bones were scaled, frozen, and rest in place so that they did not break or stretch. I checked all those axis to make sure they made since before hand. The only two odd ball out case bones that could have existed were these Y fork breast control bones. But there is absolutely no way to tell its broken it seems until you start to animate. Even putting just the rig model of the orignal setup into Unity, breast looks fine. Turn the upper torso just a little bit and boom, its all kinds of twisted. This has happened on some old data I shipped from Maya to Max as well from another professional animator. Must be an export issue, mangling that is occuring.
I guess since Im working from scratch in Max what I will do for all future character rigs is absolutely NEVER EVER have more than 2 bones conjoined ever. So that there is no instace of Y forking (1 parent to two children for left and right sides of the body). Even if properly mirrored, or even manually copy pasted and rotated by hand so that all axis are correctly opposing each other (left to right), and then having scaling reset, rotations reset, and constraints in place (which is exaclty what I did in the process of making this) the same error still has the potential to occur it seems. :*(
At any rate thank you all for the helpful insight!! I have no idea if there is a formal or proper way to fix this issue, but I think I have a good idea on how to avoid it in the future. Its certainly not a consequence of the Max FBX exporter orientation options I dont believe. Every model gets shipped with its Z converted to Y as up and Ive been issue free in that respect - but who knows. Im clearly not the expert on bones to begin with.
Hm, I’m using Y-forks in my Blender-created models and there don’t seem to be any issues.
You might try just building a really simple Y shape, and giving it three bones so you have a fork, see if that messes up. There’s all kinds of things that can go wonky in bones, I usually just end up crossing my fingers every time I try to export a skeleton. x)