tylermorganwall / rayshader

R Package for 2D and 3D mapping and data visualization

Home Page:https://www.rayshader.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in validate_mesh(scene): !any(is.na(normals)) is not TRUE

adboy316 opened this issue · comments

I'm getting the following error whenever I try to use the plot_3d function with a raster that contains NA values:

matrix_with_null_values |>
height_shade() |>
plot_3d(heightmap = matrix_with_null_values, solid=TRUE)
render_snapshot();

Error in validate_mesh(scene): !any(is.na(normals)) is not TRUE

I noticed since version 0.36 this error is also present in the generated docs such as plot_3d.html. I looked at previous branches (0.35) and saw this error does not appear in the that same document.

I am not sure if this is a bug, or if this is the correct error I'm suppose to be seeing when I use a raster with NA values. But seeing as some of the example in the plot_3d.html are also giving me the same error, and they appear in the docs, I think this may be a bug.

EDIT: I just installed version 0.35 and this error no longer pops up, so I do think it was introduced with a change you made in 0.36.

render_highquality(

  • "gcnp_highres.png",
  • light = FALSE,
  • interactive = FALSE,
  • environment_light = "grand canyon/phalzer_forest_01_4k.hdr",
  • intensity_env = 1.5,
  • rotate_env = 180,
  • width = round(6000 * wr),
  • height = round(6000 * hr)
  • )

Error in render_highquality("gcnp_highres.png", light = FALSE, interactive = FALSE, :
could not find function "render_highquality"

I am constantly encountering an error and would appreciate your assistance in finding a solution. Thank you in advance for your help.