ProductsQuickTime

Using the QuickTime Sprite Movie Exporter

Introduction

The QuickTime Sprite Movie Exporter is a Director Xtra (an Xtra is a sofware component written to extend Director's functionality) that is available at no charge from the QuickTime site. The sprite exporter takes the contents of the Director score and converts it to a QuickTime movie using QuickTime sprite technology. It is similar in function to Director's built-in Export to QuickTime movie option. However, instead of creating a QuickTime movie with a video track, it creates a QuickTime movie with a sprite track. For many kinds of animations, the sprite track provides a much more compact representation of the animation. The sprite track will often have better performance characteristics across a wider range of machines.
 

Important Note

The version of the Sprite Exporter currently posted does not support the QuickTime 3 fire, ripple and cloud effects as documented below.

System Requirements

To run the QuickTime Sprite Movie Exporter you must have Director 5.0 or later for Macintosh installed. (A Sprite Exporter has not yet been written for the Windows version of Director). The exporter works on both PowerPC and 68K based Macintosh computers. You will need to have QuickTime 3 installed.
 

Installation

To install the QuickTime Sprite Movie Exporter, put the QuickTime Sprite Exporter file into the Xtras folder which is located in the same folder as the Director application.

How the QuickTime Sprite Movie Exporter Works

When you export your Director project using the Sprite Exporter, each of the castmembers in the project becomes a QuickTime sprite.
 
The animation itself is done by arranging the castmembers on the Director stage over a series of frames. The result is a score that contains information about which castmembers are on stage, in what locations, and at which frames of the movies. The Sprite Exporter uses the Score information to generate the sprite track in the QuickTime movie.

[IMAGE quicktime3_41.GIF]
A sample Director Score

Technical Note: A QuickTime sprite is not the same as a Director sprite. A Director sprite is an instance of a Director castmember and contains information about the path, size, and location of the castmember over time. A QuickTime sprite is just the Director castmember. The QuickTime sprite track contains the information about how many times, where and when each QuickTime sprite occurs in the movie.

[IMAGE quicktime3_42.GIF]
Director castmembers


Exporting a Director Project using the Sprite Exporter

When you are ready to create a sprite movie, choose the QuickTime Sprite Exporter from the Xtras menu in Director.

Important: Due to a bug in Director, when you create a new project for the first time (or if you later change the background color of the score or the dimensions), you must save the Director project, close it, and reopen it for the QuickTime Sprite Exporter to be notified of the change. If you do not close and re-open the project, the QuickTime Sprite exporter creates an empty movie.

The QuickTime Sprite Movie Exporter displays the following dialog to allow you to configure the export operation.

Export All/Selection

The first line of options allows you to select which frames from the score will be exported.

  • If you select Export All the entire score will be exported.
  • If you select Export Selection Only just the frames currently selected in the score will be exported.
  • If only one frame is currently selected in the score, the Export Selection Only option is disabled.

No Sound/Sound/Music

The second line of options lets you specify how audio should be handled.

  • If you don't want audio in the QuickTime movie, select No sound.
  • If you want the audio to be exported into a QuickTime Sound track, select Sound Track. This will cause all the audio in the score to be mixed down into a single QuickTime Sound track.
  • If you want the audio to be exported into a QuickTime Music track, select Music Track. A QuickTime Music track uses a MIDI-like note format to store sounds. For many kinds of audio, this is a more compact representation.

If your score uses sound for many short sound effects, exporting to a music track is probably the best choice. However, because all the sounds to be played in the music are loaded into memory when the movie is opened, if your score has a very large number of sounds or very long sounds, it is best to select "Sound track".

Ignore Director Scaling

The third line of options lets you work around a bug in the Director 5.0 Xtra support. In some cases, Director 5.0 doesn't correctly return the sizes of sprites on the stage. This causes the QuickTime Sprite Movie Exporter to generate movies with incorrectly sized sprites. Since many Director projects never use scaled sprites, this isn't too big a problem. In general, you should be able to leave Ignore Director Scaling unchecked. However, if your sprites are incorrectly sized in your output movie, check the Ignore Director Scaling box and try re-exporting the movie.

Override/Difference Samples

This option allows you to select the way in which the samples of the QuickTime sprite movie are stored. There are two formats, and each has its own advantages and disadvantages.

  • Select Override Samples if you intend to use your movie on a CD-ROM or a hard disk and will be random-accessing different parts of the animation. The Override Samples format uses more disk space, but provides extremely fast random access to any frame.
  • Select Difference Samples if you are concerned about the size of the QuickTime movie. The Difference Samples option will create a significantly smaller movie file, but random access will also be much slower. If the movie is only going to be used to play from beginning to end, then Difference Samples is the best choice.

Note: For web playback, choose Difference Samples.

QuickTime 2.1/2.5 Compatible

This option lets you indicate which version of QuickTime this movie will be used with. QuickTime 2.1 and 2.5 do not support graphics modes (inks, to use the Director term) for sprite movies or special "effect" codecs (ripple, fire, water). QuickTime 3 provides support for these features.

  • If you are not using inks or you intend to deliver the movie to users who will be running older versions of QuickTime, you should check QuickTime 2.1/2.5 compatible.
  • If you will be using inks, and your users will have a newer version of QuickTime, uncheck QuickTime 2.1/2.5 compatible.
  • The new effect codecs (ripple, fire, cloud, etc) are not supported version of QuickTime prior to QuickTime 3. If you choose to use these effects, be sure to uncheck the QuickTime 2.1/2.5 Compatible box.

Use QuickTime Alpha Channel

This option lets you enable a special feature of the QuickTime Sprite Movie Exporter. If you check Use QuickTime Alpha Channel, the exporter will automatically enable alpha channel based transparency for specially marked cast members. This is explained in detail in the Using Alpha Channels section.

Once you have configured the export options, click OK to begin the actual export. The export goes through several different phases as it exports the movie. Once all the progress dialogs go away, the export operation is complete and you can use MoviePlayer to view the exported QuickTime Sprite Movie.


Supported Features

Macromedia Director is a sophisticated application with many features. The QuickTime Sprite Movie Exporter supports only a subset of these features.

  • If you add markers to the Score, the Sprite Exporter will convert them to a text track and they will show up in the Chapter Heading section of the movie controller.
  • Support for alpha channels. The Transparency demo clearly illustrates the benefit of alpha channel. If the sprite images are created in a package like Adobe Photoshop that supports alpha channels, then the alpha channel information can be used.
  • Only bitmap and picture based cast members are supported for the sprite track. In particular, digital video cast members are not currently supported.
  • Both Sound Resources and AIFF files are supported for sound tracks.
  • Lingo is not supported in any way. If you use Lingo to animate your sprites, this will not be reflected in the exported sprite movie.
  • The frame rate specified in the score is supported. If it is not specified, the default frame rate for the project is used.
  • The background color of the score is used for the background color of the sprite movie. If you change the background color of the score or the dimensions, you must save the project, close it, and reopen it for the QuickTime Sprite Exporter to be notified of the change. This is a bug in Director.
  • The registration point of cast members is respected.
  • Film loops are supported.


Hints

This section describes some details about how the QuickTime Sprite Movie Exporter works so you can make better decisions about how to use it.

  • The exporter creates a sprite track with a single key frame and a large number of override or different frames to describe the animation. This key frame contains all the images that are used in the score. This key frame is loaded into memory the entire time that the sprite movie is played. The images in the key frame are compressed, but the amount of memory can still be considerable. If you have more than one scene, it is probably best to break it up into multiple projects, export each one independently, and then paste the exported movies together using MoviePlayer. In this way, you will get a movie with multiple key frames, so it will take up less memory on playback.
  • Under QuickTime 2.1 and 2.5, sprite tracks get better performance if they are a multiple of 16 in width and height (and multiples of 32 if the dimensions exceed 512 pixels).
  • Under QuickTime 2.1 and 2.5, sprites will consume more processor cycles if they cross the edge of the stage. For best results, keep sprites away from the very edges of the stage.
  • The exporter stores all sprite images at 16 bits per pixel. Use this to your advantage. Don't dither your pictures down to 8 bits. QuickTime will do that automatically, if necessary, at play back time. 16 bit images look much better for users that have screens that support it.
  • The QuickTime sprite architecture supports a foreground and background plane. Director's score only really has a single plane. By default, all images are placed into QuickTime's foreground plane. If you want a static background picture, you can put a sprite into the first sprite layer in the score. If it is present for the entire duration of the score and doesn't movie, it will automatically be placed into the background plane. If you have a large background image, use of the background plane will provide much better performance, although it will also consume more memory at runtime.
  • Only cast members that are used in the animation are included in the exported file. Others are ignored.
  • Markers can be exported. They will be stored in a separate text track. The text track is disabled by default, but is displayed in the movie controller with QuickTime 2.5 or better as a chapter list pop-up menu. The text track can be enabled using MoviePlayer.


Using Alpha Channels

Although a single transparent color is appropriate for most opaque objects, objects that are not opaque (the goblet and bubble in the transparency demo) require a different treatment. Similarly, if you want an anti-aliased edge along the border of your object (lightning bolt in the transparency demo), you'll need a range of transparency values. This is what the alpha channel provides.

Director 5.0 doesn't directly support sprites with alpha channels. While the QuickTime Sprite Movie exporter doesn't give Director the ability to display images with alpha channels, it does provide this capability within a QuickTime sprite movie authored with Director. To do this, you must create all cast members that will use alpha channels in a special way.

First, create your images with alpha channels and save them into a QuickDraw picture. Many applications let you do this, including Adobe Photoshop.

Next, import this picture into the cast as a linked cast member. To do this, select Import from the File menu. Choose the picture you wish to import, check the Linked box, and click Import.

Finally, you must set the name of cast member to include the word "alpha". You can now use Director normally to create a score. The alpha channel information will not be displayed in Director, but if you export the movie with the Use alpha channels option selected, the alpha channels will be correctly displayed in the resulting QuickTime movie.

[IMAGE quicktime3_(WP)2.GIF]
Photoshop Channels - #4 is alpha

 

The illustration above shows the four channels for the goblet in the transparency demo. The first three are the red, green, and blue components of the actual image. The fourth channel tells how much of the background to allow to show through.

 

[IMAGE quicktime3_(WP)1.GIF]
The alpha channel for the goblet. Darker = more transparent

This illustration shows only the alpha channel information for the goblet.The darker gray a pixel in the alpha channel is, the more of whatever is behind the image will be mixed in with the image, creating a transparency effect.


The Ripple Effect

The version of the Sprite Exporter currently posted does not support the QuickTime 3 ripple effect as documented below.

The ripple effect is created by taking a black and white image and compressing it into a sprite using a special codec. When the sprite is drawn, the ripple filter is applied to any objects below a black pixel in the image. The ripple happens even when the movie is not playing.

[IMAGE quicktime3_(WP)7.GIF]+ [IMAGE quicktime3_(WP)6.GIF] =
The black&white mask controls where the ripple is applied

To tell the Sprite Exporter to use the ripple codec, make sure the name of the castmember contains "ripple".


The Fire and Cloud Effects

The version of the Sprite Exporter currently posted does not support the QuickTime 3 fire and cloud effects as documented below.

The fire and cloud effects are similar to the ripple effect, although they do not use a mask. If the name of a cast member starts with "fire" or "cloud", the Sprite Exporter pays no attention to the content of the cast member but rather, applies the fire or cloud effect to the path of the castmember.

The size of the fire or cloud is determined by the bounding box of the castmember.

SamplesGetting StartedAuthorsDevelopers

Samples | Getting Started | Authors | Developers




Find:   

Site Map - Search Tips - Index


The Apple Store | Hot News | About Apple | Products | Support
Design & Publishing | Education | Developer | Where to Buy | Home

Contact Us
Copyright 1998 Apple Computer, Inc. All rights reserved.