SoC 2008 Project OpenGL Preview
The OpenGL Preview project aims to create a fast previewer for Hugin, reducing the time taken to redraw the preview to real time rates. After that, the new previewer can be made more interactive than the current one.
The new previewer will have to approximate the transformations of the images to fit on low resolution meshes. There are two methods for this:
Taking a point in the input image, we can find where the point is transformed to on the final panorama. Therefore, we can take a uniform grid over an input image, and create a mesh that shows remaps this grid into the output projection.
This method suffers when the input image crosses certain points in the panorama. For example over the +/-180° boundary in a equirectangular image, there will be faces connecting one end to the other, and nothing between the edges of those faces and the actual boundary. Also the poles of an equirectangular image will cause similar problems.
Remapping Texture Coordinates
Alternatively, given a point on the final panorama, we can calculate what part of an input image belongs there. Therefore, we can take a uniform grid over the panorama, and map the input image across it.
This does not suffer from problems at poles or borders of the panorama, but instead it breaks down at the borders of the input image.
To check that these transformation methods do not distort the image to much, I devised a test. Using nona to produce a mapping from input image coordinates to output image coordinates, and also creating a projection that goes the other way, I tried this in Blender.