Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
134 stars 2 forks source link

[Desktop] Avatar limbs permanently being pulled towards avatar root(?) with ProceduralAnimationSystem #2875

Closed JatsyUwu closed 6 days ago

JatsyUwu commented 1 week ago

Describe the bug?

At seeming random intervals, the ProceduralAnimationSystem will break and limbs (notably hands) will get pulled into what I assume is the avatar's root and will stop animating. This has occurred on 2 different avatar bases. I have 3 recordings of it happening but I am unable to get the videos below the 10MB limit.

To Reproduce

Create empty gridspace. Spawn in avatar with LocomotionAnimationConffiguration on avatar (in my case it's under a child of CenteredRoot by itself). Simply stand still. Most breaks occur within 2 minutes.

Expected behavior

Animations continue working as intended.

Screenshots

Screenshots are stills from video editor as I attempted to get recordings below 10MB Screenshot 2024-09-05 102730 Screenshot 2024-09-05 102829

Resonite Version Number

Beta 2024.9.4.357

What Platforms does this occur on?

Windows

What headset if any do you use?

Desktop

Log Files

BEEFBOI - 2024.9.4.357 - 2024-09-05 08_57_28.log

*Note: While completing form, I tabbed back in to erratic animation behavior immediately followed by a Unity crash

Additional Context

No response

Reporters

Username: Jatsy Discord: Jatsy

shiftyscales commented 1 week ago

So these breaks only occur when standing entirely still, @JatsyUwu? If you start moving again, does the pose / animations correct themselves?

Does this happen with the current default values / no LocomotionAnimationConfiguration pre-applied?

If not, what values did you change / tweak on it?

JatsyUwu commented 1 week ago

The breaks occur when either standing still or moving. Moving seems to delay the breaks but they do eventually happen. If I start moving again after the breaks, the affected limbs no longer move and there's a 50/50 chance the unaffected limbs will either move as intended or the avatar will start to pull itself away from user root while the affected limbs pull towards avatar root. Eventually, the avatar will be several meters from user root followed by a unity crash.

Once the breaks occur, respawning seems to reset everything. Re-equipping does not. Spawning a new avatar and equipping it results in the newly equipped avatar adopting all of the same breaks as the original.

When no LAC is applied, I don't observe any breaks.

When a default LAC is applied, I don't observe any breaks.

I have attached screenshots of the LAC I've been testing. I'm thinking it may be related to settings on Gait 0.

Screenshot 2024-09-05 131724 Screenshot 2024-09-05 131732 Screenshot 2024-09-05 131748 Screenshot 2024-09-05 131803 Screenshot 2024-09-05 131814 Screenshot 2024-09-05 131827

JatsyUwu commented 1 week ago

Something to note: when this config was being made and tested on me yesterday, no breaks happened for hours.

shiftyscales commented 1 week ago

I'd recommend trying to isolate which value(s) in specific cause the issue since you reported it doesn't occur with the defaults.

It'd also help if you specifically noted which values you changed (and what you changed them to / from) rather than just including screenshots of everything.

Knowing which values cause the issue will make it more likely things could be better understood / resolved, @JatsyUwu. Thanks.

JatsyUwu commented 1 week ago

I have identified and been able to recreate by modifying LAC-Gaits-Hands-HandSwingDirection.

Default Values are X:-0.0784591 Y:0 Z:0.9969173

Changing the X and Z values to 0 instantly recreates the breaks. Resetting the values does nothing and leaves the avatar broken.

That 1 Float3 was all that was changed for this test. There could be more values that can cause the same or similar results.

shiftyscales commented 1 week ago

Thanks. That does help narrow things down a lot, @JatsyUwu - could you also include a new replication log where you start with the default locomotion, press F3 before making that change, then F3 again after making it / when things break? Having those markers in the log would make it much easier to find possible relevant exceptions that might be thrown if those are invalid values being fed into the system.

JatsyUwu commented 1 week ago

Log attached. F3 was pressed after component was added and animations were behaving normally, just before changing the field and after changes were applied and the break occurred.

BEEFBOI - 2024.9.4.357 - 2024-09-05 14_31_27.log

shiftyscales commented 1 week ago

Hmm- no exceptions seem to be thrown in the log provided unfortunately- but since the replication case is known now, seeking input from @Frooxius.

In the interim you at least know to avoid setting those properties to that value, so that should take care of any specific urgency with this issue. Thanks for the help, @JatsyUwu. :)

Frooxius commented 1 week ago

Can you replicate this with the debug visuals on?

shiftyscales commented 1 week ago

I think the debug visuals are disabled in the latest build, @Frooxius? I can't seem to activate them at all.

Frooxius commented 1 week ago

@shiftyscales You should be able to activate them by checking RenderDebugVisuals on UserPoseController on user's root.

shiftyscales commented 1 week ago

Oh I see- so it was just the F-key shortcuts that were removed.

shiftyscales commented 1 week ago

Got some footage @Frooxius - looks like the debug visuals are still properly posed, but the hands sink into the centre of the avatar as reported above.

https://github.com/user-attachments/assets/7d023226-6949-43c3-a955-bc2988b99d9d

TisFoolish commented 1 week ago

I've experienced something similar as a VR user, but it's my legs pulled towards root and not my hands. I currently don't have a clean log as i have mods installed, but the same thing has happened to others from what I've seen

shiftyscales commented 1 week ago

Are you using custom animation settings, or defaults, @TisFoolish? It'd be helpful if you could also isolate if there's any specific values that cause that issue for you.

Frooxius commented 6 days ago

This should be fixed in 2024.9.10.682

This happened because the swing direction needs to be an unit vector. I've added filtering system which will filter invalid values.

Thanks for report!