Important: The information in this document is obsolete and should not be used for new development.
The QuickTime 5 release incorporates a new QuickTime VR cubic playback engine, which is discussed in this section.
A new type of QuickTime VR panorama is introduced in QuickTime 5 –– the cubic panorama. This new type is represented by six faces of a cube, thus enabling the viewer to see all the way up and all the way down.
Note that QuickTime VR cubic playback is backward compatible, i.e., cubic VRs will play in earlier versions of QuickTime as panoramas, with some distortion.
Note: The following
API calls (in QuickTimeVR.h),
when used with cubes, are not supported in the QuickTime 5 release: QTVRSetBackBufferImagingProc and QTVRRefreshBackBuffer.
If you use either of these calls, they will return an error for
cubes.
Panorama Flags Superseded by the panoType Field
Panorama Image Track
New Cubic Panorama
Panorama Tracks in Cubic Nodes
flagsA set of panorama flags. kQTVRPanoFlagHorizontal has
been superseded by the panoType field.
It is only used when the panoType field
is nil to indicate a
horizontally-oriented cylindrical panorama (for backwards compatibility with
QuickTime 4).
panoTypeAn OSType describing
the type of panorama. Types supported are
kQTVRHorizontalCylinder
kQTVRVerticalCylinder
kQTVRCube
reserved2Reserved. This field must be 0.
The actual panoramic image for a panoramic node is contained
in a panorama
image track, which is a standard QuickTime video track. The track
reference to this track is stored in the imageRefTrackIndex field
of the panorama sample atom.
Previous versions of QuickTime VR required the original panoramic image to be rotated 90 degrees counterclockwise. This orientation was changed in QuickTime 5 to allow either rotated (the previous requirement) or non-rotated tiles (the preferred orientation).
The rotated image is diced into smaller frames, and each diced frame is then compressed and added to the video track as a video sample, as shown in Figure 1-38. Frames can be compressed using any spatial compressor; however, temporal compression is not allowed for panoramic image tracks.
Note: Figure 1-38 illustrates that as the pan angle increases, the tile number increases.
QuickTime 5 does not require the original panoramic image to be rotated 90 degrees counterclockwise, as was the case in previous versions of QuickTime VR. The rotated image is still diced into smaller frames, and each diced frame is then compressed and added to the video track as a video sample, as shown in Figure 1-39.
Note: As shown in Figure 1-39, the opposite of the previous behavior is exhibited: as the pan angle increases, the tile number decreases.
In QuickTime 5, a panorama sample atom (which contains information
about a single panorama) contains the panoType field,
which indicates whether the diced panoramic image is oriented horizontally
or vertically.
The primary change to cylindrical panoramas in QuickTime VR is that the panorama, as stored in the image track of the movie, can be oriented horizontally. This means that the panorama does not need to be rotated 90 degrees counterclockwise, as required previously.
To indicate a horizontal orientation, the field in the VRPanoSampleAtom data
structure formerly called reserved1 has
been renamed panoType.
Its type is OSType. The panoType for a
horizontally oriented cylinder is kQTVRHorizontalCylinder ('hcyl'),
while a vertical cylinder is kQTVRVerticalCylinder ('vcyl').
For compatibility with older QuickTime VR files, when the panoType field
is nil, then a cylinder
is assumed, with the low order bit of the flags field set to 1 to
indicate if the cylinder is horizontal and 0 if the cylinder is
vertical.
One consequence of reorienting the panorama horizontally is that, when the panorama is divided into separate tiles, the order of the samples in the file is now the reverse of what it was for vertical cylinders. Since vertical cylinders were rotated 90 degrees counterclockwise, the first tile added to the image track was the right-most tile in the panorama. For unrotated horizontal cylinders, the first tile added to the image track is the left-most tile in the panorama.
A new type of panorama, the cubic panorama, is introduced in QuickTime 5. The cubic panorama in its simplest form is represented by six faces of a cube, thus enabling the viewer to see all the way up and all the way down. The file format and the cubic rendering engine actually allow for more complicated representations, such as special types of cubes with elongated sides or cube faces made up of separate tiles. Atoms that describe the orientation of each face allow for these nonstandard representations. If these atoms are not present, then the simplest representation is assumed. The following describes this simplest cubic representation: a cube with six square sides.
Tracks in a cubic movie are laid out as they are for cylindrical panoramas. This includes a QTVR track, a panorama track, and an image track. Optionally, there may also be a hot spot track and a fast-start preview track. The image, hot spot, and preview tracks are all standard QuickTime video tracks.
For a cubic node the image track contains six samples that correspond to the six square faces of the cube. The same applies to hot spot and preview tracks. The following diagram shows how the order of samples in the track corresponds to the orientation of the cube faces.


Note that by default the frames are oriented horizontally.
However, arbitrary orientations (90 degrees clockwise, 90 degrees
counterclockwise, upside down, and diamond shaped) can be used if
specified with the 'cufa' atom.
Still, the greatest rendering speed is used with horizontally oriented
tiles.
The media sample for a panorama track contains the pano sample atom container. For cubes, some of the fields in the pano sample data atom have special values, which provide compatibility back to earlier versions of QuickTime VR. The cubic projection engine ignores these fields. They allow one to view cubic movies in older versions of QuickTime using the cylindrical engine, although the view will be somewhat incorrect, and the top and bottom faces will not be visible. The special values are shown in Table 1-1.
Field |
Value |
|---|---|
|
4 |
|
1 |
|
frame width * 4 |
|
frame height |
|
0.0 |
|
360.0 |
|
-45.0 |
|
45.0 |
|
5.0 |
|
90.0 |
|
1 |
A 1 value in the flags field tells QuickTime VR that the frames
are not rotated. QuickTime VR treats this as a four-frame horizontal
cylinder. The panoType field
(formerly reserved1) must
be set to kQTVRCube ('cube')
so that QuickTime 5 can recognize this panorama as a cube.
Since certain of the viewing fields in the pano sample data
atom are being used for backward compatibility, a new atom must
be added to indicate the proper viewing parameters for the cubic
image. This atom is the cubic view atom (atom type 'cuvw').
The data structure of the cubic view atom is as follows:
struct QTVRCubicViewAtom { |
Float32 minPan; |
Float32 maxPan; |
Float32 minTilt; |
Float32 maxTilt; |
Float32 minFieldOfView; |
Float32 maxFieldOfView; |
Float32 defaultPan; |
Float32 defaultTilt; |
Float32 defaultFieldOfView; |
}; |
typedef struct QTVRCubicViewAtomQTVRCubicViewAtom; |
The fields are filled in as desired for the cubic image. This
atom is ignored by older versions of QuickTime VR. Typical values
for the min and max fields
are shown in Table 1-2.
Field |
Value |
|---|---|
|
0.0 |
|
360.0 |
|
-90.0 |
|
90.0 |
|
5.0 |
|
120.0 |
You add the cubic view atom to the pano sample atom container
(after adding the pano sample data atom). Then use AddMediaSample to
add the atom container to the panorama track.
Last updated: 2001-10-01