PDA

View Full Version : Time Expressions

06-23-2007, 01:17 AM
With expressions, I want to move a NULL up the Y axis from 0m to 1m. Beginning at the 30th frame, and stopping at the 60th frame.

How would I write this?

I admit I'm not the sharpest tool in the shed, so any help would be greatly appreciated. I've combed the Expression Builder, searched the .pdf, tried a zillion different things but I still can't figure out how to get Lightwave 9.2 to do this simple thing...

evenflcw
06-23-2007, 05:13 AM

clamp( Frame, 30, 60 ) / 30 - 1

When Frame is anything below 30 it is 30 / 30 - 1 = 0.
When Frame is anything above 60 it is 60 / 30 - 1 = 1.
When Frame is anything inbetween it will be a linear curve going from 0 to 1.

EDIT:
Just out of curiousity, why do you need this as an expression? Why can't you key it?

06-26-2007, 12:38 AM
Thanks Evenflow!!!
The reason I am not just keyframing this is because I want to learn the basic methodology so I can apply it to other animations. "Teach a man to fish he eats for a lifetime" as the saying goes.

Despite reading the manual, pdf and builder, "Clamp" would have been the last thing I would have used!

But I don't understand how ( Frame, 30, 60 ) works.
I would think it would be something like (Frame 30 - 60)
Why commas?

06-26-2007, 12:54 AM
Oh wait, reading the builder I see how the "Clamp" is set up within the parenthesis but I think I don't understand the "/ 30 -1" part.

Is it knocking the motion back down a meter since otherwise it would be going from 1m to 2 m at that point?