Forum Replies Created

Page 960 of 1081
  • Dan Ebberts

    September 26, 2007 at 6:42 pm in reply to: Camera POI following layer

    I’m not clear on what you’re trying to do, but if you want your POI to match a specific point on your Null, you could do it like this to, for example, line up on the null’s center:

    L = thisComp.layer(“Null 1”);
    L.toWorld([L.width,L.height,0]/2)

    or like this for the upper left corner:

    L = thisComp.layer(“Null 1”);
    L.toWorld([0,0,0])

    Dan

  • Dan Ebberts

    September 26, 2007 at 3:26 pm in reply to: Expression Keyframing?

    Here’s the AE7 method:

    switchTime = [0,1,5,7];
    targetName = [“Text1″,”Text2″,”Text3″,”Text4”];

    // find switch time

    idx = 0;
    for (var i = 0; i < switchTime.length; i++){ if (time >= switchTime[i]) idx = i else break;
    }

    currentTarget = thisComp.layer(targetName[idx]);
    length(currentTarget.transform.position,transform.position)

    Dan

  • Dan Ebberts

    September 26, 2007 at 2:37 pm in reply to: Expression Keyframing?

    Are you using CS3? If so, the best way would probably be to use markers where the marker comment is the name of the current layer to focus on. If not, then you can hard code everything (times and layer names) into arrays and have the expression loop through the time array until it finds the appropriate time, then use the corresponding layer name for the focus distance. Either way, help is available if you need it.

    dan

  • Dan Ebberts

    September 26, 2007 at 2:28 pm in reply to: Skip frame to next visual frame if current frame is black

    Expressions in AE7 don’t have access to pixel color info. You could probably do it in CS3 with sampleImage() if you could define what constitutes a black frame.

    Dan

  • Dan Ebberts

    September 26, 2007 at 1:19 pm in reply to: Accessing textIndex from the Position property

    Lloyd,

    It looks like you understand the limitations. My example wasn’t the best though. If you change it to this:

    seedRandom(textIndex,true);
    random([-100,-100],[100,100]);

    you’ll see that you have access to a rectangle with the character’s original position in the center. I’ve actually constructed some pretty cool particle generators by adding another animator for tracking and using it to pile all the characters on top of each other which gives them all access to the same rectangular area.

    I’m not sure that any of this helps you (although I suspect you can accomplish what you’re trying to do). I just wanted to point out that there’s more to work with than what you see at first glance.

    Dan

  • Dan Ebberts

    September 25, 2007 at 11:25 pm in reply to: Accessing textIndex from the Position property

    Lloyd,

    Expression selectors are tricky little guys. Play around with this – add a position animator, set the position offset to [100,100], add an expression selector, delete the range selector, and add this expression to the expression selector’s amount property:

    seedRandom(textIndex,true);
    random([100,100]);

    Each character should end up an a random location within the 100×100 square defined by the character’s original position being the upper left corner. That should give you some ideas.

    Dan

  • Dan Ebberts

    September 25, 2007 at 8:40 pm in reply to: Help needed with trig-related expression

    AE will do the trig for you. You should be able to use the same expression for Starting Point and Ending Point, just swapping the track point references. For example, you could use something like this for Starting Point:

    myTrack = thisComp.layer(“tracked layer”).motionTracker(“Tracker 1”)(“Track Point 1”).attachPoint;
    otherTrack = thisComp.layer(“tracked layer”).motionTracker(“Tracker 2”)(“Track Point 1”).attachPoint;
    s = effect(“Slider Control”)(“Slider”);
    v = normalize(myTrack – otherTrack);
    myTrack + v*s

    And this for Ending Point:

    myTrack = thisComp.layer(“tracked layer”).motionTracker(“Tracker 2”)(“Track Point 1”).attachPoint;
    otherTrack = thisComp.layer(“tracked layer”).motionTracker(“Tracker 1”)(“Track Point 1”).attachPoint;
    s = effect(“Slider Control”)(“Slider”);
    v = normalize(myTrack – otherTrack);
    myTrack + v*s

    Dan

  • Dan Ebberts

    September 24, 2007 at 4:00 pm in reply to: afx keeps turning off my expressions.

    Are you getting an expression timeout error? That can happen when you cascade expressions (expression on one layer references another layer which has an expression referencing another layer, etc.) if the cascade chain gets too long. A better approach is to calculate the delay based on the layer’s index (compared to that of the “leader” layer). It would look something like this (not tested):

    leader = thisComp.layer(“leader”);
    delay = thisComp.layer(“KONTROLL!!!”).effect(“tid”)(“Slider”);
    leader.transform.yRotation.valueAtTime(time-delay*((index – leader.index)/2))

    Dan

  • Dan Ebberts

    September 21, 2007 at 12:51 pm in reply to: Replace footage –> Auto-scaling footage

    That’s a pretty straight-forward scripting application. You should be able to find examples that show you how to do the various bits (importing footage, duplicating a comp, replacing a layer’s source, adjusting the layer’s scale, and putting the comp in the render queue) but it’s not likely that you’ll find a canned script that does exactly what you need. The AE Scripting Guide and the JavaScript Tools Guide are your friends. 🙂

    Dan

  • Dan Ebberts

    September 20, 2007 at 4:33 pm in reply to: Change Random Motion To Specific Postion

    Play around with this – after 35 seconds of random motion, it will slide into “finalPos” over a 1 second transition period.

    finalPos = [100,100];
    maxTime = 35;
    transitionTime = 1;

    segDur = 12;// duration of each “segment” of random motion
    minVal = [0.1*thisComp.width, 0.1*thisComp.height];
    maxVal = [0.9*thisComp.width, 0.9*thisComp.height];

    t = Math.min(time, maxTime);
    seed = Math.floor(t/segDur);
    segStart = seed*segDur;
    seedRandom(seed,true);
    startVal = random(minVal,maxVal);
    seedRandom(seed+1,true);
    endVal = random(minVal,maxVal);
    randPos = ease(t,segStart,segStart + segDur, startVal, endVal);

    ease(time,maxTime,maxTime + transitionTime,randPos,finalPos)

    Dan

Page 960 of 1081

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