Obi Official Forum
How to fully reset a Softbody actor - 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: How to fully reset a Softbody actor (/thread-2589.html)



How to fully reset a Softbody actor - JanikH - 23-11-2020

Hi,

so I have a Softbody actor that I want to reset completely to it's initial state.
Currently I'm caching the particle position, orientation, velocity and angular velocity and applying these values on reset.
This mostly works. However, the permanent softbody deformation is not reset, so it stays squished.

Can I cache the initial deformation (no deformation at all) as well or is there another approach I have to take?
I'd rather not instantiate a new actor, I would prefer to reset the existing one if possible.


RE: How to fully reset a Softbody actor - josemendez - 23-11-2020

(23-11-2020, 03:44 PM)JanikH Wrote: Hi,

so I have a Softbody actor that I want to reset completely to it's initial state.
Currently I'm caching the particle position, orientation, velocity and angular velocity and applying these values on reset.
This mostly works. However, the permanent softbody deformation is not reset, so it stays squished.

Can I cache the initial deformation (no deformation at all) as well or is there another approach I have to take?
I'd rather not instantiate a new actor, I would prefer to reset the existing one if possible.

Plastic deformation is stored as a 4x4 matrix per shape matching constraint. Currently this is internal data, specific to each backend, and not exposed trough the API.

You could set the plastic recovery parameter to a high value, so that the deformation matrices are reset at the end of the first simulation step after resetting the softbody.

In the future we will consider exposing the deformation tensors trough the API.


RE: How to fully reset a Softbody actor - JanikH - 23-11-2020

(23-11-2020, 04:09 PM)josemendez Wrote: Plastic deformation is stored as a 4x4 matrix per shape matching constraint. Currently this is internal data, specific to each backend, and not exposed trough the API.

You could set the plastic recovery parameter to a high value, so that the deformation matrices are reset at the end of the first simulation step after resetting the softbody.

In the future we will consider exposing the deformation tensors trough the API.

Thanks for the info. The solution you suggest should be viable for my use-case, I'll try it out.
I think having API access would be greatly appreciated, considering the API doesn't offer that many high-level methods (such as Reset).

Nevertheless, I'm very happy with the Plugin, keep up the good work.


RE: How to fully reset a Softbody actor - swancollective - 22-06-2023

(23-11-2020, 06:08 PM)JanikH Wrote: Thanks for the info. The solution you suggest should be viable for my use-case, I'll try it out.
I think having API access would be greatly appreciated, considering the API doesn't offer that many high-level methods (such as Reset).

Nevertheless, I'm very happy with the Plugin, keep up the good work.

Hey Janik, may I ask how you achieved to reset the softbody's position (i.e. its particles)? I just can't seem to get this done!

Thanks in advance my friend Sonrisa

Felix