Also used as a navigable movie player
Written by Paul Bourke, Ian Hooper, Evan Hallein
Documentation by Paul Bourke
|
Please check the demo version with your hardware/OS before buying.
|
Introduction
"warpplayer" is a Mac OS-X application that takes a QuickTime movie and a description of how to distort each frame. The movie is played and distorted on the fly. There are many applications for this and some of them will be discussed below, the main reason for developing this was for movie playback in fulldome (eg: planetarium environments) where a spherical mirror is used to distort the fisheye frames of the movie.
In addition to the realtime warping, the application allows navigation while the movie is playing. The exact navigation that is appropriate depends on the input image projection, for example, for a fisheye image the movie can be rotated about the pole while it is playing. For a movie where each frame is a cylindrical projection the view direction can be rotated horizontally during playback.
ExampleThe following example is targetted at fisheye movies, the original frame is taken from "Moonlight" by Andrew Quinn. A sample frame is shown below along with various mappings. The power of this approach is immediately obvious, namely that one movie can be shown in multiple environments without being preprocessed for each. Note the grid lines are turned on in order to illustrate the nature of the texture mapping. For all practical purposes any image distortion can be achieved, it only requires that someone can create the correct warp map file.
Mesh data file structure
The data file that describes the warping is simply a description of a regular mesh with texture coordinates. The format is as follows: the file is a plain (human readable) text file, the first line contains a single digit that indicates the input image format the mesh is assumed to apply to, the second line gives the dimensions of the mesh, the subsequent lines contain 5 numbers per line that describe each node of the mesh. These lines consist of x and y (the coordinate of the mesh in normalised screen coordinates), the u and v texture coordinate of that node (range from 0 to 1), and finally a multiplicative intensity value. Normalised screen coordinates range from -aspect to aspect ratio in the horizontal axis and -1 to 1 in the vertical axis.
Input image projections supported are given below, the next release will additionally support stereoscopic versions of each of the above.Please contact the author for further details on these mesh files and how they might be created for your own distortion requirements. Two mesh files are given here as examples: rect.data.zip doesn't perform any distortion, for a 4:3 movie it plays it back unmodified; warpfish.data.zip warps a fisheye movie for spherical mirror projection (at least for a particular configuration and 4:3 aspect ratio projector).
Input image typesWhile the exact form of the projection of the input image and the form of the warping is very general, there are some input and output image projections explicitly supported (tested) and for which example mesh files can be provided. Note also that the exact form of navigation is dependent on the input image projection for example, it doesn't make sense (at least in a hemispherical dome environment) to zoom in on a fisheye image, and only horizontal rotation makes sense for cylindrical projections.
| Input image projection | Navigation | |||||
| Fisheye | Fisheye | Truncated fisheye | Warped fisheye | Perspective | Rotate about pole | |
| Cylindrical | Cylindrical | Fisheye | Truncated fisheye | Warped fisheye | Perspective | Rotate left/right |
| Spherical | Spherical | Fisheye | Truncated fisheye | Warped fisheye | Perspective | Rotate left/right |
| Perspective | Perspective | Zoomed perspective | Fisheye | Warped fisheye | Pan left/right/up/down | |
Keyboard control
The performance is directly related to the underlying hardware being used, the penalty for the warping part of the pipeline is minimal. Put another way, if the movie plays smoothly in the QuickTime Player then it will most likely play smoothly in this player. There are many factors involved when it comes to the playback of large frame movies, for example, the codec used, the hard disk speed, the CPU type and performance, the graphics card, and so on. At the time of writing the author has not had problems playing 1536x1536 pixel movies at 30fps on a 15" Mac Powerbook. Recent experiments with HD projectors have been successful with a higher configured Powerbook, that is, playing 2000x2000 pixel movies and creating 1920x1080 pixel warped images for spherical mirror projection. The movie size, compression ratio, and performance will only increase over time.
New: stereoscopic projection (March 2008)
The application has been enhanced to both support side-by-side stereoscopic movie playback and to allow fullscreen playback across multiple displays. These are actually related in the case where one is attempting passive stereo projection using a dual display graphics card.
As an example of the generally of this approach to realtime warping and to demonstrate how warp maps might be generated, consider the case of warping a fisheye into half a spherical projection.
Sample frame from a movie (left hand side) and resulting spherical projection (right hand side).
|
|