Lesson 4

Table of Contents

Bypassing Effects

When the SLOW-MO mode is not activated, there is simply no reason for the Pitch Shifter to be active; therefore, it can be bypassed to save resources. Let’s head into the Profiler layout and monitor the CPU usage on normal speed.

  1. From the Views menu, select Soundcaster.

  2. Using the Selector, select the Lesson 4 - Bypassing Effects session.

  3. From the toolbar, select Start Capture.

    Notice that the counter on the right will start to go up, and the button will be highlighted in red.

  4. On the Ambient_Region_Desert Event, click Play.

    [Note]

    If you don’t hear anything, make sure the Distance_to_Player Game Parameter is set to 0. You’ll find it in the RTPCs list in the Soundcaster.

  5. Let it run for 3 seconds, then click Stop Capture to stop capturing.

  6. In the SoundCaster, click Stop.

  7. In the Profiler layout’s Advanced Profiler, make sure the Plug-ins tab is selected.

    In the Plug-ins tab, you’ll see the Wwise Pitch Shifter Effect, and in the % CPU column you’ll see the CPU usage.

    By dragging the time cursor in the Performance Monitor, you can see the usage over the duration of your capture. Despite not being in SLOW-MO mode, the CPU uses a small amount of CPU processing on just having it active and, as such, you can completely remove this usage by bypassing the Effect.

You can bypass the Effect when it reaches a certain value using an RTPC.

  1. From the Layouts menu, select Designer.

  2. In the Project Explorer, expand the Master-Mixer Hierarchy > Master Audio Bus and select the World Bus and in the Property Editor, select the RTPC tab.

    All elements in the Effects tab can be bypassed in the RTPC tab. All that is needed is to link an RTPC to a certain Bypass Effect item number.

  3. From the Y axis Selector, add Bypass Effect 0.

  4. From the X axis Selector, add the Game Parameters > Gameplay > Game_TimeSpeed parameter.

    When the time speed is 1, the game will run at normal speed. As such, let's make a bypassed region around 1.

  5. Set a very small region (0.99 to 1.01) next to the normal timespeed to True, and the rest to False.

When the Game_TimeSpeed is normal it will not be active at all; but, if the speed increased or decreased, it’ll enable the Effect again. While not being in SLOW-MO mode, you’ve now completely removed the resource usage of the Wwise Pitch Shifter when not used.


Was this page helpful?