Maniphest T54459

Animation Jitter: Rigged Character with FBX Export
Closed, Archived

Assigned To
Aaron Carlisle (Blendify)
Authored By
Carlos (ModLunar)
Mar 29 2018, 5:23 AM
Tags
  • Animation & Rigging
  • Add-ons (Community)
  • Import/Export
Subscribers
. (Crow)
Aaron Carlisle (Blendify)
Carlos (ModLunar)
Joshua Leung (aligorith)
Martin Sedlak (kmar)
Michael (Nib)
Michael Ovens (nonsomnium)
4 More Subscribers

Description

System Information
Operating system and graphics card

Windows 10
Processor: Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz
RAM: 16.0GB

NVIDIA GeForce GTX 1070
Driver version: 388.13
Direct3D API Version: 12
CUDA Cores: 1920
Graphics Clock: 1607 MHz
Memory Data Rate: 8008 MHz
Total Available Graphics Memory: 16302 MB
Dedicated Video Memory: 8192 MB GDDR5

Blender Version
Broken since I started using Blender (roughly v2.77)
Specifically, broken currently using Blender v2.79a (Date 2018-02-21 10:41)

Short description of error

When exporting animations containing position and rotation animated data on armatures I prepared to map nicely to Unity's standard Mecanim Humanoid, the exported animation data does not really reflect the animation curves properly in Blender. In Blender, the position and rotation curves, using Bezier interpolation work great and are smooth as expected. The exported data, however, looks almost as if it was an audio signal with noise -- there are somewhat "random" little peaks and crevices that cause terrible jittering in my character (most notably in their arms and legs) when I export my character to an FBX file and turn on "Bake Animation" (so the FBX file has the animation with it). These results have been observed when importing that FBX file into Unity (Unity 5.x, 2017.x, and 2018.1's beta versions all alike), even when all animation curve re-sampling and compression has been turned off.

Exact steps for others to reproduce the error
Based on the attached .blend file -
Select the parent empty object I created called "Castle Knight". In the 3D view, you can press Shift + G to select all of its children, and then re-select the parent empty object again. Deselect the Knight's Halberd. Then with that selection of just the knight character and its armature, go to File > Export > FBX (.fbx). Here are my export settings:

Version: FBX 7.4 Binary

Selected Objects: true (checked)
Scale: 1.00 (Not applied, however! The button to its right has been unchecked)
Apply Scale: FBX All
Forward: Z Forward
Up: Y Up

Include: [Empty, Armature, Mesh, Other]


In the Armature tab,
Only Deform Bones: true (checked)
Add Leaf Bones: true (checked)
Primary Bone Axis: Y Axis
Secondary Bone Axis: X Axis
Armature FBXNode Type: Null


Under the Animation tab,
Baked Animation: true
Key All Bones: true
NLA Strips: true
All Actions: false
Force Start/End Keying: true
Sampling Rate: 1.00
Simplify: 1.00


So when I do this, everything is exported great, the NLA strips are nice and organized, the mesh is perfect in every other way, it's just that the animations end up with this weird (and very obvious) jittering and twitching throughout the entire animations.

Anyway, let me know if there's anything at all I can do to help. I really hope this can get fixed or circumvented somehow -- my games depend on this!

Event Timeline

Carlos (ModLunar) created this task.Mar 29 2018, 5:23 AM
Carlos (ModLunar) renamed this task from Rigged Character Animation with FBX Export to Animation Jitter: Rigged Character with FBX Export.Mar 29 2018, 5:30 AM
Carlos (ModLunar) updated the task description.Mar 29 2018, 5:37 AM
Joshua Leung (aligorith) added a subscriber: Joshua Leung (aligorith).Mar 29 2018, 5:59 AM

To help narrow this down a little, when you say that there are little jumps/peaks, is this on any particular curves (i.e. rotation curves in particular), or just any/all of them? Could you include a screenshot of these?

Carlos (ModLunar) added a comment.EditedMar 29 2018, 6:17 AM
In T54459#490974, @Joshua Leung (aligorith) wrote:

To help narrow this down a little, when you say that there are little jumps/peaks, is this on any particular curves (i.e. rotation curves in particular), or just any/all of them? Could you include a screenshot of these?

Sure, great idea thanks!

Now that you mention it, most of the curves in the FBX file are rotation because I use IK for the feet and arms with non-deform bones that are not included in the export to have a less cluttered hierarchy. The IK goal bones had position animation data, and then the other bones end up with resulting rotation animation data. However, the hips, spine/chest, and neck bones were all fine! Those bones had no jitter in my animations.

The problems occurred mainly in the shoulder, upper/lower arm, and hand bones. The shoulders are not part of the IK chain, just the upper arm and the lower arm bones are. The latter two have Inverse Kinematic limits placed on them in the Bone tab in the Properties window in Blender.


Here's the smooth position animation data of the Hand L IK Goal bone as is in Blender before export. In Blender, the other bones don't have rotation animation data because they're being controlled by the IK bone constraint.

Then in Unity with the FBX file, here's a shot of the left shoulder and left upper arm bones with the jitter (rotation animation data)

Carlos (ModLunar) updated the task description.Mar 29 2018, 6:41 AM
Carlos (ModLunar) updated the task description.
Carlos (ModLunar) added a comment.Apr 5 2018, 12:52 AM

