For Those Who Need Help With Sound

Information and tutorials related to modding BF2.
Tango Mike
Posts: 15
Joined: 2017-07-20 08:57

Re: For Those Who Need Help With Sound

Post by Tango Mike »

'[R-DEV wrote:Arab;2183125']You're welcome :)

As for that issue, it's been fixed for the next update (v1.5.3)
https://www.realitymod.com/forum/f26-pr ... lable.html
Awesome! :D

I just love the Dev Team and that they still care and update our favourite game!
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

Much appreciated ;)

Here's another tip that I recently discovered.

Before you record the animation you want to sync your sound with, make sure you set your game's FPS with the video recorder's FPS by bringing up the console '~' and typing in

Code: Select all

game.lockfps 60
for 60 FPS.

This way, the length of time for each action in the footage will be accurate to ingame.

So record each action according to the time frame in the editing software. I use Windows Live Movie Maker:
https://answers.microsoft.com/en-us/win ... 872?auth=1

Example:

Code: Select all

AK-47 Deploy:
0 to 0:00.70 - Pulling the bolt back (Time frame: 1.4 seconds before bolt pull)
00:02.47 to 3 - Safety Off (AK74m sound)

Also to properly record the deploy animation, make sure first you have a shortcut key to record (pretty obvious).

Change weapons to the slot before the weapon you want to record.
When you are ready, press both the F key (To Cycle) and the Record key at the same time.

Same when you record the reload animation. Press the 'R' and Record key at the same time, then as soon as the animation goes to idle, press the record key again.
Last edited by Arab on 2018-06-02 04:34, edited 1 time in total.
Image
MaxP
Posts: 117
Joined: 2008-09-08 19:18

Re: For Those Who Need Help With Sound

Post by MaxP »

For Sound Looping

Use BF2 Add Sound Region.exe to add to the sound file the area in which the engine will loop the sound. It uses the values of ObjectTemplate.fire.roundsPerMinute which has to be divisible by 1800 (https://researchmaniacs.com/Math/Div...isible-by.html). Enter the value which in the G36's case would be 600.

It will work it's magic after and save automatically.
From my own experience: the sound loop length calculated from the fire rate does not fit it in game. Maybe it depends on animation, maybe it's a sync problem, maybe depends on sound quality/architecture, but for almost all 600 rpm guns the best loop length is 108-111 ms, and 72+ for 900 rpm.
Otherwise I would get the sound synchronization problem - i.e., 3 sounds for 2 shots or vice versa.
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

MaxP wrote:From my own experience: the sound loop length calculated from the fire rate does not fit it in game. Maybe it depends on animation, maybe it's a sync problem, maybe depends on sound quality/architecture, but for almost all 600 rpm guns the best loop length is 108-111 ms, and 72+ for 900 rpm.
Otherwise I would get the sound synchronization problem - i.e., 3 sounds for 2 shots or vice versa.
Yeah I have the same issue too, especially with the G3 rifle. The region marker is set to 100ms
Thanks for the tip! Will try to experiment.

Edit: Updated first post and information here:
https://www.realitymod.com/forum/showth ... ost2181314
Last edited by Arab on 2019-03-08 00:16, edited 4 times in total.
Image
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: For Those Who Need Help With Sound

Post by anantdeathhawk »

Hello!?

I want to know how to add distant sounds, like the LAV 25 has 4 distant 25mm sounds but are neither added in the tweak files nor con files. Then how do the distant sounds play in-game??

Thanks!

Also can someone record a video tutorial in extreme detail for someone who doesn't know much about the workflow, anytime they are doing that.
Image
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

anantdeathhawk wrote:Hello!?

I want to know how to add distant sounds, like the LAV 25 has 4 distant 25mm sounds but are neither added in the tweak files nor con files. Then how do the distant sounds play in-game??

Thanks!

Also can someone record a video tutorial in extreme detail for someone who doesn't know much about the workflow, anytime they are doing that.
The distance sounds are attached to the e_muzz_ cannon effects via a seperate effect template containing the sound.

I've tried to make a video on it in the past, but I'll give it a shot again soon.
Image
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: For Those Who Need Help With Sound

Post by anantdeathhawk »

How does this e_muzz tweak file of the lav25 is included in the normal tweak file.
Say, i want to add distant sounds to F-16, so how can i add this e_muzz code files, shall i copy any other jet's file if there is for f16 and replace distant sound for it.

Thanks!
Image
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: For Those Who Need Help With Sound

Post by Arab »

anantdeathhawk wrote:How does this e_muzz tweak file of the lav25 is included in the normal tweak file.
Say, i want to add distant sounds to F-16, so how can i add this e_muzz code files, shall i copy any other jet's file if there is for f16 and replace distant sound for it.

Thanks!
So in us_jet_f16, find GenericFirearm and locate the e_muzz_tunguska line.

Go to objects_common_server.zip/objects/effects/weapons/muzzleflashes/emitters/e_muzz_tunguska/ and open e_muzz_tunguska.tweak in Notepad.

In ObjectTemplate.activeSafe Sound S_e_muzz_tunguska_Start, add the following sound settings from a muzzle flash with distant sounds like e_muzz_mg42:

Code: Select all

ObjectTemplate.modifiedByUser "jaymz"
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/weapons/common/sounds/Distantshots/mg3_distant.ogg"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.6
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.97/1.04/
ObjectTemplate.minDistance 10
ObjectTemplate.halfVolumeDistance 700
Though for adding distant sounds, you would need to add ObjectTemplate.position and make sure it's the same value as ObjectTemplate.setPosition 1.21608e-007/-0.00388084/-0.107221.

So you would need to add to the sound settings:

Code: Select all

ObjectTemplate.position 1.21608e-007/-0.00388084/-0.107221
Which will allow the sounds to synchronize properly.

You can then make a copy of e_muzz_tunguska.con and e_muzz_tunguska.tweak into a new folder, can call it for example e_muzz_f16, paste it in there, rename the files to e_muzz_f16, then open both files and replace e_muzz_tunguska with e_muzz_f16.

Don't forget to rename

Code: Select all

ObjectTemplate.addTemplate e_muzz_tunguska
ObjectTemplate.setPosition 1.21608e-007/-0.00388084/-0.107221
into

Code: Select all

ObjectTemplate.addTemplate e_muzz_f16
ObjectTemplate.setPosition 1.21608e-007/-0.00388084/-0.107221
Image
Post Reply

Return to “Modding Tutorials”