This project implements and builds upon the method described in the paper Poisson-Based Continuous Surface Generation for Goal-Based Caustics.
Result simulated with Blender using LuxRender:
- Implementation of the Poisson-based continuous surface generation algorithm.
- exports a solidified .obj
- the only c++17 non-standard dependancy is libpng
- can export the the inverse transport map
- multithreaded poisson solver
- C++ compiler with C++17 support for your platform
- libpng (requires zlib)
-
Clone the repository:
git clone git@github.com:dylanmsu/caustic_engineering.git
-
Navigate to the project directory:
cd caustic_engineering
-
Compile the source code:
# create build directory mkdir build && cd build # generate build files cmake .. # build make
-
Run the code:
./CausticEngineering [parameters]
-
Clone the repository:
git clone git@github.com:dylanmsu/caustic_engineering.git
-
Navigate to the project directory:
cd caustic_engineering
-
Compile the source code:
# create build directory mkdir build && cd build # generate build files (assumes C:/mingw64 to be the mingw64 path) & "C:/mingw64/bin/cmake.exe" -G "MinGW Makefiles" .. # build & "C:/mingw64/bin/mingw32-make.exe"
-
Run the code:
./CausticEngineering.exe [parameters]
-
Parameters:
-
--intput_png=[image path] # input image path
-
--res_w=[grid resolution] # mesh resolution in the x-axis
-
--width=[mesh width] # physical width of the mesh
-
--focal_l=[focal length] # focal length
-
--thickness=[lens thickness] # thickness of the final caustic lens
-
--max_threads=[max number of threads] # sets the maximum cpu threads for the poisson solver
-
-
Execute the program:
./CausticEngineering.exe --intput_png=../img/siggraph.png --res_w=100 --width=0.5 --focal_l=1.5 --thickness=0.1 --max_threads=16
input_image | parameterization | inverted parameterization | 3d_model | simulation | |
---|---|---|---|---|---|
Lena (Mesh: 256 x 256) | |||||
Siggraph logo (Mesh: 200 x 200) | |||||
Hello World (Mesh: 256 x 128) |
transport from an image to an almost uniform distribution:
Shadow of the machined prototype:
- least squares solver for the heightmap -> this will allow more freedom in the lens design
- reflective caustics -> is currently not that usefull because of the limited freedom in the height solver
- circular caustic lenses
- use the fast transport map algoritm from the paper: [https://gnader.github.io/publications/2018-ot-transport.html](Instant Transport Maps on 2D Grids)
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature
) - Make your changes
- Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature
) - Create a new Pull Request
This project uses the MIT License.
Thank you to Yue et al for their awesome research paper.
I would also like to thank Matt Ferraro for providing their informative article about the paper.