Forum Replies Created

Page 987 of 1081
  • Dan Ebberts

    February 5, 2007 at 10:54 pm in reply to: Check for a specific layer name

    A JavaScript try/catch construct should do the trick:

    try{
    L = thisComp.layer(“X”);
    exists = true;
    }catch (err){
    exists = false;
    }

    if (exists){
    // add the stuff to do when the layer exists
    }else{
    // add the stuff to do when the layer doesn’t exist
    }

    Dan

  • If it’s not 3D, how does the object “move away” from the background. By scaling?

    If so, some variation of these expressions for Distance and Softness should work:

    // Distance
    minScale = 50;
    maxScale = 200;
    minDistance = 5;
    maxDistance = 20;
    linear (scale[0],minScale,maxScale,minDistance,maxDistance)

    // Softness
    minScale = 50;
    maxScale = 200;
    minSoftness = 0;
    maxSoftness = 40;
    linear (scale[0],minScale,maxScale,minSoftness,maxSoftness)

    Set the values of the parameters to fit your needs.

    Dan

  • Dan Ebberts

    February 5, 2007 at 10:20 pm in reply to: newbe wants a simple explanation

    The wiggle parameters are (in this order):

    frequency = wiggles per second.

    amplitude = amount of wiggle.

    octaves = number of octaves of noise to add together – the more octaves, the more complex the wiggle.

    amplitude multiplier = how much the amplitude is multiplied for each successive octave.

    time = base start time – defines where (in time) the animated property is sampled.

    The best thing to do is play around with the parameters and get a feel for what they do.

    Dan

  • Dan Ebberts

    February 1, 2007 at 11:21 pm in reply to: Time, Timezone and Expressions

    I think the only way it would know would be if the second time were less than the first time (assuming a 24 hour clock). That would limit your range to +24 hours. If that’s the case, you could just convert the two times to minutes, see if the second time is less than the first time, and add the “+” if it is. Or maybe I’m not understanding…..

    Dan

  • Dan Ebberts

    February 1, 2007 at 7:16 pm in reply to: looping noise()

    There’s a little slight-of-hand maneuver you can try that’s hard to explain, but works pretty well. The key point is using two equal length segments of time, the one starting at time zero and the other ending at time zero (i.e. a segment that starts before time zero). Then you use linear() to blend them so that at the start you’re using the segment that starts at time zero, but by the end of the cycle you’re using the segment that ends at time zero – returning you to your starting point. Here’s an example for an opacity expression using noise();

    cycle = 2;
    t = time % cycle;

    amp = 50;

    x = position[0];
    y = position[1];
    z = time;

    xCompress = 200;
    yCompress = 200;
    zCompress = .2;

    noiseVal1 = noise([x / xCompress, y / yCompress, t / zCompress]);
    noiseVal2 = noise([x / xCompress, y / yCompress, (t – cycle) / zCompress]);
    50 + amp * linear(t, 0, cycle, noiseVal1, noiseVal2)

    By the way, you can use this technique to loop other things (like wiggle()) that don’t normally loop easily.

    Dan

  • Dan Ebberts

    January 30, 2007 at 1:00 am in reply to: Random speed of objects

    This should get you started. It will move a layer horizontally across the screen at a random speed.

    seedRandom(index,true);
    spd = random(50,100); // speed (pixels per second)
    value + [spd*time,0]

    Dan

  • Dan Ebberts

    January 29, 2007 at 10:43 pm in reply to: if then else snafu

    % is the JavaScript modulus operator. x%y returns the remainder that results from dividing x by y. Very useful for translating a continuously growing value into a cyclic one.

    Dan

  • Dan Ebberts

    January 29, 2007 at 9:09 pm in reply to: if then else snafu

    See if this gets you closer:

    yPosition = thisComp.layer(“NEEDLE”).transform.rotation/0.72%360;
    [value[0], yPosition-105]

    Dan

  • Use the Pan Behind tool. It looks kind of like this:

    [o]

    or, keyboard shortcut = Y

    Dan

  • Dan Ebberts

    January 25, 2007 at 5:35 pm in reply to: Newbie to expressions needs a simple tip

    You need to do the array indexing after valueAtTime(). This should work:

    yadjust=this_comp.layer(“adjuster”).position.valueAtTime(time-3.00)[1];

    Dan

Page 987 of 1081

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