How to automate product mockups with variable width/height and smart objects.
Copy link to clipboard
Copied
Hello there!
I'm a bit out of my depth on my current project, and this is my first post to Adobe Fourms, so let me know if this makes sense! I need to create what will be hundreds, if not over a thousand, product mockups that look like the attached, and would love to find a way to automate this process.
The main hurdles are:
- These are all based on book covers, which I don't have the ability to adjust the original cover's aspect rato, so there is a challange of getting the sticker on the edge, and ensuring the effect of the 3d book stack lines up to the changing widths. All effects would need to account for varying width/height.
- There must be two virtual "stickers" applied, which change depending on the book being shown (The Theme and Tag in this example).
- The flat cover plus stickers must be repliacted to create a 3D mockup of a stack of books in the background. Which are currently a smart object.
- The final file needs to remain a PSD with transparent background for the team I will be handing this off to.
- After the inital push, we will still be creating new images, so this will need to be a long term tool or solution as well.
I am open to ideas on how others may go about this. I originally tried an image data merge and excel sheet in indesign, with the thought of possibly converting the pages to PSD somehow, but could not solve that last piece, and the images still looked odd with the varying cover sizes. It seems like I can find a solution for a part or two of this, but stringing them all together is proving difficult.
I've looked into pixel replacement in photoshop and actions for the Tag and Theme and that seems like a possibility. The smart object image replacement seems doable with a script (Though I don't think it would apply the Tag and Theme). However, the biggest hurdle by far is the varrying sizes of the book covers I will need to run though. I've looked online for paid scripts/plugins or even online mockup services and can't seem to find something to accomplish this (paid or free). I'm not terribly familiar with coding or scripting myself, but I'm also trying to find someone well versed in Adobe and coding to collaborate with to create a code that can run through this process.
Any ideas or thoughts would be greatly appreciated! I'm also open to hearing that Photoshop is not the best tool for the job, and possible recommendations there. I'm not sure it is or is not, but it is where I'm landing at the moment!
Thank you!
Explore related tutorials & articles
Copy link to clipboard
Copied
Your example file is not working.
Copy link to clipboard
Copied
Here it is! 🙂
Copy link to clipboard
Copied
Books, Cars, tables, Pictures etc the all have fixed dimensions. There Are different Book formats, different Car models, different Picture Aspect ratio. All have their own Aspect Ratios and fixed dimensions, A book jacket for and 8" square book is not going to cover or fit an 11" x 14" table top book. You need multiple mockup template one for each book products fixed Size and appropriate size replacement design for your products. If you have similar products the have the same Aspect ration but different sizes. You can use the same replacement design for you different products and scale the replacement designs. You are not going to be able to recomposite design for different aspect ration products. You would know this if you ever user Photoshop's Content Aware Scale. Things are distorted when you composite design into a different Aspect Ratio, Design shapes need to be changed. If you Scale the wrong aspect Ratio replacement content to fill product Smart object layer's object image content will be lost. If you fit the replacement to the product smart object layer's object aspect ratio deign the will be borders on two sides of the replacement designs. My Batch Mockup Populating Script has a Edit option that Support filling the Mockup smart object layer.s object with replacement content or fitting the replacement to fit within the Mockup's Smart object Layer's object. The smart object layers associated Object transform will still scale and warp the replacement objects. If the Aspect Ration are close to each other you mats find the results acceptable in some cases. However Landscape to Portrait and portrait to landscape will not be acceptable. I do not like Distortion I would never add a content aware scale type of option. I'm sure I would not find Content aware scale will be acceptable landscape to portrait and portrait to landscape. Mockup requite the right size replacement content. Replace Contnt with wrong size replacement does not work in mockup for the Smart Object Layers Associated Object Transform which can also warp the object is not replace or changes when you use Layer>Smart Objects>Replace content. The Smart Object layer recorded transform and warp was recorded for the object aspect Ratio and size for object is in Template PSD or PSDT file.
Book covers have text near the covers edges any trimming of of text you will not find acceptable.
Copy link to clipboard
Copied
Thank you for your answer. I'm aware of aspect ratios and distortion, which was why I was asking if there was anything that could be done regarding variable width specifically. My hope was that there could be something with a layer style that would be applied on the cover (and its aspect ratio). Having multiple template files based on aspect ratios was one of my thoughts but is less than ideal, but I wanted to see if other options were available before going forward with that.
Copy link to clipboard
Copied
Smart object layers have an object transform in the smart object layer data. That data is for the pixels rendered for the object by photoshop. The object has a fixes aspect ratio and size.the object is static it is not morphing its size, shape, and content. When you use Photoshop replace content the layers transform data is not changed the replacement object needs to have the same Aspect Ratio , size and resolution as the object the template was created with. If your replacement object is not you may able to manually edit the populated layered template and alter the template and replacement content to to work together to form an acceptable populated product mockup. Perhaps some day Adobe Artificial Sensi will be able to perform the magic you want to happen. You may need a quantum computer then.
Copy link to clipboard
Copied
You can use variables to replace some elements like type elements and front book cover. Use Fill when setting Method for pixel replacement variable.
You can also use variable and data sets to import and second (distorted - pile of books) but you can not distort it nor to use variables with smart object layer. Instead you must record action or to write script and to do additional batch process. It seems to me, without further investigation, doable to automate even using actions but you must think deeply after checking all (orientation, dimensions... of replacement files).
Copy link to clipboard
Copied
Thank you for your answer. It is a shame there isn't a more streamlined way, but this is the process I was expecting.
Copy link to clipboard
Copied
There are a few ways you could create these Photoshop mockups images in bulk while ALSO having all the input images get auto-resized to fit the Smart Object:
Option 1) Use the Batch Replace Smart Objects Photoshop plugin. This automates the creation of mockup images in Photoshop, and there's also a "Stretch To Fit Smart Objects" feature which does exactly that -- even if your input images vary in size, it'll automatically resize them to perfectly fit the Smart Object container size. Additionally, if the DPIs/resolutions of the images vary as well, again, this feature will account for that and make it so you create perfect mockup images, even with varying input images. Really useful if you have a bunch of images that you want to use to generate mockups, but there's variation in terms of the image aspect ratio or resolution.
Option 2) Write a Photoshop script that does this for you. While there's a few ways the script could work, the simplest solution I can think of would be a 2-step process: Step 1 would be, have a pre-processing step that batch-resizes all of your images. You could loop over all images from the input folder, resize them to the needed dimensions/resolutions, and THEN perform Step 2, the batch-replacement operation for the Smart Object. Alternatively, you could do that same pre-processing step to resize all images first, but instead of doing it via scripting? You could just do a conventional "Batch" inside of Photoshop -- where you first set up an Action to resize the images to the needed dimensions/resolution, then run this as a Batch operation for your folder of images.
If you go the scripting route, in my view, you'd be better off going all the way -- meaning, I would write a script that also automates that batch-resizing step. Since the goal is clearly to automate this process, it would be silly to force yourself to do a manual pre-processing step when you could just automate that as part of the script, as well. Note that you CAN run "batch" operations in Photoshop, but have them be triggered via a .jsx script. I've done this for several workflows -- and trust me, it's way better than having to manually execute these batches for each and every one.

