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

darkevilhum

Newbie
Sep 9, 2017
98
104
VAM did it somehow, and I gotta do it that way too because I want to have a morph customizable character. I recall way back we talked about using tesselation to do this which was how naughty sandbox dev supposedly did it, which was then removed from the engine, then added abck in attached to nanite, so if the guy is right that we can now use nanite with skeletal meshes with morphs, shouldn't it be possible to use that tesselation method to do softbody with morphs without issues?

I also think niagara based softbody should be able to do it, since it's if I recall correctly vertex based, morphs should move the vertices so the niagara softbody should be able to adapt to morphs as well.

That's at least 2 means to do it theoretically. I'm sure it should be doable via shader as well.



Yeah that's the problem with daz2ue. It'll work, but it'll be an unoptimized abomination, certainly not game ready this is the process that was recommended to me to import from daz to ue, and it makes sense; but honestly i'm still procrastinating it. Think it's about time for me to stop doing that tho and get it over with it's just so easy to procrastinate it when I have so many other things I can reasonably do instead lol.
I think people are misunderstanding what morphs are. Morphs are basically animations. They're pre-computed/pre-saved data that basically says "this vertex goes here". And then in your game engine of choice (in Unity, they're called BlendShapes), that data is read and applied to every vertex based on a percentage value, usually 0-1.

So realistically, it makes no sense to use this for actual soft body simulation. What some people have used this for, is a sort of gimmicky way of adding jiggle physics. This in itself is a bit tedious, because you would need three morphs just for translation (x,y,z) and then 3 more if you cared about rotation.
This is per body part that you would want to jiggle. This itself is a ton of work, but some devs do opt for this, I have no idea why, perhaps to get a very specific and good looking jiggle that is sculpted by a 3d artist. But it puts you in a very tight corner with limited flexibility.
If you wanted to use morphs for soft body simulation, you are essentially saying, I don't want or care about any physical reactions between bodies, only the visual physical reaction of a single body. E.g, some jiggling body part.

The key take away is that, a lot of these methods manipulate the vertices. We want to do the same thing but in a way that incorporates physics movement and collision whilst still allowing for the flexibility to use other features like Morphs/Blendshapes/Shapekeys, which are great for facial expressions, body customization etc.

So the obvious conclusion then is that we ideally want a complex vertex shader that handles the jiggle, the collisions and the normal mapping responding to those jiggles and collisions.

Now in Unity, soft body is easy if you use certain plugins. Unreal sadly does not have a ready to go plugin or solution that is performant and/or works with complex skinned meshes (such as characters).
 
  • Like
Reactions: Velomous

darkevilhum

Newbie
Sep 9, 2017
98
104
VAM did it somehow, and I gotta do it that way too because I want to have a morph customizable character. I recall way back we talked about using tesselation to do this which was how naughty sandbox dev supposedly did it, which was then removed from the engine, then added abck in attached to nanite, so if the guy is right that we can now use nanite with skeletal meshes with morphs, shouldn't it be possible to use that tesselation method to do softbody with morphs without issues?

I also think niagara based softbody should be able to do it, since it's if I recall correctly vertex based, morphs should move the vertices so the niagara softbody should be able to adapt to morphs as well.

That's at least 2 means to do it theoretically. I'm sure it should be doable via shader as well.



Yeah that's the problem with daz2ue. It'll work, but it'll be an unoptimized abomination, certainly not game ready this is the process that was recommended to me to import from daz to ue, and it makes sense; but honestly i'm still procrastinating it. Think it's about time for me to stop doing that tho and get it over with it's just so easy to procrastinate it when I have so many other things I can reasonably do instead lol.
I posted this on some discord recently but I'll copy pasta here for reference:

Works fine for me. Note I use Daz 4.2.1 because this in my experience yields the best results. I have attached my personal notes for exporting a base character mesh from Daz to UE5 . The context might be weird as I made these notes for my memory more than anything, but it should be helpful too.

