I’m doing some animations for a game in XNA, and one of the programmers wanted me to have all the animations baked, so that there’s a keyframe on every frame. How can I do this in both Blender 2.5 as well as in 2.49b? I hope there’s a way to do this other than to press i > locRotScale for every single frame.
- Go to render options in the properties window
- go into animation layout
- once the animation is already fixed…
4. press play so it records “every frame” without skipping
no wiat…
- Go to render options in the properties window
- “dimentions” - frame range - “steps = 1”
3.go into animation layout
4.once the animation is already fixed…
5. press play so it records “every frame” without skipping
Is this for 2.49 or 2.5? I can’t find an “animation layout” tab in either of the render settings
interesting question.
there is no way i know of that can do this in blender (automatically anyway), but…
if you have little keyframes, better to do i > locrot.
BUT.
if you have alot keyframes:
1.lock ALL the bones on one axis.
2.select all your bones.
3.play your animation.
4.move them in the axis you locked 'em (eg ‘G’, ‘X’)
important: put auto keyframing on
keep moving em until you have keyframes on all frames.
Voila!
not automated, but better than i > locrot on all frames.
(btw, i have no idea what poiuqwerty is talking about)
peace :spin:
Hi I’d go about it using a script.
Create a new blank action. I’d go with a fresh one in case your existing keyframes are offset from integer frames.
Loop thru the fcurves of your original action, write them to your new action with a keyframe in at every frame using the fcurve’s evaluate function.
there is a difference in unterstanding what a “keyframe” is.
From what i know for doing simple animations for “enemy territory” (md2/md3 format), you do not need to bake all keyframes inside of blender. It is the exporter, that walks through the animation and exports the positions at every single step.
Here is a script (2.55) that does what i listed in previous post. Change the ActionName to suit.
import bpy
ActionName = "Action"
action = bpy.data.actions[ActionName]
bakedaction = bpy.data.actions.new(ActionName+"BKD")
for fcurve in action.fcurves:
frame = action.frame_range[0]
newcurve = bakedaction.fcurves.new(fcurve.data_path,fcurve.array_index)
while frame <= action.frame_range[1]:
newcurve.keyframe_points.add(frame,fcurve.evaluate(frame))
frame += 1
i’m a little unsure on how to use the script. i’ve never done scripts before.
Also, this part confuses me “Loop thru the fcurves of your original action, write them to your new action with a keyframe in at every frame using the fcurve’s evaluate function.”
Thanks!
Never too late to start.
to use the script open up a text window, paste in the script below, edit the actionName “Action” to match your action. Right click and press run script. It creates a new action, based on the old with a keyframe on every frame.
The fcurves are graphs of frame vs value pairs for properties that have been keyframed. If you keyframe location you produce an fcurve for x y and z location. Any values inbetween are calculated from these curves.(using the evaluate method, in 2.5 it shows keyframed properties in yellow and properties evaluated from those keyframes in green )… and values outside the end points too … you can set extrapolation type for instance.
So all in all the script does the equivalent of inserting a keyframe every frame in the UI, based on your original action… in the time it takes to press “run script”. However, if it’s too confusing stick to manually crunching them in.
That’s exactly what I did. I pasted into a the test editor, changed
“ActionName = ‘Action’” to “ActionName = ‘walk’” and clicked “run script”
then nothing happens
Hmm nothing happens is kinda good thing… means no errors…
There will now be an action called walkBKD… which is “hopefully… hey there’s no guarantees” an identical copy of your walk action with keys on every frame. Swap that action over to be the active one for your rig.