├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── cmake └── Modules │ ├── FindAssimp.cmake │ └── FindGLM.cmake ├── external ├── CL │ └── cl.hpp └── CMakeLists.txt ├── kernels ├── cloth_simulation.cl ├── common │ ├── ClothMesh.cl │ └── Mesh.cl ├── counting_sort.cl ├── geometry.cl └── predict_positions.cl ├── main.cpp ├── res ├── default.json ├── models │ ├── .mayaSwatches │ │ └── carpet.png_hcm.swatch │ ├── carpet │ │ ├── carpet-normal.png │ │ ├── carpet-specular.png │ │ ├── carpet.mtl │ │ ├── carpet.obj │ │ └── carpet.png │ ├── marker │ │ ├── marker-diffuse.png │ │ ├── marker.mtl │ │ └── marker.obj │ ├── plane │ │ ├── plane.mtl │ │ └── plane.obj │ ├── simple │ │ ├── simple.mtl │ │ └── simple.obj │ └── yarn-ball │ │ ├── yarn-ball-diffuse.png │ │ ├── yarn-ball-normal.png │ │ ├── yarn-ball-specular.png │ │ ├── yarn-ball.mtl │ │ └── yarn-ball.obj ├── params │ └── default.json └── setups │ ├── cloth_sheet.json │ └── simple.json ├── shaders ├── axis.frag ├── axis.vert ├── checkerboard.frag ├── marker.frag ├── marker.vert ├── simple.frag └── simple.vert ├── src ├── Application.cpp ├── Application.hpp ├── BaseScene.hpp ├── ClothSimulationScene.cpp ├── ClothSimulationScene.hpp ├── SceneSetup.cpp ├── SceneSetup.hpp ├── geometry │ ├── ClothMesh.cpp │ ├── Mesh.cpp │ ├── Mesh.hpp │ ├── MeshLoader.cpp │ ├── MeshLoader.hpp │ └── geometry.hpp ├── rendering │ ├── BaseShader.hpp │ ├── BaseShader.inl │ ├── Camera.cpp │ ├── Camera.hpp │ ├── MeshObject.cpp │ ├── MeshObject.hpp │ ├── RenderObject.hpp │ ├── SceneObject.cpp │ ├── SceneObject.hpp │ ├── Texture.hpp │ └── light │ │ ├── Attenuation.hpp │ │ ├── DirectionalLight.cpp │ │ ├── DirectionalLight.hpp │ │ ├── Light.cpp │ │ ├── Light.hpp │ │ ├── PointLight.cpp │ │ └── PointLight.hpp ├── simulation │ ├── ClothSimParams.cpp │ ├── ClothSimParams.hpp │ ├── Grid.hpp │ └── geometry.hpp └── util │ ├── OCL_CALL.cpp │ ├── OCL_CALL.hpp │ ├── cl_util.hpp │ ├── make_unique.hpp │ ├── math_util.cpp │ ├── math_util.hpp │ ├── paths.hpp │ └── tictoc.hpp └── video.gif /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | build/ 3 | output/ 4 | 5 | res/maya_models -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/.gitmodules -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/README.md -------------------------------------------------------------------------------- /cmake/Modules/FindAssimp.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/cmake/Modules/FindAssimp.cmake -------------------------------------------------------------------------------- /cmake/Modules/FindGLM.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/cmake/Modules/FindGLM.cmake -------------------------------------------------------------------------------- /external/CL/cl.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/external/CL/cl.hpp -------------------------------------------------------------------------------- /external/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/external/CMakeLists.txt -------------------------------------------------------------------------------- /kernels/cloth_simulation.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/cloth_simulation.cl -------------------------------------------------------------------------------- /kernels/common/ClothMesh.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/common/ClothMesh.cl -------------------------------------------------------------------------------- /kernels/common/Mesh.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/common/Mesh.cl -------------------------------------------------------------------------------- /kernels/counting_sort.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/counting_sort.cl -------------------------------------------------------------------------------- /kernels/geometry.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/geometry.cl -------------------------------------------------------------------------------- /kernels/predict_positions.cl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/kernels/predict_positions.cl -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/main.cpp -------------------------------------------------------------------------------- /res/default.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/default.json -------------------------------------------------------------------------------- /res/models/.mayaSwatches/carpet.png_hcm.swatch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/.mayaSwatches/carpet.png_hcm.swatch -------------------------------------------------------------------------------- /res/models/carpet/carpet-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/carpet/carpet-normal.png -------------------------------------------------------------------------------- /res/models/carpet/carpet-specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/carpet/carpet-specular.png -------------------------------------------------------------------------------- /res/models/carpet/carpet.mtl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/carpet/carpet.mtl -------------------------------------------------------------------------------- /res/models/carpet/carpet.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/carpet/carpet.obj -------------------------------------------------------------------------------- /res/models/carpet/carpet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/carpet/carpet.png -------------------------------------------------------------------------------- /res/models/marker/marker-diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/marker/marker-diffuse.png -------------------------------------------------------------------------------- /res/models/marker/marker.mtl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/marker/marker.mtl -------------------------------------------------------------------------------- /res/models/marker/marker.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/marker/marker.obj -------------------------------------------------------------------------------- /res/models/plane/plane.mtl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/plane/plane.mtl -------------------------------------------------------------------------------- /res/models/plane/plane.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/plane/plane.obj -------------------------------------------------------------------------------- /res/models/simple/simple.mtl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/simple/simple.mtl -------------------------------------------------------------------------------- /res/models/simple/simple.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/simple/simple.obj -------------------------------------------------------------------------------- /res/models/yarn-ball/yarn-ball-diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/yarn-ball/yarn-ball-diffuse.png -------------------------------------------------------------------------------- /res/models/yarn-ball/yarn-ball-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/yarn-ball/yarn-ball-normal.png -------------------------------------------------------------------------------- /res/models/yarn-ball/yarn-ball-specular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/yarn-ball/yarn-ball-specular.png -------------------------------------------------------------------------------- /res/models/yarn-ball/yarn-ball.mtl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/yarn-ball/yarn-ball.mtl -------------------------------------------------------------------------------- /res/models/yarn-ball/yarn-ball.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/models/yarn-ball/yarn-ball.obj -------------------------------------------------------------------------------- /res/params/default.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/params/default.json -------------------------------------------------------------------------------- /res/setups/cloth_sheet.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/setups/cloth_sheet.json -------------------------------------------------------------------------------- /res/setups/simple.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/res/setups/simple.json -------------------------------------------------------------------------------- /shaders/axis.frag: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/axis.frag -------------------------------------------------------------------------------- /shaders/axis.vert: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/axis.vert -------------------------------------------------------------------------------- /shaders/checkerboard.frag: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/checkerboard.frag -------------------------------------------------------------------------------- /shaders/marker.frag: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/marker.frag -------------------------------------------------------------------------------- /shaders/marker.vert: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/marker.vert -------------------------------------------------------------------------------- /shaders/simple.frag: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/simple.frag -------------------------------------------------------------------------------- /shaders/simple.vert: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/shaders/simple.vert -------------------------------------------------------------------------------- /src/Application.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/Application.cpp -------------------------------------------------------------------------------- /src/Application.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/Application.hpp -------------------------------------------------------------------------------- /src/BaseScene.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/BaseScene.hpp -------------------------------------------------------------------------------- /src/ClothSimulationScene.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/ClothSimulationScene.cpp -------------------------------------------------------------------------------- /src/ClothSimulationScene.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/ClothSimulationScene.hpp -------------------------------------------------------------------------------- /src/SceneSetup.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/SceneSetup.cpp -------------------------------------------------------------------------------- /src/SceneSetup.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/SceneSetup.hpp -------------------------------------------------------------------------------- /src/geometry/ClothMesh.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/ClothMesh.cpp -------------------------------------------------------------------------------- /src/geometry/Mesh.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/Mesh.cpp -------------------------------------------------------------------------------- /src/geometry/Mesh.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/Mesh.hpp -------------------------------------------------------------------------------- /src/geometry/MeshLoader.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/MeshLoader.cpp -------------------------------------------------------------------------------- /src/geometry/MeshLoader.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/MeshLoader.hpp -------------------------------------------------------------------------------- /src/geometry/geometry.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/geometry/geometry.hpp -------------------------------------------------------------------------------- /src/rendering/BaseShader.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/BaseShader.hpp -------------------------------------------------------------------------------- /src/rendering/BaseShader.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/BaseShader.inl -------------------------------------------------------------------------------- /src/rendering/Camera.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/Camera.cpp -------------------------------------------------------------------------------- /src/rendering/Camera.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/Camera.hpp -------------------------------------------------------------------------------- /src/rendering/MeshObject.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/MeshObject.cpp -------------------------------------------------------------------------------- /src/rendering/MeshObject.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/MeshObject.hpp -------------------------------------------------------------------------------- /src/rendering/RenderObject.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/RenderObject.hpp -------------------------------------------------------------------------------- /src/rendering/SceneObject.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/SceneObject.cpp -------------------------------------------------------------------------------- /src/rendering/SceneObject.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/SceneObject.hpp -------------------------------------------------------------------------------- /src/rendering/Texture.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/Texture.hpp -------------------------------------------------------------------------------- /src/rendering/light/Attenuation.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/Attenuation.hpp -------------------------------------------------------------------------------- /src/rendering/light/DirectionalLight.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/DirectionalLight.cpp -------------------------------------------------------------------------------- /src/rendering/light/DirectionalLight.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/DirectionalLight.hpp -------------------------------------------------------------------------------- /src/rendering/light/Light.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/Light.cpp -------------------------------------------------------------------------------- /src/rendering/light/Light.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/Light.hpp -------------------------------------------------------------------------------- /src/rendering/light/PointLight.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/PointLight.cpp -------------------------------------------------------------------------------- /src/rendering/light/PointLight.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/rendering/light/PointLight.hpp -------------------------------------------------------------------------------- /src/simulation/ClothSimParams.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/simulation/ClothSimParams.cpp -------------------------------------------------------------------------------- /src/simulation/ClothSimParams.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/simulation/ClothSimParams.hpp -------------------------------------------------------------------------------- /src/simulation/Grid.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/simulation/Grid.hpp -------------------------------------------------------------------------------- /src/simulation/geometry.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/simulation/geometry.hpp -------------------------------------------------------------------------------- /src/util/OCL_CALL.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/OCL_CALL.cpp -------------------------------------------------------------------------------- /src/util/OCL_CALL.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/OCL_CALL.hpp -------------------------------------------------------------------------------- /src/util/cl_util.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/cl_util.hpp -------------------------------------------------------------------------------- /src/util/make_unique.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/make_unique.hpp -------------------------------------------------------------------------------- /src/util/math_util.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/math_util.cpp -------------------------------------------------------------------------------- /src/util/math_util.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/math_util.hpp -------------------------------------------------------------------------------- /src/util/paths.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/paths.hpp -------------------------------------------------------------------------------- /src/util/tictoc.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/src/util/tictoc.hpp -------------------------------------------------------------------------------- /video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwiberg/position-based-dynamics/HEAD/video.gif --------------------------------------------------------------------------------