-
Notifications
You must be signed in to change notification settings - Fork 826
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
Strange display of roughness in model-viewer #3145
Comments
I can't repro; can you please fill in all the details of the device/OS/browser versions you're using to test? This has the look of a GPU driver bug. |
@FelipeR2U Can I assume this is a Windows machine? @mrdoob This looks like a regression somewhere in the last few versions for three.js. This noise looks very much like a driver bug to me (especially since it doesn't repro on Mac or mobile), but I guess we must have triggered it somehow? Have you seen any similar issues in the three.js repo? I didn't even notice the difference at first on FelipeR2U's screenshots, but there is a band of gray noise going up the middle of the sleeve. Way worse up on the bottles. |
I suspect it is related to the |
Hmm, so maybe a HalfFloat bug on some Windows GPU driver? Ugh. Any chance you could get kbr to take a look? |
/ping @kenrussell |
I can't reproduce on an NVIDIA Quadro K2200. about:gpu from Chrome on this system: Please gather about:gpu from an affected system and link to it here; we'll file a bug on the Chromium issue tracker to investigate in more detail. Please provide clear and concise reproduction steps. I went to https://modelviewer.dev/editor/ , and selected the "Water Bottles" model. If that page is likely to evolve then please provide a stable reproduction somewhere. Thanks. |
@superLeaAtWork @FelipeR2U Can you share screenshots of these two examples? https://modelviewer.dev/examples/lightingandenv/#renderExposure |
Note: still unable to reproduce the failure after upgrading to the latest supported feature driver for this GPU, 496.49. It's likely specific to the GPU family. These kinds of twinkling artifacts look to me like undefined behavior in GLSL like calling pow() with a negative exponent. Could this be investigated with an eye toward that in the associated shaders? |
Hello, I tested it on 3 different windows machines. I tested in on chrome (Version 97.0.4692.99 (Offizieller Build) (64-Bit)) and fireforx (96.0.2 (64-Bit)). The other machines have a different setup. But always windows PC. |
Graphics Feature Status
Driver Bug Workarounds
Problems Detected
ANGLE Features
DAWN Info
<Discrete GPU> D3D12 backend - NVIDIA GeForce RTX 2070 [Default Toggle Names] <CPU> D3D12 backend - Microsoft Basic Render Driver [Default Toggle Names] <Discrete GPU> Vulkan backend - NVIDIA GeForce RTX 2070 [Default Toggle Names] Version Information
Log Messages
|
Many many thanks! That really helps to figure out where the issue may be. Could you also share a screen recording of the changeMaterial example moving the roughness slider from 0 to 1 and back? |
Desktop.2022.01.26.-.14.46.02.01_Trim.mp4 |
@FelipeR2U Very helpful! Thanks! |
@superLeaAtWork @FelipeR2U So @elalish is wondering if this could be a bug with half-float on these GPUs. I've prepared a couple of links to try: https://mrdoob-sandbox.glitch.me/pmrem-float.html Do you mind sharing screenshots of both? |
Thanks @FelipeR2U 🙏 @elalish anything else you can think of? |
@mrdoob I have the same result as @FelipeR2U :) Maybe the information helps you, that it still worked 1-2 weeks ago! |
@mrdoob @elalish a couple of thoughts:
|
@kenrussell It's actually a custom 2D texture that is acting as a cubemap (needed custom mipmap sizes). So it sort of looks like a rounding or interpolation error of some kind. The relevent shader chunk is here: https://github.com/mrdoob/three.js/blob/2768965fb58e482e80f78ac95d3d4afcc8ebd895/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js |
Hello, maybe the information helps you that the wrong appearance only happens when viewing the models in the model-viewer editor.https://modelviewer.dev/editor/ When we integrate the model-viewer into our website and load the same model there, the model appears correct. Best regards. |
@superLeaAtWork Which version of model-viewer are you integrating with? @FelipeR2U said the break occurred between v1.9 and v1.10. Is that your experience too? |
Thanks for the information regarding how the cube maps are packed into the texture. I'm still wondering whether the contents of that custom 2D texture are corrupted, or whether the shader that samples them is producing incorrect answers at what would otherwise be cube map seams. Is there any way to get answers to these questions in conjunction with someone who can reproduce the problem? |
Yes we do: |
@FelipeR2U the |
@aleino-nv per https://twitter.com/PavelBoytchev/status/1492224108318318593 it seems this behavior is triggered when enabling "max anisotropy" in NVIDIA's control panel settings. Does that override any setting of TEXTURE_MAX_ANISOTROPY_EXT by the application (the browser in this case)? |
@superLeaAtWork @FelipeR2U Have you changed these settings in your graphics card? If so, try changing it to "Let the 3D application decide". |
Hello, changing the NVIDIA settings did not change anything: Furthermore, I did not change anything in my graphics card settings. How do I see which version I integrate into the code? Regards, |
@superLeaAtWork Thanks for testing that 🙏 One more test, can you share a screenshot of how this test looks like in your system? |
@mrdoob your welcome! This time I do not see any strange lines. |
Excellent! Thanks! |
I'll call this fixed, since the fix is merged upstream in three.js and we'll get it when we pull the next version. |
Hello, excellent. Can you just explain the bug in 2 sentences? I'm just curious! :) Best regards, |
Well, the short answer is it's a driver bug we don't understand (and even if we did, it would take a long time to get fixed). It has something to do with anisotropy, float textures, and linear filtering. @mrdoob got around it by setting the minFilter on this texture to Nearest from Linear (which doesn't appear to change the rendered result for working devices). This kind of ridiculous GPU driver workaround is exactly what makes three.js such a valuable project! |
We recently simplified the internal code that produces the image based lighting and we got a few reports from people with nvidia cards seeing these lines. Turns out the reason these lines appear is because the nvidia settings panel allow the user to override a setting in the code that produces the lighting. |
Description
I viewed a model in the model-viewer editor: https://modelviewer.dev/editor/
The model has a not so rough surface. The surface appeared very pixelated and somehow broken. When I removed the roughness texture in the viewer, the model appears correct. The I tried a model that worked before - and also this model is broken now.
When I select a predefined model like the water bottles model - all parts appear also broken. See the example images below.
Live Demo
https://glitch.com/edit/#!/model-viewer
Version
Browser Affected
Chrome
AR
The text was updated successfully, but these errors were encountered: