In this tutorial we explain how to add sound to AR scenes. Sound is important, as it changes the perception and realism of a scene. Typical examples for sounds in AR include audioguides that are triggered through user interaction or background music.
We will explain the concept auf sound by using the following example scene:
The scene shows the human limphatic system. Labels highlight the different nodes and an audio file is being played when the user clicks on it.
Before you can add sounds to a scene, you need to upload audio files as an .mp3 file to Onirix Studio.
Three different audio modes are available:
The following example scene is using background sounds. The whale sounds are being looped.
Now, we are coming back to our limphatic system example from before. We want to include different audio files for different labels. As we want the sound to be triggered by user interaction, in this case a click on a label, we disable Loop and Autoplay.
AR scenes can include different events to make scenes interactive. In this case we want to include the following behaviour:
When the user clicks on a label, the coresponding audio file for the selected node will be played.
In this case, we need to create a new click event for every label. First, we select the label in the Element bar, then we add a new event (type Click). Afterwards, we select the action (Play / Pause), and finally, we select the audio file we want to play.