You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create any model in (for example) blender
2. Save as (binary) STL
3. View in jsc3d
What is the expected output? What do you see instead?
The object should be flat shaded - it's actually black.
What version of the product are you using? On what operating system?
Any version on any OS.
Please provide any additional information below.
The problem is that some STL exporters do not create normal vectors for each
triangle - the standard (at least according to the Wikipedia page for the STL
file format) is that the loader should test for zero length normals and compute
it's own normal from the vertex coordinates of the triangle. Worse still, the
renderer uses the normal vector to do backface culling (which is pretty
unconventional - most renderers use the vertex ordering to determine that).
Original issue reported on code.google.com by SteveBak...@gmail.com on 19 Jul 2013 at 7:18
The text was updated successfully, but these errors were encountered:
Thanks for the swift response!
To be completely clear, I only tested the problem with binary STL files from
blender - but from a quick look at the code, I believe that ASCII STL's must
have the same problem.
STL's are frequently used for controlling machine tools like 3D printers and
CNC milling machines that don't care about surface normals, colors or anything
else other than the triangle vertices - so it's fairly common for STL exporters
to fail to write the normal vector and for STL importers to recreate them from
the triangle edges.
The STL file format *really* sucks - it's horrifying that it ever became such a
ubiquitous standard for machine tools!
Original comment by SteveBak...@gmail.com on 20 Jul 2013 at 1:20
Thanks for the detailed explanation!
This bug has fixed by checking some normals loaded from an STL file. If the
normal length equals to 0, the face normal buffer will be set to null so that
they can be automatically calculated when mesh is initialized.
I'll commit the patch to the respository soon.
Original comment by Humu2...@gmail.com on 21 Jul 2013 at 6:10
Original issue reported on code.google.com by
SteveBak...@gmail.com
on 19 Jul 2013 at 7:18The text was updated successfully, but these errors were encountered: