Obi Official Forum
What are "fixed particles"? - 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: What are "fixed particles"? (/thread-4153.html)



What are "fixed particles"? - kodra - 06-04-2024

The API document of ObiSoftbody has this description:


Quote:override void Obi.ObiSoftbody.UpdateParticleProperties()
Recalculates shape matching rest state.
Recalculates the shape used as reference for transform position/orientation when there are no fixed particles, as well as the rest shape matching state. Should be called manually when changing the amount of fixed particles and/ or active particles.

I wonder what "fixed particles" and "active particles" are, as I can't find a way to paint a particle fixed or active in the blueprint editor. Does "fixed" just mean the particles attached by ObiParticleAttachment, or are they two different things?


RE: What are "fixed particles"? - josemendez - 08-04-2024

(06-04-2024, 07:35 PM)kodra Wrote: The API document of ObiSoftbody has this description:



I wonder what "fixed particles" and "active particles" are, as I can't find a way to paint a particle fixed or active in the blueprint editor. Does "fixed" just mean the particles attached by ObiParticleAttachment, or are they two different things?

Fixed particles are particles that have had their inverse mass set to zero.

This basically gives the particle infinite mass, which makes it ignore forces (since a = f/m) and is used to override the particle's position. Static ObiParticleAttachments do this, but you can also fix particles in place programmatically.

Particles in Obi can be either active or inactive. Active particles are part of the simulation, inactive particles are not. This is used to avoid having to allocate/free memory at runtime: actors can preallocate a specific amount of particles, the activate/deactivate them as needed. This is not used by softbodies yet, but used extensively by fluid emitters, tearable cloth, and ropes. In case you write custom code for softbodies that activates/deactivates particles (for instance, custom tearing/breaking) it's important to call UpdateParticleProperties() afterwards.