Forum Replies Created

Page 1007 of 1081
  • Dan Ebberts

    September 1, 2006 at 8:24 pm in reply to: Expression Question Dan Ebberts?

    Yes, value is the key. As an example, this expression will cause a layer to orbit its keyframed position:

    r = 50; //radius (in pixels)
    f = 1; //orbits per second

    angle = time*Math.PI*2*f;
    value + [Math.sin(angle)*r, -Math.cos(angle)*r]

    The important point is that whatever you add to value needs to be a 2-dimensional quantity. Normally it will be in the form

    value + [a,b]

    where ‘a’ will get added to the layer’s x position and ‘b’ will get added to the layer’s y position.

    Hope that helps.

    Dan

  • Dan Ebberts

    August 31, 2006 at 9:06 pm in reply to: expressions help

    Mike,

    Nice job. Send me an email when you have a minute.

    Dan

  • Dan Ebberts

    August 31, 2006 at 9:06 pm in reply to: expressions help

    Mike,

    Nice job. Send me an email when you have a minute.

    Dan

  • Dan Ebberts

    August 31, 2006 at 6:03 pm in reply to: expressions help

    Try this one:

    rate = 360; //degrees per second
    if (thisComp.numLayers > 1){
    stopAngle = 360/(thisComp.numLayers – 1);
    myAngle = (index – 1)*stopAngle;
    }else{
    stopAngle = 0;
    myAngle = 0;
    }
    currAngle = time*rate;
    if (currAngle > 360){
    linear(currAngle – 360,myAngle,360,myAngle,360)
    }else{
    linear(currAngle,0,myAngle,0,myAngle);
    }

    Dan

  • Dan Ebberts

    August 31, 2006 at 6:03 pm in reply to: expressions help

    Try this one:

    rate = 360; //degrees per second
    if (thisComp.numLayers > 1){
    stopAngle = 360/(thisComp.numLayers – 1);
    myAngle = (index – 1)*stopAngle;
    }else{
    stopAngle = 0;
    myAngle = 0;
    }
    currAngle = time*rate;
    if (currAngle > 360){
    linear(currAngle – 360,myAngle,360,myAngle,360)
    }else{
    linear(currAngle,0,myAngle,0,myAngle);
    }

    Dan

  • Dan Ebberts

    August 29, 2006 at 3:49 pm in reply to: expression link

    Like this:

    temp = thisComp.layer(“Red Solid 1”).transform.rotation;
    [value[0], temp]

    Dan

  • Dan Ebberts

    August 29, 2006 at 3:49 pm in reply to: expression link

    Like this:

    temp = thisComp.layer(“Red Solid 1”).transform.rotation;
    [value[0], temp]

    Dan

  • Dan Ebberts

    August 29, 2006 at 3:27 pm in reply to: Two posts before lunch? expression question

    An expression like this for the flare center should do it:

    L = thisComp.layer(“Picture Layer”);
    L.toComp(L.effect(“Point Control”)(“Point”))

    Dan

  • Dan Ebberts

    August 29, 2006 at 3:27 pm in reply to: Two posts before lunch? expression question

    An expression like this for the flare center should do it:

    L = thisComp.layer(“Picture Layer”);
    L.toComp(L.effect(“Point Control”)(“Point”))

    Dan

  • A little late to the party, but here’s a fun thing to try. Add this expression to the diffuse and specular material options of your 3D layer:

    decay = .001; // speed of falloff
    d100pct = 200; // distance from light where falloff begins

    L = thisComp.layer(“Light 1”);

    d = length(L.position,position);
    if (d < d100pct){ value; }else{ value/Math.exp((d-d100pct)*decay); } The first parameter has the most effect on how fast layers get dark as they move away from the light. The advantages of this approach are that the layers don't become transparent and the effect is independent for each layer since the intensity of the light itself is not affected. Dan

Page 1007 of 1081

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