Photoshop: Convert To Smart Objects and Rasterize Layers

  • 3
  • Idea
  • Updated 8 years ago
  • (Edited)
When creating layouts and composites I like to work with SO for resizing flexibility, but when many layers are involved it's time consuming converting and rasterizng one layer at a time.

It would be a great time saver if I could select multiple layers and convert them to Smart Objects in one move rather than one at a time. Ditto on the rasterization side of things. Thus add the command to convert to Smart Objects Plural, and Rasterize Layers plural.

Alternatively, it could be cool if multiple layers could be held in some sort of folder/group/envelope for SO transforming and then released from the group when desired. To the best of my understanding, as currently constructed, once multiple layers are combined into an SO there's really no way to uncombine them as raserization results in a merge.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
  • I'm happy, I'm confident you can do this!

Posted 8 years ago

  • 3
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
You can already select multiple layers to convert to a smart object. Converting each layer separately to a smart object could waste space, and would be ambiguous with the existing command. Though, with a good workflow reason, we could consider it.

Selecting multiple smart objects and rasterizing already works. Though there is a UI glitch where the Layer -> Smart Objects -> Rasterize command is grayed out (I'll go fix that, hadn't noticed before). The normal Layer -> Rasterize -> Layers and the context menu in the layers palette both work.

Yes, once converted into a Smart Object, there is no easy conversion back without rasterization. There are only a few, narrow circumstances where the conversion would work without rasterization and Undo normally works in those cases as well :-).
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
OK, fixed the rasterize menu enabling when multiple layers are selected - for the next major release.
Photo of Franck Payen

Franck Payen

  • 80 Posts
  • 7 Reply Likes
Chris, another one on me is the greyed out export content. It would help me make so many small psds from an intensive SO layout (and then reimport the psds in inDesign).
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Export content doesn't make a lot of sense when multiple layers are selected -- it would have to export each one at a time and prompt you for the filename and location for each one.
Photo of Franck Payen

Franck Payen

  • 80 Posts
  • 7 Reply Likes
Hi Chris, this is exactly what i'm looking for, so i sort of scripted it, but imagine if i had nicely named my cute smart objects, that would do it, no ?

The action i recorded, once i have only smart objects on my document, select the top layer, export content, [prompt for name], delete that layer, and again, i could then rename the psb inside of bridge to import all the content of that layout into a nice and editable one in inDesign.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Your script could just walk all layers and see if they're smart objects then export, instead of deleting them.
And this really is a good solution for scripts -- because it's a function with limited usefulness.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Chris, I think you're either missing my point or I'm missing yours.

You may recall my post on the other Adobe forum a few days ago. Lets say I'm doing a layout with a bunch of pieces of jewelry on it. One of many groupings could consist of a pair of earrings with reflections. This one grouping could consist of 4 layers, one for each earring, and one for each reflection. Reflections are on separate layers so as to use alternative blend modes, depending on the background color.

I'd like to be able to convert these 4 layers to Smart Objects for sizing/resizing flexibility. Correct me if I'm wrong, but in order to do so I have to convert each layer one at a time to a Smart Object. Or no? If I select multiples and then Convert To SO it groups them in a way that can't be ungrouped and blend modes can not be independent of the group.

And if I have 8 such groupings on the page it's highly inefficient to have to convert layer each of 32 layers one at a time.

And really, for layer pallet organization, what would be really great would be if I could put each grouping into a Folder, SO that, while retaining independent Blend Modes within. (A pipe dream for sure.)

Good to know that rasterization can be done in multiples, so thanks, but why not conversions?

I think this would benefit a lot of people who composit a lot of disparate elements into one, and who work with blend modes and resizing... like much of advertising and catalog production.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Yes, you missed the first paragraph of my comment.

And you can have all the blend modes you like INSIDE the smart object. But once that composites, the final smart object is a flat layer and can have only a single blend mode. Smart Objects are not folders/groups - they are entire documents that composite down to a single layer.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Chris, I didn't miss the first paragraph, it's that I don't know what to make of it.

It tells me that presently PS does not allow what I need but it could if you wanted it to, but you're afraid users wold abuse the option and bloat file size "unnecessarily". Is that about right?

How about if more than a given number of layers are selected for conversion at one time a warning dialogs appears notifying that the process could increase file size and decrease performance, with the option to turn off the dialog in the future?

I'm getting a handle on what SOs can't presently do, but how about the kinds of things they could be made to do in future releases? How inflexible is the paradigm going forward?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
You got it. And it would have to be a warning on 2 or more layers - because just that would waste more space and time than most people realize.

Smart Objects do what they can. They aren't going to get a lot more flexible because they can't (at least not without becoming so slow as to be useless). We put the restrictions there for a long list of reasons. They are placed files, not layer groups.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Fine, a warning on two or more layers.

However, I'm not sure your fears of overuse are warranted. On the spectrum between overuse and underuse I suspect the vast majority of users resides on the underuse side.

And now I know that's by design. ;-)
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14351 Posts
  • 1852 Reply Likes
It wouldn't be too hard to make a script to do what you want (iterate over layers and turn each selected layer into a smart object). David Jensen or one of the other folks over at PS-Scripts could probably whip something up if you ask nicely.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14351 Posts
  • 1852 Reply Likes
BTW - if you convert an individual layer into a smart object we try to preserve the layer blending - which is a change we made to either CS4 or CS5. In the case of multiple layers, the blending is ambiguous and often can't be preserved when the layers get smashed down into a composite representation.
Photo of Paul Riggott

Paul Riggott

  • 359 Posts
  • 143 Reply Likes
Just created a script that will convert selected layers to smart objects...
http://wikisend.com/download/503868/S...
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Chris, apart from my request, a question on performance.

I do experience the performance hit wehn using SOs. Can you give me a brief explanation on why that is? I assume it goes beyond increased file size. Is it more akin to increased history states?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 818 Reply Likes
Because converting a layer to a smart object creates a new document with just that layer in it, and that document can occupy memory and be accessed from disk in some cases. When you transform the smart object, we have to rasterize the child document, then transform, then composite the parent document. We cache as much as we can to improve performance, but those caches can take up memory and all of it can cause scratch disk activity.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Is it much help if I delete what pixels aren't being used before converting and trash the smart filter mask when possible?

Also, how much greater is the memory load for an embedded raw vs a conventional layer that's been converted to SO?

This is really useful info for me.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Empty masks take up almost zero memory, disk space or time.

The memory load for a smart object is an entire PSB file containing the child layers, plus the flattened version of the child document, plus the transformed pixels in the parent document.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 46 Reply Likes
Thanks Chris.

Okay, this is where the development team probably a good knee slappin' laugh at the silly naive user, but, how about some sort of dynamic performance analyzer wherein when the user feels performance going sluggish he checks the performance assessment tab and it assesses and displays how much of his memory drain is coming from each of open documents, SOs, history states, cache, etc, so the user can make a pointed judgment of where performance gains can best be had?

C'mon, it's the 21st century already. ;-)