Hi HN. I've been learning WebGL and working on this project for about a year. I posted it previously when it worked in 2D and wanted to share it again because the 3D really makes the shade come to life. Most of the credit for the update due to migrating from Leaflet to Mapbox GL JS.
Interesting! I had never noticed the amount of shade created by the mountain in the middle of Montreal. 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 ma…
Show HN: 3D map of shade around the world
21–30 of 72 posts
Re: Show HN: 3D map of shade around the world
#22Re: Show HN: 3D map of shade around the world
#23The WebGL update is awesome! The costs of hosting map tiles for the whole world can be large. How are you funding it?
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.
Re: Show HN: 3D map of shade around the world
#24EDIT: 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.
Re: Show HN: 3D map of shade around the world
#25Looks great, congrats! I have worked on the same sort of project on (and mostly off) over a while, but didn't get as far as having a nice UI on the front etc. I'd started in WebGL but then moved to a back-end server using CUDA and separate front end (mostly as I wanted to learn a bit about CUDA at the time). What did you use for your source of height data? I'd used some free LiDAR data but didn't find high resolution…
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
Re: Show HN: 3D map of shade around the world
#26Looks great, congrats! I have worked on the same sort of project on (and mostly off) over a while, but didn't get as far as having a nice UI on the front etc. I'd started in WebGL but then moved to a back-end server using CUDA and separate front end (mostly as I wanted to learn a bit about CUDA at the time). What did you use for your source of height data? I'd used some free LiDAR data but didn't find high resolution…
I use Mapbox terrain RGB [1]. A good free alternative is Nextzen [2], but they do not generate tiles past zoom level 15 (Mapbox does it to 20) and there are some random elevation spikes that Mapbox has cleaned up. 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/hel…
Re: Show HN: 3D map of shade around the world
#27The WebGL update is awesome! The costs of hosting map tiles for the whole world can be large. How are you funding it?
Great question. It costs nothing up to 50K map loads [1], but I did burn some money learning along the way: 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 u…
Re: Show HN: 3D map of shade around the world
#28Earlier quoted context omitted.
Great question. It costs nothing up to 50K map loads [1], but I did burn some money learning along the way: 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 u…
Being on the HN front page is going to blow out your budget for the month probably. Hope it doesn't cost you too much! I had issues with my own site using Street View which is even more expensive than maps ( https://james.darpinian.com/satellites/ ) until I found out you can apply for large amounts of free Google Maps API credits for educational and non-profit use. It's a little stressful because if you exceed your c…
Reddit is truly massive, but I appreciate the HN discussions more.
Re: Show HN: 3D map of shade around the world
#29Earlier quoted context omitted.
Being on the HN front page is going to blow out your budget for the month probably. Hope it doesn't cost you too much! I had issues with my own site using Street View which is even more expensive than maps ( https://james.darpinian.com/satellites/ ) until I found out you can apply for large amounts of free Google Maps API credits for educational and non-profit use. It's a little stressful because if you exceed your c…
It's a little early to say, but someone posted it on r/InternetIsBeautiful last month and it had about 75K visitors over two days. It looks like the front page of HN will be just a fraction (20%?) of that traffic. Reddit is truly massive, but I appreciate the HN discussions more.