elm-obj-file icon indicating copy to clipboard operation
elm-obj-file copied to clipboard

Autogenerate normals

Open w0rm opened this issue 5 years ago • 0 comments

This can potentially happen under the hood for Obj.Decode.faces and Obj.Decode.texturedFaces. Right now they would fail if the normals are missing.

Not sure how big of a deal this actually is. One could potentially create an OBJ file that has all the normals in it. In Blender this is as easy as checking “Write Normals” when exporting a file.

If we decide to generate normals in elm-obj-file, we need to consider supporting smoothing groups too. This may increase computational complexity of the code quite a bit. So it might be worth benchmarking loading a file with normals in it and a file where the normals are autogenerated.

w0rm avatar Aug 03 '20 22:08 w0rm