Hi guys.
This is probably a very common problem, but I can't find any useful resource on the web
![:/ :/](https://polycount.com/plugins/emojiextender/emoji/twitter/confused.png)
I'm building a script that check the visibility of all the faces of a model from a certain camera angle and deletes them if needed. In this case 'visibility' is just testing if the face is 'facing' the camera, not an actual raycasting trough the scene so it should be pretty simple...
The thing is: you can display the face's normal using the custom polygon display, but I can't find a way to get it in script. All I can do is polyNormalPerVertex(), which only outputs the VERTEX normal, as you would guess from its name.
'Simple!' you say. I just need to get the vertices from the face and average their normals BUT that function gives me all the normals from that vertex (there's multiple normals if the vertex is on an hardedge), not only the normal from the face I'm dealing with. I have no idea how to differentiate all the normals queried by the function.
Maybe I'm just taking the complicated path because I don't know anything about the API
![:) :)](https://polycount.com/plugins/emojiextender/emoji/twitter/smile.png)
Any idea?
Replies
thx
http://download.autodesk.com/us/maya/2011help/Commands/polyInfo.html
Had no idea, found it with Maya help and skimming through long list of search results :P
EDIT: Seems to be available as a Python command as well btw.
Also, depending what you're aiming at, you'll have trouble to get the normal you're interested in for non planar n-gons (4+ edges).
I can dig up some stuff from scripts I've made if you want to do it the hard way if you're interested.