Tuesday, February 21, 2012

Creating a 3D Package Mock-up in Photoshop CS5 [Tutorial]

Sometimes when designing packages, it becomes necessary to build a mock-up, that is, a same that represents the final product. This could be either physical or digital and this tutorial will explain how to create a digital mock-up of your package in Photoshop CS5 using the 3D Repousee feature found only in the Extended version. The only other alternative method I could find for doing this was through third-party payed plugins and fake "distort-mapping" shapes onto a box.

Here is the final product created in Photoshop.

This tutorial will skip through the package designing aspect. I'll assume the box is already designed as it will print and assemble. To start, here is the PET box I designed, laid out flat and disassembled.
This won't be of much use to Photoshop since the next step requires taking out the exact sides from the box. If you have the source file, this will be easier.

In Illustrator, where the box was designed, I can choose to export the sides I need. We'll need the left, right, top, and bottom sides. Those are all on the left side. You'll also need the back, obviously. Illustrator actually has slices so you can go in and precisely cut out those sections.

The slices should be set up perfectly to ensure the best result. When you've cut all the important parts, switch to the Slice Selection Tool. Start Shift-clicking the front, back, top, bottom, and side parts. Selected parts turn blue.

Make sure you've got these parts selected. Export the slices by going to File > Save Selected Slices. This will save the slices to an images folder you selected.

Now in Photoshop, create a new document. Since this package is measured in inches, i would be better if the new document size could contain those inches without sizing. That is why I'm choosing 11x17 inches. Resolution can be 72 since this doesn't have to be very high-res.

Select the Rectangle Tool (U). Click the arrow beside the custom shape icon.

Here, a fixed size can be set. The PET box's face measures 4 inches by 7.5 inches. Type 4in for width and 7.5in for This takes care of 2 of the 3 measurements required. Place the box anywhere on the canvas. You can still color the box. Since the majority of the box is white, make the rectangle white to cover up any potential problems more easily.

With the shape layer selected, pop open the 3D Repousee panel. Choose 3D Repousee Object with source at Selected Layer.

Click Create and a new window should open with the shape in 3D! By default, you should be able to turn the shape around in this window. Here is where you'll see the first problem.

That is not the correct depth of the box. By default, Photoshop takes the width and makes it the depth. There is also no input field that allows any form of units. The only way to get a relatively accurate depth is to use this formula.

Side's width / face's width

So on this box, I would divide 0.75 by 4. This is 0.1875. Under Depth, type in .1875. Now the box's depth should appear more accurate.

That's looking great so far. Also while on the Repousee window, click on the Texture method and switch it to Fill. Now click OK.

The 3D Repousee panel should now show the materials on the shape. These will be textured to give the box its final appearance.

Pay attention to Front Inflation, Extrusion Material, and Back Inflation. These will be the front, side, and back faces respectively. Also make sure to rotate and move the shape only with the Mesh Tools like the one selected in the picture.

Now since the front face is already selected, click on the icon next to Diffuse. Select Load Texture and find the correct image.

When the texture loads, you'll notice this.

The texturing is all wrong. This has a simple solution and all you have to do is go back to the drop menu from where you loaded the texture, and this time choose Edit Properties.

The numbers are all different, so put 1,1,0,0 in the different fields. It should update and look correct by the last 0.

Now turn the box around so the back can be seen. In the 3D panel, select Back Inflation. Just like before, load the proper texture and enter the same Texture Property values as before. However, this time the texture is flipped incorrectly. Back in the drop menu, choose Open Texture. This opens the texture for editing. Go to Image > Image Rotation > Flip Canvas Horizontal. Save and Close that document (Ctrl+S, Ctrl+W) when you're done. The texture should appear correctly on the back.

Now here is the bigger problem: the sides. All 4 sides must be textured with one single texture, so the exported slices form earlier must be combined in a certain order. Make a new Photoshop document (Ctrl+N) and make it more than enough to contain the width of all the side parts and because it will make the next step faster. 2000x1000 is enough for this example. Back in the folder with the images, select the following images: bottom, left side, top, right side. Drag and drop them into Photoshop.

This step is very important so make sure you follow the directions exactly. The files will be placed in scale mode, so make sure there is no scaling and they're at 100%. Also make sure you have Smart Guides enabled to align the pieces together precisely. On the left and right side textures (the vertical textures), rotate them 90 degrees counterclockwise. This should create a texture strip. Arrange the texture strip in the following order: bottom, left side, top, right side.

It should look something like this by now. When you've gotten this far, Trim it (Image > Trim), letting it cut out transparent pixels. Finally, go to Image > Image Rotation > Flip Vertical for the final rotation. Save this image and place it in the folder with the other images.
Quick Fix: Both side textures should actually look the same at this step.

Back to the 3D render, select Extrusion Materials from the 3D panel. Load the newly-created texture via Load Texture. And it doesn't texture properly.

This is the biggest problem of the entire process because in the 3D Repousee window, the texture actually renders correctly (besides the vertical flip which is part of the solution) and outside of that, it renders completely differently.

So until this gets fixed or I find out what I'm doing wrong, the next step should solve that. Open the texture through Diffuse's drop menu. Go to Image > Canvas Size. On Anchor, click the top arrow. For height, the following formula seems to work*:

Pixel Height / Extrusion Amount + Pixel Height

On this box, it would be 54 divided by 0.187 and + 54. I get about 342 pixels. Enter that as thew new height and check up on the 3D box. I got this.

And that's close enough, unfortunately. Make sure it fits perfectly. The Texture Properties window can further refine some minor imperfections.

Fortunately, that's the last step! You can reposition the box in any number of ways and ray trace a great looking final render with a realistic shadow.

The final image once again.

And some other shots.

You can download the source files. It includes the textures used and the PSD file for this project. You'll need Photoshop CS5 and higher to open.

Update: * Since the texturing formula doesn't always work, try this for more consistent results. Take the sides texture and arrange it as correctly described. Make the document's height the same as width, so there is much more blank space below. Back in the 3D model, go to "Edit Properties" for the texture and play around with V Scale and V Offset. One of the multiples of 25 should get the texture to appear with no distortion. Sometimes V Offset is needed to align it properly, but it will also be a number related to the Scale value.

This tutorial can also be found on the following sites:
Good Tutorials

Please don't repost this without letting me know first. Contact me at megarockexe@inbox.com for related topics.


Anonymous said...

I would give a 10/10, but there doesn't seem to be a voting system.

Tayo said...

Why isn't this real??? I'd buy that in an instant.

Black Ace said...

Dude... the tech is wayyy too advanced (or it seems...)

Unknown said...

thanks to teach...

Anonymous said...

COOOOOL! When I make one of these I'll take this as a box.

Post a Comment