Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Configuring a T-Shirt for Robotics Task
#1
Hi,

I'm an undergraduate student working with a robot-assisted dressing task and am interested in using Obi to simulate the dynamics of a T-shirt. Currently, I'm aiming just to get a t-shirt cloth set up to see if Obi will give good performance/results in terms of realistic cloth simulation.

I've imported this into Unity and set up a scene with Obi. Currently, I just have the shirt falling onto itself on a hospital bed.

Some important specifications for my problem in particular are that I need to use self collisions and surface collisions simultaneously enabled, or else the cloth may phase through itself in unexpected ways. I ran previously into a problem with this causing INTENSE lag, but followed the steps in this forum post (https://obi.virtualmethodstudio.com/foru...-3994.html) to resolve this. I suppose I have one tiny question regarding that solution: 

When I limit the timestep to 0.06, which seems to give workable results, the simulation actually seems to slow down. That is, it's as if I reduced the timescale because the physics compared to real time seems to actually be slower than if I have the timestep unlimited. I assume this is because the physics timestep is limited below the timestep suggested by the FPS, meaning the physics simulates slower than expected. Is this intentional and is there any workaround I can do regarding this? It's certainly not the biggest deal and still simulates at a reasonable speed.

Secondly, more pertinently, I'm running into an issue when the cloth lays on top of itself; when the cloth should be simply at rest laying on top of itself, it seems to jitter violently due to collisions constantly happening between its particles. I attached a video of this on my Google Drive: https://drive.google.com/file/d/16GJlybl...sp=sharing

Is there any way to prevent this jitter and make the cloth behave better when at rest?

Thanks in advance for any tips and apologies if answers are already somewhere out there. I haven't seen much use of Obi Cloth (or any particle-based simulations out there) in the context of actual entire clothing meshes, so it's been hard to configure things specifically for this purpose. I suppose in that case if there are any particular resources I could consult to find more about the use of Obi for my specific purpose I would really appreciate any direction towards those resources. Sonrisa
Reply
#2
(08-03-2024, 05:03 PM)thisjustin123 Wrote: When I limit the timestep to 0.06, which seems to give workable results, the simulation actually seems to slow down. That is, it's as if I reduced the timescale because the physics compared to real time seems to actually be slower than if I have the timestep unlimited. I assume this is because the physics timestep is limited below the timestep suggested by the FPS, meaning the physics simulates slower than expected. Is this intentional and is there any workaround I can do regarding this? It's certainly not the biggest deal and still simulates at a reasonable speed.

Hi!

This is just how fixed timestepping works: physics in Unity -all physics, not just Obi- are updated using a fixed time interval, up to to a maximum amount of time per frame. So for instance if your max timestep is set to 0.06 and your timestep is set to 0.02, Unity will update physics at most 3 times per frame (0.06/0.02). If a frame takes more than 0.06 seconds to render, the remaining time is not simulated and as a result physics will fall behind rendering and will look "slow motion".

This is the intended outcome, otherwise frame rate would tank anytime a frame took slightly longer to render than usual due to physics being required to update many times to catch up.

(08-03-2024, 05:03 PM)thisjustin123 Wrote: Secondly, more pertinently, I'm running into an issue when the cloth lays on top of itself; when the cloth should be simply at rest laying on top of itself, it seems to jitter violently due to collisions constantly happening between its particles. I attached a video of this on my Google Drive: https://drive.google.com/file/d/16GJlybl...sp=sharing

This is an inherent limitation of surface collisions, described in the manual (see the "shortcomings" section at the end of surface collisions)

There's a surface collision tolerance threshold and surface collision iterations settings in the solver than allow you to increase their quality and determine when to stop iterating if quality is good enough. Note that decreasing the tolerance or increasing the amount of iterations makes simulation costlier.

There's also a "sleep threshold" that will freeze particles in place to reduce jittering once they're below some specific kinetic energy threshold.

(08-03-2024, 05:03 PM)thisjustin123 Wrote: I haven't seen much use of Obi Cloth (or any particle-based simulations out there) in the context of actual entire clothing meshes, so it's been hard to configure things specifically for this purpose.

That's because for "real" garment simulation (think Optitex or Marvelous Designer) particle systems are often not used. Instead a continuum-based method (eg. FEM) is used, together with full edge-edge/vertex-triangle collision resolution. Obi -as most realtime engines- cuts a lot of corners in order to achieve realtime performance.

Moreover, character clothing in games is not brute forced (simulate cloth collisions with the character body as well as itself), instead skin constraints are used to blend animation and simulation together. See the CharacterCloth sample scene for an example. This does away with the need to calculate any collisions between the cloth and the character's body, and most of the time it also allows you to skip self-collisions entirely.

kind regards,
Reply