Vertex Normals different from loop normals I'm writing a model exporter in Blender 2.77 and except from triangles and vertex positions, I also want their normals and tangents.

As an example, I'm using a simple cube centered at the Origin (0,0,0).

I found out that Blender can calculate normals and tangents using the following commands:

data=C.object.data
data.calc_normals();
data.calc_tangents("UVMap");


So after that for testing purposes I'm executing the following code

data.calc_tessface();
for f in data.tessfaces:  # indices
    polygon = data.polygons[f.index] #Load Polygon

    for vert in range(len(f.vertices)):
        norm = data.vertices[f.vertices[vert]].normal
        norm1 = data.loops[polygon.vertices[vert]].normal
        print(norm, norm1)


I know that the order of the output vertices won't be correct when iterating in the  tessfaces and the polygon structs. My problem is that the output looks like this:

&lt;Vector (-0.5773, 0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, 0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, 0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (-0.5773, 0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, 0.5773, -0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, -0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, -0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (0.5773, 0.5773, 0.5773)&gt; &lt;Vector (0.0000, 1.0000, 0.0000)&gt;
&lt;Vector (-0.5773, 0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;
&lt;Vector (-0.5773, -0.5773, 0.5773)&gt; &lt;Vector (-1.0000, 0.0000, 0.0000)&gt;


Am I missing some other data operator that will update the normals? Why are the loop normals not equal to the vertices normals?
I never used tessface logic, but I can tell that you are using the wrong index in data.loops[] : each polygon has a loop_begin and a loop_end variable, and each loop with index in [loop_begin; loop_end[ belongs to that face, and is associated with a vertex, which have loop.vertex_index as index.
that means that there are WAY more loops than vertices.

also, it seems that you are using flat shading. in that case, loop normals  are the same that their faces' normals, and (I am not sure about that last bit) vertex normals are interpolated between face normals, and will be used for smooth shading