Some important things to note:
- Yes this does work with geografts and the like (including genitals).
- Yes you may have to open up the file mesh_updated.fbx file that Daz2Unreal creates and make edits and minor fixes in a 3d package.
- Weighting problems do happen, particularly with clothing, these are easily fixed though with a bit of 3d package work.
- This method is one I use personally so you may not need this exact flow which includes making custom blendshapes/morphs outside of daz and importing them into daz (see: also highly recommend his channel for general tutorials)

One last note I'll leave is that my flow was designed around utilizing the D2U plugin to streamline getting character content from Daz into UE5. That's primarily why all morphs I create are then imported into Daz, added to the base mesh and then I export that base mesh.

The summary of this flow:
In Daz: Setup your base character mesh with it's desired shape (morphs) > Add any additional parts like brows, geografts etc > Make any adjustments to the skeleton (extra bones/weighting changes/etc) > Import all of your custom morphs for this mesh > Send to UE5 & Use this finalized base mesh character as a reference/weight source/parent when sending additional clothing to UE5 for this base mesh.
 
  • Heart
Reactions: Velomous

darkevilhum

Newbie
Sep 9, 2017
98
104
Not exactly softbody related but rather physical body. Thought I'd share what you can achieve with a really well setup physically animated character.

Difference between very strong physically driven animation (0.8 motor strength):
physicalWalk1.gif

Very weak (0.1 motor strength)
physicalWalk2.gif

By setting up a system that lets your control the entire set of bodies or specific bodies/chains, you can really achieve a lot of dynamic animation and collisions. In this instance, a lot of the excess jiggle on the butt/thighs/calves is thanks to the feet colliding with the ground per step.
 
Last edited:

RawDarkness

Newbie
Sep 20, 2021
82
158
I haven't really followed the thread that closely but i am very interested in achieving results similar to Naughty Sandbox 2 in terms of orifice dynamics.
Is the best bet right now on using morph targets and calculations based on positioning and distance from inserted object, as well as radius? Or is there some other approach that might work better that someone has managed to implement?
I did some very simple experiments previously with simple morph targets being triggered by bones with collisions, but that didn't work that reliably and didnt look great.
Last time i looked in to soft bodies in unreal the performance was dreadful, but that was a few major UE versions back. Not sure that would even solve it well.
For simple body jiggle ive found Physics Assets to be superior to everything else ive tried. It might not work well enough with more fine grained interactions (spanking and such), maybe that could be fixed by adding more jiggle bones, not sure.
 

darkevilhum

Newbie
Sep 9, 2017
98
104
I haven't really followed the thread that closely but i am very interested in achieving results similar to Naughty Sandbox 2 in terms of orifice dynamics.
Is the best bet right now on using morph targets and calculations based on positioning and distance from inserted object, as well as radius? Or is there some other approach that might work better that someone has managed to implement?
I did some very simple experiments previously with simple morph targets being triggered by bones with collisions, but that didn't work that reliably and didnt look great.
Last time i looked in to soft bodies in unreal the performance was dreadful, but that was a few major UE versions back. Not sure that would even solve it well.
For simple body jiggle ive found Physics Assets to be superior to everything else ive tried. It might not work well enough with more fine grained interactions (spanking and such), maybe that could be fixed by adding more jiggle bones, not sure.
If you want the best of the best for orifices. I would say go the physics asset root. This would of course mean you need to strategically rig and place x number of bones for those orifices. There's no best method for this, a lot of people have done it in isolation so it ends up being trial and error.
I have personally managed to get detection/radius based morph orifices working and looking pretty good but I eventually realised that I had no need for these dynamic detection based things. So I scrapped that and ultimately rely on 2 person animations where the morphs/penetration etc are all controlled by the animation.

My one tip if you go the bone+physics route is; more bones = better control and a softer/more realistic result. This will mean more physics asset work/tweaking till it's perfect but once it's done, it's done.

Bonus tip: Try to avoid X/Y/Z hard limits on constraints where you can and instead use very high force motors/drives. This results in less physics spazzing when constraints are violated. This is best used for things that don't look silly if they *discolate* like a vagina or a penis. This looks silly for things like knee joints etc.
 
  • Like
Reactions: RawDarkness

mikeblack

