Join George Maestri for an in-depth discussion in this video Make a tree component, part of SketchUp: Tips & Tricks.
- [Instructor] Hi, I'm George Meestree, and today we're going to make our own trees, we're going to create a tree component that looks something like this and casts a realistic shadow, and it's pretty simple, so let's go ahead and get started. So the first thing I want to do is just start with a blank file, but before we draw anything we want to take a look at the image we're going to use. So I have this here in Photoshop, and it's basically just a picture of a tree, against a neutral background.
And so we want to get a rectangle that's somewhat close to this aspect ratio, we don't have to be perfect, but we need to get something that's reasonably close. So I'm going to start with a rectangle, and I'm going to go ahead an draw it up, and out, since the tree is vertical. We're going to make this a vertical rectangle. And now we're going to place this tree onto this object. So we're going to do that by doing File, Import, and then in our exercise folders you should see something called "tree.jpeg." And make sure you have texture enabled, and when you do that, go ahead and select Import.
And what I can do is position this on that plane, and click and drag until it's the same size. And now, we have this plane with a tree on it. Now, first thing I want to do is I want to make sure the bottom of my tree is close to the bottom of this, so I'm going to go ahead and just select this one edge here, and I'm going to use my move tool, and drag that edge up along the blue axis, so that it's exactly where we want, and then I'm going to go ahead and drag the whole face down, and there we go.
So now I've got the tree pretty much on the ground. Now I'm going to turn this into a component. Before we do that, just notice how when we orbit the camera we can see this as a plane, and that's not what we want when we want to create a component, so I'm going to go ahead and select this. We're going to do Edit, Make Component, and then there's 2 things we need to do. One is, we need to always face the camera. And when we do that, this will always face where we're going.
So if I do this, you can see that as I orbit my camera, it's always facing me. But the thing is is that it's actually rotating around the wrong axis, we want this to rotate around the bottom of the tree, so I'm going to go ahead and undo this, and we're going to do this a little bit different. So I'm going to go ahead and hit Control Z, and do Undo Make Component, and so now we still have an object, so I'm going to go ahead and double click on it again, and go Edit, Make Component, and I'm going to again turn on always face camera, but I'm also going to press Set Component Axes.
Now the axes are going to determine that axis of rotation. If you could see right now, we've got this little axis here in the corner, and that's where this is rotating. We want to change that. So right now blue is up, red is left and right, and green is pointing back, so we want to match that, but we just want to move that here. We're going to go ahead and press that, and just move that towards the center of the trunk, and then just hit Enter, and notice how this allows you to move this around, so I'm going to go ahead and pull this, and then just left click again, and left click again.
So, again, I want to make sure that the green axis is pointing back, blue is up. Once we do that, we can give this a name, let's call this "tree." And create. So now, I have my magic component. It's rotating around the trunk. And it looks like a tree. Except, well, it's got all this white stuff around it, we don't want that, and if we were to view shadows, you'll see that the shadows are basically just a big block.
So the first thing I want to do is kind of cut out everything that's not a tree. So I can do that by double clicking on the component, selecting the face, and just using my freehand draw tool. So I'm going to go ahead and do, just a freehand, I don't need to be really accurate here, you can, you can get as accurate as you want, but, for the sake of brevity, I'm going to go ahead and keep it pretty simple.
As you can see, I got a little bit of a problem there, but let's go ahead all the way around. We can always touch this up later. And when I do that, I've got a few little mistakes here, but notice how it's still highlighting what's on the inside there, so I'm going to highlight the outside and hit Delete, and as you can see, now, my shadow looks a little bit more like a tree, and I can start to fix this by basically just drawing some more lines here, and erasing some edges, there we go.
And down here I've got all sorts of little problems here, but I can just, again, double click on this, make sure you have the face selected, because you want to draw on the face. Select that, and then just start erasing. And so now I've got that reasonably well, but we also have all of this area in the middle, and that will also cast shadows, so we can, again, just draw more shapes, and delete more area.
So again, freehand tool, draw it as close as you want, and I'm going to draw a couple of these here. There's another one. Another one, so we can just select these. Hit Delete. There we go, so now you can see we're starting to get some of those branches creating shadows. Let's do one more here.
Again, double click on this, make sure you have the face selected. And you want to make sure you close these areas here. And just hit Delete, so there we go. So now, I'm pretty close, but as you can see, we still have a lot of white here. Now, if I really wanted to, I could draw really close to this, and try and get this away, but I'm never going to be perfect on this, because this is just not an accurate way of drawing.
So I can do, somewhat close, but I can't really get it as close as I need to. So, the best way to do this is to actually change the type of image that we use. So, by default I used a jpeg with a white background, and that really was nice, because it allowed me to draw, and create my shadows, and everything, but, if we want transparency, we should use a different file format. So I'm going to hop in Photoshop, show you what I have here.
I have this image, and it's got white all the way around it. But, if we want, we can go into Photoshop, we can duplicate the layer, and then we can just select that white, so I'm going to go ahead and just do a select color range, or I could do magic wand, or really anything like that, and just select that white. And there we go, it selects everything that's white. And because I duplicated the layer, I can get transparency now, so I'm going to go ahead and delete that, turn off that background there, and now you see we've got these little checkerboards there, in fact, I'm going to go ahead and highlight this layer and delete it.
And now, we have transparency, so all we have to do is do a Save As, and in this case we're going to save it as a png file. So we're going to save it as "tree.png," in our exercise files folder. I'm going to use no compression and no interlacing. And now, let's go ahead and load that image into our texture, or our material. So we're going to go into my tray, and on the Mac you want to make sure that you open the Materials window, and go to the actual Materials window, don't use the Color Editor's, because what you want to find is the eye-dropper.
So we're going to hit my little home button, I'm going to eye-dropper this, and there it is, it's the little one that looks like a tree, so I'm going to go ahead and double click on my tree, and now I'm editing it. So, I'm going to scroll down until I find Use Textured Image, it should say "tree.jpeg," let's go ahead and change that to "tree.png." Going to open that up. I get transparency, but I still have one more problem.
I have all these lines. The easiest way to get rid of those is to, again, go into our component, just select everything, and then Shift deselect the face, see how the face is kind of dotted, if you unclick it, and it goes away from dotted, then all you have selected are the edges, and then you can right click over those and say Hide. That hides the edges, and now we've got a very nice tree. So, hopefully this gives you some insight into how to create components that always face the camera, as well as how to clip out the things you don't want.
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.