Weird mesh/bone shifting problem with animation exported to .fbx for Unity #50686

Closed
opened 2017-02-14 19:33:42 +01:00 by KiJeon · 13 comments

System Information
Windows 10 64-bit
GTX 1080

Blender Version
Broken: 2.78a

Short description of error
When I export a .fbx to Unity of an animation I'm working on, I get a weird shifting of the facial features of the character.
FBXexport_FaceShift01.gif

Not sure what's happening as this doesn't happen in Blender. Is this a bug in the exporter?

**System Information** Windows 10 64-bit GTX 1080 **Blender Version** Broken: 2.78a **Short description of error** When I export a .fbx to Unity of an animation I'm working on, I get a weird shifting of the facial features of the character. ![FBXexport_FaceShift01.gif](https://archive.blender.org/developer/F485412/FBXexport_FaceShift01.gif) Not sure what's happening as this doesn't happen in Blender. Is this a bug in the exporter?
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @0o00o0oo

Added subscriber: @0o00o0oo
Author

Oopse, forgot to attach the file: FBXexport_FaceShiftProblem.blend

Oopse, forgot to attach the file: [FBXexport_FaceShiftProblem.blend](https://archive.blender.org/developer/F485417/FBXexport_FaceShiftProblem.blend)

Added subscriber: @mont29

Added subscriber: @mont29

Most likely the same 'issue' as in #50684…

You are probably suffering from the simplification over baked curves applied by default by the exporter (to reduce amount of data and hence size of FBX file).

In the Animation settings of FBX exporter, can you please try to set the Simplify value to zero (and ensure Sampling Rate is at its default value of 1 frame), and see whether this fixes your issue?

Most likely the same 'issue' as in #50684… You are probably suffering from the simplification over baked curves applied by default by the exporter (to reduce amount of data and hence size of FBX file). In the Animation settings of FBX exporter, can you please try to set the Simplify value to zero (and ensure Sampling Rate is at its default value of 1 frame), and see whether this fixes your issue?
Author

I tried it but it's still shifting. =/

I seem to be able to fix the problem by readjusting the hierarchy in Unity, such as moving the "DEF-spine.006" and its child to under "head", "DEF-spine.004" and "DEF-spine.005" to under "neck", "DEF-spine.003" to "MCH-spine.003", "DEF-spine.002" to "MCH-spine.002".
pasted_file
But I'm guessing I shouldn't have to do this if exporting is working correctly.

BTW, in case this helps, the rig is a modified pitchipoy rig where I didn't use its default facial bones in the metarig to generate the facial controls.
I deleted the facial bones and after generating the rig, I created my own facial bones/controls, joined them to the pitchipoy rig, then parented them to the "head" bone.

I tried it but it's still shifting. =/ I seem to be able to fix the problem by readjusting the hierarchy in Unity, such as moving the "DEF-spine.006" and its child to under "head", "DEF-spine.004" and "DEF-spine.005" to under "neck", "DEF-spine.003" to "MCH-spine.003", "DEF-spine.002" to "MCH-spine.002". ![pasted_file](https://archive.blender.org/developer/F486660/pasted_file) But I'm guessing I shouldn't have to do this if exporting is working correctly. BTW, in case this helps, the rig is a modified pitchipoy rig where I didn't use its default facial bones in the metarig to generate the facial controls. I deleted the facial bones and after generating the rig, I created my own facial bones/controls, joined them to the pitchipoy rig, then parented them to the "head" bone.
Author

Oh, and just in case it's needed, before I change the items in the hierarchy, this is the structure as it imports into Unity by default from the .fbx exported out of Blender: pasted_file

Oh, and just in case it's needed, before I change the items in the hierarchy, this is the structure as it imports into Unity by default from the .fbx exported out of Blender: ![pasted_file](https://archive.blender.org/developer/F486662/pasted_file)

Thing is, I can’t see anything wring when re-importing into Blender. So that could be an issue from Unity side too, did you try to re-import your FBX into Blender and see whether those glitches are visible?

Also, what are you using exactly as animation & armature export settings? did you try tweaking those to see whether it could fix the problem?

Thing is, I can’t see anything wring when re-importing into Blender. So that could be an issue from Unity side too, did you try to re-import your FBX into Blender and see whether those glitches are visible? Also, what are you using exactly as animation & armature export settings? did you try tweaking those to see whether it could fix the problem?
Author

I tried reimporting the .fbx to Blender, and as you said, it works fine. Then I tried importing it into Sketchfab and also Unreal Engine and the animations all work fine in those as well.

I also tried exporting from Blender with various options but I can't find a setting that works to correctly import into Unity.
Then would it be safe to conclude it's Unity's import function somehow messing it up?

I tried reimporting the .fbx to Blender, and as you said, it works fine. Then I tried importing it into Sketchfab and also Unreal Engine and the animations all work fine in those as well. I also tried exporting from Blender with various options but I can't find a setting that works to correctly import into Unity. Then would it be safe to conclude it's Unity's import function somehow messing it up?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-02-18 08:31:27 +01:00

It might be Unity bug, yes - but it might also be Unity applying some simplifications to animation curves when importing from FBX?

In any case, thanks for the report, but I think that since other tools are able to import the FBX correctly, we can consider there is no Blender bug here.

It might be Unity bug, yes - but it might also be Unity applying some simplifications to animation curves when importing from FBX? In any case, thanks for the report, but I think that since other tools are able to import the FBX correctly, we can consider there is no Blender bug here.

Added subscriber: @moosefetcher

Added subscriber: @moosefetcher

I realise this is an old thread, but I recently fixed a similar problem by unchecking the 'resample curves' box on the animation tab of the imported fbx mesh. I read it was caused when, in Blender, the animation uses Euler rotations. With the 'resample curves' box checked, Unity converts to Quaternion and it can mess things up, apparently. Probably a little late to help with your problem though...

I realise this is an old thread, but I recently fixed a similar problem by unchecking the 'resample curves' box on the animation tab of the imported fbx mesh. I read it was caused when, in Blender, the animation uses Euler rotations. With the 'resample curves' box checked, Unity converts to Quaternion and it can mess things up, apparently. Probably a little late to help with your problem though...
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#50686
No description provided.