Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fully reset a Softbody actor
#1
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.
Reply
#2
(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.
Reply
#3
(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.
Reply
#4
(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
Reply