Smart Objects Guide
Deep dive into how SudoMock handles Photoshop smart objects. Learn about asset placement, transformations, and adjustments.
What Are Smart Objects?
Smart objects in Photoshop are containers that hold image data. They're non-destructive, meaning you can transform, scale, and edit them without losing quality. In mockup templates, smart objects define where your designs will be placed.
When you upload a PSD, SudoMock:
- Finds all smart object layers
- Extracts their position, size, and transforms
- Generates a unique UUID for each
- Creates thumbnails showing the smart object location
Anatomy of a Smart Object
1// Smart object data from upload response2{3 "uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",4 "name": "Front Design",5 "layer_name": "Smart Object 1",6 "size": {7 "width": 3000, // Content dimensions8 "height": 34139 },10 "position": {11 "x": 450, // Position in mockup12 "y": 380,13 "width": 1200, // Displayed size (after transforms)14 "height": 140015 },16 "quad": [ // 4-point perspective (if transformed)17 [450, 380], // Top-left18 [1650, 380], // Top-right19 [1650, 1780], // Bottom-right20 [450, 1780] // Bottom-left21 ],22 "blend_mode": "multiply",23 "required": true24}Size vs Position
size = Original smart object content dimensions
position = Where it appears in the mockup (may be scaled/transformed)
Quad Coordinates
For perspective-transformed smart objects, quad contains the four corner points for precise placement.
Asset Placement
When rendering, you provide an asset (your design) for each smart object:
1{2 "smart_objects": [3 {4 "uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",5 "asset": {6 "url": "https://your-cdn.com/design.png",7 "fit": "cover",8 "rotate": 0,9 "size": {10 "width": 2000,11 "height": 200012 },13 "position": {14 "top": 0,15 "left": 016 }17 }18 }19 ]20}Fit Modes
The fit parameter controls how your design fills the smart object area:
fill
Stretches the design to exactly match the smart object dimensions. May distort if aspect ratios differ.
Best for: Exact size matches
contain
Scales to fit entirely within the area while maintaining aspect ratio. May leave empty space.
Best for: Logos, icons
cover
Scales to cover the entire area while maintaining aspect ratio. May crop edges.
Best for: Most mockups ✓
Recommended
cover for most product mockups. It ensures the smart object area is completely filled without distortion.Custom Positioning
Override the default position with custom values:
1{2 "asset": {3 "url": "https://your-cdn.com/design.png",4 "fit": "contain",5 "size": {6 "width": 1500, // Custom width7 "height": 1500 // Custom height8 },9 "position": {10 "top": 100, // Offset from top11 "left": 200 // Offset from left12 }13 }14}Rotation
Rotate the design within the smart object:
1{2 "asset": {3 "url": "https://your-cdn.com/design.png",4 "rotate": 45 // Degrees (-360 to 360)5 }6}Color Overlays
Apply a color overlay to the design for color variations:
1{2 "smart_objects": [3 {4 "uuid": "...",5 "asset": { "url": "..." },6 "color": {7 "hex": "#FF5733",8 "blending_mode": "multiply"9 }10 }11 ]12}Available Blend Modes
Multiply for Dark Products
multiply blend mode for dark-colored products (black t-shirts, etc.) to create realistic ink appearance.Adjustment Layers
Fine-tune your design with adjustment parameters:
1{2 "smart_objects": [3 {4 "uuid": "...",5 "asset": { "url": "..." },6 "adjustment_layers": {7 "brightness": 10, // -150 to 1508 "contrast": 5, // -100 to 1009 "saturation": 0, // -100 to 10010 "vibrance": 0, // -100 to 10011 "opacity": 100, // 0 to 10012 "blur": 0 // 0 to 10013 }14 }15 ]16}| Parameter | Range | Default | Effect |
|---|---|---|---|
| brightness | -150 to 150 | 0 | Lighten/darken overall |
| contrast | -100 to 100 | 0 | Difference between light/dark |
| saturation | -100 to 100 | 0 | Color intensity |
| vibrance | -100 to 100 | 0 | Selective saturation boost |
| opacity | 0 to 100 | 100 | Transparency |
| blur | 0 to 100 | 0 | Gaussian blur amount |
Print Area Presets
Some smart objects have predefined print area presets—common sizes and positions for different use cases:
1// From upload response2{3 "smart_objects": [{4 "uuid": "...",5 "print_area_presets": [6 {7 "uuid": "preset-full",8 "name": "Full Coverage",9 "size": { "width": 3000, "height": 3413 },10 "position": { "x": 0, "y": 0, "width": 3000, "height": 3413 }11 },12 {13 "uuid": "preset-center",14 "name": "Center Logo",15 "size": { "width": 1000, "height": 1000 },16 "position": { "x": 1000, "y": 1200, "width": 1000, "height": 1000 }17 }18 ]19 }]20}Ready to Start?
Prepare your PSD or jump into the API reference.