Active Ragdolls in Unity

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

Комментарии • 201

  • @sergioabreu-g
    @sergioabreu-g  3 года назад +27

    If you like this type of content, you can subscribe and like the video!
    The actual tutorial: bit.ly/3lKsfk2
    Github repository: bit.ly/2VxnU98

    • @MaanaDev
      @MaanaDev 3 года назад

      dude I need help.
      I have an issue with Arm Configurable joint
      axis and the secondary axis
      because it rotates on the opposite axis.
      how can I fix it?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +2

      @@MaanaDev You can use negative values for those axes, maybe you just need the opposite of the one you're using.

    • @4ykuT90
      @4ykuT90 3 года назад +2

      Would like to watch a series of tutorials made my you :)

    • @yeethatboi1563
      @yeethatboi1563 Год назад

      hey can i use the GitHub and your model and build on to it because i want to build a game for my friends and me and maybe eventually release it i know its a lot to ask but I'm still learning so this will probably be temporary

    • @arturabulkhatayev2373
      @arturabulkhatayev2373 Год назад

      links not working bro. big thanks for tutorial

  • @JohnDoe-pk8lc
    @JohnDoe-pk8lc 3 года назад +31

    I was trying to mix procedural animations with ragdolls achieving "okayish to meh" results, but what I really wanted was a ragdoll that would try and replicate an keyframed animation. Could't find much help until I found your project. Really helpful man, thumbs up, mucho gusto, gracias

  • @DarkSpaceStudios
    @DarkSpaceStudios 3 года назад +27

    Great job Sergio. You've got such a talent.

  • @jasonnova3077
    @jasonnova3077 2 года назад +15

    I’m impressed. This was exactly what I was looking for and your presentation was very efficient. Thank you, sir.

  • @JohnDoe-pk8lc
    @JohnDoe-pk8lc 3 года назад +23

    no srly this is awesome, just commenting again to feed the youtube algorithm

  • @TheArtFlower
    @TheArtFlower Год назад +1

    The little guy waving in excitement after managing to get the small box ontop of the big box made my day ✨️

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      It was a great achievement indeed 😄😄😄

  • @choppedandspewed
    @choppedandspewed 3 года назад +11

    Really nice job with the editing and general style of teaching. Extremely mellow, and well explained.

  • @RichWilco
    @RichWilco 3 года назад +5

    This is one of the best explanations I've seen for implementing active ragdolls in Unity. Really nice job.

  • @mr.dingleberry4882
    @mr.dingleberry4882 3 года назад +7

    Incredibly useful, thank you so much! I'm glad I'm not the only one who is fiercely interested in this topic, we could really use more content like this.

  • @alexgiberson9029
    @alexgiberson9029 3 года назад +2

    Dude I've been looking for a decent implementation of active ragdolls for more than a year now, thank you

  • @Build_the_Future
    @Build_the_Future 3 года назад +3

    I have played around with robotics on my RUclips channel with Unity, and I am amazed at what can be done in robotics.

  • @jakejollimore5453
    @jakejollimore5453 2 года назад +3

    I've been scared of this topic for a while. Your video helped demystify it for me. Thanks!

  • @nite_owl_was_here
    @nite_owl_was_here 7 месяцев назад +1

    this helped so much for the project im working on at school, didnt even have to check the project! i feel like i understand both rigging and ragdolls in the unity context much better now :)

    • @sergioabreu-g
      @sergioabreu-g  7 месяцев назад +1

      That's awesome! That was my goal all along, I hope your project goes well :)

  • @MaanaDev
    @MaanaDev 3 года назад +4

    a nice overview tutorial on Active Ragdoll

  • @aBrightDarknessHD
    @aBrightDarknessHD 3 года назад +2

    Great video you have out together Sergio. I have also been following this topic of Active Ragdoll physics for a couple of years now and you have summarised the subject wonderfully.

  • @stickguy9109
    @stickguy9109 2 года назад +3

    Why this ragdoll looks so cute when it's moving

  • @richardbeare11
    @richardbeare11 2 года назад +1

    Somehow Google knew I needed your tip: target rotation matching to a reference rig! SMART

  • @mani_mincraft
    @mani_mincraft 2 года назад +1

    Ohhhh so your the guy who made this nice physics animation package. Nice to see how these packages were made while I’m just downloading it and trying to understand it lol.

  • @stor314
    @stor314 2 года назад +1

    wow thank you. was lost on the direction i needed to go for my project but this looks to be exactly what i need. thank you for all your hard work on this subject and the great resources you've provided.

  • @TheGamingzombie1
    @TheGamingzombie1 3 года назад +3

    This was such an eye opening video for me with animation!! The results blew my mind!!! Thanks for making this video!!

  • @madroga235
    @madroga235 3 года назад +4

    nice work the ragdoll looks great

  • @omfggoodwill1234
    @omfggoodwill1234 3 года назад +4

    Well done! I might give this approach a try!

  • @donatoclemente4421
    @donatoclemente4421 2 года назад +3

    Glorious content, thank you brother!

  • @apokun165
    @apokun165 Год назад +1

    I didint use your video for making ragdoll but your narrative and explaining was perfect. I watch with smily face :D.

  • @pohyart
    @pohyart 3 года назад +2

    Great overview of the process/journey. Thanks! :)

  • @surashey3216
    @surashey3216 11 месяцев назад +1

    I love active ragdolls with grab features and ik ❤❤❤

  • @1611Roll
    @1611Roll 2 года назад +1

    You're my savior. This is exactly what i was looking for. Thanks a lot.

  • @caravangambler
    @caravangambler 2 года назад +1

    thank you man, brand new to this thing of game coding/ developing and i always loved human fall flat and gang beasts when they first came around

    • @sergioabreu-g
      @sergioabreu-g  2 года назад

      Yes, I also love how their characters move, that's why I started with active ragdolls too.

    • @caravangambler
      @caravangambler 2 года назад

      @@sergioabreu-g i cant lie, you should begin uploading content again especially with the whole rag doll in unity thing, would love to follow on it.

  • @Codeer
    @Codeer 3 года назад +1

    Awesome video! Super interesting!

  • @t3st862
    @t3st862 3 года назад +1

    Good work, needed to see something work well like this.

  • @blzahz7633
    @blzahz7633 3 года назад +3

    That character is kinda endearing.
    Especially at 6:50 when the character stops with feet pointing inwards looking up :'[

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      Hahah true. Lowering the physics time step is necessary to achieve a better simulation and avoid problems like that weird foot. I just didn't realize it when I made this video/project hehe

  • @tibastudio4223
    @tibastudio4223 Год назад +1

    Thanks a lot ! That was hard to unerstand at first but after few trys it works !! thanks again !!

  • @Lusiogenic
    @Lusiogenic 2 года назад +1

    Awesome way to suggest subscribing!
    Also, quite some knowledge share, thanks!

  • @lolcat69
    @lolcat69 3 года назад +1

    i remember dan a guy caled Happy Chuck or something do a video showing up the same thing than you do in this video, but hold up, this is an amazing video, and i love it, a really good video, good job :D

  • @dan.lespect
    @dan.lespect 3 года назад +1

    Both useful and interesting

  • @sync3471
    @sync3471 2 года назад

    Here's how I did the scene setup:
    The player has 2 avatars with the rigs and skinned meshes. For the animator avatar, just remove the material from the skinned mesh renderer.
    Go to GameObject - 3d object - ragdoll and then drag in all the corrosponding rig children. I didn't have exact matches for some things, so I just did the closest I had to it, for instance the hips as pelvis.
    Adjust the colliders a bit after you press create ragdoll.

  • @epicspaces9434
    @epicspaces9434 3 года назад +2

    you are my hero, me too I found troubles animation my character for switching weapons or reaching ammo

  • @sakiskid
    @sakiskid 2 года назад +2

    I wish you still made videos!

  • @NepYope
    @NepYope 2 года назад +1

    thank you for this

  • @bobross9370
    @bobross9370 Год назад +1

    7:38 Games like Red Dead Redemption 2 actually do use animations, they have a navmehsed AI system that walks the player to the correct spot to then play the animation.

  • @felixjohnson140
    @felixjohnson140 Год назад

    Super impressive for a side project!

  • @castlecodersltd
    @castlecodersltd Год назад +1

    Brilliant, thanks for sharing

  • @OGharambelivesgaming
    @OGharambelivesgaming 8 месяцев назад +1

    Impressive!

  • @legome3431
    @legome3431 3 года назад +1

    Can you please make an in-depth tutorial on how to actually apply this to your character? This tutorial is good, don't get me wrong, but starting from scratch and showing us your progress from there really helps :)

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +1

      I don't intend to make another tutorial. This isn't really a tutorial actually, just a video showing some interesting stuff hahah
      I wrote something more of a tutorial here that you might find useful: sergioabreu-g.medium.com/how-to-make-active-ragdolls-in-unity-35347dcb952d

    • @legome3431
      @legome3431 3 года назад

      @@sergioabreu-g ok thanks!

  • @rimuli
    @rimuli Год назад +1

    Bro u got the real key point, thx a lot 4 sharing

  • @workthenplay
    @workthenplay Год назад +1

    Loved watching your journey to get that far. Was a fun watch and I learned something :)

  • @geri4367
    @geri4367 3 года назад +2

    Great video!
    Esperando al siguiente ;)

  • @mattundie
    @mattundie 3 года назад +1

    3:50 quaternions are alien creations

  • @jono56667
    @jono56667 Год назад

    probably a long shot but how would you make this ragdol rotate towards it movement direction slower

  • @stor314
    @stor314 Год назад +1

    are you doing ik with the active rag doll arms?
    i’ve made the setup you detail with a pair of arms, where the active rag doll arms follow ik arms (animation rigging). but i also need to secure the hand bone of the physics based arms to a fixed position (a wall). however if i just try to have it follow the ik arms when they are secured to the wall, the hand bone is loose and moves around a lot
    testing out your unity project though, it looks like your arms are locked onto the object that they are grabbing. trying to figure out how to emulate that

    • @sergioabreu-g
      @sergioabreu-g  Год назад +2

      I don't lock the IK arms to the object, but instead link the physics based arms and the object through a Fixed Joint. The IK arms are still free that way, which allows the character to move the object or to push/pull itself by grabbing something unmovable such as a wall.

    • @stor314
      @stor314 Год назад +1

      @@sergioabreu-g i see, thanks for the response. i tried using fixed joints as well but was still getting a lot of movement for the hand bone compared to the animated version. maybe just have to play with it more

  • @max_mega
    @max_mega 3 года назад +1

    If i didnt find this i would be spending to much Time Thanks! 😊

  • @N1kGG
    @N1kGG Год назад

    That's cool. You have made a copy of a game called "Totally Reliable Delivery Service"))

  • @diliupg
    @diliupg 2 года назад +1

    Fantastic! What you have done here is truly breathtaking. As it is, it is not practical to be used in a game as this project alone running on my machine with an AMD Ryzen 7 3700x 8 core and NVdia Geforce GTX1650 gave a frame rate of around 250 -280 (moving about) in the editor with the screen maximized. It will definitely increase in a build. What can be done to increase the frame rate? The physics system will need to be polished up right? Amazing results you have here. Going to watch your progress. Couldn't find you on Patreon to support.

    • @sergioabreu-g
      @sergioabreu-g  2 года назад

      Thank you so much!
      I haven't tested this project's performance, to be honest, but it could be optimized to make a better use of the CPU's multithreading, which should give it a slight boost in fps. I'm not on Patreon since I don't upload videos regularly. I might start creating content more seriously in the near future though, but it won't be related to this.

  • @user-vp8rr4ef5f
    @user-vp8rr4ef5f Год назад +1

    Good system, But I would like to ask how to add a post processing to the camera.
    seems like I cant see the camera If it is in edit mode

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      Post processing is a whole other subject, you can find a ton of resources about it online. I don't know what you mean with the 'edit mode' thing :S

    • @user-vp8rr4ef5f
      @user-vp8rr4ef5f Год назад

      ​@@sergioabreu-g
      I can't see the camera while in edit mode

  • @rommarone1025
    @rommarone1025 3 года назад +1

    Brilliant video, mate!

  • @TristanCurrie-yb5ml
    @TristanCurrie-yb5ml 9 дней назад

    How do i use the confugrable joint extension?

  • @alroma6609
    @alroma6609 2 года назад +1

    Hi. How did you make that camera movement please? I can't manage to do that

    • @sergioabreu-g
      @sergioabreu-g  2 года назад

      You can download the whole project here and see how I did everything: github.com/sergioabreu-g/active-ragdolls
      There's a CameraModule script with the camera behaviour.

  • @Bustanutdev
    @Bustanutdev 2 года назад +2

    nice video😀

  • @raveltammeleht6278
    @raveltammeleht6278 2 года назад +1

    Great Tutorial! I wish to see the original Active Ragdoll documents from 2007/2008 I think it was done with PhysX or Novodex. It is seriously old but it had many examples with various "joint locking" methods, could be a good read in this scenario!

    • @sergioabreu-g
      @sergioabreu-g  2 года назад

      I didn't know that existed, thank you for the recommendation!!

  • @HudsonIsaNerd
    @HudsonIsaNerd 2 месяца назад

    How would I add my rigged mesh to the character

  • @rexpowercolt8588
    @rexpowercolt8588 Год назад

    i’m not sure if it’s a bug or not but when i don’t have is kinematic enabled on my characters colliders or rigidbodies i can’t rmb which it is. They are really bad at detecting being hit by ray casts and can almost be random entirely whether they register or not.

  • @user-rm1qi7vt5p
    @user-rm1qi7vt5p 3 года назад +1

    thanks for sharing

  • @Nightmare_Developer
    @Nightmare_Developer 3 года назад +1

    wow that was really cool !
    can u make a video tutorial 😅

  • @reddionceagain
    @reddionceagain 3 года назад +1

    It Works! THANKS

  • @Tymon0000
    @Tymon0000 3 года назад

    Did you experience your ragdoll + animation going bonkers - launching things into space, or stretching to infinity and beyond?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +1

      Yes, when physics were not configured correctly things like those used to happen a lot. But they should not be happening in the version that's on Github.

  • @grimoirworkshop6623
    @grimoirworkshop6623 3 года назад +1

    Subbed. Thanks for a nice video.

  • @mascarademermelada8746
    @mascarademermelada8746 2 года назад

    Wow, thanks you!

  • @GoldSkull-777
    @GoldSkull-777 2 года назад

    Can we apply ragdoll for any model, because most of the free models don't have so many body parts that we can config with

    • @sergioabreu-g
      @sergioabreu-g  2 года назад

      Yes, but the configuration process may be difficult.

  • @The-Dev-Ninja
    @The-Dev-Ninja 3 года назад +1

    good thanks

  • @joseluisRueda
    @joseluisRueda 2 года назад +1

    genial muy interesante

  • @caslacetech465
    @caslacetech465 3 года назад

    Great Video. I downloaded your protect, but I do not see the IK target on the Character prefab like in your video.

  • @roygatz
    @roygatz 3 года назад

    what about animation rigging with animations and then add spring bones to the hints and targets

  • @thenunix
    @thenunix 3 года назад +1

    Muy buen video!
    Very good video!

  • @drrobotnik5376
    @drrobotnik5376 3 года назад +1

    awesome dimensionality reduction.

  • @Sk0p3r
    @Sk0p3r 3 года назад +1

    My code is almost identical to yours when it comes to setting the target rotation but for some reason the configurable joints extensions tells me for some of my joints that the look rotation vector is zero and i dont know what to do since its not even a real error but a print log. Could it be that since the joints axis arent always set to all directions that the joint.axis part returns zero and therefore also returns as a Vector3.zero?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +1

      That print log appears when you try to create a Quaternion from a Vector3.zero, so I guess it's happening to you at the fourth line of SetTargetRotationInternal(...) method of the ConfigurableJointExtensions. It may very well be because your joints' axes are not configured properly.
      You have to set both 'Axis' and 'Secondary Axis' to two different unit vectors, for example:
      Axis = 0, 1, 0
      Secondary Axis = 1, 0, 0
      How to choose those vectors depends on your model's internal rotations, so I can't help you more there.

  • @jhonsonmartinez7473
    @jhonsonmartinez7473 3 года назад +1

    Muy bueno Don Sergio

  • @HiddenExp
    @HiddenExp 2 года назад +1

    Un genio, buen video!

  • @ilyagarmash6203
    @ilyagarmash6203 2 года назад +1

    This is a really good tutorial, but i have one question: How to make a "Jump" function for this one?

    • @sergioabreu-g
      @sergioabreu-g  2 года назад +1

      It depends, if you want a realistic jump, you'd have to make a jump animation so that it's able to propel itself with its own strength, but that would be very hard to get right. I would add an external upwards force that helps it jump without having to rely so much on limb strength and contact with the ground.

    • @ilyagarmash6203
      @ilyagarmash6203 2 года назад +1

      @@sergioabreu-g I think of just adding a force that pushes the player upwards

    • @ilyagarmash6203
      @ilyagarmash6203 2 года назад +1

      @@sergioabreu-g I've done it, thanks. It works

    • @ilyagarmash6203
      @ilyagarmash6203 2 года назад +1

      @@sergioabreu-g Also the character gained Frontflip/Backflip!

  • @madanger6877
    @madanger6877 Год назад

    Will i achieve the same results with a softbody character instead of a ragdoll ?

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      I haven't tried it so I don't really know.

  • @itssugsy6250
    @itssugsy6250 3 года назад

    hello in my game what im making i want the that the ragdoll can fall over how do i do this?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      If you disable the balance it will surely fall over :)

  • @jeremymetzler72
    @jeremymetzler72 3 года назад +1

    i hope we have fps games with neural network controlled active ragdolls

  • @thatOne873
    @thatOne873 3 года назад +2

    made me laugh - sub clicked!

  • @abhinavsaha3342
    @abhinavsaha3342 2 года назад

    Hey Sergio,
    Great tutorial!
    Can you please make a tutorial on how to make ragdoll AI enemies which chase the player and try to grab them?

  • @kartoha0
    @kartoha0 Год назад

    please tell me what version of the unit you have, because there are a lot of errors in the script for the 2021 version!

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      I don't remember, but the version it was built for appears in the Unity Hub when you add the project to it.

  • @OndrejL
    @OndrejL Год назад +1

    thx for the code amazing job!

  • @gmz7820
    @gmz7820 3 года назад +1

    Súbete más videos crack

  • @arminrad5357
    @arminrad5357 2 года назад

    cool, can you show how u made the character in blender

    • @sergioabreu-g
      @sergioabreu-g  2 года назад +1

      It's just a simple character made of cubes with a standard rig attached to it. There are tons of tutorials on RUclips much better than what I could make 😂

  • @hiro4476
    @hiro4476 3 года назад +1

    curious, won't this (let one set of bones follow another) method, a frame or few frames slower in result?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      If you mean that this will increase the response time of the player input, yeah it might increase it a few miliseconds. But I don't think it matters, since physics-based animations are not instantaneous. When you move a simulated body, it takes it some time to start moving due to acceleration. The increase in response time is much shorter in comparison, so it really makes not difference in my opinion.
      Thank you for your question!

    • @hiro4476
      @hiro4476 3 года назад

      @@sergioabreu-g
      > physics-based animations are not instantaneous
      ah... doesn't have to always be like that...
      A keyframe animation moves objA from locA to locB for example.
      methodA - start dragging our body after animation system kicks in :
      When objA is at lerp(locA, locB, .5f), objB is maybe around lerp(locA, locB, .49f). Sometimes the character looks like it's dragging its body, cus it's always behind the schedule.
      methodB - start dragging our body before animation system kicks in :
      Assuming objA and objB aren't too far away from each other & our "muscle/motor" is powerful enough to cover the difference in distance.
      Well, since we know where our future objA is, we can drag objB to that location on time.
      methodB

  • @aBrightDarknessHD
    @aBrightDarknessHD 3 года назад +1

    Hey Sergio, could you explain how you see this as AI? There is no learning or neural networks involved, in what sense is a software algorithm an AI?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +1

      You're absolutely right. That's one of the things I would like to change about this video now.
      When I wrote that, I was thinking not about my active ragdoll project, but about more advanced systems which use machine learning to blend animations with physics. I didn't explain that very well.
      Here's an example of what I'm talking about: ruclips.net/video/JZKaqQKcAnw/видео.html
      Anyway, the definition of AI is very flexible, since we can't define what intelligence is. There's a lot of debate on what is and isn't AI, the boundaries are constantly being pushed farther away. There are a lot of algorithms that were considered AI in the past but now are just normal algorithms.

    • @phoenixxam5812
      @phoenixxam5812 3 года назад

      @@sergioabreu-g you’re a genius

  • @JaredQueiroz
    @JaredQueiroz 6 месяцев назад +1

    oh, so other guy has the same goal as I do............ 3 years ago..... DAMIT

    • @anddev1
      @anddev1 6 месяцев назад

      same

  • @Tasarran
    @Tasarran 3 года назад

    Has anyone else noticed that when you build this, you can't move?
    Camera still works, but feet rooted to the ground...
    Any ideas?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      Oh yes, I didn't realize. Thank you for telling me, I'll take a look into it.

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      I just pushed a fixed version :D

  • @Wentoo-0
    @Wentoo-0 Год назад

    Do you use blender? Sorry I can't tell

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      Yes, I used it to create and rig the character.

  • @user-pn8sf3by5y
    @user-pn8sf3by5y 2 года назад

    there is an error about inputValue

  • @GabrielSilva-mv4fm
    @GabrielSilva-mv4fm 3 года назад +1

    Really nice man, thx for sharing
    Subscribing for more :)

  • @what120o
    @what120o 2 месяца назад

    I like your voice

  • @gr4babeam
    @gr4babeam 3 года назад

    Quick question: Does it matter if the 3d model has separate body parts, because mine does

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      Not sure what you mean by separate body parts. If you mean they are not connected to the main body, I can't really tell since I haven't tried it myself. I guess it can work as long as you set up the rigidbodies and joints correctly.

    • @gr4babeam
      @gr4babeam 3 года назад

      Like, the body parts are separate objects. Another thing, when ever I try to rig it, the mesh starts to freak out, do you have an idea on what's going wrong?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +2

      @@gr4babeam It's hard to tell mate :S. You can download my github repository and check the differences with your project, maybe you'll find what's wrong.

    • @gr4babeam
      @gr4babeam 3 года назад

      Ok

  • @harharrr9810
    @harharrr9810 Год назад

    How to grab item

    • @sergioabreu-g
      @sergioabreu-g  Год назад

      I did it by creating a fixed joint between the hands and whatever object they touch.

  • @mjaada
    @mjaada 3 года назад

    How did you accomplish picking up objects?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад +2

      I made a script that creates a configurable joint that links the hand to the object it's touching. It only works when the player is pressing left or right click. The joint also gets destroyed if the player releases the button.

  • @mahmoudshalabi8613
    @mahmoudshalabi8613 3 года назад

    Do the animations have to be made from blender?

    • @sergioabreu-g
      @sergioabreu-g  3 года назад

      No, as long as they work properly in Unity they'll work with the active ragdoll too.

  • @King-jj8zq
    @King-jj8zq 3 года назад

    Hi i like this can you make a physic robot game that's online