AECBytes Architecture Engineering Construction Newsletters  

AECbytes Tips and Tricks Issue #18 (May 30, 2007)

Perspective Matching in Photoshop CS3 Extended

Scott Onstott
Book & Video Author

Adobe unveiled its Creative Suite 3 this month and with it comes a much-improved "Photoshop Family," whose members include: Photoshop Album Starter Edition (baby), Photoshop Elements (the kid), Photoshop (mama), and Photoshop Extended (big daddy). These range in price from free to US$999. Photoshop Extended has some great new features for us in AEC, including 3D layers and Enhanced Vanishing Point. In this issue, I'll show you how 3D layers alone make Photoshop Extended worth the extra upgrade.

3D layers allow you to manipulate geometry and edit its dependent texture maps very conveniently inside Photoshop. This feature makes it easy to integrate a 3D model of a virtual building with 2D photographic imagery of its real-world site. The integration of real with virtual is known as perspective matching.

In this tutorial, I will begin in SketchUp 6 Pro with a 3D model (download the sample files here). You can use almost any 3D program to make your model and export it to an exchange format. This simple model has two materials with texture maps assigned to the geometry—siding and roofing. The clerestory windows and door are flat colors.

In SketchUp Pro, choose File > Export > 3D Model. In the Export Model dialog box, open the Export Type drop down and select Collada (*.dae). Collada is the hot new digital asset exchange format that's built for the future (exporter available for 3ds Max). Note that many other legacy and proprietary 3D formats are also available for export in SketchUp Pro.

Click the Options button and make sure that Export Texture Maps is checked. Navigate to a memorable folder (such as the desktop), name the file Villa.dae, and click the Export button. Notice that a Villa subfolder was automatically created on your hard drive—it contains the exported 3D model's texture maps (in this case two .jpg files). You may now quit SketchUp Pro.

Launch Photoshop CS3 Extended and open the SitePhoto.jpg sample file. This particular photo was taken in Tuscany, where I like to imagine this tutorial's hypothetical building site to exist (at the top of the hill). Immediately resave the image as PerspectiveMatching.psd. Hold down the Alt key and double click the background layer in the Layers palette to convert it to a regular layer. Rename Layer 0 to Site Photo.

site photo

Choose Layer > 3D Layers > New Layer from 3D File. Open the Files of Type drop down and select Collada (*.DAE). Your 3D program must export to one of the formats shown in this drop down if you are to get it into Photoshop. Navigate to the desktop and select the Villa.dae file you had saved earlier.

import

Click the Open button. After a few moments, you'll see a Rendering progress bar and when it's done the 3D layer will appear in the document window. Notice the layer thumbnail has a little cube icon indicating that it is a 3D layer. Also, the two texture maps appear as dependents underneath the layer, almost as if they were layer styles. In fact, each texture acts like a smart object—you'll read more on that later.

3d layer imported

Double click the Villa layer thumbnail to "open" the 3D layer for editing. The Options bar then displays tools for 3D navigation:

options bar

Make the building smaller by dragging the Slide tool upward in the document window. Rotate and Roll the building to match the perspective of the site photo. It's not an exact science—just make it look right. Drag the building down and anchor it to the earth. Click the Commit button at the extreme right side of the Options bar when you're happy with the building's location on site. The building will now be treated as 2D pixels, but you can always reopen the 3D layer for editing, should you wish to reposition or reorient it with respect to the site photo.

navigating 3d layer

At this point I have to say that the building is too dark. Thankfully, there's no need to worry about complex materials, photometric lights, and rendering parameters in Photoshop (like you do in most 3D software). Let's make some quick adjustments, Photoshop style.

Add a Brightness/Contrast adjustment layer by clicking the middle icon at the bottom of the Layers palette. Drag the brightness slider up to +100% to make the very dark building look brighter. Click OK to close the Brightness/Contrast dialog box.

clipped adj layer

Unfortunately the adjustment layer has brightened the Site Photo Layer too, making the site appear way too bright. No problem, create a clipping mask so that the adjustment layer affects the Villa layer alone.

Hold down the Alt key and move the cursor in between the Brightness/Contrast adjustment layer and the Villa 3D layer. You'll see the cursor change to the clipping mask icon. Click with the clipping mask cursor and the adjustment layer gets indented with a downward facing arrow—now it adjusts the Villa layer only.

