Working with Switch Layers

Once a Switch layer is created, you can manually select which sublayer is visible. You can also create a switch data file that tells which sublayer to view at which frame using an external text file.

Making a Sublayer Visible

Only one of the sublayers in the Switch layer is visible at a time. If you right-click the Switch layer, a pop-up menu shows each of the available sublayers. If you select one from the list, then the selected layer becomes visible and remains visible until another sublayer is selected.

Tip

The visible sublayer can be animated, so if you select another sublayer at frame 10, then that sublayer will be visible from frame 10 onward.


Creating a Switch Data File

Another way to control which sublayer is visible is to use an external data file. A switch data file is used to determine which sublayer is visible at each frame. To create a switch data file, you need to give each sublayer a name. The switch data file then includes a list of frame numbers and sublayer names so that at the specified frame, the listed sublayer is displayed. For any frames that aren’t listed, the current sublayer remains displayed.

The switch data file is a simple text file created using Notepad or another text editor. It needs to include MohoSwitch1 at the start of the text file to identify it as a switch data file. Then each new line needs to contain a frame number followed by a space and then a sublayer name. For example, the following switch data file would display Layer1 at frame 1, Layer2 at frame 10, Layer3 at frame 20, and then switch back to Layer1 at frame 30.

MohoSwitch1
1 Layer1
10 Layer2
20 Layer3
30 Layer1

After a switch data file is created, you can attach it to a Switch layer using the Source Data button in the Switch panel of the Layer Settings dialog box. You can open this dialog box by double-clicking the Switch layer. If you click the Select Audio Sync Source button, then you can choose from any loaded audio files or select the Switch Data File option from a pop-up menu, shown in Figure 24.2.

Figure 24.2. Switch panel of the Layer Settings dialog box.


Using an Audio Switch File

In addition to a text file, the Source button in the Switch panel of the Layer Settings dialog box can also open and use an audio file. This audio file needs to be either a WAV or an AIFF file. When an audio file is loaded as the source switch, then the quiet portions of the audio will display the lowest sublayer in the Switch layer and the noisy portions of the audio file will switch to the highest sublayer. All intermediate sounds will cause one of the middle sublayers to be displayed.

The main purpose of the audio switch source is to perform a rudimentary lipsyncing. To prepare a project for this type of lip-syncing, you should place the graphic with the lips closed in the lowest sublayer and the graphic with the mouth open in the highest sublayer and all the intermediate positions in between these two extremes. The resulting lip-syncing will sync the opening and closing of the mouth in sync with the audio file. More on lip-syncing in covered in Chapter 20, “Using Lip-Sync.”

Tip

Since the audio switch source file responds to the volume level of the audio file, you should keep any background sounds and music out of the audio file used to control the Switch layer. A different audio file that includes the background noises can be used as a soundtrack.


An audio file can be used in different ways to control the Switch layer, such as the opening and closing of a door or the running and stopping of a water faucet.

To control a Switch layer with an audio file, follow these steps:

1.
Open the Alarm clock.anme file from the Chapter 24 folder on the CD. This file includes the stroke of a simple alarm clock.

2.
Click the Duplicate Layer button in the Layers palette to create a copy of the alarm clock layer. Then move the alarm clock to the side slightly with the Translate Layer tool (1). Draw some short intermediate noise lines surrounding the clock.

3.
Create another duplicate layer of the alarm clock and move the clock again with the Translate Layer tool (1) to create the effect of the clock shaking when the alarm goes off. Then extend the noisy lines even farther for this copy.

4.
Click the New Layer button in the Layers palette and select the Switch option from the pop-up menu to create a new Switch layer. Then drag and drop each of the clock layers into the Switch layer so that the clock layer is at the bottom, the clock 2 layer is in the middle, and the clock 3 layer is at the top.

5.
Select and double-click the Switch layer to open the Layer Settings dialog box. Select the Switch panel and click the Source Data button. In the File dialog box that opens, locate and open the Beeping clock.wav file from the Chapter 24 folder on the CD. Then enable the Automatic Gain option in the Switch panel and close the Layer Settings dialog box.

6.
Select the Animation, Select Soundtrack menu command and load the same Beeping clock.wav audio file. The waveform for the audio file appears in the Timeline palette.

7.
Click the Play button (Spacebar) to see the resulting animation. The various clock layers are displayed along with the beeping of the alarm clock, as shown in Figure 24.3.

Figure 24.3. Switch layer controlled by an audio file.


The above example uses a syncing method known as Automatic Lip-Sync, and it works for both Anime Studio Debut and Anime Studio Pro, but another method is available for Anime Studio Pro called Phoneme Lip-Sync. The key difference is that specific sounds are matched to specific named graphics in the Switch layer.

By naming the graphics correctly, you can have specific graphics appear when certain sounds are played.

For example, one user created a project where a hammer was raised when the Ahh sound was heard and the hammer was lowered when the Ohh sound was played. The audio file was a series of dwarfs chanting these sounds, which animated the hammer going up and down. You can learn more about this type of lip-syncing in Chapter 20, “Using Lip-Sync.”

Enabling Smooth Switching

If each of the sublayers in the Switch layer is a vector layer, you can enable smooth switching. Smooth switching is turned on by enabling the Interpolate Sublayers option in the Switch panel of the Layer Settings dialog box. This causes each sublayer to transition smoothly between the different sublayers. This is especially helpful when using the Switch layer for doing lip-syncing.

Note

In order for smooth switching to be enabled, each sublayer must have the same number of points.


To interpolate smoothly between two layers using a Switch layer, follow these steps:

1.
Open the Pinwheel.anme file from the Chapter 24 folder on the CD. This file includes a simple pinwheel, as shown in Figure 24.4.

Figure 24.4. A simple pinwheel.


2.
In the Layers palette, select the Duplicate Layer button to create an identical layer named Pinwheel 2. With the new layer selected, choose the four extended points on the pinwheel with the Shift key held down and rotate them with the Rotate Points tool (R) until the crossing lines form a square around the center circle.

3.
Select the New Layer button in the Layers palette and select the Switch option from the pop-up menu. Drag and drop both pinwheel layers onto the Switch layer. The layer that is directly under the Switch layer is visible in the working area.

4.
Select and double-click the Switch layer to open the Layer Settings dialog box. Open the Switch panel, enable the Interpolate Sublayers option, and then close the Layer Settings dialog box.

5.
Drag the time slider in the Timeline palette to frame 1 and right-click the Switch layer and choose the Pinwheel layer. Then drag the time slider to frame 12 and right-click the Switch layer and choose the Pinwheel 2 layer.

6.
Click the key at frame 1 and click the Copy button at the top of the Timeline palette. Then drag the time slider to frame 24 and click the Paste button. This action copies the key at frame 1 to the end frame so that the animation will loop back to its starting position.

7.
Click the Play button located at the bottom-left corner of the working area to see the resulting animation. The pinwheel gradually changes to the position in the second layer and back again. Figure 24.5 shows the pinwheel as it makes this change.

Figure 24.5. The pinwheel changing shape.


Morphing Between Layers with a Different Number of Points

In order for the interpolation between sublayers in a Switch layer to work, the layers must have the same number of points. If two layers have a different number of points, they still can be included together in the Switch layer, but there won’t be any interpolation between them. The layer with the different number of points will just appear when it is selected. Anime Studio also supports morphing features covered in Chapter 21, “Morphing Objects and Using Actions.”

However, there is a way to trick the program so that it appears to morph between the two layers. The trick is to create a duplicate of the first layer. The duplicate layer will have the same number of points as the first one. Then edit the new layer so that it aligns with the second layer. Even though the new layer has a different number of points than the second layer, you can still interpolate between the first layer and the new layer and then switch to the second layer.

To morph between layers with a differing number of points, follow these steps:

1.
Open the Umbrella to heart.anme file from the Chapter 24 folder on the CD. This file includes a simple umbrella in one layer and a heart shape in another, as shown in Figure 24.6.

Figure 24.6. Umbrella and heart shapes.


2.
In the Layers palette, select the umbrella layer and click the Duplicate Layer button to create an identical layer named umbrella 2.

3.
Select all the points in the umbrella 2 layer with the Edit, Select All command (Ctrl/Cmd+A) and move the umbrella on top of the heart. With the Translate Point tool (T), select and drag each of the points around the umbrella 2 layer and position them on the perimeter of the heart.

4.
Select the New Layer button in the Layers palette and select the Switch option from the pop-up menu. Drag and drop all three layers onto the Switch layer. Drag the umbrella layer until it is directly under the Switch layer.

5.
Select and double-click the Switch layer to open the Layer Settings dialog box. Open the Switch panel, enable the Interpolate Sublayers option, and then close the Layer Settings dialog box.

6.
Drag the time slider in the Timeline palette to frame 1, right-click the Switch layer, and choose the umbrella layer. Then drag the time slider to frame 24, right-click the Switch layer, and choose the umbrella 2 layer. Finally, drag the time slider in the Timeline palette to frame 25, right-click the Switch layer, and choose the heart layer.

Note

If you set keys to change the color of the umbrella as it morphs into a new shape, the color will change in the umbrella layer but not as the object morphs.

7.
Click the Play button located at the bottom-left corner of the working area to see the resulting animation. The umbrella gradually morphs into the heart shape. Figure 24.7 shows the umbrella as it is making this change.

Figure 24.7. The umbrella is morphing into a heart.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset