Active Ragdoll / Physics Animations in Godot 4.0

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 96

  • @4mb127
    @4mb127 Рік тому +128

    You're the wizard we all need but don't deserve.

  • @micmacha
    @micmacha Рік тому +51

    You've gotta love any engine which you can tear open and look at the code of, when something seems off.

  • @Vaximous
    @Vaximous Рік тому +36

    Godot Jolt actually has functioning springs, would like to see a remake of this using Jolt as its performance is so much better than GodotPhysics3D actually.

  • @FinaISpartan
    @FinaISpartan Рік тому +16

    Wow, this is the best character animation I've seen in godot so far! Good stuff!

  • @mantequilladev
    @mantequilladev Рік тому +4

    Your channel has been huge for me for my latest project using active ragdolls and IK. Keep it up!

    • @rafaeljm3204
      @rafaeljm3204 Рік тому

      If I may ask, did you get it to work when colliding to walls?

  • @delqyrus2619
    @delqyrus2619 Рік тому +42

    I can't appreciate enough how much i like your "Do-It-Yourself"-Mentality. It isn't implemented in the Engine? Just implement it yourself! That's one of the great features of Godot.
    Still i would recommend impementing it directly in the engine via C. Such tiny calculations in GDScript can be pretty slow. And while you have access to the source you can have huge performance improvements by just using native code.

  • @yvanvan3729
    @yvanvan3729 Рік тому +9

    Awesome tutorial ! Great great work. Thanks you for sharing your knowledge with the Godot community !

  • @SytheluxRikd
    @SytheluxRikd Місяць тому +1

    OMG this is exactly what I try to achieve for a while, but couldn't wrap my head around. Thank you!

  • @porkyorcy1715
    @porkyorcy1715 Рік тому +3

    SO AMAZING AND SIMPLE THANK YOU!

  • @bryanleebmy
    @bryanleebmy Рік тому +4

    Crazy that it's not yet implemented in the engine but you went ahead and did it anyways!

  • @ivailoburov1295
    @ivailoburov1295 Рік тому +1

    I never thought I'd see this working in Godot anytime soon. Thanks!

  • @misterprickly
    @misterprickly Рік тому +1

    I'm so glad that you made this!
    Thank you so very much.

  • @ThefamousMrcroissant
    @ThefamousMrcroissant 9 місяців тому

    This is actually genius! It looks so good while being so simple. It takes a smart person to figure out an easy solution to a hard problem.

  • @thomasmaier7053
    @thomasmaier7053 Рік тому

    Superb mate! Thank you for the comprehensive tutorial and code on GH. I'll try and tinker with it during GGJ. Cheers!

  • @soudi1684
    @soudi1684 Рік тому

    wow. the availability of this information is amazing.

  • @BlenderhilfeDe
    @BlenderhilfeDe Рік тому

    very good tutos my friend, cheers!

  • @feversection9713
    @feversection9713 Рік тому

    You're the absolute best at this

  • @rubixkyoob2
    @rubixkyoob2 Рік тому +2

    Awesome tutorial!

  • @WretchedEgg528
    @WretchedEgg528 Рік тому +1

    Thank you, thank you, thank you!

  • @generrosity
    @generrosity Рік тому +5

    This is AMAZING!! 😲 If you are looking for ideas - seeing how characters act being hit with a sword or bullet instead of balls? Could you use this to merge in a stance Delta - someone who is hobbled over or stands with chest more open? So cool!

  • @Polygarden
    @Polygarden Рік тому +1

    This is genius!

  • @chrisnevermorebotha3040
    @chrisnevermorebotha3040 Рік тому +1

    Thank you, this looks great. You making Godot look AAA ready!! Motion Matching system in Godot ? wink wink nudge nudge

  • @hidemat5141
    @hidemat5141 Рік тому +2

    Nice dude

  • @robinj6997
    @robinj6997 3 місяці тому

    I didn't know how physics animation worked. But it's the same method which is used for VR hands. A next level implementation would be to trigger new animations based on the forced applied to each limb, maybe procedural.

  • @TheArtificer5299
    @TheArtificer5299 5 місяців тому

    thankyou so much for the github link, so incredibly helpful, one thing i think you could add (I will be adding quite a few features but for different reasons) would be making it so limbs stay in their sockets, i might update this comment if i do end up implementing that, but its really not needed for most things

  • @gonderage
    @gonderage Рік тому

    Gosh, we could use this for things like responsive animations to entities being attacked at specific body parts. I vividly remember how colossal Elden Ring enemies react like this, like their knee shakes when attacked at the leg for example.

  • @kiyasuihito
    @kiyasuihito 16 днів тому

    Awesome

  • @question_mark
    @question_mark Рік тому +2

    noice

  • @Smaxx
    @Smaxx Рік тому +2

    Looks great. Also tempted me to take some time looking into the Skeleton3D source to maybe get this functioning out of the box without copies, because it feels unnecessary complicated.

  • @leep_
    @leep_ 10 місяців тому

    So I was actually working on something completely unrelated but this actually helped me with that problem. 😂

  • @drawtheword7590
    @drawtheword7590 4 місяці тому +3

    anyone know if they implemented those 6Dof joint in later versions??? if so it would be nice to see a tutorial update using those joints. thanks for the tutorial hoping to use this in my project

  • @boroborable
    @boroborable Рік тому +2

    really nice tutorial. I think after a forcefull collision or a leg shot, swapping to ragdoll and lose control then blending back to standing controller would definitely improve this, but those require more manual animation work I suppose? maybe keypose blending perhaps?

  • @Relivino
    @Relivino Рік тому +3

    Would you be able to make a tut on how to stop character movement when they collide with a wall?

  • @devilblackdeath
    @devilblackdeath Рік тому +1

    Funny enough I noticed FF16 probably did something similar for hit feedback (probably to avoid having enemies flashing red in their realistic environments). At least as far as using springy bones, not the actual reaction to the environment.

  • @pelatho
    @pelatho Рік тому

    Genius!

  • @Eirenband
    @Eirenband Рік тому

    You make cool stuff.

  • @EeVeE3D
    @EeVeE3D Рік тому +1

    Cool

  • @ld2studio675
    @ld2studio675 Рік тому +1

    Thanks

  • @so_easy23
    @so_easy23 Рік тому +2

    holy shi

  • @sanyi9667
    @sanyi9667 Рік тому +3

    your approach is amazing. would you consider making a beginner tutorial series? 4-5 videos? I saw your previous work on the axe throwing feature or card display, any of those types of games (hackNslash/card game) would be greatly in demand

  • @_PiCode
    @_PiCode Рік тому +2

    This is probably better than what I made 👍

  • @haxtrad
    @haxtrad 7 днів тому +2

    idk why but my guy just sort of floats away. I have no idea what i did wrong. I even tried copying your code but it didn't help.

  • @mōellctie
    @mōellctie Рік тому +1

    Hey thanks for the tutorial.

  • @rafaeljm3204
    @rafaeljm3204 Рік тому +1

    One thing I don't get is how do you make it so that the collided ragdoll doesn't keep trying to move until it eventually catches up to the animation model and essentially blinks through a wall?

  • @giggio1747
    @giggio1747 Рік тому +2

    That's wonderful! Thanks a lot.
    I'm curious to understand how does it impact on performance...Does anyone already have tried it on a complete project?

  • @johann2518
    @johann2518 Рік тому +1

    looks great, how are u keeping the modell upright ?

  • @JourtCester
    @JourtCester Рік тому +1

    Cool work! I am trying to recreate the active rag doll for the walking player charterer you showed. However, I cant get it to work. After configuring all joints and colliders Godot crashes for me. Any chance you can release your version of it? I think your repo only has the standing character, not one controlled by the player.

  • @spielville5087
    @spielville5087 Рік тому +2

    It's probably a wierd request, but could you come up with a video on the way to implement a character dismemberment in Godot 4?

  • @luffymonkey6523
    @luffymonkey6523 11 місяців тому

    cool!

  • @ppppppplanet
    @ppppppplanet 4 місяці тому

    Been struggling with applying hookes law to rotation. Have you thought about making a separate video for that? It's tough to find a good explanation for it and most guides I've found don't match every axis of rotation well.

  • @botulin1443
    @botulin1443 Рік тому

    Amazing work. My suggestion is to make the neck stiffer.

  • @hackenshaw
    @hackenshaw Рік тому +10

    Very cool. Have you considered contributing your implementation to the godot source code? You would have to implement it in C++, but the maths will be exactly the same

  • @bramweinreder2346
    @bramweinreder2346 Рік тому

    Is it possible to set them up like bowling pins and they fall down if their colliders are triggered? Think Storm Trooper Bowling but you're using The Force to throw heavy objects.

  • @samuraikina5908
    @samuraikina5908 Рік тому

    Cheers 🤣 we all doing rig videos today ❤️

  • @AnggaFurasesa
    @AnggaFurasesa Рік тому

    Thanks dude... It still hard to understand even if you share the source.. As far as I know :
    1. If your character has blend_shapes in mesh, then, don't blindly change root type as Character3DBody. it will write big array in your tscn and your system become very slow. Suggestion : Just export armature only for physical_bones, and animated_bone. And armature with mesh for interpolated_skeleton.
    2. Interpolated model cannot play exact animation? Maybe because "Interpolated". it make sense to make smooth animated of which following animation bones, but it will lack target positions end to end. To see what happen, create BoneAttachment -> create basic mesh, and attach it. In my case, All bones (in physics, animation, and interpolated skel) have exact positions in rest pose. Some idle animations, have different position of bones, and interpolated bone in median vector position. I hope someone give direction and suggestion. thanks

  • @vd3876
    @vd3876 Рік тому

    You mentioned that there is a way to prevent the physics of bones from being trapped by the geometry of the world. Could you explain how this can be done? Which direction should I go?

  • @woohoo2491
    @woohoo2491 11 місяців тому +2

    Dude just remade Euphoria in Godot

  • @ClipsAndTips255
    @ClipsAndTips255 10 місяців тому

    Thanks, really helped. Is there any way to make an active ragdoll without needing an external collider that's not part of the body?

  • @sebashtioon_
    @sebashtioon_ 3 місяці тому +1

    hey, im wondering if you can give me the source where you got the character?

    • @crigz
      @crigz  3 місяці тому

      It's the Y-bot from Mixamo

    • @sebashtioon_
      @sebashtioon_ 3 місяці тому

      @@crigz Thank you!

  • @chedev
    @chedev Рік тому

    hey i try to run the physics bone start simulation but when i run the game the game just freeze

  • @rafaeljm3204
    @rafaeljm3204 Рік тому

    This is a really cool tutorial. Would you mind sharing a bit more on how to make it so that the ragdoll appears less stiff? When adding my simple rigged humanoid and simulating him fall he just looks kind of like a plastic doll, not crumbling all funny like I'd like him to do :)

  • @R1fleman
    @R1fleman 10 місяців тому

    how can you add more animations like a punch

  • @darknetworld
    @darknetworld Рік тому

    Great work! still to work on it to learn it. I wonder if the for easy to deal with weapon aim or interacting object like door or rope or ladder. But guessing it a lot of work.

  • @itseems7173
    @itseems7173 Рік тому +1

    I dont think you should be using hookes law for this, IMO character should apply the same force to return to initial state from any other state, because character isnt a spring. Like when you're doing push ups, you're applying the same force no matter how low you get during a push up.

  • @matthewlewis757
    @matthewlewis757 7 місяців тому

    Is there a way to do this in godot 3.5?
    I tried doing it, but I was unable to implement it.
    It was heartbreaking

  • @goldengoblinX
    @goldengoblinX Рік тому

    Please do multiplayer tutorial you are my savior if you do this!

  • @AdamsAGD
    @AdamsAGD 10 місяців тому

    im somewhat of a total noob but i thought that the physicsbone would act a collision shape for the characterbody3D. is that possible? i saw another person video and he doesnt have a collision shape for his root node, not sure what hsi root node was tho, it was just a 3dNode icon and it was for an NPC not main characte.
    i implemented the physical_bones_start_simulation() and that made my bones ragdoll around, but they arnt staying on my character, so i walk around and my body is just lying on the ground.

    • @luc0
      @luc0 6 місяців тому

      Do you figure out a solution?, I am trying in the CharacterBody3D too, and moved the main CollisionShape3D accidentaly and ragdoll works, but I need the main collision shape because is a CharacterBody...

    • @luc0
      @luc0 6 місяців тому

      the reason I think is because the bones collides with the CharacterCollisionShape, but I dont find a solution

    • @AdamsAGD
      @AdamsAGD 6 місяців тому

      @@luc0 sadly it jsut doesnt work like that. wow, 3 months ago feels more like a year, anyways a character3d needs ONE collision shape, MAYBE you can put the collision shape under the characterbody3d and then with code have it follow the bones, not sure if thats what i did or not.

    • @AdamsAGD
      @AdamsAGD 6 місяців тому

      @@luc0 it doesnt work like how i wanted it to. The characterbody3d needs a collision shape and that im assuming inherits all the characterbody3d "stuff" IE, collides with static objects.
      Im not sure if i put the collision shapes under the cchracterbody3d and then used code to follow the bone, or if i had them as children of the bones..

  • @jamaalsineke2405
    @jamaalsineke2405 8 місяців тому

    Out of curiosity, how does this impact performance if you had say 20 characters with this system? Because to my understanding you'd be running 40 rigs in total?One physics and one nimation rig?.........Secondly do you ave any idea how I'd reverse engineer this for unreal engine?

  • @internettrash00
    @internettrash00 Рік тому

    i couldnt get it right. its been 3 days. my model keep getting crazy after putting ragdoll code

  • @D.E.Nicolas.Goncalves
    @D.E.Nicolas.Goncalves Рік тому

    This video is amazing, thanks man! Im getting an error and dont know why 🤔, "Invalid get index 'global_transform' (on base: 'Nil')." in this line: "var target_transform: Transform3D = target_skeleton.global_transform * target_skeleton.get_bone_global_pose(b.get_bone_id())" i would like to know why, if it happend for you that are reading, and you got through, share with me, i'll be glad.

    • @D.E.Nicolas.Goncalves
      @D.E.Nicolas.Goncalves Рік тому +1

      Now it is working, there was the target_skeleton that i didnt assigned one to the var

    • @werd1274
      @werd1274 9 місяців тому

      @jonstephenson3786 did u get it to work? same issue here

  • @starboy_2322
    @starboy_2322 5 місяців тому

    Can i edit rdr2 ragdoll?

  • @demian5631
    @demian5631 Рік тому +2

    Now we can recreate the Euphoria Engine. GTA 6, here I come! /s

  • @notguitargatekeeper
    @notguitargatekeeper 11 днів тому

    3kliksphilip is that you?

  • @thinkinggrin165
    @thinkinggrin165 Рік тому

    NICE!
    This reminded me of a GDC Talk:
    ua-cam.com/video/TmAU8aPekEo/v-deo.html
    For example:
    After an enemy dies, Play its death-animation but Switch To physical Animation, If it bumps into Something. So to prevent clipping.
    Or parts of the skeleton become physical animated while climbing.

  • @maniksharma9736
    @maniksharma9736 Рік тому +1

    Make a punch a bunch clone please...

    • @crigz
      @crigz  Рік тому +1

      Funny you say that, it was @Pontypants devlogs that inspired this video! Nevertheless, us Brits know better than to piss off a Viking.

    • @maniksharma9736
      @maniksharma9736 Рік тому +2

      @@crigz i was inspired too you know ,but my popo brain can't do stuff like that that 😅.
      Are u going to make another episode on this topic (i am looking forward to it)?
      I was extremely excited when I saw it on reddit , so much that I forgot to study for my physics exams.
      Have u studied physics or maths in higher studies?

    • @crigz
      @crigz  Рік тому +1

      @@maniksharma9736 Nah mate my brain is as smooth as a pebble, you can definitely do it if you just give it your best.
      I haven't! I studied Games Programming, which did cover some basic physics, but we never got much deeper than F = M * A. Thankfully the internet is full of fantastic resources for self study.

    • @Sina_Qadri
      @Sina_Qadri Рік тому

      ​@@crigz can you make this work with godot 3??

  • @MrStarlightt
    @MrStarlightt Рік тому

    great tutorial but i have problems with the bones i created and i dont have understanding on how they work so now my enemy when i start the game is just mess

  • @TheArtificer5299
    @TheArtificer5299 4 місяці тому +4

    in 4.3 its not working...
    Looks like the physical_bones_start_simulation() was moved to the PhysicalBoneSimulator3D node

    • @szybre
      @szybre 4 місяці тому +2

      In 4.3 the physical_bones_start_simulation() got moved to the PhysicalBoneSimulator3D node, it should spawn in your hierarchy when you automatically create physical bones

    • @TheArtificer5299
      @TheArtificer5299 4 місяці тому

      @@szybre I think i figured that out i just forgot to update this comment, thankyou

    • @Propantus
      @Propantus 3 місяці тому

      thank you

    • @__LordVader__
      @__LordVader__ Місяць тому

      ​@BenUttecht how?

  • @2and3d_com
    @2and3d_com 5 місяців тому +1

    Is there a way of doing this now, with the new Godot 4.3?