A raytracer for impulse responses (for reverb), influenced by raster graphics lighting techniques. Uses OpenCL for IMMENSE SPEED.
Only tested on Mac OS X Yosemite.
Mostly C++11, but uses generic lambda parameters from C++1y, so you'll need a fairly modern C++ compiler to build. You'll also need CMake to build.
You need the following libraries installed in a standard location (probably /usr/local/lib, /usr/local/include) so that CMake can find and link them:
- FFTW (fftw3f)
- Assimp
- Libsndfile
- rapidjson (although this is header-only)
If you're on a Mac with homebrew you can set-up and build with:
# install cmake and libraries with simple builds
brew install cmake fftw libsndfile
# rapidjson is a bit special because it doesn't have a stable branch
brew install --HEAD homebrew/head-only/rapidjson
# assimp doesn't build a static library by default, so you need to edit the
# homebrew forumula
brew edit assimp
# then change the install function to
#
# def install
# args = std_cmake_args
# args << "-DBUILD_SHARED_LIBS=OFF"
# system "cmake", ".", *args
# system "make", "install"
# end
#
# save, and exit the editor
# now install your shiny custom assimp
brew install assimp --build-from-source
cd <path to repo>
mkdir build
cd build
cmake ..
make
# optional
make package
IMPORTANT! don't make install
- the install targets are set up to produce
a packaged distribution, so you'll end up with a lot of unnecessary extras
installed in /usr/local if you run this.
Once the libraries all have CMake builds of their own I might add git submodules for them.
On Mac OS X the OpenCL framework is used. Obviously this isn't something that Linuxes have, so at some point I'll try making the build a bit more platform agnostic, to see if it will run on Linux as well.
Want docs?
First you'll need to brew install doxygen
.
Then basic but pretty docs can be generated by running doxygen
in the root
dir of the project.
Should run on any recent Mac running 10.9 or newer with a discrete graphics card. Might also work on systems with integrated graphics, but this has not been tested.
A pretty version of the program's man page can be found in the cmd
folder
(named parallel_raytrace.1.md.pdf).
This should serve as a quick introduction, and get you started running the
software.
Example models and configuration files are found in the assets
folder,
and some example runs are found in demo/gen.sh
.
If you have a local copy of the repository, and you've run make install
from
your build folder, you should be able to cd
into the demo
folder and then
run ./gen.sh
to generate a whole bunch of sample impulse-responses.
This program depends on FFTW3, which is licensed under the GNU GPL. This software is therefore also licensed under the GNU GPL.
- assets - example models and config files
- cmd - command-line program using the rayverb library
- demo - scripts for generating impulses, and a max/msp convolver for testing
- filter_test - python scripts for testing different crossover filter types
- hrtf_analysis - python scripts for generating and plotting multiband hrtf data
- include - any non-original headers that are required by the project
- rayverb - the main raytracing library
- tests - simple unit tests
- viewer - a Processing sketch to plot ray paths