TesseraktZero / UnityHandTrackingWithMediapipe

Realtime hand tracking and finger tracking in Unity using Mediapipe
Apache License 2.0
286 stars 66 forks source link

Function for controlling individual fingers not found in the script #7

Open midopooler opened 3 years ago

midopooler commented 3 years ago

Hi @TesseraktZero , Great Project first of all. Kudos I see the palm rotation logic written here in this function, https://github.com/TesseraktZero/UnityHandTrackingWithMediapipe/blob/master/Assets/Scipts/LandmarkInterface/HandLandmark.cs#L106-L123 But I couldn't find exactly where the logic for individual fingers is written?

TesseraktZero commented 3 years ago

Finger movement is done by IK using unity animation rigging. The landmarks of fingers are projected to 3D space in the scene as IK targets.

midopooler commented 3 years ago

I've gone through your scene, looks like you are using only the tip and the root of the fingers into consideration, the middle two bones are taken care of by the animation rigging package. What if I want to you use those extra two landmarks as well (for example 6 and 7th landmarks in the index finger), how do you think it could be done?

TesseraktZero commented 3 years ago

I tried assigning every landmark to multiple two-bone IK before, but the result didnt look well. I think that's because of the discrepancies between the landmark distances and the finger lengths. Maybe you can try different types of IK available in the package and play around with parameters to see if that gives desirable result.

midopooler commented 3 years ago

Alright, Thanks for answer. I'll try it out BTW, I'm building similar project but for whole body. (full pose, face and hands)

midopooler commented 3 years ago

Hi, @TesseraktZero , whats the estimation behind this line? scale = thumbModelLength / thumbDetectedLength; I see that private float thumbModelLength = 0.03f; but what's the logic behind 0.03f?