Cloth simulation for Godot. Created to make realistic cloaks in my project. Sadly not very user friendly, I'm quite new and dunno how to integrate some feauters with editor. There are settuped as Script variables
Download reposity and load it as project in godot. Open Test1.tscn(showcase) or Test2.tscs(Benchmark) under ClothSimulation dir and press f6 to run.
If it's to laggy(shouldn't be too much but tested only on my i5-7300hq, older u series processors can have problems) decrease interpolation steps of nodes useing right pane.
- Add cloth node
- Add Polygon2d to scene, and att VerletPolygon.gd script to it.
- In Polygon2D uv editor setup points and add Polygons, Script will automaticly setup desired Verlet simulation and update polygon points position with simulation resoults.
- Set up Static verticles script variable to anchor desired points.
(check index of desired vertexes e.g in data/uv of polygon and add to parameter list)
Code documention stored in VerletPolygon/VerletPolygon.md file.
- Add option to interpolate only edges: smaller amunt of vertices is barery visible on places with lesser amount of details, making so will increase performace by decreasing number of vertices and connections without big quality decrease
- Add weight to simulated vertices
- Rewrite verlet engine as c++/C#(slower but easier to integrate with engine) module for better performace