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);`
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 😂
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...
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 😁
@@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 😊
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 ;)
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.
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.
kinda wild they just remove stuff without adding a replacement for the feature removed- i'm not even working in 3d, but things like making a pixel perfect smoothed camera, several tilemap features... they just.. poof! and haven't been in the engine for like a year+
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.
Thanks for explaining how to use the IK classes in Godot. I've used the SkeletonIK3D class for leg and arm animations while driving (steering wheel, pedals, gear shifter animations). It might just be my computer, has an older CPU and GPU is GTX 1080, but the performance of IK in Godot seems not great. I'm using the chains just to position the legs and arms, so the hand and foot rotation are excluded and are still manually rotated. Leg chains have 3 bones and arms have 4 (shoulder to wrist placement basically). I even have it set to 1 for max iterations. I put a toggle in my game settings menu to turn on/off IK and while off gets 60FPS (I have max FPS to 60) and while on drops to ~40FPS. Other than the performance hit the animations look believable with the appropriate magnet values. But for me I might have to go back to manual positions/rotations of bones for animations. The only thing I can think of is the chains have too many bones, but 3 or 4 don't seem unreasonable. And the scale of my model in game is 0.01 so maybe there's some weird math going on but I'd hope the IK algo doesn't increment by a set small amount while finding the solutions. Anyone else have such a big performance hit with the IK stuff in Godot?
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.
For people that can't seem to get the SkeletonIK3D to work in editor but work in game - with SkeletonIK3D there's Play IK option on top of the editor, you need to have that checked if you want to see updates in the editor. I don't know why it was disabled for me by default.
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.
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 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.
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)
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.
I am trying to now combine this logic with CharacterBody nodes by having my root node be a CharacterBody3D node instead of a generic Node3D. I also went ahead and put collision shapes for every bone. My problem is the leg collision shapes mess with the inverse kinematics, leading to unnatural solutions to the IK solver. Anyone on the same boat?
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.
@@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?
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😮
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
SkeletonModification was removed and now SkeletonIK3D is also deprecated, so this implementation is also deprecatted. What is wrong with the godot folks. :cries:
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.
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.
Quite late, but do you think you'll make a 4.3 version? There's quite a few issues that arise when using 4.3 even if you try it out on your own tutorial project that you provided but I have a feeling you'd rather wait until the SkeletonIK3D node gets updated to make another updated tutorial.
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.
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?
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.
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.
Cool but legs keep getting stuck behind, pulling down the spider. I guess the movement of the spider is to fast for the legs to hit their target in time to let the other legs _step but I don't want to increase the legs movement speed. Is there an way to fix this?
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
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
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...
fella your channel is a real treasure
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 😊
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 ;)
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.
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.
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?
@@andguy probably in godot 4.4-4.5. Hopefully it will make animation like this easier
kinda wild they just remove stuff without adding a replacement for the feature removed- i'm not even working in 3d, but things like making a pixel perfect smoothed camera, several tilemap features... they just.. poof! and haven't been in the engine for like a year+
Love seeing your editing and gamedev skills improve every video :) great stuff !
In 4.3 works like a charm. Thank you.
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.
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
This is something really impressive! - Well done, Crigz! 👍
Thanks for explaining how to use the IK classes in Godot. I've used the SkeletonIK3D class for leg and arm animations while driving (steering wheel, pedals, gear shifter animations). It might just be my computer, has an older CPU and GPU is GTX 1080, but the performance of IK in Godot seems not great. I'm using the chains just to position the legs and arms, so the hand and foot rotation are excluded and are still manually rotated. Leg chains have 3 bones and arms have 4 (shoulder to wrist placement basically). I even have it set to 1 for max iterations. I put a toggle in my game settings menu to turn on/off IK and while off gets 60FPS (I have max FPS to 60) and while on drops to ~40FPS. Other than the performance hit the animations look believable with the appropriate magnet values. But for me I might have to go back to manual positions/rotations of bones for animations. The only thing I can think of is the chains have too many bones, but 3 or 4 don't seem unreasonable. And the scale of my model in game is 0.01 so maybe there's some weird math going on but I'd hope the IK algo doesn't increment by a set small amount while finding the solutions. Anyone else have such a big performance hit with the IK stuff in Godot?
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
Thank you for Japanese subtitles. Those translations are native level of accuracy and huge help. You save my life a lot.
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.
For people that can't seem to get the SkeletonIK3D to work in editor but work in game - with SkeletonIK3D there's Play IK option on top of the editor, you need to have that checked if you want to see updates in the editor. I don't know why it was disabled for me by default.
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.
Absolute Godsend as I'm on 4.0.2 and didn't see settings mentioned in the prior video you had done.
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
excellent video! will try to toy around with this at some point. it looks great!
This channel is a gold mine, keep it up! Will check out twitch as well!
Exactly the kind of tutorials I'm looking for, thanks!
Awesome video! It really helped me making my own procedural animation in roblox studio.
I really needed a GD4 tutorial on IK like this, thank you!
This tutorial is absolutely gold! Thanks so much!
i`ve been searching for this tutorial in unity for months and i just found it when i switched from unity to godot 4
This is 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!
2D? Awesome video regardless. This is why Godot is my favourite engine (plus Linux support)
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!
This gives me a cool idea for a game involving insects/bugs.
Holy crap that is amazing. Fucking beast.
Really cool, thank you for the tutorial!
Top shelf stuff as always, Crigz! ^^
Oh, this is a killer video! I was thinking to do some experimenting but you just showed an amazing solution.
pure gold - thanks!
This is so cool - I want to try something like this!
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 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.
Looks amazing. Got to try and find time to build this today.
thank you so much! i have to edit a little sadly because mine keeps just going through 90 degree walls but ill get there I hope
OMG, best tuto ever :o
Your tutorials are the best!
This shit is so cool dude. Thank you for this
Really great tutorial again, thanks for explaining it so well. Keep up the great work.
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.
2:46 my spider turned into a frog
Great tutorial, thanks
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.
Awesome tutorial dude.
Thanks you ! Even if I don't plan to make a game like that, it was very informative !
this guy is too smart
Hell, i tried to do the same you did but like nothing worked ok. It's a sign to learn more :(
Finally The video we have all been waiting for
I am trying to now combine this logic with CharacterBody nodes by having my root node be a CharacterBody3D node instead of a generic Node3D. I also went ahead and put collision shapes for every bone.
My problem is the leg collision shapes mess with the inverse kinematics, leading to unnatural solutions to the IK solver. Anyone on the same boat?
Very nice and instructive ! Thank you
Nicely done 🤙
this is so cool thank you
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.
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?
Very good, thanks for this!
Nice tutorial, very detailed. Thank you. 👌
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
why is it that 2 out of 3 times ive followed this tutorial the rotation doesnt work
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😮
When i would make a new model for the spider how could i put it in the inherited Scene?
there's a part of me that is tempted to follow this and turn it into a little stealth game demo
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
SkeletonModification was removed and now SkeletonIK3D is also deprecated, so this implementation is also deprecatted. What is wrong with the godot folks. :cries:
You have no idea how happy I was to see this video
Good stuff!
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
where did you fins this sky texture ist amazing
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.
Me trying out this Tutorial:
Step-Target what are doing?!
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.
Quite late, but do you think you'll make a 4.3 version? There's quite a few issues that arise when using 4.3 even if you try it out on your own tutorial project that you provided but I have a feeling you'd rather wait until the SkeletonIK3D node gets updated to make another updated tutorial.
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.
thank you for Japanese subtitles
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?
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
Amazing tutorial!!!
thank you!
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.
Perfection
Cool but legs keep getting stuck behind, pulling down the spider. I guess the movement of the spider is to fast for the legs to hit their target in time to let the other legs _step but I don't want to increase the legs movement speed. Is there an way to fix this?
I've been looking around, does anyone know if 4.2.1 has a replacement for SkeletonIK3D? The docs mention its depreciated but not of a replacement.
🎉
Please do multiplayer tutorial you are my savior if you do this!
i wonder who out there has used this technique on a humanoid player
(I'm hinting at you Crigz Vs Game Dev)
Nice tutorial Can u also teach procedural animation for 2d
I remember your channel having more videos, what happened?
Me: looking for how to get my characters to face the direction theyre moving
UA-cam: want to see how to make a spider
Me: glad you asked!!😂
really good!
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?