Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Bones With Stretch Bones Get NaN Values
#7
(24-08-2026, 04:06 PM)Jawsarn Wrote: Hi, thanks for looking into this!

Alright, I wonder why not do it in the AerodynamicConstraintsBatchJob and clamp the final velocity towards the SolverParameters.maxVelocity then? Will it make the job less efficient with branching?

Thanks

The problem is that clamping the final velocity is too late, since NaN propagates down the stream from the first operation involving it. Any arithmetic operation involving a NaN operand results in NaN. By the time we’ve calculated the aerodynamics-adjusted velocity (from a NaN relative velocity, in turn calculated from Inf wind) it is already NaN, and clamping NaN yields NaN.

So the thing that should be clamped is the value *leading* to the first Inf/NaN (in this case, the wind value, calculated from the cross product between solver angular velocity and particle position).

Cheers,
Reply


Messages In This Thread
RE: Obi Bones With Stretch Bones Get NaN Values - by josemendez - 24-08-2026, 07:54 PM