- Home /
Imported blender object results in keyframe changes
Hi, I need some advice regarding animations. I have searched a fair bit in the forums and answers but have not seen anything that covers my query. I create a character with animation in blender. The key frames run from 0 - 27. It is imported as a .blend file (had nothing but trouble trying to use .fbx). Everything seems fine but under the animations tab in the import settings it has changed the start frame to -1 and the end frame to 26. I would have left it but am now getting a message saying that due to negative keyframes animation compression is not possible. The message only occasionally shows up and I do not understand why when no changes have been made to the scene. I have tried changing the start and end keyframes to match the original blender files i.e 0 and 27 but it seems to think that frame 27 does not exist and resets the end frame to 26. I am at a loss as to whether this is normal when importing objects and whether it will affect performance. Any advice would be useful. Thanks
$$anonymous$$eyframes in blender normally start with "1" not "0". So I guess unity wants to correct this and making "0" the first frame by "adding" -1 to the keyframe numbers.
Answer by BloodKnight · Sep 28, 2015 at 06:06 PM
In Blender per default you doesn't set a key frame 0. (At start of Blender it is set to key frame 1.)
But Unity's animation's begin with key frame 0. This is also setted by default in the importer of Unity to push the animation 1 key frame back so the key frame 1 (Blender) becomes key frame 0 (Unity).
Because of that you should push your animation to begin with key frame 1.
Hi saschandriod and Blood$$anonymous$$night,
Thanks for the responses to this question. I appreciate your help and time. What you're saying seems to be correct.
It's been a while since I posted this question and had managed to get the animation looping in such a way that it seems to be working for my basic animations in that they look ok.
I imagine if anyone else if having problems with this it may be worthwhile adding a couple of dummy keyframes in blender and leaving these out of the selected frames in Unity.
I have noticed since blender updated to 2.75a that all the .fbx import problems have disappeared when using unity 5.1. Not tried on 5.2 yet but much better and no change of axis and scale issues.
I always found that repeating the first keyframe after the end of the animation helped greatly in perfor$$anonymous$$g a viable loop. If I didnt do this the final motion would have trouble returning to the start and it ends up having some tiny jump or glitch.
If you think of the way the animation curves work in blender this makes sense. Without the proper curve between the final keyframe and the first keyframe you get a step transition ins$$anonymous$$d. As a point of note on this, this added keyframe at the end can be left out of the playable range and the curve still works.
I have made a pile of animations before and found myself for the first time running into this issue with Blender and Unity. I noticed the first keyframe was empty. Like above suggested, adding in a the full rest pose for the first keyframe and last spot seem to fix the issue right away. Thanks!
Your answer
Follow this Question
Related Questions
All Animations Using Same KeyFrames 1 Answer
How to edit read only animations 3 Answers
Why don't stepped keyframes work in unity? 2 Answers
Why am I losing 2 keyframes when i import my animations? 0 Answers
Manually Animating Bones then blending with existing animations or saving importing as fbx 3 Answers