How to save stroke widths in adobe illustrator files?
Members - Reputation: 429
Posted 14 August 2012 - 03:52 AM
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:
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
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.
Anyone know how this should be done? Or even whether it can be done in the .ai format?
Moderators - Reputation: 5060
Posted 14 August 2012 - 09:52 PM
Here's an article/tutorial about variable line width in illustrator: http://designshack.net/articles/software/mastering-variable-width-strokes-in-illustrator-cs5/
Edited by sunandshadow, 14 August 2012 - 10:02 PM.
Phone game idea available free to someone who will develop it (Alphadoku game - the only existing phone game of this type is both for windows phone only and awful. PM for details.)
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.
Members - Reputation: 429
Posted 15 August 2012 - 03:18 AM
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 , 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.
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, 15 August 2012 - 03:28 AM.