Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects steep of a curve to drive the color of a dot

  • steep of a curve to drive the color of a dot

    Posted by George Matthew on December 9, 2008 at 2:20 pm

    I have a blip animating along a curve. (A graph)
    The x axis of the graph has a pointer shape that gets its position[0] from the position[0] of the blip moving along the curve. What should I play around with in javascript to get an effect so that the pointer changes its color proportionately to the speed at which it moves?

    Thanks

    George Matthew replied 17 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 9, 2008 at 3:11 pm

    You could add a fill effect to the pointer with an expression like this for the fill color:

    zeroSpeedColor = [1,0,0,1]; // red
    maxSpeedColor = [1,1,0,1]; // yellow
    maxSpeed = 500; // pixels per second

    linear(transform.position.speed/maxSpeed,0,1,zeroSpeedColor,maxSpeedColor)

    You’d need to adjust the colors and maxSpeed to suit your needs.

    Dan

  • George Matthew

    December 9, 2008 at 3:47 pm

    Thank you so much

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