I need to implement a grid made of stiff wires (let's say metal).
It must be something like this

I decided to try to use soft body for this purpose. I created a flat square soft body (like cloth). For better stiffness of this soft body I used :
Code: Select all
generateBendingConstraints( 2 );
But it had problems with collisions. I created the thin soft body instead of flat plane. There is a model:

I've tried to use clusters (CL_RS) and SDF (SDF_RS) for collision detection and "Velocities" and "Positions" solvers for dynamics. But none of combination gives good enough behavior.
Here are the parameters:
Code: Select all
m_cfg.kDP = 0; // Damping coefficient [0,1]
m_cfg.kPR = 0; // Pressure coefficient [-inf,+inf]
m_cfg.kDF = 1; // Dynamic friction coefficient [0,1]
m_cfg.kCHR = 1; // Rigid contacts hardness [0,1]
m_cfg.kKHR = 1; // Kinetic contacts hardness [0,1]
m_cfg.kSHR = 1; // Soft contacts hardness [0,1]
m_cfg.kSRHR_CL = 1; // Soft vs rigid hardness [0,1] (cluster only)
m_cfg.kSKHR_CL = 1; // Soft vs kinetic hardness [0,1] (cluster only)
m_cfg.kSSHR_CL = 1; // Soft vs soft hardness [0,1] (cluster only)
m_cfg.viterations = 0; // Velocities solver iterations
m_cfg.piterations = 8; // Positions solver iterations
m_cfg.diterations = 16; // Drift solver iterations (used with "Velocities" solver mode)
All rigid bodies are static (i.e. mass = 0, and btCollisionObject::CF_STATIC_OBJECT flag is set).
When I run the simulation with CL_RS flag, it behaves so:
http://youtu.be/wwg9RDK3Lcc
I tried to change viterations to 4 and call setSolver(eSolverPresets::Velocities)
Then the collision was even worse:
http://youtu.be/zlEnYwMKdBw
If I change collision flags to SDF_RS, it lies almost still on the ground, but there is not many vertices and the collision with other objects is bad:
http://youtu.be/nyJ9DPpnUoM
I need this grid to be placed around the tube (it has convex collision shape now) like this:

Could anyone help me to understand in what direction I could think to solve this problem?