Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Configuring a T-Shirt for Robotics Task
#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


Messages In This Thread
RE: Configuring a T-Shirt for Robotics Task - by josemendez - 11-03-2024, 08:40 AM