#Create a direct mapping of elevation to color:
if(rayshader:::run_documentation()) {
#Plut using default values
montereybay %>%
texture_shade() %>%
plot_map()
}
if(rayshader:::run_documentation()) {
#Increase the level of detail
montereybay %>%
texture_shade(detail=1) %>%
plot_map()
}
if(rayshader:::run_documentation()) {
#Decrease the level of detail
montereybay %>%
texture_shade(detail=0) %>%
plot_map()
}
if(rayshader:::run_documentation()) {
#Increase the level of contrast
montereybay %>%
texture_shade(contrast=3) %>%
plot_map()
}
if(rayshader:::run_documentation()) {
#Increase the brightness for this level of contrast
montereybay %>%
texture_shade(contrast=5, brightness = 2) %>%
plot_map()
}
#Add a texture_shade() layer into a map
montbay = montereybay
montbay[montbay < 0] = 0
if(rayshader:::run_documentation()) {
montbay %>%
height_shade() %>%
add_water(detect_water(montbay), color="dodgerblue") %>%
add_shadow(texture_shade(montbay, detail=1/3, contrast = 5, brightness = 6),0) %>%
add_shadow(lamb_shade(montbay,zscale=50),0) %>%
plot_map()
}
Run the code above in your browser using DataLab