More realistic 3d sound
More realistic 3d sound
Is there a way that I would be able to change the pitch and volume of the sound if its bouncing off a wall as opposed to line of sight? Is there a way to do that using existing 3dsound formats? I think i can figure it all out if i just know what to start with. Thanks for any help!
I guess you could use some existing 3d sound code that adjusts volume based on distance from player, but perhaps add a few lines that do a raycast from the player to the sound origin and see if it collides with the world geometry; if it does, then do whatever adjustment to the sound.
Thats the quick hack.. the other option would to perform a raytrace-like bit of maths from the sound to the player so as to calculate the number of bounces, surface info, etc and adjust volume & pitch very realisticly but that would be rather cpu heavy for a game.
Thats the quick hack.. the other option would to perform a raytrace-like bit of maths from the sound to the player so as to calculate the number of bounces, surface info, etc and adjust volume & pitch very realisticly but that would be rather cpu heavy for a game.
.: http://www.mercior.com :.
Ok, but I am also interested in non-volume attributes, such as pitch changing when an object gets farther or closer from you (the doppler effect, I believe). I know all the physics involved, i just need to know if theres already a sound format which uses physics equations. And yes, the 2nd option would be too slow for the game .