Forum Replies Created

Page 972 of 1081
  • Hmmm…. I don’t think that’s right. Try this:

    (value – anchorPoint)*100/scale[0] + anchorPoint

    Dan

  • Aharon,

    Give this a try:

    fromWorld(value)

    Dan

  • Dan Ebberts

    June 7, 2007 at 8:00 pm in reply to: Odd/Even Markers

    OK – try this:

    amp=70; //amplitude (pixels)
    freq=2; //frequency (cycles per second)
    decay=2.5; //decay time (seconds)

    // find previous marker

    n = 0; // assume haven’t reached a marker yet
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    if (n > 0) t = time – marker.key(n).time else t =0;
    a = amp*Math.sin(freq*t*Math.PI*2)/Math.exp(decay*t);
    if ((n > 0) && ((marker.key(n).index % 2) == 0)) a = -a;
    a

    Dan

  • Dan Ebberts

    June 7, 2007 at 6:48 pm in reply to: Odd/Even Markers

    Something like this should do it:

    if ((marker.key(n).index % 2) > 0) a else -a

    Dan

  • Dan Ebberts

    June 7, 2007 at 4:12 pm in reply to: How to use tracker data on a 3D layer?

    This is better:

    L = thisComp.layer(“Null 1”);
    toWorld(fromCompToSurface(L.toComp(L.anchorPoint)))

    Dan

  • Dan Ebberts

    June 7, 2007 at 3:59 pm in reply to: How to use tracker data on a 3D layer?

    This is a tricky one. Try this:

    L = thisComp.layer(“Null 1”);
    fromCompToSurface(L.toComp(L.anchorPoint)) + value – anchorPoint;

    Dan

  • Dan Ebberts

    June 6, 2007 at 6:40 pm in reply to: making a planet orbit using position keyframes

    Have you tried an expression like this for the emitter position?

    L = thisComp.layer(“planet”); // your planet layer here
    L.toWorld(L.anchorPoint);

    Dan

  • Dan Ebberts

    June 4, 2007 at 7:07 pm in reply to: Mutiple Random Masks

    Sorry, I misunderstood. I assumed each section was a seperate layer, in which case you’d just apply the expression to each layer’s scale property. It won’t work that way for masked sections of the same layer.

    Dan

  • Dan Ebberts

    June 4, 2007 at 2:13 pm in reply to: Mutiple Random Masks

    You could try a scale expression like this:

    rampTime = .1;
    holdTime = .1;
    minDelay = .5;
    maxDelay = 1.5;

    seedRandom(index,true);
    preRun = random(maxDelay);
    accum = 0;
    temp = 0;

    while (time + preRun > accum){
    temp = random(minDelay,maxDelay);
    accum += temp;
    }
    accum -= temp;
    t = time – accum + preRun;

    if (t < rampTime){ linear(t,0,rampTime,[0,0],[100,100]); }else if (t < rampTime + holdTime){ [100,100]; }else if (t < 2*rampTime + holdTime){ linear(t, rampTime + holdTime, 2*rampTime + holdTime,[100,100],[0,0]); }else{ [0,0]; } Adjust the first four parameters to get the look you want. Dan

  • Dan Ebberts

    June 2, 2007 at 2:29 pm in reply to: Scaling depending on position

    Like this maybe:

    maxScale = 100;
    minScale = 5;
    minScaleDist = 100;
    pointer = thisComp.layer(“pointer”);
    d = Math.abs(pointer.transform.position[0] – transform.position[0]);
    ease(d,0,minScaleDist,[maxScale,maxScale],[minScale,minScale])

    Dan

Page 972 of 1081

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