PDA

View Full Version : Baking Motion when using NULLs - How?



Matt
11-12-2007, 07:14 PM
I'm trying to create a 'dusk till dawn' sun light animation using Denis' SunSky plugin.

First I tried using Time Lapse on the SunSpot plugin, but not only is it unpredictable in the way it works, but it turns out it has a glitch on one of the frames where the light position jumps. So using that is out.

Next I thought I'd parent the light to a null and rotate that, but the SunSky plugin doesn't get the position / rotation of the light because the motion curves for X,Y,X, H,P,B on the light show up as static, despite being moved correctly in the viewport.

Okay, so I thought I'd bake the light motion. Nope, baking in the Graph Editor has the same issue, the curves are static, so it creates keys in the same place.

Motion Baker plugin next, but it goes absolutely nuts!!!!! Totally not what I expected.

So, question is, HOW in the hell am I supposed to bake the motion of one item whose motion is being modified by NULLs?

I can't believe none of the options I've tried work correctly at all, useless.

Matt

walfridson
11-13-2007, 01:24 AM
You could create a lscript that works like this.

Parent in place on
Loop untill endframe{
Unparent from null (keys are created)
Parent to null
Next frame
}

maybe someone has a better solution...

Captain Obvious
11-13-2007, 03:48 AM
The Motion Baker is a bit, uh, tricky to use. If you set it to replace existing keys, it goes bananas. You need to set it to use "extra channels" and then copy & paste those channels to the proper ones in the graph editor. Once that's done, unparent the light (with "parent in place" turned OFF).

Matt
11-13-2007, 05:09 AM
Thanks Capt'n!

I figured that out eventually (I was trying every combo!)

But you know, it's things like this that get me really depressed in LightWave, and then absolutely furious.

<Really starting to have enough, end of the line rant mode on>

What is the point of writing a tool that plainly DOES NOT WORK in the way it was intended? I mean, in the bigger scheme of things, if we can't get these smaller and simpler tools right, what chance to do we have for th more complex stuff?

Better to NOT include a tool that doesn't work than implement another half-assed one that just p!sses people off.

<Really starting to have enough, end of the line rant mode off>

adamredwoods
11-13-2007, 12:41 PM
Lightwave codes its motion animation with respect to its parent. Therefore, if your object is parented, but not moving, that object wont store any information.

Since Lightwave doesn't store this information regarding parent motion, it affects many aspects of animation in Lightwave. Only complex formulas will get around this.

I wrote RigMaster, which gets around these aspects, but I'm not sure I'll release a motion baker for some time.

@Walfridson: That's not a bad idea...

Matt
11-13-2007, 01:09 PM
Adam, that's what I suspected was going on, not sure what the benefit of doing it that way is, but I'd vote for the other way, or a toggle to pass down the information to the child object so baking in this manner works.

Walfridson - Good idea, I think I might have a go at that for occasions such as this!

Cageman
11-13-2007, 04:59 PM
I've used a plugin from D-Storm which is called Output World Coordinates. What I usually do is I create a new Null, select the parented object, run the tool and tell it to output to the newly created null. This results in a Null that behaves and moves exactly like the parented object, but in worldspace instead. It's very usefull at times.

EDIT: Output World Coordinates is magic, because it doesn't "bake"... well, it does, but it happens in a second or two... compared to motionbaker (when it works). :D

adamredwoods
11-13-2007, 06:33 PM
You know what, now that I think about it, there are several plugins available for this type of procedure.

In case there's not, here is one I just wrote in Lscript. :)
---------------------

Bake Motion to Null
for Lightwave, version 8+
Mac/PC

Works on any mesh object, not just nulls. Also works with bones, but IK is untested. Does not bake inherited scaling motion.

Feel free to distribute, examine, etc.

Matt
11-14-2007, 03:46 AM
Thanks for taking the time to look at this Adam!

However, I'm getting some very odd results running your plugin.

Just to check I have this set up correctly.

I have a 'rotate null' at 0,0,0

I have a light parented to a 'light null'

The 'light null' is parented to the 'rotate null'

The 'rotate null' is rotated 180 degrees on the bank axis to spin the light around the 0,0,0 centre.

I've tried all combinations of 'Object to Bake' and 'Null Object to Transfer to', but none give the results I'm after.

What am I doing wrong?

adamredwoods
11-14-2007, 04:44 PM
I've tried all combinations of 'Object to Bake' and 'Null Object to Transfer to', but none give the results I'm after.

What am I doing wrong?

If your objective is to bake out the motion to the light, first download this slightly revised version of the script. :D

Then:
- select light
- duplicate light (control-c)
- unparent the new light
- select original light
- run plugin from 'utilities->Lscript'
- select newly created light under 'null object to transfer to'
- execute


Hope this is what you're looking for.

//Adam