Sub topic 3
Creating the placeholder smart object
This chapter assumes you can navigate Photoshop's panels and menus, work with layers, groups and masks, and know the difference between raster pixels and vector shapes. It also assumes you have read the earlier chapters on smart object fundamentals and mockup anatomy. Here you will turn a flat area of a scene into a placeholder smart object that later chapters edit, fit, replace and script.
What the placeholder does
A placeholder is a smart object layer whose only job is to hold swappable artwork. The scene around it (the product photo, shadows, highlights and masks) stays untouched. When you change the placeholder's contents, Photoshop re-renders them through every transform and effect stored on the layer.
A good placeholder has three properties:
- It has a clear name, such as
Artwork, because scripts and teammates find it by name. - It sits at a predictable place in the layer stack, ideally at the top level or in a clearly named group.
- Its internal canvas has the correct proportions and resolution for the surface it represents.
Choosing a starting point
You can create a placeholder from three kinds of source. The choice affects how much work follows.
| Starting point | Best for | Watch out for |
|---|---|---|
| A new blank layer filled with a flat color | Most mockups. You control the size exactly. | The fill is raster, so it cannot be edited as a shape once converted. |
| A shape layer (rectangle, rounded rectangle) | Screens, posters, cards with crisp edges or rounded corners. | Convert it to a smart object, or Photoshop keeps it as a live shape instead. |
| An existing photo region | Replacing a printed design already in the photo. | You must cut out the region first and fix its perspective later. |
For a flat product such as a poster, a shape layer is the cleanest option. For an object with a printed surface, such as a mug or a box, start from a simple rectangle and let the Distort, Perspective and Warp steps in a later chapter bend it into place.
Step-by-step: converting a layer
- Open your scene document. Make sure it is in RGB color mode, 8 bits per channel, with the same color profile as the artwork you plan to use. Chapter 11 covers this in detail.
- Create the layer that will become the placeholder. For a poster, draw a rectangle with the Rectangle tool (U) and give it a flat mid-gray fill.
- Size the layer. Use the Properties panel to type exact width and height values. The proportions should match your final artwork, for example 3000 × 4000 px for a 3:4 poster.
- Rename the layer to
Artworkby double-clicking its name in the Layers panel. - Right-click the layer and choose Convert to Smart Object. You can also use Layer > Smart Objects > Convert to Smart Object.
- Check the thumbnail. A small page icon in the corner of the layer thumbnail means the conversion worked.
Why the internal canvas matters
When you convert a layer, Photoshop creates a hidden document inside the layer. Its canvas is sized to the pixels of the converted layer. Later, when you replace the contents, the new artwork is placed on this internal canvas. If the internal canvas has the wrong proportions, your artwork will not fill the surface correctly.
Consider two cases. If you convert a layer that is 1200 × 1200 px but the surface is a 3:4 poster, the artwork will be squeezed or cropped. If you convert a layer that is 3000 × 4000 px, a 3:4 artwork fits exactly.
You can inspect the internal canvas at any time. Double-click the smart object thumbnail. Photoshop opens a new tab with a .psb extension in its title. Check Image > Canvas Size in that tab to confirm the dimensions.
Preparing the internal document
Opening the contents on a fresh placeholder shows a flat gray rectangle. Many mockup authors leave helpful guides here. Consider these additions:
- A text layer reading "Place your design here" with the target dimensions.
- Guides at the safe margin, such as 5 percent inside each edge.
- A bleed area outside the visible region if the product wraps around an edge.
Save and close the tab (Ctrl+S or Cmd+S, then close). The scene updates immediately. The helper layers are replaced when a user swaps in real artwork.
Placing the smart object in the layer stack
Position matters because blend modes, masks and filters apply in stack order. A typical arrangement from bottom to top looks like this:
- Background photo of the product or scene.
- The
Artworksmart object, with its transform and a layer mask for rounded corners or edges. - A shadow layer set to Multiply.
- A highlight layer set to Screen or Soft Light.
Place the placeholder inside a group named Mockup if the document has many layers. Name the group and the layer clearly. A script that looks for Artwork at the top level will not find it inside a group unless it searches that group's layers collection.
Applying a mask before or after conversion
If the artwork needs rounded corners or a cutout, use a layer mask on the smart object layer, not inside the smart object. A mask on the outer layer survives every replacement. A mask inside the contents document would be discarded the next time you replace contents.
To add the mask:
- Select the
Artworklayer. - Click the Add Layer Mask button at the bottom of the Layers panel.
- Paint black on the mask where the surface should be hidden, or use a vector mask drawn with the Pen tool for crisp edges.
A vector mask is the better choice for sharp edges because it stays resolution independent.
Common mistakes at this stage
- Converting a rasterized text or shape group without flattening intent. If you select several layers and convert, they all become one smart object with the layers inside. That is useful for a printed label with text and a logo, but unwanted if you only meant one flat region.
- Leaving the default name. Photoshop names a converted layer after the original layer, such as
Rectangle 1. Scripts and teammates cannot tell which of several smart objects is the placeholder. - Converting at the wrong size. Scaling the placeholder after conversion is fine, but changing its proportions with Free Transform distorts the artwork later. Set the proportions first, and put perspective changes in a separate step.
- Mismatched color mode. A scene in sRGB with a placeholder prepared in another profile shows color shifts after replacement.
Verifying your placeholder
Before moving on, run this checklist:
- The layer shows the smart object badge in its thumbnail.
- The layer name is
Artwork(or your chosen consistent name). - Double-clicking opens a
.psbtab with the right canvas size. - Closing and saving the tab updates the scene without errors.
- Right-click shows Replace Contents... in the menu.
If all five checks pass, the placeholder is ready for the sizing and replacement steps in the next chapters.
Exercise
You converted a 1200 × 1200 px layer into a smart object, but the poster surface in your scene has a 3:4 aspect ratio. A teammate's 3:4 artwork looks squeezed after replacement. What is the cause, and how do you fix it without rebuilding the whole scene?
Show answer
The placeholder's internal canvas is square, so it does not match the 3:4 surface and the replacement artwork is fitted to the wrong proportions. Double-click the smart object to open the .psb, use Image > Canvas Size to set a 3:4 canvas such as 3000 × 4000 px, fill it, then save and close. If the outer layer was stretched to compensate, reset its transform and refit it to the surface with Distort or Perspective. The scene's masks, shadows and highlights stay in place.
Exercise
A script that selects the layer named "Artwork" with doc.layers.getByName("Artwork") reports an error, although the layer exists. Give the most likely cause and the fix.
Show answer
The layer is probably inside a group, and doc.layers only lists top-level layers. Either move the layer to the top level, or look it up through the group's layers collection, for example doc.layerSets.getByName("Mockup").layers.getByName("Artwork").