Menu
Lumberyard
User Guide (Version 1.13)

Adding Sound to Animations

Sound effects contribute to a game by adding a sensory experience to characters, objects, weather, and more. You can add sound effects to animations by using Geppetto. This requires that an .animevents file has been created for the character and its animations before you can proceed.

You can also add sound by editing the XML file to reference an ATL (Audio Transition Layer) event.

To add sound effects by using Geppetto

  1. Open Lumberyard Editor and click Tools, Geppetto.

  2. In Geppetto, under the Assets panel, double-click the character to which you want to add sound.

  3. In the Assets pane, under Animations, choose an animation to which you want to add sound. The animation's properties load in the Properties panel.

  4. In the Properties panel, for Animation Events, click the drop-down list and click Add.

  5. For the new animation event, select sound from the drop-down list.

  6. Enter a value for the time that the sound should play during the animation, or click on the animation event in the Playback timeline and drag it to where you want it on the animation.

  7. Alternatively, you can double-click anywhere on the Playback timeline of the animation to add a new animation event, which is then displayed under Animation Events in the Properties panel for the animation.

  8. Click on the field next to the drop-down list for sound, select the sound you want to assign to the event, and click OK.

  9. You can achieve more precise timing of the sound by attaching the sound to a particular bone on the character. Under Animation Events, double-click the animation event, then for Joint Name, click the bone icon. In the Choose Joint window, choose a bone and click OK.

  10. When done adding audio, click on the Save icon in the Properties panel to save the changes to the animation. The information is saved to the *.animevents file for the character.

To add sound effects by editing the XML file

  1. Navigate to \SamplesProject\Objects\Characters\character and use a text or XML editor to open the *.animevents file.

  2. Add or edit the following event:

    <event name="audio_trigger" time="0" endTime="0" parameter=""/>
  3. Add or edit the parameter attribute with the ATL event.

    Example: parameter="Play_KatanaSwing"

Adding Sound to Mannequin

You can control audio in Mannequin by adding procedural clips to fragments and setting their type to Audio in the procedural clip properties.

In turn, fragments are played on scopes. It is common to set up a Mannequin character in such a way that specific audio scopes are reserved exclusively for the placement of audio triggers on them. Using the Mannequin FragmentID Editor, you can enable a scope for a fragmentID to edit its default scope mask. When editing a fragmentID, you can select which scopes it should use by default.

The Mannequin system determines which fragments it triggers via tag states. This allows flexibility in supporting a variety of animations with sound.

By adding tags to a fragment, you can also specify what needs to occur in the game or with the character for that specific fragment to be selected.

Adding a ProcLayer Track

Once you have determined on which scope you want to place the audio triggers, a ProcLayer track is first added to the scope. You can add any number of ProcLayers to a scope, which can help better organize the fragment.

To add a trigger to a ProcLayer track

  • In Mannequin Editor, right-click on the applicable scope and click Add Track, ProcLayer.

You can also add procedural clips to any ProcLayer on any scope. These might, however, be saved to a different Animation Database (.adb) file, depending on your setup.

Adding a Trigger to a ProcLayer Track

To add a trigger to a ProcLayer track

  1. In Mannequin Editor, double-click in the new ProcLayer timeline to add a procedural clip. To move the clip, you can drag its starting point.

  2. Under Procedural Clip Properties, click Type and select Audio.

  3. Under Params, select a Start Trigger and Stop Trigger as needed to define the sound behavior. To keep the sound playing, select do_nothing for Stop Trigger.