Monday, October 09, 2023

Light, Shadows & Fog

Brody Smith has written a couple of useful tutorials on how you can customize lighting, building and terrain shadows, and fog settings in Mapbox GL powered maps.

In Mapbox Lighting, Shadows, and Fog - Part 1 Brody looks at how lighting can be used to change the visual appearance of a map. In Mapbox Lighting, Shadows, and Fog - Part 2 Broady explores how tinkering with a map's fog settings can create depth and atmosphere, and how ambient and directional light can be used to simulate different light sources. 

Both posts include impressive demo maps. Part Two contains a 3D map view of Uluru. This map includes a number of filter controls which allow you to adjust the range, color, and star intensity settings. The map allows you to instantly observe the visual effect of adjusting these settings. This is very useful for anyone who wants to quickly experiment with the Mapbox fog settings to find the best configuration for their own maps. Part Two also includes an interactive map which allows you to adjust the ambient and directional light settings and instantly observe the effect that changing these parameters has on the visual appearance of the map.

Part One includes a beautiful interactive map of Sydney Opera House. This map includes a control which allows you to select from each of the four preset light settings in Mapbox GL. This allows you to see how the 3D building of Sydney Opera House and its immediate environment look with Mapbox's default day, dawn, dusk and night settings. When creating your own maps you aren't restricted to these four presets and you can use the Mapbox Lighting API to create custom lighting effects for your own maps.

No comments: