Repository for the code from my MSc project titled Physically Based Rendering of Ice Crystal Halos.
Consists of a phase function plugin for the Mitsuba renderer written in C++, and a MATLAB script for pre-computing the tabulated phase function.
- Compile (with optimizations) ics_function and write_out using MATLAB Coder
- Run script.m producing .data file
- Read Mitsuba documentation for details on how to compile Mitsuba
- Copy icecrystal.cpp to the mitsuba/src/phase directory
- Add
plugins += env.SharedLibrary('icecrystal', ['icecrystal.cpp'])
to the SConscript file - Compile Mitsuba
- Follow Mitsuba documentation for creating a scene with a heterogeneous participating media
- Set the medium's phase function to icecrystal
- Set the string parameter filename under icecrystal to the path of the generated file
- Render away!