Since the Villa layer is on top of the Site Photo layer, the virtual building completely obscures the real site. Some of the real site should show in front of the building. In particular, there are some trees and shrubs in the Site Photo layer that I'd like to reveal. This is easily accomplished with a layer mask. Target the Villa layer and click the Layer Mask icon (third from the left at the bottom of the Layers palette). A new thumbnail appears to the right of the Villa's 3D layer icon. A link icon appears between the layer and its mask.

Target the Villa layer mask and press D to set the default colors, and then press X to swap black into the foreground. Select the paintbrush tool by pressing B. Change the brush size by pressing the left and right square bracket keys repeatedly. Change the brush hardness by holding Shift and pressing these keys. Select a small soft brush. Paint away portions of the building to reveal the site. This is done by painting in black on the Villa layer's mask.

mask

There is a cypress tree that pokes up above the roof that I'd like to cut down—I'll consider this to be on the building footprint. This tree is on the Site Photo layer so painting on the Villa layer mask isn't going to work. Target the Site Photo layer. Select the Clone Stamp tool by pressing S. Hold down the Alt key and click somewhere close to but just above the roof in the blue sky. This is the area you will be cloning. Click multiple times on the offending tree to stamp it out.

Let's say that you're not happy with the siding color. Now you can easily experiment with siding color options in the context of the actual site. Double click the Cladding_Siding_Tan texture nested below the Villa 3D layer. Much like a smart layer, the texture map that originated in SketchUp opens in the form of a temporary .psb file. You have access to this file's layers, which right now shows only a Background layer.

texture

Add a Hue/Saturation adjustment layer. Set the Hue to +34 and the Saturation to -40 and click OK to close the Hue/Saturation dialog box. Click the texture's close box and choose Yes when prompted to save the texture file. The siding color updates in the PerspectiveMatching.psd file. Adjusting textures couldn't be any easier.

The last thing I'll do is show you how a layer style can be used to shade the building. Target the Villa 3D layer and click the Effects button (second icon from the left at the bottom of the Layers palette). Choose Gradient Overlay from the pop-up menu and the Layer Style dialog box appears.

gradient

Choose a black and white gradient if it's not already selected. Change Style to Linear, Angle to 33 degrees, Scale to 150%, Blend Mode to Multiply, and Opacity to 33%. Drag the gradient to the left in the document window so only the left side of the building appears darker. Click OK.

layers

final

Notice how the Layers palette now organizes a great deal of information. In summary, the adjustment layer was clipped to affect only the Villa layer. The Villa layer is 3D and can be opened for navigation by double-clicking its thumbnail.

The Villa layer mask hides portions of the 3D building. The Site Photo layer was cloned and stamped to hide any unwanted content upon integration with the virtual model. Effects and textures are nested under the Villa layer and can be easily edited by double-clicking on the appropriate row. Textures are smart and can each contain adjustment layers—remember these are not visible in the main document Layer palette.

This brings me to the end of this tutorial—I hope you enjoy 3d layers in Photoshop CS3 Extended as much as I do. A video showing this technique is available on my video podcast, The Digital Architect.


About the Author

Scott Onstott is a book and video author of AEC software tutorials. He has a degree in architecture from UC Berkeley and has served as an instructor there, in addition to working in several prominent engineering, architecture, and interiors firms in San Francisco. He has also worked as a technical editor and technology consultant.

Scott has contributed to over two dozen books and videos on AutoCAD, Architectural Desktop, VIZ Render, Revit, 3ds Max, VIZ, Photoshop, Illustrator, Painter, Fireworks, and Dreamweaver. He most recently co-authored AutoCAD:_Professional_Tips_and_Tricks with Lynn Allen. He can be reached via: www.ScottOnstott.com.


If you found this article useful and have not yet subscribed to AECbytes, please consider doing so. Subscription is free, and more subscribers will allow this publication to provide more of such content to you.

Tips & Tricks > Perspective Matching in Photoshop CS3 Extended > Printer-friendly format

 
© 2003-2009 Lachmi Khemlani, AECbytes. All rights reserved.
Site design by Vitalect, Inc