godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.94k stars 3.22k forks source link

Skeleton 2D docs do not match Godot 4 #6388

Open jivvy opened 1 year ago

jivvy commented 1 year ago

Your Godot version:

v4.0.beta.custom_build [4935493f7]

Issue description:

I think Godot 4 removed 2D IK chains, and replaced it with the Bone2D system.

There isn't really any documentation for how to use the Bone2D system, or how to use it to do IK. If anyone knows how to use the new system, could you update the docs or explain here how it works? Thanks!

URL to the documentation page:

This page is no longer relevant: https://docs.godotengine.org/en/latest/tutorials/animation/cutout_animation.html

The information on this page is no longer correct: https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html

jivvy commented 1 year ago

I found that @TwistedTwigleg contributed this PR: New and improved IK in Skeleton2D

Also looks like a lot of the examples in https://github.com/TwistedTwigleg/Godot_GSOC_2020_2D_Project are broken in the latest GD4 build

jivvy commented 1 year ago

There is some documentation in the engine, but it does not really explain how to use the new Bones system.

Since GD4 is in beta now, I think proper long-form explanations / tutorials would go a long way toward usability

Calinou commented 1 year ago

PS: In the future, please use the Edit button (located behind the icon in the top-right corner of your comments) instead of multi-posting.

ghost commented 1 year ago

Hey, now that Godot 4's going to come out soon, does anyone know how to use IK with Skeleton2D yet? I tried using FABRIK but it's just resulted in it spinning in circles.

https://user-images.githubusercontent.com/69117768/221954221-f9cb0fe0-3ab7-46ef-b580-b9c3bb8cbba7.mp4

Edit: Better video

https://user-images.githubusercontent.com/69117768/221991031-a0d80a66-6a3e-478f-a1df-1ea93054f06b.mp4

ghost commented 1 year ago

Okay, I figured it out. The issue was that I was setting the target node to be a bone, when it should be outside the skeleton altogether, or at least not a node in the chain lol

Anyway, I think that we should remove https://docs.godotengine.org/en/latest/tutorials/animation/cutout_animation.html

Is there a way to use sprites with the skeleton2d?

fguillen commented 1 year ago

Where can I find updated documentation/tutorials on how to use Skeleton2D in Godot 4?

hsandt commented 1 year ago

Also, when you update the doc, mind how the Skeleton actions changed order and names:

"Make Rest Pose (From Bones)" => "Overwrite Rest Pose" "Set Bones to Rest Pose" => "Reset to Rest Pose"

image1724

See https://github.com/godotengine/godot/issues/54793

hsandt commented 1 year ago

Where can I find updated documentation/tutorials on how to use Skeleton2D in Godot 4?

Personally I started following 3rd party videos like: https://youtu.be/AMRjtW-3T0o but this particular one is a mix of the Cutout Animation tutorial which uses sprites, but adding an actual Skeleton on top with bones in the middle... I'm adapting it to my needs as I use Polygons.

It may be nice to explain how the tutorials differ and be clear on how each develop can combine all the features:

Right now, Cutout animation tutorial uses:

The Skeleton tutorial uses:

The video I linked uses:

It's not bad to have a tutorial that combines 3 methods to start with, esp. if Godot 4 has a canonical method; but summing up each option for each part of the problem would help developers make the final decision that fits their project.

EDIT: I continued with the tutorials and now I get the big difference between cutout and actual rigged skeleton: mesh deformation.

So we could make things clearer by explaining the differences in the intro of each page. Because both use the Skeleton, we should insist on rigging and mesh deformation:

hsandt commented 1 year ago

Hm, looks like placing Skeleton at top and sprites as children means you're not using weight painting at all. So the video doesn't help me on this part.

I have troubles understanding what the slider near Radius is: image

and the old doc doesn't mention it at all. We should add info on it in the new doc.

If it's bound the radius, then a bug prevents it from being updated in sync with the Radius number. And then, where is the "specified intensity" mentioned in the Paint button tooltip?

If it's the weight intensity, then it's not clear at all as there is no label and no numeric field matching the slider.

ghost commented 1 year ago

The slider is how much of the weight is painted (how white it is). So it's weight intensity.

I'm the one who made the video you linked, if you have any other questions I can try to find the answer.

geekley commented 11 months ago

I'm in Godot 4.2.1. When I use the "Make Bone2D Nodes from Nodes" feature in a selected sub-tree of Sprite2D nodes, the generated hierarchy is wrong. It puts bones between sprite nodes in the parent sequence, so I get the warnings saying a bone's parent should be a bone or skeleton. It took me a long time to figure out I gotta manually reorder all bones (so it becomes a sibling of the sprite parent, i.e. a direct child of the parent bone). This feature should be fixed to do it this way instead of generating an invalid tree.

Platymek commented 3 months ago

This is still an issue in Godot 4.3, or at least in rc1.