Attachment Skinner
Last updated
Last updated
Attach Skinner is a different kind of skinner that can be used on meshes that should follow closely some base mesh. For example clothing meshes for a character.
It achieves this by mapping every vertex to closest triangle of base mesh. Then whenever base mesh deforms (via bones or blend shapes) it makes the that vertices the follow the mapped triangles, using barycentric coordinates.
Since it does not require any kind of weight or blend shape transfer, it significantly simply asset creation pipeline. Also its more performant and memory-disk efficient than regular skinning.
But also its more prone to artifacts, specially if attachment mesh vertices have high distance to closest base triangle, or when base mesh is low poly on some areas. Another limitation of Attachment Skinner is, attachment cannot have custom blend shapes for itself, it can only follow the deformations of the base mesh.
Even if these limitations would not work four your project, it can be still valuable while development and prototyping.
FAQ
Q: How it works? A: Think about parent-child relationship in unity. Now lets say we make all attachment mesh vertices child of closest base mesh vertex to them. With that there is no need to skinning for attachment mesh, when skinning base mesh the attachment will follow automatically.
Q: Only for clothings? A: When Attachment meshes vertex have no close mesh vertex, it needs to parent itself a far away vertex. This might cause artifacts. Best kind of meshses that suatable for attachment skinner is meshes that all vertices close the base mesh, for example a glove, or a skin tight clothing.
Q: Can I add secondary motion via cloth sim or Magica cloth? A: Nope, Attachment Skinner follows base as is, and if base has Verlet Sim or Bone Simulated via Magica Cloth it will follow that too. But Attachment mesh cannot have extra simulations or jiggle.
Attachment Skinner should be child of the Ica Skinner component.
Unlike Ica Skinner, Ica Attachment Skinner does not require SMR.
All material and render parameter setting change edited via Mesh Renderer itself.
Attachment Skinner also support motion vectors too.