<p>I'm not familiar with the exact nuances of the STL format, but here are some answers on general computer graphics principles:</p>
<blockquote>
<p>In the source file, the Vertex Normals are specified and in the destination, the face normal of the triangles are present which are different than the normals one would get by (a-b) x (a-c), where a, b, c are the vertex coordinates and x is the cross product. How one would compute the face normal in the presence of vertex normals?</p>
</blockquote>
<p>There is no general method to convert vertex normals to face normals. Vertex normals (that are not all equal) can express the normals <em>of a curved surface</em>, which face normals cannot. Thus, converting to a format with only a normal vector per face, rather than per triangle vertex, is a <em>lossy</em> process — some information was discarded. The converter must make a compromise.</p>
<p>That said, from some quick research, it seems that the intent of the STL file format is that the normal <em>is</em> the normal perpendicular to the triangle (that can be computed as you specified), not a chosen vector, even though that makes it redundant. So perhaps your converter is wrong (though I can't say much as you didn't say <em>how</em> it was different).</p>
<blockquote>
<p>Also, I am given to understand that STL format has a positive octant rule which requires all vertex coordinates to be positive. When the OBJ file has negative vertex coordinates, what should be done in the conversion process?</p>
</blockquote>
<p>The only option is to choose some offset by which to translate all of the vertices so that they are positive. This also loses some information — what the origin of the original model was. That's easier to recover if needed, though, since it's just a 3D vector that you could translate back by when loading the model.</p>

CC BY-SA 4.0
2020-11-17T23:31:19.647Z
2020-11-17T23:31:19.647Z
Kevin Reid
<p>Using Open 3D Model Viewer, I have converted an OBJ file to an STL file.
In the source file, the Vertex Normals are specified and in the destination, the face normal of the triangles are present which are different than the normals one would get by (a-b) x (a-c), where a, b, c are the vertex coordinates and x is the cross product. How one would compute the face normal in the presence of vertex normals?</p>
<p>Also, I am given to understand that STL format has a positive octant rule which requires all vertex coordinates to be positive. When the OBJ file has negative vertex coordinates, what should be done in the conversion process?</p>

<3d><geometry><mesh><model>
Vertices, Vertex Normals and Face Normals
Vectorizer
# Vertices, Vertex Normals and Face Normals

(Asked by: username_0 on 2020-10-14)

Using Open 3D Model Viewer, I have converted an OBJ file to an STL file.
In the source file, the Vertex Normals are specified and in the destination, the face normal of the triangles are present which are different than the normals one would get by (a-b) x (a-c), where a, b, c are the vertex coordinates and x is the cross product. How one would compute the face normal in the presence of vertex normals?

Also, I am given to understand that STL format has a positive octant rule which requires all vertex coordinates to be positive. When the OBJ file has negative vertex coordinates, what should be done in the conversion process?

**Tags:** 3d, geometry, mesh, model


---

## 1 answers

### Answer by username_1 on 2020-11-17. Score: 1

I'm not familiar with the exact nuances of the STL format, but here are some answers on general computer graphics principles:

> In the source file, the Vertex Normals are specified and in the destination, the face normal of the triangles are present which are different than the normals one would get by (a-b) x (a-c), where a, b, c are the vertex coordinates and x is the cross product. How one would compute the face normal in the presence of vertex normals?

There is no general method to convert vertex normals to face normals. Vertex normals (that are not all equal) can express the normals *of a curved surface*, which face normals cannot. Thus, converting to a format with only a normal vector per face, rather than per triangle vertex, is a *lossy* process — some information was discarded. The converter must make a compromise.

That said, from some quick research, it seems that the intent of the STL file format is that the normal *is* the normal perpendicular to the triangle (that can be computed as you specified), not a chosen vector, even though that makes it redundant. So perhaps your converter is wrong (though I can't say much as you didn't say *how* it was different).

> Also, I am given to understand that STL format has a positive octant rule which requires all vertex coordinates to be positive. When the OBJ file has negative vertex coordinates, what should be done in the conversion process?

The only option is to choose some offset by which to translate all of the vertices so that they are positive. This also loses some information — what the origin of the original model was. That's easier to recover if needed, though, since it's just a 3D vector that you could translate back by when loading the model.


---

