Sound

These ‘notes’ may go beyond sound in Unreal.

 

Intro:

I have alot more information to include and an idea of how to form this page so that it covers enough information to get sounds into the various, if not all of the, unreal engines and utilising additional 3rd party tools available. I am by no means a super-fly professional musician, i just found alot of this information useful along my travels. I do however have experience with brass instruments, created sound and sound effects quite a bit and participated in a few dj events here and there. I use an  “Edifier 5.1 speaker setup” and crative Zxr with daughter board.

During the creation of sound effects for an Unreal game you will may encounter’the science of sound’,  if some of this information is new to you, i advise that you do some wider research. You should learn some cool stuff here and more technical stuff can be found in the links at the end


What it covers:

  • exporting & importing sound/ music files with Unreal Engines,
  • Sound design/ engineering for gameplay environments in a broader sense.
  • Interesting Information & important things to consider about Unreal Sound rendering & Sound in general
  • a short overview of the science of sound, with relevance to sound creation for the video game industry
  • Links and resources

 

Exporting Unreal Music:

For Unreal 1998/UGold/  Unreal Tournament 99

Music

  • Music (“.umx”) can be exported using the Unreal editor…
  • or found installed in the game folder;      “\UnrealGold\Music”
  • You can transfer these files to UT99 and export it from within the Unreal Editor
  • Note: It may not work in the 1998 Editor (bugs are well documented online) 
  • Simply choose your Music file in the browser and click export.
  • Many Apps can play UMX files

Sound files

  • “.uax” files need a different method.
  • These UAX files can be exported using the UCC.exe in UT99 systems folder
  • To export earlier sound files (Unreal/Nap pali etc), as above,  you can put these into you Unreal Tournament 99 Folder and export them (UT99 reads earlier Unreal 1998/ Unreal Gold files)

 

a “.bat” file example:

  • evething with the “===” lines can be typed/ copied to notepad and saved as a “.bat” file
    ================================================================
    cd c:\unrealtournament\system
    ucc BatchExport Activates Sound wav c:\Activates
    ================================================================
  • The location of UCC within Unreal Tournament 99 = cd c:\unrealtournament\system 
  • Activates is the sound file to be exported
  • Sound WAV if the file type
  • This will read the files in the UT Sounds folder and export them to a new folder called ‘Activates’
  • Copy and paste the text within the lines “===” and modify it to suit your needs. Save it as a .bat file
  • If you have trouble with the exporter finding your files , keep the text above and move you UT folder to this directory, i had issues with exported from an external harddrive.

Unreal ready File Formats

  • When Converting files from above format it is generally documented to use the following format
  • [Sound] Uncompressed > 44100 > 16Bit > Mono
  • Unreal Tournament 3 supports All sample rates, but it is recommended you use 22050 or 44100

The above formats are widely accepted and generally used, but they are rarely explained (at least within the Unreal Community). If you have no idea about sound and just do what unreal says you may run into some problems, but it is likely only audiophiles, others who understand, or those with a nice sound system will realise this. Time to expand our knowledge of sound!

But wait!! – You import everything as mono? what is this 1907?

It would be a bit crazy to think all files were supposed to be imported to mono, but once you have read this full guide you will understand why this is recommended and when you can break the rules of this recommendation. The first thing that should be stressed is space, sound is an extremely good place to begin saving space, or data, that can be used for other things, like textures and models or simply to save money. When creating standalone Maps/ weapons/ Mods for Unreal i don’t really have a need to cap file sizes or lower sample rates, but it’s good to be aware of space saving techniques.

Music can be imported as Stereo (in fact Music files really should always stereo) and i will cover multi-channels for UT3  below.

  • [Music] Uncompressed > 44100 > 16Bit > Stereo
  • [Sound] Uncompressed > 44100 > 16Bit > Mono

So now we have mono files for our sound effects and our music files as stereo, great stuff, but what about my ‘5.1 ‘or ‘7.1 ‘speaker setup going to waste.

First lets explain “↑↑↑ What did that format do? ↑↑↑”

– that just made our music file stereo or into a stereophonic sound i.e; 2 wave forms. The 2 waves in our stereo file are created with 1 sound file. This means that as the sound waves are not independent they create a much bigger sound wave,  same sound but essentially it is also louder.


The science of sound:

This is what is happening:

    ↓↓↓ 2 coherant sound waves meet ↓↓↓   ↓↓ 2 opposing or independent sound waves  ↓↓↓


 

  • See the “science of sound” section for more info
  • 2 mono tracks are not just twice as louder, they are infact (as a rough example) 2.13 times louder (not exact math, just illustrates the point).

Here’s a nice example of machine noise in a room:

“… if one machine = 90 dB, then 2 = 93 dB and 10 machines = 100 dB. If you then doubled the number of sources from 10 to 20 the measured level would only increase by a further 3 dB to 103 dB.”

even though the sound, (waveform), is the same, the sound is louder. So, if we created a Multichannel file from our stereo although we could hear it through a ‘5.1’ speaker setup potentially the sound could be very loud if you import it into the unreal engine with same volume. Our sounds need to be well balanced therefore we need to consider the whole environment, not just our sound.

– another thought to be consider. 1 loud sound does not cancel out a quiet sound, therefore,  90 dB + 80 dB = 90.4 dB. It does not eliminate the quietest sound as most people think.

So we can now have sound effects as mono, and music as stereo, but we need to ensure our Music file is not so loud that it drones out our other game Sound effects:

This is where the Unreal Engine becomes extremely important.

The rendering of sound within the unreal engine is handled by a variety of factors. Without knowledge of how the original sound files were created, or without an awareness of the science of sound, results are never going to be that good.

Luckily, Unreal’s code to sets default Sound groups to common sense sound levels. When you choose a sound group it inherits the following default values:

Sound Groups:

By default, in Unreal, when you choose sound groups on import, this is what happens to the sound Volume:

Dialog ~1.4
Music ~0.75
Weapons ~1.1
Ambience ~0.5
  •  ( I need to include all sound groups values,i’ll do it some other time)
  • Dialog will be louder when played and the rest will have their volume levels dropped by the engine so dialog takes prioirty.
  • Personally, i prefer more control over my sounds, i can give complex situations where this will be a nuisance but i won’t get into that just yet.

Reverb & Reverb Volumes

  • reverberations are echo’s
  • sound effects can be contained within specific volumes using the Unreal Engine
  • I recommend that these ‘volumes’ should be created as early as possible based on your geometry (because…)
  • …Changes only take true effect after a BSP rebuild

 


 

Unreal Documentation tells us:

  • For example, a stereo file at 1.0 volume will be 2x louder than a mono file, likewise (4) mono files would be 4x louder. But eventually you’ll hit the overall threshold and the output will begin to clip and distort.
  • But the science of sound teaches  the true effect of increasing decibel levels and creating multi-channel tracks, giving us a more precise understanding.
  • So if we want to have a ‘7.1’ multichannel sound – we need to be aware in Unreal it will potentially be 7 + Times louder if we are not careful, and if each file is a stereo file (say with our music track)…
  • Stereo will be more than 2x louder than mono, Multichannel with be up to 7 x louder than the Stereo file. Eventually the sounds becomes distorting or even clips.
  • all of a sudden our weapon effects become indistinguishable, but still add to the over all decibel levels, so if we play a sound effect and our 7.1 music track, again decibels increase. As you can see Unreal are aware of this and have set music defaults to 75% and weapons to 110%

WHAT the hell happens when we add all this to our reverb volumes!

  • At this point it gets a bit crazy.
  • Reverb volumes are great for what they are, but they can become a problem in some circumstances, i will try to give one example:

Example:

  • Imagine an Environment setting: Small cave with an underwater passage.
  • 1x Mono sound effect
  • 1x stereo sound effect
  • 1 x Mutlichannel sound effect (surround sound)
  • 2 x reverb volumes (1 for cave 1 for water)
  • Dialog and weapon sound effects

Think what would hapen to a constant sound effect as you enter and exit the water volume, what occurs natually (the trasnition of sound using volumes for spatialize etc) is grewat for 90% of the time; but what if the dominant sound was a dialog or you want your main character wearing headphones. The perception of sound will destroy what you are trying to achieve.


Importing Multi-channel Surround Sound into Unreal

(i haven’t finished this section yet)

  • Select Import from the menu.
  • The naming system is what makes the conversion and you need to adhere to it strictly
  • Select your files “Surround_fl.wav”, “Surround_fr.wav”, “Surround_sl.wav”, “Surround_sr.wav”.
  • Select the package you wish to save to and click OK to all.

Channels for surround sound files:

If you would like to import a multitrack, or mutlichannel audio file and turn it into a 3D Surround sound file this channel info may help:

  • FrontLeft _fl
  • FrontRight _fr
  • FrontCenter _fc
  • LowFrequency _lf
  • SideLeft _sl
  • SideRight _sr
  • BackLeft _bl
  • BackRight _br

 

Useful Terminology:

Attenuation

  • your sound being rendered in 3D Space
  • Normally used when you get further away from a sound and it gets quieter

Spatialize

  • position in 3D space

Concatenator:

  • string together

Distance crossfade

  • fade from 1 sound to another based on sound 2 locations

