Here is a little Fake3d positional sound demo.
As alternative to 3d-Sound which always has the Camera as listener but your Player isn’t at Camera place.
Here the volume of the sounds are controlled relative to Player’s position.
UPBGE_0.3_fake3d_sound.blend (2.1 MB)
you should simulate speed and it’s effect on waves compression → the pitch
Reverberation might be cool to have too
I don’t think reverb is available.
I once made a delay-effect
Simulate speed might be possible by calculating relative velocities.
Why don’t you try it?
well, you answered it for the reverb with your delay effect even if i don’t know on what reverb is different
For the relative speed ( that goes negative , then positive) , i guess there’s also some angular speed to take into account : when angular speed is slow (=the car is coming in your direction or going away) the relative speed component must be important in compression/decompression … whilst when the angular speed is fast (car being nearby) the compression might be neutral (as the waves are coming to you at normal speed) and so we hear the normal pitch
pitch = pitch * relative speed / sinus(angle)
just taking a guess All depends how we compute the relative speed .
I think it’s even easier:
Since we already calculate the distance I can use delta_distance:
###doppler effect:
speed_of_sound = 340 #higher value decreases effect
velo = (obj['distance']-distance)*60
obj.actuators['Sound'].pitch = (speed_of_sound+velo)/speed_of_sound
obj['distance']=distance
Based and simplified from this Wiki:
Added it to the file above.:
looks cool. Would be nice to see on some demo with a car
Btw, Range seems on its way to manage reverb.
Yes, I just asked them on discord and they really implemented OpenAL. Wow!
(when it comes out there’s lots to play with)
I can’t wait to see what Range 2.0 is going to be able to do. A bit scared since they said it will be eevee based … knowing how upbge’s performance is disastrous
Perhaps not really Eevee I would think. But I also already can see people crying
why ? on what ?
On the performance expectations when they mentioned the much higher requirements for Range 2.0.
ah yeah, i see … better performance only if you have RTX4050
I still using Range 1.0 , for some reason, newer versions seems slower … hard to tell. It’s like every new version seems to justify performance drop … just like Windows versions … so u need to catch up with better computers …
I will see what would be the requirements for Range 2.0, it’s ROI on performance and if the graphics are really that better