Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Dynamic Bones with high Elasticity jitter with low frame times #1790

Open Hayden-Fluff opened 3 years ago

Hayden-Fluff commented 3 years ago

Describe the bug

Whenever framerates are relatively low, Dynamic Bones with high elasticity tends to jump all over the place, causing pretty undesired effects.

Relevant issues

None to be found

To Reproduce

Create a Dynamic Bone chain with around 5 or more bones Set the Elasticity to somewhere above half Reduce the framerate to 25 or less (the lower the more noticeable) Move the Dynamic Bone Chain while the framerate is low

Expected behavior

As seen in Unity, I would expect Dynamic Bones to not spring all over the place when framerates are less than optimal.

Screenshots / Video

https://storage.googleapis.com/haydens-video-storage/Neos%20Github%20Videos/1790%20-%20Dynamic%20Bone%20Elasticity.mp4

Bug information (please complete the following information):

Additional context

This issue is probably very well known, however I could not find it logged on GitHub, and I feel like it's a rather important one to have logged.

Reporters:

Hayden#3180

H3BO3 commented 3 years ago

Thank you for investigating this, Hayden! I figured it was tied to a certain property.

Hayden-Fluff commented 3 years ago

Upon further investigation, this only happens when the CPU is stressed, I went to a world that makes my GPU cry and all dynamic bones were completely fine. GPU utilization was pinned at 100%, while CPU is hovering around 50% (I typically experience the polar opposite)

shiftyscales commented 3 years ago

The reason this happens is because dynamic bones attempt to return to their original resting position. With a low framerate, there isn't enough precision to smoothly return it back, as such it often forms a positive feedback loop of increasingly exaggerated overcorrections dependent on how the dynamic bone itself is configured (e.g. as observed, a high elasticity.)

Dynamic bones in Neos are native to it/unrelated to how dynamic bones function in Unity.