29-11-2024, 05:43 AM
I recently updated the version of Obi Cloth from 6.5.4 to 7.0.3. I checked some of the differences between Obi Cloth 7.X and 6.X:
https://obi.virtualmethodstudio.com/manu...ading.html
One thing mentioned is that “…blueprints may now decimate/simplify the input mesh and generate particles at positions other than the cloth vertices…”. This would result in a discrepancy between the vertices in the mesh and the particles in the cloth.
We currently have some code that procedurally generates cloth shapes, then procedurally stitches them together at certain edges. Upon further inspection, I found that the particle index list used for stitching is calculated based off the mesh’s vertex indices, rather than calculating them after the particles are generated.
This method was fine with the previous version of the package, as the vertices and particles would always match up 1:1. But now they don’t, so this sometimes causes the cloth to glitch out violently when the procedural stitching code is run.
With this new system, how can I find the cloth particles that correspond with a given set of mesh vertices, or vice versa, so I can accurately determine at runtime what particles need to be stitched together?
Or will I have to recalculate whatever criteria is used to obtain the correct vertices, but on the particles instead after they’ve been generated?
Thanks!
https://obi.virtualmethodstudio.com/manu...ading.html
One thing mentioned is that “…blueprints may now decimate/simplify the input mesh and generate particles at positions other than the cloth vertices…”. This would result in a discrepancy between the vertices in the mesh and the particles in the cloth.
We currently have some code that procedurally generates cloth shapes, then procedurally stitches them together at certain edges. Upon further inspection, I found that the particle index list used for stitching is calculated based off the mesh’s vertex indices, rather than calculating them after the particles are generated.
This method was fine with the previous version of the package, as the vertices and particles would always match up 1:1. But now they don’t, so this sometimes causes the cloth to glitch out violently when the procedural stitching code is run.
With this new system, how can I find the cloth particles that correspond with a given set of mesh vertices, or vice versa, so I can accurately determine at runtime what particles need to be stitched together?
Or will I have to recalculate whatever criteria is used to obtain the correct vertices, but on the particles instead after they’ve been generated?
Thanks!