ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Dashes in a shape layer...different colours?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nico Jones
Dashes in a shape layer...different colours?
on Mar 22, 2011 at 2:14:47 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,


Return to posts index

Tudor "Ted" Jelescu
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 2:28:14 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


Return to posts index

Roland R. Kahlenberg
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 2:35:52 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


Return to posts index


Nico Jones
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 2:48:26 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


Return to posts index

Roland R. Kahlenberg
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 3:15:51 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


Return to posts index

Tudor "Ted" Jelescu
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 4:56:10 pm

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

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index


Darby Edelen
Re: Dashes in a shape layer...different colours?
on Mar 22, 2011 at 10:36:02 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


Return to posts index

Nico Jones
Re: Dashes in a shape layer...different colours?
on Mar 24, 2011 at 10:38:46 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


Return to posts index

Roland R. Kahlenberg
Re: Dashes in a shape layer...different colours?
on Mar 24, 2011 at 3:51:11 pm

Good stuff Darby!!! Thanks for sharing.

RoRK

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]