Тёмный
No video :(

Realistic Foot Placement - Foot IK Tutorial in Godot 3.2 

Wojtek Pe
Подписаться 7 тыс.
Просмотров 26 тыс.
50% 1

In this short video I will show you how to easily achieve realistic looking foot placement for your characters in Godot 3.2. This solution is very simple, but it may be sufficient for many projects.

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

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@sanyi9667
@sanyi9667 3 года назад
Thank you so much for this tutorial, I was looking for a foot IK tutorial for months. Zylann made a demo video but I was too inexperienced to figure it out. This tutorial is more than welcomed!
@wojtek_pe
@wojtek_pe 3 года назад
Hi, if I remember correctly, the thing that Zylann made was a totally procedural approach without animation blending. Probably it looks better and is more professional. My solution only sticks foots to ground in predefined way :D However it works mostly ok and is extremely easy.
@bitmammothOG
@bitmammothOG 3 года назад
omg lol I have been searching this entire last week for info on this thank you so much for teaching us how it works :)
@RTSFan1337
@RTSFan1337 3 года назад
Thanks I've waited for this :)
@sigitsatriap6505
@sigitsatriap6505 3 года назад
Nice video, finally someone make video about this with godot, thanks !
@BrainAirways
@BrainAirways 3 года назад
I think your main issue why it looks "janky" is model itself or your rig was setup incorrectly. You can see it clearly around calf area. Calf is rotated towards outside while foot remains straight. It is very noticable when character is standing still.
@wojtek_pe
@wojtek_pe 3 года назад
Hi! The main reason it looks like that it's because I simplified a "look at" vector for feets in IK system. Right now it basically takes a front vector of character and copy it. For better results we should copy other bone orientation in XZ axis, or we should store feet orientation in animation resource somehow (maybe just by rotating "interpolation" Position3D node and adding this value in code). It's definitely on my todo list. For the sake of this video I wanted the code to be really simple, I think that anyone can improve it from here.
@BrainAirways
@BrainAirways 3 года назад
@@wojtek_pe if that is the case in my opinion easiest way would be to combine IK with FK. Instead appling rotation to foot, apply it to calf bone. It should then rotate foot together with calf bone. At least if Godot bone system works 1:1 how Blender bone system works. Another idea would be to move pool target for knee to face character forward vector (this would need to be tested to see if it will be janky).
@wojtek_pe
@wojtek_pe 3 года назад
​@@BrainAirways Hi, I was experimenting with some ideas but in the end I probably try to add another position 3d for magnet value. Actually the skeleton is something like that: Hips -> leftUpLeg -> LeftLeg -> LeftFoot -> LeftToeBase, I can't modify Hips from both Ik systems and modifing ony LeftUpLeg and LeftLeg doesn't give desired result . I was hoping that somehow I could read original bone position and orientation form animation in Godot and just override it slightly but it doesn't seem that this is possible. The second solution you proposed is actually the thing I am showing on the video. It seems sometimes weird, especially in a idle position because rotation of bones inside ik system arent modified beside the tip bone. I will experiment with more and hopefully I will have something to show on my next devlog
@javisartdesign
@javisartdesign 3 года назад
thanks man! I watched a similar approach using Unity. I am trying to inference the feet movement using the velocity of each foot and also placing the hips so the boddy adjust to steps correctly. This approach is very handy neverless.
@wojtek_pe
@wojtek_pe 3 года назад
Hi! This is really a basic approach which could be done in 15 minutes, so of course it's lacking many nice features. If you made something more sophisticated I would gladly hear about it! I didn't find anything on YT about IK foot system for Godot so I made this simple video. I am also a beginner in this topic.
@javisartdesign
@javisartdesign 3 года назад
@@wojtek_pe it's awesome what you're doing with Godot🙂
@Tdoshok
@Tdoshok 3 года назад
Excellent tutorial, but I can't read the character.gd script at all on my monitor. You might want to either increase font size while recording or link to a git repo for your scripts in these videos
@fixurlife
@fixurlife 3 года назад
Thank a lot for this very useful tutorial!
@b.p.7875
@b.p.7875 8 месяцев назад
Great tutorial
@DonatemangaCom
@DonatemangaCom 2 года назад
Really good tutorial, many thanks!
@jeffreygangwisch448
@jeffreygangwisch448 3 года назад
Excellent tutorial. Thank you.
@yellowsock8791
@yellowsock8791 2 года назад
It works!! but how can I stop the legs from being bent?
@den007trof
@den007trof 3 года назад
Thank you very much. Great video
@schemesmith
@schemesmith 11 месяцев назад
Wonderful, thank you very much
@AniketSingh-hr8mi
@AniketSingh-hr8mi 3 года назад
nice video tutorial. keep it up!
@ivailoburov1295
@ivailoburov1295 8 дней назад
This method doesn't seem to work anymore in Godot 4.3🤥
@JorgeRosa
@JorgeRosa 2 года назад
Thank you!
@manusiatidakbiasa
@manusiatidakbiasa 3 года назад
Thank you
@ginoleeswan1454
@ginoleeswan1454 3 года назад
THANK YOU
@solitary200
@solitary200 Год назад
What about stairs?! 😅
@bitmammothOG
@bitmammothOG 3 года назад
When we enable the magnet I get a very weak effect when I move the target container node. What do we set the magnet "Z" based on and is that what is causing this issue?
@wojtek_pe
@wojtek_pe 3 года назад
Hi, the magnet value basically describes how your joint is rotating. In my case, it just sets the direction the knee should be bent to. So it acts as a "magnet" for a knee. Without it the joint will act weird. Proper value really depends on your model. If you have it rotated other way than mine or your scale is way bigger than value "10" at "Z" will be bad. Just place your target container node in some place where your leg should be able to be positioned. Than experiment with different magnet values. At some point it should looks natural in every position of target container. You should also check if you selected proper bones for SkeletonIK. I am using mixamo rig with Godot Game Tools addod for Blender.
@bitmammothOG
@bitmammothOG 3 года назад
@@wojtek_pe I have just seen this reply and appreciate the information, it is extremely helpful to me! It was on a custom rig and model with its own ik so it makes sense the scaling could be very different. I will look into what mixamo outputs closely and see if I can get a nice result. Cheers! :)
@MssJustyna
@MssJustyna 3 года назад
👌
@th3lazyguy
@th3lazyguy 3 года назад
THANKS!!!!!!!!!!!
@SYBIOTE
@SYBIOTE 3 года назад
ok ,but will this work if I want to implement dynamic crouching? I want the legs to bend while walking , but I want the feet to be properly planted
@sanyi9667
@sanyi9667 3 года назад
so on trying to implement it my characters legs go up. How did you tweak those parameters(minmax_interpolation, foot_offset, ik_raycastheight)? I saw my characters legs are more sensitive when moving the target_left and target_right. Any thoughts on this?
@wojtek_pe
@wojtek_pe 3 года назад
Hi, I am not sure why your character legs go up, maybe you didn't setup your raycast length properly, so there is bad collision? You should check ik_raycastheight parameter, it must be lower than your raycast length. As for the parameters tweaking. "minmax_interpolation" - I am using it for clamping. Minimum interpolation should be left around 0.03 because there is bug? in Godot. Not sure why but if you set it 0 your animation will stop instead being used 100%. As for maximum value you could use anything you want between min value and 1, I prefer to set it a little bit lower than 1, but you can limit also in your animation graphs (by setting value other than 1). I do not recommend setting it as 1.0 actually because it's looks "sticky", especially for running animations. "foot offset" gives you ability to manipulate raycast calculated height, sometimes it's a little bit off, so your foot is always in ground or in the air after IK. "ik raycastheight" moves a raycast up above the foot by this value it's useful when you want to detect not only lower terrain by also anything higher than your foot. As for sensitivity of IK depending on target position, I saw that too in this basic script, I set my targets a little bit back to my character. In my "production" script I am actually using another bone attachments for knees to setup as magnets, and I am using a basis of foot attachment for proper front foot orientation right now. Not sure what fixes this problem, but I cannot reproduce it right now.
@chaqsilent
@chaqsilent 3 года назад
Can an addon/plugin be made from this? If so, does anybody know how?
@lovehartLH
@lovehartLH 3 года назад
Could you share a download for your Player.tscn scene/script?
@riandhrasetiawan8226
@riandhrasetiawan8226 3 года назад
How do you make the Character?
@myprivatechannel1695
@myprivatechannel1695 2 года назад
COOL
@Crossbow123
@Crossbow123 Год назад
Thank you for the tutorial. I was wondering what license governs the code for the foot IK in your video? Can I freely use the code?
@Velsia
@Velsia Год назад
Since when is coding copyrighted lol😂 ?
@Crossbow123
@Crossbow123 Год назад
@@Velsia ​ Well, code IS copyrighted. Even that on stackoverflow. You are not allowed to use it however you like. See ToS. But most people don't care about these rules and chances you get sued are negligible. Its more of an ehtical / moral issue when you don't abide by the rules.
@wojtek_pe
@wojtek_pe Год назад
Use it however you like. All code in my videos can be treated as MIT licensed
@anindyaroythetechmaster
@anindyaroythetechmaster 3 года назад
Hey, how do you edit gd script in visual studio instead of the default editor? Also, is there any benefit in doing so?
@wojtek_pe
@wojtek_pe 3 года назад
Hi, to be honest I don't remember how bad was default editor, I use vs code in my daily work so I am used to it. Integration is pretty easy, there is a tutorial on youtube by Gamefromscratch. As for benefits, I think it's easier to manage multiple files in a tree comparing to a list in built in editor (if it didn't change). There is also pretty nice autocomplete, and auto formatter. Also there is a lot of plugins for vs code not directly related to gdscript.
@5minutemovies977
@5minutemovies977 3 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Do0YZocTu80.html
@anindyaroythetechmaster
@anindyaroythetechmaster 3 года назад
@@wojtek_pe Well I think uaing visual studio code is advantageous only if you jave dual monitors or a very large monitor as you don't have to constantly switch between the script editor and the scene editor. But if you work with only a single monitor then it is of no advantage or may even be disadvantageous since visual studio will use additional resources.
@ChrisD__
@ChrisD__ 3 года назад
@@anindyaroythetechmaster You also don't get autocomplete for node's in your scene.
@anindyaroythetechmaster
@anindyaroythetechmaster 3 года назад
@@ChrisD__ You actually get autocomplete for nodes if you type variable types for every node. Ever since I came to know about it, I began to static type GDScript and now I always get autocomplete for every node.
@geekosnow6944
@geekosnow6944 3 года назад
Where did you learn gdscript
@wojtek_pe
@wojtek_pe 3 года назад
Hi, you should check docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_basics.html If you are a software developer it's similar to python so it's really easy to learn. Just start doing some games with godot and you will find it natural to use.
@pawelwrzesien5232
@pawelwrzesien5232 3 года назад
Polak :) ?
@Arthur-dp7ys
@Arthur-dp7ys 2 года назад
Dislike. Is it so hard to post a code somewhere? I can read it properly from video
Далее
Animating LEGS (Walk Cycles and Weight) - Doodley
11:25
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 865 тыс.
Simple Flower Syrup @SpicyMoustache
00:32
Просмотров 2,4 млн
What's The Deal With Procedural Animation?
11:24
Просмотров 35 тыс.
I Made a Donut in Every Version of Blender
11:31
Просмотров 480 тыс.
EVERYTHING About Blender's Motion Tracking System!
21:54
Active Ragdoll / Physics Animations in Godot 4.0
6:06
Using IK to Improve Animations in Unity
12:05
Просмотров 65 тыс.