Closed mrworthington closed 3 years ago
Does the underlying raster contain a lot of NA values? The 3D map will be centered on the bounding box of the extent of the underlying elevation data. If there's a large amount of NA values south and east of the land, it will include those values while centering the 3D data.
Hey! I guess it did have some kind of underlying NAs in the elevation data. Although I wasn't sure how to actually check for NAs, I used the clip="bbox"
argument when I pulled the elevation data and that fixed everything. Is there a recommended way to inspect elevation data for NAs?
One easy way is to plot a boolean matrix, e.g.
plot_map(is.na(mat_tx_reduced))
Hi Tyler,
I'm brand new to rayshader, so forgive me if this issue is more appropriate for rayrender, but here's my issue:
I'm trying to render an elevation of Texas using
plot_3d()
, but I can't seem to center the object. As a result, anytime it renders (either asrender_snapshot()
or asrender_highquality()
), it ends up in the upper-left hand corner of the screen and I'm not sure how to get the object to render in the center of the screen.Is there a way to center the objects? I've posted a reprex below the images.
Resulting Images
plot_3d()
render_snapshot()
render_highquality()
Code Used to Produce These Images
Created on 2021-09-15 by the reprex package (v2.0.1)