Photoshop: Generator not working with smart object & scaling

  • 6
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
Photoshop generator doesn't work with smart objects. For example: "logo.png, 200% logo-retina.png" logo.png turns out right but the 200% is just blurry and unsharp, it doesn't actually scale the smart object vector.
Photo of Fernando Yanez Aguayo

Fernando Yanez Aguayo

  • 4 Posts
  • 3 Reply Likes
  • disappointed

Posted 5 years ago

  • 6
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Your logo.png is a raster file, it can't be scaled as a vector.
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
If a raster graphic is made into a smart object, and that smart object is scaled to 50%, then I put a prefix of "200%" in front of the smart object name, I would expect the generator feature to export a file that looks the same as the original raster graphic... but it doesn't.
Photo of Fernando Yanez Aguayo

Fernando Yanez Aguayo

  • 4 Posts
  • 3 Reply Likes
In my case I've tried with a vector logo copy pasted to PS as a smart object without succeeding.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
It should work fine if you use a vector file: AI, PDF, or EPS.
Photo of Louis St-Amour

Louis St-Amour

  • 3 Posts
  • 0 Reply Likes
logo.png is the rasterized output, not the input. It's not that simple.

I suspect it's a bug in the support for asset generation, perhaps use retina-sized PSDs and scale down by 50% as an alternative workaround?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Then you'll need to provide a lot more detail about your document, or post a sample document we can see.
Photo of Fernando Yanez Aguayo

Fernando Yanez Aguayo

  • 4 Posts
  • 3 Reply Likes
But isn't it supposed to scale the smart object layer?
So how am I supposed to do it the right way, if it's supported?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Yes, it is scaling your raster file, as you described. But a PNG file is not a vector file, and cannot be scaled like a vector file.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Chris, our problem is not with the raster files created by Generate. We do not expect these to be SVGs and scale when we use them. The problem is how Generate is making them.

Let me describe a scenario:
1. New PSD, 100x100px
2. Place "Vector-Logo.ai" (Smart Layer) and scale to fill canvas
3. Rename Smart layer to "200% logo-large.png"

Generate is processing this request badly by:
1. Rastering layer "200% logo-large.png"
2. Scaling UP this raster version by 200% (200x200px)
3. Saving PNG (which looks like crud)

What it *should* do:
1. Scale "200% logo-large.png" Smart Object layer by 200% (allowing the contents of the layer to be smoothly rendered using all the information contained within smart object source)
2. Save PNG
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Thanks for adding details so we can try to reproduce what you are seeing.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
No trouble.
Feel free to use 500% to make the results obvious.
And of course, I missed some steps (ie, save your PSD somewhere & then File > Generate > Image Assets)
Cheers,
AE
Photo of Stefan Ixenmaier

Stefan Ixenmaier

  • 14 Posts
  • 2 Reply Likes
i'm experiencing the same issue:
regardless of the smart object being a raster or vector file, the generator does not upscale the exported image correctly.

for example:
i'm using a raster file with dimensions 200x200px, convert it to a smart object and resize it to 50x50px. i name the layer "photo.png, 200% photo@2x.png". the expected behaviour would be, that i get "photo.png" in 50x50px and "photo@2x.png" in 100x100px.

so generator needs to go into the smart object and downsize it 50% from the original 200x200px. but it doesn't. it treats the smart object layer like it would a normal rasterized layer and the output is a blurry 200% version.

as mentioned above, the same principle applies to a smart object in vector format. regardless if the vector was created in photoshop or imported from illustrator.

hope this is detailed enough :)

NOT SOLVED, please revisit!
Photo of Scott Ruth

Scott Ruth

  • 5 Posts
  • 6 Reply Likes
I agree. I can't use this feature if it doesn't scale the smart objects for me. Not a time saver yet.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
I'm going to have another crack at describing the problem, so quickly dismissed previously.

Using Generate to export upscaled web assets (for retina displays) from high resolution Smart Object & Vector based layers does not result in re-rendered outputs created from the high quality sources available. Generate simply rasterises the layer at 100% visible size (ie, as scaled in the PSD) and then blows it up for saving. The results are unusable.

So much so, Adobe should not be promoting greater than 100% outputs as a feature or in demos.

The workaround, of course, is to scale your entire PSD file by 200% and save it with a new file name. Then save layers out at 100% using Generate. All well and good, if you are needing a fixed % upscale for all Generate assets. Still a hassle though.

Generate is (in theory) a nice addition to PS CC. I'm just disappointed to be sold some functionality that clearly isn't ready for commercial use.

Cheers,
Anthony

