I’m starting to work soon on animating character part of my game and I was wandering:
Optimizing in mind, should I keep animations as simple as possible?
By that I mean does it matter if I keep auto-record on and just animate stuff making it record it all.
Or should I carefully animate only the part I need for that specific action? What kind of an impact does this have to the general game, has anyone tested?
I just started to think about this when animating my dummy character for code testing and noticed that
having auto-record on records all kinds of unneeded information.
The thing that would really help is a way to limit the animation framerate. It is possible through python.
And make sure the armature deforms are set to ‘’‘BGE’’’.
Isn’t there already animation framerate setting in rendering tab while in game engine mode?
But for now I was mostly talking about having undeeded data recorded, if that have any impact on the game’s performance or if it would help having no such undeeded data recorded for animations.
You will want to avoid unneeded keyframes. They bloat the filesize and I think also stress the animation since it’s doing interpolation curves based on more points than it needs. Switch the autorecord on when you start working on the animation and remember to switch it off as soon as you’re done with it. You can tell you have it on when every time you move an object in scene the location and rotation fields turn yellow as it adds a keyframe (and animation) for it.
If you need a keyframe for certain bone or not is in fact a feature you can and should use for your benefit. If you’re making a running animation, you might either want to include hands movement there or you might want a separate hand animations for different kinds of weapon the character is holding or if he’s attacking while he is running. You can then play the hands and legs animations on different layers but you need to make sure hands animation doesn’t have leg keyframes and legs animation doesn’t have hand keyframes.
Sometimes you will want a keyframe for every bone in the beginning of certain animation (such as idle) to set the bone position correctly no matter after which animation the new animation is called from.
Also a tip about removing unneeded keyframes: Graph editor with F-curves gives you good insight on if the animations have unneeded points (keyframes) or if the point is infact redefining the curve in a desired way.
EDIT: BTW for exporting to Unity (if someone is interested) it turns out you will need to add a keyframe almost every bone for every frame for some reason otherwise you get the animations mixed up.