AECbytes Tips and Tricks Issue
#28 (March 20, 2008)
Using Images with Alpha Transparency as Components in SketchUp
Independent Writer and Consultant
Alpha-transparent images have their background colors defined as transparent. You can mask a background yourself in Photoshop, or search the Internet for some samples. The 3D Warehouse has some models created with alpha images, and Entourage Arts has lovely watercolor people and plants, with several free sample downloads: see http://www.entouragearts.com/downloads.asp.
In this example, I’m using this .png file of a tree. Its white background is defined as transparent.
In SketchUp, alpha images of people and trees are handy to use as 2D “face-me” components. Because they are 2D, the model size is kept low, and the transparent background makes them more realistic. However, shadows can be problematic, as this tutorial will show. But we will also see how this problem can be fixed.
Open SketchUp, and create a simple model of a house.
From the main menu, choose File > Import. Select the tree image, and make sure Use as image is checked on the right side.
Switch to Front view, and bring in the picture by clicking two opposite corners.
Before you can do anything with an image, it must be exploded. So right-click on the picture and choose Explode.
The exploded image is a face with visible edges. We don’t want to see these edges, so select all four of them, right-click on one of them, and choose Hide.
Now select the whole image (you can double-click on it to select both edges and faces), and make it a component.
Make sure Always face camera is checked.
When the component is created, you should be able to orbit to any view and see through the tree’s background.
Now turn on shadows. As you can see, the tree’s shadow is defined by its rectangle, not the tree itself.
To fix this problem, open the component for editing. Use the Line and Arc tools to trace around the tree. You don’t have to follow the tree very closely; a loose outline will do for a shadow. When you create arcs, make sure you see “On Face” constraints, or the arcs might pop out of the image plane!
We need to hide these new edges. The easiest way to do this: double-click on the tree to select its face and edges. Then press Shift and click on the face to deselect it. That leaves only the edges selected, which you can then hide.
The last step is to select the part of the rectangle outside the tree, and delete it.
Now the shadow looks more like a tree shadow!
About the Author
Bonnie Roskes is the author of Google SketchUp 6: Basic and Advanced Exercises, which is her fifth release on SketchUp. Books on Version 7 will be released soon, including one for O’Reilly Media. She has also released a series of SketchUp design project books and geometry project books for kids in K-12, along with some free resources for teachers and parents. Info on these can be found at www.3dvinci.net.
Bonnie has also authored books on Piranesi and OneCNC, as well as reference manuals, user guides, and tutorials for other CAD applications. She has a BS and MS in structural engineering, and worked for several years in bridge design and analysis before moving to tech writing.
Contact firstname.lastname@example.org for info on any of her books.
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
Tricks > Using Images with Alpha Transparency as Components > Printer-friendly