Imported FBX Animations contains Unnecessary Keyframes #52015

Closed
opened 2017-07-10 17:59:30 +02:00 by Sumit Chaudhary · 15 comments

System Information
Windows 10 64 bit, NVIDIA GeForce 840M

Blender Version
2.78

Short description of error
Whenever I import an animated mesh from Blender, be it using the built-in Unity FBX Importer (importing a .blend file), or the built-in Blender FBX Exporter (importing a .fbx file), the resultant AnimationClips have keyframes defined for all bones, even those that are not being animated. These bones have keyframes associated with their localPosition/localRotation/localScale and are flat linear curves -- they do nothing but hold the bone stationary. Holding bones stationary sometimes breaks animation.

I think there are two settings under Export FBX panel - Key All Bones and Force Start/End Keying but they are not working properly.

Exact steps for others to reproduce the error

  1. Setup your mesh and armature such that you have an armature named A and it has two bones a and b.

  2. Create an action named Animate_a and only animate bone a in this action.

  3. Now create an action named Idle and record only 1 key for all bones in this action(No transition).

  4. Now export FBX with default settings(FBX 7.4 Binary).

  5. Open FBX file in Unity. You will notice that the animation Animate_a contains key for all the bones and armature(A,a and b)

  6. Now repeat step 1 to 3.

  7. Before exporting FBX, Uncheck option Force Start/End Keying under Export FBX Panel and export.

  8. Open FBX file in Unity. You will notice that the animation Idle is nowhere to found.

**System Information** Windows 10 64 bit, NVIDIA GeForce 840M **Blender Version** 2.78 **Short description of error** Whenever I import an animated mesh from Blender, be it using the built-in Unity FBX Importer (importing a .blend file), or the built-in Blender FBX Exporter (importing a .fbx file), the resultant AnimationClips have keyframes defined for all bones, even those that are not being animated. These bones have keyframes associated with their localPosition/localRotation/localScale and are flat linear curves -- they do nothing but hold the bone stationary. Holding bones stationary sometimes breaks animation. I think there are two settings under **Export FBX** panel - **Key All Bones** and **Force Start/End Keying** but they are not working properly. **Exact steps for others to reproduce the error** 1. Setup your mesh and armature such that you have an armature named **A** and it has two bones **a** and **b**. 2. Create an action named **Animate_a** and only animate bone **a** in this action. 4. Now create an action named **Idle** and record only 1 key for all bones in this action(No transition). 4. Now export FBX with default settings(FBX 7.4 Binary). 5. Open FBX file in Unity. You will notice that the animation **Animate_a** contains key for all the bones and armature(A,a and b) 6. Now repeat step 1 to 3. 7. Before exporting FBX, Uncheck option **Force Start/End Keying** under **Export FBX** Panel and export. 8. Open FBX file in Unity. You will notice that the animation **Idle** is nowhere to found.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Sumit-Chaudhary

Added subscriber: @Sumit-Chaudhary

Added subscriber: @mont29

Added subscriber: @mont29

Don’t know what you expect here… Afaics the options are working as intended from your description…

Don’t know what you expect here… Afaics the options are working as intended from your description…

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-07-17 13:00:41 +02:00

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

For a perticular animation(LeftDoorOpen) I don't want to key all bones while also keeping the 'Idle' animation in exported fbx file. Please tell me a way to do it.

Option 'Key All Bones' does nothing and option 'Force Start/End Keying' drop the animations with no transformation (ex: Idle).

This is a well known problem in blender fbx export for a very long time. Check this post-

http://answers.unity3d.com/questions/710376/import-blender-animation-without-unnecessary-keyfr.html

Please solve this problem. Everyone I contacted have acknowledged this problem but nobody has a solution. The only workaround I discovered -

  1. Move or rotate bones to a negligible value(0.0001 ) in 'Idle' action.
  2. While exporting, uncheck 'Force Start/End Keying'.

But this is not correct way so please give me a solution.

Thanks in advance.

For a perticular animation(LeftDoorOpen) I don't want to key all bones while also keeping the 'Idle' animation in exported fbx file. Please tell me a way to do it. Option 'Key All Bones' does nothing and option 'Force Start/End Keying' drop the animations with no transformation (ex: Idle). This is a well known problem in blender fbx export for a very long time. Check this post- http://answers.unity3d.com/questions/710376/import-blender-animation-without-unnecessary-keyfr.html Please solve this problem. Everyone I contacted have acknowledged this problem but nobody has a solution. The only workaround I discovered - 1. Move or rotate bones to a negligible value(0.0001 ) in 'Idle' action. 2. While exporting, uncheck 'Force Start/End Keying'. But this is not correct way so please give me a solution. Thanks in advance.

