Skip to content

mollnn/bound-caustics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bernstein Bounds for Caustics

Code for SIGGRAPH 2025 (ToG) paper "Bernstein Bounds for Caustics"

[Paper] [Supplementary] [Video (Compressed)]

Build

The implementation includes the precomputation end and the rendering end.

  • Precomputation: We have Python implementation for all cases, which is easy to run.

    • Only single scattering case has C++ implementation (integrated in mitsuba).
    • Double scattering is speeded up using Numba (batch/), which, unfortunately requires several minites to compile each time and we currently failed to cache the compiled file properly due to some limitations of Numba in handling complex global objects.
  • Rendering: We based on the code of specular polynomials. I copied the building instructions below:

    The project is based on https://github.com/VicentChen/mitsuba. Please install the dependency first. (I provide a precompiled version for msvc at https://github.com/mollnn/mitsuba0.6-dep-py3.9.12)

    cd mts1
    mkdir cbuild
    cd cbuild
    cmake ..
    

    Then build the generated project in cbuild. Tested on Windows 10, Visual Studio 2022. The implementation builds upon Mbglints and CyPolynomials.

Reproduce

I plan to release code for almost all figures. Unfortunately, some experiments rely on local code modifications, so putting them all together needs time.

  • Fig. 09: demonstration of how to convert position/irradiance bounds into distributions. In the directory 2d/fig09, run run_main_top/bottom.py. You can choose the _latex variant to generate the paper figure, which however needs a latex environment.

    • Bonus: To visualize the computation process of polynomials expressed in Bernstein basis, please try 2d/mid/run_main.py. We show the polynomials (curves) and their control points (dots). result This figure is not shown in the paper because of some formatting inconvenience. Nevertheless, I still feel it's helpful for understanding.
  • Fig. 10: ablation on multi-sample estimators. Please run test/fig_plane/cmp_sample.py.

  • Fig. 13 (top): main experiment (single reflection). Please run test/fig_plane/test.py.

  • Fig. 13 (bottom): main experiment (single refraction). Please run test/fig_sphere/test.py.

  • Fig. 14 (top): main experiment (double refraction). Modify batch/alias.py according to test/fig_slab/alias.md and then run batch/run_mesh.py to generate the distribution file. Finaly, run test/fig_slab/test.py.

  • Fig. 14 (bottom): main experiment (double refraction). Modify batch/alias.py according to test/fig_diamond/alias.md and then run batch/run_mesh.py to generate the distribution file. Finaly, run test/fig_diamond/test.py.

  • Fig. 20: "failure" case (single refraction). Please run test/fig_pool/test.py.

Acknowledgement

Some scenes are modified from SMS. The implementation builds upon Mbglints and CyPolynomials. We sincerely thank the authors for kindly release their code and scenes, as well as their great works. We also include a locally modified version of https://github.com/Mira-13/figure-gen.

About

Code for SIGGRAPH 2025 (ToG) paper "Bernstein Bounds for Caustics"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published