6 ms·
My experience is that SVG is simply not ready to support anything but the most basic vector art. I'm never sure if it's Illustrator's SVG output, the format, o
by egypturnash 14y ago
My experience is that SVG is simply not ready to support anything but the most basic vector art.
I'm never sure if it's Illustrator's SVG output, the format, or browser support that's lacking. But it's a total crapshoot if any kind of sophisticated techniques are going to make it out of AI. (Hell, it's a crapshoot if they'll make it through another PDF renderer, too; when I prep books for print, I just make a ton of TIFFs.)
Here's some other ways I might try to make that radial gradient in AI. And their results after eyeing the generated SVG.
- Draw about 8-10 lines in different colors radiating out from the central point. Make them into a blend. (This is an idiosyncratic use of the term "blend"; when you blend between two or more shapes, AI will draw a bunch of intermediary shapes that morph between them. You used to have to do this all the time before AI added the quick and easy gradient tool.)
This translates into SVG as a bunch of lines - SVG doesn't understand the concept of a blend, or at least AI's exporter doesn't, so six lines grouped into a blend become a hundred or so. It looks pretty good.
- Make a linear gradient; use a distortion mesh to turn it into a radial gradient. [1]
This translates into SVG as an embedded image. But it sure looks good.
- Draw about eight wedges. Blur them.
If I use AI's native blur, it turns into several embedded images. Also it's a bit pale as there are no 100% opaque pixels.
If I use an SVG blur, it's very compact - just a few blurred shapes. However, the rendering is just vile, with bounding boxes based on the edges of the polygons rather than ones expanded out to cover all that blur. Also it has the "no 100% opaque pixels" problem.
Also it's worth noting that Illustrator's UI for SVG effects is absolutely terrible; you've got a tiny list of cryptically named effects, and if you want to change the parameters you get to edit code.
- Finally, I revisited the line blend and turned those lines into long, thin wedges. Looks perfect. Translates into a whole ton of shapes.
I haven't tested file size. I suspect that it may not be a win over a bitmap until you get to like 1K pixels square.
Some of these results might be better if I was using Inkscape. If anyone would care to try doing similar things in that I'd be curious to see how well it fares on these methods - and on others you may come up with!
Reference JPG: http://i.imgur.com/ZSDAZ.jpg http://i.imgur.com/ZSDAZ.jpg
Source AI and generated SVG: http://www.sendspace.com/file/rn83zw http://www.sendspace.com/file/rn83zw
[1] Tutorial here: http://vector.tutsplus.com/tutorials/tools-tips/quick-tip-create-a-conical-gradient-with-adobe-illustrator-in-two-minutes/ http://vector.tutsplus.com/tutorials/tools-tips/quick-tip-cr...
- th0ma5 14y agoYes, I can confirm that a lot of what your experiencing is Adobe CS's compromise with the SVG format, and indeed Inkscape is much better in this specific use case. In general, AI predates SVG, and in general is much broader in scope than SVG, especially with regards to integration with the rest of the suite, and blurring of the lines between illustration and photographic effects.
- egypturnash 14y agoOut of curiosity, do you know of any other ways to get an image from AI into an SVG besides Illustrator's SVG output?
- th0ma5 14y agoNo not really, although if I was in need of some kind of option, I would explore a couple of things 1) Clipboard formats... like WMF on the clipboard into Inkscape 2) Printing as PDF or PS and then using Inkscape or Ghostscript to go from there... 3) See what kinds of options you get with obscure features of Photoshop like AI->Photoshop->Print as PDF ... in general I think for large complex drawings AI suffers from losing track of its own internal scene graph, or at least there are drawings and layers of effects that can suffer from the halting problem and just crash AI. I have seen several people in the creative coding and graph theory worlds struggle with this kind of problem regardless of tool. Best of luck to you!