Obi Official Forum

Full Version: What can I adjust to stop a cloth from doing through a collision mesh?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Im having a bit of trouble setting up a dress to fit on a model with obi cloth.

The dress keeps getting scrunched up as it is simulated onto the model.
[Image: o7TADi5]

Is there some settings I can adjust to fix this?
Sorry, im having trouble with linking images on the forum.

I tried having them on imager, but they don't seem to work on here.
(27-01-2022, 07:04 AM)MoonBoop Wrote: [ -> ]Sorry, im having trouble with linking images on the forum.

I tried having them on imager, but they don't seem to work on here.

Hi there!

The imgur URL you pasted is incorrect: it's a link to a imgur page, not an image (missing the file extension):

Quote:https://imgur.com/o7TADi5

This is the correct one:

Quote:https://i.imgur.com/o7TADi5.png

Which can then be embedded just fine:

[Image: o7TADi5.png]

Regarding your question, you gave zero details on what your setup looks like so I don't have much to work with Sonrisa:
- Which backend are you using?
- Is this skinned cloth or regular cloth?
- If regular cloth (that is, not relying on skin constraints but on regular collisions) is the character a MeshCollider, a DistanceField, or a combination of primitive colliders?
- Using regular or surface collisions?
- What are your solver/updater settings? (amount of collision iterations, amount of substeps, etc)

cheers!
(27-01-2022, 08:43 AM)josemendez Wrote: [ -> ]Hi there!

The imgur URL you pasted is incorrect: it's a link to a imgur page, not an image (missing the file extension):


This is the correct one:


Which can then be embedded just fine:

[Image: o7TADi5.png]

Regarding your question, you gave zero details on what your setup looks like so I don't have much to work with Sonrisa:
- Which backend are you using?
- Is this skinned cloth or regular cloth?
- If regular cloth (that is, not relying on skin constraints but on regular collisions) is the character a MeshCollider, a DistanceField, or a combination of primitive colliders?
- Using regular or surface collisions?
- What are your solver/updater settings? (amount of collision iterations, amount of substeps, etc)

cheers!
thank you for replying.

and sorry, Im quite new to obi cloth and not sure on a lot of aspects of it so I wasn't sure what to include.
I based a lot of this off of the demo Rigidbody scene I saw included.
  • Im using the burst backend for obi cloth
  • regular cloth. I may have to move to a skinned mesh later on, but for now I just need to get the base generation process working.
  • The character has a mesh collider with an obi cloth collider attached to it
  • That part im not sure about.
  • im using one solver with 1 sub step. I found adding more subsets made the cloth behave less predictably.
Any help would be much appreciated.
(27-01-2022, 11:50 AM)MoonBoop Wrote: [ -> ][*]Im using the burst backend for obi cloth
[*]regular cloth. I may have to move to a skinned mesh later on, but for now I just need to get the base generation process working.
[*]The character has a mesh collider with an obi cloth collider attached to it

Based on these answers I assume you're not going for realtime character cloth, but for an off-line virtual try-on type of application. Correct? If so, MeshColliders have many disadvantages when it comes to representing an avatar body: they're "hollow" (only the surface can generate collisions, so once an object gets inside of them it cannot get outside) and they're considerably costly.

If you don't need the avatar to use skeletal animation, Distance fields are almost always a better alternative to MeshColliders: much more robust and cheap. See:
http://obi.virtualmethodstudio.com/manua...ields.html

If you do need skeletal animation, approximate the character's body using primitive colliders instead.


(27-01-2022, 11:50 AM)MoonBoop Wrote: [ -> ][*]That part im not sure about.

If unsure you're probably using regular collisions. Surface collisions can be used by enabling the "surface collisions" checkbox in the cloth. See:
http://obi.virtualmethodstudio.com/manua...sions.html



(27-01-2022, 11:50 AM)MoonBoop Wrote: [ -> ][*]im using one solver with 1 sub step. I found adding more subsets made the cloth behave less predictably.

Substeps largely determine simulation quality. 1 substep will yield very poor simulation quality. If the cloth behaves less predictably with more substeps, it only means there's issues that become more obvious when increasing the accuracy of the simulation.

Try using at least 4 substeps, avoid MeshColliders (specially concave ones), and use surface collisions if possible.

kind regards,
Note that if you're going for regular, game character cloth (and not a virtual try on sim where you can dress a character, bake the simulation, etc) this is not the correct approach. You must use skinned cloth instead.

The reason is that character cloth in games does not rely on collision detection to stay on the character body. This is both impractical and slow. Skin constraints are used instead: these constrain the cloth to the character's animation, so that no/very little collision detection is needed for robust results. Note this is how all game cloth simulators work (Havok, PhysX, nvCloth, etc), not just Obi. Sometimes they give skin constraints a different name (backstop constraints, radius constraints, etc).

This video might help:


Regular cloth is used when you don't have a skeletal animation to constrain it to. This can be used for bags, flags, blankets, curtains, simple capes, etc.
Thank you! This has helped out a lot.

I have tried now implementing distance fields in with 4 sub steps and surface collisions. And the cloth isn’t as buggy now, but unity now crashes from bad memory errors within a second of simulation.
So I think the surface collision might be a bit too much?
I turned off surface collisions and it is much more stable now.

The main problem now is that the cloth is being thrown off of the model when it gets stitched.
(28-01-2022, 04:39 AM)MoonBoop Wrote: [ -> ]The main problem now is that the cloth is being thrown off of the model when it gets stitched.

Can you elaborate? How are you stitching the cloth, and what do you mean by "thrown off"?
I'm using the obi cloth stitcher to stitch together parts of a garment to form a complete garment.
Ive got the pieces being stitched together currently by giving the stitcher vertices that are known to be on stitch points for the garment.
I believe the stitching it working properly.

It might be easier to show you the flying off behaviour.

garment flying off gif

(I tried the extension for .gif, but it didn't work)

in short, when a garment is stitched together, what happens is that it will fly off of the model below it.
Pages: 1 2 3