20-10-2025, 12:19 PM
(This post was last modified: 20-10-2025, 12:23 PM by josemendez.)
(20-10-2025, 11:55 AM)Qriva0 Wrote: Where is that part of code that is affected by this? I checked bend constraint and yes compliance is added to weights of invRotMasses, but except that place is there anything else?
This is actually handled by stretch/shear constraints. These have a 4*invRotMass*sqr(restLength) term in the denominator. Note that only the mass of the current rod element is considered, it's not considering adjacent elements so it basically accounts for rotational inertia: how much of the displacement is shear in "rest space" and how much of it actually rotates the element.
See the original paper for details: https://animation.rwth-aachen.de/media/p...t-Rods.pdf
(20-10-2025, 11:55 AM)Qriva0 Wrote: I tested weights some time ago and I could not find difference in bending when mass was small or big, the only important thing was relation of masses.
There is quite a large difference in rod behavior when changing rotational mass. Test any of the sample scenes by changing the rotational mass of rod control points.
(20-10-2025, 11:55 AM)Qriva0 Wrote: Yeah, I just double ask, because I expected the same result you described, so it should mean there is some other setting or script changing my movement.
I need to inspect my scene then, unless you can see something.
Code:private Vector4 CalculateSpringForce(Vector3 currentPosition, Vector3 targetPosition, Vector3 velocity)
{
Vector3 delta = targetPosition - currentPosition;
Vector3 direction = delta.normalized;
Vector3 projectedVelocity = Vector3.Dot(direction, velocity) * direction;
Vector3 force = stiffness * delta - projectedVelocity * damping;
return Vector3.ClampMagnitude(force, maxSpringVelocity);
}
// Spring force is calculated in OnSimulationStart [...]
Vector3 force = CalculateSpringForce(currentPosition, targetPosition, solver.velocities[solverIndex]);
solver.velocities[solverIndex] += deltaTime * force;
Can't see anything suspicious here. Keep in mind that your damping depends on current velocity, and that current velocity can be affected by mass (via constraints, aerodynamics, etc), so that is a way that mass could change overall spring behavior.
(20-10-2025, 11:55 AM)Qriva0 Wrote: Last question to this topic - is collision different for single particle with static collider when mass is different? I guess friction is affected, but except that is there any difference for mass 1 or 100? Larger depenetration, some bounce or anything like that?
Nope, depenetration against a static collider is not affected by mass. Only by penetration distance.
Note that extremely large or extremely small mass values can affect collision behavior due to floating point accuracy, I've seen this before in some user scenes.

