View Full Version : Expression Problem - Please help
03 March 2006, 10:20 AM
I have one problem with writing expression for speeding up one deformer's offset.
To be sure you will understand me i've attach file that contains simple scene
Play the scene then change the attribute "Speed" of the circle controler. It's working OK.
But try to animate for example from 1 to 2, only while in incresasing process the deformer became really fast them its working ok....
Could someone fix this please??
03 March 2006, 10:35 AM
It's working fine here...
03 March 2006, 10:53 AM
Set key on the speed attr to 1 for frame 50, then set key on the attr to 2 for frame 100. go to frame 150 and play, see how it work, then go to frame 60 and play to see. Between frame 50 and 100 its running super fast then after frame 100 its normalized again. thats the problem.
03 March 2006, 11:41 AM
well, your graph looks like this...
I'm trying to figure out why.
03 March 2006, 11:50 AM
The scene should have only one Expression. Delete all keys and try again. I may forgot to delete something... sorry about that. I can't understand how to make this expression to wotk :banghead:
03 March 2006, 12:02 PM
the scene only has one expression. I just baked the offset.
What I'm thinking:
The value of the offset will always ascend because it's hooked up with time and when you key the speed you accellerate it, but when you stop increasing the speed it goes back to ascending at a smooth range wit the time as input only. Hence the graph. If you ditch the time and just key the speed you can see it run smoothly. So when you have ONE attribute ascending it will run smoothly, when you have TWO you kind of get a double translate.
Maybe this will work better:
sineAttrs.offset += ((ctrl.speed)/5);
03 March 2006, 01:03 PM
COOL man.. :scream:
I was thinkink the operator "+=" is for increasing. Thats why i didn't try with that.
03 March 2006, 01:11 PM
well, the += does only add itself + the value you put in.
$hello += 1;
is the same as
$hello = $hello + 1;
++ is for increasing
03 March 2006, 01:34 PM
yep... i have a lot to learn about MEL and expressions
03 March 2006, 02:48 PM
no problem ;) I learn something new everyday :) MEL is too big to learn in a quicky...
03 March 2006, 02:48 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.