maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.34k stars 689 forks source link

Globe - Add an atmosphere layer #3888

Open Pheonor opened 6 months ago

Pheonor commented 6 months ago

User Story

As a User I can add a realistic atmosphere layer to the Globe, so that the Globe look more realistic when view from a far distance.

Rationale

A realistic atmosphere layer that appear and disappear fonction of the zoom level could add a touch of realism to Globe display.

Impact

A new layer with its associated style and configuration should be available.

HarelM commented 6 months ago

See my comment about the sky spec here:

HarelM commented 6 months ago

Bounty direction: https://github.com/maplibre/maplibre/issues/190

vlarrieu commented 6 months ago

@HarelM Could you assign it to me please ? (On Pheonor account, sorry)

kubapelc commented 6 months ago

I think it would also make sense to add an option for physically based sky, fog and atmosphere simulation to the sky implementation. Not right now, but sometime in the future. I think it could result in some very nice visuals, and provide an easy option for adding realistic sky and fog to terrain, and perhaps integrate seamlessly with atmosphere for globe.

@Pheonor your globe's atmosphere implementation already looks very realistic. Do you actually simulate light scattering in the atmosphere?

Pheonor commented 6 months ago

Yes, I simulate light scattering with the Rayleigh and Mie phases. It allows to have a reallistic rendering of the atmosphere. In my previous PoC, I remove the atmosphere when I zoom close to the Earth to avoid adding blue effect on all rendering. I want to allow more configurability to let atmosphere render even when close to the ground.

HarelM commented 6 months ago

If this is the case, I would propose to open an issue in the spec repo and discuss the needed changes to the spec, either use the globe issue, the sky issue or a different one if this should be a different field, although I'm not sure it doesn't fall under the sky specifications.