I'm building a raytracing engine to get an approximation of the impulse response of a room, but the problem is that I don't really understand what to do after the ray tracing.

Ray tracing

After I get all the reflections that collide with the receiver, I get all the rays with their acoustic energy and collisions time. But how do I turn this into an actual impulse response that i can hear using convolution. I was thinking in using a three band eq and turn the reflection energy into intensity, to set parameters for the eq, then send an impulse through the filter and do this for each ray; and finally sum all the impulse responses at their correct times. Please help, I'm not sure if the method I'm going to use is correct.

  • $\begingroup$ In addition to @robert bristow-johnson's answer, please note that the decision factor between ray-tracing & the wave-equation is wavelength versus average distance from the source. A 20Hz wave is about 17 meters long. Higher frequencies more suitable for ray-tracing. Also, you might want to take a look at Sabines too. $\endgroup$ – A_A Aug 13 '16 at 8:51
  • $\begingroup$ The problem with ray tracing at low frequencies is that it doesn't model refraction (and standing waves) but it is often useful, regardless. $\endgroup$ – user28715 Jul 28 '17 at 20:20

the impulse response is the sum of all of the different impulses received, beginning with the direct sound, then the primary reflections (only one reflection between source and receiver), then the secondary reflections (reflects offa two walls), etc.

the delay of the impulse is the delay of each path, which is the length of the path divided by the speed of sound. each path has a path length and you get to apply the inverse-square law to that impulse delayed by that path length. direct sound gets attenuated only by the inverse-square law.

all reflected sounds are attenuated by the inverse-square law and by each reflection. you'll need to know something about the material of the wall at the reflection point to know how much attenuation. a solid polished marble wall will have very little attenuation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.