Menu

#41 Possible issues with format of colour information in STL files

v1.0_(example)
open
nobody
None
1
2014-09-25
2014-09-25
Anonymous
No

Possible issues with format of colour information in STL files:

These observations are based upon file format description published at:
http://en.wikipedia.org/wiki/STL_(file_format)

If the Wikipedia article is accurate, then the format of the "Materialise Magics" encoding is not correct in the Save() template contained in export_stl.h

1) The "COLOR=" and "MATERIAL=" values do not contain an alpha value, only RGB is written. File parsers that process this will encounter a 'space' character and assign a value of 20 rather than 255 for opacity.

2) The default colour and material written is grey, but it would be best to set the specular material component to black, since this is more of a standard default value.

3) Bit 15 of the 'attribute byte count' should be flipped when 'magicsMode' is true.

Additionally, the ToUnsignedR5G5B5() and FromUnsignedR5G5B5() functions result in darkening the entire object due to truncation, since the maximum returned value from 'FromUnsignedR5G5B5()' is 248 instead of 255. It might be better to round values rather than truncate, which would preserve true white, and remove the bias towards darker colours. This is a matter of preference only.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB