Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave Refraction & Diffusion #98

Open
mikenrafter opened this issue Jun 15, 2023 · 0 comments
Open

Wave Refraction & Diffusion #98

mikenrafter opened this issue Jun 15, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request planned It's being/will be addressed
Milestone

Comments

@mikenrafter
Copy link
Collaborator

mikenrafter commented Jun 15, 2023

Is your feature request related to a problem? Please describe.
The current raytracing solution treats sound like light, but sound travels in circular/spherical waves.

Describe the solution you'd like
Split a ray into multiple rays whenever a lone-ray no longer properly samples the environment as a circular/spherical wave would.

Some examples are whenever a ray:

  • Is reflected.
  • Travels a certain distance (and is likely distant from other rays).
  • Passes an object, needing diffusion

Performance considerations:

  1. Apply restrictions to ray-splitting.
  2. Decrease amplitude of any secondary ray.
  3. Limit total rays separately from initial rays.
  4. Use a queue, and append all secondary rays to said queue.
  5. Rework: Treat each reflection independently (ignoring ray-paths).

The arcs would need to be physically accurate, and more research would be needed to get this right. One (unvetted) approach would be to treat the current theta allotted to each initial ray as the global arc. This approach would have the (theoretical) benefit of improving the quality of sound for lower-end computers using less-intensive settings.

My current way of thinking about ray quantities is:
initial × (2^((initialDistance-splitDistance)/bounceEstimate)-1)

Describe alternatives you've considered
None.

Describe any compatibility requirements
None.

Additional context
https://www.britannica.com/science/sound-physics/Circular-and-spherical-waves
https://noisetools.net/barriercalculator
Dependent upon #99

@mikenrafter mikenrafter added enhancement New feature or request planned It's being/will be addressed labels Jun 15, 2023
@mikenrafter mikenrafter self-assigned this Jun 15, 2023
@mikenrafter mikenrafter changed the title Simulate waves better Add refraction (w/ sound shadows & temperature effects), and wave-arc propagation to rays Jun 15, 2023
@mikenrafter mikenrafter changed the title Add refraction (w/ sound shadows & temperature effects), and wave-arc propagation to rays Add Wave Refraction & Diffusion Jun 15, 2023
@mikenrafter mikenrafter changed the title Add Wave Refraction & Diffusion Wave Refraction & Diffusion Jun 15, 2023
@mikenrafter mikenrafter added this to the Milestone 3 milestone Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned It's being/will be addressed
Projects
None yet
Development

No branches or pull requests

1 participant