PDA

View Full Version : slider controling amount of looped animation?


dobermunk
03-12-2006, 10:00 PM
Alex or anyone else:

Any ideas how to do the following: a looped animation (either as clip or in negative frames) is amount-controlled by a slider channel. Tried cbmaf, but that scrolls through an animation, not the amount of it loop. Ideas?

David

dobermunk
03-12-2006, 10:08 PM
Another example of the same task would be a bird flying :
One slider to control the speed, one for amplitude - of an animated loop.

How would you all go about this?

MoodyB
03-13-2006, 01:40 AM
Edit - Ignore what's below, as iirc cbmaf would do the same thing if it was controlled by an objects' motion and not a slider :( doh.....


I think the ' Cycle ' function could be used for this.

Look at the 'Leg_Cycle' scene that came with Messiah. It uses ' Cycle ' to speed up&slow down / play forwards&backwards a leg anim by using the z position of a null.

So, you could set a keyframe at 1 with ' accumulate ' turned on for the null and when you change the value of this key, it speeds up, slows down the cycle speed. This would give you a constant cycle speed throughout the anim. If you wanted to vary the cycle speed, just keyframe it as normal, but always add to the controller's channel value so the cycle plays forwards.

dobermunk
03-13-2006, 07:37 AM
Hi MoodyB!
Thanks for the response. One part of the solution (thanks to Marek) is the MixClipInst command. This allows the slider to control the amount of a motion clip instance laid out in compose. Here the code (as the docs haven't been updated on how to insert this - its in the what's new section somewhere but doesn't come up in the search.)


MixClipInst("Instance Name",[Slider Name:channel],0)

Now for the speed (frequency) control...

JoeCosman
03-13-2006, 06:27 PM
Now for the speed (frequency) control...


ClipInstTime("Instance Name",Slider Name:channel])

dobermunk
03-13-2006, 06:45 PM
Hi Joe. Doesn't that just scrub you through the animation like cbmaf?
How would this work with a repetitive (looped) aniamtion? You'd still need to have to a control for the control - ie. a slider telling the other slider how fast to go through the anim.

You could repeat the animation in the clip, I geuss.... but isn't there some direct way?

JoeCosman
03-14-2006, 12:52 AM
whoops, forgot this:



ClipInstTime("Instance Name",(Slider Name:channel]*NOW))

dobermunk
03-18-2006, 03:00 PM
Haven't forgot this, Joe - thanks!
(Was hoping to get around to making a test scene for this - I'll post it later)
D.

CGTalk Moderation
03-18-2006, 03: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.