How to Create a Photo Collage Effect Action in Photoshop
In this tutorial, I am going to show you how to add a simple photo effect using actions in Adobe Photoshop. First, we'll edit the background and then place the object into a set of shapes. Each step will be recorded into actions which can be used in any photo.
In the end, I will also show you how to automate the actions further by using JavaScript.
There are many photo templates, such as this effect, available on Envato Market.
Looking for more Photoshop collage templates and actions? Check out these recommended resources:
- 25 Best Photoshop Collage TemplatesMelody Nieves08 Nov 2022
- 21 Creative Photo Collage Templates for Adobe PhotoshopMelody Nieves24 Jan 2019
1. Set the Background for the Action
Step 1
First, grab the photo that you want to edit.
Step 2
Let's start creating our action. We want to put it in a separate set for easier management. Open up the Actions panel (F9) and then click the New Set icon. Name the set and then click OK. We will place the action inside this set.
Step 3
Click the New Action icon and name it Mute Background. Click Record to start recording all our steps in Photoshop. From this point on, I urge you to keep an eye on the Actions panel. You don't want to have a messy action that is filled with unnecessary steps.
Step 4
Click the Add Adjustment Layer icon and then select Levels.
Step 5
Drag the black arrow on the Output Levels parameter to the right. By doing this, the image fades out and gives us room to add a special effect to the photo.
Notice that the two things that you've just done have been recorded on the Actions panel. The first action is complete. Hit the Stop icon on the lower part of the Actions panel to stop the recording process.
2. Create the Frame
Step 1
Let's continue with the next step. We are going to add a rectangular shape to the photo and then bring back its original image. In the Actions panel, click the New Action icon to create a new action.
Step 2
Select the Rectangle Tool. Use Shape mode with black as the Fill color.
Click and drag to draw a black rectangular shape.
You should see that Make fill layer is added at the end of the current action.
Step 3
Double-click the layer shape and then set Blend Mode: Screen and Knockout: Deep. When Knockout is set to Deep, the layer will allow us to see through all the layers and reveal the Background layer.
Step 4
Without clicking the OK button, continue adding a Stroke. In this tutorial, we'll use white for the stroke color and set its size to 20 px. If you're using a smaller image, you may need to use a smaller stroke size.
Step 5
We'll continue adding Drop Shadow to the layer shape. You can click and drag inside the canvas to easily modify the shadow setting. Once you are satisfied with the result, hit the OK button.
All the things you've just done—changing the blend mode and adding layer styles—have been recorded as a single step in the action.
Step 6
Hit Control-T to transform the active layer shape. Click and drag outside the shape to rotate the shape. Click and drag inside the shape to change its position. This will also be recorded as a single step at the end of the action.
Step 7
The second action is now complete. Hit the Stop icon to stop the recording.
Step 8
For a faster workflow, let's add a shortcut to each action. Double click the Mute Background action that we made earlier and set Function Key: F2.
Step 9
Add another shortcut to the other action. In this case, I use F3.
3. Apply the Actions
Step 1
Let's run the actions that we have just made on the photo. First, we need to reset the photo to its original state. Click File > Revert or hit F12.
Step 2
In the Actions panel, select the first action, Mute Background, and then click the Play icon. Since we have added the shortcut F2 to this action, we can just hit F2 to run it.
The image is now muted.
Step 3
Play the next action to reveal the shape. Select the action and then hit the Play icon. We could also use its shortcut, in this case F3.
Step 4
To add another shape, we need to replay the action. Currently, the shape will automatically be rotated at the same angle and placed in the same position. Obviously, we don't want that. We want to be able to transform it manually. Click the Modal control icon for the Transform current layer step so that Photoshop will wait for user input.
Step 5
Now, replay the action. Click on the Play icon. Photoshop will pause the transform command and wait for your input. Move or rotate the shape and then hit Enter to continue the action.
Step 6
Replay the action by clicking the Play icon or using its shortcut, F3 in this case.
This is my result after adding other shapes using the same action. We are done with the action, and you can simply use it to add an effect to your photo. But we will continue this tutorial for more advanced customization. Please read on if you want to be able to modify the action or apply it faster using scripting. If you are satisfied with the below result, you can stop reading here.
4. Modify the Action
Step 1
We can apply the same effect to another photo using the same action. You just need to hit F2 to mute the background and then F3 a few times to add some shapes.
Step 2
You can skip a step inside the action by clicking on its Included icon. If there is no Included icon in front of it, the step will not be carried out. Here, we are skipping the Transform current layer step.
Step 3
Let's say we want to use a different color on the shape's stroke. We need to edit the step by selecting it and then click Record Again. You can also double click the step to do this.
Step 4
A Layer Style dialog box will open. In the Stroke section, change the Color to black.
Step 5
Make sure to set its Blend Mode to Screen and Knockout to Deep. Otherwise, Photoshop will use the default settings, Normal and None. Click the OK button to accept the settings and automatically stop the recording.
Step 6
If needed, you can also slow down the playback to review each step. Click Playback Options and then select Step by Step.
Step 7
Play the action to see the result. As you can see below, our shape now has a black stroke.
5. Loop the Action Using JavaScript
Step 1
You might notice that in this photo effect, we repeat the second action manually. In programming language, we call that a loop. We can actually automate this process using scripting in Photoshop. Yes, Photoshop has scripting too. Open up any text editor and then add the following line of code.
1 |
app.doAction("Mute Background", "My Actions"); |
This line will instruct Photoshop to play an action named Mute Background inside the My Actions set.
To run the other action, add this line of code.
1 |
app.doAction("Add Photo Shape", "My Actions"); |
Step 2
Save the text as a JavaScript file with extension *.jsx. In Photoshop, click File > Scripts > Browse and then select the file to test the script.
Step 3
Let's add the loop to the second action by replacing the second line with the following lines of code.
1 |
var repeat = true; |
2 |
while (repeat) { |
3 |
app.doAction("Add Photo Shape", "My Actions"); |
4 |
}
|
These lines will ask Photoshop to keep on playing the action Add Photo Shape from the action set My Actions.
Step 4
Photoshop will keep on playing the action because the repeat
variable is always true
. Next, we need to ask the user whether they want to repeat the action or not. Add the following line of code inside the while
loop.
1 |
repeat = confirm("Add another box?"); |
Step 5
We are done. Let's run it. Click File > Scripts > Browse. In the Load dialog box, select the script we have just made.
Step 6
Both actions will start. After transforming the shape, a dialog box will pop up asking whether the user wants to continue adding another shape or stop right there. If the user answers yes, another shape will be created.
Step 7
If the user selects No, the action will stop.
Conclusion
We are done. I believe you have learned a lot from this tutorial. You have just learned how to automate your work process using Photoshop actions. You have also grasped the basic idea of scripting in Photoshop. I hope you can use these techniques to help you work faster. Thank you for reading.
Looking for more Photoshop collage templates and actions? Check out these recommended resources: