PDA

View Full Version : Expression Question: Accellerating Object?


NanoGator
11-22-2003, 11:41 AM
Hi All,

I have a rig that has 3 rings that rotate. What I'd like to do is set it up so that I have a slider that controls the rate at which those rings rotate on a per frame basis. I was hoping value + MC.Rate would work, unfortunately it doesn't quite work. Value looks at the Motion Envelope as opposed to looking at whatever its current value is.

I apologize in advance if the answer is really simple. I'm a little sleep deprived.

NanoGator
11-23-2003, 01:57 AM
Doh.

Can it be done with expressions, or am I gonna have to dig into LSCript?

CIM
11-23-2003, 03:17 AM
Well, I didn't validate this in LW, but the expression should be something like:

object.rotation.channel = time * rate;

NanoGator
11-23-2003, 04:42 AM
Thank you CIM. :)

It definitely works, but it's still not quite what I envisioned. The problem is that when I turn the slider back to slow down the rotation of the object, it moves backwards. Have a suggestion?

Ideally, it'd be nice if I could create a variable that an expression can keep adding or subtracting to. Unfortunately, modifications created by expressions are tossed out by the next frame in favor of what's in the envelope.

SplineGod
11-23-2003, 05:16 AM
I dont believe this can be done with LW expressions (probably can with lscript). Relativity can do it. There was a throttle control plugin on flay.

CG.p
11-23-2003, 07:30 PM
I never got things going backward...but keep in mind when you use other channels as a reference like a slider you also have regular keyframes to keep track off. Check the curves in the graph editor and make sure they aren't freaking out. The only thing I saw that might be backing the rotation up is the curves overshooting the keys.

lscript for this would be overkill unless you are wanting more than a slider. It would be handled exactly the same way as it would be in expressions...get a value -> modify the value -> move on to the next frame.

twidup
11-23-2003, 11:38 PM
hmmm, I was looking into this before when I was working on a gatling gun.
The logical solution I found was to use Motion Mixer. Set up a couple motions on it, and then link the blending to the slider.

-Todd

NanoGator
11-24-2003, 02:55 AM
Originally posted by twidup
hmmm, I was looking into this before when I was working on a gatling gun.
The logical solution I found was to use Motion Mixer. Set up a couple motions on it, and then link the blending to the slider.

-Todd

That's an interesting idea...


CG.p: What happened here was I had a slider going from 0 to 5. When I cranked it up to 5, it'd turn 5 degrees per frame. When I cranked it back to 2.5, I had hoped it'd turn 2.5 degrees per frame. What happened was the Time * Rate equation went too far backwards. By the time I had gotten 100 or so frames in, the equation required the wheel to turn backwards because on frame 30 with the slilder at 5, the wheel would have turned 150 degrees. But on frame 35 with the slider at 2.5, the wheel went back to 87.5. So for 5 frames it spun backwards.

SplineGod: I think I found throttle, but haven't been able to test it yet.

Would it help if I asked a different question? How would ya rig wheels turning on a car? Maybe I just need to think of this in a different light?

SplineGod
11-24-2003, 03:06 AM
Originally posted by NanoGator
That's an interesting idea...


CG.p: What happened here was I had a slider going from 0 to 5. When I cranked it up to 5, it'd turn 5 degrees per frame. When I cranked it back to 2.5, I had hoped it'd turn 2.5 degrees per frame. What happened was the Time * Rate equation went too far backwards. By the time I had gotten 100 or so frames in, the equation required the wheel to turn backwards because on frame 30 with the slilder at 5, the wheel would have turned 150 degrees. But on frame 35 with the slider at 2.5, the wheel went back to 87.5. So for 5 frames it spun backwards.

SplineGod: I think I found throttle, but haven't been able to test it yet.

Would it help if I asked a different question? How would ya rig wheels turning on a car? Maybe I just need to think of this in a different light?
You would have the same problem with the wheels. You can turn the wheels once and then link them to a controller using cyclist. The speed of the controller determines the speed of the wheels rotation.

NanoGator
11-24-2003, 03:18 AM
Yep, that works. Not quite what I wanted but I think I can make it work for now. Makes it a little harder animate this the way I'd like. But, oh well.

Thank you Larry. :)

(Hope that doesn't come off as 'unappreciative', that's not the case at all. )

SplineGod
11-24-2003, 03:45 AM
Relatvity lets expression self reference which is what you need to be able to do. :)

NanoGator
11-24-2003, 03:56 AM
Originally posted by SplineGod
Relatvity lets expression self reference which is what you need to be able to do. :)

Is that a commercial plugin? (I think I've heard of Relativity but not sure what it is..)

SplineGod
11-24-2003, 04:15 AM
It is commerical. Its a more robust expression engine for LW. Its actually been around for many years. :)

NanoGator
11-24-2003, 04:19 AM
Hmm..

Would ya consider it a 'must have'? Is it commonly used at studios etc?

SplineGod
11-24-2003, 04:25 AM
If you want a very robust expression solution I would recommened it. Almost every studio I was at used it. I dont know how many still do but its definately very powerful. :)

CTRL+X
11-24-2003, 04:39 AM
the PLUGIN (http://www.premdesign.com/relativ.html) has been updated,, you can also get a DEMO

the site also has a bunch of tuts and info

Jonathan
11-24-2003, 08:54 AM
I was going to say use a logrithm in your expression but I tried it myself and it seems as in the case of NanoGator, that all changes are additive once the expression is in place and you can't really tweek it back.

Here's a suggestion for newtek:

an expression systems which the operators could be assigned and keyframed. That would be so cool. In a way, you could do it by using an object's position along the positive and negative as reference however that still remains limited. To be able to attach operations to time, position and orientation would be so much more robust.

It seems that it can be done with event but the approach would be long winded I think.

NanoGator
11-24-2003, 09:06 AM
Originally posted by SplineGod
If you want a very robust expression solution I would recommened it. Almost every studio I was at used it. I dont know how many still do but its definately very powerful. :)

Thank you! I'll keep it in mind. :)

NanoGator
11-24-2003, 09:07 AM
Thank you CTRL+X! :) Will haveta check that out.

KillMe
11-24-2003, 01:33 PM
you might consider using ameile?? somethign liekt aht anyway its a node based visual expression system cant say if it does what you want but from what i've heard alot of people think its better than relativity

CGTalk Moderation
01-16-2006, 06:00 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.