Status update on squeezing the body with clothing (Patreon)
Content
So far, the plan has been to use forces on the soft physics mesh to create a squeezing effect, otherwise known as "skindentation". However, after some discussions with Stopper, it became clear that generating a morph based on the clothing geometry is a much better idea, for several reasons: it doesn't require soft physics, it can affect any area of the body rather than just breasts and glutes, and the resolution of the skin mesh itself is higher than the resolution of the soft physics mesh.
In addition to that, Stopper helped me figure out a way to get the morph-wrapped clothing mesh data in real time, which means there's no requirement for the clothing to be sim-enabled. It's incredibly useful to have people like him in the community to provide expert insights!
To summarize, in theory, skindentation can be generated for any clothing item and can affect any part of the body.
In the video, the script detects the clothing item's edge vertices, finds nearby skin vertices, and generates a morph where each skin vertex has an equal amount of movement per morph value towards the center of the clothing item (average position of cloth vertices). The result is ugly but shows what is possible.
There are challenges to be overcome before it's practical, however. The two big ones are:
1) Generating a good looking morph. This will probably take a lot of research, learning, and trial and error. To me, the math for how to actually calculate the so-called vertex deltas for a morph that looks like the skin is being wrapped tightly is far from clear. Deltas define which skin vertices are affected by the morph, and how much they move and in what direction. Normally a 3D modeler doesn't need to worry about any of that since the morph is created visually by sculpting in Blender or similar rather than by algorithm.
I have to be a bit cautious in promising anything, just in case it turns out to be too difficult for me to do with a reasonable amount of effort. But I'm excited to try to figure it out. Automatic generation of skindentation morphs for basically any clothing item would be an amazing addition to VAM!
2) Defining which areas the morph should apply to and adjusting the morph's magnitude for different areas. Obviously you'd want to emphasize soft areas of the body, but how much of the body is soft depends on the model, so the amount of squeezing in different areas can't be decided automatically. This requires some kind of system for selecting the area and emphasizing or reducing the morph amount in that area in a way that transitions smoothly to adjacent areas. This is probably a simpler problem to solve than 1), but still pretty complicated technically.
One small challenge that's basically solved is the detection of clothing edge vertices. It seems to work pretty well for most items, but some items can have a mesh with edges elsewhere than just at the boundary between the item and the uncovered skin (e.g. the lace mesh of the built-in Fancy Bra).
Since dynamically generated morphs can affect any part of the body, it doesn't really make sense for this feature to be part of Naturalis. It would be its own plugin that you would use to generate and export the morph, and the morph could then be used normally. The clothing adjustment profiles in Naturalis could reference these morphs and apply them automatically.
What this means for Naturalis v1.1 is that the force based squeezing of the soft physics mesh will not be implemented (but I'll keep that as a backup plan just in case).
I'll put the main focus on easier implementations for now and try to get v1.1 completed apart from this. If/when I solve above two challenges, I can continue to create a usable new plugin and add integration to the Naturalis clothing profiles. Will let you know!
-everlaster