google / google/model-viewer

AR Mode: Scaling affects light behaviour unexpectedly

Open
#2,474 10 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
TypeScript
Stars
8.2k
Forks
947
PR merge metrics
No merged PRs in 30d

Description

### Description

GLB supports lights, and we're using them in a good number of scenes by now.
When scaling models in the WebXR mode, lights behave "wrong", their effect isn't invariant (invariant would be expected).

**Expected:** scaling in WebXR mode has the same visual effect as scaling in Display mode - light intensity, radius etc. stays invariant.
**Actual:** scaling in WebXR has a different visual effect, it seems that light radius and intensity aren't scaled accordingly.

#### Live Demo
Open attached file in modelviewer.dev/editor and deploy to mobile with AR enabled
[LightScale.zip](https://github.com/google/model-viewer/files/6647371/LightScale.zip)

Video:
https://user-images.githubusercontent.com/2693840/121874453-a87a8900-cd07-11eb-9191-7b7ad9bf30b9.mp4

### Version
Latest on modelviewer.dev/editor

### Browser Affected
all with WebXR support

### OS
- [X] Android
- [ ] iOS
- [ ] Linux
- [ ] MacOS
- [ ] Windows

### AR

- [X] WebXR
- [X] SceneViewer (behaves "better" in the sense that lights don't blow out as crazy, but has the same issue)
- [ ] QuickLook

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.