In a previous post I showed how to create a big panorama image, and how to show it on the web. Now I'm going even further and create a 360° spherical one.
To create such a picture you need reasonable pictures, so you have to take care of some things, otherwise you're going to despair when it comes to post-processing (stitching errors). Good captures are a must, especially indoors due to the varying distances between the camera and the objects around it.
The lens of choice is the Sigma 8-16mm wide angle lens.
With a picture angle of 121.2° (at 8mm focal length) it allows to create a 360° pano in only 4 captures. If you use a different lens you can get the minimal amount of pictures either by testing or you get yourself an app.
Should you be at a place where you don't come back so quickly, it's worthwhile to take more pictures than said minimum limit. Better safe than sorry. Most of the time I take 10 pictures, 6 in portrait around the vertical axis, two zenit captures and two nadir captures - in exaclty that order.
The six captures around the vertical axis should overlap each other, that way the stitching is far easier later on.
The zenit capture points upwards. In most cases, if you're outdoors, your camera will see clouds. For the second one I turn the camera 180° around its lens axis. Why do I capture the zenit first? Well, clouds are in constant move, so it's advisable to get the pictures of them as fast as possible than the ones from the "constant" ground.
The nadir capture's the zenits counterpart - it point straight downwards. Here your tripod will cause some problems, because its legs are in the picture. Here the second capture, also turned for 180°, comes in handy, because now you can remove them easily on the PC. A compromise solution (if you are not a fan of Photoshop) you can get those pictures by holding the camera with your arm outstretched - here you have to take care of the blur!
Because I mentioned the tripod: You'll get the best results when the camera is mounted on it. More precise: On a panoramic tripod head.
Der optical pivot point is that point, where all light rays before and after the lens cross each other. That means, if you turn your camera around that point you won't struggle with parallax. That is really important for a flawless stitching!
In order to place your camera the right way on your pano-tripod head you need to know the distance between the pivot point and the tripod mounitng screw. Here you're going to find all you need.
If you don't have such a pano-tripod head you can, at least outdoors (big, wide areas), do it without a tripod at all. That way you'll get some errors when you stitch the pictures together, but it is possible to reduce them later in Photoshop. If you want to do it more precise: Get a piece of cord and mount it on your lens at the pivot point. Mount a medium heavy piece (a small stone) on the other end. Now you have to "turn around the cord" to get the 6 captures. Take care that the stone stays on one point on the ground and the cord is straight up.
In a nutshell: Manual mode, constant shutter speed, constant aperture, constant ISO value, constant focal length.
The focal length shall be as short as possible, 8mm in my case. The shutter speed depends on the current surroundings, it is the variable part of that four parameters. Also variable, but for the sake of image quality to keep low, is the ISO value. The aperture should be that wide open, that you get the maximum sharpness through all the image layers.
A good benchmark is at 8mm f/12 up to f/16. Do not close your aperture too much, otherwise the sharpness decreases, because the light is bent too much.
At 360° panoramas (or actually in general) the histogram is one of the best tools a digital camera can provide. It shows the relative amount of pixel from a certain brightness. The far left side on the histogram shows the amount of pure black pixel, the other side, the left side shows the amount of pure white. In between there are all kinds of gray. The following picture shows both extremes and middle gray.
The histogram of the teaspoon shows pretty good what I mean. There are many light gray tones, at this the histogram is shifted to the right. On the far left and far right side you can see peaks.
Those peaks are really bad, because they don't contain any infomration - that spots in the picture are either pure white or pure black. For post-processing that's a catastrophe (yes, it's really that bad).
That's why I'm carefull, that my pictures are in between those limits. If you switch to the histogram on your camera, you should something like this:
Now here's the tricky part: All pictures of your panorama have to inside those limits, in order to not loose image information. A tip: Take a picture from the sky (zenit) and vary the shutter speed as long as the picture isn't inside the limits. Then take a picture form the ground (nadir) and do the same thing. Vary the shutter speed as long as it takes to get both captures in the correct brightness.
In general: Digital cameras are far better with dark tones that with bright ones. That's why you should take pictures a little bit darker - that way nothing "burns out". When you post-process your pictures you can brighten up the darker spots easily. Requirement: RAW format.
If all pictures are taken you can stitch them with ICE from Microsoft. The editor is free and, as far I can tell, my favourite one.
The projection must be set to spherical, only so ICE creates the required equirectangular picture.
At the end, the result should look something like this. Normally I set the width to 5000px. The height must be that half width (a 360° pano is limited in ts high with 180°). If that's not the case you need to take more pictures, because ICE then can't create a whole spherical panorama.
Now that the picture is finally done you want to display it somewhere. At what's better than the web? I use three.js to do that.
On GitHub you'll find all you need. In the 360_Panorama directory you can see the index.html file, all java scripts you're going to need and the picture (area.jpg). Attention! If you open the index file on your local computer you're goingt to see nothing but a black screen. Some solutions are provided here.
Since you want to put it online anyway you can go on and put the whole 360_Panorama folder right on your webspace.
Free webspaces are a dime a dozen, before I got myself an own domain I used bplaced. Create an account, upload the folder and type yourname.bplaced.net/360_panorama/ in your browser. E voilà, here's your pano.
In the index-file there's the script that handles all tasks in order to display the picture (create a sphere, put in a camera, project the picture on the inside, start rendering, get mouse commands). Here you'll find a good documentation to understand what's going on. In this example the sphere turns slowly, if you don't like that, just set controls.autoRotate = false;.
controls.noPan = true; controls.noZoom = true; controls.autoRotate = true; controls.autoRotateSpeed = 0.5;
As I already mentioned, the picture is projected onto the inside of the spheres surface. Now you see why you have to select an equirectangular projection in ICE. If you look at a "normal" picture in 2D, it looks like this:
But in 3D it looks like that:
Now that we have everything done, we can lean back and enjoy the nice view from the top of a mountain.