#SurfaceTool.CreateFrom(ArrayMesh) ignores smoothing settings, is this a bug? Any workaround?

1 messages · Page 1 of 1 (latest)

shadow ember
#

This is my code:

//no effect
surfaceTool.SetSmoothGroup(uint.MaxValue);

surfaceTool.Begin(Mesh.PrimitiveType.Triangles);

//no effect either
surfaceTool.SetSmoothGroup(uint.MaxValue);

//doesnt work either:
//surfaceTool.AppendFrom(arrayPlane, 0, Transform3D.Identity);

surfaceTool.CreateFrom(arrayMesh, 0);
surfaceTool.GenerateNormals();
meager charm
#

I don't think smooth groups will apply when adding mesh data via CreateFrom, since CreateFrom just pulls the data straight up from another mesh as a direct copy, whereas SetSmoothGroup is used to flag smooth normals for the next vertex you add manually. So I think you'd have to basically add all the vertices from the other mesh one by one in a loop, calling SetSmoothGroup before adding each vertex to achieve this