Help Why do some meshes produce artifacts in distance fields? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help Why do some meshes produce artifacts in distance fields? (/thread-3375.html) |
Why do some meshes produce artifacts in distance fields? - locque - 24-03-2022 Some models always generate these artifacts in their distance field, and I don't understand why. I played around with the max error and depth parameters, but they never fully go away. I don't think the model is faulty either, it's fairly simple and I made sure that there are no holes, wrongly oriented faces or duplicate vertices in the mesh. This is what it looks like: https://imgur.com/a/3Y61QRY And here's a link to the model I used: https://skfb.ly/otJIJ RE: Why do some meshes produce artifacts in distance fields? - josemendez - 24-03-2022 Hi! The mesh is probably just too small/thin to reliably tell if a point in the sdf is inside or outside of it. This is exacerbated by creased edges, since they are physically different vertices in memory (with the same, or close to same position, but different normals) which can be interpreted as disjoint surfaces. Scaling your mesh x5 made the artifacts go away. Note that colliders using distance fields can be uniformly scaled just fine, so a workaround to this is to generate the distance field using a scaled up version of your mesh, and then scale its transform down on the scene. RE: Why do some meshes produce artifacts in distance fields? - locque - 24-03-2022 Thanks, the field looks fine now. Just removing the creased edges already made a huge differnence by itself, I'm saving backup versions of my models with simple geometry before detailing from now on to later generate distance fields from them. |