Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Dashes in a shape layer…different colours?

  • Dashes in a shape layer…different colours?

  • Nico Jones

    March 22, 2011 at 2:14 pm

    So I have a path on a shape layer, and I’ve turned on dashes within the stroke option, so we have a load of blocks travelling along a line. lovely.

    Is there any was I can make these blocks different colours rather than just one?

    Many thanks,

  • Tudor “Ted” Jelescu

    March 22, 2011 at 2:28 pm

    One way of making the lines different colors (gradients not solid) is to use your animation as a track matte for a solid on which you apply 4color gradient.I don’t know if you can do each piece a single solid color using your workflow. It can work with a particle system like Particular.

    Tudor “Ted” Jelescu
    Senior VFX Artist

  • Roland R. Kahlenberg

    March 22, 2011 at 2:35 pm

    Not too sure but I’m certain that the TExt Tool will be able to do so.

    Cheers
    RoRK

    AE Training in South East Asia. AE templates for sale and rental. Click here for more

  • Nico Jones

    March 22, 2011 at 2:48 pm

    Ah, text dashes on a path?

    I would use particular, but I need to be able to twist the layer exactly like the twist effect in the shape layer controls…gah.

    Nico J BB

  • Roland R. Kahlenberg

    March 22, 2011 at 3:15 pm

    Distort>Twirl is similar to the SHape Layer’s Twist property. Text can do dashes and anything else that you can type, including dingbat fonts.

    HTH
    RoRK

    AE Training in South East Asia. AE templates for sale and rental. Click here for more

  • Tudor “Ted” Jelescu

    March 22, 2011 at 4:56 pm

    Roland’s idea sounds good- you can definitely do different colors in Text.

    Tudor “Ted” Jelescu
    Senior VFX Artist

  • Darby Edelen

    March 22, 2011 at 10:36 pm

    To use the shape layer you’d have to apply several different Strokes to the same path, each with an offset in their Dashes.

    If you need 2 colors, you can apply one additional Stroke. In the first Stroke make sure that you can edit the Dash, Gap and Offset properties (press the + button next to Dashes if you don’t see ‘Gap’).

    The Gap and Offset values you need will depend on the desired length of your dash. If you want a Dash that is 35px long, for example, you would need the Gap to be 3 times that length or 105px long so that there’s room for another 35px dash (with a 35px gap on each side) between each dash of this stroke. You can leave the Offset at 0px for now.

    Then duplicate this Stroke and in the duplicate change the Offset value to 70px (placing these dashes in the gaps between the previous ones). You can then set the color of the first stroke and second stroke separately.

    If you’re animating the Offsets of the dashes then you will most definitely want to link the Offset of each subsequent dash to the first one via expressions, something like:

    content("Shape 1").content("Stroke 1").dash.offset + value; //Value is '70' in our case, 2 times the length of a dash

    This technique can be used for adding any number of colors to the dashes. Here’s how the math breaks down:

    x = length of the dash
    e.g. 35

    length of the gap = (total number of unique colors desired + 2) * x
    Example for 3 colors: (3 + 2) * 35 = 5 * 35 = 175

    offset = (index of the current stroke – 1) * 2 * x + animated offset

    Example for first color:
    offset = animated offset value

    Example for second color:
    offset = (2 – 1) * 2 * 35 + animated offset = 70 + animated offset

    Example for fifth color:
    offset = (5 – 1) * 2 * 35 + animated offset = 280 + animated offset

    I hope the lengthy response doesn’t scare you away 🙂 If you get caught anywhere let me know.

    Darby Edelen

  • Nico Jones

    March 24, 2011 at 10:38 am

    Ha, I think I see where you’re coming from! I’ll give that a try.

    Thanks also for the help Roland/Ted – the trouble with the twirl effect is that it distorts the dashes too much. Twirling the shape layer’s path doesn’t affect their shapes, so hopefully Darby’s suggestion will work out, scary though it is!

    Nico J BB

  • Roland R. Kahlenberg

    March 24, 2011 at 3:51 pm

    Good stuff Darby!!! Thanks for sharing.

    RoRK

    AE Training in South East Asia. AE templates for sale and rental. Click here for more

Viewing 1 - 9 of 9 posts

Log in to reply.

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