FORUMS: list search recent posts

# Windy motion?

FAQ   •   VIEW ALL
 Windy motion? on Jul 2, 2013 at 1:10:45 pm

Hi all,
I'm totally new to expressions and I'm trying to create a very gentle motion of flowers blowing in the wind. I've started with the basic wiggle(1, 1); but it's a bit too monotonous and I can't control the direction of the swingings. What should I add in order for it to look as realistic as possible? Any ideas?

Thanks

 Re: Windy motion?on Jul 2, 2013 at 3:02:14 pm

It's hard to know exactly what would look convincing in your set up, but you might want to play around with noise(). Assuming your flowers are distributed left-to-right across the comp, try this for rotation and see if it gives you any ideas:

distCompress = 200;
speedCompress = 1;
maxRotation = 15;

x = transform.position[0];
5 + maxRotation*noise([x/distCompress,time/speedCompress]);

It should give you a breeze from the left. Increase distCompress to get less variance between neighboring flowers, increase speedCompress to slow things down. If you have a 3D field of flowers, noise() will take an additional parameter, so you could do something like this:

distCompress = 200;
speedCompress = 1;
maxRotation = 15;

x = transform.position[0];
z = transfrom.position[2];
5 + maxRotation*noise([x/distCompress,z/distCompres,time/speedCompress]);

Dan

 Re: Windy motion?on Jul 3, 2013 at 9:45:22 am

Thank you Dan! It's working like magic!
I have flowers organized in a way that resembles an arch of flowers so I need various movement directions. Is it possible to control the direction of the motion and create an up-and-down movement, for example?

 Re: Windy motion?on Jul 3, 2013 at 2:33:23 pm

I'm not sure exactly what you mean, but this might help:

http://library.creativecow.net/articles/ebberts_dan/noise.php

Dan

 Re: Windy motion?on Jul 4, 2013 at 12:37:48 pm

Sorry for my English, I'll try to articulate myself better:
The expression you gave me in your first reply made the flowers move in diagonally right-up. I was wondering how to make the flower move in different directions. I've attached jpg with marking of the current motion direction and other optional directions.