Screen Capture for warping using the spherical mirrorWritten by Paul Bourke
Note that the software discussed in the first part of this document is incompatible with current version of the OS. The second half discusses an alternative that has been tested with Mac OS-X 10.8.3 (March 2013).
The following describes one way of warping fisheye images for dome projection using a spherical mirror and software that can create fisheye views but not warped fisheye views. This is based upon Quartz Composer (Mac only) and two patches, one is "pbmesh" available from Kineme, the other is "v002 Screen Capture" from V002. The former takes an image (or image stream) and applies an arbitrary warping, for example a calibrated mesh for a particular projector-mirror-dome arrangement. The later is a very high performing screen capture.
Please note that as with many software solutions the comments below are valid as of the time of writing but may age as time passes.
The hardware/software configuration to use this technique is to run the fisheye generating software on one display (preferably fullscreen) and the Quartz Composer fullscreen on another display (generally the projected display). For example, the following illustrates this with Stellarium which while it can do warping it doesn't use the standard warp files most users with the spherical mirror expect and that allows them to create a very precise result. (The same comments here apply to NightShade which also doesn't use the conventional warp mesh files). The image below on the left is a screen dump of the display running Stellarium, the image on the right is the screen connected to the projector. Any interaction on the left screen is immediately warped and presented on the right screen, and hence on the dome.
While only the commercial version of Celestia supports fisheye, it also does not support warping of fisheye (although some versions have been created that do). The solution outlined here has been tested successfully with a fisheye supported version of Celestia.Notes
The Quartz Composer patch could be as simple as the following.
A more detailed example using NightShade is presented below. The example here uses two HD displays but of course one would normally be an HD projector used with the spherical mirror. While there are a few ways to configure this, the example here uses a 1000x1000 pixel window for the fisheye, the NightShade config file can be edited to achieve this.
fullscreen = FALSE screen_w = 1000 screen_h = 1000
The Quartz Composer patch and sample wasp mesh are given here: nightshade_screencopy.zip. Note the size and the position of the capture region will match the size and position of the NightShade window. The Quartz Composer viewer window will be run full screen, see later.
The layout is shown below. The display on the right is really the image for the projector, the display on the left is NightShade running in a window that matches the capture region. The left hand screen is therefore the operators interface, note that the rest of the screen can be used for other notes or applications relevant to the presentation.
And finally the following are screen dumps of the two displays. The position of the NightShade window is not achieved by guessing, the Screen Capture patch optionally draws a dotted frame around the capture region.
The screen capture patch described above has not been developed for the last few releases of MacOS-X, and fails for 10.8. It was also unfortunately limited in the size of the region it could capture and thus the full resolution of HD projectors could not be utilised. The following describes an alternative approach based upon Syphon, a frame work for transferring frame buffers between applications.
Screen area to Syphon. This is used to capture a region of the screen and acts as a Syphon server, making the region of the screen available to Syphon clients.
Local copy: Desktop_to_syphon_3.zip
One now just needs a Syphon patch for Quartz Composer, this acts as a Syphon client.
The following shows the window being captured on the left, the "Desktop_to_Syphon" application control panel on the upper left. The window on the lower right is the captured image.
The following two screen dumps illustrate how it works in practice.
The first window is the operators display, it has the window for the software creating the fisheye
image. The capture area should be as large as possible in order to maximise
resolution. The example here uses Nightshade which cannot be operated in
fullscreen mode since it also controls the secondary display.
Sample Quartz Composer patch used to create the demonstration above: syphon.zip. This can of course be integrated into any Quartz Composer based show controller.