View Full Version : Can't seem to bake a good camera motion
CrazyGuy
05-15-2008, 01:10 AM
I want to bake the camera motion of Lightwave so I can export it to another app. But after baking, the camera keeps running off the rails and then jumping back again. It looks as if the curves got squished up, causing jumpy camera movement.
I wonder what I did wrong?
Here's how I did it. I selected the Lightwave camera. Then I selected Setup > Motions > Motion Options for Camera. On the Add Modifier drop-down menu, I selected Motion Baker. Double clicking on Motion Baker, a dialog box appeared, and I selected Use Existing, ticked Overwrite Keys, and selected all the Position and Rotation channels.
Then when I hit the Play button in Lightwave, the camera motion is all screwed up. Any ideas? Thanks.
rdrdrd23
05-15-2008, 05:11 AM
yup- got this one after *many* hours of trying to figure out WTF was going on.
Best way to use LW's baker is to almost always `bake to extra channels`. What that does is store the info off as it finds it, but leaves the original keys/modifiers active as normal. I.e. the NEW baked keys don't overwrite or influence whats going on normally.
Turn off `play at exact rate` so you definately capture each key, the press play until your anim has run through.
Now turn off the baker in the motion options.
Then, go to the graph editor and add the current item to the selection (I think CTRL+G). This will now show you ALL the channels attached to the bone/camera/item in question. Why NT elected to not show all channels by default baffles me, but I digress.
You *should* now see in graph editor that after baking there should be extra channels named `camera heading after IK` or somehtign similar. Right click on this extra channel and copy, then right click on the corresponding normal heading channel and paste.
Then follow the same procedure for each fo the channels you've baked.
Voila. THis is it!
Now, two things that can trip you up.
Firstly, I've experienced that when you're doing camera baking, especially if the camera is in a heirarchy and moving and is targeting soemthing, that you might need to bake the positional motion only once. THen remove the camera heirarchy and have it move correctly, then bake the rotation with the target aim afterwards. this will then work.
Secondly, after baking you might find a jump of 360deg in a given channel or sometimes two. THis is what I'd use a UELA filter for in Motionbuilder or Maya to keep your motion `legal`, but to fix it, simply move all the relevant keys up or down 360deg as appropriate to fit your motion. this might sound wierd, but when yuo've done lots of baking, you'll see it!!!
Hope this helps!
rdrdrd23
05-15-2008, 05:13 AM
If you PM me and send me your email address, I'll send you a bullet-proof baking guide I wrote for the in-house guys. Its specifically for baking IK and modifier stuff down to bones-only, but its relevant for cameras too.
Nangleator
05-15-2008, 08:04 AM
Good gracious. That's not a feature, it's a horrific work-around. I think it's easier getting a fluid simulation from Blender into LW.
rdrdrd23
05-15-2008, 08:34 AM
Oh I dunno. Its not so bad. I really need to learn Script so I can automate the process of picking through a whole scene and automatically copying any baked keys over the top of the regular channels, and cleaning up afterwards.
ho hum
pixelranger
05-15-2008, 08:52 AM
if the camera isn't parented to anything or has any motion modifiers or anything external that influences the camera motion you can also just open the Graph Editor and press 'b' in every channel. That just bakes the curves, essentially.
CrazyGuy
05-15-2008, 09:27 PM
Many thanks to 'rdrdrd23' and 'pixelranger' for those replies. Both your methods look like they are very useful. The simple 'b' key for simple motions, and the Motion Baker plug in for complex motions.
I tried the 'b' method, but my camera was set to "align to path", which looked fine in Lightwave but didn't look so good when imported into the other application.
So in that case, I guess it's a job for Motion Baker, using 'rdrdrd23''s method. It is surprising nobody has written a script to perform this task.
thanks :)
CrazyGuy
05-16-2008, 01:19 AM
I'm having trouble with Motion Baker when I select Extra Channels. After running the Motion Baker, then selecting the Graph Editor, I can't find any extra channels. Where does it put them?
Also, should I select the option to Overwrite Keys? Doesn't that just erase any existing keys?
Cageman
05-16-2008, 04:11 PM
I'm having trouble with Motion Baker when I select Extra Channels. After running the Motion Baker, then selecting the Graph Editor, I can't find any extra channels. Where does it put them?
Also, should I select the option to Overwrite Keys? Doesn't that just erase any existing keys?
Have your Camera selected, then open Graph Editor. Click on the Selection dropdown menu and select Get Layout Selected. This will show all Extra Channels associated to the object(s) selected in Layout.
An important thing to remember about Extra Channels is that they are NOT stored with the scenefile, so even if you save and then reload the scene, ALL Extra Channels will be deleted.
EDIT: About baking with Motion Baker, you can also make a preview in order to bake. Using this method you don't have to mess with the playback settings.
Cageman
05-16-2008, 04:23 PM
I'll go ahead and ramble little here: ;)
Generally though, I have to say that I'm quite dissappointed about the current implementation of keyframe baking, especially when baking constrained objects/joints/whatever in order to be able to bring them into other packages. I have baked a fair share of characters (80+ bones) and it's really, really slow and can produce euler rotations which in turn there are no tool in LW to deal with. In Maya they have been smart enough to provide a tool called Euler Filter in the Graph Editor which solves the problem in a mouseclick, while in LW you have to sort it manualy... not fun if you have 79 bones to go and both heading and bank are affected on each bone.
CrazyGuy
05-18-2008, 11:21 PM
I'm now getting my camera motion across to another application. Thanks again for the advice from everyone above.
However, the camera is flipping around, due to the Euler problems (mentioned above). I had not heard of Euler before, but found a Wikipedia article about Euler Filters:
http://en.wikipedia.org/wiki/Euler_filter
These wild rotations are really a major issue. Even for a simple camera motion, after you have baked it there are hundreds and hundreds of keyframes. It seems each one must be changed from a '-' (minus) value to a '+' (plus) value so that the camera points the correct way again.
Wouldn't this be a relatively simple thing to solve with a script? (I know nothing about coding scripts). When a keyframe suddenly bounces to approximately a 360º rotation from one keyframe to the next, a script could change the negative value to positive. Even a simpler script where you could manually select a range of keyfames and the script converts them from negative values to positive values (or the other way round) would be useful. Maybe my meagre understanding of the situation makes me think the solution would be simpler than it is.
I just don't know how I'm easily going to fit Lightwave into a pipeline with other 3D applications if I have to manually convert hundreds of keyframes for every shot.
Lightwave has been around for so long, I am surprised nobody has found a way to make a Euler Filter, or some other work around. Please let me know if my understanding of this is wrong. Thanks.
rdrdrd23
05-19-2008, 02:45 AM
Good to see you guys are actually starting to get some results. I too have been baking down characters with 40+ bones and haven't seen *too* many times when it happens, and its normally very obvious when it does- quickest test rather than going though and looking at all the graphs, is to scrub through manually with the fractional frames switch on- that way, you can see those sub-frame rotations happen really easily and go fixem. Of course, this will be a a royal pain in the *** if your motions are anything more than a couple of seconds long! =(
Oh well, there you go. Script request going out to anyone with more cerebrial matter than us grunts! EULER filtering please? help? anyone listening?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.