Chapter 16: Transition Effects

You can enhance your presentation's appeal by adding visual effects
that occur when any type of visual clip starts or stops. With more
than a hundred transition effects available, your streaming
presentation can include special effects found in professional video
production. You can also use transition effects to create a streaming
slideshow from still images.

Understanding Transition Effects

A transition occurs every time a clip starts or stops playing. If you do not use a
transition effect, the clip simply appears when it starts playing and, depending
on its fill attribute, disappears when it stops playing. Using transition effects
makes these transitions more visually compelling. Instead of just appearing
onscreen, the clip might slowly fade in from a solid color. Or, a five-point star
might expand from the center of a region to reveal the clip. Instead of just
disappearing when it stops playing, a clip might crossfade into the clip that
plays next.

Examples of Transition Effects

Timelines and Transition Effects

By default, each transition lasts one second, but you can make a transition last
any length of time. Using transition effects does not affect a presentation's
timeline. For example, a two-second transition applied to the end of a clip
occurs during the last two seconds that the clip plays. If it is applied to the
beginning of the clip, it occurs during the first two seconds of playback.

Layouts and Transition Effects

You can use a transition effect with any visual clip regardless of the layout
you've defined, or whether another clip precedes or follows the clip that uses
the effect. When a clip starts, the area it covers is treated as its background,
whether that area is a region color, a clip in another region, or a clip in the
same region. A transition effect simply introduces the clip over, or removes the
clip from, its background. So when you use transitions with a sequence of
clips, the clips do not have to be the same size.

Animations and Transition Effects

Transition effects are distinct from the SMIL animations described in Chapter
17. A transition effect is a special effect that occurs when a clip starts or stops
playing. An animation, on the other hand, is a special effect that occurs while
a clip plays. You can use both transition effects and animations in the same
presentation. You can even apply them to the same clip. But you define them
separately.

Audio and Transition Effects

A transition effect does not change a clip's audio level. If you slowly fade into a
video, for example, the audio plays normally throughout the fade. You can
change a clip's audio level, however, by animating the clip region's soundLevel
attribute. See "Controlling Audio Volume in a Region" for information about
soundLevel. Chapter 17 describes SMIL animations.

Multiple Clips with Transition Effects

Transition effects are applied to individual clips. Two clips playing in separate
regions might end at the same time and use the same transition effect, such as
a wipe transition that travels from left to right. In this case, two separate wipe
transitions occur, one for each clip. Each transition effect is confined to the
region in which the clip plays. You cannot make a single transition effect apply
to both clips. For example, you cannot make the left-to-right wipe effect travel
across the entire root-layout area, ushering in a new clip to each region as it
passes over the region.

Summary of Transition Effects Tags

The following SMIL sample illustrates the functions and relationships of the
tags used to create transition effects. The remainder of this chapter describes
how to use these tags and their attributes to define and apply transition
effects:

Each transition is defined by a separate <transition/> tag that typically has at
least three attributes, which are described in the following table.

Basic Transition Effects Attributes

Attribute

Function

id

Sets a unique ID used to assign the transition to clips. For rules about creating IDs, see "SMIL Tag ID Values".

type

Identifies a group of transition effects. This attribute is required.

subtype

Determines which member of the transition type group is used.

The following sections describe the various types and subtypes for transition
effects. For convenience, the transition effects are grouped in families that
share broad similarities, such as edge wipes and iris wipes. In defining a
transition, you specify only the type and subtype, however.

Note:
Most transitions listed in the following sections have an
SMPTE (Society of Motion Picture and Television Engineers)
code. This code is provided for persons who want to find the
SMIL transition effect that corresponds to a specific SMPTE
transition. SMPTE codes are not used when defining SMIL
transition effects, though.

Edge Wipe Transition Effects

In the edge wipe family, an "edge" moves over the first clip, revealing the
second clip. As an analogy, imagine a car covered with snow. As the windshield
wiper moves, its edge reveals the underlying windshield. In these transitions,
the edge may be different shapes, such as a straight line, a wedge, or a zigzag.
The first subtype listed for each type in the following table is the default.

Edge Wipe Transition Effects

Type

Subtype

SMPTE

Transition Appearance

barWipe

leftToRight

1

A bar moves from left to right.

topToBottom

2

A bar moves from top to bottom.

boxWipe

topLeft

3

A box expands from the upper-left corner to the lower-right corner.

topRight

4

A box expands from the upper-right corner to the lower-left corner.

bottomRight

5

A box expands from the lower-right corner to the upper-left corner.

bottomLeft

6

A box expands from the lower-left corner to the upper-right corner.

