Forum Replies Created

Page 67 of 277
  • I don’t think that’s the kind of thing I would use a regexp for.

    Maybe a python script to change/normalize the JSON files ?

    Or just write the max value to a separate data point in the JSON.

    Or can the expression be written in a way that averages out the JSONs ?

    Do the JSON files always have the same amount of data (keyframes) in them ?

    If you give a bit more info on how exactly the data is formatted, and how it is used, it shouldn’t be too hard to figure something out.

  • Correct, invisible characters (opacity=0) still count for the sourceRect, the fix is to scale them to 0% so they don’t take up any space.

    You should set the smoothness of the scale animator to 0 so it doesn’t scale the letters up, they’re only ever 0 or 100% nothing inbetween.

  • Filip Vandueren

    November 27, 2020 at 10:56 am in reply to: Sun cycle effect

    I would make it with 3D layers and animate a light source, so the trees can cast real shadows on eachother

  • Filip Vandueren

    November 26, 2020 at 12:34 am in reply to: Mac M1 chip running After Effects

    The Ram is going to be the limiting factor right now.

  • Filip Vandueren

    November 26, 2020 at 12:33 am in reply to: Set two different font in expressions

    Alas, can’t be done (yet ?) all styles you set through expressions are applied to the entire text-layer.

  • Filip Vandueren

    November 26, 2020 at 12:31 am in reply to: Paragraph Text Question via scripting

    That would probably mean you are either working in an older version of After Effects, or the current version’s expressions – engine is set to Legacy mode (in the project settings )

    I can rewrite the code tomorrow so it works on older versions of After Effects tomorrow

  • Filip Vandueren

    November 25, 2020 at 12:55 pm in reply to: Inverted GaussRandom()

    try this:

    ( gaussRandom(0,10) + 5 ) % 10;

  • Filip Vandueren

    November 25, 2020 at 12:46 pm in reply to: Water-like movement

    I haven’t tried it yet, but maybe this library can help:

    https://github.com/motiondeveloper/eTractors

  • Filip Vandueren

    November 25, 2020 at 12:43 pm in reply to: Paragraph Text Question via scripting

    Try this, it’s a kind of brute-force approach (it tries every possible line length and chooses the one that has the least difference in line-lengths), but it works:

    You will have to manually input the ideal maxWidth-value though, as that depends on the font used and the width of the box.

    If the value is too high, then the text-box will also wrapping, and we don’t want that.

    But you might not even need to use text-boxes using this approach ?

    var txt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam rutrum sapien ultrices sapien condimentum, et congue risus placerat.";
    maxWidth = 110;
    minWidth = 30;
    var results=[];
    for (i=maxWidth; i>=minWidth; i--) {
    const splitter = new RegExp('(.{'+i+'}[^ ]* )', 'g');
    const newTxt = txt.replace(splitter, '$1\n');
    const lines = newTxt.split('\n');
    const lineLengths = lines.map(a=> a.length);
    results[i] = {
    index: i,
    txt: newTxt,
    lines: lines.length,
    contrast: Math.max.apply(Math, lineLengths) - Math.min.apply(Math, lineLengths)
    }
    }
    // best match has the lowest contrast (diff betweens longest and shortest line) and the lowest amount of lines
    results.reduce( (acc, curr) => ((curr.contrast < acc.contrast) && (curr.lines<=acc.lines)) ? curr : acc , results[maxWidth]).txt;

    One Last thing: if there are line-breaks in the input-text already, then it won’t work as expected. You might want to first filter them out.

  • Make sure the Illustrator layers have “continuously rasterize” enabled.

    https://www.schoolofmotion.com/blog/collapse-transformations-continuously-rasterize-after-effects

Page 67 of 277

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