Dashed stroke

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

georox
Posts: 36
Joined: Sat Feb 16, 2013 8:10 pm

Dashed stroke

Post by georox »

I'm an AS 9 beginner and I would like to trace some entities (lines, circles) with a dashed stroke, what is the simplest way to do it?
And what about if I want to transform the stroke of an entity already done form continuous into dashed?
Thanks in advance.
User avatar
slowtiger
Posts: 6243
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Dashed stroke

Post by slowtiger »

The only way right now is to use a brush and set its spacing to something like 200%. You'll note that the dashes don't get distributed evenly, between two points there's always the same number of brush images. So you need to place your point carefully to give the illusion of an evenly spaced dash.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
georox
Posts: 36
Joined: Sat Feb 16, 2013 8:10 pm

Re: Dashed stroke

Post by georox »

Thanks and sorry for my beginner's ignorance, but how can I create such a brush?
I'm asking this because in my AS 9 style panel i see a NO BRUSH square but I can't find any "Create Brush" option.
Could you help me?
Thanks in advance.
User avatar
slowtiger
Posts: 6243
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Dashed stroke

Post by slowtiger »

If you have an outline selected and click on that "No Brush" you'll get a selection of brushes ...
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: Dashed stroke

Post by sbtamu »

This might give you a nudge in the right direction.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Dashed stroke

Post by videodv »

I have been tinkering with this and come up with the following freehand tool mod in the general Discusion section

http://www.kelleytown.com/forum/animato ... IC_ID=1947

Regards
Chris.
Last edited by videodv on Mon May 13, 2013 11:06 am, edited 1 time in total.
georox
Posts: 36
Joined: Sat Feb 16, 2013 8:10 pm

Re: Dashed stroke

Post by georox »

sbtamu wrote:This might give you a nudge in the right direction.
Thanks Steven for your great video, I followed your instructions but I still can't have the dashed line I would like with the line much longer than the space, n. 2 in this image (manually created by replicating single segments):
Image
I also tried to create a tall brush (128 x 512) like the following but AS9 seems to reduce it at the same height, thus producing always the dashed line n. 1 above.
Image
Is there a way to overcome this?
Thanks again,
Gianni
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: Dashed stroke

Post by sbtamu »

Try 150 spacing.

Image
Sorry for bad animation

http://www.youtube.com/user/sbtamu
georox
Posts: 36
Joined: Sat Feb 16, 2013 8:10 pm

Re: Dashed stroke

Post by georox »

I tried but the length of segments remains unchanged, the space % only affects the space between segments, not their length.
Any other idea?
Thanks.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: Dashed stroke

Post by sbtamu »

I see what you are saying. I think someone is working on a script for this but I will see if I can come up with a solution for now.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: Dashed stroke

Post by heyvern »

you almost had it with that long thin stroke image. Make sure the image is a square. So instead of a fat stroke in a square, you have a thin stroke in a square. The thickness of the brush image determines it's "relative" length or thickness in Anime Studio.

You just can't adjust the actual width or length of the brush in AS. That's a limitation of brushes. Brush images are always "1 x 1". You can't do "one direction scaling" to change your dashed line thickness/length. You have to modify the actual brush image.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: Dashed stroke

Post by sbtamu »

All I can think of is for you to make dash brushes of different lengths so you can have more choices.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
slowtiger
Posts: 6243
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Dashed stroke

Post by slowtiger »

The unpredictability of results was the reason why I animated dashed "strokes" as objects on a chain of bones, or inside masks: http://www.youtube.com/watch?v=8DUtNHVBB98
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
georox
Posts: 36
Joined: Sat Feb 16, 2013 8:10 pm

Re: Dashed stroke

Post by georox »

heyvern's suggestion solves the problem even though only partially, i.e. a thin brush inside a 128 x 128 square ...
Image
... generates longer segments in the final dashed line:
Image
I'm saying "partially" because I would like the segments be still longer.

However it is surprisingly to me that a so powerful graphical software as AS does not provide an easy way to produce a dashed line as desired by the user, like you do in a normal CAD software.

Thank you all for your precious help.

Gianni
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: Dashed stroke

Post by heyvern »

I left out one other part about the size of the brushes.

The square does not have to be limited to 128 px. If you need an even thinner brush increase the pixel dimensions. I create brushes that are actually quite large, up to 600 px so I can get some finer detail as needed.

------------------------------------------------------------------
Another trick... and this one probably may need a video or part of a brush webinar to demonstrate (I use brushes extensively and have lots of tricks) is to "combine shapes" on the "same points".

This is a trick that started with a really old version of Anime Studio when it was called "Moho". In the olden days you could create as many shapes as you wanted on the same points. Then this was changed so that the exact same points can only have one shape.

You can still do it but it requires including/excluding points from the shape creation. Now, you can't actually create multiple shapes on the exact same points since AS will just replace the existing shape. The trick here is to include or exclude points so that you can create multiple shapes on the same points.

Each shape can share the same points as long as there is at least 1 point that is different, and additional or excluded point or points for each shape. As long as the shapes you create don't have the EXACT same points this allows multiple shapes on the same points.

You should probably name the shapes or it can be difficult to select and keep track of them.

An example:
A single straight line shape created with two points.
After creating that shape, add an extra point to the end or middle of the 2 points.
Select all of those points, create a new shape.

You now have 2 completely distinct separate shapes on the same points (one shape has an extra point). I have created up to 5 or 6 extra shapes on the same points using this technique. It is so much easier than copying and pasting points or having multiple layers and you can do some cool tricks with it. You can now animate a single set of points and it will move multiple shapes.

Now you can assign a completely different brush (longer or shorter dash image, same thickness) to this extra shape or just use the same brush with different spacing. This will require a bit of experimentation. By "overlapping" the spacing you may be able to have an adjustable length for your dashed line.
Post Reply