- Home /
bones axis orientation strange when importing from blender (axis don't match)
Hi, I am animating a a bone procedurally, by making it lookat() a point in space which I move around. the result was however not as expected, as the mesh was wrongly deformed.
anyway, after a while I found out that it's all because the bone's transform.forward isn't the forward direction it has in blender.
It appears the bone's Z-axis in blender is it's forward direction in Unity, and the bone's negative X-axis in blender is it's up direction in Unity.
Can anyone explain to me why this is ? and more importantly, how I can fix this ?
thanks in advance
In FBX export settings select Armatures Primary Bone Axis select Z Axis Secondary Bone Axis select -X Axis
Answer by 3Duaun · Sep 08, 2010 at 06:56 AM
Blender is famous for switching it's Z axis for what is usually another 3D apps Y axis. It took me some time to get used to this, but it's second nature now that I use blender more than most any other 3D package now.
That being said, I would recommend you export your rigged object/mesh via FBX. In the FBX export settings, select the "Rot x90" button, and see if that fixes your problem.
Here is my other trick for exporting rigs from blender to other 3d apps: I learned in Blender some time ago, to create character rigs with the character's head bone pointing towards the +Y axis, so the character is "lying on the floor" in the Blender 3D view. This allows for better export of constraints and rigs to most-other 3d packages, not sure how known this trick is. I then parent the rig to an empty in Blender, and rotate it 90degrees on the x so the rig then appears to be standing upright while I work on it in Blender.
Hope this helps somehow, took me some time to get bones exporting properly for FBX friendly apps from Blender. But this process is VERY easy with Blender 2.53, though unfortunately Unity doesn't support the new B25 .blend file format, SOON HOPEFULLY THOUGH. (Please Unity Devs, add Blender 2.5 blend support soon.) Even Blender 2.49 ca nopen a Blend from 2.5 with few to no issues.
thanks for your answer, I'll check out the fbx exporter, but the (small) problem with that though is that I have to export every time I change something, whereas now I just have to save the blender file and it updates in unity immediately.
I kindof temp fixed the issue I had by rotating the bone in blender so that it works as intended in unity. (but now this bone is pointing in a strange direction in blender ofcourse :s )
in cases where I need to rotate a bone specifically for export to another app, and that bone will appear rotated in Blender, I usually custom set it's bone-rest-position, then give it a CUSTO$$anonymous$$ BONE SHAPE(using a mesh or a curve). Then again, I use custom bone shapes for most all of the "control bones" in my production rigs, so I'm partial to this method.
As from what I have understood, 3D $$anonymous$$ax Studio and AutoCad shares the axis setup with Blender. So its a UNITY problem not Blender.
Thanks so much for this answer. I have been struggling with a much simpler problem (http://gamedev.stackexchange.com/questions/21045/how-can-i-create-my-mesh-so-that-textures-applied-to-it-are-not-rotated-90-degre) for a couple of days, and it turns out that it's just this that's happening.
Steven, did you finally understood how this works? I'm experiencing the same issue and I have been trying to understand what is happening and how to fix it for about 30 hours and I didn't achieve it, it is driving me insane!! Your knowledge and experiencies would help us a lot....
Answer by bidjo666 · Jul 15, 2020 at 06:38 PM
In FBX export settings select Armatures Primary Bone Axis select Z Axis Secondary Bone Axis select -X Axis