Тёмный

Godot 3D - Items and Bone Attachments | Character Animation Tutorial: 7 

Bonkahe
Подписаться 3,5 тыс.
Просмотров 7 тыс.
50% 1

A bit of a more dense video, going over handling items and switching to different combat states, thank you to @flynsarmy for requesting/suggesting this subject, while I probably would have gotten around to it eventually, I might have gone a different way with it, and as such I'm glad they spoke up~
AnimationTree Docs: docs.godotengine.org/en/stabl...
Github: github.com/Bonkahe/GodotEduca...
Godot: godotengine.org
- timestamps -
00:00 - New Intro!
00:10 - Breakdown
00:48 - Going Over New Animations
01:30 - Setting up Animation Tree
05:09 - Setting up Bone Attachments
06:15 - Setting up Weapon Positions
08:25 - Programming Combat Controller
15:20 - Setting up Combat Controller
15:57 - Setting up Animation Equiping Events
17:12 - Testing Results
17:39 - Wrapping up, Thanks for Watching!

Опубликовано:

 

15 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 28   
@ilhanilhanDev
@ilhanilhanDev 19 дней назад
4:38 you also can set blend count to 0.99 and this functions will work with one type of objects
@ilhanilhanDev
@ilhanilhanDev 19 дней назад
never stop bro. You do the best
@ilhanilhanDev
@ilhanilhanDev 19 дней назад
my hero
@yvanvan3729
@yvanvan3729 Год назад
Another great tutorial. The Godot community has a lot to learn from these tutorials. Thank you for making them. Have a wonderful week.
@Bonkahe
@Bonkahe Год назад
Thank you so much for your kind words! I'm very happy it's been of help.
@flynsarmy
@flynsarmy Год назад
This series is quickly becoming one of the most useful on RU-vid for third person Godot Animation. In particular your attachment swapping setup is a bit nicer than mine. Keep these videos coming! I'm curious how this will scale to multiple weapons that require different animations.
@Bonkahe
@Bonkahe Год назад
So the way I currently have it in hermit is the weapon has on it the name of the animation set, then when I equip it I use that name + "Idle", "block" or "Attack", so that way I can have any number of animation sets, and then filter through them based on the weapon itself, though obviously multiple weapons could share a single animation set. If there's demand for it I could implement that system here, would be fairly trivial to do so. Thank you so much for your kind words though! I'm glad your finding it useful.
@TheEngomusic
@TheEngomusic 7 месяцев назад
I will do this tutorial series next for sure! Cool that you code both in C# and gdscript.
@Bonkahe
@Bonkahe 7 месяцев назад
Absolutely! I'm glad you find it helpful~
@D.E.Nicolas.Goncalves
@D.E.Nicolas.Goncalves 8 месяцев назад
you help a lot man, greatfull for your work!
@Bonkahe
@Bonkahe 8 месяцев назад
Happy to help!
@Tailmonsterfriend
@Tailmonsterfriend 2 месяца назад
This is fascinating. I stumbled across this video after I already implemented my own holstering solution using bone attachments in Godot 4. My approach was slightly different. Instead of adding a Node3D to act as a container, I designed my holsterables (objects you can pick up and holster) to each have a custom holster offset and rotation. My character has 5 holster slots: Right leg, left leg, right forearm, left forearm, and back. Small items can be holstered on forearms or legs, medium-sized items can go on the legs or the back, and large items can only be holstered on the back. Since I have a variety of different-sized objects (data chips, flashlights, flasks, gas grenades, etc.) that can go in different holsters, I needed each of them to have bespoke positioning. But now that I think about it, I wonder if I could use Node3Ds as containers instead, like the right leg holster for example would have a Medium Container and a Small Container that correctly position different-sized items based on the item's size. A little less flexible, but would make it a lot easier to add new items. I think I'll play around with this idea.
@Bonkahe
@Bonkahe 2 месяца назад
That sounds very cool tbh, I did go with a holsterable object with an offset in previous iterations of my own project, but like you said this way does make it easier to add new items, though actually thinking about it I wonder if a combination could be used, like having a node3d that is the container for the leg holster slot, but then having a range, like two points with a distance between them, that based on the length of the weapon it can finely control how much offset it has to look like it's realistic, not sure. That being said I'm very glad you got some help out of the video, I'd love to hear about what you find as you explore using a similar idea with your project! (whether you use my way or not xD )
@user-ey1pi1up9i
@user-ey1pi1up9i Месяц назад
very nice🎉
@thegoblintown
@thegoblintown Год назад
I would love to learn more about how to do things like clothes/armor which are meshes that animate with the character body.
@Bonkahe
@Bonkahe Год назад
So they are surprisingly easier than I anticipated, as long as they are rigged up to the proper skeleton you can just instantiate the clothing mesh and make it a child of the skeleton, kind of handles itself, but I could probably just do that for the next episode, in fact I may very well do that for the next episode! Thank you so much for the comment and for solidifying what I want to do~ xD
@SoloGoesWild
@SoloGoesWild 4 месяца назад
Great series so far. I have a question though. How can I change the idle in the locomotion to a combat idle while the character is not moving? I'm using my own model and animations so my project differs a bit. I was also thinking about adding shields and other items. Would you create different filters like leftarm blend, right arm blend etc instead of just an upperbody to handle different types of equipping animations? And if I want to add walking locomotion, is setting a bool and just switching locomotion blendspace a solution? Thanks! Your channel was a great find.
@Bonkahe
@Bonkahe 4 месяца назад
Hello! Glad you are finding the series helpful, I'll try to answer your questions as best I can~ For the idle I would have two separate blends with a transition when you go from combat out of combat and back again, in essence I would have a blend for all locomotion for in combat with the combat idle as the 0 movement position, and then the normal one for the other. Not the most elegant option perhaps, but in my experience trying to make it more complicated usually results in less than desirable results. (Mind you this means the parameters your using to pass in the movement vector will have to be handled via code, so when your in combat your updating the right parameters vs when your in normal movement) For different weapons options in short yes, if you don't have a dedicated animator, if you are doing it yourself, just having an animation for the right hand holding a shield is probably going to be the most viable option, and filtering on an arm by arm basis. That being said you will obviously not have the best visuals in that manner, or at least it won't be as easy to pull off cohesive visuals using that method, the ideal method is you have animations for using one handed weapon with and without a shield in the other hand, and using those animations. For walking versus running you can do that, I personally would have them all in one blendspace however, as that way you can fade down from sprint, to jog, to walk, then maybe like a slow walk option. Personally I think that results in the most convincing result, but you can definently do another blendspace all together. (If you go the route of having another blendspace for the combat though this could get messy, and you would probably need a walking and running combat blendspace, plus a walking and running normal blendspace, just it could be a lot of overhead to keep track of xP ) Hopefully that wall of text proves helpful! Good luck with your project~
@bennicus4901
@bennicus4901 2 месяца назад
Is it possible to have another animation tree resource as a sub-tree within your main one? So that e.g. if players can customize their characters, you can load the appropriate set of animations at run time into the main tree
@Bonkahe
@Bonkahe 2 месяца назад
So it's theoretically possible, you can change the structure at runtime by using the function: animationTree.tree_root.get_node("whatever your node (probably a state machine) name is").replace_node(whatever node you want to replace it with). That being said it would be awfully clunky, maybe a better option would be to use the get node option to get the state machine within your root animation node, and instead of replacing it, just have several state machines, and switch the one your currently actively using to remove it's transitions, and replace the transitions of the one you want to be using with those transitions, this would effectively disconnect the state machine, and connect up another. (This is assuming your using a blend tree as your root animation tree node). Heres the documentation for AnimationNodeStateMachine, you can find the functions required to pull this off (get_transition_count, get_transition, remove_transition, add_transition): docs.godotengine.org/en/stable/classes/class_animationnodestatemachine.html#class-animationnodestatemachine-method-get-transition-count
@bennicus4901
@bennicus4901 2 месяца назад
@@Bonkahe Interesting, appreciate your thoughts! It feels like its not a use case that's core to the engine, but it would help people split up and organise large anim trees in a more modular way. Looks like something very close to that is possible with a bit of work though, I'll give it a try some time :)
@lukabrasi001
@lukabrasi001 2 месяца назад
not sure if you reply to comments but i've a really big issue at hand. you see, the scene i'm trying to add as a bone attachment is a skeleton as well. problem is, whenever i try to add the bone attachment, the position and rotations are all messed up and i cannot for my life figure out what's wrong. even using the container method, the position is always incorrect even though it's fine in the editor
@Bonkahe
@Bonkahe 2 месяца назад
Hmmm, so I was unable to re-produce your issue, I dragged in a mesh onto a bone attachment of another duplicate of itself and it worked as intended, the only thing I can think of off hand is make sure that nothing has been rescaled on either skeleton, as in the node they are in is 100% normal scale of 1, this can cause various issues, that being said, should that fail hit me up on discord, you can find my profile on the godot main discord, my name is the same on there as it is on here, and I think sitting down in the godot discord I might be able to at the very least trouble shoot with you.
@lukabrasi001
@lukabrasi001 2 месяца назад
@@Bonkahe just saw your reply, sorry for not coming back sooner. i fixed the problem by, drumroll, reinstancing the gun and trying again... i'm not sure what went wrong the first time around, it's literally the same gun, nothing was changed so i'm really unsure why Godot thought it had to pull this prank on me
@Bonkahe
@Bonkahe 2 месяца назад
Lol I'm amazed by how often just removing it and trying again works! I'm glad you got it though for sure~
@containedhurricane
@containedhurricane 8 месяцев назад
What's the background song title and artist?
@Bonkahe
@Bonkahe 8 месяцев назад
All my music came from the wonderful artist Miguel López, you can find the album here: mlopezaudio.itch.io/rpgexploration I believe the intro is the desert shrine song, I honestly can't remember which are which on the rest though sorry!
@containedhurricane
@containedhurricane 8 месяцев назад
@@Bonkahe Thanks!
Далее
Beginner's Guide to CK3 Even Grandma Would Understand
40:36
One moment can change your life ✨🔄
00:32
Просмотров 13 млн
Godot 4 - Easy Animation Retargeting In Minutes
8:34
10+2 AWESOME ADDONS for GODOT 4
8:36
Просмотров 129 тыс.
Active Ragdoll / Physics Animations in Godot 4.0
6:06
Third person Dynamic Vaulting in Godot 4
2:40
Просмотров 14 тыс.
Godot 4 - Forest Night Environment From Scratch
36:48
Godot 4 - Make your own Mixamo animation libraries
12:26
Godot 4 / Blender - Third Person Character From Scratch
57:33