NEW Procedural Animation In Godot 4.0
HTML-код
- Опубликовано: 17 мар 2023
- With the removal of the SkeletonModification stack my old procedural animation video was outdated. I decided to do a new and improved implementation with what's currently available in Godot 4.0
Resources:
* Spider Bot Model - drive.google.com/file/d/1j0qb...
* Github Project - github.com/CBerry22/Godot-4.0...
* Plane Class - docs.godotengine.org/en/stabl...
* Dot Product - hackernoon.com/applications-o...
Social Media:
Twitch - / crigz
Twitter - / pixelpunkgames1 - Игры
Heads up that SkeletonIK3D is marked as deprecated and will be replaced with something else in the future! Just letting you know so you can look forward to redoing this tutorial again 😂
0:49 Crigz knows that
Very informative, thank you.
If anyone is following this using c# you may want to know.
`Basis = Basis.Slerp(endBasis.Orthonormalized(), speed * (float)delta).Orthonormalized();`
and
`Position = Position.Lerp(Position + Basis.Y * heightDiff, speed * (float)delta);`
2:38 I love how everything just stops, everything goes silent, and the the little robot just does a little dance. :3
fella your channel is a real treasure
Man, your tutorials are on another level. You cover some advanced stuff that can add such polish to projects, and all explained in a simple way. Eager to see what comes next from you.
Thank you for this gold, I invested many hours trying to do something like this on a humanoid previously and ultimately did not really get the result I wanted. You've inspired me to try again, and I really think that your method of using tweens to get the halfway stepping-over effect makes it WAY simpler to do what I need to do now...
Exactly the kind of tutorials I'm looking for, thanks!
Absolute Godsend as I'm on 4.0.2 and didn't see settings mentioned in the prior video you had done.
Love seeing your editing and gamedev skills improve every video :) great stuff !
I really needed a GD4 tutorial on IK like this, thank you!
You’re amazing! Thanks for all your videos!
This one’s gonna be super fun! I’m definitely gonna be going further with this base and messing around with different walking things and see what I can do with this 😁
Keep me posted on how you get on!
@@crigz for sure! May be a little bit but I was probably gonna experiment with a mixamo rig, and my own basic character rigs, to see if I can get them going.
Well maybe not mixamo, but maybe I’ll give it a try just for the people who are aren’t too great and rigging, it would just need IKs added in since the mixamo rigs don’t come with them 🤔
But I know you know how much time it can take lmao. I’ll let you know if I need a few pointers if I get stuck haha
But I’ll see what I can do and maybe post it for others and credit you of course! I’ll say I used your system as a base and hopefully explain how to apply it to other humanoid characters 😊
This channel is a gold mine, keep it up! Will check out twitch as well!
The quality of Godot 4 tutorial videos coming out has been fantastic along with all of the mechanics we can make and play with now, thanks for this! Been wondering about Godot's compatability for procedural animation.
Omg so cool thanks for the video :) If you do another one you gotta put some springyness in the body height calculation to give it some bounce :)
Yeah I think just adding a multiplier to the distance in the height offset calculation and reducing the lerp speed could make the effect more pronounced.
Or even forgoing the lerp and using a tween with a bounce easing could work. Something I'll play about with when I come to use this in a game.
Really cool video! Just a little annotation for those who could get problems using this for their projects: if you set turn_speed too high you might get problems as temporarily the position of the adjacent legs switches -> the points for calculating the planes are not in clockwise order anymore -> normal is pointing into the ground -> weird behaviour. So keep this in mind ;)
Great tutorial ! Huge thanks! 💜☺
This is so cool - I want to try something like this!
This is something really impressive! - Well done, Crigz! 👍
This tutorial is absolutely gold! Thanks so much!
Your tutorials are the best!
Thank you for Japanese subtitles. Those translations are native level of accuracy and huge help. You save my life a lot.
pure gold - thanks!
Great tutorial, thanks
Awesome tutorial dude.
This is pure gold
Any news on why SkeletonIK3D is current marked as Deprecated?
Take this with a grain of salt, but I’ve heard that SkeletonIK3D is gonna be replaced with something new soon.
@@mr.hashundredsofprivatepla3711do you know if its been replaced yet? Or if theres been any more news on this?
this is so cool thank you
Amazing tutorial!!!
OMG, best tuto ever :o
Enemies which climb on walls instead of fighting on the same ground level as you, are fun because they are so unique. Especially if you play as such an entity!
Thank you for this video.
Wow that a lot work and coding. Great work on improving on the spider. I did work on base on old video that found and had to look for refs videos. I wonder if the cat or dog workable for this? But guessing the sit and walk target and magnet will be effected or change position.
It should work, you'd probably have to tweak the magnets as you said, and also play about with the tweening of the IKTarget's more to get the walking to feel more natural.
at 3:22 the rays are children of the targets, at 3:33 suddenly the targets are children of the rays
6:15 this script is frame-rate dependent, and since i had vsync off with 1200 FPS it was not working well at all
For the frame rate dependent issue, replace vector with vector.normalized(). This means you have to change the magnitude of the offset to compensate, I find 1.5 works pretty well.
You'll probably get a "Basis must be normalized" error if you do this. If so, the solution for that error is explained in issue #3 on the github repository.
Top shelf stuff as always, Crigz! ^^
Looks amazing. Got to try and find time to build this today.
This shit is so cool dude. Thank you for this
Oh, this is a killer video! I was thinking to do some experimenting but you just showed an amazing solution.
thank you!!!
protip; you can edit multiple values by selecting multiple nodes as long as they're the same type, no need to set up each offset individually
Really cool, thank you for the tutorial!
thank you!
Really great tutorial again, thanks for explaining it so well. Keep up the great work.
tip: you don't have to rotate the raycasts to the right angle:
you can just move them up and inward
then, change their targets to down and outward
Good stuff!
Holy crap that is amazing. Fucking beast.
Very nice and instructive ! Thank you
Mate if you keep cranking out videos like this, your subscriber count is going to explode, all this information in under 10 mins, pure gold
Yes finally! This and inverse kinematic has always been something I wanted to do in Godoy but I was unable to figure out in 3.X!
Very good, thanks for this!
Perfection
I'm going to use another tutorial to try to get my rig set up, and then try to interpret this tutorial but for a biped. I hope it all works out!
2D? Awesome video regardless. This is why Godot is my favourite engine (plus Linux support)
Nice tutorial, very detailed. Thank you. 👌
That's a great tutorial! I am new to Godot and i got a question: Is there a reason why you just used a Node3D and not a CharacterBody3D or RigidBody3D? And, would you use them if the Robot should interact with the World a little more?
Welcome to Godot! The reason I went with Node3D was just to keep things a bit simpler for the video. You could absolutely use CharacterBody3D or RigidBody3D to add physics interactions.
This gives me a cool idea for a game involving insects/bugs.
i`ve been searching for this tutorial in unity for months and i just found it when i switched from unity to godot 4
Thanks you ! Even if I don't plan to make a game like that, it was very informative !
this guy is too smart
Nicely done 🤙
I tried applying this to a spider model I had made with 8 legs and I think I messed something up along the way, but I'll keep messing with it damn it! Good tutorial!
Ok I managed to figure out my issue somewhat, the raycasts would just fly away so I set an if statement to check they didn't fly away too far. It kind of works.
Cool video!
Do you have in mind to make a tutorial about dismemberment function with procedural animations?
Like, of you shoot the leg of the spider character It Will loose his leg and the animation Will change (and also the movement system)
I guess you could change the target's position dynamically to compensate the leg that was taken.
Like it's trying to balnace itself somehow.
Finally The video we have all been waiting for
2:46 my spider turned into a frog
Hello! Firstly thank you so much for this tutorial! This overview was fantastic! I've implemented your workflow into my project and noticed that the performance, while normally quite good in any other circumstance, really tanks when having multiple entities with the same duplicate procedural animation. Have you by any chance found a fix for this?
Hell, i tried to do the same you did but like nothing worked ok. It's a sign to learn more :(
2:57 - Saving this for later
You have no idea how happy I was to see this video
really good!
This is an amazing tutorial - I've watched it a few times now. Thank you for posting this for the community
Do you mind sharing the blender file?
Sure thing! drive.google.com/file/d/1BGXeHHIdAk60dqYttElFD8q3dmia4_AL/view?usp=sharing
@@crigz thank you sir, extremely helpful as im looking to tackle some simple rigging as well
@@crigz Been looking to replicate this setup for a robot arm - how important are the constraints and the IK setup you have in Blender? Does that get translated to Godot at all?
@@MM-24 The IK Constraints themselves aren't important as they don't come across from blender, however I did make use of the IK constraint bones to act as the tips in the Godot IK chains.
@Crigz Vs Game Dev yep, ok totally understood, and I remember where you called that out in the video. Thank you for the clarity....How did you figure this stuff out?
🎉
Please do multiplayer tutorial you are my savior if you do this!
Cool! I've copied all your realisation, but my bot is usually go through textures, I've uploaded your coded and there are the same problem. I'm using godot 4.2.1 for now😮
Me: looking for how to get my characters to face the direction theyre moving
RUclips: want to see how to make a spider
Me: glad you asked!!😂
Bro can you make full Godot 3d zero to pro tutorial in 1 video
because many things are new in Godot 4
And i want learn Godot 4 fast as i can
scary thought
When i would make a new model for the spider how could i put it in the inherited Scene?
Nice tutorial Can u also teach procedural animation for 2d
cool
Heya! A bit late, don't even know if this'll be seen, but does anyone know how to make this work with navigation? I'm working on a small game and want to use the movement this video shows us to make, but i want to make it an automatic enemy, not controlled by the player, can anyone help out?
Did you end up finding a solution to this? From what I'm understanding, Godot won't bake walls and ceilings (you can maybe get them by changing the 'UP' direction in the project settings, but then you can't bake the ground), so I've been using imported navmeshes.
I can get it to move up walls, but only when the entire navmesh is one 'island'... It won't go across multiple NavigationRegion3D nodes without NavigationLink3D nodes placed all over the place (which gets messy if your level isn't all one mesh) or with 'Edge Connections' when the 'NagivationServer3D is active,' which I can't wrap my head around since there's so few tutorials about it.
Cool but if we extend this to the reality the spider still needs to be affected by the gravity. Even if it can climb walls. It will not be like his legs adapt to his movement but his legs support and cause his movement which is absolutely different.
I am interested in procedural animation of models on runtime, with various skeleton morphologies. I am wondering if this can be applicable to it? Can I translate this approach to a generated mesh with a skeleton on runtime, and will it look natural regardless of positions and number of limbs?
please teach how to make blood damage effect on character`s mesh in godot
Talking about animations, is it possible to implement a similar animating style to mw 2019 inside of Godot?
Do you know how to lock some of the bones so they only rotate on one axis?
Hey can you remake tutorial on pathfinding in godot 4.0.1 please.
Awesome!
I heard they are depreciating the IK stuff built into Godot. Anyone know what's up with that? If they have a replacement lined up?
Are there anyways of doing this without raycasting 1 time per leg? If I wanted a few dozen of these little guys running around my scene, it would tank performance.
Not really. Any other options I can think of would be just as bad if not worse for performance. I'd say this is one of the better ways to go.
Perhaps you can set up occlusion & screen space detection so the anims/raycasts disable when not seen, otherwise, I got nothin.
Are there any project settings involved to get the IK skeleton working? If I import your project, the spider works without issue, but when I apply the same method to my characters skeleton, it's unresponsive to moving the marker.
I had the same issue in 4.1, I tried following along on my own model but whenever I spawn him in his legs just go to where he started
why is it that 2 out of 3 times ive followed this tutorial the rotation doesnt work
does anyone know why, when I increase the speed, the thing stops working properly?
Me trying out this Tutorial:
Step-Target what are doing?!
there's a part of me that is tempted to follow this and turn it into a little stealth game demo
would it be possible to make something like that for a biped (human) i would like to have that kind of movement to a human character
Would you have any advice on how to deal with walking off an edge?
I.E. the bot walks to the edge of a large cube with a 90 degree angle cliff.
As is the code can't deal with that, the raycasts stop triggering step updates, the feet bunch up and things get weird as the planes turn into lines.
I'm currently thinking that I add a dummy target to the end of the raycast below the bot, and use that target if nothing is actually hit. assuming it isn't too far away, it should cause the main body to pivot enough to find the actual ground again.
The problem i face is. I'm making biped human. So they can't climb wall. But when i added gravity, they just go through floor. I thought the problem might be collision. But even after added collision, it's still fck up. I'll do more research. But the video dis help me a lot.
please help!! My 3d model in blender moves without a problem with this technique but in godot it deforms me
7:54 when I run with the target_basis line and the transform.basis line, the spider spazzes rotation when walking and turns to walk either into the air or into the ground
Edit: I found the reason! The rays are positioned wrong. They must be exactly running through the step target markers, otherwise they will either expand or shrink
seems like the planes are created wrong causing my spider to float
man it does not feel good to work withsomething that is deprecated on launch. But thanks for the tutorial couldn't really find anything on it.
i have issue when spider bot is walk through the wall instead of climbing it, any solution for that?, i'm using godot 4.1 btw and thanks for very awesome tutorial
I'm doing but spider legs doesn't touching floor. Yes, they moving and step() is calling but something with all this target, rays and points shifting it up from actual hit_target.
Oh, i solved it: I forgot to check "Use collision" for CSGBoxes.