By storing the nearest planes every frame instead of recalculating it for every face
By adding a new way to update active faces after “flip edges”
By calculating UV offset every frame instead of each time the UVs are needed
Found and fixed errors
Eigen decomposition was not working correctly, 2 elements of the matrix were swapped
Made an error while calculating the aspect ratio of the triangle leading to smaller than expected values
Some of the matrices were transposed which lead to wrong calculations
The remeshing step now respects the initial mesh structure and does not affect original vertices. Although this is useful, it is debatable that the remeshing step should preserve the overall structure not necessarily the original vertices. Need to discuss this with mentor.
Starting to implement the first caching method
Have run into the issue of the entire cloth modifier structure getting deleted every time the cache is invalidated, possible fix is to have a special function for freeing the modifier when adaptive cloth simulation is active
Plan for the following week:
Continue to fix bugs that lead to instability
Continue to implement caching
Continue to add back support for pinned vertices and sewing
@Sleeper_G I will make the tutorial once GSoC is done, although the documentation will be enough to understand how to use it.
@MarcoG It is not part of the GSoC proposal but there was a proposal for the same created a long time back https://developer.blender.org/T30941. Maybe it can be merged in sometime soon.
Since you are already talking about making tutorials after GSoC, does that mean that the odds are good that this will be accepted into the main branch?
If cloth has sewing edges, new sewing edges are automatically added when an edge between 2 sewing edges is subdivided. If the opposite side edge can be subdivided, it subdivides the edge and creates a new edge between the 2 newly created vertices, if the opposite edge cannot be subdivided, it creates a new edge between one of the existing vertices of the opposite edge.
Caching system is nearly implemented
Caching works if playback is started from the first frame, but fails if playback is started from any other frame, need to find a way to prevent this from happening.
UI changes
It is now possible to turn off adaptive remeshing.
Added option for choosing between static and dynamic remeshing.
Fix bugs that lead to instability
Most notably, BMesh vertices that were killed during collapse edges were not being reflected on the cloth vertices, this has now been fixed.
Worked on fixing bugs and worked on caching (in separate branch)
Added custom method for collapsing an edge
The BMesh method for collapsing an edge lead to some mesh artifacts, so added a method to collapse an edge which maintains triangulation.
Initially, the bug seemed to be in split edges, so I implemented two other ways for splitting an edge and maintaining triangulation of the mesh. Need to see which method is most optimized and remove the rest.
Yes its a bug, caching has not been implemented completely which leads to the mesh jumping back to the original shape. I hope to get back to this project soon
Thanks for the reply, although when you hit play the mesh continues of from where it left on from the last time the simulation was running and this keeps happening until you change a parameter within the cloth settings.