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

germa59

New Member
Nov 3, 2021
6
4
how can we achieve soft Skin Physics in Unreal Engine

like these





There is a game called naughty sandbox which uses this , is there any plugin, which helps in skin physics or any other resource which can be used to this.
 

TheExordick

Member
Sep 25, 2021
113
117
I have to say i'm really amazed at the references you posted. I've never seen that kind of detail.

I personally think (because i've never tried to achieve such effect but would love to study it if i ever get the time to do so) that what you see in the first link is a dynamic render target on the normal maps: in this way you can modify the perception of the 3D mesh with the normal map and make it looks like you are pressing or pinching or streching a mesh.

the second link i think you are looking at the combination of things: the dynamic render target of the above (with some tailored alphas) and some procedural/physic based control rig animation to make the bouncy effect of ass and breasts.

This is my personal though and how i would approach the problem. I don't have experience with this kind of mechanics and if you decide to dive deep in the field i think it will require a lot of time. But please if you do take the time to explain to us all your process and development.
 
  • Like
Reactions: DuniX

Microtom

Well-Known Member
Sep 5, 2017
1,164
4,354
In the second video, when he hits the butt, the movement propagate all over the body like it was made of jelly. Imo, that's a sign that he uses physic bodies like they use for ragdoll effects. Maybe this tutorial would be helpful:
 
  • Like
Reactions: FaradayInfinity

unocrus

Member
Oct 28, 2018
125
219
Materials in UE have a WorldPositionOffset you can use to manipulate vertices of a mesh. You could theoretically output the world position of a fingertip to a MaterialParameterCollection, something like a global variable you can read within a material, that you then use to manipulate the WPO.

The closest example I could think of for an everyday use of a system like this is in games where walking through grass causes it to bend out of the way.
 

FaradayInfinity

New Member
Jan 22, 2023
3
0
germa59 has there been any progress towards recreating such a soft body skin collision effect?

Microtom shared a potential good direction, and i think it is on par with what germa59 showed for unity...but in UE

I found this entire forum by trying to find self collision with soft body physics for jiggle physics for a music video i am working on with a woman who's arm clipps through her breasts, and while i can modify the animation, having the collision with additional physics influence would be very realistic



i found this regarding prevention of clipping limbs through bodyparts. however it is extremely expensive. but wanted to share regardless
 

TheExordick

Member
Sep 25, 2021
113
117
FaradayInfinity I believe you can make up something with self collision on the physical asset of the skeletal mesh. Maybe it won't be very precise due to the PA nature (capsules) but at least you can avoid clipping through yourself.

It may be a bit tricky because you need to simulate physics/ragdoll but avoid you character collapsing.
 

aereton

Digital Hedonist Games
Game Developer
Mar 9, 2018
544
1,055
My first thought would be a vertex displacement shader, with a greyscale texture that controls the part of the body's softness.
 
  • Like
Reactions: plain123

razfaz

Member
Mar 24, 2021
180
200
One possible way to achive this in Unreal:
Chaos-Flesh assets can deform skeletal meshes. Use the “GenerateSurfaceBindings” node in the flesh asset dataflow graph to build correspondence data between a skeletal mesh’s render surfaces and a tetrahedral mesh. Then use the “DG_FleshDeformer” on the skeletal mesh to apply the deformation of the tetrahedral mesh to the skeletal mesh.


Practical Example:

View attachment Download.mp4

 
Last edited:
  • Heart
Reactions: Velomous

Velomous

Member
Jan 14, 2024
285
263
Thread Information: I'll try to update this whenever something new interesting comes up (including a final solution if we ever get to that point, currently we don't have one)
  • Vertex Displacement via Tessellation:
    • Gif Example & Info. This is how the naughty sandbox dev did his effect.
    • UE 5.5 Nanite Skeletal Meshes, using this would enable us to use vertex displacement shader effect, which is how the naughty sandbox dev did. Nobody's tried yet though. More info on enabling tessellation. Currently there is no morph support but it is on Epic's planned feature list.
  • Chaos Cloth + Physics Asset: One of the most promising approaches in the thread so far is discussed starting 2 posts down. This is likely the simplest and easiest way to get 'real' softbody in Unreal.
  • Spring Bone Based Softbody: Basic info & Tutorial (nobody's actually used this in the thread yet)
  • Chaos Flesh: Here is why you shouldn't bother trying to use chaos flesh, with further confirmation here. It works (sometimes)... But it's no less complicated to implement than any other solution and it's performance is garbage.
  • Niagara Softbody: for this (start with the static mesh one that's linked inside), and here are my main observations about this approach. (We haven't discoved how to have contact deformation, though I am certain it can be done because niagara supports collisions)
  • Morph + Physics Asset Based Softbody: GIF Example and Idea. This is apparently a fairly common approach. Works on a similar concept as MLDeform, maybe they can be combined?
  • Material based contact deformation: This one has been discussed a lot.
  • Physics Asset & Material Hybrid: The Idea, no implementations yet.
Extras:
  • Thread Overview as of page 3.
  • (Worth it, This can be used to read where things have collided with a character, useful for contact deformation and things like semen on skin, it was used for darkevilhum's flesh ripple shader)
  • and a way to make it (much) more efficient by unwrapping the uv only once instead of each time you paint.
  • Niagara Basic Semen Mechanic (Scroll to the edit) uses concepts from niagara softbody. Also could potentially be an alternative method for meshpainting
  • Active Ragdoll (A solution to use physics asset for collision and collision responses), limitations: Ragdolls in unreal are super twitchy which can complicate matters a bit.
  • How to make a search bar widget (spoiler at bottom of post)
  • Penetration Mechanics Stuff: Bone Location driving Morphs, Dildo Rail System
  • Some info about hair
  • How to do body decals
  • Brief c++ vs blueprints performance comparison. And here is a little more detail (testing methodology properly shown in this vid).
  • Click & Drag physics enabled objects with mouse using a physics handle (this is how I'm clicking and dragging things during play in some of my clips, you can also press F8 during play to use the editor tools to do it)
  • HSV Color Selector Widget
  • Posing skeletal meshes at runtime
  • Niagara basics to learn and some more info (latter link has some proper tutorial vids)
 
Last edited:

razfaz

Member
Mar 24, 2021
180
200
Since we are on F95 and Perverts I may assume the idea behind the original Question, which is as old as the first Game Mods for Skyrim and has to do with realtime Full-Human-SoftBody for the goal of letting physics do as much as possible for certain interactions, without the need of manual work/intervention.

How ever, Play around with Flesh, give feedback, (y).

---

PS: Wonder how Chaos-Cloth on a Chaos-Flesh deformation SkeletonMesh would look like, but I don't have much quality hopes there, too much dynamics and I expect endless clipping therefore, but who knows, someone has to test it out, deeply, and not just superficial and I wish there would be a small but fine F95 Discord for Creators(Only) composed of likeminded Coders, 2D/3D Artist, Storytellers, Writers, Managers etc. for inderdisciplinary exchanges and so on. Nerdy techtalks, having fun experimenting around, sharing some beers and discussing/trying out some groundbreaking ideas (or brainfarts) while doing so etc.
 
Last edited:

plain123

New Member
Jan 2, 2019
10
192
I tried playing with flesh for a full body character and got nowhere, as the density of the vertices of my mesh were different at different locations and it didn't look good at all. But I am still new to Unreal engine and there's a lot to learn, so somebody else might have more understanding and success...

My ultimate goal is to have a real-time playable character with simulated skin at specific parts that look like this:

I think that's achieved with either multiple bones with different spring parameters at the jiggly parts of the mesh or with careful morph target.

Here's my idea of multiple bones and physics bodies (at 0:56 in the video), although that's implemented in VAM, so it's made for Unity physics:


Also, on the topic of soft-body sim, that is another interesting approach that doesn't seem to be too expensive, haven't tested it yet:
 
Last edited:

Velomous

Member
Jan 14, 2024
285
263
I tried playing with flesh for a full body character and got nowhere, as the density of the vertices of my mesh were different at different locations and it didn't look good at all. But I am still new to Unreal engine and there's a lot to learn, so somebody else might have more understanding and success...
I think maybe you need to find a way to apply it to specific parts of the mesh individually, maybe it can be done by applying it to the individual bones in the skeleton one at a time instead of the whole mesh?
 

plain123

New Member
Jan 2, 2019
10
192
The tetrahedral for flesh simulation is created from the volume of a mesh, not from bones. The vert count has to be the same for the skeletal mesh and for the one that the terahedral volume is generated from, otherwise the engine would not know which simulated vertex corresponds to which one on the skeletal mesh. That's why i don't think you can chop the character to pieces to be simulated individually, with different settings for breasts, stomach, thighs and so on. But I may be wrong, will look into it.
P.S. I still think Chaos Flesh is too expensive to be used in realtime environments. On my Ryzen 5 3600x and RTX 3060 Ti the framerate was too low in an empty level while simulating just one tetrahedral volume, so that will most probably be a dead end for gameplay application. With UE5.4 Epic have somewhat optimised performance of cloth simulations, so I think that's a viable option for representing softness and maybe minor ripples on the skeletal mesh that could be just enough for realtime use. A game usually has to compute a lot of stuff, so unfortunately one cannot put all his eggs in the basket of simulating breasts/skin accurately :-(
 
  • Like
Reactions: razfaz and Velomous

Velomous

Member
Jan 14, 2024
285
263
If that's the effect you're after, it's just cloth simulation on the breasts + Physics Asset
The mesh is a standart metahuman and it didn't take long to setup the collisions.
How did you do that actually? Did you just put cloth paint on the skeletal mesh and that's it? I'm pretty sure i have the naughty sandbox thing figured out, he probably used a combination of this cloth physics method for the accurate touching and some (if not all) of the jiggle (You can tell by how the mesh spazzes out when you try to drag say the glute of the model, it's gotta be something like this) and then material manipulation in the same vein as distance fields for the rest (the smacking ripple effect is definitely using this kind of method)

I suppose it's also possible he's using material manipulation for all of it, though i kinda doubt it.

It makes a lot of sense actually, since cloth physics and softbody physics are actually synonymous, it's easy to forget that but they are the same exact thing.

The controls are really ass in that game though, i'm actually kinda amazed by how advanced he was able to make some parts of the game but something as basic as controls was allowed to be some of the worst i ever experienced anywhere lol.
 
Last edited:

plain123

New Member
Jan 2, 2019
10
192
Yeah, just painted cloth on the mesh. Set the anim drive to .95 and set Collide with Environment and Force collision update to true. Although it looks decent and the performance is ok, there're a couple of big problems.
First, no morphs can affect the painted area (they just don't do anything). So, no boob variations via morphs. And second - I couldn't make the cloth collide with another skeletal mesh. It only collides with static meshes in the world. And that's a known limitation as far as I read after looking for a fix.
One more thing about Chaos flesh:

You don't have permission to view the spoiler content. Log in or register now.

So, that makes it both expensive and unusable for realtime use. And so is the method I showed in the 2 videos above. Will look for other solutions.
 

Velomous

Member
Jan 14, 2024
285
263
Yeah, just painted cloth on the mesh. Set the anim drive to .95 and set Collide with Environment and Force collision update to true. Although it looks decent and the performance is ok, there're a couple of big problems.
First, no morphs can affect the painted area (they just don't do anything). So, no boob variations via morphs. And second - I couldn't make the cloth collide with another skeletal mesh. It only collides with static meshes in the world. And that's a known limitation as far as I read after looking for a fix.
You can resize the boobs in naughty sandbox and I'm pretty sure that the dildos and stuff are skeletal meshes too, so there has to be a solution for this. If only we could convince the dev to tell us how he did it :cry: