Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Control gradient ramp start/end on a beam

  • Control gradient ramp start/end on a beam

    Posted by Ian Glover on September 29, 2019 at 10:32 am

    Hi,

    I am using a beam effect to connect a series of different coloured dot-to-dots, with a gradient ramp on the beam. The start/end point of the gradient ramp is pick-wipped to position of the dots as they animate.

    Is there any expression I can use to adjust the start and end point of the gradient on the beam? I need the gradient end points to start / end short of the dots.

    I don’t want the gradient running behind right into each do but starting and stopping around 20% short of the start and end of the beam.

    I tried adjusting the value, but it is not following the beam or scaling with it as it changes length.

    Thanks

    https://drive.google.com/open?id=19xUoj7UvvceGRE8w_CE3rFdIb6Wn_1XD

    https://drive.google.com/open?id=1Qs-iJoZNZxeJxhlRR6zFwwSaSHvMQ8K6

    effect("Beam")("Starting Point").value+100

    effect("Beam")("Ending Point").value-100

    Ian Glover replied 6 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 29, 2019 at 3:11 pm

    This should give you a point 20% along the beam:

    p1 = effect(“Beam”)(“Starting Point”);
    p2 = effect(“Beam”)(“Ending Point”);
    v = p2 – p1;
    p1 + .2*v

    80% would be:

    p1 = effect(“Beam”)(“Starting Point”);
    p2 = effect(“Beam”)(“Ending Point”);
    v = p2 – p1;
    p1 + .8*v

    Dan

  • Ian Glover

    September 29, 2019 at 3:49 pm

    Perfect – Thanks!

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