Activity › Forums › Adobe After Effects › Dashes in a shape layer…different colours?
-
Dashes in a shape layer…different colours?
Posted by Nico Jones on March 22, 2011 at 2:14 pmSo 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,
Roland R. kahlenberg replied 15 years, 4 months ago 4 Members · 8 Replies -
8 Replies
-
Tudor “ted” jelescu
March 22, 2011 at 2:28 pmOne 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 pmNot too sure but I’m certain that the TExt Tool will be able to do so.
Cheers
RoRKAE Training in South East Asia. AE templates for sale and rental. Click here for more
-
Nico Jones
March 22, 2011 at 2:48 pmAh, 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 pmDistort>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
RoRKAE Training in South East Asia. AE templates for sale and rental. Click here for more
-
Tudor “ted” jelescu
March 22, 2011 at 4:56 pmRoland’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 pmTo 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 dashThis 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. 35length of the gap = (total number of unique colors desired + 2) * x
Example for 3 colors: (3 + 2) * 35 = 5 * 35 = 175offset = (index of the current stroke – 1) * 2 * x + animated offset
Example for first color:
offset = animated offset valueExample for second color:
offset = (2 – 1) * 2 * 35 + animated offset = 70 + animated offsetExample for fifth color:
offset = (5 – 1) * 2 * 35 + animated offset = 280 + animated offsetI 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 amHa, 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 pmGood stuff Darby!!! Thanks for sharing.
RoRK
AE Training in South East Asia. AE templates for sale and rental. Click here for more
Reply to this Discussion! Login or Sign Up