model-viewer
model-viewer copied to clipboard
Lights contained in the GLTF file are transformed independently of the model
Description
Scenes that contain lights seem to behave strange in regards to where the lights are positioned. Somehow they seem to be outside the actual model hierarchy.
This affects both web mode and WebXR mode, with WebXR mode being even more problematic because the transformation is way off there.
Live Demo
https://prefrontalcortex.de/labs/model-viewer/upload/LightCones/
Expected:
Babylon:
SceneViewer:
(Related issue https://github.com/google/model-viewer/issues/2474 is still open regarding the light values not being scaled correctly when scaling the model, resulting in an unintended dependency between model scale and light intensity)
model-viewer:
model-viewer when panning:
WebXR: (just a black square)
Version
- model-viewer: v1.9.2
OS Tested
- [X] Android
- [ ] iOS
- [ ] Linux
- [ ] MacOS
- [X] Windows
AR
- [X] Non-AR
- [X] WebXR
- [ ] SceneViewer
- [ ] QuickLook
I'd guess this is related to #2474 too. I think this is a three.js thing, though it's entirely possible we're making a bad assumption somewhere.
Some more pictures, looks ok in the threejs.org/editor:
modelviewer.dev/editor:
And interestingly, gltf.report (I think this uses model-viewer, but maybe a modified version?)
And https://gltf-viewer.donmccurdy.com/: