Fbx export: random, weird bones rotation artefact #53908

Open
opened 2018-01-26 00:31:37 +01:00 by lucas veber · 15 comments

System Information
Win10

Blender Version
2.79

Short description of error
First, sorry if this report is a duplicate, i've found some similar report but could not make sure they're the same.
A few bones orientation are wrong when exported to Fbx then imported in Unity or Unreal Engine. Importing back the Fbx in Blender is ok, but not in these game engines.

Exact steps for others to reproduce the error

  • Import the attached fbx file in Blender, then check it's ok.
  • Export it to fbx using the default options
  • Import in Unity or Unreal Engine. The lips, cheeks and chin bones are distorted. After investigation, moving of +/-0.01 the bones transforms in Blender before exporting can fix it. So it seems to be an imprecision error at some point...

alice.fbx

**System Information** Win10 **Blender Version** 2.79 **Short description of error** First, sorry if this report is a duplicate, i've found some similar report but could not make sure they're the same. A few bones orientation are wrong when exported to Fbx then imported in Unity or Unreal Engine. Importing back the Fbx in Blender is ok, but not in these game engines. **Exact steps for others to reproduce the error** - Import the attached fbx file in Blender, then check it's ok. - Export it to fbx using the default options - Import in Unity or Unreal Engine. The lips, cheeks and chin bones are distorted. After investigation, moving of +/-0.01 the bones transforms in Blender before exporting can fix it. So it seems to be an imprecision error at some point... [alice.fbx](https://archive.blender.org/developer/F1982793/alice.fbx)
Author

Added subscriber: @LucasVeber

Added subscriber: @LucasVeber
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Dont have access to Unity/Unreal atm.
@LucasVeber : could you upload a screenshot of both Unity and Unreal as a reference?

Dont have access to Unity/Unreal atm. @LucasVeber : could you upload a screenshot of both Unity and Unreal as a reference?
Author

Sure thing. Actually it's the same issue in Maya in case you're able to test it. Haven't tested with 3dsmax but i'd assume it may be the same.
Here is attached a screenshot.
01.jpg

Sure thing. Actually it's the same issue in Maya in case you're able to test it. Haven't tested with 3dsmax but i'd assume it may be the same. Here is attached a screenshot. ![01.jpg](https://archive.blender.org/developer/F2061418/01.jpg)
Author

While praying for this bug not to be forgotten in the dark, i've simplified at maximum the example blend file (attached) to help. It now only contains one mesh and two bones. When exporting to Fbx and importing in other apps, such as Unity, "bone2" is imported with Rot X = 179.8, instead of -90.
Rotating in Edit Mode bone2 1 or 2 degrees in Blender fixes the issue. However it's not a clean solution, it may happen in other situations. Seems to happen when a bone is making 180 degrees x-axis angle with its parent.
After further investigations with the Fbx exporter code, tracking the exported rotations values seems to output correct values. However it's the way these values are read in other app that is the problem. Likely to be an euler issue, if only Fbx used quaternions...

Exported rotations from Blender, using a "print" command in the Fbx script (truncated for readibility):
bone1 [-90, 0, -90]
bone 2 [179.8, 0.115, 0.035]

Imported rotations in Unity (truncated for readibility):
bone1 [0.000, -90, 89.9]
bone 2 [179.8, -0.115, 0.0]

Sans titre.jpg
test_rot.blend

While praying for this bug not to be forgotten in the dark, i've simplified at maximum the example blend file (attached) to help. It now only contains one mesh and two bones. When exporting to Fbx and importing in other apps, such as Unity, "bone2" is imported with Rot X = 179.8, instead of -90. Rotating in Edit Mode bone2 1 or 2 degrees in Blender fixes the issue. However it's not a clean solution, it may happen in other situations. Seems to happen when a bone is making 180 degrees x-axis angle with its parent. After further investigations with the Fbx exporter code, tracking the exported rotations values seems to output correct values. However it's the way these values are read in other app that is the problem. Likely to be an euler issue, if only Fbx used quaternions... Exported rotations from Blender, using a "print" command in the Fbx script (truncated for readibility): bone1 [-90, 0, -90] bone 2 [179.8, 0.115, 0.035] Imported rotations in Unity (truncated for readibility): bone1 [0.000, -90, 89.9] bone 2 [179.8, -0.115, 0.0] ![Sans titre.jpg](https://archive.blender.org/developer/F2516538/Sans_titre.jpg) [test_rot.blend](https://archive.blender.org/developer/F2516555/test_rot.blend)

Added subscriber: @Jakuba

Added subscriber: @Jakuba

Added subscriber: @sunxmwork

Added subscriber: @sunxmwork
Member

Added subscriber: @DanielGrauer

Added subscriber: @DanielGrauer

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey
Bastien Montagne was assigned by Sergey Sharybin 2019-04-10 10:24:21 +02:00

@LucasVeber, thanks for simplifying the test case!

@mont29, not an expert, but doesn't seem to be bug in Blender, since this is another software which doesn't read values Blender is saving? Mind having a look?

@LucasVeber, thanks for simplifying the test case! @mont29, not an expert, but doesn't seem to be bug in Blender, since this is another software which doesn't read values Blender is saving? Mind having a look?
Bastien Montagne removed their assignment 2019-08-12 16:02:56 +02:00

Added subscriber: @iss

Added subscriber: @iss

After doing export and import result looks like this:
Untitled.png

So this issue may have been replaced by another issue

After doing export and import result looks like this: ![Untitled.png](https://archive.blender.org/developer/F8340554/Untitled.png) So this issue may have been replaced by another issue

Added subscriber: @S-ed-3

Added subscriber: @S-ed-3

Added subscriber: @YoshiAsk

Added subscriber: @YoshiAsk

I was reading this ancient post about FBX import/export in Blender, and it mentions "FBX bones are not aligned along the same axis as Blender bones (former are along -X axis I think, while later are along +Y axis)".
If this was never fixed, it might be what's causing the weirdness displayed in the previous sreenshot

I was reading this [ancient post ](https://archive.blender.org/wiki/index.php/User:Mont29/Foundation/FBX_TODO_2014_07/) about FBX import/export in Blender, and it mentions "FBX bones are not aligned along the same axis as Blender bones (former are along -X axis I think, while later are along +Y axis)". If this was never fixed, it might be what's causing the weirdness displayed in the previous sreenshot
Sign in to join this conversation.
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#53908
No description provided.