It think it would be really cool to implement a trimesh deformation feature in Gamma.
I don’t know if there are already complex physic formulaes, but I had the following reflexion :
- Basically the way an object can be deformed is defined by three parameters :
- The “hardness”, 1 means it cannot be deformed, 0 means when there’s one contact the whole object is deformed
- The “elasticity”, 1 means the object, after it has been deformed, “return” completely to its initial shape
- Implementation should be simple :
- When there’s a collision detection, we take the vertices that are near the collision point and move them in the direction of the contact normal, and we take all vertices in a larger radius and apply them a “softer” deformation
- At each step of the simulation, depending on the elasticity, we interpolate each point to its initial position
Has anyone ideas/commentary/source code/experience about that ?
Thx for advance