Forum Replies Created

Page 3 of 11
  • Miguel De mendoza

    September 21, 2016 at 10:04 am in reply to: Undertanding property speed

    Thanks Xavier, that was one of those posts that I read time ago and I forget XD. Pretty usefull!

  • Miguel De mendoza

    September 20, 2016 at 9:15 am in reply to: Undertanding property speed

    Finally I found a simplest way to make all the teeth fint on the gears while moving. Simply I multiply the transmisión by the position of the driver:

    driver = effect("Driver")("Layer");
    nSplit =driver .name.split("_");
    driverTeeth = nSplit[nSplit.length -1];
    nSplit = name.split("_");
    selfTeeth = nSplit[nSplit.length -1];
    dSpeed = driver .transform.rotation;//.speed;
    transmision = driverTeeth/selfTeeth;
    dir = (driver.effect("Reversed")("Checkbox").value)? -1 : 1;
    transmision *dSpeed * dir + value

    It works for all the gears. I still have the problem with the acceleration. My Master gear rotation is driven by the expression :

    thisComp.layer("Controls").effect("Master_Speed")("Slider") * time

    But when I add keyframes to the slider to increase the speed, the gear start to rotate very fast till the interpolation ends. Is posible to get an incremental amount of the speed with keyframes on the slider?

  • Miguel De mendoza

    September 19, 2016 at 5:35 pm in reply to: Undertanding property speed

    I Works for me like the first example. But I found another problema for the setup. I’m controling the speed of the lead gear with this expression:

    thisComp.layer("Controls").effect("Master_Speed")("Slider") * time

    Because I’m triggering the speed of the driver when I increase the speed of the Master_Speed with keyframes, the gears go so fast. So I need to implement an acceleration formula to the expression. I have the formula for acceleration:

    deltaTime = 1/25;
    iv = thisComp.layer("gear_5").transform.rotation.speedAtTime(time - deltaTime ); //Initial velocity
    fv = thisComp.layer("gear_5").transform.rotation.speed; //Final velocity
    (iv - fv)/dT

    But I don’t know how to implement it on the expression. Any Idea?

  • Miguel De mendoza

    September 19, 2016 at 5:03 pm in reply to: Undertanding property speed

    Thanks Xavier, it works perfect! Yes, it seems some stacking expression problem.

  • Miguel De mendoza

    September 15, 2016 at 5:00 pm in reply to: Can i control the Alpha Matte ?

    If your mate is inside of a comp, you can add a solid inside and write this expression on opacity:

    on = comp("where the checkbox is").layer("checkbox layer").effect("Checkbox Control")("Checkbox");
    if(on) { 100 } else {0}

  • Miguel De mendoza

    September 7, 2016 at 6:19 pm in reply to: Can script (.jsxbin) do something by itself?

    When I want to acces specific variables inside an expression, I link those variables to slider controls, or source text from a text layer if I want to Access a string value. By this way you can get an set the variables from outside. This method have one little problem: you have a limitation of variable types, you can get numbers, points, booleans, colors, layers and strings directly. To get complex structures you can create those slider/layer structues by script on the fly(no real time), and use a lot of imagination. Depends on your time and your needs.

  • File/Scripts/Run Script File.
    The file must be a .jsx file.

  • You can do it by scripting, try this:

    function findItem (itemName, type){
    var proj = app.project;
    var curItem;
    for(var i = 1; i <= proj.numItems; i++){
    curItem = proj.item(i);
    if(!( curItem instanceof type) || curItem.name != itemName){
    continue;
    }
    else {
    return curItem;
    }
    }
    return false;
    }

    var images = findItem("Folder with images name", FolderItem).items;
    var masterComp = findItem("Your master comp name", CompItem);

    for(var i = 1; i < images.numItems; i++){
    var newSource = images.item(i);
    var newComp = masterComp.duplicate();
    var layerSource = newComp.layers.byName("Your image layer name");

    newComp.name = newComp.name + "_" + i;
    layerSource.replaceSource(newSource);
    }

  • Miguel De mendoza

    September 5, 2016 at 8:04 am in reply to: Date object return incorrect dates Extendscript

    Thanks Dan. It works!

  • Miguel De mendoza

    September 1, 2016 at 8:21 am in reply to: Scientific Notation

    In After Effects(and programming in general) you have digit number limit (I dont remember AE limit), so you can’t represent too big numbers literaly. So you might think about split your number in some small pieces, and make linked counters.

Page 3 of 11

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