Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody High Particle Count Skinning Bug
#4
Thanks for reporting this issue!

Found the culprit: skin, blueprints and softbody transforms have different scales, and there's a bug that affects the skinning process, shifting particle distances by an incorrect scale.

To fix it, open up ObiSoftbodySkinner.cs, around line 331 you should find this:

Code:
var blueprintTransform = Matrix4x4.TRS(Vector3.zero, softbody.softbodyBlueprint.rotation, softbody.softbodyBlueprint.scale);

skinMap.MapParticlesToVertices(skinnedMeshRenderer.sharedMesh, softbody, transform.localToWorldMatrix * blueprintTransform, softbody.transform.worldToLocalMatrix, radius, falloff, maxInfluences, true, softbodyInfluence, m_softbodyInfluences);

Replace with:

Code:
skinMap.MapParticlesToVertices(skinnedMeshRenderer.sharedMesh, softbody, transform.localToWorldMatrix, softbody.transform.worldToLocalMatrix, radius, falloff, maxInfluences, true, softbodyInfluence, m_softbodyInfluences);

The reasoning for this is that blueprint scale/rotation is already baked into particle rest positions, no need to reapply it during skinning.

Let me know if this fixes your problem.

kind regards,
Reply


Messages In This Thread
RE: Softbody High Particle Count Skinning Bug - by josemendez - 10 hours ago