tcobbs / ldview

Real-time 3D viewer for displaying LDraw models
https://tcobbs.github.io/ldview/
GNU General Public License v2.0
87 stars 17 forks source link

Material properties seem to be applied to non-colour-16 parts in a type-1 line #63

Closed alex-taylor closed 2 years ago

alex-taylor commented 2 years ago

Title's probably not too clear, sorry. I've tested with LDView 4.4.1 on Win64.

The issue can be seen if you load the following code:

0 FILE main.ldr 1 60 0 0 0 1 0 0 0 1 0 0 0 1 subModel-1.ldr 0 FILE subModel-1.ldr 1 0 0 0 0 1 0 0 0 1 0 0 0 1 22969a.dat

LDView should be configured with specular highlighting enabled.

The submodel contains a single part in black. The main model contains a reference to the submodel with a metallic colour selected. Obviously this should have no effect, since there are no colour-16 parts in the submodel. But while the colour of the submodel is unaffected, the material properties of the metallic colour are apparently applied to the render, and it displays with metallic specular highlighting...

sample1

tcobbs commented 2 years ago

Thanks for the report. I tracked down the source of the problem and committed a fix: https://github.com/tcobbs/ldview/commit/c134e40a6d9ebb392d9b3fe3d4e2984cbc9e201c

This fix will be in the next release.