Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scaling a solid based on location in 3D. Please Help.

  • Scaling a solid based on location in 3D. Please Help.

    Posted by Kevin Reiner on November 3, 2008 at 9:02 pm

    Hello,

    I’m having a hard time with creating an expression. I have a ring of solids parented to and orbiting around a null. Here is a link to download the project

    https://www.sendspace.com/pro/0ock84

    What I can’t figure out is how to make the solids grow by 10% scale when nearest the camera. Is this something that can be done using expressions?

    Thanks,
    Kevin

    System Setup (for a more detailed list, see my profile)

    HARDWARE
    Mac Pro 2 x 3 GHz Quad-Core Intel Xeon
    9GB Memory
    Two 16x SuperDrives
    Dual-channel 2Gb Fibre Channel PCI Express card
    Apple Cinema HD Display (23″ flat panel)
    ATI Radeon X1900 XT Graphics Card
    AJA Kona LHe SD/HD capture card
    Apple Xserve Raid 5.6TB

    SOFTWARE
    Mac OS X 10.4.11
    Final Cut Pro Studio 2
    After Effects CS3
    Photoshop CS3
    Illustrator CS3
    Boris Continuum 5
    Sapphire Plug Ins
    Roxio Toast
    Digital Anarchy Anarchist Suite
    ParticleIllusion 3.0
    Trapcode
    Zaxwerks

    Dan Ebberts replied 17 years, 6 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    November 3, 2008 at 10:51 pm

    It’ll be something like this:

    minDist = 2337;
    maxDist = 2701;

    C = thisComp.activeCamera;
    P1 = C.toWorld([0,0,0]);
    P2 = toWorld(anchorPoint);
    d = length(P1,P2);
    ease(d,minDist,maxDist,value*1.1,value)

    Dan

  • Kevin Reiner

    November 10, 2008 at 4:49 pm

    Works like a charm Dan. Thanks so much. I just had to teak the first line a little to get it where I wanted it.

    Out of curiosity, how does the last line of your script work? That is the only part that I can’t get my head around completely.

    Thanks for everything you do here Dan!
    – Kevin

    System Setup (for a more detailed list, see my profile)

    HARDWARE
    Mac Pro 2 x 3 GHz Quad-Core Intel Xeon
    9GB Memory
    Two 16x SuperDrives
    Dual-channel 2Gb Fibre Channel PCI Express card
    Apple Cinema HD Display (23″ flat panel)
    ATI Radeon X1900 XT Graphics Card
    AJA Kona LHe SD/HD capture card
    Apple Xserve Raid 5.6TB

    SOFTWARE
    Mac OS X 10.4.11
    Final Cut Pro Studio 2
    After Effects CS3
    Photoshop CS3
    Illustrator CS3
    Boris Continuum 5
    Sapphire Plug Ins
    Roxio Toast
    Digital Anarchy Anarchist Suite
    ParticleIllusion 3.0
    Trapcode
    Zaxwerks

  • Dan Ebberts

    November 10, 2008 at 4:53 pm

    ease() is just one of AE’s built-in interpolation methods. As the first parameter varies between the 2nd and 3rd parameters, the output of ease() varies between the 4th and 5th parameters.

    The other flavors are linear(), easeIn(), and easeOut().

    Dan

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