Environment: Up to date Photoshop CC (via cloud subscription) on PC Windows 7 64bit.
Keywords: Adobe Photoshop CC Generate issues with upscaling layers.
Photo of lee

lee

  • 25 Posts
  • 7 Reply Likes
Lots of nods here.
Photo of Stefan Ixenmaier

Stefan Ixenmaier

  • 14 Posts
  • 2 Reply Likes
i had discussed this issue with tim riherd at adobe and according to him they're aware of it and working on it. this was about a month ago. so i guess we'll wait and see.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Apparently a fix in the latest update for Illustrator Smart Object scaling (to 200%). I guess it doesn't apply to raster smart objects... About to upgrade and see.
Photo of Tobi Mayer

Tobi Mayer

  • 5 Posts
  • 1 Reply Like
I guess starting in retina and scaling it down should help till they fix it :)
Like 50% image.png, image_retina.png
Photo of Keith Bowman

Keith Bowman

  • 3 Posts
  • 0 Reply Likes
I have had an issue when working in a retina PSD and I want to generate an image at 200% and one at 50%. I tried " 50% image.png, image_retina.png" but it does not generate the 50% image at all.
Photo of Tobi Mayer

Tobi Mayer

  • 5 Posts
  • 1 Reply Like
strange ... maybe an syntax issue?

a few examples witch i had used succesfully.

50% Image1.jpg, Image1@2x.jpg

100% play_scale-100.png, 140% play_scale-140.png, 180% play_scale-180.png

100% SplashScreen-100.png, 868x421 SplashScreen-140.png, 1116x540 SplashScreen-180.png

Cheers
Photo of Fabio Chelly

Fabio Chelly

  • 4 Posts
  • 0 Reply Likes
I don't know if it is the same issue but in Photoshop CC, generator creates blurry images when it resizes.

Picture created with generator:


Picture created with save for web:


The original PSD is here:
http://www.chelly.pro/tmp/location.psd
Photo of Tobi Mayer

Tobi Mayer

  • 5 Posts
  • 1 Reply Like
Hey Fabio,

at first you should always make stuff with pathlayers.

Left path, right pixel (your original) ... both done with generator.
Photo of Fabio Chelly

Fabio Chelly

  • 4 Posts
  • 0 Reply Likes
But my icons are PNG, not vectors
Photo of Tobi Mayer

Tobi Mayer

  • 5 Posts
  • 1 Reply Like
If you don ́t have any vectors ... try to choose final resolutions which are devidable by 5. So if you choose 45x45px instead of 44x44 the generator result will be:
Photo of Fabio Chelly

Fabio Chelly

  • 4 Posts
  • 0 Reply Likes
Thanks for your answer (I'm curious why 5 ?).

I see that there are ways to bypass this problem (not compeletly as I need to create 22x22 and 44x44 pictures and not 45px). But I don't understand why "save for web" works fine in that case and not the generator.

I tried an external plugin (PNG Express) that works fine in any case. Adobe should be able to do better.
Photo of Tobi Mayer

Tobi Mayer

  • 5 Posts
  • 1 Reply Like
To be honest ... i ́ve no idea :) It is to avoid some scaling issues.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Scaling issues are clearly not the problem, as Save for Web does a perfect job.
Photo of Ethan Godt

Ethan Godt

  • 1 Post
  • 0 Reply Likes
I'm having a similar problem and posted it on the main Adobe communities forum and it was suggested that I post it here, too. To add to the comments above, these days photoshop will correctly render larger than 100% (if the source material allows, of course) if you made the raster layer a smart object after you import it, but not if you import it using the "place embedded..." file menu option (which is supposed to add the image to the document as a smart object and save you the extra step).

Here is the link to the original post in the other forum:
https://forums.adobe.com/message/6866...

"I'm trying to develop a retina workflow in photoshop for web projects. In doing this I found a strange irregularity in photoshop using smart objects and Photoshop CC 2014's new asset extraction.

Essentially what is happening is that when I import an image into an already open photoshop document and make that raster image a smart object (either by importing it using the "place embedded..." option or by converting the image to a smart object after placing it) I am getting different results when I try to extract those images at 2x using the new extractor. Of course you will have to perform a transform on the image to scale it down in the photoshop document after you make them smart objects (i.e. I know that 2x of the original smart object size will still be blurry — that's not what I'm doing). The image that is converted to a smart object after it's placed saves as 2x perfectly clearly and the one that was "place embedded..." comes out blurry as if it wasn't a smart object at all.

What should I do about this? I thought these two options were different ways of accomplishing the same thing. Honestly, I like to use the "place embedded..." option because it saves me steps, but it is the one that isn't working.

