SamuZai
everlaster
everlaster

patreon


Naturalis - Plan for clothing adjustments

Hi! I've been investigating different possibilities, digging into how clothing works in VAM, and putting together a plan for the clothing adjustments in Naturalis v1.1.

The quick version

Background info

First a bit of info on the force-based soft physics mesh deformation demonstrated earlier:

Digging into how cloth-to-skin wrapping works for non-sim clothing in VAM, it became clear that automatically squeezing the soft physics mesh with forces is only possible with sim clothing. Sadly, getting the real-time cloth vertex positions for a non-sim clothing would require access to GPU buffers that are off limits to plugins.

For sim clothing, reading the sim particle positions is a very costly operation, so the cloth shape can practically only be used to initialize the directions of the forces. What this means is that deforming the soft physics mesh with forces only makes sense when the clothing isn't moving around too much - the sim particles need to stay in the initial relative position to the soft joints. The clothing needs to wrap the skin pretty tightly, and its Skin Joint Strength needs to be high. In addition, the forces won't adapt in real time when undressing the sim clothing.

So there's a bunch of limitations there, and there's still many things that I need to figure out to make it practical. But I fully intend on getting as much out of this as VAM lets me 😀.

Regarding non-sim clothing - since its actual wrapped shape is unknown to the plugin, the adjustments to most non-sim items may have to be manually configured. That's somewhat annoying... but configuring will be pretty easy, and storing clothing adjustment profiles to disk means you only have to configure an item once.

With that out of the way, let's look at how the clothing adjustments will work. I'm focusing first on implementations that are relatively easy to do, have the most impact, and are compatible with both sim and non-sim clothing and with soft physics on/off.

Main joint force

The main driver for clothing adjustments will be a force on the breast or glute joint. The force has three components: squeeze (X), lift (Y) and press (Z). For example, push-up bra would have a lot of lift force, countering gravity entirely and then some, along with a small amount of force squeezing the breasts closer together, and a small amount of force pressing the breasts against the chest. A tight t-shirt might have no lift, but a lot of squeeze and press.

The force will automatically result in a change in shape, which means morphs get applied automatically as well. This is a much simpler and reliable way to change the overall shape than applying forces to individual soft joints, and works universally. In addition, it doesn't require any clothing-specific morphing, it just uses the existing directional force morphing system. (Clothing specific morphing could be something that could configured to the clothing item's adjustment profile in the future, but it's not part of this initial plan.)

How the main joint force will adapt to different poses is still to be determined. E.g. you wouldn't necessarily want the push force to be applied in addition to the force of gravity when leaning back, since that could flatten breasts too much. Instead you might just want a minimum amount of force that gets applied regardless of gravity.

In addition to the main joint force, I will investigate if it makes sense to apply forces on the hard colliders.

Physics adjustments

The main joint force will affect physics parameter values. This replaces VAM's built in adjustments (the Spring/Damper Multiplier sliders in the clothing item's settings) with a system that works in a more automated and configurable way, and affects soft physics parameters as well.

Exactly what parameters get adjusted and how is still to be determined, but it'll work automatically based on the forces, and you can tweak the physics adjustments manually.

Clothing adjustment profiles

To enable a clothing item to always have the desired effect on breasts/glutes, its adjustment profile can be saved to disk as a default profile. The default profile is then automatically loaded when you enable the clothing (in a different scene or a different look for example).

In addition, you can load the profile of one item to another item. E.g. when creating a profile for a custom bra, you can load the profile of one of the built in bras as a starting point. All built in clothing items will have an included default profile.

Additional profiles can be saved and loaded (similar to preset files), and you can switch between them using triggers, and change which one should be the default.

I'm looking into ways to automate the creation of profiles as much as possible based on things like existing clothing tags and predefined profiles to copy settings from. Obvious things like a "bra" tag should automatically just load some default bra profile if the clothing item doesn't have a locally saved default profile, etc. The default profile could also be somehow interpreted from whether the clothing is sim , and if so what the sim physics settings are. The goal is that common item types should apply some sensible forces and physics adjustments on the joint, and users would only need to configure the profile manually if they want to tweak it, or if the item is not tagged in a way that the plugin recognizes.

Soft mesh deformation

Since this still requires R&D, is technically quite difficult to implement, and only works with sim clothing and soft physics, I'm leaving this one for the last. Currently the idea is that local forces will only be used for applying surface deformations, rather than for moving or shaping the overall breast/glute. It'll work as a layer on top of the main joint force, rather than as an alternative way to apply force.

When using local distortion physics, the forces would automatically result in changes to the physics of the soft joints.

The sum of all of the local forces that get applied could theoretically be used to automatically calculate the "squeeze", "lift" and "press" components of the main joint force. In other words, the shape of the clothing could be used to determine good defaults for these forces in the case of sim clothing.

The biggest hurdle is figuring out an algorithm that reliably detects the edge of the clothing item relative to nearby soft joints. ChatGPT is likely to be a pretty big help here.

Another hurdle is ensuring that forces are applied smoothly and evenly (except at the edge if you want to squeeze the edge), and that the forces never pull on the joints and only push in on the joints.

_____

I've updated the trello as well. As with any plan, things might change, but it's important to have some structure and a starting point. Right then, time to get started :)

-everlaster

Comments

I was reading this post when I woke up this morning. You have a way with words to make it understandable to the not technical-savvy individuals; I admire that. Really excited to see the demo video. Going to be great!

Jyubei

I can confirm that applying the X/Y/Z forces to the breast joint works great. I will have a demo video out pretty soon to show how it looks. Also, there's a few additional things that need to be taken into account. 1. Collider friction needs to adapt to the clothing. For example if you have adaptive friction enabled and you've set a high skin gloss so that friction is very low, it should only be low on the exposed skin colliders but not the ones covered by clothing. That should be possible to do for sim clothing. For non-sim clothing, applying the friction selectively isn't possible based on the cloth shape, so probably in that case it'll just use the dry skin friction for all colliders, or some user defined constant friction. 2. The amount of force that gets applied may need to depend on breast/glute size somehow. Otherwise you might need a different profile for every breast size, and default profile wouldn't automatically work on different models which would kind of defeat its purpose.

everlaster


More Creators