I just discovered an issue which is very annoying in my project.
When creating an extrusion using “MeshBuilder.ExtrudeShape”, the ‘shape’ input cannot be closed. As consequences of this, when the first and the last coordinates of the ‘shape’ parameter are equal, the normals are not smooth causing an ugly light discontinuity, and the first and last vertices are duplicated.
I think a parameter like ‘close=false’ is missing.
Maybe I missed a workaround? I tried several things, for example to remove duplicate vertices (“mesh.forceSharedVertices()”) but then the caps normals are broken.
I confirm CreateTubes is working as-is as I expect, i.e. without the discontinuity. This is definitively a perfect workaround for my issue, I will go forward with this solution. https://playground.babylonjs.com/#MR8LEL#730
It’s certainly possible to achieve the same result using ribbons too. The closeArray/Path parameters is exactly what I would wait in the extrusion primitive. I didn’t test them because reproducing the same shape would be time consuming because of the underlying trigonometry.
Thank you a lot, these 2 workarounds are exactly what I was looking for.
I still think a closeShape flag is missing in the extrusion primitive, but it’s much less important to me now