17-09-2023, 02:09 AM
Is it possible to call the Obi Cloth Renderer "Bake Mesh" function from code?
Reason:
I have a complex inflating cloth object that is too slow to use OBI at run time when playing the game. So instead I want to perform the inflation in development version (slowly) and bake around 60 meshes, which I can then cycle through at runtime. So the OBI calculations will not happen at run time, I will just use the baked meshes.
Q1. To achieve this, I want to be able to spawn 60 meshes from code at various periods. Is there a way to call this method from code?
Q2. Is there a way to detect that the Solver sleep threshold has been met and the solver is asleep? This is the point in time I want to generate the baked mesh, then increase the inflation to capture the next frame.
Regards,
Michendo
Reason:
I have a complex inflating cloth object that is too slow to use OBI at run time when playing the game. So instead I want to perform the inflation in development version (slowly) and bake around 60 meshes, which I can then cycle through at runtime. So the OBI calculations will not happen at run time, I will just use the baked meshes.
Q1. To achieve this, I want to be able to spawn 60 meshes from code at various periods. Is there a way to call this method from code?
Q2. Is there a way to detect that the Solver sleep threshold has been met and the solver is asleep? This is the point in time I want to generate the baked mesh, then increase the inflation to capture the next frame.
Regards,
Michendo