Physics - Mustard2/MustardUI GitHub Wiki

From this panel, objects driving physics can be added to the UI.

Adding a Physics Item

To add a Physics Item, be sure to click on Enable Physics. Then, in Configuration mode, right-click on the Object and select Add Physics Item.

The item added should be visible in the Physics list. It is important to choose the type of all Physics Items in order to show them in the UI. The possible types are

  • Cage: An item that drives the motion of other Objects through Mesh or Surface Deform modifiers.
  • Collision: An object with the purpose of active as a collision surface for other objects with Physics.
  • Single Item: An item with Physics modifiers acting only on itself.
  • Bone Driver: An item with Physics which drives the motion of bones.

Setup Outfit Physics tool

This tool can be used to add Surface Deform modifiers to the outfits. In other words, it allows the Physics items to also affect the Outfits.

The tool checks if the outfit intersects with the physics item before adding the Surface Deform modifier, in order to avoid adding expensive modifiers that would not affect the mesh.

In addition, the intersections are saved to be used by the Physics panel when physics is enabled/disabled (globally or by single physics items): when an outfit is shown/hidden in MustardUI, only the intersecting cages with that specifig outfit piece will be activated, preventing unnecessary expensive computations on other hidden outfits.

It is then important to use again the Setup Outfit Physics tool is some physics items are added/removed, or if their mesh is changed. If you wish, this feature can be completely disabling by clicking on the X button near the Setup Outfit Physics: this will remove the intersection data (but not the Surface Deform modifiers!).

Note on the Attempt Fix

There are two possible fixes for the Concave faces binding error provided in this tool:

  • Subdivision (Hacky and not always effective, non-destructive): Attempt the binding with a higher level of subdivision. This is not guaranteed to succeed, and it requires the subdivision modifier to be on for the mesh to follow the body. However, this tool do not modify the mesh.
  • Concave Split: Attempt a binding using a Concave Split on the body mesh first. This has a much higher success rate, and it does not require expensive modifiers to be on to use the cages. However, it does modify the mesh: make a backup before using this option!