Closed echadwick-artist closed 10 months ago
I have simplified the problem and made another example asset. This only has a single mesh, a baseColorFactor and a normalTexture.
glTF file: bump-variants-simple.zip
Thank you for the simplified example and the clue - I think you're right. I'll look into it.
Description
normalTextures are lighting oddly when materials are swapped using KHR_materials_variants.![2023-09-03 17_14_34-EricChadwick com](https://github.com/google/model-viewer/assets/40177036/de322d00-5c1f-44c7-8100-8c0848fda89d)
This occurs with the attached model, both when embedded with 3.2.0 and when loading the model into the Editor .
StainedGlassLamp.zip
Error does not occur when loading the model in BabylonJS Sandbox:![2023-09-03 17_17_06-Babylon js - StainedGlassLamp glb](https://github.com/google/model-viewer/assets/40177036/7189c8e5-1f5d-48de-9833-086b0cbe1451)
Threejs Editor may have a clue. If the second number next to the normalTexture is changed to +1, the bump is inverted. Perhaps this value is being ignored (or forced to 1) with variants.![image](https://github.com/google/model-viewer/assets/40177036/3d93284d-80f2-4fb5-ab5d-56f030d8476d)
Live Demo
https://ericchadwick.com/gltf/index.html#StainedGlassLamp
Version
Browser Affected
OS
AR