My latest LScript is a motion baker script for LightWave that bakes such things as items animated through Denis Pontonnier’s DP Kit + Node Item Motion and other “non standard” ways of animating in LW.
It also bakes all selected items, and on a test of 100 nulls, it took about 12 seconds to bake them over 100 frames, so 10.000 keys set in total. To make sure that it bakes the correct value, it runs through the timeline once, extracting the values from each selected item, and then afterwards applies those values to the respective channels: position, rotation and scale.
Once it is done baking, it goes back to the frame you were at when triggering the script, nothing grand, but just a little extra touch to make it a nicer workflow. As far as I can tell, this script will bake other tricky animations such as expression based animations and the like. Give it a spin and see if it works in your projects.
Thanks to Mikael Burman for suggesting and testing the script!
Edit: updated the script to have a GUI so you can specify the range of frames to bake.
I’m having trouble with the generated keys not including its Parented Object’s motion.
I think it needs to have its motion calculated relative to an Origin point, then applied to a new object or Null, so the resulting path is not affected by the Parent and subsequently exaggerated.
Can that be done?
The parent wont be baked unless it is also selected, so the best way around it is to go to the scene editor and select children recursively. If thats not what you are after, could you send me an example scene of how it is not working?
Thanks for the quick response.
That didn’t seem to work, but then I may have misunderstood.
I’m applying this to a Camera Path. It’s Parented to two Nulls affecting its position and bank, while it’s Targeted to another Null that is affecting its pan and tilt. (based on the motion tracking advice here: http://bit.ly/cR1W3p )
Does that make a difference?
Then I would suggest that you replace the camera with a third null, and just use a motion modifier on the camera to make it follow that third null, so when you bake the camera, it will be correct in world space.
Awesome plugin! You just made my life a whole bunch easier! Thanks!
Thanks again for an awesome plugin. I have a slight issue with it in that when I bake an object that has rotation more than 360 degrees, lets say 0 – 720 degrees over 100 frames… the baked keyframes only bake from 0-360 degrees and then jump back to 0 for the 2nd rotation. I have a lot of animations with huge rotations to bake, from 0 to 3600 degrees etc… so it is causing me a few problems having to adjust the baked keyframes by hand in the graph editor. Is there going to be an update which can handle rotations past 360 degrees?
I am not sure why it does not bake the same value as shown in the GUI, at the same time, a rotation only goes from 0 – 360 x revolutions so there could be something with it not taking that into consideration. Will have to look into it.
My apologies, it turns out that your motion baker works perfectly. I am using a 3rd party plugin (match goal orientation) alongside your motion baker and it turns out that it’s that one that only does 0-360 degrees in world space, and not yours.
Sorry :^(
No prob π
Hi, I seem to be getting the same issue again with the motion baker…using curve constraint on a null, baking it using MFMotionBaker and the result is as described above, where it only seems to bake between 0-360 degrees.
Any ideas?
Thanks in advance π
As before, the script only bakes the value it finds in the animation curve of the item. If it bakes between 0 – 360, then thats the value of the curve I would guess. I haven’t looked at the scripts lately, but I might give it a nother looksy soon, to ensure LW11 compatabily and perhaps convert them to Python.
Ah ok, so its the curve that’s causing the null to snap back rather than the baker…thanks. Sorry, should have checked that.
How many email addresses do you have Simon? π I keep having to approve your posts as each of them specifies different emails π Anyway, feel free to post feedback in any way or form π
Plug-in works great! Using it at work for our projects and it makes things easier. Thanks for the work!
Thanks for the script!
Brilliant Lscript!! ..so many people on the forums have been having problems with motion modified motion not baking properly ..curve constraint for one, and none of the usual baking options work …but your’s did perfectly …great job! Thanks
Thanks, glad to hear that π
ello Senior!
another LW resque :]
just wanted to share a link to a MFbaker video Cageman made some time ago… might be handy for newbies..
thanks again π
linky –
http://forums.newtek.com/showthread.php?t=116845
Sorry if this is a dumb question, but does your baker script work for a simple IK rigged character? I tried it with mine and the knees and hands aren’t working. Does this bake IK too?
Pardon my late reply, but yes, it should work on any type of item. Are the knees and hands consisting of some sort of special items in the rig?
Hi There! Thank you for the script, it’s exactly what I’m looking for…but I’m not quite sure how to use it the way I mean to.
What I mean is, I’m trying to bake an IK animated character’s bones to operate in FK. I don’t know how to go about this. The most intuitive way (i.e., baking the bone’s position through the animation and turning the IK off to check if it worked) isn’t giving any results. Other than setting limits, my animation has nothing particularly special. What am I doing wrong?
A short screen capture of my issues:
http://dl.dropbox.com/u/48192128/Motion%20Baker%20issues.mov
Select the animated items, run the LScript and you should be able to bake the keyframes π You can add the script as a button in the LightWave interface like any other plugin as well. Let me know if you have any troubles with it.
Edit: I just saw your animation and see what you mean. Does the bone have some sort of “Target Item” or similar that overrides any baked keys?
To my knowledge, the only things affecting the bones are IK chains in the arms, legs, and tail, as well as the parenting structure of the bones. In the animation, the arm goals show as the orange boxes. The lower arm bones (the examples in the video) don’t have a direct target item, but they are affected by their direct children, which have the arm goals as goal objects.
Your script saved the day, after hours of trying other methods MF Motion Baker had me up and running in about 2 minutes!
Thanks!
Hi, I am interested in exporting IK animations using match goal orientation to Unity. Everything I have tried including this plugin doesn’t seem to work. When I import my fbx into Unity it continues to ignore the IK animation even though all the objects,nulls, and bones are baked using your plugin. Am I doing something wrong? Should this work? Is there a better working order when making animation for Unity? Thank you so much for your help. This problem has been plaguing me for far too long.
Woohoo, another LW -> Unity user π Could you provide me with the LightWave scene, I’ll take a look. Also, what version of LW are you using?
I just wanted to let you know I consider this one of the most important tools in my animation workflow. This program really is a boon to animators of Lightwave!
Thank you so much for the kind words π
I ran into a situation where MF Motion Baker would not work for a parented null, but it did work when the null was linked through Motion Options using controller limits with βWorldβ and βSame as itemβ checked
love it. worked for me right out of the box.