How to save stroke widths in adobe illustrator files?

Started by
1 comment, last by lawnjelly 11 years, 8 months ago
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:

2zp33hu.png

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. mellow.png

Anyone know how this should be done? Or even whether it can be done in the .ai format?
Advertisement
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: http://designshack.net/articles/software/mastering-variable-width-strokes-in-illustrator-cs5/

I want to help design a "sandpark" MMO. Optional interactive story with quests and deeply characterized NPCs, plus sandbox elements like player-craftable housing and lots of other crafting. If you are starting a design of this type, please PM me. I also love pet-breeding games.


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: http://designshack.n...llustrator-cs5/


Ahha! That is exactly what I'm looking for biggrin.png , 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. tongue.png

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.

This topic is closed to new replies.

Advertisement