Unity Import automatically adds unnecessary Keyframes

Hello Everyone.

I’m having a little trouble with importing my animated Model in Unity. When i just drag the Model in the Project folder it automatically adds Keyframes to all of the Bones although they are not added to the action. I wasn’t able to find an answer to this on here and also using Google.

This causes problems when i try to play animation simultaniously: For example: Aiming the gun + Shooting. (Btw. I’m working with a full humanoid model so controlling the aiming with a script is not really an option for me). My plan for this example was to have the aiming only affect the Main-Weapon-Bone and the Shooting-animation only the children of this bone.

I once saw an comment of someone on here who was talking about an export-setting to get rid of those unnecessary keyframes but i couldn’t find one when i had a look.

Although I know that this question might be more related to Blender then Unity I hope it’s not too off-topic…and if it is or it’s duplicate i will of course close it immediately.

Edit: Sry I forgot to actually write a question…oops…my bad.

My question is: How can import my animated Model into Unity without the automatically added Keyfranes from the fbx converter?

Thanks in advance,

ExTheSea

Is there even such an option or do you mabe have to use a seperate plugin?

I just found this forum thread: http://forum.unity3d.com/threads/122066-Blender-with-Unity-possible-bug So if there really is no way i would have a solution although this one would be really fiddly and i would need to repeat this process every time i change an animation as all my Player/Weapon animation are in the same .blend - File.

I currently solved it using Animation layers but i'm still hoping there is a way to get rid of the unnecessary keyframes.

2 Answers

2

You can loose the unecessary keyframes by breaking up your animations in the model’s import settings:

11549-setanimationframes.png

For example if your animation “walk” is from keyframes 1 to 70 and you want to loose the keyframe on 70, just set it from 1 to the lat keyframe you do want, say 1 to 60.

This also allows you to have tons of animations and allows you to break them up:
Walk (1-60) Run (80 - 120) Jump (130 - 160)

Thank you for answer but i don't think you understood what i really meant and i don't even know if there even is a solution for that. So imagine i have a shoot animation/action where i only added some keyframes for 2 bones. Now when i import the Model into Unity or export it to fbx in Blender it is adding one keyframe for every Bone in the same rig. Now i don't know if there actually is a way to avoid this or if you always have to use layers to solve this problem.

Could you send me your .blend file? I'll e-mail you.

In Blender(Mine is 2.77) while exporting FBX go to “Export FBX” option in lower- left hand corner of your screen. Now under Animation tab deselect “Force Start/End Keying”. This will make sure that the bones which are not keyframed in Blender does not have keyframes in Unity.

75901-capture.png