model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

Lights contained in the GLTF file are transformed independently of the model

Open hybridherbst opened this issue 3 years ago • 2 comments

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: image

Babylon: image

SceneViewer: image (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: image

model-viewer when panning: uZ0bABX6U1

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

hybridherbst avatar Dec 02 '21 19:12 hybridherbst

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.

elalish avatar Dec 02 '21 20:12 elalish

Some more pictures, looks ok in the threejs.org/editor: image

modelviewer.dev/editor: image

And interestingly, gltf.report (I think this uses model-viewer, but maybe a modified version?) image

And https://gltf-viewer.donmccurdy.com/: image

hybridherbst avatar Dec 02 '21 21:12 hybridherbst