Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scaling / Sizing a cloth - How?
#4
(04-11-2017, 05:16 PM)csofrany Wrote: Inside Obi, it would seem, not. For someone who's context is Unity it does very much. I wasn't aware that Unity cloth has the same restrictions, so thank you for pointing this out. This is going to require some re-thinking/coding of the scene. 

The bad news is that inside of Unity or outside of it, it does not make sense. It doesn't in the 3D vector algebra sense, not just in one particular program/work environment/paradigm. 

It just cannot be done for the reason I pointed out: mathematically there's no way to describe the state of a cloth (which can deform in a non-affine way) using a single affine matrix, like you can do with a rigid cube for instance (or any rigid shape).

You can however use a single matrix to "bend" the space in which the cloth lives, but this requires a second matrix describing the simulation space. Which is what the local space setup I described does.

If one really wanted though, it would be possible to design an engine such that each piece of cloth is simulated in its own space, described by its transformation matrix, instead of using it to transform the cloth vertices themselves. However, this would require to constantly convert values from one space to another when calculating stuff that involves other objects (collisions with rigidbodies or other cloth pieces, pinned vertices) or values described in world space (gravity, wind). Would also require you to define a separate transform for each and every pinned/fixed particle in the cloth. This is both extremely cumbersome from a workflow perspective and also very poor performance-wise. That's why you won't find a (good) cloth simulator designed this way. 

Let me know if you need help setting it up!

cheers!
Reply


Messages In This Thread
Scaling / Sizing a cloth - How? - by csofrany - 04-11-2017, 04:20 PM
RE: Scaling / Sizing a cloth - How? - by csofrany - 04-11-2017, 05:16 PM
RE: Scaling / Sizing a cloth - How? - by josemendez - 04-11-2017, 05:48 PM