EoinOBroin
(EoinOBroin)
February 11, 2016, 9:35pm
26
MinusKelvin;472085’]Yeah, this is basically a “bonus” feature I implemented that wasn’t requested for Paragon. I did it as an “epic friday” project a few months ago and pitched it as a thing to be added as a general feature for 4.11. It’s not the fanciest implementation, but it works pretty well and I think that it’ll be useful for people, at least until we have time to implement an “advanced occlusion” system (or partner with a audio tech vendor, etc). It uses the pre-existing per-voice LPF that was already being used in the engine (previously modulated with parameters variously called things like HighFrequencyGain, etc). I think the most effective implementations will probably use the occlusion volume scaling parameter in conjunction with the LPF frequency value.
Which reminds me: I forgot to mention in the twitch stream that I went back and fixed the way the LPF filters were getting used for various features. The Audio Volumes, for example, allow you to apply a LPF for sounds in the volume, etc. The cutoff frequency was being set by a parameter labeled, “HFGain”. This was a problem for a few reasons. The first is that the parameter was a number between 0 and 1 and translated to a frequency in Hz value using a strange conversion algorithm that resulted in a frequency spread of ~0 hz to 6000 hz. As a sound designer, figuring out what this parameter’s effect would be very problematic. Furthermore, the HFGain value (which again, wasn’t a gain but a cutoff-frequency value) would “mix-in” with other HFGain values from other systems. For example, if you wanted to filter a sound based on distance but also filter a sound as it went inside an audio volume, those values would multiply together! Thus the resulting product of the HFGain values would then get translated to a cutoff frequency that was… probably very hard to understand. Since multiply frequencies that way doesn’t really make sense, I changed these systems to actually accept frequency values for LPF cutoff frequencies. Then, the final LPF cutoff frequency actually applied to the sound is the lowest LPF frequency of all the possible subsystems that might apply a filter. In other words, it doesn’t make sense to spend CPU resources on 5 LPF filters when really the final, lowest-frequency LPF will be the one you actually hear.
Awesome stuff, I’m loving it Definitely a great implementation- super useful especially to the project I’m working on! Great to hear about the other LPF improvements, thanks for all the hard work!