topCenter

23

A box expands from the top edge's midpoint to the bottom corners.

rightCenter

24

A box expands from the right edge's midpoint to the left corners.

bottomCenter

25

A box expands from the bottom edge's midpoint to the top corners.

leftCenter

26

A box expands from the left edge's midpoint to the right corners.

fourBoxWipe

cornersIn

7

A box shape expands from each of the four corners toward the center.

cornersOut

8

A box shape expands from the center of each quadrant toward the corners of each quadrant.

barnDoorWipe

vertical

21

A central, vertical line splits and expands toward the left and right edges.

horizontal

22

A central, horizontal line splits and expands toward the top and bottom edges.

diagonalBottomLeft

45

A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners.

diagonalTopLeft

46

A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners.

diagonalWipe

topLeft

41

A diagonal line moves from the upper-left corner to the lower-right corner.

topRight

42

A diagonal line moves from the upper right corner to the lower-left corner.

bowTieWipe

vertical

43

Two wedge shapes slide in from the top and bottom edges toward the center.

horizontal

44

Two wedge shapes slide in from the left and right edges toward the center.

miscDiagonalWipe

doubleBarnDoor

47

Four wedge shapes split from the center and retract toward the four edges.

doubleDiamond

48

A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges.

veeWipe

down

61

A wedge shape moves from top to bottom.

left

62

A wedge shape moves from right to left.

up

63

A wedge shape moves from bottom to top.

right

64

A wedge shape moves from left to right.

barnVeeWipe

down

65

A "V" shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges.

left

66

A "V" shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges.

up

67

A "V" shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges.

right

68

A "V" shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges.

zipZagWipe

leftToRight

71

A zigzag shape moves from left to right.

topToBottom

72

A zigzag shape moves from top to bottom.

barnZigZagWipe

vertical

73

The vertical, central line splits in a zigzag pattern and moves toward the left and right edges.

horizontal

74

The horizontal, central line splits in a zigzag pattern and moves toward the top and bottom edges.

Iris Wipe Transition Effects

A transition effect in the iris wipe family reveals a clip through an expanding
shape. For example, a star can expand from the center of the transition area to
reveal a new clip. The first subtype listed for each type in the following table is
the default.

Iris Wipe Transition Effects

Type

Subtype

SMPTE

Transition Appearance

irisWipe

rectangle

101

A rectangle expands from the center.

diamond

102

A four-sided diamond expands from the center.

triangleWipe

up

103

A triangle pointed toward the top edge expands from the center.

right

104

A triangle pointed toward the right edge expands from the center.

down

105

A triangle pointed toward the bottom edge expands from the center.

left

106

A triangle pointed toward the left edge expands from the center.

arrowHeadWipe

up

107

An arrowhead shape pointed toward the top edge expands from the center.

right

108

An arrowhead shape pointed toward the right edge expands from the center.

down

109

An arrowhead shape pointed toward the bottom edge expands from the center.

left

110

An arrowhead shape pointed toward the left edge expands from the center.

pentagonWipe

up

111

A pentagon pointed toward the top edge expands from the center.

down

112

A pentagon pointed toward the bottom edge expands from the center.

hexagonWipe

horizontal

113

A hexagon with flat sides at top and bottom expands from the center.

vertical

114

A hexagon with flat sides at left and right expands from the center.

ellipseWipe

circle

119

A circle expands from the center.

horizontal

120

A horizontal ellipse expands from the center.

vertical

121

A vertical ellipse expands from the center.

eyeWipe

horizontal

122

An eye shape, its corners pointing left and right, expands from the center.

vertical

123

An eye shape, its corners pointing up and down, expands from the center.

Clock Wipe Transition Effects

The clock wipe family includes transition effects in which a clip is revealed by a
radial sweep, similar to the second hand sweeping around the face of a clock.
The first subtype listed for each type in the following table is the default.

Clock Wipe Transition Effects

Type

Subtype

SMPTE

Transition Appearance

clockWipe

clockwiseTwelve

201

A radial hand sweeps clockwise from the twelve o'clock position.

clockwiseThree

202

A radial hand sweeps clockwise from the three o'clock position.

clockwiseSix

203

A radial hand sweeps clockwise from the six o'clock position.

clockwiseNine

204

A radial hand sweeps clockwise from the nine o'clock position.

pinWheelWipe

twoBladeVertical

205

Two radial hands sweep clockwise from the twelve and six o'clock positions.

twoBladeHorizontal

206

Two radial hands sweep clockwise from the nine and three o'clock positions.

