16-08-2018, 03:15 PM
(This post was last modified: 16-08-2018, 03:35 PM by josemendez.)
(16-08-2018, 02:56 PM)ickydime Wrote: We may be using Obi Cloth in a way you never intended. At least I haven't seen any demos quite like this project. I'm hopeful you will still be up for looking into a few improvements for us (or pointing me in the right direction on how to fix it myself).
Attached is a quick screenshot of the project with a few issues circled.
On the right you will see a pattern template which we use to dynamically create cloth meshes.
We then stitch those meshes together to make an actual shirt/garment on a skinned mesh mannequin (shown on the left).
Here are the issues I am currently hitting:
- Green: Sometimes stitches are not kept directly on top of each other. They pull apart just slightly to show a seam. They also appear to flicker (jump between being in the correct place to being slightly apart). The flicker is especially true if I have multiple clothing pieces stitched to the same location but it also can happen when it is just a single stitch between two actors.
- Yellow: Stitched seams are very harsh. They do not bend like it is one seamless article of clothing and thus you get these sharp shadows along the seams.
- Black: This one is a bit trickier to describe but where the cloth comes up along the y axis on the hip it should actually be flat. I've attached a second capture image to give a closer look. That long rectangular cloth piece should run from the hip up the body and then down the arm. It connects the front of the shirt to the back of the shirt. Note that in the first screenshot the long rectangular pattern piece on the right is flat at the bottom. For some reason the piece is getting pulled up in the middle and there is a bunching or wrinkle on the side of the shirt.
- Red: Even when the mannequin's thickness is set to 0 the cloth appears to sit off of the mannequin by an inch. It just floats and it causes what should be a form fitting athletic shirt to look very puffy and bloated.
Any insights on how I could address any of these issues would be greatly appreciated.
Thanks!
Mark
Hi there,
Let me start with a mild warning: you're going to have a very hard time using Obi for this purpose, unless you have deep understanding of its inner machinery -and how cloth simulation in general works- and whether it is a good solution to your particular problem (which I think it is not).
- Green: Make sure the particles being stitched are set to the same phase. If they have different phases, and particle collisions are enabled, then collision and stitch constraints will fight each other causing the effect you describe.
- Yellow: This is because stitch constraints simply make sure the stitched particles share the same position, but they do not enforce any particular surface angle like bend constraints do. Imho using stitch constraints for this is not the way to go, as they're too simplistic for this use case. You should write your own class inheriting ObiActor, then generate particles and the constraint structure yourself, including bend constraints along the stitch edges.
- Black: Again, probably due to bend constraints. Could also be due to a combination of overly tight clothes/sequential distance constraints. Try looser clothing or switch to parallel mode + more solver substeps.
- Red: This is because of the particle radius, which is not zero by default. The gap between the cloth and the collider surface will be the sum of collider thickness and particle radius. Add a ObiParticleRenderer component to your cloth and you'll be able to visually debug the particle representation of the cloth:
http://obi.virtualmethodstudio.com/tutor...ering.html
You might need to adjust particle radii using the particle editor, or trough Obi's API:
http://obi.virtualmethodstudio.com/tutor...icles.html
Note that using a very low radii, or very low-resolution cloth, will result in z-fighting/penetration. You will need to find a sweet spot for both, which is the main reason I think a particle-based simulator is not the way to go for this. For this kind of task you should be using a continuum-based simulation method (FEM, strain-based dynamics, etc) and simplex-based collision detection (triangle vs triangle, instead of triangle vs point). Marvelous Designer comes to mind. These are *much* more performance hungry though, way under the realtime threshold.