Unity-Technologies / com.unity.demoteam.hair

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Other
730 stars 99 forks source link

Global hair movement is jittery when framerate is low #61

Open qlee01 opened 1 year ago

qlee01 commented 1 year ago

If the hair component is being moved, the movement becomes very jittery on lower framerates. There seems to be some interpolation going wrong if the framerate goes below some limit. As I am syncing the hair with articulation bodies, which don't have any interpolation, I need to do interpolation by myself, but the same interpolation based on (Time.time - Time.fixedTime) / Time.fixedDeltaTime works fine in all other scenarios, just the hair stays jittery no matter what I try.

qlee01 commented 1 year ago

Additional observation: If project time scale is reduced, (slow down), the jittery goes away, which seems to be more evidence that this the issue is related to interpolation.

qlee01 commented 1 year ago

Was able to work around this by setting Max Steps to "1". Jitter occurs as soon as there are more than 1 step per simulation step, so interpolation seems to go wrong in this case.

TCKingCeryn commented 1 year ago

Was able to work around this by setting Max Steps to "1". Jitter occurs as soon as there are more than 1 step per simulation step, so interpolation seems to go wrong in this case.

Had this exact same finding, just didnt narrow it down to interpolation. Also check the refresh rate on the hair instance, sometimes higher or lower values work better