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
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
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.
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 :)
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.
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.
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.
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
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
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.
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.
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 :)
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
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
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.
@@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
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.
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.
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.
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!
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.
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.
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?
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.
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.
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 😂
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!
@@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
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.
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.
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?
@@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.
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.
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
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?
@@MaanaDev You can use negative values for those axes, maybe you just need the opposite of the one you're using.
Would like to watch a series of tutorials made my you :)
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
links not working bro. big thanks for tutorial
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
Great job Sergio. You've got such a talent.
Thanks!! :D
Didn't expect to see you here
I’m impressed. This was exactly what I was looking for and your presentation was very efficient. Thank you, sir.
I'm glad to help Jason :D
no srly this is awesome, just commenting again to feed the youtube algorithm
this deserves more views
Hahaha thank you!
The little guy waving in excitement after managing to get the small box ontop of the big box made my day ✨️
It was a great achievement indeed 😄😄😄
Really nice job with the editing and general style of teaching. Extremely mellow, and well explained.
Thank you Austin!
This is one of the best explanations I've seen for implementing active ragdolls in Unity. Really nice job.
Thank you Richard!
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.
Dude I've been looking for a decent implementation of active ragdolls for more than a year now, thank you
I have played around with robotics on my RUclips channel with Unity, and I am amazed at what can be done in robotics.
I've been scared of this topic for a while. Your video helped demystify it for me. Thanks!
:DDDD
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 :)
That's awesome! That was my goal all along, I hope your project goes well :)
a nice overview tutorial on Active Ragdoll
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.
Thank you :D
Why this ragdoll looks so cute when it's moving
Somehow Google knew I needed your tip: target rotation matching to a reference rig! SMART
Glad it helped!
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.
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.
Glad I could help!
This was such an eye opening video for me with animation!! The results blew my mind!!! Thanks for making this video!!
nice work the ragdoll looks great
Well done! I might give this approach a try!
Tell how it goes if you do :D
Glorious content, thank you brother!
Thanks mate!
I didint use your video for making ragdoll but your narrative and explaining was perfect. I watch with smily face :D.
Thanks!!!
Great overview of the process/journey. Thanks! :)
Thank you for watching!
I love active ragdolls with grab features and ik ❤❤❤
You're my savior. This is exactly what i was looking for. Thanks a lot.
I'm happy to help!
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
Yes, I also love how their characters move, that's why I started with active ragdolls too.
@@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.
Awesome video! Super interesting!
Good work, needed to see something work well like this.
Thanks!
That character is kinda endearing.
Especially at 6:50 when the character stops with feet pointing inwards looking up :'[
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
Thanks a lot ! That was hard to unerstand at first but after few trys it works !! thanks again !!
And also thanks for the tutorial it has help me a lot
I'm glad it was of help :D
Awesome way to suggest subscribing!
Also, quite some knowledge share, thanks!
Thank you!!
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
Both useful and interesting
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.
you are my hero, me too I found troubles animation my character for switching weapons or reaching ammo
I wish you still made videos!
Be careful what you wish for ;)
thank you for this
You're welcome :D
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.
Super impressive for a side project!
Thanks Felix! :D
Brilliant, thanks for sharing
Impressive!
Thank you :)
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 :)
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
@@sergioabreu-g ok thanks!
Bro u got the real key point, thx a lot 4 sharing
Loved watching your journey to get that far. Was a fun watch and I learned something :)
Glad you enjoyed it!
Great video!
Esperando al siguiente ;)
Gracias por el apoyo amigo!
3:50 quaternions are alien creations
probably a long shot but how would you make this ragdol rotate towards it movement direction slower
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
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.
@@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
If i didnt find this i would be spending to much Time Thanks! 😊
That's cool. You have made a copy of a game called "Totally Reliable Delivery Service"))
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.
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.
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
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
@@sergioabreu-g
I can't see the camera while in edit mode
Brilliant video, mate!
Thanks a lot!
How do i use the confugrable joint extension?
Hi. How did you make that camera movement please? I can't manage to do that
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.
nice video😀
Thanks! 😊
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!
I didn't know that existed, thank you for the recommendation!!
How would I add my rigged mesh to the character
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.
Sorry, I don't get what you mean :S
thanks for sharing
wow that was really cool !
can u make a video tutorial 😅
It Works! THANKS
Did you experience your ragdoll + animation going bonkers - launching things into space, or stretching to infinity and beyond?
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.
Subbed. Thanks for a nice video.
Wow, thanks you!
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
Yes, but the configuration process may be difficult.
good thanks
genial muy interesante
Gracias!
Great Video. I downloaded your protect, but I do not see the IK target on the Character prefab like in your video.
what about animation rigging with animations and then add spring bones to the hints and targets
Muy buen video!
Very good video!
awesome dimensionality reduction.
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?
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.
Muy bueno Don Sergio
Un genio, buen video!
Muchas gracias!
This is a really good tutorial, but i have one question: How to make a "Jump" function for this one?
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.
@@sergioabreu-g I think of just adding a force that pushes the player upwards
@@sergioabreu-g I've done it, thanks. It works
@@sergioabreu-g Also the character gained Frontflip/Backflip!
Will i achieve the same results with a softbody character instead of a ragdoll ?
I haven't tried it so I don't really know.
hello in my game what im making i want the that the ragdoll can fall over how do i do this?
If you disable the balance it will surely fall over :)
i hope we have fps games with neural network controlled active ragdolls
:)
made me laugh - sub clicked!
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?
good
please tell me what version of the unit you have, because there are a lot of errors in the script for the 2021 version!
I don't remember, but the version it was built for appears in the Unity Hub when you add the project to it.
thx for the code amazing job!
:D
Súbete más videos crack
cool, can you show how u made the character in blender
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 😂
curious, won't this (let one set of bones follow another) method, a frame or few frames slower in result?
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!
@@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
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?
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.
@@sergioabreu-g you’re a genius
oh, so other guy has the same goal as I do............ 3 years ago..... DAMIT
same
Has anyone else noticed that when you build this, you can't move?
Camera still works, but feet rooted to the ground...
Any ideas?
Oh yes, I didn't realize. Thank you for telling me, I'll take a look into it.
I just pushed a fixed version :D
Do you use blender? Sorry I can't tell
Yes, I used it to create and rig the character.
there is an error about inputValue
how do i solve it??
Really nice man, thx for sharing
Subscribing for more :)
I like your voice
I like yours too.
Quick question: Does it matter if the 3d model has separate body parts, because mine does
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.
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?
@@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.
Ok
How to grab item
I did it by creating a fixed joint between the hands and whatever object they touch.
How did you accomplish picking up objects?
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.
Do the animations have to be made from blender?
No, as long as they work properly in Unity they'll work with the active ragdoll too.
Hi i like this can you make a physic robot game that's online