30-04-2026, 05:54 AM
Hi,
We have a system that procedurally generates cloth garments, then generates blueprints and simulates them on a virtual mannequin. One issue we’ve noticed with one of our garments is strange, dark artifacting on the bust and one of the thighs, that isn’t present on the regular mesh but appears once simulation starts. The artifacting shifts and changes when the garment is dragged (using ObiParticlePicker), which suggests it has something to do with the cloth particles’ positions and normals. The dark spots must be the shader's lighting rendering those section as in shadow.
Pictures (I can't show too much because of NDAs)
The first two are the problem areas, the second two are the same areas with ObiSkinnedClothRenderer disabled: (so rendering the unsimulated mesh using SkinnedMeshRenderer).
My theory was that the particles might be too constrained and forced to bunch up in unnatural ways, but I tried increasing the skin radius and that didn’t help (it just made the rest of the garment fall away too much). I'm not sure what else could be doing it that's specifically because of the cloth simulation. If it was because of the normals not being calculated properly, I imagine the artifacts would appear even without simulation. Any idea of what could be doing this? I tried searching but wasn't sure how to articulate the question.
Additional details:
We have a system that procedurally generates cloth garments, then generates blueprints and simulates them on a virtual mannequin. One issue we’ve noticed with one of our garments is strange, dark artifacting on the bust and one of the thighs, that isn’t present on the regular mesh but appears once simulation starts. The artifacting shifts and changes when the garment is dragged (using ObiParticlePicker), which suggests it has something to do with the cloth particles’ positions and normals. The dark spots must be the shader's lighting rendering those section as in shadow.
Pictures (I can't show too much because of NDAs)
The first two are the problem areas, the second two are the same areas with ObiSkinnedClothRenderer disabled: (so rendering the unsimulated mesh using SkinnedMeshRenderer).
My theory was that the particles might be too constrained and forced to bunch up in unnatural ways, but I tried increasing the skin radius and that didn’t help (it just made the rest of the garment fall away too much). I'm not sure what else could be doing it that's specifically because of the cloth simulation. If it was because of the normals not being calculated properly, I imagine the artifacts would appear even without simulation. Any idea of what could be doing this? I tried searching but wasn't sure how to articulate the question.
Additional details:
- Obi Cloth 7.0.3, in Unity 2022.3.62f3
- The material’s shader uses custom code to calculate the texture, but the lighting data is default for Unity’s URP so that shouldn't be causing any weird lighting behaviour. The artifacts also occur when using the completely standard URP Lit shader, and don't appear when rendering with a shader that doesn't have any lighting code.
- I also made a slight modification to ObiSkinnedClothBlueprint.CommitBlueprintChanges(). It ran the base function followed by an override that’s basically identical except for one different value (CreateDefaultSkinmap's 'mapBonesToParticles' bool being true instead of false), resulting in severe lag spikes when generating complex garment shapes. I modified the ObiClothBlueprint’s base function to replace the one boolean with a reference to a property that’s overridden in ObiSkinnedClothBlueprint, and deleted the override. This seems to perform the same functions with considerably better performance, but could this change be affecting the normals in some way?

