Random Motion Sway like in a Flag

floatingwoofloatingwoo Los Angeles, Calif.Member Posts: 393
edited June 2015 in Working with GS (Mac)

I'm looking for a random swaying motion like a flagpole blowing in the wind. I know how to do random motion for the entire graphic but in this case the base of the pole would stay put and the upper part would sway on the x axis. As I write this I realize I could have the graphic in two parts maybe so it has the illusion of it swaying.

For instance in this graphic below I would like to have the arms sway. Later I will have the pupils follow the mouse....Thanks.

Comments

  • floatingwoofloatingwoo Los Angeles, Calif.Member Posts: 393

    Don't usually bump, but I've been working on this all morning. Was thinking it would be cool to have this second character (see below) have the same movement as requested above, but sway at the neck...

  • SocksSocks London, UK.Member Posts: 12,822

    I'd just segment the thing you want to sway and then use a little trig to swing the pieces around a common centre, the further from the centre the more they sway, in fact you could automate pretty much all of the build, here's a very quick and horribly crude example project (you'd need to have quite a few more segments to make it smooth).

    File attached.

  • floatingwoofloatingwoo Los Angeles, Calif.Member Posts: 393

    Sweet! I'll post it once I get it working. Thanks

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks -- thats a really nice effect! That has lots of potential.

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:

    Socks -- thats a really nice effect! That has lots of potential.

    Cheers ! Here's an improved version, as I was saying before you could automate the whole build rather than placing a bunch of actors into the scene, this version does that, it simplifies the process and gives you more control, for example you can easily change the height of the pole by simply changing the condition in the spawn actor's spawn rule.

  • SocksSocks London, UK.Member Posts: 12,822

    And here's a colourful experiment based on the same maths . . .

  • SocksSocks London, UK.Member Posts: 12,822

    And a 'flag' version:

  • ApprowApprow Member Posts: 703

    @Socks said:
    And a 'flag' version:

    That is mad! Brilliant stuff:)

  • JSprojectJSproject Member Posts: 730

    @Socks said:
    And a 'flag' version:

    so very cool, Socks has done it again :)

  • SocksSocks London, UK.Member Posts: 12,822

    @Approw said:
    That is mad! Brilliant stuff:)

    Cheers Approw.

    @JSproject said:
    so very cool, Socks has done it again :)

    If by 'done it again' you mean I've thrown some sine waves at a couple of actors, then yes :tongue:

    Here are a few different flag shapes (file attached)

  • JSprojectJSproject Member Posts: 730

    @Socks yeah, you're very skilled in that area. You've managed to make very natural swinging flags, have never seen anything like it done in GS before. It's fascinating :)

  • floatingwoofloatingwoo Los Angeles, Calif.Member Posts: 393

    @Socks Once again you have out done yourself.This makes for some fun possibilities.....http://tinypic.com/m/ixfj8i/2

  • ApprowApprow Member Posts: 703

    @floatingwoo Yep, he does it all the time. I think I should start a separate socks folder with all the great demo's he made. By the way the animation looks awesome:)! isn't it heavy on the cpu to have that many segments?

  • floatingwoofloatingwoo Los Angeles, Calif.Member Posts: 393

    @Approw I'm not worried about it. I'm just having fun! I can't tell you what a relief it is to just allow myself the freedom to play and discover things with no agenda, every discovery is like a stepping stone ,it sources all of those other things I half to do.

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @Approw said:
    I think I should start a separate socks folder . . .

    Technically it would be a socks drawer :tongue:

    @Approw said:
    isn't it heavy on the cpu to have that many segments?

    The flag and flag pole run fine on an iPad, it runs perfectly smoothly at 60fps on an iPad Air (of course!), but even on a lowly iPad3 (which has the same processing power as the now ancient non-Retina iPad2) all I had to do was reduce the particle count to 100 (which made little visual difference) and I also got a super smooth 60fps ! The actual pole by itself ran at 60fps on both iPads, modern and ancient, without any tinkering at all.

  • SocksSocks London, UK.Member Posts: 12,822

    @floatingwoo said:
    This makes for some fun possibilities.....

    I recognise that, it's the wobbly line from the Spare Code thread !? :smile: Agreed, I think there's some fun stuff to be extracted from all this wobbly stuff.

  • ApprowApprow Member Posts: 703

    @Socks said:
    Technically it would be a socks drawer :tongue:

    I don't have a drawer on my mac:( time to developer one?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks -- those flags are great! Very creative use of particles! It had never occurred to me that one can create nonlinear particle movement via sin/cos.
    Very, very creative!

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2015

    @RThurman said:
    It had never occurred to me that one can create nonlinear particle movement via sin/cos.

    Well, strictly speaking you can't ! A particle can only move in a straight line once generated (unless you have them effected by gravity, in which case you get an acceleration in one direction + the particle's own velocity, which will give you a curve), but you can fool the eye into thinking they are moving in a nonlinear way fairly easily, especially if you move the emitter around.

Sign In or Register to comment.