Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Linear stroke gradient along shape path linked to 3D nulls

  • Linear stroke gradient along shape path linked to 3D nulls

    Posted by Adam C. Sager on March 10, 2025 at 3:22 pm

    I used the Create Nulls from Path script to generate a shape path that is linked to ~10 3D nulls. These nulls are distributed in 3D space so the path moves in perspective with a 3D camera tracked to footage (using taper to simulate a depth cue). I’m trying to get a linear gradient running from end to end of my shape/path, but I believe the dynamic link between the path points and the nulls is breaking normal functionality of the Gradient Stroke within the shape.

    I’m hopeful there is a way for a linear gradient to follow along all ~10 points of the path, but everything I’ve tried thus far hasn’t worked.

    Would greatly value any ideas, tips or tricks the Creative Cow community may have.

    Graham Quince replied 1 month, 1 week ago 2 Members · 1 Reply
  • 1 Reply
  • Graham Quince

    March 11, 2025 at 9:06 am

    You’re applying what is in essence a 2D effect to a 3D shape. I think the closest you can do is link the null’s positions to the gradient points.

    An expression like this would help:

    thisComp.layer("Null 1").toComp([0,0,0]);

    The other option would be to make your gradient a precomp and make 3D, then use your 3D shape as a track matte for it. I did something similar in my Phaser tutorial a while back:

    https://www.youtube.com/watch?v=3Kp04bxpnmo

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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