No script, just an idea for those far more experienced than me.
What I was thinking was this - now that we have mesh deflections and whatnot, how about using particles as a base for cloth simulation? It would run like this:
- User selects Mesh
- Script records position of vertices of mesh at start of script
- Script converts vertices into particles (basically free-floating vertices)
- Script converts another object into a deflector
- Script moves forward one frame, calculates new position of particles in relation to the Deflector mesh ( and some kind of user defined external force, like gravity or something at X.XXm/s in X direction relative to mesh)
- Script turns particles back into vertices and rejoins into mesh.
- Loop, continue.
Of course, some work would have to account for making sure the particles don’t move to far apart (shear and strech forces so that the Mesh don’t spill all over the place) and some work on the deflection, but I was thinking about it and it made sense to me.
Basically, the particles would ‘fall’ around the deflector and be converted into a mesh. Some additions would be the ability to ‘pin’ certain vertices (particles) to the deflector so that the cloth can be fixed to something and some sort of ‘Wind’ direction or something.
Ideas? Comments? Tomatoes?