Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Erin Shelby on February 14, 2007 at 11:06 pm

    Would anyone know how I should code this? I’m trying to make a bunch of water drops randomly dribble down on a pane of glass. Essentially, I’m trying to make a layer move down the y-axis randomly with occasional stops along the way.

    -E

    Erin Shelby replied 19 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Mike Clasby

    February 15, 2007 at 1:55 am

    No help here on the random dribble done easily, maybe Particular can do it, but you can make a pretty mean water droplet that runs down a window here:

    https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=898170

    For multiple drop, just keep dupping that top image layer and dup the Precomped mask layer and reference it with the second top layer. Obviously differently animated masks moving down the precomp would be best. I forgot but you definitely put more than one mask in the precomp, it takes a little while to animate them, but how many drops can you put on the screen?, and the finished product will look good, IMHO.

  • Colin Braley

    February 15, 2007 at 3:12 am

    Alright heres a position expression, that kindof works but dosen’t look that good. Its kindof messed up in that if you change some of the parameters to some very high or very low values the drops move upward, which I can’t seem to figure out and I don’t have much time to spend on this one. Sometimes the noise() function seems to be returning a negative value when it shouldn’t be…anyway heres the expression:

    dripBeginTimeMin = 0;
    dripBeginTimeMax = 3;
    dripBeginY = 0;
    dripEndY = thisComp.height + 10;
    dripSpeed = 70;
    dripSpeedVaryAmt = 5;//dont change me too much
    jitteriness = 100;//increase for less jitteriness
    //—————————–
    seedRandom( index, true );
    dripBeginTime = random( dripBeginTimeMin, dripBeginTimeMax );
    t = time – dripBeginTime;
    x = random(0, thisComp.width);
    pBeforeNoise = [x , dripSpeed * t + dripBeginY];
    if( time > t ){
    velocNoise = dripSpeedVaryAmt * noise( pBeforeNoise / jitteriness );
    pNoise = [0 , velocNoise * t];
    pFinal = pBeforeNoise + pNoise ;
    }
    pFinal
    //expressions done

    ~Colin

  • Erin Shelby

    February 15, 2007 at 12:03 pm

    Wow, thanks! I’ll try it out and maybe tinker with it.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy