Notifications
Clear all

[Closed] Smooth changes depending on Mesh/Poly ?

I’ve coded my own primitive and I set the normals with

MeshNormalSpec *normalSpec = mesh.GetSpecifiedNormals();
normalSpec->SetNumNormals(numverts);
normalSpec->SetNumFaces(numfaces);
normalSpec->ResetNormals(false);
...
normalSpec->Normal(v) = Point3(x,y,z);
normalSpec->SetNormalExplicit(v, true);
...
mesh.faces[mfaceindex].setSmGroup(1);
normalSpec->Face(mfaceindex).SetNormalID(0, v0);
normalSpec->Face(mfaceindex).SetNormalID(1, v1);
normalSpec->Face(mfaceindex).SetNormalID(2, v2);
...

And if I transform it to Edit Mesh it looks exactly as it looks in the viewport, but transforming it to Edit Poly it changes its smoothing (according to the smoothing group) if I remove the code

mesh.faces[mfaceindex].setSmGroup(1);

When I transform it to Edit Poly it just looks faceted.

Any idea about this?