Newbie
Oct 10, 2017
37
33
I did some very simple experiments previously with simple morph targets being triggered by bones with collisions, but that didn't work that reliably and didnt look great.
I haven't done the donut wrapping yet but intend to go without UE physics for it. My plan currently is to start with blends of bone driven morphs as basis. UE is quite good with blending animations/poses. Like some bones/a morph for spread with a 2D blend between 8 tilt directions and a blend for in and out movement should get one to maybe 90% of what a physics setup will do while being fully stable in every situation and having full control. After that maybe adding some soft body approach on top of it for smaller adjustments/interactions is still an option (just needs to be one who works with morphs).
Would be interesting to see a comparison of how different approaches look at the end.
 
  • Like
Reactions: RawDarkness

RawDarkness

Newbie
Sep 20, 2021
82
158
If you want the best of the best for orifices. I would say go the physics asset root. This would of course mean you need to strategically rig and place x number of bones for those orifices. There's no best method for this, a lot of people have done it in isolation so it ends up being trial and error.
I have personally managed to get detection/radius based morph orifices working and looking pretty good but I eventually realised that I had no need for these dynamic detection based things. So I scrapped that and ultimately rely on 2 person animations where the morphs/penetration etc are all controlled by the animation.

My one tip if you go the bone+physics route is; more bones = better control and a softer/more realistic result. This will mean more physics asset work/tweaking till it's perfect but once it's done, it's done.