Also I forgot to add a visual -- This shows the animation in both Unity and Blender, and the differences are most obvious in the arms. The feet and legs here look pretty fine - I can't tell that there's anything wrong with them.

Philipp Oeser (lichtwerk) claimed this task.Apr 19 2018, 3:18 PM
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Confirmed on first sight, will have a look shortly.
Note: I checked by exporting with the settings the report suggest, resulting in

And just importing back into blender will also result in jittering, see

Philipp Oeser (lichtwerk) edited projects, added Add-ons (Community), Import/Export; removed Game Animation, BF Blender.Apr 20 2018, 10:35 AM
Michael Ovens (nonsomnium) added a subscriber: Michael Ovens (nonsomnium).Aug 16 2018, 7:12 AM

Registered specifically to say that I found a solution for the same problem I was having with a different animation.

The problem for me was Unity's animation compression - on the Import window, Animation tab in Unity, you'll see the dropdown menu "Anim. Compression" towards the top. By default it will have Keyframe Reduction, which produced jitters, but if you turn it to "Off" the jitters ought to go away.

Martin Sedlak (kmar) added a subscriber: Martin Sedlak (kmar).Aug 18 2018, 7:14 AM
Philipp Oeser (lichtwerk) removed Philipp Oeser (lichtwerk) as the assignee of this task.Nov 12 2019, 7:47 PM

Sorry this has been lying around for so long.

As it seems I dont find the time for it and dont want to block this any further....

Sybren A. Stüvel (sybren) lowered the priority of this task from 50 to 30.Dec 18 2019, 10:56 AM
Sybren A. Stüvel (sybren) added a subscriber: Sybren A. Stüvel (sybren).

@Carlos (ModLunar) Does the workaround described by @Michael Ovens (nonsomnium) work for you? If so, this seems to be an issue with Unity rather than Blender.

Carlos (ModLunar) added a comment.Dec 24 2019, 5:18 AM

@Sybren A. Stüvel (sybren) Unfortunately no, I have tried that in Unity and it does not fix the issue.

Sybren A. Stüvel (sybren) added a comment.Dec 24 2019, 12:54 PM

@Carlos (ModLunar) Can you then make us a minimal example file that demonstrates the issue?

Carlos (ModLunar) added a comment.Dec 24 2019, 2:46 PM

@Sybren A. Stüvel (sybren) Sure thing, I'll post that as a comment with file attachments & screenshots/gifs when ready? (I'll try to get it done ASAP, in the next week or so)

Aaron Carlisle (Blendify) closed this task as Resolved.Feb 10 2020, 5:33 PM
Aaron Carlisle (Blendify) claimed this task.
Aaron Carlisle (Blendify) added a subscriber: Aaron Carlisle (Blendify).

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

. (Crow) added a subscriber: . (Crow).May 30 2020, 9:26 AM

I am having a similar issue, the bones behave properly and as expected in the blender file but after exporting the FBX legs start to slide and jitter, it's more noticeable when the character is large, I tried almost every setting possible, How did you resolve this issue???

Sybren A. Stüvel (sybren) changed the task status from Resolved to Archived.Jun 2 2020, 3:12 PM

@. (Crow) This has not been resolved, @Aaron Carlisle (Blendify) accidentally closed it as Resolved instead of Invalid. If you can provide a minimal example that demonstrates this issue, please write a new bug report for it.

Roger (ragerma) added a subscriber: Roger (ragerma).Jun 5 2020, 12:39 PM

I'm having similar issue. I exported a character walking animation using blender 2.8.3 in fbx format. The animation works ok in Unity on my desktop PC. But when I run the game on android devices, the arms keep shaking when the machine is under load (when there are lots of objects on the screen). I think it has something to do with low frame rate.

Sybren A. Stüvel (sybren) added a comment.Jun 5 2020, 1:22 PM

@Roger (ragerma) This is likely not the same issue. If you can provide a *minimal* example that demonstrates this issue and that shows that it's a problem with Blender, please write a new bug report for it.

Michael (Nib) added a subscriber: Michael (Nib).Jun 10 2020, 10:59 PM

Hi, just found the post, I've been dealing with this issue for years (since 2016).
I believe it's not related to unity since the jitter appears if you reimport the fbx into blender too. It also seems to be tied to IK.

Here's an example file:


And the source:

It actually seems pretty random and I usually can't replicate it, the attached file is the isolated leg of a character suffering from the issue.
To reproduce simply export the animation from the .blend to fbx and reimport into blender.

I'd provide more examples but I haven't managed to replicate it on simple rigs, help would be immensely appreciated.

Sybren A. Stüvel (sybren) added a comment.Jun 18 2020, 4:19 PM

@Michael (Nib) this is not a "post", this is a task in our bug tracker. As I also said to @Roger (ragerma), please write a new bug report, that follows the guidelines at https://wiki.blender.org/wiki/Process/Bug_Reports.

Stepan Usumbely (stpiton) added a subscriber: Stepan Usumbely (stpiton).Sep 28 2020, 6:29 PM
Stepan Usumbely (stpiton) added a comment.Sep 28 2020, 6:47 PM

To help resolve a bug I would like to add another exaple. BlendFile contains both IK animation (source) and reimported FBX animation (result). Export settings are also provided.

n_n (n_n) added a subscriber: n_n (n_n).Nov 11 2020, 2:40 AM
This comment was removed by n_n (n_n).