Skip to content
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

Solve generalized skeleton poses with Many Bone IK #6039

Open
fire opened this issue Jan 3, 2023 · 2 comments · May be fixed by godotengine/godot#90316
Open

Solve generalized skeleton poses with Many Bone IK #6039

fire opened this issue Jan 3, 2023 · 2 comments · May be fixed by godotengine/godot#90316

Comments

@fire
Copy link
Member

fire commented Jan 3, 2023

Describe the project you are working on

A open source social vr game made with Godot Engine.

We wish to provide full body tracking with 3 body sensors and the ground or up and more than 10 body sensors.

We also want to solve for any other skeleton. Example skeletons like quadrupeds, birds, squid or octopus.

Describe the problem or limitation you are having in your project

Godot Engine 4's multiple ik systems are broken.

https://twitter.com/wojtekpil/status/1609667214998650883?s=20

Provide a general purpose full body inverse kinematic system that is suitable for full body tracking and in general.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Many Bone IK is a custom inverse kinematics system solver for multi-chain skeletons and with constraints.

This project is a port from a Java project by Eron https://github.com/EGjoni/Everything-Will-Be-IK

See here for the EWBIK demo

GitHub usernames are indicated in parentheses.

Additonal features

Many Bone IK has a use for animation retargeting.

Many Bone IK can implement a "look-at" in a way that can take the entire rest of the character into account.

Authors

  • K. S. Ernest (iFire) Lee (fire)
  • Eron Gjoni (EGjoni)
  • rafallus Rafael M. G. (rafallus)
  • lyuma (lyuma)

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

DRAFT PROPOSAL as of 2022-01-03. Want a demostration video at some time.

EWBIK A Highly General, Fast, Constrainable, and Stable Inverse Kinematics algorithm.odt

image

image

See open office document.

Abstract

  1. provided IK COPY targets per bone via "QCP" solver
  2. provided KUSUDAMA IK LIMIT forward axial rotation per bone with vector3 and a angle
  3. provided KUSUDAMA IK LIMIT spherical (360) rotation per bone via 0 to 10 limit cones
  4. provided root motion solving
  5. included stabilization passes
  6. provided prioritization of rotation axes
  7. provided joint weights
  8. Per bone dampening
  9. provided spherical KUSUDAMA IK LIMIT shader visualization
  10. provided axial KUSUDAMA IK LIMIT visualization
  11. Avoids the modification stack problem mentioned in earlier pull requests in July. ManyBoneIK is a node3d.
  12. Allows arbitrary number of iterations per frame
  13. Provides a constraint mode than allows editing of constraints without the solve struggling
  14. Provides a filterable inspector with a bone tree.

Unfinished work

  1. Provide a better way to edit the twist constraint, orientiation constraint and the bone direction transforms while also resetting the solver representation BLOCKER
  2. provide a better ui for defining 360 spherical rotation like drilling from a sphere center point (vector3) and then adding a radius (euler angles)
  3. provide a pallete of presets for common humanoid joints
  4. provide draggable handles for spherical KUSUDAMA LIMIT similar to the spotlight3d set to a distance of 1 scaled by the bone length
  5. draggable handles for the axial limits
  6. the ui is too complicated needs ui work
  7. film an demonstration video
  8. Make ManyBoneIK a node? (trouble with gizmos.)
  9. Finish the demo https://github.com/V-Sekai-fire/TEST_many_bone_ik

If this enhancement will not be used often, can it be worked around with a few lines of script?

Technically speaking, the IK system only took a few months to develop. Most of the work has been in porting it.

Is there a reason why this should be core and not an add-on in the asset library?

Reduz asked me to write a proposal because I had working code for this in a c++ module at https://github.com/V-Sekai/many_bone_ik

@fire fire changed the title Solve poses for full body VR tracking with Many Bone IK Solve generalized skeleton poses with Many Bone IK Jan 3, 2023
@ywmaa
Copy link

ywmaa commented Oct 29, 2023

I was going to open a whole issue with details for IK system, but this does it all.

Now as I understand this uses a Node approach which I think is perfect for Godot Engine.

About this point :

the ui is too complicated needs ui work

I don't think so, from the screenshots it looks pretty much clear, and familiar with the Bone Hierarchy, looks like Skeleton3D, maybe just adapt the UI to look exactly like it.

It just needs 3D handles for usability.

Make ManyBoneIK a node? (trouble with gizmos.)

Wait isn't it a Node already ?

Edit :
Any Idea about the performance of many bone IK ?

@fire
Copy link
Member Author

fire commented Apr 6, 2024

The godotengine/godot#87888 enhancement improved the ik solver's stability so we're not stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants