StressLevelZero / MarrowSDK-Legacy

MIT License
288 stars 39 forks source link

Misplaced finger bones in game #71

Open Woogoo336 opened 1 year ago

Woogoo336 commented 1 year ago

I currently have an issue with my avatar where the fingers appear incorrect in game but correct in Blender and Unity. Each middle joint of each finger is offset forward, separated from the previous bone and colliding with the next bone. The bones pivot at the right point offset from where it should pivot, instead of pivoting at the original location with an incorrect visual. The second joint of both thumbs is also out of place and displaced in the same direction as the fingers.

OculusScreenshot1665010025 In game appearance.

Hand in blender image

Hand in Unity image

When posing the finger in Unity or Blender, the pivots and connections look correct. The issue only happens in game.

I have tried changing the dimensions of the hand and wrist bones, removing the wrist bone from the armature, different bindings in the avatar configuration and Marrow bones. Nothing corrects the problem so far.

MrKross commented 1 year ago

it's a problem similar to the worng rotation, the only way i found to solve this issue is to counter move the positions in the prefab, so basically you have to move the middle joints inside, but i think is an SDK issue, it's probably trying to link some default positions that are not made for custom avatars.

Woogoo336 commented 1 year ago

I've noticed that as well. The left index finger to be specific. For some reason only that offset controls every finger on both hands. It's not an ideal fix though since the middle bone and end bone are still crushed together.

Woogoo336 commented 1 year ago

OculusScreenshot1665258725 Here's another example from a different avatar I'm working on

koimeiji commented 1 year ago

This wouldn't happen to be the same issue I've been experiencing, would it? In Blender and Unity, my fingers bend perfectly normal. However, once in game it appears like the bones are located forward from where they're supposed to be, pinching the joints and causing all the fingers to appear offset.

I've spent the better part of two weeks trying to figure out what's causing it and how to fix, with little actual progress. I've yet to try re-rigging the entire thing from scratch by hand (as I don't want to bother with a time-consuming fix that doesn't work, in the event it doesn't help)

If this is the same problem, mine seem to be affecting all my fingers except the final bone.

6l3DdJH d8sjKoO tcB8Sb8

Woogoo336 commented 1 year ago

It does look like a similar issue. The pivot point of the bone is also misplaced by the same amount as the bone. I have 2 avatars with this issue, one has a fresh rigging that I did myself and the other has the original rigging, both are the same.

Greased-Scotsman commented 1 year ago

Have you tried rigging per the image below so that you don't have any extra bones and they are oriented in a consistent manner, like so:

image

Make sure the local orientation of hand bone transforms is more or less uniform when the character is T-posed and everything is Scale 1,1,1. Make all rigging changes in Blender/3D software... think of Unity a bit like a "read-only" preview of the avatar... any major changes should be done prior to the model being exported to a FBX/before it is imported into Unity.

Aim for Unity's Rig tab to recognize the finger and hand bones such that there isn't anything extra. For example, I see a tangled mass of gray in the first set of images posted by @Woogoo336. I would rework this until it's clean like the screenshot above. Once you get a really solid finger setup in place, I would then go back and add a wrist bone... but leave those "extras" beyond the Mecanim defaults for later.

Lastly, be sure to follow the suggestions in the Wiki's Avatar page, as the video tutorial is a bit out of date, pending an update.

Woogoo336 commented 1 year ago

I'm not sure what you mean by tangled mass of gray, are you referring to the hand bone? The only real difference between your rig and mine that I can tell is where the hand bone begins. The only extra bone I have is a wrist bone to determine where the ball joint rotates in the arm. I'm honestly confused by what you are saying. Since my avatar is a robot with segmented fingers, I can't modify the bones in any way without causing them to rotate away from the joints implied in the model. I could change the position of the hand and wrist bone, but would that have an effect on the finger spacing issue we are having? I've used this model in another unity game and have not had this issue with the hands, so I always thought it was some sort of issue with the SDK or with Bonelab.

Woogoo336 commented 1 year ago

I changed the armature in the manner suggested and this resulted in no change in game.

image