ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.04k stars 258 forks source link

Hand alignment is not acurate from scene to game with Skeleton poser #629

Open Giantbean opened 4 years ago

Giantbean commented 4 years ago

When trying to set up the way an object is gripped you can align the hand to look great in the scene window but then when you play the game the object is not aligned.

Scene Window SceneAlignment

Game play (As viewed in the scene window for widgets) Fame Alignment

VR Glove, slim, Root and model are all zeroed position and transform. Placement is set with the wrist. If this is incorrect please provide documentation on how one is supposed to align the pose.

This https://www.google.com/search?client=firefox-b-1-d&q=steamVR+pose+skeleton+tutorial#kpvalbx=_-UofXobhH6ue_QauvoboAw18 does not address the problem.

Edit. I also tried zeroing out the wrist and setting the position and rotation with the vr_glove_right_model_slim and the results where even worse.

I had to delete the pose and start with a base pose only rotating the model level and leaving the slim root and wrist levels alone. The hand works but the position is completely unintuitive as you can see in the image it in no way lines up with the object being gripped. aligned This should be in documentation or a tutorial to keep users from wasting time having to discover this on their own, especially when the behavior at times seems inconsistent.

Giantbean commented 4 years ago

To add to this lack of documentation there is an actual issue; if you line up the hand just right for the Valve Index controller it wont be lined up for the Vive/pro controller or vice versa. This is likely true for other controllers such as the Oculas as well.

flightCrazed commented 4 years ago

I am struggling with this too... tried everything I can think of, still there is this offset on play. Doesn't matter what (transform from root transform all the way to wrist) I move the hand with.

Have you guys been able to figure anything further? Thanks!

flightCrazed commented 4 years ago

I spent hours trying to figure this out yesterday, so much so I decided to create a video on how to do this so others don't have to go through it. What you have to do is set the Ignore root pose data and ignore wrist pose data to false in the Scriptable Object (where the pose data is saved) See this for more: https://www.youtube.com/watch?v=iZ1-T59vk5Y

If anyone knows any other ways, please do share.

Giantbean commented 4 years ago

Thanks for the Video flightCrazed. I will have to try that out when I get a chance. In the mean time I have found that if I start with a base pose and only rotating the model level and leaving the slim root and wrist levels alone. I can get it to line up but its awkward and doesn't translate between controller types so I hope your solution works better. Hopefully SteamVR's next version with HDRP and LWRP support will address this issue.

Giantbean commented 3 years ago

This is a problem again. (Do to lack of documentation or official best use tutorials) When you set a pose in the Scene to look like: ↓ ScenePose (It looks misaligned here because I know I will be changing the model as seen in later images) However you set it in the scene, it is not the same in the game. If it is set with the tip level vr_glove_left_model_slim(Clone) you get vr_glove_left_model_slim(Clone)Position if set with the next level down slim_l the pose saves rotation but not position giving you: Slim_L_IgnoreWrist If you pose with the root you get root position use the wrist and its still wrong WristPosition Use any thing alonge the chain from the top vr_glove_left_model_slim(Clone) down to the wrist and turn off the bool for ignore wrist position (Ignoring the root change's nothing) as others have said #305 and you end up with Slim_L_IgnoreWrist So I tried to set the rotation at the Slim_l and the position at the vr_glove_left_model_slim(Clone) (Specifically for the left hand) however this is all guess work and experimentation that seems to change slightly every few versions and even setting it up as I have just said with mixed rotation at one level and positioning at another level ends up looking like mixed and when the wrist or wrist and root are ignored you get: mixed_ignore Close as the pose is right but the whole hand is flipped upside down! I have found no combination of positioning is working and this is wasting hours. I have hands posed on other objects and can bring over old poses from other projects but no new poses are working as they all have strange rotation and position that of the pose once I hit play. Positions that simply don't line up with the way I have placed the hand in the Scene window of Unity?