You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 284 produces weird physics the higher the fps are: void LateUpdate()
instead smooths the dynamic bones calculations, and stops the glitch for a more smooth movement, and i believe performance upgrade as well. (my project is a small one for now and the performance change goes unnoticed, but with multiple animated or moving characters in scene i believe would be far more noticeable in performance): void FixedUpdate()
To Reproduce
Steps to reproduce the behavior:
Requirements a .VRM model with hair and/or boob springbones.
Go to your project in unity (preferably an empty/new one) and import a VRM model using the UniVRM tool.
Set up your model like always and add the default standard assets (3rd person controller).
2.1. Add a plane or terrain to your scene and the 3rd person controller from standard assets.
Swap unity's default model (Ethan) for your VRM model/character prefab.
On the 'Animator' component of the ''3rd person controller' swap default 'Avatar' for your 'VrmAvatar'.
Run the scene and if your character was imported properly you can run, jump and walk using the default unity animations, and test the physics.
Now, on the editor you will NOT notice it as much, so if everything runs okay i 100% recommend you to make a build, save it to your preferred folder, and run it. (remember the more the FPS, the easier it is to notice, but even if around 30FPS you WILL, 100%).
Now edit that script mentioned above (VRMSpringBone.cs) and change the 'LateUpdate' for 'FixedUpdate'.
Play the scene in the editor to check that it runs properly and build again to a different folder, so you have both builds to test. Close the unity editor now to improve fps if needed.
Play the first build around, change direction, walk, jump and take a good look at the physics behaviour specially above 30fps. (first one is the build with the default script).
Play the 2nd build with the 'FixedUpdate' instead of the 'LateUpdate'. You will now notice if >30FPS, below that happens but not as much.
Screenshots Since screenshots will not work for showing this i'll try recording a video ASAP(sorry, some things that needed my attention first happen, i promise to update it with a video like originally said).
Environments (please complete the following information):
OS: Windows 10 Pro, x64, v1909
UniVRM version: 0.55.0
Additional context
-The higher the fps, the more noticable it is, it reminds me of when you put 2 rigidbodies together i.e a moving platform and the one resting on top kind of bounces instead of going smooth as it should.
-I've tried adding stiffness to the VRMSpringbones and while in average is less noticable (because of less movement), when the random bounce happens it's even more noticeable, so play with your settings a bit for specific parts, i guarantee you will notice it, and on the video i'll include my settings once i do it as well.
PS: It MAY sound like it does a small change but i really noticed a good improvement, also i'm new to GitHub even tho i did my account long ago, so please forgive any post or overall mistakes that i could've done. Thank you :)
The text was updated successfully, but these errors were encountered:
Csf91
changed the title
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "wird bounces" it does found a fix and i think it's working fine for me.
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "weird bounces" it does found a fix and i think it's working fine for me.
Jun 7, 2020
Csf91
changed the title
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "weird bounces" it does found a fix and i think it's working fine for me.
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "weird bounces" it does, found a possible fix thar may improve performance.
Jun 7, 2020
Csf91
changed the title
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "weird bounces" it does, found a possible fix thar may improve performance.
[bug + fix idea] VrmSpringbone.cs The higher the fps, the more "weird bounces" it does, found a possible fix that may improve performance.
Jun 7, 2020
Using Unity 2019.3.15f1
The issue and fix found are for this file:
https://github.com/vrm-c/UniVRM/blob/master/Assets/VRM/UniVRM/Scripts/SpringBone/VRMSpringBone.cs
Line 284 produces weird physics the higher the fps are:
void LateUpdate()
instead smooths the dynamic bones calculations, and stops the glitch for a more smooth movement, and i believe performance upgrade as well. (my project is a small one for now and the performance change goes unnoticed, but with multiple animated or moving characters in scene i believe would be far more noticeable in performance):
void FixedUpdate()
To Reproduce
Steps to reproduce the behavior:
Requirements a .VRM model with hair and/or boob springbones.
Go to your project in unity (preferably an empty/new one) and import a VRM model using the UniVRM tool.
Set up your model like always and add the default standard assets (3rd person controller).
2.1. Add a plane or terrain to your scene and the 3rd person controller from standard assets.
Swap unity's default model (Ethan) for your VRM model/character prefab.
On the 'Animator' component of the ''3rd person controller' swap default 'Avatar' for your 'VrmAvatar'.
Run the scene and if your character was imported properly you can run, jump and walk using the default unity animations, and test the physics.
Now, on the editor you will NOT notice it as much, so if everything runs okay i 100% recommend you to make a build, save it to your preferred folder, and run it. (remember the more the FPS, the easier it is to notice, but even if around 30FPS you WILL, 100%).
Now edit that script mentioned above (VRMSpringBone.cs) and change the 'LateUpdate' for 'FixedUpdate'.
Play the scene in the editor to check that it runs properly and build again to a different folder, so you have both builds to test. Close the unity editor now to improve fps if needed.
Play the first build around, change direction, walk, jump and take a good look at the physics behaviour specially above 30fps. (first one is the build with the default script).
Play the 2nd build with the 'FixedUpdate' instead of the 'LateUpdate'. You will now notice if >30FPS, below that happens but not as much.
Screenshots
Since screenshots will not work for showing this i'll try recording a video ASAP(sorry, some things that needed my attention first happen, i promise to update it with a video like originally said).
Environments (please complete the following information):
0.55.0
Additional context
-The higher the fps, the more noticable it is, it reminds me of when you put 2 rigidbodies together i.e a moving platform and the one resting on top kind of bounces instead of going smooth as it should.
-I've tried adding stiffness to the VRMSpringbones and while in average is less noticable (because of less movement), when the random bounce happens it's even more noticeable, so play with your settings a bit for specific parts, i guarantee you will notice it, and on the video i'll include my settings once i do it as well.
PS: It MAY sound like it does a small change but i really noticed a good improvement, also i'm new to GitHub even tho i did my account long ago, so please forgive any post or overall mistakes that i could've done. Thank you :)
The text was updated successfully, but these errors were encountered: