This little application illustrates a way of generating arbitrary camera views from a combination of six still images, as described by Paul Bourke on his CubeRender web pages. The effect is similar to QuickTime VR but it has a number of advantages.
The current release of the CubeRender demo is dated
. It comes in two versions; the only difference is the size of the image (and download). They may be downloaded here:
Both versions require a PowerPC and MacOS 7.1 or higher.
Using the Demo
Launch the CubeRender demo. There will be a slight pause while the images are loaded into memory, and then the window will resize appropriately and the image will be displayed.
Use the arrow keys to pan the camera. You can move it in any direction, including straight up or down. (You can't move it past vertical, however; that is, you can't end up with the camera upside down or sideways. This is a deliberate limitation in the interface, and not a limitation of the algorithm.)
Note about artefacts: when the camera is nearly looking straight down, you may notice some artefacts in the lower-right corner at certain angles. These are due to a glitch in the program, and not any flaw in the algorithm itself.
Customizing the Demo
You can put your own images into the CubeRender demo using ResEdit. (If you don't already have ResEdit or know where to get it, check the Mac Web Directory.) Here's how you do it:
If you've changed the image size, be sure to also adjust the memory settings on the app (using "Get Info" in the Finder) -- see the next section for the correct values.
- Render your images square, with a square aspect ratio. The size is typically a power of two (e.g., 256 or 512), and the camera angle must be exactly 91.35873 degrees.
- Generate six images, all from the same camera position, but looking in six orthogonal directions. Here is a POV-Ray file that generates the images with a proper camera, and in the correct order for the next step, by using POV-Ray's animation controls.
- Using ResEdit, copy the images into the PICT resource of the demo. This is easiest if you first select and delete the existing pictures. Then paste in the new ones, in this order: +x, -z, -x, +z, +y, -y. (If you've used the POV-Ray script correctly, you'll have images numbered 1 through 6 in the right order for this operation.)
- While you're here, also feel free to customize the About box and menus to your liking.
Feel free to distribute your custom CubeRender apps showing off your scenes. But if you do, please let me know. If I find that people are using and distributing this thing, I will put some time into improving it. But if it is only being used as a demonstration of the algorithm, then it's fine as it is.
Be sure to set the minimum and preferred memory sizes in the application big enough to contain the uncompressed images. If your image size is N, then your memory should be set to 3*N*N/128 + 512 kilobytes. For example, if your images are 256 by 256, the application needs 3*256*256/128 +512 = 1536+512 = 2048 K. If your images are 512 by 512, this increases to 6656 K. If the CubeRender Demo does not have enough memory, it will quit with a "type 12" error.
. . . . . . firstname.lastname@example.org