Forum Replies Created

Page 79 of 277
  • Filip Vandueren

    August 29, 2020 at 8:15 pm in reply to: Breaking up text into even lines

    Dag Tineke, here’s my solution:


    t=text.sourceText.replace(/[\s|\u0003)]+/g, ' ').trim(); // remove all extraneous whitespace
    len=t.length;

    if (len > 40) parts = 2;
    else if (len > 20) parts = 3;
    else parts = 1;

    dll = (len/parts); // dll = desiredLineLength

    words = t.split(" ");

    do {
    output="";
    c=0;
    for (w of words) {
    c+=w.length;
    if (c > dll) { // new word would overflow
    if (c-dll < dll-c+w.length+1) {
    output+=w+"\n"; // word before overflow
    c=0;
    } else {
    output+="\n"+w+" "; // word after overflow
    c=w.length;
    }
    } else {
    c++;
    output+=w+" ";
    }
    }
    lines = (output.match(/\n/g)||[]).length +1;
    dll++;
    } while (lines > parts) // if long words tripped it up (too many lines), try again... dll is already increased just in case.

    output;

  • You don’t need the quotes as far as I can tell.

    I think you’re better off just making an array of actual properties instead of an array of the
    names of properties.
    Similarly with the layers: just make a copy of selectedLayers() instead of getting their names, and then referencing to them by name (which is possibly not unique anyway)

    But I might be missing something in what exactly you’re trying to achieve with the script.

  • Filip Vandueren

    August 27, 2020 at 7:40 pm in reply to: Using Expressions to generate wavy lines

    I think something like Processing would be a better environment for this than After Effects.

    They’re obviously not simple particles (they end up in a very deliberate place: at an integer degree position along the outer circle for example, and don’t die there but stick a while.) The meandering also seems very rule-like, and not just wiggle or noise().
    So they would need an object oriented approach.
    Doing that in After Effects would require each of them to be a layer or a shape-group: very unwieldy and hard to maintain.

    It’s possible that something like this is do-able in the stardust particle system ?
    I’m not familiar with it but I know it’s supposed to be modular, but I don’t know if that means you can inject actual expressions code into it.

  • Hi Graham, since you can’t keyframe the Mask selection popup directly, you can’t write an expression for it either.
    You’ll have to reference a Mask you reserve for this process (say “Mask 0”), and give that mask’s path an expression along these lines:


    maskParade = thisComp.layer("MaskLayer")("Masks");
    n = 1 + Math.floor(time)% maskParade.numProperties;

    maskParade(n).maskPath.value;

  • Filip Vandueren

    August 27, 2020 at 10:04 am in reply to: Convert to lab color space.

    The example with splitting it in separate layers was if you needed to add different effects on different channels (like a median on U, noise on Y, blur on V, then recombine)

    Since you only want to copy a to b in Lab (U to V in YUV), in your case you can just add the three effects to 1 layer. Combine channels – shift channels – combine channels:

    copy paste this on your layer

    Adobe After Effects 8.0 Keyframe Data

    Units Per Second 30
    Source Width 1920
    Source Height 1080
    Source Pixel Aspect Ratio 1
    Comp Pixel Aspect Ratio 1

    Effects Channel Combiner #1 From #6
    Frame
    3

    Effects Shift Channels #2 Take Blue From #5
    Frame
    3

    Effects Channel Combiner #3 From #6
    Frame
    4

    End of Keyframe Data

  • Filip Vandueren

    August 27, 2020 at 9:36 am in reply to: Effects examples

    There used to be this thing called a manual…
    Unfortunately Adobe turned it into a website that’s really not that intuitive to read, use or browse, so I can’t yell “RTFM” at newbs anymore ?

    You’ll find the full list of Adobe’s effects there, every effect has it’s own page where most paramaters are explained, and a still shows the effect:

    https://helpx.adobe.com/after-effects/using/effect-list.html

    a list of the bundled CC effects is here:
    http://www.cycorefx.com/popups/pluginlist.html

  • The problem is that your compositions have collapse transformations enabled, so any adjustment layer inside of your comp will also apply to all layers below it in the master comp.
    I think it’s best to create a separate shadow-layer that is inv-masked or matted so it doesn’t overlap with your glass shape.

  • Filip Vandueren

    August 27, 2020 at 9:24 am in reply to: Convert to lab color space.

    AFAIK there’s still no access to Lab colors in After Effects.

    You can convert to YUV which is similar though technically very different to XYZ derived spaces such as Lab.

    So the recipe would be:

    Channel Combiner effect: RGB to YUV

    Shift Channels or a Channel mixer: Take Blue from Green (or whatever), RGB are now YUV

    Channel Combiner effect: YUV to RGB

    If you do need it technically accurate, you could write a conversion function in MiLai PixelsCore.
    That’s pretty hardcore though 🙂

  • Filip Vandueren

    August 26, 2020 at 12:21 pm in reply to: How to create a dot grid with expressions?

    Check if you’re not running the “legacy extendscript” javascript engine in project settings

  • Filip Vandueren

    August 25, 2020 at 7:18 pm in reply to: X-rotation in 3D

    There’s three tiny icons in the toolbar to select the Axis Mode: Local Axis, World Axis or View Axis.

Page 79 of 277

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