Page 1 of 1

Rampup/down sine movement

PostPosted: Friday, 13.July 2012, 10:55
by erbsen
Hey,
I´m looking for a way to combine Sine movement with rampup/down.
I know it from .wz1 but i haven´t figured it out in .wz4 yet.

rampupdown_sine_movement.wz4


I show you what i mean.

rampupdown_sine_movement.k1

Re: Rampup/down sine movement

PostPosted: Friday, 13.July 2012, 11:12
by Skinnytorus
Can't check your files out now, but I guess you mean the 'spring' or 'pendulum' effect?

Re: Rampup/down sine movement

PostPosted: Friday, 13.July 2012, 22:11
by Skinnytorus
1. So, if you want to control the phase, try this:
trans.y=2*(rampdown(time*0.5)*sin((time+0.3)*120)); where 0.3 is phase of the sine wave.
Is that what you are after?

2. You can even clamp movement.
Try this: trans.y=3*clamp(sin(time*100),-0.5,1); where 3 is amplitude, -0.5 - lower clamp border, 1 - upper border.

Re: Rampup/down sine movement

PostPosted: Saturday, 14.July 2012, 08:29
by erbsen
Ok, now i can define where the movement starts and the clamp movement is also nice, thanks.
But when i change rampdown to rampup i get the same movement, it should be reversed, i don´t get it. :(

Re: Rampup/down sine movement

PostPosted: Saturday, 14.July 2012, 11:55
by Skinnytorus
I don't know why it behaves that way, but this helps: trans.y=(1+rampup(time*0.5))*sin((time)*120);
You can also try to draw 1x splines for ramps: trans.y=spline1(time*0.5)*sin((time+0.3)*120);

Re: Rampup/down sine movement

PostPosted: Saturday, 14.July 2012, 15:28
by erbsen
trans.y=(1+rampup(time*0.5))*sin((time)*120); works just fine, thanks.
But is this it? I mean how is one supposed to do such basic animations? There has to be an easier way. :evil:
We need a Channel Anim Op. :lol:

Re: Rampup/down sine movement

PostPosted: Saturday, 14.July 2012, 16:36
by Skinnytorus
1. Look, this is how animation works in wz4. We must remember that wz is not a fully artist's tool like zbrush. ;)
It has been all around coding starting from wz3 - remember those animation bricks?.. It turns out that animation features in wz4 are just simplified (for a coder)
wz3 animation bricks. So, animation-wise, wz4 takes after wz3 and, alas, not wz1... :(

2. What can be done? I think 1x splines should be the first to come to the rescue. They are comparatively easily controlled and require just a short line of code: any param=name_of_spline_(time);
On the other hand, some code guru could conjure up a recreation of wz1 animation controls (which I think would be great), but I don't know how much work it's gonna take and who could possibly take this challenge...

Re: Rampup/down sine movement

PostPosted: Monday, 16.July 2012, 07:34
by erbsen
Thanks, i have done it with splines. :)
I think i´m to much into .wz1 but i´m sure i will figure out how to do stuff in .wz4.

some code guru could conjure up a recreation of wz1 animation controls (which I think would be great)
Yes :) but i doubt that it´s actually needed.

Re: Rampup/down sine movement

PostPosted: Monday, 16.July 2012, 09:32
by Skinnytorus
Good. One thing I'm missing though is the ability to set mode (linear, bezier etc.) individually for each spline point...

Re: Rampup/down sine movement

PostPosted: Sunday, 22.July 2012, 17:37
by erbsen
That would be great but tricky i guess.

Re: Rampup/down sine movement

PostPosted: Sunday, 22.July 2012, 18:58
by Skinnytorus
If my memory serves me well, this feature already exists in WZ3.

Re: Rampup/down sine movement

PostPosted: Monday, 23.July 2012, 11:56
by reEto
you can also use the spline op for basic animations. everything you want can you do with this