- Sep 9, 2017
- 77
- 78
That might be overkill for number of simple colliders. In my mind, you have the base skeleton, and then depending on how "soft" you want to go, somewhere in the range of 5-12 bones per "soft area", which would only really be the butt and breasts, then maybe 4-8 for places like the thigh/belly etc. 2 for calves/biceps. I'm just approximating here but you definitely don't need that many. For a vagina opening for example, if you wanted to do it purely with bones and a PA, I think you could achieve good results with 4 bones minimum or 6-9 if you really want to push it. If you wanted to be super cheap though, you could defo pull it off with just two bones and REALLY good weight painting + maybe some clever logic with supporting morphs.I haven't been using UE very long either so I'm in the same boat. And yeah 30 or 40 colliders is no big deal, but we were talking about potentially hudnreds of colliders remember? You can do this test: Create a new physics asset, use these settings:
View attachment 3717859
You should now have sphere colliders for most bones in the body, somewhere in the range of 100 colliders, it should still perform pretty ok (until u hit the simulate button, then it lags a lot!) then, but these are just the normal bones, you were talking about making spring bones all over the character's body with their own unique colliders, so it's safe to say that's a couple hundred more colliders.
So try again with these settings:
View attachment 3717899
This should give you the same amount of colliders, but a roughly 5x higher number of primitives, so this is at least for me roughly the equivalent of having 500 spheres. If you tweak these values a bit you can actually get the colliders to very closely match the character's body, but once you get to that point your editor might straight up die because it'll be so laggy.
So that's what I meant about performance limitations. Also you have to consider that you'll probably rarely have only 1 actor active at a time, which means if you have 100 spheres, and 500 spheres would make you lag uncontrollably, then you could only have up to 4 characters active at a time with each character dropping performance by that much more (it might not be quite that simple, maybe it's optimized to run each character on different threads when it can or something I don't really know, but you get the idea).
And that's also where the issues with accuracy come in. If you want to use colliders and have any sort of performance you'll limit yourself to simple shapes like spheres and capsules as far as I can tell, because convex shapes that conform properly to your mesh are orders of magnitude more expensive (500 convex primitives didn't even cover half the mesh but 100 spheres covered all of it more or less in quite a lot of detail)
So if you want it to be accurate, like softbody-like detect exactly where on the mesh an object is pushing and deform it accordingly with a spring bone with each bone having a sphere collider for the surface (this actually seems like a good way to make the mesh deform from the inside if the penis collides with the body on the inside come to think of it), You're gonna need a lot of spheres, and the more accurate you want it to be, the more spheres and spring bones you're going to need to do it.
The other part of the accuracy problem is that you can only attach colliders to bones, so say for instance you have a vagina, and you have a bone for the left and right labia, only one each, you can put a capsule on each bone but it will not look very convincing, it's gonna be pretty janky, because it's not actually softbody, see? So to make it look convincing you would instead need to have a lot of bones each with individual colliders...
Which means that to have the kind of accuracy we're aiming for, you need to modify the mesh a lot by adding a moutnain of bones to it, and you're gonna need at minimum hundreds of colliders which is not gonna be conducive to performance. So you can make it really accurate at an extreme performance cost, or you can make it perform well with shitty accuracy.
It's a very unideal solution, i suppose it could work though.
When it comes to multiple actors, I think it depends on your goals/project type. For me personally, my project is focused on the main character (female) and her encounters (mostly male). So I will be cheaping out on the males and have her as the focus.
That being said, if your project requires a lot of these heavily simulated characters around at once, you'd likely have to start making performance decisions. Like who to prioritise, maybe a character limit or some system to switch out low priority ones with less "heavy" physics assets.
Im not sure if thats something we can do at runtime though? At very least, we can switch characters from simulated to kinematic and we can also switch their Physical Animation profiles. I do believe those profiles also include the bodies, so a on demand body reduction at runtime is possible I think.