Show HN: 3D map of shade around the world
shademap.app
shademap.app
How do the calculations go so smoothly? I mean for each pixel that is potentially in the shade there can be a many 'upstream' pixels in the direction that the light is coming from that could cause it to be shady if there was something high there. Doing that calculation for each pixel seems very intensive, or is it achieved in some other way?
It almost seems wrong at first glance, the shadow it casts is huge and it covers most of the city and far beyond. But it's probably my monkey brain that doesn't notice the gradual changes and isn't aware that where I am at that moment has less light than the surrounding areas.
What is " shade " according to this map? Do you know how much sunlight (lumens?) is lost? Or is this an extrapolation of the shape of the features? It looks like the edges are quite hard when they should be softer and have different levels of opacity? Especially when the sun is very low, because according to this image, the mountain casts a shadow all the way to the town north of the river, several miles away. I'm thinking out loud. https://shademap.app/#45.581,-73.4441,10.0642z,1641473011979...
I will make sure to pay better attention next time I'm in the city around that time.
That would be something great
I'm looking for a house right now, that means I can check how much light it gets before even visiting it. Thanks!
This tool does a much better job of telling the story. I wish it would've existed at the time!
I spent 3 years in Keflavik, Iceland in the 90's when I was a kid and my dad was in the Navy. I remember winter getting only a few hours of daylight where the sun would merely peek over the horizon for part of the afternoon. Looking at Iceland through this map, I was able to tell that some parts have hills to their south and during winter, they'll never leave the shadows.
Of course, go just a little more North, and during the summer, the sun never sets. It just circles the horizon.
Also (bug report) it seems to be a little buggy on Safari on MacOS when you zoom out, it gets quite glitchy.
Sorry for the glitches. If you copy and paste your url here, I can see exactly the zoom/location/pitch/bearing you're looking at.
EDIT: I found your blog, so can see you used e.g. https://osmbuildings.org/documentation/data/ for buildings. I'd looked at that also but found the data a little sparse and also not so accurate, but its possibly improved since, and does look good on the rendering.
I'm looking forward to a LIDAR elevation tile set becoming available because it can be loaded into Shademap without any modification and hopefully display shade from trees.
[1] - https://docs.mapbox.com/help/getting-started/mapbox-data/#ma...
[2] - https://www.nextzen.org/#terrain-tiles
EDIT: For buildings I used OSM Buildings initially, but now such data is directly encoded in the vector map tiles provided by Mapbox
Even the USGS 3DEP program only offers preprocessed DEMs (that is, DTMs). I can see generating that sort of thing at ~5-10m resolution on a global scale from satellite imagery / photogrammetry.
A global or even regional DSM would be quite a product.
Some time ago I made an app (Sun Locator) that has a similar feature (see here for a short demo: http://www.sunlocator.com/sunlocatorwebsite2_files/topo.gif). But your approach is definitely more elegant.
I really like the PowerPoint vibes in your intro video. Might look into doing the same.
The UI could be a toggle button below the “Tilt map” toggle button with an icon of a sun and a title “Rotate with the sun”.
I understand that the sunlight comes at slightly different angles to each point on the map. The feature wouldn’t have to complicated because of this, though: I would find it intuitive if the feature only calculated the angle from the sun to the location at the center of the visible map.
It also takes into account the Earth's curvature, so you can zoom out to planet level and it still works.
By the way, you might like https://felixpalmer.github.io/volcanoes-of-japan/
Great link, thanks. Horizontal scrollbar tripped me out a little bit though...
But I really came here to say that by fat fingering I hit your earlier equinox posting [0] which sadly didn't get noticed. Coupled with the ability to easily change the date it's the clearest demonstration I've ever seen of axial tilt and the lovely fact that the sun rises & sets due east & west for EVERYWHERE on that day. (it's also about the only thing a Mercator projection really excels at)
[0] https://shademap.app/#40.71396,-117.46582,5z,1632318265676t,...
Still, very cool visualization!
I would suggest, in order to increase the visual "information" (as opposed to a blurry landscape), to:
-- give the option to exaggerate the altitudes. Currently, mountains are evident but hillsides are almost indistinct from plains.¹
-- try more relief highlighting colours, like those in DerStefan's opentopomap.org in zoom levels 1 to 8.
¹Please see the work of Anton "Antartis" Balazh, https://news.ycombinator.com/item?id=29686462 : that kind of rendering should be inspirational - I have seen little better.
I've used an app called PhotoPills to plan landscape photo shoots in the past. It lets you drop a pin on a map and shows you the direction of sunlight at any given time of day.
Shade Map gives me so much more fidelity to play with. The pseudo-3D view with shadow rendering helps tremendously in previsualising a photo.
Bet you could even charge a penny for a feature like this.
The shade layer is pluggable into any mapping application if you want to prove HN wrong [1]
It also only takes into consideration building hight but not elevation/topology on which the building sits.
I regularity use this in summer when picking a place to have lunch with friends/coworkers outdoors.
You can make sure you sit in the sun (or the shade) at that time.
* Is there a way to deactivate daylight saving time switches / locale-specific time and just use global UTC time? Because when I drag the "day-of-the-year" slider, at the end of March the rendering jumps for the switch from CET to CEST, and jumps at the end of October for the switch from CEST to CET - at least for my locale.
* Sunsets and sunrises are the most spectacular, just as in real life. Maybe one idea is to allow for a third slider controlling the "second of a minute" ... or providing an optional "time stretching"/"slow motion" dragging behavior the closer the current position of the "minute-of-the-day" slider gets to the moment of sunset/sunrise.
I am sitting in an Airbnb in Chamonix wondering where has good sunshine for skiing today?
Now I know.
https://shademap.app/#63.41876,10.43876,12.06084z,1641468451...
The shade does not change automatically, you need to move the time slider.
One thing i didn’t expect and can’t really explain is the emotional impact of zooming out until you can see your location and that of a loved one and watching the sun rise and set at slightly different times and different ways for each. There’s an interesting connection that it somehow creates, I’m not sure.
Anyway, in that context i kept finding myself replaying sunrises and sunsets and my rickety fingers don’t do a great job of making that a smooth process. That made me yearn for a little time widget that progresses the clock automatically at some +/- multiple of realtime.
Congrats btw, i don’t know if you feel like you accomplished your goal of learning webgl but it sure looks like you have to me.
I went with Mapbox and Maptiler for tiles early on. Initially I used Leaflet with raster map tiles and raster elevation tiles. Mapbox free-tier for raster tiles was 750,000 tiles per month and I exceeded that a few months in.
Next I used Leaflet with [maplibre/mapbox]-gl-leaflet plugin which allowed me to use unlimited vector map tiles from Mapbox up to 50K map loads. However, I continued to use raster elevation tiles and these soon started exceeding 750,000 tiles per month.
Finally I switched to Mapbox GL JS. This allows you 50K map loads a month and unlimited loading of elevation and vector map tiles per map load. I used Maplibre GL JS for a bit, but it's missing the 3D terrain functionality so I went with Mapbox instead.
In general, it would cost about $100 for every 3000 visitors before switching to Mapbox GL JS.
Reddit is truly massive, but I appreciate the HN discussions more.
Looks like a good way to find great sunset spots
for quite some time i wanted to include shade data in routing so i could choose most/least sunny walking route.
For example, look at New York City around dusk, and if you zoom out it's mostly yellow, but if you zoom in it's mostly black.