-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kalidokit interface #1788
Kalidokit interface #1788
Conversation
I'm back on it, it needs a bit more work. |
I actually think the pose resolution calculations in kalidokit leave a lot to be desired. That code uses mostly vector math hacks with tons of corner case detection, which has strange singularities, like the pose having a strong tendency to lean to the left, which feels very slightly wrong. I think we can perhaps do basic world quaternion pointing with the mediapipe data (which is presented in world XYZ based on what the model thinks) to get a much more accurate avatar pose out of it. I see no reason the math couldn't be perfect without any corner cases, as long as the model is giving us correct data. |
This page really helped me: https://google.github.io/mediapipe/solutions/pose_classification.html Especially this diagram: With basic 3d maths you can easily compute the corresponding avatar bones quats. |
This is almost done. I rewrote the core to use my own math rather than kalidokit and indeed, it turned out cleaner code and higher quality output. We should probably get rid of kalidokit entirely, porting over the necessary parts. I also want to optimize this by running the AI pose model in a worker. Somewhat blocked on #1848, which screws up the main model's posing. |
I ended up implementing the isolated origin iframe version of this to take advantage of the strict process separation in that mode. Note that to make this work, fake RAF is need to make the iframe seem active in 3d. Apparently rendering is not enough to trigger that heuristic in Chrome. If you do not include it you will mysteriously have the iframe tick rate throttled behind time tickets. |
This is done enough that someone other than me could take it to the finish line.
|
This has not reached step 1 yet (rebase). |
https://github.com/yeemachine/kalidokit