tylermorganwall / rayshader

R Package for 2D and 3D mapping and data visualization
https://www.rayshader.com/
2.05k stars 211 forks source link

Render Not Showing When 3D Plotting #121

Closed jbenzaquen42 closed 4 years ago

jbenzaquen42 commented 4 years ago

I am running into issues getting the plot 3D to give me anything other than this empty popup when I run the code. I have had other data work with similar code. This is a pretty massive file (around 16gb) and I have 64gb ram on my system.

My Code is here: https://github.com/BigBallerBenzie/Earth-Engine-Piikni/blob/master/R%20Code%20Piikni 7xn4oatwpib51

tylermorganwall commented 4 years ago

That may be too large for your graphics card (used by rgl), or there might be a bottleneck in rgl with that much data (that's quite a large raster). Try reducing the resolution of your data with resize_matrix() or rayimage::render_resized().

jbenzaquen42 commented 4 years ago

Do you know why I would be getting this error: Error in resize_matrix(wmfr_rgb_array, scale = 0.5) : could not find function "resize_matrix

Rayshader is installed

tylermorganwall commented 4 years ago

Install the latest version from github:

install.packages("remotes")
remotes::install_github("tylermorganwall/rayshader")
jbenzaquen42 commented 4 years ago

Tyler, I very much appreciate all of the help. I can not seem to resize any of my files. I get this error after trying to resize my matrix: `wmfr_rgb_array[,,1] = wmfr_r_cropped/255 #Red layer

wmfr_rgb_array[,,2] = wmfr_g_cropped/255 #Blue layer wmfr_rgb_array[,,3] = wmfr_b_cropped/255 #Green layer

wmfr_rgb_array = aperm(wmfr_rgb_array, c(2,1,3)) plot_map(wmfr_rgb_array)

wmfr_rgb_small = resize_matrix(wmfr_rgb_array, scale=0.5) Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'raster': argument is not a matrix wmfr_rgb_array %>% plot_map(wmfr_rgb_small) Error in temp[2:(nrow(temp) - 1), 2:(ncol(temp) - 1)] <- heightmap : number of items to replace is not a multiple of replacement length`

jbenzaquen42 commented 4 years ago

Update: definitely an issue with the total data, but not sure what would fix it. Renting a remote server with 256 gb ram and 10X 1080Ti I ran into the same issue. Possible it is a limitation with Rgl? Cutting the area in half allows me to open it.

tylermorganwall commented 4 years ago

I would believe that this is a limitation with rgl--I don't think it was designed to handle that amount of data.

jbenzaquen42 commented 4 years ago

Sounds good, thank you for your help. I will have to settle for 2 halves of my area.