Page MenuHome

OBJ exports arbitrary number of normals
Closed, ArchivedPublic

Description

System Information
Mac OS X 10.11.4, Intel Iris 5100

Blender Version
Broken: 2.77 22a2853 (also at least on 2.75a)

Short description of error
Basic (default) sphere exported as OBJ has arbitrary number of exported normals, depending on the object's translation in the Blender editor.

Exact steps for others to reproduce the error
In default scene (fresh install), add a UV sphere. It should be centered at (0, 0, 0) and (default) flat shaded. Select sphere, and export as OBJ, being sure to check "Selection only," "Write Normals," "Triangulate Faces" (all other options default). Count the number of lines in the exported OBJ file (I used a text editor with line numbers, showing 1985 lines). Now, in Blender, move the sphere to an arbitrary location; I chose (1, -3, 0). Perform the same export process, and count the number of lines. (I get 2014 lines.) After careful study and programmatic parsing, it seems the only difference is the number of normals included in the file.

Event Timeline

Michael Baxter (noalias) raised the priority of this task from to 90.
Michael Baxter (noalias) updated the task description. (Show Details)
Michael Baxter (noalias) edited a custom field.
Bastien Montagne (mont29) changed the task status from Unknown Status to Archived.Apr 5 2016, 10:48 AM
Bastien Montagne (mont29) claimed this task.

Thanks for the report, but no bug here. OBJ is a text file, which stores float numbers with six digits precision - and can reuse same value (e.g. normal vector) several times if possible. You are merely experiencing floating point imprecision - matrix multiplication to get world values of mesh items does introduce some tiny imprecision which leads to varying number of 'equal' or 'not equal' normals in result, hence the different number of lines…

Ah, I see, thanks for the explanation!