Obi Official Forum
Substep-dependent normalImpulse measurement and friction behavior in Obi Rope 6.5.4 - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Substep-dependent normalImpulse measurement and friction behavior in Obi Rope 6.5.4 (/thread-4647.html)



Substep-dependent normalImpulse measurement and friction behavior in Obi Rope 6.5.4 - nakai - 03-09-2026

Hello,

I found two contact-related issues that appear to depend on the number of substeps in Obi Rope 6.5.4 using the Burst backend.

Test setup:

- Rod mass: 2.1 kg (21 particles, 0.1 kg each)
- Fixed timestep: 0.01 seconds
- Incline angle: 45 degrees
- Static friction coefficient: 1
- Dynamic friction coefficient: 1
- Rolling contacts: disabled
- Sleep threshold: 0

Under these conditions, both the expected normal force and the tangential component of gravity are approximately 14.57 N.

1. Normal contact force measurement
Simply dividing the final normalImpulse value by either the fixed timestep or the substep duration did not produce an accurate force.
The positional correction applied by the contact constraint is scaled using the number of remaining substeps. 
Does this mean that each change in the normal constraint multiplier must be converted using the remaining time at the corresponding substep?

In my tests, the following conversion produced a normal-force estimate consistent with the expected value:

normal impulse increment = change in normal Lagrange multiplier / (remaining substeps × substep duration)

This requires recording the change in normalImpulse at every substep.
 I could not reconstruct the normal force over the full physics step from the value obtained only in the final collision callback using a single time value.

2. Friction behavior
The friction issue appears to affect not only force measurement but also the motion produced by the simulation.
With one substep, the cable remained approximately in equilibrium on the 45-degree incline. 
However, with two or more substeps, the cable slid down the incline even though the timestep, friction coefficients and constraint iteration count were unchanged.

In a representative test with three substeps:

- Normal force: approximately 14.57 N
- Friction force actually applied by the simulation: approximately 10.3 N
- Expected limiting Coulomb friction: approximately 14.57 N

The friction force reconstructed from the contact data agreed with the value calculated independently from the cable’s momentum change. 
Therefore, the lower friction value was not only caused by an error in reading the collision callback. The simulation itself appeared to apply approximately 10.3 N of friction.
This suggests that the normal impulse used to calculate the Coulomb friction limit may be underestimated when multiple substeps are used.
To address this behavior, I converted the change in the normal Lagrange multiplier at each substep into a normal impulse using the corresponding remaining interval.
I then accumulated these impulses and used the accumulated value to calculate the Coulomb friction limit.

I would like to confirm the following points:

1. In Obi 6.5.4, does normalImpulse require a correction that accounts for the number of remaining substeps?
2. In the Burst backend, can the friction limit used by the simulation depend on the number of substeps?
3. Is converting each substep’s change in the normal Lagrange multiplier using its corresponding remaining interval, accumulating the resulting normal impulses, and using them for the Coulomb friction limit consistent with the intended solver implementation?
4. Has this behavior been changed in newer versions of Obi?

Thank you.


RE: Substep-dependent normalImpulse measurement and friction behavior in Obi Rope 6.5.4 - josemendez - 03-09-2026

Hi!

(03-09-2026, 08:13 AM)nakai Wrote: 1. In Obi 6.5.4, does normalImpulse require a correction that accounts for the number of remaining substeps?

The value you get is that of the last step. In general, this can't be adjusted for the number of substeps, since each substep is an entirely indepedent integration/constraint evaluation cycle. See below for the reason why its designed this way (*).

(03-09-2026, 08:13 AM)nakai Wrote: 2. In the Burst backend, can the friction limit used by the simulation depend on the number of substeps?

No, each substep is its own independent solve so to speak.

(03-09-2026, 08:13 AM)nakai Wrote: 3. Is converting each substep’s change in the normal Lagrange multiplier using its corresponding remaining interval, accumulating the resulting normal impulses, and using them for the Coulomb friction limit consistent with the intended solver implementation?

(*)The way contacts against rigidbodies work is that both particle and rigidbody state are linearly extrapolated to end of the frame (that is, across multiple substeps) and the contact constraint solved there. The resulting impulse is divided by the amount of remaining substeps. The reason for this is that the rigidbody engine and the particle engine are updated at different timesteps/frequencies (rigidbody simulation in unity doesn't have substepping), so this is effectively a partitioned multirrate simulation.

As a consequence, the value you get for the last substep multiplied by the amount of substeps is often an acceptably good approximation of the force over the entire step, though it is often an underestimation.

Code:
This suggests that the normal impulse used to calculate the Coulomb friction limit may be underestimated when multiple substeps are used.

This is precisely right: each substep uses only the normal impulse calculated for the current substep, which is smaller the more substeps you have as a result of the method explained above.

(03-09-2026, 08:13 AM)nakai Wrote: 4. Has this behavior been changed in newer versions of Obi?

No, it works the same way in the latest version (7.2) and still does in upcoming versions (8).

If you're looking for accurate values, skip substepping entirely (only 1 substep) and divide your project's current timestep size by the amount of substeps you were using. Eg. if you were using 4 substeps and timestep = 0.02, use 1 substep and timestep = 0.02/4 = 0.05. This way particles and rigidbodies update at the exact same frequency, which is more accurate - but also a lot heavier in terms of performance.

Kind regards,


RE: Substep-dependent normalImpulse measurement and friction behavior in Obi Rope 6.5.4 - nakai - 07-09-2026

Thank you for your detailed explanation!

Thanks to your explanation, I now understand that OnCollision only returns the normal contact value produced by the final substep. I also understand that, when the contact force is nearly constant, scaling the result of the final substep by the number of substeps can provide an acceptable approximation of the result over the full physics step.

However, in my tests, this approximation increasingly underestimated the normal contact force as the number of substeps was increased.


Therefore, I tried an implementation-specific measurement approach using the internal contact data from the Burst backend. I recorded the contact state at each substep boundary: immediately before each substep, and after the final substep using OnCollision.


For each contact that could be matched between two consecutive boundary snapshots, I calculated the change in the reported normal contact value and treated it as Δλ.


Since the positional correction associated with the normal multiplier is divided by the number of remaining substeps, I estimated its contribution to the particle-side normal impulse as follows:

ΔJ = n Δλ / (k h)

where n is the contact normal, k is the number of remaining substeps, and h is the substep duration.

I then summed these vectors over all contacts and substeps, and divided the result by the full physics-step duration to obtain an estimated average normal contact force.

In my static tests, where the contacts remained stable, this method produced values closer to the analytical result and reduced the dependence of the measured force on the number of substeps.

I understand that this is an implementation-specific reconstruction rather than an officially supported measurement method. Since you explained that each substep is an independent constraint evaluation cycle, I am uncertain whether taking the difference between consecutive substep values is conceptually valid.

Could you please let me know if there are any issues with this approach? Specifically, is using Δλ / (k h) appropriate for estimating the particle-side normal impulse contribution, or could the independent evaluation of each substep make this reconstruction invalid?

Kind regards,