How to export an Illustrator file into a vector layered Photoshop file

What if you want to convert an illustration, web design or UI from Adobe Illustrator to Photoshop for post-processing without copying as a smart-object? As well as save all the benefits of vector objects during transferring between two formats? And we have a standard export function in AI, so it should help us, shouldn’t it?

Well, Adobe Illustrator has Write Layers option with Maximize Editability checkbox in File → Export → PSD menu command. But as a result we have vector objects that become random raster layers. Well, it doesn’t seem like a maximum editability in Photoshop, eh?

Despite the export options, two squares became a raster layer in PSD

Finding a solution

I looked through articles (I came across an interesting one of 2011 at Turbomilk studio), lessons, youtube videos. Almost everything comes down to grouping objects in Adobe Illustrator, sort by layers (accuracy in your layers is always useful) and subsequent either manual rasterization via Object → Rasterize in Illustrator itself or automatically during the export. But I want to keep objects as vectors as much as possible.

Export from AI according to the Turbomilk article

There is another way based on Illustrator → Fireworks → Photoshop playing for pass, when source AI file opens first in Fireworks and then exports to PSD with similar options. But there is a little wasted motion: create an illustration in the first program then use the second for exporting to the third one. And even more Adobe retired Fireworks in 2013, so checking all of the pros and cons of this way doesn’t seem really possible.

And then I came upon an interesting trick found in an article of 2010 at Tutsplus: if you apply Make compound shape command to some objects in Window → Pathfinder panel, during the export process the object would remain a vector shape.

Trying Make compound shape on a few objects
Layers after export to PSD

The green square kept its color after opening in Photoshop and it remained being a vector shape, while other objects were rasterized. I took some notes of the fact that the programs work differently with “gradient” and “stroke” properties.

OK. But what if our document contains dozens and thousands of objects? Applying Make Compound Shape command to each of the objects takes too much time, even if you record an Action you would face an object traversal problem — Select Next Object command would skip grouped objects and wouldn’t be able to traverse layers automatically.

Automation

My interest in this subject led me to write a script for automating the export of vector objects to PSD.

Requires Adobe Illustrator CS6 or higher

The script checks all the objects in a document in spite of layer or group they are in. Once it finds an object with a solid color, it applies an Action with Make Compound Shape operation. In order to keep a vector stroke on your object you have to apply Object → Path → Outline Stroke to it.

If you have a group of hundreds of small objects, e.g. brush painted hair/fur or text converted into curves, it’d be better combining all such elements into Compound Path via Cmd (Ctrl) + 8 before the script execution. It would help the script not to traverse every object/letter separately.
Usage sample

Exceptions

If your document has objects with Photoshop effects applied on (shadow, glow, noise etc.) they should be manually rasterized in Type Optimized mode.

Due to spatial specificity of some kind of objects (gradients, patterns, meshes and some other), according to my little research, not all of them can be exported from AI to PSD remaining vector. But they could be separated raster layers without tedious sorting by groups and layers in Adobe Illustrator.

For this reason there is another trick: the script moves every single object into a separate group.

Notice two squares each in separate group in AI after the export to PSD

Summary

  • The script keeps opacity and layer blending modes during the export process
  • Using Make Compound Shape allows us to keep vector objects in PSD
  • Gradients, patterns, meshes, objects with raster effects, stroked shapes will be rasterized
  • Moving rasterizable objects into separate groups allows us to keep them separated by Layers in Photoshop
  • Flat icons, UI elements, illustrations after some preparation can be used in fully vector form
  • Automated preparation of a document file for the export by the script dramatically reduces routine manual operations for rich documents

As an example here goes a vector illustration that was processed by the script and then exported to PSD format.

173 objects in AI are processed in 40 seconds. Final PSD has all his layers as vector shape

Well, that’s it for now. Install the script, try to export your AI documents. I’m looking forward to get some feedback from you as well as any suggestions or questions.

If the script helped you, then you can donate using Paypal here =)