-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Textures appear black and reflections are off on scenes with reflection probes #5570
Comments
Thanks for the problem report. Probably it was broken by the recent Three.js upgrade #5488. Let me investigate... |
Scenes with only an env map and no reflection probes don't seem to have this problem: https://hubs.mozilla.com/scenes/HsSRCtj/merry-go |
Yes, light probe is suspicious. And I noticed that commenting this line out makes the objects non-black https://github.com/mozilla/hubs/blob/d815053b1938068d54fda517c0f9af0760423b09/src/gltf-component-mappings.js#L613 |
/cc @netpro2k |
is this possibly related to #5571 |
Maybe not |
Ah, probably I figured out the root issue finally. The reflection proble patch has conflicts in the logic (algorithm) with Three.js r141. This is the reason why I don't like applying patches to Three.js, it's very hard to figure out the root issue if having no conflict in the code but having conflicts in logic (algorithm)... (I have spent about a week for this problem.) I'll share the details soon. |
If I'm right the root issue seems to be switching environment maps after setting up WebGL programs in the renderer. The renderer and other webgl modules generate shader code, get program cache, decide whether changing program, and so on, from material (and other objects) properties.
Switching More proper implementation may be setting up envMapA/B first and include them for decision of shader code generation, program cache, and so on. |
Looks like the root of this regression was this change in Three 138 mrdoob/three.js#23322 ... Previously PMREM textures had a fixed size. They are now variable so we need to further extend our multi-environment map support to account for this. I think we can just have it be a know limitation for now that all reflection probes and environment maps have to be the same resolution. We can enforce this in the Blender addon. Ultimately we probably can support this when we do another pass at reflection probes. |
A workaround PR for Hubs Blender add-on has been opened Hubs-Foundation/hubs-blender-exporter#88 |
Opened an issue for the root issue of Reflection Probe implementation Hubs-Foundation/three.js#66 We may close this issue after Hubs-Foundation/hubs-blender-exporter#88 lands. |
Closing this issue because Hubs-Foundation/hubs-blender-exporter#88 has been merged. Please re-export your scenes if you encounter the problem. |
Description
Environment map reflections appear incorrectly positioned and textures are black in high quality mode
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Materials reflections/materials should be more consistently lit with env maps IBL.
Screenshots
90025f635997a4dc53a9a98ea22c7827.mp4
Hardware
Additional context
also tested on PC, windows Firefox
The text was updated successfully, but these errors were encountered: