Yep, I’m making up words again. That’s jetlag talking. But through the jetlag I’m going to try and show you how to create a 3d model from a photograph using some new integration we’ve done with Photoshop CS3 Extended and After Effects CS3.
A lot of what we do here at the “factory” is try and take things that would take you hours or even days to do and give you ways to do them in a matter of minutes. Sometimes that takes looking within and seeing what bits of this app could be used to help someone working in that app. The “secret sauce” in this case is something called Vanishing Point Exchange (vpe).
You might be familiar with a feature of Photoshop called Vanishing Point, which is typically used when working with still images to define the perspective of a scene or object. What vpe does is let you take the geometry data generated by Vanishing Point and make use of it in other applications. In Creative Suite 3, you can now export the vpe to After Effects where before your very eyes a 3d scene is automatically created, something that would’ve taken huge buckets of time in the past.
I’m going to be starting with a photo I just snapped here in my SF office:
Thrilling, isn’t it? No, really, we do have a very beautiful office here – it’s just that I wanted to start with something simple for this tutorial – something with good, clear corner perspective.
You need to have Photoshop CS3 Extended to export the vpe, but you can still follow along with the next step, which is to create your planes in Vanishing Point, if you’re using the Standard edition.
With the photo open in Photoshop, select Filter > Vanishing Point. You will start by defining a plane in the photo, and you want to look for the easiest one to define. In my photo, it is the wall on the right side. It’s a matter of clicking on the 4 corners, lining up each edge with the edge of the plane you’re defining, and you’re done. If your plane is red, Photoshop is telling you it can’t get a read on your plane, so try again ‘til you get it (just use the hard edges in your photo as your guide). Once you’ve got a good plane it’ll look like this:
If you look at my cursor, on the right, you can see I am dragging to the right to extend the plane just past the edge of the photo – that’s about where you want to be. You can adjust the first plane after you’ve drawn it, and do take advantage of that capability because it is imperative to get this first plane right. If you don’t the whole rest of this will be messed up.
The second most important thing is to get the second plane right. For this I’ll use the left-hand wall. Create a new plane by holding down Cmd (Mac) / Ctrl (Win) on the left-hand control point on the original plane, and drag a new plane to the left (if your second plane is in a different direction than adjust that instruction accordingly). It is important to add your additional planes in this matter, as the planes need to be connected in order for this to work.
If the plane doesn’t line up right, you’ll need to rotate it. Hover your curser over the same control point you were just using, and hold down Opt (Mac) / Alt (Win) – your curser turns into a little bendy arrow. Use it to adjust the angle of your second plane – a task you can also accomplish in the “Angle” widget at the top of the Vanishing Point UI.
Continue adding and adjusting planes, repeating those steps, until you’ve got your planes all defined. If I weren’t in such a hurry to write this, I would’ve also refined this by adding planes to those brown columns on the left-hand wall, which would add more realism, but you can go ahead and do that on your own time
Here’s what I wound up with:
Now it’s time for that “secret sauce”. Go up to your fly-out menu (that little triangle-in-a-circle that you see in all Adobe apps) and select Export for After Effects CS3 (.vpe)
Create a new folder somewhere on your hard drive, because Photoshop is going to spit out a bunch of .png image files (one for each plane you drew) and a .vpe which holds all the geometry data. Go ahead and save. Then close out of Vanishing Point and save your PSD, you’re done there.
Now, switch over to After Effects CS3 and select File > Import > Vanishing Point (.vpe)
You’ll see a bunch of new stuff in your Project Panel, including a new Composition. Double-click the Composition and you’ll see that AE has built for you a 3D scene based on the vpe. It has arranged all the exported planes (each of them an individual layer in the .png format) in 3d space.
Select your Orbit Camera tool (letter “C” on your keyboard) and rotate your scene to see the 3d glory. I did a quick animation on my camera and got this:
You can also see that there was a bunch of white space where my Vanishing Point planes extended past the edge of my photo. That’s fixed easily by selecting the layer in the AE Project Panel, then selecting Edit > Edit Original which opens that layer in Photoshop.
Then it’s generally time to use the Clone Tool, Healing Brush, or whatever tool suits the need. In my case I used the Clone Tool to “fill in the blanks” (here it is “in progress”).
Here it is, cleaned up a bit (not 100% yet, but with 5 min. in Photoshop I was able to get it 95% of the way there – in 15 more minutes it’ll be perfect).
I want to do a users gallery of this kind of stuff, so please send me comments if you’ve done anything cool with this technique.