Insydium Cycles
Insydium Cycles

Archived

This topic is now archived and is closed to further replies.

Guest MacBraniac

Time Based Animation Loops

6 posts in this topic

Hi Everyone,

I am having a hard time trying to figure out how to loop and action over time. I need to create an action the builds upon the previous action but loops at a certain point. I am trying to automate the flapping of butterfly wings so I can just concentrate on animating the flight path.

I am aware the Rotate node in xpresso but that isn't exactly what I am looking for. I am looking to do the same action every frame based on a condition. So ever frame would add so many degrees of rotation to an object (the wing) until it reaches a certain limit and then subtracts so many degrees of rotation until another limit is met in which case it switches back and starts adding degrees of rotation again. Does anybody know how to do this? I have spent hours trying to figure this out. I was about to just use COFFEE instead but I can't even find a decent reference guide to make that useful. Any help would be appreciated!

Thanks!

Share this post


Link to post
Share on other sites

You can do that in Xpresso using the On:input node :) and compare nodes. If On port gets a value of 1, all underlying input values are returned. If On gets a 0, no value will be returned to the underlying input nodes.

If you would combine this with a compare node, which output value is either 1 or 0, you can set up several conditions. You can even use the Collision node so that the object touches another (like an invisible cube) gives a new interaction. The possibilities are unlimited.

You might also want to give the range mapper a try with the use spline function enabled (and draw a parabolic spline)

Share this post


Link to post
Share on other sites

I would use a range mapper. See file.

Hope this helpd.

Regards Bishka

Butterfly wings.zip

Share this post


Link to post
Share on other sites

Thanks so much for the information! That sample file you made Bishka is a perfect example of what I am trying to accomplish. I am going to break it down to understand how you put that together. Thank you so much again! :)

Share this post


Link to post
Share on other sites

Since you have Mocca I gave it a shot using a Constraint tag with aim on one wing. That points to a null with a vibrate tag on it. Then I used a symmetry object to mirror the wing. This all goes under a null and attaches to the butterfly body, which you animate in you manner of choice.

Share this post


Link to post
Share on other sites

No Prob. Glad it helps. It should not be too difficult to understand (but then, I tend to assume everyone it better at xpresso than I am!!)

Timing-

The time node and the maths node it is connected to control the speed of the wing flap. The time node is like an up-counter syncronized to the animation, it outputs a steadily increasing value as the animation progreses(connect a Result node to it and then move through the animation). The connected maths node is set to multipy which can scale the time nodes output up or down. This, in effect 'fools' the connected Rangemapper into thinking that the time is changing faster or slower than it realy is. The amount of 'fooling' is dependent in the Speed Controls value.

Rangemapper-

The range mapper is set to modulo. This means that it will count the fractions up to 1 (the inputs upper value) and then it will go back to the start. (0, 0.1, 0.2.....0.8,0.9,0,0.1,0.2,....ect ect. Think of the spline as a graph, time going left to right, value going from the bottom to the top. With the range mapper set to convert numbers 0 to1 into degrees, the net result is a cyciling from 0deg to whatever value is set by the Amount control (the 2nd rangemapper is just for to convert the controls output to degrees).

Hope this helps, it is not east to explain,so just play around with it, add Result Nodes here and there and then step one frame at a time through the animation, and you will see how things cycle.

Regards Bishka.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.


  • Recently Browsing   0 members

    No registered users viewing this page.