google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.71k stars 800 forks source link

added Grounded Skybox option #4604

Closed elalish closed 6 months ago

elalish commented 6 months ago

The three.js ground-projected-skybox example I found did not work well in practice, so I made my own simpler version. This goes along nicely with our new UltraHDR support because now we can transmit high-fidelity HDR lighting environments to use as skyboxes.

As with ground-projected skyboxes generally, it'll only look decent if the image is taken on fairly flat ground without nearby stuff that sticks up. The skybox-height attribute is used to get the proper scale of the image on the ground. If you know the height at which the image was taken, simply put that in - otherwise experiment until it looks reasonable. Ideally you'll want a height that is on the same order as the size of the model for it to look good.