Forum Replies Created

Page 1044 of 1081
  • You might try something like this:

    effect(“Fractal Noise”)(“Offset Turbulence”)[0] + effect(“Fractal Noise”)(“Offset Turbulence”)[1]

    Dan

  • You might try something like this:

    effect(“Fractal Noise”)(“Offset Turbulence”)[0] + effect(“Fractal Noise”)(“Offset Turbulence”)[1]

    Dan

  • Yeah, that’s the problem. Once the pusher moves away so there’s no longer any overlap, the pushee has no way of knowing that it had previously been pushed – except by using the Wayback Machine, as in my example. 🙂

    Dan

  • Yeah, that’s the problem. Once the pusher moves away so there’s no longer any overlap, the pushee has no way of knowing that it had previously been pushed – except by using the Wayback Machine, as in my example. 🙂

    Dan

  • This is one of those situations that’s difficult to do with expressions. The reason is that for the position expression of the “pushee” to be able to figure out where it should be, it needs to know the entire history of the movement of the “pusher”. The only way I know of that will work is to have the expression loop through every frame of the timeline to figure out where the pusher has been. It can be done, but it gets a little impractical if your comp is long. Anyway, here’s an example that works on the x axis. It assumes the pushee starts to the right of the pusher.

    
    
    // assumes this layer is to the right of the pushing layer
    
    P = thisComp.layer("pusher");
    
    // find pusher's max movement to the right so far
    
    maxX = 0;
    for(t = 0; t <= time; t += thisComp.frameDuration){
      x = P.position.valueAtTime(t)[0];
      if (x > maxX) maxX = x;
    }
    
    if (maxX + P.width/2 + width/2 > value[0]){
      [maxX + P.width/2 + width/2,value[1]]
    }else{
      value
    } 
    
    

    Dan

  • This is one of those situations that’s difficult to do with expressions. The reason is that for the position expression of the “pushee” to be able to figure out where it should be, it needs to know the entire history of the movement of the “pusher”. The only way I know of that will work is to have the expression loop through every frame of the timeline to figure out where the pusher has been. It can be done, but it gets a little impractical if your comp is long. Anyway, here’s an example that works on the x axis. It assumes the pushee starts to the right of the pusher.

    
    
    // assumes this layer is to the right of the pushing layer
    
    P = thisComp.layer("pusher");
    
    // find pusher's max movement to the right so far
    
    maxX = 0;
    for(t = 0; t <= time; t += thisComp.frameDuration){
      x = P.position.valueAtTime(t)[0];
      if (x > maxX) maxX = x;
    }
    
    if (maxX + P.width/2 + width/2 > value[0]){
      [maxX + P.width/2 + width/2,value[1]]
    }else{
      value
    } 
    
    

    Dan

  • Dan Ebberts

    November 16, 2005 at 11:18 pm in reply to: Expressions for layer interactions

    It would be very difficult to this with expressions due to the lack of persistent variables. It would be a lot easier (but not easy) to something like this in Flash (or a 3D app as the others have suggested).

    Dan

  • Dan Ebberts

    November 16, 2005 at 11:18 pm in reply to: Expressions for layer interactions

    It would be very difficult to this with expressions due to the lack of persistent variables. It would be a lot easier (but not easy) to something like this in Flash (or a 3D app as the others have suggested).

    Dan

  • Dan Ebberts

    November 13, 2005 at 7:19 pm in reply to: Script help.
  • Dan Ebberts

    November 13, 2005 at 7:19 pm in reply to: Script help.
Page 1044 of 1081

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