Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What can I adjust to stop a cloth from doing through a collision mesh?
#15
Quote:On a side note: the stitching code you shared doesn't help much, since the important implementation bits are left out. For instance, how's VerticesOnCurve() implemented? What's stitches[0][i] and stitches[1][i]?


Yea, it wasn't a great example that code for how it works, but its kind of tricky to share too much since it is for a project that is apart of an NDA, but we're getting too pressed for time.

What I can give though is the mesh generated to be used for stitching to create a garment has all of its vertices stored within a custom vertex class to hold more information about which vertices should be stitched as it can store if a vertex is on a curve and what order to stitch that vertex in.

I should add, that the mesh generation process works by creating a mesh from a 2D cubic spline

This stitched value is based on if the vertices are on the curves that represent the garment if they are stitched.


Quote:Try visually debugging this: stitch the cloth without using any avatar mesh, see if it stitches correctly. Add a proper material to it so that you can actually see the cloth instead of a pink blob.


I'll add in a proper double sided material to start checking the garment properly. I have added it in a few times, but I haven't used a good material yet for it.


Quote:Note that in the general case, vertex != particle. You can't use mesh vertex indices as particle indices, since vertices are welded together before creating particles. This is specially important if your mesh contains texture or normal seams.

Take a look at the "RuntimeCloth" sample scene: it creates a basic garment and stitches it together, all at runtime.


I'll review the runtime scene again and have a look at the mesh generation. While I followed the cloth segment of the example, I didn't follow the mesh generation part
Reply


Messages In This Thread
RE: What can I adjust to stop a cloth from doing through a collision mesh? - by MoonBoop - 31-01-2022, 11:06 PM