Git Product home page Git Product logo

acousticsimulator's Introduction

Acoustic Simulator

This project simulates sound propagation in a 3D scene, based on the techniques described in the paper:

Efficient and Accurate Sound Propagation using Adaptive Rectangular Decomposition
Nikunj Raghuvanshi, Rahul Narain and Ming C. Lin
IEEE Transactions on Visualization and Computer Graphics(TVCG), 15(5), 2009.

For PML boundary conditions, the formulation from the paper:

Marcus G., S., Imbo.
Efficient PML for the wave equation.
arXiv:1001.0319, 2010.

was used, though we developed our own discretizations to the equations as the ones in the paper caused numerical issues for us.

An example of what the simulation accomplishes can be seen on YouTube by clicking the image below:

YouTube video of sound simulation

Building and Running

To build, Visual Studio 2015 or later is required. The solution itself is self-contained, so simply building and running in Visual Studio should work.

acousticsimulator's People

Contributors

thecodeboss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

acousticsimulator's Issues

Partitions should each have their own thread

Right now, the entire simulation runs on its own thread, separate from the rendering and main threads. However, it should also launch each partition to run in their own threads.

Determine output file specifications

After running the simulation, we need to determine what sort of output file we will have.

Notes:

  • 7D function needs to be saved. There is a 3D function of source position, a 3D function of listener position, and of course time.
  • Sample equally spaced points throughout the scene for both source and listener (and we can interpolate between them).
  • Will we need to run multiple simulations for different frequencies?
  • Compression? These files could be very large.
  • Memory optimization? For such large files, we may need clever schemes to keep memory paged properly

Port to 3D

Everything is 2D for now, as this allows for more rapid testing and debugging. In practice, we will need to upscale everything into 3D.

Rectangular Decomposition

We need to be able to take some scene, perhaps an obj or fbx file, and partition any open areas into rectangular partitions. See the paper for details.

Interface handling

We need to add code that modifies the forcing functions near the boundary conditions (interfaces), so that sound can propagate between partitions.

Implement Absorbing Boundary Conditions using PML

To simulate absorbing boundaries, we need to create a small pressure layer at the boundaries. On the boundary of this pressure layer, the forcing terms are multiplied by a reflectivity constant between 0 and 1. See paper for more details.

Build demo scenes

Probably a house with some walls/doors in it for one of the scenes. A cathedral or concert hall for another. Perhaps an indoor shooting range. We could also have a scene that contains outdoor portions.

Find boundaries between partitions

After performing rectangular decomposition on a scene, we will have a set of partitions. When loading these into the simulation, we need to find any shared boundaries between them.

3D Interface Handling

I tested ARD in 3D case using MATLAB, there are two partitions, but the interface didn't behave as expected. The wave can pass the interface, but large error arose either. The figure shows the pressure values at a horizon slice of 3D space.
3d_interface
3d_interface

Build simple walking demo

Straight forward. Once we have a demo scene to work with, we need to use the game engine to build up a demo where the user can simply walk around the scene, and maybe look around a bit.

Build sound rendering engine

This will be tough, and probably split into smaller tasks later. We need to build an engine that can import our simulation files, and then given an audio source and a listener position, determine what the output sound should be over time.

Record demos

Once the project is in a working state, we need to test it on a few demo scenes and record some demos. We'll have to decide on some sounds or music to play in the scene that represent the power of our project.

Rename project files

The project files are called "AudioSimSDL", which was a super temporary name. I can rename these to AcousticSimulator.

Find a game engine to integrate with

This is likely harder than it seems. We have to evaluate various game engines, and figure out which would work best for a simple walking/listening demo. Unity or Unreal are probably overkill, but we could still consider them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.