google / model-viewer

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

Update to commerce tone mapper #4614

Closed elalish closed 6 months ago

elalish commented 6 months ago

I've added a small contrast "toe" to the function, aligned to compensate for the average Fresnel deesaturation that occurs with PBR for dielectrics with the default IoR of 1.5. This makes it much easier to match glTF base colors to output colors, and fixes the desaturated, low contrast look of commerce as compared to ACES.

The commerce tone mapper has a meaningful exposure: with lighting [1,1,1], you get exactly the base color out (for most of the sRGB range). ACES has no such peg - it happens to be a bit brighter. For our 'neutral' and 'legacy' lighting, I've made an automatic exposure compensation, so that ACES and commerce tone mapping have the same "visual" exposure. If you're using your own lighting environment and want to compare tone mapping, use exposure='1' for commerce and exposure='0.77' for ACES (or 1.3 and 1).