Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Infinity value?

  • Posted by Lord Scales on July 27, 2007 at 8:50 pm

    Hello there.
    Well, I know we can fade out things simulating 3D Space according to the distance from the camera like this:

    dist = length (thisComp.activeCamera.position, thisComp.layer (“Null 1”).position);
    value/(dist/850)

    But what about fade out like this:

    minVal = 0.1;
    maxVal = 500;
    dist = length (thisComp.activeCamera.position, thisComp.layer (“Null 1”).position);
    linear (dist, 0, (here I want an “infinity value”), maxVal, minVal)

    So, is there an “infinity value” inside of expressions in AE? Because actually the 3D Space is infinity, so the length of something from the camera can be infinity also.

    Thanks!

    Lord Scales replied 18 years, 9 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 27, 2007 at 9:32 pm

    I don’t think that’s really what you want. If you really used a value of infinity there, you wouldn’t see any decrease in value as you moved away from the camera.

    What you’re probably really after is an exponential decrease based on the distance from the camera.

    Dan

  • Darby Edelen

    July 27, 2007 at 10:06 pm

    [Lord Scales] “So, is there an “infinity value” inside of expressions in AE? Because actually the 3D Space is infinity, so the length of something from the camera can be infinity also.”

    No… it can’t. I think by ‘infinite’ you’re thinking of ‘really big number.’


    minVal = 0.1;
    maxVal = 500;
    dist = length (thisComp.activeCamera.position, thisComp.layer ("Null 1").position);
    linear (dist, 0, (here I want an "infinity value"), maxVal, minVal)

    If you could actually put an ‘infinty value’ in there then your linear function would always return maxVal because ‘dist’ could never approach infinity. Infinity is not a number, it’s a concept of limitlessness.

    Any number divided by 0 is equivalent to infinity, but dividing by 0 gives an error in computing because the computer has to have a number as its result and infinity is not a number!

    Darby Edelen
    DVD Menu Artist
    Left Coast Digital
    Aptos, CA

  • Lord Scales

    July 28, 2007 at 3:30 am

    You are right! It would never decrease!

    Anyway, a

    minVal = 0.1;
    maxVal = 500;
    dist = length (thisComp.activeCamera.position, thisComp.layer (“Null 1”).position);
    linear (dist, 0, 50000, maxVal, minVal)

    will no longer work if the distance is bigger than 50000. I think it is almost impossible to be bigger, but who knows…
    Thanks for the explanations. I’ll keep a

    dist = length (thisComp.activeCamera.position, thisComp.layer (“Null 1”).position);
    value/(dist/850)

    🙂

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