Importing Panoramas from PTGui

Panorama images that have been assembed using PTGui can be viewed in HD View by creating a small XML file and creating a tile set. The steps are described below:
  1. Run PTGui, load in your photographs, and assemble them as normal until you have achieved your desired result. At the bottom of the panorama editor window you will see the field of view angles reported by PTGui and you should make a note of these:



    Here we cover three types of panorama: cylindrical, cylindrical transverse and spherical (equirectangular). If you choose a cylindrical panorama in the panorama editor and the panorama has its largest field of view in the horizontal direction then it is of the normal "cylindrical" type. If it is larger in the vertical direction or wraps around overhead then it has a "cylindrical transverse" type. Spherical panoramas can wrap around in both vertical and horizontal directions.
  2. Calculate the minimum and maximum field of view (FOV) angles for the horizontal and vertical directions. In our example with a spherical panorama, the horizontal field of view is 360 degrees (wraps around) and the vertical field of view is 115 degrees. From these values we calculate the four constants:

    thetaMin = 180 - (Horizontal_FOV / 2)
    thetaMax = 180 + (Horizontal_FOV / 2)
    phiMin = 90 - (Vertical_FOV / 2)
    phiMax = 90 + (Vertical_FOV / 2)
    The meaning of these constants is illustrated by the following diagram:

  3. Save the final version of your panorama to a jpeg file, e.g. testpano.jpg.
  4. You now have two choices, either 4a you manually create a small xml file and link the stitched panorama directly, or 4b you create a tile set and xml file using the hdmake tool. Use method 4a if the file size is small, less than 4MB, otherwise use method 4b which enables progressive updating in the viewer.
a

Write a small XML file to inform HD View about your jpeg file. This XML file should have the following contents:

<?xml version="1.0" encoding="utf-8"?>
<root>
     <imageset
         url="testpano.jpg"
         projection="spherical"
         thetaMin="0"
         thetaMax="360"
         phiMin="32.5"
         phiMax="147.5"
     />
</root>

You need to set the projection to one of "spherical", "cylindrical", or "cylindricalTransverse" as described above.
You should also insert the field of view parameters that you calculated and the correct filename or URL.

b Run hdmake from the command line as follows:

hdmake -src tstpano.jpg -dst testpanotiles 0.75 -xmlsphere testpano.xml 0 360 32.5 147.5