-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEXMAP images with alpha trasparency error #57
Comments
This is a known defect due to the physical materials using the standard materials from three.js. See end of LDRColorMaterials.js if(!texmap) { The problem is that the color of a material blends together with the texture when using the standard materials. The "quick draw" materials I have made for instructions are completely controlled by builinstructions.js, which is why the issue does not appear there. Should we raise this as an issue with the three.js project? |
It's up to you to report or not since you're the technical expert and can explain what is happening better than I can. |
@Mugen87 is one of the core authors of three.js, and the color mixing is unfortunately intended without the option to turn it off. Adding a check for "inside a texture" as our custom LDraw shaders have, would result in a performance degradation in rendering, so I doubt we will see success in getting three.js core changed. However. We could branch our own version with this feature. The downside is then that the branch has to be maintained by us. |
"Rolling our own" Three.js is prolly a bad idea for a number of reasons. I'm willing to live with this quirk as long as you are since LDraw.org doesn't really use physical color rendering in any meaningful way. |
I'm still not happy with that. Let me see if I can "hack" the shader generator in any way. |
Parts the have TEXMAPs with alpha transparency do not render correctly in physical color mode. The geometry covered by the TEXMAP renders transparent.
To Reproduce
I used: '1 0 0 0 0 1 0 0 0 1 0 0 0 1 2454aps5.dat.
Note: Only the unofficial version of 2454aps5 uses a TEXMAP image
Screenshots
Go to https://www.ldraw.org/cgi-bin/ptdetail.cgi?f=parts/2454aps5.dat to see the rendering in action. To turn on physical render mode, click the button with the "eye" icon.
The text was updated successfully, but these errors were encountered: