• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
Sim Setter (et al.)

Plugins + Scripts Sim Setter (et al.)

Download [<1 MB]
SimSetter is a small collection of plugins that allow you to save and restore a specific shape to a sim clothing item.

After manipulating a sim clothing item to be shaped in a certain way, via physics grab, morph changes, or pose adjustments, these plugins will save the position of the clothing's vertices and can then restore them to that exact position. This is useful for situations where certain morphs or poses may interfere with a clothing item's initialized sim state, or other situations where a person atom or other object is interacting with the clothing item in a specific way that the sim initialization would interfere with.

The saved sim position data will account for changes in atom position and rotation, but cannot account for pose or atom scale changes. These plugins do not freeze the sim in place; the physics remain active after the vertex positions are set.

SimSetter.cs:
SimSetter.cs saves one set of vertex positions for a single clothing item. Best for one-offs where only one clothing item needs special attention.
itemsettermanual.png


Target Clothing:
Use this menu to select which clothing item to save the sim position of. Active clothing is rescanned on menu open, so if you're just scrolling through and not seeing a recently added clothing item, open the menu and it should populate.

Save Sim/Set Sim:
The Save Sim button will save the sim vertex positions of the selected Target Clothing item, as well as clothing item itself. The Set Sim button will apply these vertex positions to the saved clothing item. These actions are also available as triggers, with an additional trigger Queue Set Sim that acts the same as Set Sim but with a slight delay.

Info Box:
This box will display the selected Target Clothing item's display name, as well as the saved clothing item and its vertex count.

Set On Load/Delay:
Set On Load
will, when selected, automatically load the stored sim data when the scene is loaded. The Physics Frame Delay is a settable delay, measured by physics frames in the FixedUpdate method, for the Queue Set Sim trigger. 50 physics frames = 1 second. This is needed for things like pose changes, where if the pose and sim set are triggered at the same time, a delay is required for the sim to be set properly.

Presets:
Save/Load Item Preset will save or load the vertex data for the saved clothing item to/from a file.


OutfitSetter.cs:
OutfitSetter.cs saves a single set of sim vertex positions for multiple clothing items at once.
outfitsettermanual.png


Target Clothing:
Functions the same as SimSetter.cs.

Save/Set Buttons:
When a Target Clothing item is selected, the (Select Clothing First) button becomes an Add [Clothing Item Name] button if the clothing item is not yet saved, or Update [Clothing Item Name] if the clothing item already has saved data. Selecting this button will save the sim vertex positions of the clothing item, overwriting any previously saved data for that item. Update All Saved Clothing will save the sim vertex positions for every clothing item already stored, but will not add new items. Set Selected Clothing Sim will apply the saved vertex positions of the Target Clothing item, if it is saved, and Set All Saved Clothing Sim will apply the saved vertex positions for all saved clothing items. There are also two additional triggers, Queue Set Sim and Queue Set Sim All, which queue loading of the Target Clothing's vertices or all saved clothing's vertices, respectively. Clear All Clothing And Sim will erase all stored data.

Info Box:
This box will display the selected Target Clothing item's display name, as well as the names of each of the saved clothing items.

Set On Load/Delay:
Functions the same as SimSetter.cs.

Presets:
Save/Load Outfit Preset will save or load the vertex data for all saved clothing items to/from a file. Save Item Preset will save the vertex data for the Target Clothing, if any is available, and Load Item Preset will add or overwrite the data for the clothing item saved in the file; these files are the same as the ones used in SimSetter.cs and can be shared between the plugins.


Plans for a version that can save multiple sets of sim information are still in the works! I think I have it fairly well conceptualized, I just need to find the time to work on it.


Silly little demo video:





>add clothing item
>it freaks out and clips through the model
>make adjustments to pose so it will stop clipping
>make adjustments to morphs so it will stop clipping
>gradually ease everything back to the way it was so clothing sim can adjust with it
>clothing sim is following nicely
>finally get it looking good and proper
>accidentally nudge person atom control
>complete sim explosion, back to square one
>mfw

So yeah. This is a thing that I realized could probably be done when I was messing around with clothing vertex positions in the ZipUnzipIt test.

Now includes OutfitSetter, which can save multiple clothing items.

What does it do?
SimSetter saves the exact position and shape of a sim clothing item and can then restore it to that position and shape. This is good for scenarios where the clothing sim gets reset, such as certain physics and collider changes within the scene, or even just on scene load.

How do I use it?
Use whatever means are available to you to manipulate the sim clothing item into the shape you want, be it cloth grab spheres or physics interactions or pose and morph changes. Once the clothing is positioned and set to the desired state, select the clothing item in the plugin's UI and press (or trigger) the "Save Sim" option. The text box on the right of the plugin UI should confirm the clothing item's vertices were saved. Pressing or triggering the "Set Sim" option will then set all of the clothing item's vertices back to the positions they were saved in.

Any examples of what kind of things would be worth saving?
Sure!
- If you have some morphs or poses which cause the clothing item to clip into the model when reset, e.g. certain tops might be too wide at the armpits and clip through the arms
- If you have the character interacting with their clothing item in some way, e.g. hooking their finger around a strap and pulling, putting their hand into their waitband, etc.
- If there are other physics objects causing the clothing to deform, e.g. something tucked under a shirt
- If the clothing is being worn in a nonstandard manner, e.g. panties that are being pulled off and are only around one leg

Limitations:
This plugin should be able to account for atom root position and rotation changes, but cannot account for atom scale or pose changes. Only one clothing item and one saved set of vertices per instance of the plugin. No presets, due to how transient the usefulness of a saved sim shape would be. This plugin does not fully freeze a sim clothing item into a predetermined shape; the sim remains active after the vertex positions are set. (The newer "OutfitSetter" plugin allows for saving of the sim state for multiple clothing items, but is still only able to save one state for the applicable items.)

How does it work behind the scenes?
"Save Sim" takes the position values of each vertex of the selected clothing item, subtracts out the person atom root's current position and rotation, and then saves them to an array. "Set Sim" will take that saved data, add the atom root's current position and rotation, then set each clothing vertex to that position. The setting happens over a couple of physics frames due to the fact that the clothing sim's acceleration needs to be disabled as it's set, and then re-enabled after, otherwise it reacts violently.

Hope its niche purpose is handy, and that it doesn't break anything. :)
React to this content...

Share this resource

More resources from coinstacc

Credits

Creator Support Link
GossamerVR GossamerVR
MacGruber MacGruber
AcidBubbles
S Stopper
C coinstacc

Latest updates

  1. The "oh sheet" update

    Per a request, there is a new SheetSetter plugin as part of the package that can be applied to...
  2. Presets update

    Since I haven't had time to actually work on the big version yet, here's a couple quality of...
  3. Queue Update

    This update adds the ability to queue loading of the sim for several frames, allowing for...

Latest reviews

Positive
Version: 5
Yes really better! TY!
Upvote 0
Positive
PVP
Version: 5
The demonstration is funny and more importantly, to-the-point. TY for sharing your work!
Upvote 0
Positive
Version: 4
Posted:
🤣I love your VR headset & hand movements in the demo video! ...Frickin hilarious!
Upvote 0
Positive
Version: 4
Posted:
Laughing out loud on that demo! Nice!
Upvote 1
Positive
Version: 4
Posted:
Hahaha.
Best demo video ever coming with a release doc. Did not test the plugin, this presentation is good enough.

Note: I will come back after testing it thoroughly :p
Upvote 1
Positive
FCG
Version: 4
Posted:
That must be the best demo video I have ever seen
Upvote 1
Positive
Version: 3
Posted:
I'm not a creator and not technically savvy, so I have no use for this personally, but I see how useful it is, and the main reason I'm reviewing was the demo video was funny af and made my day, as it was very fun and expressive lol. But other than the video, the plugin looks very useful for scenes, so I'm reviewing both the plugin and the funny video! Well done!
Upvote 0
Positive
Version: 1
Posted:
Seems a nice and helpful plugin. Have you considered making a short video explaining how it works?
Upvote 0
Back
Top Bottom