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

Add a way to combine rigs, so that one animation can play across them #7573

Open
ghost opened this issue Aug 28, 2023 · 9 comments
Open

Add a way to combine rigs, so that one animation can play across them #7573

ghost opened this issue Aug 28, 2023 · 9 comments

Comments

@ghost
Copy link

ghost commented Aug 28, 2023

Describe the project you are working on

I'm making a character controller for an FPS game. For the third person character,
Please be advised that this is my first feature request, so I'm just trying my best here

Describe the problem or limitation you are having in your project

I can equip a gun using the boneattachment node.
the issue arises when I'm trying to play an animation across both of them, eg. a reload animation. I would have to do some weird animation splitting and play the animation individually on the gun and the character, and sync them, and somehow account for the relative differences in a program such as blender, which would be difficult, hacky and very time-consuming.

It would be easier to not use the boneattachment node in that case, and have the animation modify the guns positions, but that leads to the issue of desync if I wanted to rotate the hip to look up and down

Essentially any workaround is pretty messy / limited / time consuming

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

A node like the boneattachment node which would combine the rigs together at the selected bone

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

Essentially, it would mimic the same way the boneattachment node works, where you can choose what bone the "node" is attached to. From there, the secondary rig (the one that wants to be attached) would be attached to the primary rig (the one that is being attached to) at that bone, the same way the boneattachment node works

The difference is that the rigs would instead also be combined here, essentially acting as 1 rig

eg. primary rig bone layout

-> Head
-> Shoulders
-> Knees

secondary rig bone layout

-> Feet
-> Toes

Secondary rig attached to the Knees bone on the primary rig

New combined rig:

-> Head
-> Shoulders
-> Knees
-> Feet
-> Toes

Now one animation can be played across them all, easily and cleanly

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

It's a node so it's the user's choice to use it or not

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

It's a core feature for an engine, the ability to play an animation across a combined rig, I came from roblox studio and that's how we did it there (although more messily), but to my knowledge unity and unreal work in the same manner

You can't really make a third-person character equip a gun, and the gun be animated alongside the character without it

Tasks

No tasks being tracked yet.
@Calinou Calinou changed the title A way to combine rigs, so that one animation can play across them Add a way to combine rigs, so that one animation can play across them Aug 28, 2023
@fire
Copy link
Member

fire commented Aug 31, 2023

I see the merits of the ability to combine rigs, but I don't have a good approach yet.

@ghost
Copy link
Author

ghost commented Sep 2, 2023

Hopefully someone is able to as this seems like a very required feature for any 3d game really, animation in godot in general seems overlooked

@fire
Copy link
Member

fire commented Sep 3, 2023

I understand your concerns about the animation features in Godot. It's true that robust and flexible animation tools are crucial for a 3D game. However, Godot is an open-source project with limited resources compared to commercial game engines, which can impact the speed of development and enhancement of features.

Despite these limitations, the community plays a significant role in Godot's development. If you have specific ideas or suggestions for improving the animation system, I encourage you to share them on the Godot GitHub page or the official forums. Your feedback could help guide future development efforts.

@ghost
Copy link
Author

ghost commented Sep 3, 2023

Thank you for the response, I will also post this on the godot forum, but I am unsure on what you mean by the github as I thought that this was the godot github page for proposals - is there another where I should post?

I appreciate everyone who develops on godot as it is no easy task, I am also trying to contribute my first code solution to godot issue, but coming from just game development I'm finding it harder to adjust but hopefully that becomes easier with time

@fire
Copy link
Member

fire commented Sep 3, 2023

Yeah, I forgot the main community is on discord and on rocketchat.

The problem is that as far as I know the godot systems assumes one animation tree.

@ghost
Copy link
Author

ghost commented Sep 3, 2023

thanks for the information, I assume it'd also be hard to change it then? Since that assumption carries out to the rest of the animation stuff and alot would need to be overhauled

@lyuma
Copy link

lyuma commented Oct 3, 2023

I think a simpler approach would be to use animation filters combined with an Add2 node that will allow adding parts of the body together.

With filters, it would not be necessary to create a bespoke lower half rig/profile and an upper half rig/profile, when both can use the godot standard humanoid profile (or any other SkeletonProfile).

If we get filter resources such as in PR #76788 then it would be possible to define standard humanoid bone sets, which would work as a masking system for various parts of the body. Your hand motion can be filtered from one humanoid animation, and your walk cycle can be filtered from another humanoid animation, and added together.

@ghost
Copy link
Author

ghost commented Oct 16, 2023

I think that would be a different feature request as the add2 node (assuming you mean add rigs together by body) essentially is what I described, but the filter node seems to just be a different request

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

3 participants