20-10-2025, 10:58 AM
(This post was last modified: 20-10-2025, 11:18 AM by josemendez.)
(20-10-2025, 10:33 AM)Qriva0 Wrote: Hi!
By this I meant that it does not matter what is the weight of the particle, if I add velocity directly, or particle already have velocity, then integration itself is not affected by mass (not talking about externalForces):
Code:// apply external forces and gravity:
float4 vel = velocities[i] + (inverseMasses[i] * externalForces[i] + effectiveGravity) * deltaTime;
Correct, integration is not affected by mass. It's simply advancing the position using the velocity value.
(20-10-2025, 10:33 AM)Qriva0 Wrote: This is important bit for me, however is that the case for rod itself? If every single particle had the same weight, there were no collisions at all, then would that affect rigidness?
Yes it would. Internal forces are also forces.
Rotational mass is basically how much mass must be considered when it comes to bending the rod (which is done by rotating particles). You can think of it as the physical thickness of the rod: the more mass, the thicker the rod is, and the harder it is to bend it. Compliance also plays a role in this, as it's the bending resistance of the rod's material. "More" material (more mass) and harder material (less compliance) = harder to bend.
(20-10-2025, 10:33 AM)Qriva0 Wrote: In that sense yes, as I said above I mean calculation wise, because obviously to move heavier object I need more energy.
An important thing to note is that this also applies to constraint/internal forces, not just external forces. This is why constraint lagrange multipliers (lambdas) depend on mass.
(20-10-2025, 10:33 AM)Qriva0 Wrote: When it comes to my spring, I use all particles with the same weight
Doesn't matter whether all particles have the same weight or not. What matters is the mass of the particle being applied the spring force, compared to the magnitude of the force.
(20-10-2025, 10:33 AM)Qriva0 Wrote: and actually drive velocity directly (assuming mass 1), but somehow it behaves differently.
That can't be the case: if you ignore mass, forces become accelerations and all you're doing is modifying the velocity directly. Could you share your code for the spring?
(20-10-2025, 10:33 AM)Qriva0 Wrote: But, you mentioned aerodynamics are also affected and I can't find relation here (dragCoeff is multiplied by normalized direction and it's not affected by weight):
mass is right there in the equation you posted: the sum of drag and lift forces is multiplied by inverse mass (that is, divided by mass) to calculate acceleration. Then it's multiplied by time delta to get change in velocity, and an overall aerodynamic scale factor.
Quote:velocities[p] += (-dragCoeff * rvNorm +
// lift:
liftCoeff * new float4(liftDirection.xyz,0)) *
// scale
attackAngle * math.min(aerodynamicFactor * invMasses[p] * deltaTime, 1000);
Simplified:
Code:
velocity += (dragForce + liftForce) / mass * dt;that is,
Code:
velocity += acceleration * dt;
