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

Skeleton TwoBoneIK and FABRIK odd bone behavior #59554

Closed
TheoJao opened this issue Mar 26, 2022 · 5 comments
Closed

Skeleton TwoBoneIK and FABRIK odd bone behavior #59554

TheoJao opened this issue Mar 26, 2022 · 5 comments

Comments

@TheoJao
Copy link

TheoJao commented Mar 26, 2022

Godot version

Godot 4.0-aplha3 (also tested the other alpha releases)

System information

Ubuntu 20.04.4 LTS

Issue description

Basically the first bone in the chain seems to be snapped to its parent's head when using skeleton modifications such as TwoBoneIK or FABRIK. Initially, I thought it was because of the way the bones were positioned (as I am making a rig intended for character customization) so I tried almost everything to get it right but nothing worked. Then I remembered this feature was developed by the user TwistedTwileg, so I downloaded his Skeleton IK plugin for Godot 3.x just to make sure it wasn't my fault, and both TwoBoneIK and FABRIK work perfectly fine using the same exported file. Here is a demonstration:

Godot3 3 3

Godot4 0

Notice how in Godot 4.0 the first joint in the chain snaps to it's parent when the skeleton modification is enabled, while in Godot 3.3.3 + Twisted IK plugin it works just fine. I also applied the modifications to the legs and the result is the same. I also tried using CCDIK and the first joint in the chain behaves fine, but the way that mechanism works is not ideal for arms or legs.

I have attached both projects for Godot 3.3.3 and Godot 4.0 to this issue, both contain the same skeleton file and a similar tree. I understand I'm using a plugin in the Godot 3.3.3 project, however it is supposed to have the same features and was made by the same user who implemented the skeleton modifications for Godot 4.0.

Steps to reproduce

Use a regular biped skeleton and apply either TwoBoneIK or FABRIK skeleton modifications, using the the upper leg (or upper arm) as the first joint in the chain.

Minimal reproduction project

Skeleton IK 3.3.3.zip

Skeleton IK 4.0.zip

@Calinou
Copy link
Member

Calinou commented Mar 26, 2022

cc @TokageItLab

@TokageItLab
Copy link
Member

@TwistedTwigleg Can you check this issue? I guess that it is possibly related to #53821.

@TwistedTwigleg
Copy link
Contributor

I can try to take a look, but it will be next weekend at the earliest (and I might need to setup my development environment again)

Right off, I think it is likely related to that issue. A possible simple fix could be using a global pose on the first bone in the chain. Not sure though. Since Twisted IK 2 works, the issue should be in the code for converting to and from bone poses.

@Shnazzy
Copy link
Contributor

Shnazzy commented May 18, 2022

@TheoJao A fix I'm planning to submit as a pull request may fix part of your issue. Can you try out the changes I have here and let me know if they work? Thanks.

@lyuma
Copy link
Contributor

lyuma commented Jan 14, 2023

I have regrettably removed the SkeletonModificationStack3D for 4.0 in #71137 because we would not have time to get all the bugs working in time for 4.0. This does not imply that the functionality is out of the question for a future 4.x, just that it didn't make the cut for the 4.0 point release itself.

SkeletonIK3D remains in 4.0 and I do intend to fix the known issues with SkeletonIK3D (the Node) in time for 4.0 to get it working as well as it was in 3.5

I would be interested on whether SkeletonIK3D is sufficient to cover the TwoBoneIK case for your application.

There are modules being made for Godot which can provide some IK functionality, including fire's many_bone_ik and RenIK which you can compile into the engine on your own, but we are unable to get them integrated in time for the 4.0 release, since feature freeze has already occurred.

Look forward to more IK and skeleton modifications available in Godot 4.1 or later.

I know this is hard to hear, but I will be closing this issue: the modification stack as you tested has been removed, and will not return in the same form. That said, I do hope to make sure Godot provides a way of performing these modifications in the future.

I have saved your example project and made note of this issue so when the time comes to add this functionality back into Godot, I will try and make sure the usecases in this MRP work.

@lyuma lyuma closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants