fstl-app / fstl

A fast STL file viewer
463 stars 106 forks source link

Support Colored (Non-Standard) STL Files #87

Open X-DE1 opened 2 years ago

X-DE1 commented 2 years ago

I loaded this model with color and it appears without color. SharedScreenshot I opened it at https://www.viewstl.com/ and it comes out with color. SharedScreenshot

DeveloperPaul123 commented 2 years ago

Can you post the model as well?

DeveloperPaul123 commented 2 years ago

Looks like color is not standardized for the STL file format, so I'm not sure if it makes sense to add that ability to fstl.

X-DE1 commented 2 years ago

Here is the model. https://www.thingiverse.com/thing:5461514

sur5r commented 2 years ago

Hm, extracting the color is not hard, it would "just" require another menu option as the both possible formats are BGR vs. RGB. I'm not familiar with the shader code, but I guess https://github.com/fstl-app/fstl/blob/62213416e9f4a860bbaee47e5333476fa5af6eda/gl/mesh.frag#L19 would be the place to change. I don't understand the maths yet, though.

pozdnov commented 1 year ago

I also need this feature and vote for it to be implemented.