mpfb2
mpfb2 copied to clipboard
Provide functionality for cloth sim and collision detection
I wonder if there is an possibility to add/enable some kind collision detection in mpfb2. Because if you move rigs (rigify rigs) e.g let's say you bend and move forearm over the torso then you have two overlapping meshes. Also if you use rigid clothes (non-soft body) then some parts of that cloth overlaps with the character mesh.
I think there are two parts to this:
For rigid clothes, the only tools we have are delete groups and z-index. The latter is on the todo list, but will only solve cases where one piece of clothes should hide another. With rigid clothes, I don't really see a good solution for collision detection for the case where a pose will cause clothing to intersect with each other or with the body.
This leaves us with clothes simulation. This should be able to handle collision detection. There isn't much mpfb will be able to add to this outside of blender's already existing cloth sim functionality, but at least it should be possible to help with enabling it with sensible defaults.
Cloth simulation is something that needs to be set up by the asset creator. It is in a way a different type of rigging. You need to support storing simulation settings with the asset (including vertex groups among other things), and also stuff like additional simulation meshes (essentially it's a secondary non-rendered asset mesh, used to run the simulation and deform the main asset via modifiers like Surface Deform), because a nice looking detailed mesh is seldom suitable for simulation.