Notifications
Clear all

[Closed] GetNormal() what with shared verts?

I creating mesh export for game.
File format needs all data such as UV map coords and normals be defined peer every mesh vertice.

I have problem with normals. GetNormal function returns point3, that represents single normal.
But if you have shape as below, and every face has different smooth group, then center shared vertice seams to has five normals (show normal option will draw five normal lines).

How it works? Is there independend normals array like for map coords?
I can’t figure you how to get normal associated to face’s vertice.

2 Replies

getNormal returns a single normal and as far as i know there is nothing to get a independent normals array like for map coords. You could easly solve this by splitting the mesh according to smoothing groups and get the normals. so for the above shape you will get 5 verts with 5 normals and this is what game engines usually do.

if you don’t want to calculate the normals yourself you can add Edit Normals modifier and get vertex normals using its data.