Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects AE Expressions Invalid Numeric Result Problem

  • AE Expressions Invalid Numeric Result Problem

    Posted by Tony Hearst on February 13, 2014 at 4:26 pm

    OK I need help … I’m using Dan Ebberts’ Expression below, working in AE CS6.

    maxDev = 13; // max deviation in pixels
    spd = 30; //speed of oscillation
    decay = 1.0; //how fast it slows down

    t = time – inPoint;
    x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
    y = scale[0]*scale[1]/x;
    [x,y]

    AE gives me the following:

    After Effects warning: invalid numeric result (divide by zero?)
    Expression disabled.

    Error occurred at line 0.

    Please chime in. Urgent, thanks!

    Ridley Walker replied 12 years, 3 months ago 3 Members · 4 Replies
  • 4 Replies
  • Declan Smith

    February 13, 2014 at 5:58 pm

    I’m guessing that your scale x value is <=0 or that the variable x is evaluating to 0.

    Declan Smith
    https://www.madpanic.tv
    After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

    “it’s either binary or it’s not”

  • Tony Hearst

    February 13, 2014 at 6:08 pm

    I’m not well versed in expressions so what do I do to correct it?

  • Ridley Walker

    February 14, 2014 at 3:18 pm

    [Tony Hearst] “Error occurred at line 0.Please chime in. Urgent, thanks!”

    There’s nothing wrong with the expression as you wrote it. It should be applied to a property with 2 dimensions like position or scale.

    Line 0 refers to the first line of the expression. Lines in an expression are counted like an array, so 0 is the index of the first item.

  • Ridley Walker

    February 14, 2014 at 9:00 pm

    There is *nothing* wrong with the script. It works. I’ve just copied and pasted the script in your first post to both position and scale.

    To what and how are you trying to apply the scipt?

    See: 7129_workingscript.aep.zip

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