Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions changing the range

  • changing the range

    Posted by Alex Dinnin on August 15, 2007 at 7:01 pm

    I am trying to zoom out from the earth.. I have a whopping great texture which is converted into a sphere using CCSphere.

    However to choose how far you are away from it.. you must use the radius slider.. which goes from 0 to 100000

    I want to use the radius to effect opacity and scale etc on other layers.. but they are all 1 to 100.

    Is there an expression that can change the range of something ?

    so I can have 0 = 1 and 100000 = 100 so I can then use it for other bits.

    I hope I am making myself clear.. I don’t have AE in front of me.. It only came to me on my journey home that expressions was probably the answer.

    Thanks in advance

    Alex

    Filip Vandueren replied 18 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    August 16, 2007 at 7:42 am

    you should use the linear() function:

    // r=CCSphereRadius

    lin=linear(r,0,100000,1,100);
    [lin,lin] // for scale -> 2dimensions

    BTW: if you’re doing an extreme zoom I find it better to animate a Slider-Control on a Null-object, and then using a powerformula to get logarithmic scaling like:

    //sl=slider

    radius=Math.pow(1.2,sl)

    you’ll find that otherwise, if you want to scale and add easing, it doesn’t feel right: it’s scaling to fast when it’s small and too slow when it’s big.

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