{"id":17908163,"url":"https://github.com/windqaq/mpm","last_synced_at":"2025-03-23T20:31:02.536Z","repository":{"id":64111191,"uuid":"136483056","full_name":"WindQAQ/MPM","owner":"WindQAQ","description":"Simulating on GPU using Material Point Method and rendering.","archived":false,"fork":false,"pushed_at":"2018-06-22T13:17:15.000Z","size":12681,"stargazers_count":108,"open_issues_count":2,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-19T00:25:15.521Z","etag":null,"topics":["cuda","gvdb-voxels","material-point-method","raytracer","simulation","thrust"],"latest_commit_sha":null,"homepage":"https://windqaq.github.io/MPM/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WindQAQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-07T13:41:05.000Z","updated_at":"2025-03-18T02:13:51.000Z","dependencies_parsed_at":"2023-01-14T22:31:19.639Z","dependency_job_id":null,"html_url":"https://github.com/WindQAQ/MPM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindQAQ%2FMPM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindQAQ%2FMPM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindQAQ%2FMPM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindQAQ%2FMPM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WindQAQ","download_url":"https://codeload.github.com/WindQAQ/MPM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245164804,"owners_count":20571186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cuda","gvdb-voxels","material-point-method","raytracer","simulation","thrust"],"created_at":"2024-10-28T19:14:46.334Z","updated_at":"2025-03-23T20:31:01.029Z","avatar_url":"https://github.com/WindQAQ.png","language":"C","readme":"# MPM Simulation \u0026 Voxels Rendering\n\n![gpgpu free fall](images/gpgpu_free_fall_01250_1200x800.png)\n\nThis is the final project for the course, *General-Purpose GPU Programming* @ NTU CSIE.\n\nWe model and simulate fluid-like materials, such as snow and sand, using material point method. MPM is implemented in C++ \u0026 CUDA. And OpenGL is used for real-time result viewing. Besides, for high quality rendering, we use NVIDIA GVDB + OptiX Ray Tracing Engine.\n\n### Overview\n\n![Material point method overview](images/mpm_overview.png)\n\nThe material point method (MPM) is a numerical technique used to simulate the behavior of solids, liquids, gases, and any other continuum material. In the MPM, a continuum body is described by a number of small Lagrangian elements referred to as 'material points'. These material points are surrounded by a background mesh/grid that is used only to calculate gradient terms such as the deformation gradient. For more information, please go to [Material point method - Wikipedia](https://en.wikipedia.org/wiki/Material_point_method)\n\n### Implementations\n\nFor more details about implementation, please go to our [Project Page](https://windqaq.github.io/MPM/)\n\n### Dependencies\n\n##### Required\n\n- CUDA\n- [OpenGL](https://learnopengl.com/)\n- [GLFW](http://www.glfw.org/)\n- [OpenGL Mathematics (GLM)](https://glm.g-truc.net/0.9.9/index.html)\n\nThe following libraries has been put into this repository,\n\n- [Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page)\n- [svd3](https://github.com/ericjang/svd3)\n- [stb_image](https://github.com/nothings/stb)\n- [glad](https://github.com/Dav1dde/glad)\n\n##### Optional\n\nFor high quality rendering as screenshots,\n\n- [GVDB-Voxels](https://github.com/NVIDIA/gvdb-voxels)\n- [NVIDIA OptiX](https://developer.nvidia.com/optix)\n\nTo generate videos from saved rendered frames,\n\n- [FFmpeg](https://www.ffmpeg.org)\n\n### How to Build\n\nSource code are put in `inc/` and `src/`. To compile the simulation program, simply type `make`. Compiled objects would appear in `obj/`, and there would be the executable file in root directory of the repository.\n\nTo compile the rendering program, *GVDB-Voxels* library and *Nvidia OptiX* ray tracing engine are needed. So please build *gvdb-library* at first. Then build the code in directory, `gPointCloud/`, which is modified from the sample code. For more information, please go to [NVIDIA/gvdb-voxels](https://github.com/NVIDIA/gvdb-voxels).\n\n### How to Run\n\nFirst of all, run `make` to generate the executable. Then prepare your own configuration file with format as follows:\n```\nmodel=MODEL\n```\nwhere `MODEL` is a JSON file formatted as:\n```json\n{\n  \"model1\": {\n    \"path\": \"PATH\",\n    \"translate\": [50.0, 0.0, 50.0],\n    \"scale\": 0.5,\n    \"mass\": 0.000026,\n    \"velocity\": [0.0, -10.0, 0.0],\n    \"hardening\": 15.0,\n    \"young\": 1.4e5,\n    \"poisson\": 0.2,\n    \"compression\": 5.0e-2,\n    \"stretch\": 5.0e-2\n  }\n}\n```\nThe `PATH` is the ascii point cloud file where each line contains three values `x y z` seperated by a single space, and other parameters  depend on your model setting. Finally, run\n```sh\n./test --config CONFIG_FILE\n```\nto simulate using MPM and render with OpenGL!\n\n### Screenshots\n\n##### Letters falling scene\n\n![gpgpu free fall crashed completely](images/gpgpu_free_fall_04000_800x600.png)\n\n##### Two snow balls crashed each other\n\n![two snow balls crashed each other](images/two_snow_balls.png)\n\n### References\n\n##### Papers\n\n- [Multi-species simulation of porous sand and water mixtures](https://www.math.ucla.edu/~jteran/papers/PGKFTJM17.pdf)\n- [A material point method for snow simulation](https://www.math.ucla.edu/~jteran/papers/SSCTS13.pdf)\n\n##### Other Implementations\n\n- [Azmisov - snow](https://github.com/Azmisov/snow)\n- [JAGJ10 - Snow](https://github.com/JAGJ10/Snow)\n- [utilForever - SnowSimulation](https://github.com/utilForever/SnowSimulation)\n\n### Contact\n\nIssues and pull requests are welcomed, so are stars! ^_^ Feel free to contact project owner [Sung Tzu-Wei](mailto:windqaq@gmail.com), or contributors [Yist Lin](mailto:yishen992@gmail.com) and [Chen Li-Yu](mailto:jcly.rikiu@gmail.com).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindqaq%2Fmpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindqaq%2Fmpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindqaq%2Fmpm/lists"}