Unreal Engine How do we do penetration mechanics in 3D games?

Velomous

Member
Jan 14, 2024
115
66
How to make peen go inside puss? A question everyone asks themselves at some point.

But seriously, how are people doing it? I mean we can have a perfectly sound model, with bones to manipulate the mouth and vagina and even the anus, and sure, making the vagina or mouth open up based on proximity with the peen is easy enough I suppose...

But how do we actually make it go inside? I mean the head and pelvis have their own colliders, and we obviously need collisions working or instead of hips smacking into butts we'll have two characters clipping inside of each other, so we can't just disable the colliders.... Not to mention we actually need it to look like the penis is actually touching the vagina, kinda rough to do without collisions.

I can think of 2 or 3 ways to do it in theory, but they are really shitty ways (such as disabling the colliders!)

So how are people actually doing it in games where dynamic penetration needs to be possible, such as VAM or Villain Simulator or Naughty Sandbox?
 

Velomous

Member
Jan 14, 2024
115
66
you can use different collision channels and setup collision with only what you want.
So you mean like disabling pawn to pawn collision? I discussed that option in the OP, but then you'd just be dealing with clipping instead.

How do we actually do something like ?
 

witcher234

Newbie
Dec 20, 2020
76
22
Either done by skinning it to several bones along edge. And colliding rod with collision spheres on bones (just like how meta human mouth is rigged). Or using softbody physics using niagra sping physics. Which is very difficlut to do with chars
 

TheExordick

Newbie
Sep 25, 2021
83
74
Generally, it is done manually during animation phase with morph targets for opening and closing vagina, anus and so on.
The problem of doing it procedurally, physics based, inside the engine is the performance cost.

How do we actually do something like ?
This is probably done with a mixture of things: physics assets, with carefully tuned colliders (to open and close the hole), materials and maybe cloth simulation to mimic the softness of the skin.
And i have to say it is an incredible technical showcase!

In UE you can have multiple physical asset for each skeletal mesh and while the main one may not be simulated, you can attach and simulate a second physical asset in the animation blueprint. So, you can create a phys asset for the vagina and anus to be simulated while the rest of the body is not simulating. You can detect physical collisions with other physical assets and depending on the precision of the rig you can have very good results.
 

Velomous

Member
Jan 14, 2024
115
66
Generally, it is done manually during animation phase with morph targets for opening and closing vagina, anus and so on.
The problem of doing it procedurally, physics based, inside the engine is the performance cost.



This is probably done with a mixture of things: physics assets, with carefully tuned colliders (to open and close the hole), materials and maybe cloth simulation to mimic the softness of the skin.
And i have to say it is an incredible technical showcase!

In UE you can have multiple physical asset for each skeletal mesh and while the main one may not be simulated, you can attach and simulate a second physical asset in the animation blueprint. So, you can create a phys asset for the vagina and anus to be simulated while the rest of the body is not simulating. You can detect physical collisions with other physical assets and depending on the precision of the rig you can have very good results.
That was done in VAM actually, it's not a technical showcase it's a plugin called naturalis, it just works (tm) it's in unity not unreal (tho that's kinda besides the point), but multiple physical assets for one skeletal mesh? at the same time? how? or do you mean just switching dynamically between physical assets based on conditions?
 

TheExordick

Newbie
Sep 25, 2021
83
74
That was done in VAM actually, it's not a technical showcase it's a plugin called naturalis, it just works (tm) it's in unity not unreal (tho that's kinda besides the point), but multiple physical assets for one skeletal mesh? at the same time? how? or do you mean just switching dynamically between physical assets based on conditions?
I've seen later that it was done in Unity, you are right, impressive nonetheless!

Inside the anim bp of a character you can call the node named "Rigid Body" and use it to simulate a physical asset.
But now that i look better at it, it looks like it overrides the previous phys asset. So i might be wrong.
I don't know why i thought you could concatenate more than one of this nodes and all of them would simulate.

1717426123504.png
 
  • Like
Reactions: Velomous

TAU9

New Member
Oct 11, 2022
7
2
You can absolutely disable mesh/capsule/etc collision on a pawn. Are you doing procedural animation or something? If not just make sure the two animations are in sync with each other and there's no clipping. If you try to use the skeletal physics asset you will have the opposite of clipping because the skeletal physics asset bodies will be too large.

Doing something like the penetration above would be insanely impressive but also unnecessary unless again you're trying to do procedural animation. In my projects I just have morph target curves running alongside the animation.

Edit - maybe you could look at Chaos Flesh or a marketplace physics plugin like
 
  • Like
Reactions: TheExordick

Velomous

Member
Jan 14, 2024
115
66
You can absolutely disable mesh/capsule/etc collision on a pawn. Are you doing procedural animation or something? If not just make sure the two animations are in sync with each other and there's no clipping. If you try to use the skeletal physics asset you will have the opposite of clipping because the skeletal physics asset bodies will be too large.
Procedural animation is exactly what I'm trying to do, e.g. less like illusion and kiss games, more like VAM.

The physics asset bodies being too large is exactly the problem, I have a few ideas, cloth physics or chaos flesh seem the best options for softbody but that doesn't necessarily solve these collision issues. In the physics asset there is a per collider setting where I can set complex collision as simple which although visually doesn't seem to do anything in the PhAT editor, it should in theory make the collider precisely match the mesh (it should be equivalent to per-poly collision), I haven't tested it yet though, but after i set up a proper environment for testing all this stuff it's where i'm planning to start.
 
  • Like
Reactions: TheExordick

TAU9

New Member
Oct 11, 2022
7
2
Complex as simple is for static meshes. AFAIK it won't have any effect on a skeletal mesh as a skeletal mesh physics asset is made up of rigid bodies assigned to bones. I could be wrong though.
 

AdeptusSteve

Member
Game Developer
Jun 9, 2017
171
1,230
If you werent going for fully proceduralized animations Id suggest including genital deformation in your maya or blender rigs and hand-keying the penetration there along with the rest of the animation. That will produce by far the best results.

We played around with a few procedural penetration systems in UE4 and I think the best one was to track the depth and direction of the penis tip bone past the vagina "entrance" and map that to a set of shapes.
The second part was to apply an IK system to the penis with a fixed set of control points on the vagina, and blend into it when it comes close to the vagina.

Havent messed around with the UE5 flesh deformer thingies but I suspect it could also be setup to work quite nicely if the skeletal animation is stable and favorable.
But I have to add that in all my time researching and developing around these things, the visual results never came close to just manually animated scenes but that could be due to my lack of skills in that direction. Anyway, I do get the appeal of fully procedural animations, its a nice thing to witness.

I wish you good luck with this, keep us updated (y)
 

WarmGourd

New Member
Mar 30, 2024
5
6
I've been working on something similar to this myself for the past several months and can say with relative confidence that this is achieved using physics joints (lots of Configurable Joints most likely in Unity) and a (more than likely) proprietary pseudo soft body solution. That's not to say that an asset store asset couldn't get you close to the mesh deformation shown. The ones that come to mind are Obi Softbody or Vertexmotion but would require lots of work to get looking right. Hopefully this can point you in the right direction with regards to similar assets you could use for Unreal.

The way that I've approached the problem is much the same as I've mentioned above. Rigged and weighted genitals, LOTS of Rigidbodies, Configurable Joints and coding to ensure that they all play nicely together. Unfortunately Unity's physics can be temperamental when there's so much going on; so achieving a stable physics simulation has proved to be trickier than I had envisioned, especially when it comes to the procedural animation, active ragdolls, full body inverse kinematics and "smooshing of parts" having to work together at the same time.

I have it at a point where I would consider it at 90 percent stable under most of my tested circumstances but there's still the odd stray interaction causing the simulation to go into overdrive. I'm sure I'll get it worked out in due course but I suppose what I'm trying to say is; Think very carefully before you go down this path. It's going to require a massive amount of work.

Whatever you choose to do. Good luck.
 

Velomous

Member
Jan 14, 2024
115
66
Hehe, I got some rudimentary genital collision going using physics asset, but to test it properly i need to have a dildo that I can properly line up with said genitals to further test how it behaves during actual penetration attempts.

While I was trying that (truly it's proving more challenging than it should, unreal's collision system can be a bit esoteric, whit things just magically not working for no reason sometimes, and pawnsenseing just mysteriously not working unless it's attached to a pawn, so i ended up having to use a sphere trace to detect proximity with the female for now, and then there is the lookat rotation which can be kinda weird sometimes, and getting the physics handle to play along with this is starting to look like a no-go)

But one of my attempts to just establish a baseline getting the dildo to rotate to 0,0,0 on-tick lead to this little blooper where the dildo is running away and i'm trying to catch it.
output.gif
 

WarmGourd

New Member
Mar 30, 2024
5
6
The way it's running and jumping has me chuckling far more than It probably should. That looks like a fun game in and of itself. Dildo hide and seek.

Anyway. I'm glad you're making progress, stick with it and thanks for the giggle.