Setting priority yourself is not a good idea, especially not to high. Also, this report does not sounds like a bug report at all, more like a feature request. And finally, we are lacking simple demo files here, as requested by submission template.

Setting priority yourself is not a good idea, especially not to high. Also, this report does not sounds like a bug report at all, more like a feature request. And finally, we are lacking simple demo files here, as requested by submission template.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

Added subscriber: @Frizzil

Added subscriber: @Frizzil

I'm having the exact same issue in 2.81, and this is definitely a bug, since the checkboxes don't appear to be doing what they say they do. If it's not possible to fix this, then perhaps the checkboxes should be removed? In any case, please re-open this issue.

My use case: layering animations after importing with assimp. An animation "layer" should only affect a subset of bones, but unchecking 'Key All Bones' still produces animation channels for all bones. Having to specify bones manually for a layer and having a bunch of excess data is a pain, that presumably this option was meant to fix. What's stranger is that with Simplify set to 1.0 and Force Start/End Keyframes off, I also see some lost animations.

Output with Simplify=0.0, any combo of 'Key All Bones', 'Force Start/End Keying',
OR
Simplify=1.0, 'Key All Bones' and 'Force Start/End Keying' on.

Animations: 12
  rig Naomi|ChargeShoot.L: dur=8.00, ticks_hz=12.00, channels=51
  rig Naomi|ChargeShoot.R: dur=8.00, ticks_hz=12.00, channels=51
  rig Naomi|Eat: dur=16.00, ticks_hz=12.00, channels=51
  rig Naomi|Fly Backward: dur=1.00, ticks_hz=12.00, channels=51
  rig Naomi|Fly Forward: dur=1.00, ticks_hz=12.00, channels=51
  rig Naomi|Fly Still: dur=1.00, ticks_hz=12.00, channels=51
  rig Naomi|Run Backward: dur=8.00, ticks_hz=12.00, channels=51
  rig Naomi|Run Forward: dur=8.00, ticks_hz=12.00, channels=51
  rig Naomi|Standing: dur=48.00, ticks_hz=12.00, channels=51
  rig Naomi|Standing Hurt: dur=1.00, ticks_hz=12.00, channels=51
  rig Naomi|TakenBack: dur=1.00, ticks_hz=12.00, channels=51
  rig Naomi|Walk: dur=24.00, ticks_hz=12.00, channels=51

Output with Simplify=1.0, 'Force Start/End Keying' off, 'Key All Bones' any value.

Animations: 7
  rig Naomi|ChargeShoot.L: dur=8.00, ticks_hz=12.00, channels=26
  rig Naomi|ChargeShoot.R: dur=8.00, ticks_hz=12.00, channels=26
  rig Naomi|Eat: dur=16.00, ticks_hz=12.00, channels=24
  rig Naomi|Run Backward: dur=8.00, ticks_hz=12.00, channels=34
  rig Naomi|Run Forward: dur=8.00, ticks_hz=12.00, channels=23
  rig Naomi|Standing: dur=48.00, ticks_hz=12.00, channels=34
  rig Naomi|Walk: dur=24.00, ticks_hz=12.00, channels=38

I expect to see fewer channels only when 'Key All Bones' is off, but that's not happening at all, and the second output case appears to be losing both bones and animations, regardless of the 'Key All Bones' setting. (EDIT: to clarify, I actually import the FBX from the 'Key All Bones' on/'Force' on/'Simplify=1.0 case into my engine, and the data is what I expect.)

I'm uploading my affected rig and animations, with meshes and other data stripped out. Just open it, go to Export FBX, select Test Preset, play with the Bake Animation params according to above, then inspect the exported FBX. (You can probably use open3mod if you want to test assimp specifically: http://www.assimp.org/).

If you need more data, I might could include the mesh, but I'm hesitant to share much more. If you want, I also have a Java script that spits out the above using the assimp bindings included with LWJGL.

Thanks for your time, would really appreciate an update on this.
FbxExportAnimBakeIssue_Meshless.blend

I'm having the exact same issue in 2.81, and this is definitely a bug, since the checkboxes don't appear to be doing what they say they do. If it's not possible to fix this, then perhaps the checkboxes should be removed? In any case, please re-open this issue. My use case: layering animations after importing with assimp. An animation "layer" should only affect a subset of bones, but unchecking 'Key All Bones' still produces animation channels for all bones. Having to specify bones manually for a layer and having a bunch of excess data is a pain, that presumably this option was meant to fix. What's stranger is that with Simplify set to 1.0 and Force Start/End Keyframes off, I also see some lost animations. Output with Simplify=0.0, any combo of 'Key All Bones', 'Force Start/End Keying', OR Simplify=1.0, 'Key All Bones' and 'Force Start/End Keying' on. ``` Animations: 12 rig Naomi|ChargeShoot.L: dur=8.00, ticks_hz=12.00, channels=51 rig Naomi|ChargeShoot.R: dur=8.00, ticks_hz=12.00, channels=51 rig Naomi|Eat: dur=16.00, ticks_hz=12.00, channels=51 rig Naomi|Fly Backward: dur=1.00, ticks_hz=12.00, channels=51 rig Naomi|Fly Forward: dur=1.00, ticks_hz=12.00, channels=51 rig Naomi|Fly Still: dur=1.00, ticks_hz=12.00, channels=51 rig Naomi|Run Backward: dur=8.00, ticks_hz=12.00, channels=51 rig Naomi|Run Forward: dur=8.00, ticks_hz=12.00, channels=51 rig Naomi|Standing: dur=48.00, ticks_hz=12.00, channels=51 rig Naomi|Standing Hurt: dur=1.00, ticks_hz=12.00, channels=51 rig Naomi|TakenBack: dur=1.00, ticks_hz=12.00, channels=51 rig Naomi|Walk: dur=24.00, ticks_hz=12.00, channels=51 ``` Output with Simplify=1.0, 'Force Start/End Keying' off, 'Key All Bones' any value. ``` Animations: 7 rig Naomi|ChargeShoot.L: dur=8.00, ticks_hz=12.00, channels=26 rig Naomi|ChargeShoot.R: dur=8.00, ticks_hz=12.00, channels=26 rig Naomi|Eat: dur=16.00, ticks_hz=12.00, channels=24 rig Naomi|Run Backward: dur=8.00, ticks_hz=12.00, channels=34 rig Naomi|Run Forward: dur=8.00, ticks_hz=12.00, channels=23 rig Naomi|Standing: dur=48.00, ticks_hz=12.00, channels=34 rig Naomi|Walk: dur=24.00, ticks_hz=12.00, channels=38 ``` I expect to see fewer channels only when 'Key All Bones' is off, but that's not happening at all, and the second output case appears to be losing both bones and animations, regardless of the 'Key All Bones' setting. (EDIT: to clarify, I actually import the FBX from the 'Key All Bones' on/'Force' on/'Simplify=1.0 case into my engine, and the data is what I expect.) I'm uploading my affected rig and animations, with meshes and other data stripped out. Just open it, go to Export FBX, select Test Preset, play with the Bake Animation params according to above, then inspect the exported FBX. (You can probably use open3mod if you want to test assimp specifically: http://www.assimp.org/). If you need more data, I might could include the mesh, but I'm hesitant to share much more. If you want, I also have a Java script that spits out the above using the assimp bindings included with LWJGL. Thanks for your time, would really appreciate an update on this. [FbxExportAnimBakeIssue_Meshless.blend](https://archive.blender.org/developer/F8331795/FbxExportAnimBakeIssue_Meshless.blend)

Added subscriber: @davidpetrasek

Added subscriber: @davidpetrasek

Hello, I am having the same issue on Lubuntu 18.04 (Blender 2.82a installed through snapd). Only leg bones have assigned animation channel with 3 keyframes, but after export (see screenshot and files) all bones of this character have animation channel with 3 keyframes (Assimp tells me that). I also tried different export settings. 2020-05-11-095306_1920x1080_scrot.png

anim_NEW.fbx

anim_NEW.blend

Hello, I am having the same issue on Lubuntu 18.04 (Blender 2.82a installed through snapd). Only leg bones have assigned animation channel with 3 keyframes, but after export (see screenshot and files) all bones of this character have animation channel with 3 keyframes (Assimp tells me that). I also tried different export settings. ![2020-05-11-095306_1920x1080_scrot.png](https://archive.blender.org/developer/F8527585/2020-05-11-095306_1920x1080_scrot.png) [anim_NEW.fbx](https://archive.blender.org/developer/F8527588/anim_NEW.fbx) [anim_NEW.blend](https://archive.blender.org/developer/F8527597/anim_NEW.blend)
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#52015
No description provided.