
Show HN: A raytracer to shade topographic maps in R, Part 2 - tylermw
http://www.tylermw.com/making-beautiful-maps/
======
tylermw
Author here--This is a follow-up to my last post, here:

[https://news.ycombinator.com/item?id=17065264](https://news.ycombinator.com/item?id=17065264)

The feedback in that thread was great, and I ended up implementing several of
the suggestions given in the comments. Thanks for all the help!

~~~
danielvf
I share your awe at the Vatican map gallery. Two stories high, floor to
ceiling, 400 hundred year old hand painted maps, for the entire length of a
football field. And it’s not just the size, it’s the detail and joy put into
maps of little places that no one outside has ever heard of.

I’ve never found photos online that half show how awesome the map gallery is.
If I ever get back to the Vatican, I plan on spending 90 of my time there.

~~~
tylermw
It really was fantastic! If it wasn't for the massive crowds constantly
pushing you towards the Sistine Chapel, it would be a great place to spend an
hour or two just admiring the small details in each map.

------
growlist
Without wanting to be deliberately picky, I'm not sure I see anything here
that could not be done with a few clicks/commands in a dedicated remote
sensing/raster analysis package, with GDAL and GRASS being a couple of obvious
free options that spring to mind.

The maps in the Vatican museum are indeed very cool, in fact the Vatican in
general blew me away, and I've seen a fair number of impressive historical
sites in Europe/Near East.

~~~
tylermw
GDAL does has hillshading routines (gdaldem hillshade), but it does not have
the raytracing, spherical UV shading, or ambient occlusion layers included in
rayshader. It's hillshading routine is basically the rayshader's lamb_shade
function--functional, but not going to win any beauty contests.

GRASS does have a raytracing option, but if you look up the images produced by
it--they aren't pretty. Much more of a functional API to see where actual
shadows are falling, and not at all something to produce nice looking maps.

The real killer feature in rayshader is the seamless API for combining all of
these layers. Being able to adjust the intensity of each layer individual, add
water, change color and texture programmatically--no other software focuses
nearly as much on the aesthetics of a great looking map.

I haven't found anything other than actual 3D modeling software that can
produce similar-style hillshades--combining texturing, raytracing, local
shadows, and ambient occlusion. What's great (in my highly biased opinion!)
about this package is the ability to go programmatically straight from the DEM
to a hillshade, without having to save the data and load it into Blender or
something similar.

------
bufferoverflow
Why not throw it into Blender and get an actual pathtraced result. Here's a
quick render I made:

[https://i.imgur.com/GBTjJUm.jpg](https://i.imgur.com/GBTjJUm.jpg)

Notice the correct soft self reflections on the sides of the hills in the
shade.

~~~
tniemi
Because that would be cheating. ;) People like to create things from scratch.

Also, I like that quote: > Ask the internet how to do something and you’re
likely to get a bunch of digital shrugs and maybe—if you’re lucky—a passive
aggressive link to a Wikipedia page. Tell the internet you’ve done
something—and they’ll tell you exactly what you can do to improve it.

~~~
AboutTheWhisles
Even without using it directly, it can serve as a reference to check if the
shadows are correct.

