Time Step / Sleep threshold correlation
#1
Hi Tyson.

While I was testing the impact of different Time step settings I noticed the correlation of Time steps and the PhysX Velocity threshold settings.

A Time Test operator should send some PhysX particles to the next event after a few frames. This works fine up to a Time step setting of 1/2 Frame. As soon as I increased the Time steps to 1/4 Frame the particles kept their initial position and refrained from moving to the next event. Decreasing the Velocity threshold was finally fixing the issue. The more Time steps the lower the Velocity threshold needs to be. 

Again, I am not sure if this is working as expected, but it was not obvious to me in the first place.
If this is not consider a bug it still might help someone else to debug their tyFlows.

Again, Thank you so much!
   

The screenshot shows the particles still at their initial position even at frame 30.
  Reply
#2
Ah, I know why this is happening...it's a slight mistake on my part. When you have a small timestep, velocities are integrated in smaller steps, but my PhysX sleep threshold only considers the final frame velocity. Forgot to fix that before the latest build went out. I'll make a note.
  Reply
#3
Hey Andreas, so in the next build I've adjusted the sleep settings to that they are timestep independent...however, one thing I realized while testing this is that part of the reason your particles are sleeping sooner could simply be because with more timesteps, collisions are more accurate, thus resulting in less jittering and/or more constrained exit velocities (and particles with less velocity are more likely to fall asleep). So that may also have contributed to the behavior you are experiencing.
  Reply


Forum Jump: