{"id":19531864,"url":"https://github.com/naeioi/pbf-cuda","last_synced_at":"2025-04-26T13:32:18.797Z","repository":{"id":65238121,"uuid":"127510987","full_name":"naeioi/PBF-CUDA","owner":"naeioi","description":"Position Based Fluids CUDA implementation","archived":false,"fork":false,"pushed_at":"2022-01-17T05:34:45.000Z","size":201321,"stargazers_count":121,"open_issues_count":1,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-11-07T18:56:35.693Z","etag":null,"topics":["cuda","fluid-solver","opengl","real-time","simulation"],"latest_commit_sha":null,"homepage":"","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/naeioi.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-03-31T07:48:08.000Z","updated_at":"2023-10-31T18:10:01.000Z","dependencies_parsed_at":"2023-01-16T15:00:55.547Z","dependency_job_id":null,"html_url":"https://github.com/naeioi/PBF-CUDA","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naeioi%2FPBF-CUDA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naeioi%2FPBF-CUDA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naeioi%2FPBF-CUDA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naeioi%2FPBF-CUDA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naeioi","download_url":"https://codeload.github.com/naeioi/PBF-CUDA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224036382,"owners_count":17245034,"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","fluid-solver","opengl","real-time","simulation"],"created_at":"2024-11-11T01:44:48.559Z","updated_at":"2024-11-11T01:44:49.690Z","avatar_url":"https://github.com/naeioi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PBF-CUDA\nThis project is an implementation of **Position Based Fluids[1]** written in CUDA and modified **Screen Space Fluids Rendering[2]**\nwritten in OpenGL. \n\n## Gallery\n**Double Dam Break 32K particles** \n\n\u003cimg src=\"https://github.com/naeioi/PBF-CUDA/raw/master/figs/double-dam.png\" alt=\"Double Dam Break\" width=\"700\"\u003e\n\nSee [figs](https://github.com/naeioi/PBF-CUDA/tree/master/figs) for additonal screenshots of single dam, surface normal map and sweeping boundary scene.\n\n## Features\n**Techniques**\n- Imcompressible fluids simulation using Macklin[1]. Vorticity confinement is not implemented. \n- Screen space surface reconstruction based on Laan[2]. \n- Surface smoothed by applying bilateral filter on depth texture.\n- GPU particle neighbor searching using Green[3].\n- GUI using [NanoGUI](https://github.com/wjakob/nanogui). Talk with [wjakob](https://github.com/wjakob) last year inspired me for this project. \n\n**Evaluation** \n\nPerformance evaluated on a notebook with GTX 1050, i7-7700 HQ.\n\nUnder configuration of 4 incompressibility confinement iterations and 2 smoothing iterations each frame, \nthis implementation runs at ~30 fps with 32K particles in Double Dam Break scene (Screenshots above).\n\n## Dependencies\n- CUDA 9.1\n- Visual Studio 2017 15.4.5. \\\n  Higher version fails to build CUDA 9, as of 15.7.3. \\\n  See [Microsoft vcpkg Github issue](https://github.com/Microsoft/vcpkg/issues/2814). \n- GPU and driver support OpenGL 4.5\n\n## Licence\n[Apache License 2.0 (Apache-2.0)](https://www.apache.org/licenses/LICENSE-2.0)\n\n## References\n[1] M. Macklin and M. Müller, “Position based fluids,” ACM Trans. Graph., vol. 32, no. 4, p. 1, Jul. 2013. \\\n[2] W. J. van der Laan, S. Green, and M. Sainz, “Screen space fluid rendering with curvature flow,” in Proceedings of the 2009 symposium on Interactive 3D graphics and games - I3D ’09, 2009, p. 91. \\\n[3] S. Green, “Particle Simulation using CUDA,” cse.uaa.alaska.edu, no. September, pp. 1–12, 2013. \\\n[4] [Learn OpenGL, extensive tutorial resource for learning Modern OpenGL](https://learnopengl.com/) for great skybox tutorial. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaeioi%2Fpbf-cuda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaeioi%2Fpbf-cuda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaeioi%2Fpbf-cuda/lists"}