Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shape Matching constraint: Obi Softbody vs Blueprint editor?
#1
The ObiSoftbody component has some parameters for Shape Matching constraint:

   

However, in the Blueprint editor one can set those constraint per particle:

   

My question is: how these two work together? For example, if I set "Max Deformation" to 0.8 on ObiSoftbody, but I set a particle's Max Deformation to 0.4 in the blueprint editor, then what does this result in?
Reply
#2
Hi Kodra,

The ObiSoftbody's parameters are multipliers: they will take whatever per-particle values you set in the blueprint and multiply them with a global value. So in this case, 0.8 *0.4 = 0.32.

Should you need to change this, you can find the implementation in ObiShapeMatchingConstraints.cs, line 182-ish:

Code:
materialParameters[(m_ActiveConstraintCount + i) * 5] = batch.materialParameters[i * 5] * user.deformationResistance;

user.deformationResistance would be the value set by the ObiSoftbody component, while batch.materialParameters[i * 5] is the value set for each individual constraint in the blueprint editor.

kind regards,
Reply
#3
(04-04-2024, 08:14 AM)josemendez Wrote: Hi Kodra,

The ObiSoftbody's parameters are multipliers: they will take whatever per-particle values you set in the blueprint and multiply them with a global value. So in this case, 0.8 *0.4 = 0.32.

Should you need to change this, you can find the implementation in ObiShapeMatchingConstraints.cs, line 182-ish:

Code:
materialParameters[(m_ActiveConstraintCount + i) * 5] = batch.materialParameters[i * 5] * user.deformationResistance;

user.deformationResistance would be the value set by the ObiSoftbody component, while batch.materialParameters[i * 5] is the value set for each individual constraint in the blueprint editor.

kind regards,

I see. Thank you very much for the answer!
Reply