Obi Official Forum
Shape Matching constraint: Obi Softbody vs Blueprint editor? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Shape Matching constraint: Obi Softbody vs Blueprint editor? (/thread-4148.html)



Shape Matching constraint: Obi Softbody vs Blueprint editor? - kodra - 04-04-2024

The ObiSoftbody component has some parameters for Shape Matching constraint:

[attachment=2016]

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

[attachment=2017]

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?


RE: Shape Matching constraint: Obi Softbody vs Blueprint editor? - josemendez - 04-04-2024

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,


RE: Shape Matching constraint: Obi Softbody vs Blueprint editor? - kodra - 05-04-2024

(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!