Sample Rates:

  • Generally i have been uprating anything less than 44100 to 44100 @ 16bit
  • Ideally i would like to make all sounds in Unreal 24bit but i haven’t tested this yet. (it would be specifically for people with a good sound set-up)

Sound for Unreal PC

  •  most has already been described

Sound for Unreal PS3:

  • ATRAC LINK is dead
  • if you wish to use the PS3 sound mod tools please read the eula here: (insert eula on my disclaimer pages)
  • Then download & install PS3ModSoundTools provided in the Tutorial Pack or from online if you can find it

 Lost UT3 rare content:

  • This is a list of maps i would really like to get my hands on, they are sound test maps and may have been released during the Q & A testing period’s prior to the Unreal Tournament 3 Beta
  • there was 5 sound maps in total if someone has them please contact me with a link

OpenAL (Only for UT3 ….NOT FOR UDK or UE4)

  • in Unreal you can enable Hardware Open AL in the ‘settings menu’ for ‘Audio’
  • you can grab new openal Soft drivers here: http://kcat.strangesoft.net/openal.html
  • Once downloaded rename that file and place in your main directory “Binaries” folder for UT3
  • I have also covered this topic in The UT3 ultimate installation guides, But basically the “OpenAL.dll” with UT3 is very old (2007) and you can replace it with a more up to date version
  • Every Unreal Game wil have this OpenAl file that you can copy and paste into your UT3 binaries folder
  • I personally use the Mirror’s Edge “Wrap_oal.dll” and “OpenAl.dll”

How to Update Open Al for Unreal Engine based Games: (for Creative Labs users)

  • Delete the OpenAL32.dll and wrap_oal.dll files from the UT3 binaries folder.
  •  Get the Win32 binary download from the OpenAL Soft site.
  • Rename the soft_oal.dll file from the download to OpenAL32.dll, and place it in the UT3 binaries folder where you deleted the 2 older files.

OpenAL was abandoned and a switch to XAudio2 was made for UDK, Other changes include to Audio from UT3 to UDK include:

XAudio2

  • Google it
  • It’s a little better as you would expect

 


Other UT3 – to – UDK changes with audio

  •  New Sound Actor Icons
  • Multiple Sound Slots for AmbientSounds
  •  SoundGroups are now called SoundClasses
  •  SoundClass Editor
  •  Ambient Zones
  •  Visual of Min Radius
  •  Switch from OpenAL to XAudio2
  •  Improved Distance Models
  •  Improved Low Pass Filters
  •  Content Browser

(note to self, include reference video )

 


Sample rates:

[quote]
44.1k vs. 48k
You’ll hear a slight improvement with 48k if you have a well tuned system (nice speakers, good room, well setup). You wouldn’t hear this on an iPod.
More important: Converting from 44.1 to 48 or vice versa introduces noticeable loss at these lower sample rates so try to avoid this. If all your sources are 48k then go with that. If not or if you plan to only make CD’s then 44.1 might be a better choice. Just avoid unnecessary conversions.

next level – 96k or 88.2k
You will hear the noise from the sample rate go away. The high end will open up and that ‘shrill’ quality in the high end will clean up. *******You need a professional high end setup to hear this. Many factors will influence the audio quality before this comes into play. Note: The intention here was NEVER to increase the frequency range above human hearing. It’s all about moving the sampling frequency well away from the audio band.

[/quote]

 


disabling xram:

– Should be disabled by default, and shown in the long as ‘disabled’ when you boot up UT3, but for ppeoplewith sound issues this quote from the forum link listed might help

I am using the following files to run UT3 since the driver fix:
Save as? "UT3.cmd" in the folder of UT3.exe:
  <pre>@echo off
  cd\
  cls
set source=%~dp0
  RAM
  regedit /s "%source%DisableXRAM.reg"
  . . .
  start /w "UT3" "%source%UT3.exe" -nomoviestartup
  @#@#@Echo Enable X-RAM
  regedit /s "%source%EnableXRAM.reg"
  </pre>?
  Save as? "DisableXRAM.reg" in the folder of UT3.exe:
  <pre>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Creative Tech\Driver\PCI&VEN_02&DEV_0005]
  "DisableXRAM"=dword:0000000
  </pre>?
  ?Save as? "EnableXRAM.reg" in the folder of UT3.exe:
  <pre>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Creative Tech\Driver\PCI&VEN_02&DEV_0005]
  "DisableXRAM"=-
  </pre>?

UT3 Map Music

  • Samples of Music rather than just music files in their complete form and every useful for UT3 because of how you setup map music.

Science of Sound (Links):

Rather than attempt to explain everything these links are useful. They go far beyond anything i could ever explain.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s