Forum Replies Created

Page 983 of 1081
  • You can use an expression like this for the camera’s Focal Distance to make sure a (“target” in this case) is in the camera’s focal plane:

    P = thisComp.layer(“target”).position;
    dot(P – position,toWorldVec([0,0,1]))

    Dan

  • Dan Ebberts

    March 9, 2007 at 8:42 pm in reply to: text file to AE text script

    It’s pretty easy to do this with a script, but the script has to be customized for your comp names, text layer names and the format of your text file and any other requirements you have. This would be a good intro project if you wanted to learn scripting, or a small job if you wanted somebody to do it for you.

    Dan

  • Dan Ebberts

    March 9, 2007 at 7:32 pm in reply to: Help with transition between expressions

    I’m not sure exactly what you’re trying to do, but in general, if you want to transition from one expression to another for the same property, you can use linear() like this:

    transStart = 4; //start transition at 4 seconds
    transDur = 2; // transition duration

    // undulation expression

    xFreq = .3; //undulations per second
    xSpeed = 150; //speed of wave (pixels per second)
    damping = 15; //undulation damping factor

    wl = xSpeed/xFreq; //wavelength (pixels)
    phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;
    theta = Math.atan(Math.cos(2*Math.PI*xFreq*time + phaseOffset));
    result1 = radiansToDegrees(theta)/damping;

    // pendulum expression

    veloc = 7;
    amplitude = 80;
    decay = .7;
    result2 = amplitude*Math.sin(veloc*time)/Math.exp(decay*time);

    // transition

    linear(time,transStart, transStart + transDur,result1,result2)

    Is that what you’re after?

    Dan

  • Dan Ebberts

    March 8, 2007 at 5:59 pm in reply to: Mr. Ebberts—thank you

    Nice work John, glad I could help!

    Dan

  • Fist question:

    minAudio = 0;
    maxAudio = 20;
    minOpacity = 0;
    maxOpacity = 100;
    audioLevel = thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);

    linear(audioLevel,minAudio,maxAudio,maxOpacity,minOpacity)

    Second question:

    Sure. Use time remapping (either keyframed or expression-driven).

    Dan

  • Dan Ebberts

    March 5, 2007 at 3:20 pm in reply to: global effect toggler

    Hmmm… OK – I see.I guess it would depend on the effect. For glow you could set the Glow Intensity parameter to what you want and then apply this expression to that property to link it to your Check Box like this:

    if(thisComp.layer(“Null 1”).effect(“Checkbox Control”)(“Checkbox”) == 1) value else 0

    Dan

  • Dan Ebberts

    March 5, 2007 at 2:19 pm in reply to: Rotating a level plane

    Probably something like this:

    -thisComp.layer(“Null 1”).rotation

    Dan

  • Dan Ebberts

    March 5, 2007 at 2:16 pm in reply to: global effect toggler

    Aharon’s Expression Controls #2 tutorial (a little farther down the page) will show you exactly how to do this.

    Dan

  • Dan Ebberts

    March 5, 2007 at 2:14 pm in reply to: with arrays?

    This should do it:

    w = thisComp.layer(“asphalt.psd2”).position.wiggle(6,10);
    [w[0],value[1],w[2]]

    Dan

  • Dan Ebberts

    March 5, 2007 at 5:53 am in reply to: Expression language to say “any layer”

    It might look something like this:

    
    
    v = value;
    for (i = 1; i <= thisComp.numLayers; i++){
      if (i == index) continue;
      if (thisComp.layer(i).scale[0] > 100){
        d = (thisComp.layer(i).scale[0] - 100) * thisComp.layer(i).width / 200;
        if (thisComp.layer(i).position[0] > position[0]){
          v -= [d,0];
        }else{
          v += [d,0];
        }
      }
    }
    v
    
    

    Dan

Page 983 of 1081

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