Rigid body animation node PhysX compatibility

After updating the game from UE4.27 to UE5.3 many joints build on angular constraints got much stiffer, after some experimenting I have found that tweaking inertia tensor scale down I can get close to the old behaviour. Another thing I have noticed that PHAT preview set to world behaves close to the old PhysX behaviour

I see that RBAN calculation of inertia tensor is different to what world simulation is doing: it calls to `ComputeMassProperties` with `bInertaScaleIncludeMass` equals true, and skips scale adjustments. Aligning these brings behaviour towards what world simulation is doing, but still much stiffer behaviour.

Can you advice what else could I do to bring back PhysX-like behaviour without redoing much of the rigid body setups? World mode in simulation preview gives me hope this is possible

Please let me know if you need further details on the setup, basically it is a two segment, and two constraints chain with linear limits all locked, swing motion limited, twist locked

[Image Removed]

Steps to Reproduce

  • Setup skeletal mesh in UE4.27 with PhysX
  • Upgrade to UE5.3
  • Observe changed behaviour in angular hard constraints, they are stiffer
  • Observe different behaviour in PHAT simulation preview in RBAN vs World mode, where world mode is similar to PhysX behaviour
1 Like

Hi,

Would you be able to provide a small example project?

The main reason for this is that it would take experimenting and tweaking settings to mimic PhysX like behavior as a workaround, which you’re already doing.

Having the same project would allow me to see the entire picture, try settings, and if necessary escalate to Epic as a bug or limitation.

Some settings to tweak:

-in the physics constraints > angular limits > soft constraints try lowering stiffness and damping

-adjusting mass

-lowering inertia tensor scale more

-project settings > Physics try increasing solver iterations; enable substepping and increasing it (possibly increases accuracy of simulation)

According to another user at: https://forums.unrealengine.com/t/ue-4-27-2-default-physics-engine/2517097/3 it does look like it may be a limitation / bug.

So if we’re unable to come up with anything, a repro project will allow me to make a report to Epic.

Regards

1 Like

Found the sourse of the problems for some of assets changing simulation behaviour considerably. This behaviour happens when no shapes are set to contribute to mass

Two things that play a role when no shape:

  • `PxMassProperties` inits mass to 1, while `Chaos::FMassProperties` inits mass to 0
  • `CalculateMassPropertiesFromShapeCollection` inits mass to `523.0f` and inertia to `5.24e5f`, while with PhysX it would be 1 in the same setup

There is one more problem I am investigating that also ends up in simulating with different effects, but that seems to be Chaos behaving correctly when `ComponentLinearAccScale` and `ComponentLinearVelScale` are set to 0, while in PhysX there is some movement transfer

1 Like

Glad to hear, and thank you for the additional information. Please feel free to leave any follow up questions / information on the new problem you are investigating.

If you happen to have a repro project that shows the behavior, it’ll help with deeper testing or escalating to Epic as needed.

Thank you again.