Copy link to clipboard
Copied
I did this once and i cannot remember how, it is driving me nuts.
I have a tshirt business and i need to create mockups of the same tshirt with different images
I have an image of a tshirt (1500 px x 1500 px) White background (JPG).
I have a folder with 200 PNG's images (transparent) all different sizes but smaller than the shirt
I need to create an action and run a batch or script, so i can have all the images of the shirt and each design.
I know that i did it once, I have more than 3000 images like that, we add new shirts and designs, and i need to figure out how to do it again. PLEASE anyone
Copy link to clipboard
Copied
Think of the steps... The batch command would open each of the 200 PNG images as an active document, then the recorded action would play to completion on each separate PNG.
So you need to make the action so that it places/copies/pastes the T-shirt behind the PNG layer (or moves the PNG layer above the placed T-Shirt). This will likely require canvas sizing and positioning/sizing for the PNG layer relative to the common T-Shirt being added to each image.
The alternative is a script.
EDIT: Photoshop Data-Driven Graphics (Variables) with image pixel replacement could be another option.
Copy link to clipboard
Copied
As mentioned previously, a script is the other common approach.
You could use the following from the late JJMack:
https://github.com/MarshySwamp/JJMack-Archive
Specifically, the "PhotoCollageToolkit.zip" and the "BatchOneImageCollage.jsx" script. Another option is a smart object based script, such as "BatchReplaceOneObject.jsx" or perhaps "BatchUpdateSmartObject.jsx" script from the previously mentioned archive. In each case, you need an appropriate template to work with the script.
Yet another approach is a script using the Frame Tool to automate the placement of the PNG images onto the underlying T-shirt template.
There are many custom scripts for "mockups" to be found by searching this forum, most commonly phone cases and t-shirts.
Copy link to clipboard
Copied
Thank you Stephen, I will try them to see if I can make it work
Copy link to clipboard
Copied
Could you share some examples of what you're trying to achieve? I'm afraid I don't fully understand your task. Perhaps I can assist with actions and batch processing. However, if you find a suitable script, you can disregard using actions.
Copy link to clipboard
Copied
Hi Bojan, The shirt is the main image (1200 px) I need to add the PNG Files (i have more than 800) and save each one with the shirt.
I'm attaching the shirt, the png (Cat) and the desire final image, I'm attaching other PNG (they are all different sizes)
I tried to do an action where I placed a PNG, resize it and center it, and save it, so it can do the same action on a batch, no luck. I did it before, but i cannot remember how.
Copy link to clipboard
Copied
@silviob65797187 – Your example image is 1200 px square, however the original background is 1500 px square.
Will the 1500 px image be resized to 1200 px before combining with the transparent PNG files?
Or will the composite images be created at 1500 px (to preserve maximum resolution) and you will then batch resize copies to 1200 px later for web publishing?
At 1500 px size, the design has an effective size of 390 px square (as indicated by the marquee selection in the screenshot).
At 1200 px size, the design has an effective size of 310 px (as indicated by the marquee selection in the screenshot).
Will all of the PNG files be top-centre aligned in the area as indicated here based on your sample? Or should they be middle-centre aligned in the area? Or...
Copy link to clipboard
Copied
This can be done using the Pixel Replacement variable and can be fully automated. If you're somewhat familiar with data sets in Photoshop, you can try that option. If not, follow the steps provided by @Stephen_A_Marsh
Copy link to clipboard
Copied
I tested the late JJMack's "BatchOneImageCollage.jsx" script which created the layered files nice and fast using the "Image 1" alpha channel for sizing and positioning:
However, as the script masks to the area defined by the alpha channel mask, the result isn't 100%. When I disable the layer mask to remove the cropping, the design is wider than the intended result indicated by the guides. The script would either need to be modified, or a second pass batch process action or script would need to rework the initial result.
Copy link to clipboard
Copied
Here is the result of an action as I previously described:
For such work, taking the extra time to setup a displacement map in the action to distort the design to the underlying contours adds that extra bit of realism.
The first 4 steps of the action could be removed and would run faster if the clipboard was "primed" with the template image content before running the batch.