This instructable will show you how to make those nifty 3D virtual-reality "tours," that you see on some web-pages, in Windows, using entirely free software.
If you're not quite sure what I'm talking about, this is a VR panorama from WWU's campus, which I'll be making for an example in this instructable.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Get What You Need.
Here's a list of things you'll need
1) A Digital Camera. I used a Canon EOS20D Digital SLR.
2) A memory card. Prefferably a big one; you'll be taking alot of pictures.
3) A Tripod. Not necessarilly a panoramic tripod. I just used your normal garden-variety tripod.
4) A Windows computer. Possibly the one you're reading this on.
1) Autostitch, a program for stitching together different images into a panorama.
2) The GIMP, an all-purpose image-editing software.
3) PanoCube, a program for actually converting panoramas to Quicktime VRs.
4) PanoTools, more specifically, a file called PTStitcher.exe. It's freeware, but it's getting harder to find Windows binaries of it. Most sites host java Jars.
Install all three programs. Autostitch can just be unzipped to any folder on your Hard drive. GIMP requires you to install the GTK+ Runtime environment, before you can install it. If you don't want to install GIMP, you can use whatever your favourite image-edeiting program is. I'm offering this is a free alternative to commercial image-editors (since this instructable is made to be all free software).
PanoCube is a pretty difficult to use, software, but it's the only one available for Windows that does this. Right now, you'll want to be sure and install PanoCube to a folder directly on the root folder of your Hard drive, in a filepath with no spaces in it (eg: C:\PanoCube is a good choice).
Unzip the files in PanoTools to the same folder.
Step 2: Prepare for Picture-taking
For your VR, you'll probably want to select a nice, outdoor aread, with lots of bright sunlight, and open spaces around you. An area fairly devoid of people or similar moving things is also a good idea. If a person is in a spot in one picture, but gone in another photo of the same location, it can create a "ghosting" effect, when you stitch the Panorama together.
Now, set up your tripod, in some nice, central area, and raise the plate to eye-level, or atleast as high as the tripod will go. Also, on most tripods, there's a number of screws, or other fasteners that you can use to prevent or allow the tripod to turn on different axes. Tighten all of them, except for the one that allows the camera pitch to tilt up and down.
In order to keep the overlap in your pictures as identical as possible, you'll probably want to keep the same photo settings, and focus for each pictures. To get a nice depth of field, set the F-Stop to a reasonably high setting, and adjust the shutter-speed accordingly. You'll want the film exposure at such a level that it will be clear in both the very bright, and very dark areas of your shot. So, try pointing your camera at the darkest and brightest parts of your field of view, and make sure the light-meter isn't off the charts, and/or take a test pictures to make sure everything's visible.
Also, depending on the size of your storage device, you may want to adjust the picture quality to a lower setting. These can require upwards of 100 pictures to do, so make sure you have the storage, and the image-size, to allow that.
Once you've got it how you want it, tighten your camera onto the tripod, and get ready to take a ton of pictures.
Step 3: Take Pictures!
Ok, in order to get all the information for your panorama, you're going to need to take a picture of every single point you can see from the camera's point of view. There's an easy way to do this: through a series of stacks of vertical pictures.
How this works is you start with the camera pointing straight down, and you take a picture, then tilt it up so that there's about 40-50% overlap between the first two pictures. Keep moving it up and taking a picture, until you get the camera pointing straight up. This is a stack of vertical pictures.
After taking your first stack of pictures, loosen the screw on the camera, so that you can rotated the camera horizontally, and do so, about 18%. It's a good idea to look through the viewfinder, when you rotate it, facing the camera at the horizon, to get a good idea of how much overlap there will be, between this stack and the previous one. After it looks good, tighten the screw again, to prevent horizontal rotation, and point the camera straight down, to start another stack.
Keep doing this, until you've rotated all the way around, and you should have all the pictures you need.
During the picture taking, it's important NOT to move your tripod, at all. Taking pictures from even slightly different points of view can mess up the final result.
As you may have noticed, the sample stack has about 10 pictures in it, and if you rotate 18 degrees each time, that'll work out to 10 series, thus 100 pictures. Don't be afraid to take more, though. If you feel like you're missing an area turn the camera towards it and snap another picture. You want to be thorough; it's better to take 5 pictures of the same area, than only 1.
Step 4: AutoStitch
Load all the photos onto your computer.
Next, open up Autostitch. You may have read my previous instructable, about making panoramas. After I wrote that instructable out, someone posted a comment, linking to a program that does it all automatically, Autostitch. So, that's what we'll be using in this tutorial, instead of autopano-sift and Hugin.
Autostitch is remarkably easy to use. It basically creates a panorama automatically, as soon as you open the picture files. First, though, we'll want to take a look at the options.
There's a bunch of different settings, here, but there's really only 2 you need to mess with: output size, and image rotation.
Right now, I reccomend that you leave the output size at something low, around 1400X700 pixels. The higher you set it, the long it takes to process. If you decide you really like how it turns out, you can come back and make a larger panorama.
Image rotation: If you were weird, and fixed the camera to the tripod, so that it was sideways, then click "Clockwise," or "Anticlocckwise," depending on how you did it. Otherwise, leave it at "none."
Click OK, to close the options.
Them, go to File>Open, browse to the folder your pictures are in, and open them all. Use Shift-click to select all the pictures you're using at once, and then click open. Autostitch will work for awhile, and then produce your panoramic image, which it calls pano.jpg, and palces in the same folder as your pictures.
Now, it's time to move in to the next step.
Step 5: GIMPing (Optional)
Open up your newly created pano.jpg, and look at the file dimmensions. The width should be exactly twice the height. (EXACTLY!) If it's not, you can use the GIMP to fix it. As well as some other problems that might arize. I wont go into too much detail, for the GIMP stuff, but I'll give you some general info, on problems.
If the image is less than half as tall as it is wide, you'll need to heighten it. DON'T stretch the image. It'll look weird, in the final version. What you want to do is, however many pixels are missing from the top, copy that many pixels from the top of the information that is there, paste it, flip it vertically, and afix it to the top. It might look weird, if you look straight up in your VR, but atleast it wont look weird just looking around.
If you get an uneven black area at the top of bottom, you could try to edit this away, and replace it with what tou think should go there, but I found this to be a near impossible task, so good luck.
I reccomend just taking the picture again.
If you want, mess with the colour levels, brightness, contrast, etc., etc., now is the time to do it.
Step 6: PanoCube
Grab PTStitcher.exe, and drag it into PanoCube.exe, so PanoCube will know where it is. You only need to do this once.
PanoCube doesn't have a GUI, but it's settings are in a file called Script.txt. It's contents look like this:
#### COMPRESSION RATIO ####85 # This is JPEG quality. Valid values from 1(worst quality, smalest size) # to 100 (best quality, largest size). Default (without this script) is 90. #### QT VIEWER WINDOW SIZE ####360 # Viewer window width. Valid values up to 800 pixels. Default is 360.240 # Viewer window height. Valid values up to 600 pixels. Default is 240. #### INITIAL VIEW ####0 # Initial pan angle. Valid values between -180 to +180 degrees. Deafault is 0. 0 # Initial tilt angle. Valid values between -90 to +90 degrees. Default is 0.70 # Initial field of view. Valid values from 5 to 140 degrees. Default is 70 # All three numbers from above may be found with PTViewer. Pan your panorama to # the desired initial view and press "v". From the status bar you could read now # pan, tilt and fov values. #### VIEW LIMITS FOR PARTIAL PANORAMAS ####-180 # Min pan angle. Default is -180.180 # Max pan angle. Default is 180. -90 # Min pitch angle. Default is -90.90 # Max pitch angle. Default is 90.10 # Max zoom in. Default is 5. You could also set this value to -1, -2, -3 or -4 then # program calculates values for 1x1, 2x1, 3x1 or 4x1 magnify ratio. You can get # error message here if you whant to use small panorama in big window. 120 # Max zoom out. Default is 120. # Six numbers above you need to change only if you wanna to get partial panorama. #### HTML CODE TO EMBED YOUR MOVIE ####1 # Generate html. 1 = Yes, 0 = No. You could use generated html code to embed # your movie in to a page. Default is 0.# You could also use the program without this script - then default values will be used.# To use the script you need to move it to the source images folder.
This will tell you how your movie will be outputted. Notice the viewing size of 360 by 240. This is the size my example is in. You can set it higher, if you want a bigger final result, though.
Incidentally, you can rename your panorama to anything you want, and now would be a good time to do it. Say that you rename the picture "myawesomepanorama.jpg," for example.
Now, you should just take your pano.jpeg, and drag it into PanoCUBE.exe. If it tells you something like "Bad JPEG Structure" or "No Pano Found," then check to make sure that your JPEG's dimmensions are at a 1:2 ration. If you don't get this error, then PanoCUBE should think for awhile, then create two files: myawesomepanorama.mov, and myawesomepanorama.htm. Open up the htm document, and as long as you have the QT plugin on your browser, TA-DA! You have yourself a brand-spanking new virtual reality panorama.
You can view the movie through the htm file, as long as you have the .mov and the.htm file in the same folder. Go ahead, and put them both in your web-host of choice, and share it with your friends and family.
Here's my final product, again: http://home.graffiti.net/kabukistar/OLDMAINLAWN.htm