mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.27k stars 723 forks source link

HDR Exposure #93

Open RosaryMala opened 9 years ago

RosaryMala commented 9 years ago

I don't know how possible this is in webgl, but it would be nice to be able to have HDR panoramas that can automatically adjust the exposure depending on the overall brightness of what's being looked at. Useful for panoramas where both an interior and exterior are visible.

mpetroff commented 9 years ago

It's definitely possible and has been something on my wishlist for a while. SpiderGL has a WebGL HDR demo that encodes an image as RGBE within a PNG, using the alpha channel for the exponent (edit: it's actually using a ratio subband). I would tend to implement something similar but use a JPEG for the color data and a second grayscale JPEG for the exponent, to save bandwidth. Then it's just a matter of applying a metering algorithm to the viewable area.

mpetroff commented 8 years ago

I did some work on figuring out the best way to do this. I ended up creating an implementation based on BoostHDR. Now I just need to integrate it into Pannellum.

iKlsR commented 7 years ago

@mpetroff Is this still a thing? A slider to adjust the exposure would be a great addition.

mpetroff commented 7 years ago

It's still on my list of things to work on.