Forum Replies Created

  • Eva Lepik

    February 26, 2018 at 8:53 pm in reply to: CC composite alternative?

    Thanks or the replies.

    Probably I could have given more details, why I’m using CC composite, etc.
    As I’m making a template, the goal is to be able to drag an effects comp on top of any footage (without a need to duplicate footage and change blend modes).

    And CC composite (after which come other color adjustment effects) gave a look I aimed for.
    Anyhow seems that I can do almost the same look with certain Curves settings. And Curves comes through even
    when collapse transformations switch is on.

    Eva

  • Hi Dan,

    The last version you gave me, works also with the sliders, many thanks!
    I get most of the lines, but I was wondering about the tMax value you state in the beginning (-99999), could you explain why it needs to be that?
    I have previously used only quite simple expressions and don’t yet understand many elements, therefore the question.

    With regards,
    Eva

  • Wow!
    This works like a charm.
    Thank you so much. I will now study this to try to understand every bit of it.

    With linking interpolation duration (which now is 30 frames every time) to slider,
    I meant to make it possible to vary duration for every interpolation time separately.
    For example there is a slider on TR1 which has value 20, slider on TR2 has value 30, slider on TR3 has value of 10 etc.

    Thanks again,
    Eva

  • Hi Dan,

    Yes, I forgot to tell that – when there are no layer markers, it should keep the blur value at 0.
    Based on some expression written here by you, Dan, I changed it a bit and got this – and it works now ☺

    But how could I change it so that it looks to layer markers of a range of layers (named TR1, TR2, TR3, etc.), not to the layer markers of the same layer where the expression is?

    If that would be possible, then I would further wish
    – to link start time and end time of interpolation to slider which is on the layer which marker at certain time is calculated. Each layer will only have 1 marker (or no markers at all).

    It sounds really complicated (at least for me and now), but I have seen that studying parts of your expressions here can help a long way. I am thinking many if else conditions but is there perhaps a shorter way to do this?

    Thanks for your answer,
    Eva

    maxY = 50;
    minY = 0;
    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time >= time){
    n++;
    if (n > marker.numKeys) n = 0;
    }
    }
    if (n > 0){
    if (marker.key(n).comment == "H")
    Math.min (ease(time,marker.key(n).time,marker.key(n).time+framesToTime(30/2),minY,maxY),
    ease(time,marker.key(n).time+framesToTime(30/2),marker.key(n).time+framesToTime(30),maxY,minY))
    }else
    {
    0
    }

  • Eva Lepik

    May 16, 2017 at 7:37 am in reply to: Out of range error with layer index

    Hi again Steve,

    Thanks for the advice, that helped!

    But as the resulted animation hold the focus distance until next keyframe (clamped, or maybe this is a wrong word), after trial and error I came up with the expression below:
    This works, also if there are no keyframes on the layer index slider.

    I’m pretty sure it could be shorter or written in a better form, but it seams to hold the focus on the layer on all cases ☺
    Maybe that’s useful for someone else, too.

    Regards,
    Eva

    x = thisComp.layer(2).effect("Focus on layer")("Slider");
    n = 0;
    try {
    if (x.numKeys > 0) { // if there are keyframes
    n = x.nearestKey(time).index;
    if (x.key(n).time > time) n--;
    }
    if (n > 0 && x.numKeys >= n+1 ) { // if there is 1 more keyframe after current keyframe
    t = time;
    tMin = x.key(n).time;
    tMax = x.key(n+1).time;
    y1 = x.key(n).value;
    y2 = x.key(n+1).value;
    z1 = thisComp.layer(y1).position[2];
    z2 = thisComp.layer(y2).position[2];
    CamPos1 = thisComp.layer("Cam control").position.valueAtTime(tMin)[2];
    CamPos2 = thisComp.layer("Cam control").position.valueAtTime(tMax)[2];
    value1 = z1-(CamPos1); // Z position of layer 1 - Z position of cam
    value2 = z2-(CamPos2); // Z position of layer 2 - Z position of cam

    ease(t, tMin, tMax, value1, value2);
    }
    else if (n > 0 && x.numKeys = n ) { // if this is the last keyframe
    y1 = x.key(n).value;
    z1 = thisComp.layer(y1).position[2];
    CamPos = thisComp.layer("Cam control").position[2];
    cameraOption.focusDistance = z1 - CamPos;
    }
    else {
    x = Math.round(clamp (thisComp.layer(2).effect("Focus on layer")("Slider"), 5, thisComp.numLayers));
    L = thisComp.layer(x).position[2];
    CamPos = thisComp.layer("Cam control").position[2];
    L - CamPos
    }}
    catch (e) {
    }

  • Eva Lepik

    May 15, 2017 at 9:42 am in reply to: Out of range error with layer index

    Hi Steve,

    Thanks for the reply.
    I put this expression to slider to avoid it hits 0, and this seems to work ok (below).

    That’s why I don’t understand the reason it gives me ‘out of range’ error.
    Right now the slider value is 6, and still the error is there.

    Regards,

    Math.round(clamp(value, min=5, max=thisComp.numLayers));

  • Eva Lepik

    May 1, 2017 at 2:40 pm in reply to: Animate position according to layer marker name

    Thank you, Steve!

    That’s awesome :))
    I wouldn’t have found the error myself, as I ‘m just starting out with conditional expressions.

    Regards,
    Eva

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