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 2D docs do not match Godot 4 #6388

Open
jivvy opened this issue Nov 17, 2022 · 12 comments
Open

Skeleton 2D docs do not match Godot 4 #6388

jivvy opened this issue Nov 17, 2022 · 12 comments
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features

Comments

@jivvy
Copy link

jivvy commented Nov 17, 2022

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 jivvy added the bug label Nov 17, 2022
@jivvy
Copy link
Author

jivvy commented Nov 17, 2022

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
Copy link
Author

jivvy commented Nov 17, 2022

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

@clayjohn clayjohn added the content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features label Nov 17, 2022
@Calinou
Copy link
Member

Calinou commented Nov 17, 2022

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.

@skyace65 skyace65 added the area:manual Issues and PRs related to the Manual/Tutorials section of the documentation label Dec 28, 2022
@ghost
Copy link

ghost commented Feb 28, 2023

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.

Godot_v4.0-rc6_win64_BXmuFhHaEt.mp4

Edit: Better video

2023-02-28.13-48-10.mp4

@ghost
Copy link

ghost commented Mar 1, 2023

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
Copy link

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

R3volv360 added a commit to R3volv360/godot-docs that referenced this issue Jun 5, 2023
This tutorial no longer works in Godot 4.x after the Skeletons section.

godotengine#7279
godotengine#6388
@hsandt
Copy link
Contributor

hsandt commented Jul 13, 2023

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 godotengine/godot#54793

@hsandt
Copy link
Contributor

hsandt commented Jul 13, 2023

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:

  • Sprite vs Polygon + Texture
  • Skeleton at the top with Bones and Sprite/Polygon under each Bone vs Skeleton besides the Sprites/Polygons, which are in a flat hierarchy (using child index for Z ordering)
  • If using Skeleton at the top: Use Remote Transforms vs Change Z ordering by setting Z index for each Sprite/Polygon (it's only mentioned in a note)

Right now, Cutout animation tutorial uses:

  • Sprite
  • No skeleton, hierarchy of sprites with "invisible bones" created via the Bone menu. Apparently this disappeared in Godot 4, you can only Make Bone2D from Node (which is clearer I think as user will see a proper Bone2D icon in the scene) -> so this will need to be completely replaced
  • Use Remote Transforms (since the old bone creation method is equivalent to having a skeleton at the top)

The Skeleton tutorial uses:

  • Polygon + Texture
  • Skeleton besides polygons. Polygons are in flat hierarchy, using child index for Z order
  • Since polygon order is used for Z ordering, no need to use Z index nor Remote Transforms

The video I linked uses:

  • Sprite
  • Skeleton at the top, with bones under it and sprites attached to bones
  • Remote transforms to fix remaining bad Z ordering

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:

  • Cutout animation: puppet-style animation by purely rotating and translating body parts. We'll use the skeleton purely to manipulate body limbs, added as sprites under each bone (or rather, for convenience, build a tree of sprites, then use Make Bone from Node command to auto-create a Node and place the Sprite under it). The current intro is quite good at explaining this, but the given examples seems to sometimes deform meshes so I'm not sure if there are proper examples to give there.
  • Skeleton page -> renamed to something like Skeleton rigging and Mesh deformation: we'll go further and animate body parts with texture deformation by using textured polygons instead of sprites, and defining a skeleton besides the polygons but binding it to them. We can of course define vertices so there is no deformation at all, but the method is more flexible as we can add deformation later if we want (at the cost of more painting work).

@hsandt
Copy link
Contributor

hsandt commented Jul 13, 2023

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
Copy link

ghost commented Jul 13, 2023

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
Copy link

geekley commented Dec 16, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features
Projects
None yet
Development

No branches or pull requests

8 participants