Leçon 4

Table des matières

Effect Channels and Instances

When applying Effects, you should always keep an eye on the number of Effect instances. Let's demonstrate this by applying the Pitch Shift Effect on the Boulder_Near Blend Container.

If you apply the Pitch Shift Effect on the Boulder_Near Blend Container, all four Sound SFXs will inherit the Effect, resulting in four instances of the Pitch Shift Effect.

Another solution is to set the output of the Boulder_Near Blend Container to the Boulder Audio Bus and apply the Pitch Shift Effect to that Audio Bus.

Considering that both the Audio Bus and the Sound SFX are mono, the comparison is pretty straightforward. However, if you only had one Sound SFX set to a stereo Audio Bus, it would have been less efficient to apply the Effect on the Audio Bus.

Let’s demonstrate how to determine the number of Effect instances, by the use of the Pitch Shift Effect in SLOW MO mode, and compare the Effect placement.

  1. In the Project Explorer’s Actor Mixer Hierarchy > Default Work Unit, select the World Actor Mixer.

  2. Select the Effects tab.

  3. Using the Selector in ID 0, select the Pitch Shifter > Pitch Shift > WAG_PitchShifter_SlowMotionMode ShareSet.

  4. From the Layouts menu, select SoundBank.

  5. Click Generate All.

    [Note]

    The Generate All option will not require you to select soundbanks, platforms or languages. However, to reduce the wait of generating SoundBanks, you can select only the All_In_One SoundBank, your platform and language and select Generate Selected.

  6. From the WAG Unity project’s Audiokinetic menu, go to Certification > 251 > Lesson 4 and select Slow Motion.

  7. Click Play to enter playmode.

  8. Back to Wwise, connect to the game using the Remote Connections dialog.

  9. Returning to Unity, from the WAG in-game menu, enable SLOW-MO.

  10. Teleport to the Woodlands and attack the Evil Spit Plant on the plateau.

  11. Click Play, to exit playmode.

Let’s now use the Advanced Profiler and evaluate the performance of the Wwise Pitch Shifter.

  1. From the Profiler layout, select the Plug-ins tab of the Advanced Profiler view.

Within this tab you’ll be able to monitor the processing used by each individual plug-in. Notice that the Wwise Pitch Shifter Number of Instances is 10 (this may vary from 10-20 depending on what you do in gameplay). When applying the Effect on the World Actor-Mixer in the AM Hierarchy, an instance of the Effect is passed on to all child audio objects, unless they are overriding their parent Effect settings.

When an audio object inherits an Effect, the applied Effect will show in the Effects tab, grayed out. The placement of the Wwise Pitch Shifter on an object of the AM Hierarchy caused the Effect to be distributed onto 10 different objects, each using a proportion of resources. Another way of applying such an Effect would be to place it in the MM Hierarchy on an Audio Bus. As described earlier, when applying the Effect on an Audio Bus, the audio sent to that bus would first be mixed (into the number of channels set in the Channel Configurations) and then the Effect would be applied.

  1. From the Layouts menu, select Designer.

  2. In the World Actor-Mixer’s Effects tab, click the Selector and select None.

  3. Under the Project Explorer’s Master-Mixer Hierarchy > Default Work Unit > Master Audio Bus, select the World Bus.

  4. In the Property Editor's Effects tab, use the Selector to select Wwise Pitch Shifter > Pitch Shift > WAG_PitchShift_SlowMotionMode.

  5. From the Layouts menu, select SoundBank.

  6. Click Generate All.

  7. From the WAG Unity project’s Audiokinetic menu, go to Certification > 251 > Lesson 4 and select Slow Motion.

  8. Click Play.

  9. Profile the game using the Remote Connections window.

  10. Back to Unity, from the WAG in-game menu, enable SLOW-MO.

  11. Teleport to the Woodlands and attack the Evil Spit Plant on the plateau.

  12. Click Play, to exit playmode.

If you look in the Advanced Profiler’s Plug-ins tab, the Wwise Pitch Shifter’s Number of Instances column shows the number of instances have now been reduced to 1 from the original ~10.

Each of the objects that inherited the Effect are sending to the World Bus. Consequently, the result is the same, just with a notable difference in processing instances.


Cette page a-t-elle été utile ?