Sign in to follow this  
Followers 0
lawnjelly

How to save stroke widths in adobe illustrator files?

2 posts in this topic

Not sure this is the right place this, being kind of programming related, but:

I'm just writing a quick centreline autotracer, to convert line art to vector. I'm just starting to get it working now, here's an example I just tried:

[img]http://i48.tinypic.com/2zp33hu.png[/img]

I'm currently exporting to the adobe illustrator .ai format, because the Anime Studio software I'm intending to use will import this. I'm saving the strokes as bezier curves of the form:

0 0 m (move to this coord)
0 1 1 1 1 0 c (bezier curve to 1,0 using the 2 control points)

I've figured out putting in
4 w
sets the width of the line, however it seems to be using the same width throughout the line, whereas I want to nicely smoothly interpolate between widths at different points along the stroke. [img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img]

Anyone know how this should be done? Or even whether it can be done in the .ai format?
0

Share this post


Link to post
Share on other sites
I'm more familiar with Inkscape than Illustrator, but the two are pretty similar. If it were Inkscape I would say you are using the wrong tool, you need to use the calligraphic tool for a line of varying widths. I understand that actually you are not using a tool at all, but what I mean is, the different tools create data in different formats, and you have the wrong one.

Here's an article/tutorial about variable line width in illustrator: [url="http://designshack.net/articles/software/mastering-variable-width-strokes-in-illustrator-cs5/"]http://designshack.net/articles/software/mastering-variable-width-strokes-in-illustrator-cs5/[/url] Edited by sunandshadow
1

Share this post


Link to post
Share on other sites
[quote name='sunandshadow' timestamp='1345002769' post='4969715']
I'm more familiar with Inkscape than Illustrator, but the two are pretty similar. If it were Inkscape I would say you are using the wrong tool, you need to use the calligraphic tool for a line of varying widths. I understand that actually you are not using a tool at all, but what I mean is, the different tools create data in different formats, and you have the wrong one.

Here's an article/tutorial about variable line width in illustrator: [url="http://designshack.net/articles/software/mastering-variable-width-strokes-in-illustrator-cs5/"]http://designshack.n...llustrator-cs5/[/url]
[/quote]

Ahha! That is exactly what I'm looking for [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] , I thought illustrator must be able to do it, but I don't have it installed (not being an artist).

I haven't had much success with googling, can I ask a favour, would someone who uses illustrator CS5 or later be able to save an .ai file with just a single stroke in (with variable line width), open it up in e.g. notepad, then copy and paste the text into a post on here? That would hopefully enable me to see how it is saved. [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

It *looks* as though this feature was introduced in CS5 and later versions, so I assume it would have to be saved in that format.

*edit* It also looks like it should be saved without compression so that it can be opened as a text file. Edited by lawnjelly
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0