PTGUI PRO (V9)-VIEWPOINT TUTORIAL
This tutorial covers the final stage in the preparation of a full 360x180 degree VR panorama: the patching of the "hole" at the nadir with either a hand held shot, or one taken with the camera still on the tripod after shifting it sideways to give an unobstructed view. If you want to play along, there's an accompanying download containing all the images together with a project file saved at the point when the optimization of all the images apart from the hand held nadir has been completed. Download from:
Unzip all the files to a folder of your choice. Apart from the project file (ptgvpt.pts) there are 10 fullframe fisheye image files:
6 around at pitch = 0
There's also a fully completed project file - ptgvpt-final.pts.
(Another shooting possibility is to tilt the horizontal row down by 10 degrees to reduce the size of the nadir hole and dispense with the two down shots at right angles).
In order that the blending will work properly, it is necessary to apply masks to the three down shots. The masks will exclude unwanted parts of the images - like the tripod/pano head and my feet. The masks have been added on the Mask tab of the supplied project files
The masks look like this:
Note that in the case of the handheld nadir (on the right) that will be used with the viewpoint option, it is necessary to mask anything that is not part of the flat plane of the paved area (as these parts are likely to be badly affected by parallax effects after the viewpoint transformation). Alternatively, if using the PTGui blender, you can adjust the blend priority of the nadir image via the Image Parameters tab to restrict the blending to a circular area in the middle of the frame, thereby excluding the outer parts of the image.
(If using an earlier version of PTGui Pro without the mask feature, masks can be applied to the input images as alpha channel masks using Photoshop, in which case the files must be saved as tiff, as jpeg files don't support alpha channel masks. The supplied project file would then need editing in a text editor to change the .jpg file names to be .tif. An alpha channel mask tutorial can be found on my web site).
LOAD THE PROJECT
Launch PTGui Pro and open the project file ptgvpt.pts (not the final version) with File->Open
Note that for simplicity, the hand held nadir shot has not been initally included.
Select Advanced mode on the Project Assistant tab and select the Optimizer tab. Use the Advanced mode there also:
Click on the Run Optimizer button to confirm the current optimization state:
Now select the numerical transform option (the 123 button) to bring the nadir to centre stage: set the pitch to -90 and click Apply. The Panorama Editor display (equirectangular projection, 360x180) will look like this:
Note that this transformation is optional, being mainly used for historical reasons in order to work around a problem with versions of PTGui Pro up to V7.8. Viewpoint optimization then worked more reliably with the nadir at the centre of the output area. This is not strictly necessary in Version 9, but it still helps in giving a better view of the nadir area so you can see more clearly what's going on there.
ADD THE HAND HELD NADIR IMAGE
Select the Source Images tab and use the Add button at the bottom to add the hand held nadir image.
Select the Mask tab and add a mask to the newly added image 9, similar to the one below.
Select the Control points tab and add five points between images 7 and 9, like this:
Five points should be enough, but you may add more. Tip: Zoom the windows to 100% so that the individual paving blocks can be easily distinguished from one another by various spots and blemishes. Prefer to assign points on tiny spots for best accuracy.
Select the Optimizer tab and uncheck all the present lens and y,p,r settings, and then check y,p,r for the nadir image as well as all boxes in the "Use control points of" table. Like this:
Click on the run button to optimize the nadir roughly into the right position. A poor result will be reported because it wasn't taken on the pano head with the others:
This is to be expected and is nothing to worry about, unless the maximum distance is really huge, in which case check the control points and maybe drag the nadir into approximately the right position manually. Otherwise, just click OK..
THE VIEWPOINT OPTIMIZATION
Now additionally check the viewpoint box for the nadir image.
Run the optimizer once again (you must use the PTGui optimizer for this, BTW, not the Panorama Tools optimizer). With any luck, a good result is now reported!
Occasionally, the image might not snap into good alignment at the first attempt. If that should happen, try selecting the nadir image on the Panorama Editor window (click the "Edit individual images" icon), adjust the image position by dragging and also rotating (right button held down), and then try another optimization. This may sometimes need to be repeated a few times before things click into place, but I have so far never failed to get a good alignment eventually.
With a hopefully good result, you now need to restore the panorama to its normal orientation by applying pitch=90 with the numerical transform option.
All that remains is to generate the panorama. Blending (here with Smartblend on a Windows system) gives an good result, with no visible joins in the nadir area. Use the "Feather: Sharp" setting with the PTGui blender.
Even with viewpoint correction, there might still be some very minor stitching errors for pixel peepers to find. Adjustment of the vp nadir mask to alter the seam position may then help. In difficult cases, I generate two full equirectangular images: one containing all images except the vp nadir, and one containing only the vp nadir (make use of the Include Images list on the Create Panorama tab). You can then extract rectilinear views of the nadir area from each panorama image for merging in Photoshop, using whatever nadir patching workflow you are comfortable with.