Revision as of 22:48, 5 January 2010 by SIMU-NOVA
- This is a beginner-level tutorial on how to create audio objects.
- Open HeroBlade, log into a test area (it is not a good idea to experiment in production areas)
- Check that audio objects are visible and selectable in the Filters menu (click on the word "Audio" to turn these on)
- Open the Create menu, and choose Audio / Load Audio
- Navigate to a sound file in the Repository. In Clean Engine, this might be HE/Engine/CleanGame/Audio
- Select a sound file, such as he_tutorial_generator_hum.sgt
- Click OK
- Create an instance of the new audio asset:
- Open the Assets panel
- Locate the sound file in the "audio" section, and select it
- Click on the "Instances menu" link and choose "Add instance near camera"
- An outline of a speaker object should appear, and the sound should play
- The colored circles around the object (you may need to backup your viewpoint to see them) represent the distance within which the sound can be heard
- To temporarily turn off the sound, click on the speaker icon in the HeroBlade toolbar
- Clicking again should turn the sound back on:
Modifying the audio properties
With the audio object selected, in the Properties panel, modify the following:
- Change MinDistance to .9
- The MinDistance marks the distance from the object at which the sound will be playing at maximum volume. For example, if dealing with a generator hum, the hum will be the same (maximum) volume whether you are standing on top of it or a few feet away. Then after the "MinDistance" threshhold, the sound volume will begin decreasing with distance.
- Change MaxDistance to 5
- The MaxDistance marks how far away that the sound volume will stop decreasing. Between the MinDistance and MaxDistance, the volume will decrease along a curve.
- Change CutoffDistance to 10
- The CutoffDistance marks how far away that the sound, at minimum volume, can be heard at all.
- Change AmbientType from OMNI to DIRECTIONAL
- The MinDistance, MaxDistance, and CutoffDistance properties will still work, but now they are only operative within a code of sound.
With DIRECTIONAL audio objects, the shape of the cone can also be modified:
- InnerAngle: Within the InnerAngle, the sound will be at maximum volume
- OuterAngle: Between the InnerAngle and OuterAngle, the sound will drop off from Maximum to Minimum volume
- VolumeOutsideCones: The level of volume within the outside cone.
Other audio properties:
- Stopped: Controls the playing of the entire sound
- Paused: Pauses the sound at its current point of play
- StartOffset: In seconds, how far into the sound file to start playing
- FadeInLength: In seconds, how long to bring the sound up to volume
- FadeOutLength: In seconds, how long to fade the sound out
The following bugs have been reported:
- The sound icon in the toolbar displays a tooltip of "Sound enabled" regardless of it is on or off.
- Sound in an area, once it is done playing, sometimes cannot be reactivated. The (temporary) workaround for this, is to delete the asset and its instances, and re-create them
- To delete the asset, select it under "audio" and choose "Remove selected asset". This will give you a pop up about deleting all instances in the area. Select "yes"