Join David Andrade for an in-depth discussion in this video Projections in camera, part of Blender: Tips, Tricks, & Techniques.
- Have you ever wanted to take an image and just project it onto an object? Well, in Blender, there's a new add-on called UV Project that makes it super simple for you to take any kind of image and project it onto backgrounds, onto monkeys, onto cubes, and in this week's Blenders Tips, Tricks, & Techniques, I'm going to show you just how to use it. Now, let's pick something more complicated, so I'm going to add a monkey. So, Shift-A, add a monkey. Let's go to cycles, let's open this up a little bit, and let's make a few things.
First, let's make an image texture. So, New, New. We're going to call it Color. We're going to go to Color Grid. Let's go make a new material. Click over here. Image Texture. Color. And finally, this object, although we're going to overwrite them, needs a UVMAP. So we can just go to Object Data and click on Add A UVMap, or we can go into Tab, for edit mode, U, Smart Unwrap, and there you go.
You have a UVMAP. Okay, great. Now, let's go to the modifiers panel. Add a modifier. UVProject. Our image is going to be Color, UVMap is just going to be UVMap, and Projector, well Projector can be anything. In fact, I'm going to quickly make... Shift-A, a simple little empty. I'm going to come back here and I'm going to say Empty.
Now if you go in material mode, you're probably like, "Eh, I don't see anything really different." But if you click on Override Image, and move the empty around, suddenly everything changes. Now, here's the cool thing: you can go to View, Camera, look from the camera, and project from Camera right onto this monkey. Take a look at that. Isn't that pretty cool? Now, there's a couple little caveats about this.
Obviously, the biggest one is if I move the camera, this will move with it, so how do we fix that? Well, there's one way involving baking. The second thing is this will completely wreck your UVs and, on top of that, I've noticed that you probably want to subdivide this monkey a little bit more. Now there's a few ways you can do this. The simplest, of course, is Subdivision Surface. It doesn't matter. You can even use Simple if it's a hard-edged object.
But I highly recommend you do subdivide the object that you're projecting on. Blender just seems to hold onto the image itself a little bit better. Okay, so I'm going to leave this on Catmull-Clark. I'm going to come over here and we're going to bake this right onto our monkey. So let's do that. First, in the node editor, I want you to hit Shift-A, and add an image texture. Okay, now we need a new image texture really quick, so let's just pull this up.
Image Texture, New. We're going to call this one Baked. It can be any size, but I'm going to leave it at one-oh-24, and make sure it's on Blank. Click OK. Now we can close this off for now. In this new image texture you'll see this little icon. Click on it and make sure it's on Baked. And I'm going to show you why here in a second. Now what we need to do is bake our texture and our UVs back onto this monkey, so that if we move the camera, the monkey doesn't move with it.
Okay, so now, let's go the render panel here. You can leave all of this alone for right now, but let's go down to Bake, and we want to switch our Bake type to Diffuse because if we just want the color... In fact, you should un-check-mark all of those. Just make sure that Color is on. And finally, just click Bake. Now at first you're probably wondering what happened. But if you open this up again, and switch it to Image Editor, picked on Baked, you can see exactly what happened: our monkey had his textures baked right onto him.
Now what about these UVs? I thought these UVs were all over the place. Well, if you come up to the modifiers panel and click Apply, then hit Tab, you'll see that the UVs from the modifier are applied right onto this monkey. And because we went ahead and used Bake, it's going to bake exactly what it sees from the Camera view. Now of course if I made this image a little bit bigger, we could see more resolution, but you get the rough idea. Here's an important note: you need to click on Image and save this image.
Don't save it within the actual Blend file or try to pack it. First, actually save it out. Now if you really want to, you can save it out, and then re-open it here, or edit it in another program, but you must save it because Blender will forget that this exists. Okay, so now if I come over here, slide this over a little bit, I can come up to this color grid, pick Baked, there we are. I can hit N, Lock Camera, make sure that I don't have the projection modifier cause we've applied it, and I'm going to move around, and my monkey has had his texture baked right onto him.
Now you're probably asking yourself, "Well, why would I do this complicated process?" Well, think about it. Now you can add a few image planes, and put anything that you want on there, bake it, and then you can break up your whole image into multiple planes and fly through them. Camera projections are really nifty tools. As I said earlier, you can do anything with them. Maybe you can build a whole background and use a photograph that you've taken, and then project it right onto all of those planes, and you could fly it through them.
Or maybe you could use it as a background for your CG characters, like Suzanne. I recommend you keep playing with the modifier and see what other interesting things you can come up with, but I have to remind you, please apply a subdivision, even if it's a simple subdivision, on anything that you project onto. If not, Blender will tear the image a little bit. It's kind of a weird little bug, but it's just something to be aware about. Until next time, this is David from Blender's Tips, Tricks, & Techniques.
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.