Thanks,

Ethan"
Photo of simoneast

simoneast

  • 2 Posts
  • 0 Reply Likes
Yes, I'm getting the same behaviour Ethan. I think "Place Embedded" is the same as dragging an image onto the document - both do not upscale correctly in Generator.

No solution after you posted this 8 months ago... yikes.
Photo of Divya Manian

Divya Manian, Employee

  • 82 Posts
  • 9 Reply Likes
Hi Ethan!

We are investigating this issue with smart objects! Will post progress here when I get to know more!
Photo of simoneast

simoneast

  • 2 Posts
  • 0 Reply Likes
Thanks Divya. Any progress in the last 7 months?
Photo of Goran

Goran

  • 3 Posts
  • 1 Reply Like
Anything
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Anything?
Photo of jergerb

jergerb

  • 2 Posts
  • 0 Reply Likes
This still hasn't been fixed It's been over a year!?
Photo of Chris Varesi

Chris Varesi

  • 1 Post
  • 0 Reply Likes
+1. I'm trying to develop a web/mobile Photoshop workflow training for art directors and designers versed in print at my company, and I really want this feature to be locked in and working properly before I commit. We've adopted a mobile first interactive methodology here, so an easy workflow for high pixel-density displays is tremendously helpful and could probably save us many thousands or tens of thousands of dollars a year in time gained for all designers on both coasts.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Generate doesn't yet produce sRGB images either, so it is far from ideal for producing web-ready assets.
Photo of Jay

Jay

  • 4 Posts
  • 0 Reply Likes
Yep, this is still an issue and it's a pain to work around, especially now with retina @3x requirements where old documents designed for @1x to be 50% as a workaround now have to generate @3x at 150% or we stray into weird 33.33333333% territory. Working at 100, 200 and 300% just makes way more sense.
Photo of georg Lobo

georg Lobo

  • 1 Post
  • 0 Reply Likes
I've just found a way to generate raster smart objects @2x or @3x with Generate Image Assets! It's ridiculously simple and still hard to know!!

When you drag and place a raster image in Photoshop, it automatically converts to Smart Object. But that automatic smart object will not be exported to higher quality even if this is originally big!

The solution: Resize the automatically generated Smart Object to 100% scale. Then convert the automatic Smart Object to a Smart Object again!!! That's it!!! The next time you generate the asset, it will recognise the real image size from the automatic smart object!

I know it sounds stupid, but it really works!
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
Yes, the workaround is discussed above. How the artwork is imported into your document will effect the success rate. It's clunky. I hope Adobe fix it soon and I can rely on Generate. It has plenty of other problems, the most significant being lack of sRGB support for all the files it creates (making them useless for online use).
Photo of jergerb

jergerb

  • 2 Posts
  • 0 Reply Likes
I'm assume after the steps is completed you can resize your smart object raster image to what you need in your layout and then it will do a better job of scaling @200%?
Photo of Jens Nüesch

Jens Nüesch

  • 10 Posts
  • 7 Reply Likes
Apparently the feature DOES WORK as expected as long as your high-resolution raster smart objects are of PSD or PSB file type.

This explains your findings that smart objects created from layers worked, but placed files didn’t. Creating a smart object from a layer yields a PSB file, which works. By contrast, if you place some PNG/JPEG/TIFF/etc. via File > Place or drag-n-drop, the file type is preserved. And for smart objects of any type other than PSD/PSB the export feature ignores the embedded/linked content, and simply falls back to scaling the rasterized version as it is stored with the layer, thus producing useless blurry pixel-bloats.

This holds true for Photoshop CC 2015.5.
Photo of Anthony Edge

Anthony Edge

  • 84 Posts
  • 2 Reply Likes
So, for every external file we drop in as a smart layer, we need to scale it up, drop it in a layer folder, and make that layer folder a smart object, then position it in our design as required. Then when we use Generate settings on that smart layer, all will be well?
It's a great tip... but boy, what a hassle.
Photo of Jens Nüesch

Jens Nüesch

  • 10 Posts
  • 7 Reply Likes
Until Adobe gets it working for all smart objects regardless of content, my recommended workflow would be:
- Open up the file you want to use as a smart object
- Save As PSD/PSB
- Drag file onto main comp / use File > Place on main comp
- Keep your main comp at 1x resolution and use Export As for scaled output

By contrast, if you wrap an existing smart object within another smart object just to change its file type, you’re wasting more disk space than necessary. Nesting smart objects only makes sense if you’re planning on using their respective layers stack to transform multiple layers as a group, or apply smart filters to them.