Advertisement

Rotational spring stiffness?

Started by June 06, 2016 04:32 PM
3 comments, last by adriansnetlis 8 years, 4 months ago

So I'll show all the examples in 2D.

This is a simple way how could I model a very thin flat plane for softbody physics. It would not collapse.

[attachment=32154:problem1.png]

However, it does require way more nodes and springs(and that way also equations) aswell as more time spent on setting up such a mesh. This is what this mesh would be usually made like by artist.

[attachment=32155:problem2.png]

However, in this case there wouldn't be any exchange support that would help it conserve it's shape. And so it wouldn't need any strong impact to deform - it would deform naturally as if it was a piece of cloth.

I need to find a solution to ensure that those nodes in second image somehow gets lifted up by some rotating force. Propably it must be some sort of the edge(spring) alignment, I'm not sure. I don't know how engines like Beam deals with this, but they definetly have fixed this issue.

Oh, and note - I need it in 3D.

Take a look at your last spring composed of 3 vertices. There are two end vertices, and one in the middle. If we lay the vertices all out on a line there is no bend. Then create another spring between the first and last vertex (so it passes through the middle one). This new spring is sometimes called the "bend spring", or something like that. Whenever the 3-vertex chain bends this new spring will push the bend to straighten out.

No new fancy "rotational spring" needs to be used :)

Advertisement

oh... OK! So for each intersection node I need it's neighbours to have one additional node? Sounds reasonable. Thanks, I didn't think of this:)

Take a look at your last spring composed of 3 vertices. There are two end vertices, and one in the middle. If we lay the vertices all out on a line there is no bend. Then create another spring between the first and last vertex (so it passes through the middle one). This new spring is sometimes called the "bend spring", or something like that. Whenever the 3-vertex chain bends this new spring will push the bend to straighten out.

Yes... except that for small bending angles, the displacement of the end particles (up/down in the OP's diagram) will be mostly orthogonal to the direction along which the spring acts (left-right). So I'd expect the proposed new spring would be effective at preventing substantial bends, but not very effective for keeping a plane flat when it is supposed to not bend very much at all.

If you want to represent very stiff planes, then it might be better to consider adding a spring between the centre particle and the mid-point between the end particles. You will then need to consider how to map the force applied to the mid point to the particles themselves (trivial if all the links have the same rest length, and the particles have the same mass) - you need to make it so that momentum is preserved. If you do this then for small angles, the spring force will be approximately proportional to the bending angle, which is probably what is desired.

Alternatively, it might be even better and just as quick to do the job properly: labelling the particles 1-2-3, take the cross-product between the directions 1-2 and 2-3. This is proportional to the torque vector you want to apply, and the pairs of linear forces will be given by the cross-product between this and each of the deltas 1-2, and 2-3 (divided by the squared delta magnitudes) - since torque = delta x force. You apply a force f1 to particle 1, and apply -f1 to particle 2. Similarly apply f3 to particle 3 and -f3 to particle 2. This preserves momentum. You don't need any trig functions for this, and if you can precalculate the delta lengths, then you might not need any square roots either.

Hm... Intesesting. But complex. Requires somem more math. I'll take a look at this aswell. Maybe it will be optional.:)

This topic is closed to new replies.

Advertisement