Unreal Engine how can we achieve soft Skin Physics in Unreal Engine

darkevilhum

Newbie
Sep 9, 2017
22
12
I have worked it out, I basically did what the naughty sandbox dev did, but I did it better.

View attachment 3692863

And unlike certain devs I'm not afraid to share my discoveries, in the name of porn! (Or rather I'm just not afraid of the competition, in fact the whole reason i'm here trying to make my own game is that the competition has managed to leave me consistently disappointed and I've had just about enough of it)


  1. Make a pawn, create a skeletal mesh component for ur model, sset the skeletal mesh component as root (this isn't a hard requirement it's just how i'm doing it)
  2. Create a physics asset to set constraints for the ragdoll, this also gives you control over collisions. Make sure all bones are set to 'simulate' and not 'kinematic', if they are set to kinematic you get no physics, you can abuse this by for instance setting the pelvis to kinematic to disable gravity for the model (if you're using character blueprint instead of pawn blueprint u will have to put kinematic on pelvis to keep the model within the capsule), or setting everything to kinematic to completely disable ragdoll and physics but keep collisions working.
  3. In your skeletal mesh component, go to the physics asset override setting and configure it to use the physics asset you've modified. Congrats, you now have a working ragdoll with working physics, but the problem is it's a ragdoll, it just collapses, so we solve that next.
  4. Improve your physics asset by configuring the self collision properly (in the physics asset if you click on a colider, every collider it can collide with turns blue, every collider it cannot collide with turns gray. you can set the collider to collide with everything, then disable collision between it and colliders it shouldn't collide with (usually the colliders immediately next to it should have collision disabled, e.g. hand and forearm shouldn't collide, thigh and pelvis shouldn't collide, and so on)
  5. Set up a physical animation profile in your physics assset, select all the bones except any jigglebones ur using (e.g. boob butt jigle bones and thigh twist, things like that, don't select those) and assign them to the physical animation profile, then for all these bones as a starting point configure the physical animation profile like this:
    View attachment 3692652
    Then try to simulate, and what should happen is that your model now instead of ragdolling is mostly rigid, sticking to the preview animation, but it still falls over and is affected by physics.
  6. Apply the physical animation profile in your blueprint. View attachment 3692661 And congratulations, now you have a model that is affected by physics, completely rigid and sticks to the animation, 1 remaining problem is it won't stay uprgith and falls over unless the pose is realistically stable enough to keep it standing.
  7. To solve that final problem, the simplest solition is to force the skeletal mesh to maintain it's upright rotation. View attachment 3692665

And now you're basically done, your model will now be affected by physics and will try to maintain it's animation pose and natural orientation the pose expects, but it reacts properly to physics, it creates an effect extremely similar to cascadeur's autophysics. The last step then is to just tweak everything until you're satisfied. But do note that the higher orientation strength is set, the less the model is affected by physics, meaning that if you set it evrey high it'll be like your model is in low gravity, but it's very useful since you can tweak it on a per bone basis so you can have full control over how rigid or loose parts of the model are, after about 10 minutes of tweaking the gif up top is how it looks on my end. Granted you may notice i did mess up the ragdoll constraints a lil bit, but it's a pretty good result imo.

This video is a good watch too, it teaches you basically everything I just said you gotta do, and shows some examples of practical uses of this feature in other games.

I just noticed that in your demo gif, you are grabbing your characters ragdoll at random joints and dragging them around. Did you code that up to work in PIE? I know you can do that with ALT+Click in the actual physics asset to test but I didn't think that was available when actually playing in PIE mode?
 

razfaz

Newbie
Mar 24, 2021
75
120
Sorry, I forgot someting regarding the Nanite SkelMeshes:

If You build Your Unreal Engine 5.5 from Sauce You have to add the following setting to Your Project Config/DefaultEngine.ini File to have access to the Nanite Settings:

[/Script/Engine.RendererSettings]
r.Nanite.AllowSkinnedMeshes=1

1717320483177.png

1717322517709.png
 
Last edited:
  • Like
Reactions: Velomous

Velomous

Newbie
Jan 14, 2024
73
27
I just noticed that in your demo gif, you are grabbing your characters ragdoll at random joints and dragging them around. Did you code that up to work in PIE? I know you can do that with ALT+Click in the actual physics asset to test but I didn't think that was available when actually playing in PIE mode?
What is pie? play in editor? If so then yes.

I can show you the code I used to do this,fair warning though it is pretty barebones (everything is working fine but the dragging portion is kinda shitty). But it workswell enough for testing shit.

24-06-14.png
And here is the click trace function, it very accurately detects what you clicked on.

24-06-15.png

Here's a video of someone who talks very slow doing a more elaborate version where the drag is better, I was just a bit lazy.


Edit: Thought to add afterwards, this is how i enable the cursor to show.
24-06-16.png
I'm in a camera bp which is why i use viewing player controller but you can also just use player controller 0 for this.

To get the show mouse cursor variable setting on right lcick you may have to disable context sensitivity in the right click menu.
 
Last edited:

darkevilhum

Newbie
Sep 9, 2017
22
12
What is pie? play in editor? If so then yes.

I can show you the code I used to do this,fair warning though it is pretty barebones (everything is working fine but the dragging portion is kinda shitty). But it workswell enough for testing shit.

View attachment 3696946
And here is the click trace function, it very accurately detects what you clicked on.

View attachment 3696951

Here's a video of someone who talks very slow doing a more elaborate version where the drag is better, I was just a bit lazy.


Edit: Thought to add afterwards, this is how i enable the cursor to show.
View attachment 3697063
I'm in a camera bp which is why i use viewing player controller but you can also just use player controller 0 for this.

To get the show mouse cursor variable setting on right lcick you may have to disable context sensitivity in the right click menu.
Thanks for sharing, yeah play in editor. That's a pretty handy blueprint for testing. Testing in the physics asset is a bit limited.
 
  • Like
Reactions: Velomous