Getting the normals of selected objects conform, as in get them to all have a common direction?

I am finding myself with models consisting of multiple objects, and the objects for one reason or another, have disparate face normal directions.
For example, this car model, the normals for the tire, rims, doors, etc etc, are not conforming, thus some of the objects are black, and others are shaded.

Since the car consists of multiple objects, I am need of a convenient method to get the normals of selected objects to all conform, ideally in one operation.

I was hoping conform (mesh display) would help here, but my tests tell me this command only works with each objects components, not cross objects.

If Maya does not have a native soltion here, I would love to know of third party solutions, even paid-for. Thanks.

You can do it in Bifrost procedurally

Given your post, I’m guessing you think conforming is something along the lines of “Make the normals point the correct direction”. But I don’t think that’s what it does. I’m pretty sure It’s more like “make sure the normals of each face don’t point the opposite direction of any of that face’s neighboring normals”. (So you couldn’t conform a Mobius strip)

From the maya documentation:
Unifies the direction of the surface normals for a selected polygon mesh. The resulting direction of the surface normals will be based on the direction that is shared by the majority of the faces on the mesh.

What conforming wouldn’t do (using my interpretation) is make the normals face toward camera. It only makes them face the “same way”. And that way could be away from the camera. Also, since my definition is taking into account neighboring faces, then individual islands of connected faces won’t necessarily point the same direction.

So, to me, it looks like all of your meshes are conformed. Its just that some of the islands need reversed. But, of course, I can’t see how that mesh is actually structured just from that picture.

As long as all of the meshes are airtight, then I’ve got an outline for a script that should correctly flip the normals.

# THIS IS AN OUTLINE!!!
# THIS IS NOT REAL CODE!!!

cameraPos = getPositionOf(camera)
for mesh in meshes:
    for island in getIslands(mesh):
        closestPoint = getClosestPointOnMesh(cameraPos, island)
        closestFace = getFaceOfPoint(closestPoint)
        vectorToCam = closestPoint - cameraPos
        faceNormal = getNormal(closestFace)
        if dotProduct(vectorToCam, faceNormal) < 0:
            reverseNormals(island)
2 Likes

posted the model if you can.

Thank you for that breakdown, I understand what am facing a lot better now. I will follow the outline of your code and see what I end up with, am pretty confident I can wing it from there.