Bonus tip: Try to avoid X/Y/Z hard limits on constraints where you can and instead use very high force motors/drives. This results in less physics spazzing when constraints are violated. This is best used for things that don't look silly if they *discolate* like a vagina or a penis. This looks silly for things like knee joints etc.
Thats great info, thank you!
Did you use daz models as base? And if so, how much work in addition to things such as Golden Palace rigging would be needed?
Might do some testing with this but i really hate rigging and weight painting areas like this :(
 

darkevilhum

Newbie
Sep 9, 2017
98
104
Thats great info, thank you!
Did you use daz models as base? And if so, how much work in addition to things such as Golden Palace rigging would be needed?
Might do some testing with this but i really hate rigging and weight painting areas like this :(
Yep, I'm using Genesis8 models as my base meshes. Golden Palace genitals do come with *some* out of the box rigging for the genitals.

- The penis rigging is perfect to be honest and doesn't need additional rigging, penises are pretty simple.
- The vagina has enough bones to control opening and closing to some degree. They arn't ideally placed and could definitely be way better for the purposes of collision/physics. I never tried adding physics to the default bones for golden palace though so can't comment on how good they would be.
- The Golden Palace anus has effectively no bones/rigging for opening/closing.

So the work would be fairly moderate. You'd probably want to add some new bones and rig them for both the vagina and the anus. I'm no 3D artist myself and I hate rigging and the such.
So for the most rigging heavy task I had to deal with (rigging cloth for clothing physics on stuff like skirts) I found that using bone envelopes in blender to automatically apply weights was a pretty easy way to rig stuff. You just resize the envelopes of your new bones and try the "automatic from selected envelopes" weighting option and do some trial and error + correction till you're happy.

Obviously, that's all for the physics approach, depending on your project the collision/radius detection into morph opening/closing could be a viable option and with enough work can also look really good. This method is only really limited by how dynamic/variable the "penetrator" object is. E.g, can it ever come in at a funny angle that might cause your detection logic to fail or it might not open enough etc.
 
  • Like
Reactions: RawDarkness

RawDarkness

Newbie
Sep 20, 2021
82
158
Yep, I'm using Genesis8 models as my base meshes. Golden Palace genitals do come with *some* out of the box rigging for the genitals.

- The penis rigging is perfect to be honest and doesn't need additional rigging, penises are pretty simple.
- The vagina has enough bones to control opening and closing to some degree. They arn't ideally placed and could definitely be way better for the purposes of collision/physics. I never tried adding physics to the default bones for golden palace though so can't comment on how good they would be.
- The Golden Palace anus has effectively no bones/rigging for opening/closing.

So the work would be fairly moderate. You'd probably want to add some new bones and rig them for both the vagina and the anus. I'm no 3D artist myself and I hate rigging and the such.
So for the most rigging heavy task I had to deal with (rigging cloth for clothing physics on stuff like skirts) I found that using bone envelopes in blender to automatically apply weights was a pretty easy way to rig stuff. You just resize the envelopes of your new bones and try the "automatic from selected envelopes" weighting option and do some trial and error + correction till you're happy.

Obviously, that's all for the physics approach, depending on your project the collision/radius detection into morph opening/closing could be a viable option and with enough work can also look really good. This method is only really limited by how dynamic/variable the "penetrator" object is. E.g, can it ever come in at a funny angle that might cause your detection logic to fail or it might not open enough etc.
Will do some experimenting with this later, thank you for the detailed response!
Didn't know of the enveloping technique, sounds a lot easier than trying to paint those areas manually, will give it a go.
 

FishboneGamingLabs

Newbie
Game Developer
Jan 31, 2018
39
19
Long time lurking here, but not that much experienced with UE5.
Why bones are required for those two genital parts? Why not drive those directly via shapekeys?
I understand that bones could be placed there for other purposes so I'm fine with that.
Some time ago I took a look at some modding resources from Home Together game, those have many bones for the said genitals in place already, but don't know how they are using them.
At some point I was thinking that a vagLeft and a vagRight would be more than enough to open it, but then why not a morph directly?

About breasts, I saw above mentiones that more bones are better than a single pectoral bone. Ok, but how those should look like? Start with a longer bone then subdivide in 2 or 3 segments? 3 bones are enough? Or bones for left/right/top/bottom as well?
 

Velomous

Member
Jan 14, 2024
396
400
Long time lurking here, but not that much experienced with UE5.
Why bones are required for those two genital parts? Why not drive those directly via shapekeys?
I understand that bones could be placed there for other purposes so I'm fine with that.
Some time ago I took a look at some modding resources from Home Together game, those have many bones for the said genitals in place already, but don't know how they are using them.
At some point I was thinking that a vagLeft and a vagRight would be more than enough to open it, but then why not a morph directly?

About breasts, I saw above mentiones that more bones are better than a single pectoral bone. Ok, but how those should look like? Start with a longer bone then subdivide in 2 or 3 segments? 3 bones are enough? Or bones for left/right/top/bottom as well?
There was a real good vid on setting up bone based boob jiggle i remember seeing a while back, took a bit to dig it up but here you go:

It's not ue specific, just explains the principles with a blender showcase.

Not sure about the other thing though.
 
  • Like
Reactions: FishboneGamingLabs

darkevilhum

Newbie
Sep 9, 2017
98
104
Long time lurking here, but not that much experienced with UE5.
Why bones are required for those two genital parts? Why not drive those directly via shapekeys?
I understand that bones could be placed there for other purposes so I'm fine with that.
Some time ago I took a look at some modding resources from Home Together game, those have many bones for the said genitals in place already, but don't know how they are using them.
At some point I was thinking that a vagLeft and a vagRight would be more than enough to open it, but then why not a morph directly?

About breasts, I saw above mentiones that more bones are better than a single pectoral bone. Ok, but how those should look like? Start with a longer bone then subdivide in 2 or 3 segments? 3 bones are enough? Or bones for left/right/top/bottom as well?
Bones are only required if you want the absolute best looking type of genital interaction. Which is using physics/collisions. A single vagLeft and vagRight bone for this purpose would have very poor looking results, it would be like two doors/flaps with very unrealistic/unpleasing visuals. In my opinion, the ideal but minimal amount of bones for a vaginal opening would be 7 or 9. Configured either: 3 on each side, 1 inside the middle as the root to allow some depth control. OR, the same again, but also 1 at the top and bottom to allow some upwards/downwards stretch to accommodate larger penetrations.

For the breasts yes, exactly that. In my testing, I found having 3 bones for each breast worked very well (see the gif below where I demonstrate the result of 3 bone physics). So effectively you could create one bone per breast and then subdivide it twice. Or more depending on how "soft" you want it to come across.

b1.gif
 
  • Like
Reactions: FishboneGamingLabs