fourBlade

207

Four radial hands sweep clockwise.

fanWipe

centerTop

211

A fan unfolds from the top edge, the fan axis at the center.

centerRight

212

A fan unfolds from the right edge, the fan axis at the center.

top

231

A fan unfolds from the bottom, the fan axis at the top edge's midpoint.

right

232

A fan unfolds from the left, the fan axis at the right edge's midpoint.

bottom

233

A fan unfolds from the top, the fan axis at the bottom edge's midpoint.

left

234

A fan unfolds from the right, the fan axis at the left edge's midpoint.

doubleFanWipe

fanOutVertical

213

Two fans, their axes at the center, unfold from the top and bottom.

fanOutHorizontal

214

Two fans, their axes at the center, unfold from the left and right.

fanInVertical

235

Two fans, their axes at the top and bottom, unfold from the center.

fanInHorizontal

236

Two fans, their axes at the left and right, unfold from the center.

singleSweepWipe

clockwiseTop

221

A radial hand sweeps clockwise from the top edge's midpoint.

clockwiseRight

222

A radial hand sweeps clockwise from the right edge's midpoint.

clockwiseBottom

223

A radial hand sweeps clockwise from the bottom edge's midpoint.

clockwiseLeft

224

A radial hand sweeps clockwise from the left edge's midpoint.

clockwiseTopLeft

241

A radial hand sweeps clockwise from the upper-left corner.

counterClockwiseBottomLeft

242

A radial hand sweeps counter-clockwise from the lower-left corner.

clockwiseBottomRight

243

A radial hand sweeps clockwise from the lower-right corner.

counterClockwiseTopRight

244

A radial hand sweeps counter-clockwise from the upper-right corner.

doubleSweepWipe

parallelVertical

225

Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints.

parallelDiagonal

226

Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints.

oppositeVertical

227

Two radial hands attached at the top and bottom edges' midpoints sweep from right to left.

oppositeHorizontal

228

Two radial hands attached at the left and right edges' midpoints sweep from top to bottom.

parallelDiagonalTopLeft

245

Two radial hands attached at the upper-left and lower-right corners sweep down and up.

parallelDiagonalBottomLeft

246

Two radial hands attached at the lower-left and upper-right corners sweep down and up.

saloonDoorWipe

top

251

Two radial hands attached at the upper-left and upper-right corners sweep down.

left

252

Two radial hands attached at the upper-left and lower-left corners sweep to the right.

bottom

253

Two radial hands attached at the lower-left and lower-right corners sweep up.

right

254

Two radial hands attached at the upper-right and lower-right corners sweep to the left.

windshieldWipe

right

261

Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left.

up

262

Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom.

vertical

263

Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top.

horizontal

264

Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left.

Matrix Wipe Transition Effects

The matrix wipe family includes transition effects in which a clip is revealed by
a series of sequential tiles that follow a pattern, such as a spiral. In the
following table, the first subtype listed for each type is the default.

Matrix Wipe Transition Effects

Type

Subtype

SMPTE

Transition Appearance

snakeWipe

topLeftHorizontal

301

Tiles move in a horizontal zigzag from the upper-left corner.

topLeftVertical

302

Tiles move in a vertical zigzag from the upper-left corner.

topLeftDiagonal

303

Tiles move in a diagonal zigzag from the upper-left corner.

topRightDiagonal

304

Tiles move in a diagonal zigzag from the upper-right corner.

bottomRightDiagonal

305

Tiles move in a diagonal zigzag from the lower-right corner.

bottomLeftDiagonal

306

Tiles move in a diagonal zigzag from the lower-left corner.

spiralWipe

topLeftClockwise

310

Tiles spiral clockwise from the upper-left corner.

topRightClockwise

311

Tiles spiral clockwise from the upper-right corner.

bottomRightClockwise

312

Tiles spiral clockwise from the lower-right corner.

bottomLeftClockwise

313

Tiles spiral clockwise from the lower-left corner.

topLeftCounterClockwise

314

Tiles spiral counter-clockwise from the upper-left corner.

topRightCounterClockwise

315

Tiles spiral counter-clockwise from the upper-right corner.

bottomRightCounterClockwise

316

Tiles spiral counter-clockwise from the lower-right corner.

bottomLeftCounterClockwise

317

Tiles spiral counter-clockwise from the lower-left corner.

parallelSnakesWipe

verticalTopSame

320

Tiles move in two vertical zigzags, lines headed the same direction, starting from the upper-left and upper-right corners.

verticalBottomSame

321

Tiles move in two vertical zigzags, lines headed the same direction, starting from the lower-left and lower-right corners.

Fade, Push, and Slide Transition Effects

This transition family, which has no corresponding SMPTE codes, includes
fades that let you blend images into one another, or fade an image into or out
of a solid color. The push and wipe transition effects allow a second clip to
push the first clip out of the way, or to slide over it. In the following table, the
first subtype for a certain type is the default.

Fade, Push, and Slide Transition Effects

Type

Subtype

Transition Appearance

fade

crossfade

The clip fades into the clip that follows it.

fadeFromColor

The clip fades in from a solid color.

fadeToColor

The clip fades out into a solid color.

pushWipe

fromLeft

The clip pushes out the preceding clip from left to right.

fromRight

The clip pushes out the preceding clip from right to left.

fromTop

The clip pushes out the previous clip from top to bottom.

fromBottom

The clip pushes out the previous clip from bottom to top.

slideWipe

fromLeft

The clip slides over the preceding clip from left to right.

fromRight

The clip slides over the preceding clip from right to left.

fromTop

The clip slides over the previous clip from top to bottom.

fromBottom

The clip slides over the previous clip from bottom to top.

Note:
Push wipe transition effects are not currently functional
in RealPlayer.

Setting a Transition Effect's Duration

By default, each transition effect lasts one second, but you can change this by
adding a dur attribute to the <transition/> tag. As described in "Timelines and
Transition Effects", changing a transition effect's duration does not affect the
presentation duration. In the following example, the transition effect takes
three seconds to complete:

<transition id="fade1" type="fade" subtype="crossfade" dur="3s"/>

To use the same transition type but vary the transition speeds, define the
transition multiple times, each time with a different ID and duration. For
example, the following tags define the same transition type and subtype, but
the first effect lasts two seconds whereas the second effect lasts four seconds:

Note:
Reversing the direction of a transition effect that has no
specific starting or ending point, such as crossfade, has no
visual effect.

Using Partial Transition Effects

Each transition effect has a starting appearance and an ending appearance.
For example, an expanding star transition normally starts as a single point in
the center of the transition area. It ends after the star has expanded out of the
transition area. You can set a different point where a transition effect starts
with startProgress:

The startProgress attribute takes a value from 0.0 (normal starting point) to 1.0
(normal ending point). This value represents a percentage. For example,
startProgress="0.25" means that when the transition effect starts, it appears to
be 25 percent complete already. It then flows to its end point over the course
of its specified duration.

Additionally, you can use endProgress, which also takes a value from 0.0 to 1.0
to indicate how far the transition effect progresses before it ends. The
following example defines a keyhole-shape transition effect that ends when
the keyhole has expanded to half of its normal ending size:

Tips for Using Partial Transition Effects

When you use endProgress, the transition effect ends in an intermediate state. You can use this to create special effects with iris wipes, for example. With other types of transition effects, though, a partially completed transition may confuse the viewer.

You can combine the startProgress and endProgress attributes in a single <transition/> tag. When you do this, the endProgress value must be equal to, or higher than, the startProgress value for the transition effect to exhibit any movement.

If you set the startProgress and endProgress attributes to the same value in a <transition/> tag, the transition effect appears to complete instantly, regardless of its duration.

When you use a partial transition effect to introduce a new clip in a sequence, the preceding clip's fill attribute determines whether parts of that clip remain visible at the end of the effect. Use one of the following:

fill="hold" to keep the first clip visible

fill="transition" to make the first clip disappear after the transition completes

fill="remove" to make the first clip disappear before the transition begins

Repeating Transition Effects Horizontally or Vertically

When you repeat a transition effect, the effect appears multiple times instead
of just once. For example, an expanding star transition effect normally begins
in the center of the clip and expands toward the clip's edges. By repeating this
effect twice horizontally and twice vertically, you make a separate star shape
expand in each of the clip's quadrants, as shown in the following illustration.

Repeating Star Transition Effect

You repeat a transition effect by adding the horzRepeat or vertRepeat attribute
to a <transition/> tag. Each attribute takes as a value a positive integer that
defines how many times the transition effect repeats horizontally or vertically,
respectively. For example, the following transition effect defines two four-
point stars that appear side-by-side:

You can combine horzRepeat and vertRepeat attributes in the same tag. The
following example creates a grid of nine transition effects by defining three
horizontal repetitions and three vertical repetitions:

Setting a Border Width

All transition effects except fades have borders. When a clip slides over another
clip from left to right, for example, the border is the new clip's right edge. By
default, the border width is 0 (zero), meaning the border is not accentuated.
By adding a borderWidth attribute to a <transition/> tag, you can make the
border more apparent. This attribute takes as a value a positive integer that
sets the border's pixel width. The following example sets a two-pixel border
width:

By default, the border is black, but you can use any other RGB color. You can
also make the border blend the clip with its background. The following
section explains how to do this.

Defining Colors and Border Blends

Transition effects that fade to or from a color, as well as transition effects that
set border widths, can include color values, which are described in Appendix
C. The following example defines a transition effect in which the clip fades to
a solid red:

Assigning Transition Effects to Clips

After you define <transition/> tags in the SMIL file header, you assign the
transition effects to clips using transIn and transOut attributes in each clip
source tag. You can assign transition effects only to clip source tags, not to
<seq>, <par>, or <excl> groups. Any type of clip can use a transition, but
because transitions are visual, they do not affect a clip's audio track.

The transIn attribute makes the transition effect occur as the clip starts to
play. The transOut attribute makes the effect occur as the clip finishes playing.
Each attribute takes as a value the ID defined in a <transition/> tag. For
example, suppose that you define the following two transition effects:

In the preceding example, each video fades up from a solid blue when it starts,
then fades down to solid blue when it ends. It's not necessary to use both the
transIn and transOut attributes for each clip, though. In the following example,
the first video starts playing without any transition. As the first clip ends and
the second clip starts, there's a fade to blue and then a fade up. When the
second clip stops playback, it disappears from the screen:

Note:
A transition effect assigned with a transOut attribute
always obeys SMIL timing rules. If a video normally plays for
two minutes, but has a dur="3min" value to lengthen its active
period, the transition effect occurs after three minutes.

Using Clip Fills with Transition Effects

The section "Setting a Fill" explains the fill attribute, which makes the clip
disappear or remain visible when it finishes playing. Which values you use for
fill can also affect transition effects. The following sections explain how best to
use the fill attribute with transition effects.

Defining a Transition Fill for a Sequence of Clips

When you apply transition effects to a sequence of clips, use fill="transition" to
keep a clip onscreen long enough for a transition to occur. The transition value
does nothing when a transition is not applied to the clip. Suppose you want to
use a three-second radial wipe like the following to introduce each new video
in a sequence:

<transition id="fan1" type="fanWipe" subtype="top" dur="3s"/>

You could apply this transition effect to the beginning of each clip. In a
standard sequence of clips, though, each clip disappears as soon as it stops
playing. The transition effect that introduces the next clip therefore operates
against the region's background color. To keep clips onscreen during
transitions, add fill="transition" to each clip's source tag:

In this sequence, each fill="transition" attribute keeps the clip onscreen for
three seconds (the duration of the transition effect) after the clip ends
playback, long enough for the transition effect to complete. This does not
lengthen the presentation timeline. The three seconds used for each transition
effect overlap the first three seconds that each new clip plays.

Note:
If a clip in a sequence uses a begin value to delay its
playback, a fill="transition" value in the preceding clip freezes
that clip until the clip with the begin value starts to play and
the transition effect completes. For more on begin, see "Using a
Begin Time with a Clip".

Tip:
In a long sequence of clips, add fillDefault="transition" to
the <seq> tag. You do not then need to add fill="transition" to
every clip tag. For more on fillDefault, see "Specifying a Default
Fill".

Setting a Fill in Parallel Groups

When you use parallel groups, a fill="transition", fill="remove" or fill="freeze"
attribute in a clip source tag can affect when a transition occurs. Suppose that
you define a two-second fade to black:

<transition id="toBlack" type="fade" subType="fadeToColor" dur="2s"/>

You next apply this transition to both an image and a video playing in parallel.
In the following example, the image clip has a fill="remove" attribute and a 30-
second duration. The clip begins to fade out at 28 seconds into the parallel
group's timeline, disappearing much sooner than the video, which has a 154-
second duration:

To make the image fade out only after its duration has elapsed, you would use
fill="transition" as shown in the following example. In this case, the image
disappears 32 seconds after it begins to play:

Fading to a Color Between Clips

One of the simplest transition effects is to fade up from or down to a color.
The following example shows a sequence of two videos. There is a two-second
fade from blue as each video starts, and a two-second fade to blue when each
video ends. Each video is centered within the video region and appears at its
normal size. A begin="2s" value is used with each video to insert a short delay
before each transition occurs:

Crossfading Videos

In a simple variation of the preceding example, the first video fades up from
green when it starts to play, and the second video fades down to green when it
ends. When the first video stops and the second video starts, though, the two
videos crossfade into each other. Clips do not need to be the same size to
crossfade into each other: