Generating QuickTime VR movies
and objects with Radiance

Written by Paul Bourke
Started: 15 August 1995, last updated: 22 August 1995

Note: You will almost certainly need a Macintosh to view the QuickTime VR movies shown as examples below.

The following is a description of my initial attempts at creating QuickTime VR navigable movies and QuickTime navigable objects using Radiance as the rendering engine. Indeed any renderer may be used for creating the object movies. Producing navigable scenes only requires that either a correct panoramic can be generated or the renderer can create a rendering with a very narrow horizontal camera aperture, eg: 2 degrees. In both cases it helps if some sort of script control can be made to control processing and image manipulation in order to eliminate the tedium of an otherwise manual process.

QuickTime VR navigable movies


The first and third items are free. Radiance is available on a number of platforms, the QuickTime player is available for Macintosh and Windows, it is available from Apple. The QuickTime authoring tools are only available on the Macintosh and are not free!.


Both steps 2 and 3 are performed by the authoring tools.

Creating the panoramic

The panoramic is formed by using a virtual camera with a very narrow horizontal aperture. I have been using two degrees (-vh 2) and generally 100 degree vertical aperture (-vv 100). In the case of a 2 degree aperture, 180 renderings are performed, the results are pasted together to form the panoramic image.

A C program is available which generates all the rpict calls and pcompos operations necessary to form the panoramic as described.

This program is generally called as follows

   panoramic octfilename anyrpictoptions > cmdfile

The rpictoptions cannot contain -vd and -vh options as these are controlled by the panoramic program itself. You almost certainly need to specify a view point (-vp).

For example, panoramic might be called as follow
   panoramic grid.oct -vv 100 -y 500 -ab 1 -vp 2 3.5 2 > pan

Note that normally you would only specify the -y option, rpict will "choose", "set" the width (-x option) of each strip appropriately. 500 vertical pixels above is quite crude, for better quality results 1000 or more is recommended. It is strongly recommended that a -vv is set, the default of 60 degrees is not wide enough for most applications, at this stage I recommend 100 degrees.

The following Radiance model rad file is straight out of Vision3D. You should add your favourite sky or lighting arrangement, the one used here is sky.rad.

The oct file is generated simply as
   oconv sky.rad grid.rad > grid.oct

The resulting cmdfile (pan in the above example) is then run, its successful conclusion results in a file called panoramic.pic and panoramic.pict (for the Macintosh).

Here is the panoramic generated from the model described above

This PICT image is going to be sliced into N strips by the next process. Two things need to be done to this image before it can be used by the QuickTime VR Authoring tools, it must be rotated anticlockwise and it is desirable that the number of vertical pixels is an integer multiple of N, the number of slices. The default number of slices is 24, other multiples can be used I have been using 12. I simply use PhotoShop to rotate the image and possibly scale it to an integer multiple of N=12 pixels.

Creating the QuickTime VR navigable movie

The remaining procedures require the QuickTime VR authoring tools. Firstly the panoramic is "diced" and turned into a QuickTime movie. The standard dicing is 24 strips vertically, I have used 12 strips vertically and 1 strip horizontally in this example.

   p2mv 1 12 "hd:grid:grid.srcMooV" -in "hd:grid:grid.srcPICT" -codec "cvid"

Here is an example of a diced movie, quite a strange beast. It is a movie which, as conventional movies do, plays left to right but the image plays top to bottom.

The second part turns the QuickTime movie into a QuickTime VR navigable movie.
   msnm "hd:grid:gridvr" -source "hd:grid.grid.srcMooV" 1 12  
	-vPanRange 50 -50 -windowSize 320 200
The "standard" compression types are:
    cvid    cinepak
    rpza    video
    rle     animation
    smc     graphics
    cdvc    compact video

Note these are specified as 4 characters, add a space to the ones which only consist of 3.

"cvid" takes the longest time by far to compress.
"raw " results in the best quality and by far the largest documents.

The -vPanRange option should be set ot + and - half the vertical camera aperture used by rpict.

The resulting QuickTime VR navigable movie file has a type of "Moov" and creator "vrod". The earlier QuickTime movie has the same type but a creator of "TVOD". Note that the latest QTVR player can also play "normal" QuickTime movies.

Is this the first QuickTime VR environment made with Radiance? Dated 16 August 1995

Things yet to do

QuickTime VR navigable objects

This is a discussion of one way of creating QuickTime VR objects using Radiance as the rendering engine.


All these items are available in the public domain. I used a program call ConvertToMovie to convert a series of individual PICT images into a QuickTime movie. Apple supply a program called NavigableMoviePlayer which addes the appropriate nagivable specs to the movie. Of course the QuickTime VR Player is available for the Macintosh and Windows.


All the above can be done without the QuickTime VR authoring kit, of course the kit does contain its own tools as well.

Creating the images

Creating a navigable object requires that a large number of views of the object be taken. They also need to be taken in a particular order, namely scanning from left to right, top to bottom. The virtual camera is placed at positions on a sphere about the object. The camera positions can be determined in many ways but normally they are at the intersections of equal angle lines of latitude and longitude.

To increase the impression that the user is spinning the object it is recommended that the object is located in the black void of outer space. For the example here I used a model produced by Matiu Carr, I added some rather bright lights above and below it. Perhaps a camera based light source would be appropriate when illuminating some objects.

The following C program will generate images from the appropriate positions. The usage of this program is as follows:

object octfile r cx cy cz dabove dabout above1 above2 about1 about2 \
	exp rpictoptions
        octfile         oconv style oct file
        r               distance of camera from view point
        cx cy cz        camera view point
        dabove          number of slices in above angle
        dabout          number of columns in about angle
        above1 above2   range of above angles
        about1 about2   range of about angles
        exp             constant exposure for pfilt
All angles in degrees

The rpictoptions should not contain -vp, -vd, or -vu as these are set/controlled by the "object" program. rpictoptions which should be set are -vh and -vv, I recommend wide angles, eg: 90. Normally the radius and camera aperture would be such to ensure that that the whole object is always visible. You should also set the image size (-x and -y) to the correct proportions of the final movie.

The cmdfile will contain repeated calls to rpict, the camera is swiveled around the point (cx,cy,cz) at a distance "radius" away. "rows" samples will be taken vertically, "column" samples horizontally. These numbers will be used later in step 3.

The resulting PICT images will be named "objectpict.nnnn" where nnnn is the frame number. There will be rows * columns of them.

Converting to a QuickTime movie

The application ConvertToMovie was released with the original QuickTime product and it takes a series of PICT images with names of the form filename.nnnn where nnnn is the frame number. The user may select the compression type, any may be used. It is important to create key frames for each image, this is accomplished by turning off the key frame options or setting it to 1. The images can be reduced at this stage into the final desired size, make sure to turn on antialiasing if the images are reduced.

The resulting QuickTime movie contains all the image frames ordered from top to bottom and around the object.

Creating the QuickTime VR navigable object

The NavigableMoviePlayer application takes the above QuickTime movie and simply adds some extra information, the most important are the number of rows and columns, the start and end horizontal angles, and the start and end vertical angles. The "poster" frame can also be specified, this is the starting positing when the movie is first launched, by default the starting position will be the first frame in the movie.

For the example shown here there were 5 rows and 12 columns. The horizontal angle varies from 0 to 360, the vertical angle varies from 60 to -60. They both vary in 30 degree steps.

That is it, NavigableMoviePlayer turns the QuickTime movie immediately into a QuickTime VR navigable object.

Common problems