Search code examples
rraytracing

Rayrender only renders black image


No matter which code I use from the documentation of the rayrender package, it only renders a black image?!?

Example:

library(rayrender)
#Generate the ground and add some objects
scene = generate_ground() %>%
  add_object(sphere(material = diffuse(color="#ff5555")))
render_scene(scene, parallel = TRUE, width = 800, height = 800, samples = 1000)

Any thoughts?
Thank you!


Solution

  • I was able to reproduce the same problem on two separate instances with a black square (no 'progress' updates).

    To get this working on each:

    1. Installed the latest development version:

      devtools::install_github("tylermorganwall/rayrender")
      
    2. Updated dependent packages. On Mac setup was: cli, digest, ellipsis, fansi, pillar, pkgconfig, prettyunits, R6, raster, Rcpp, rlang, sp, vctrs. On Windows setup was: Rcpp, cli, fansi, pillar, rlang, sp, hms, perttyunits, R6, vctrs, digest.

    3. Restarted R session.

    Output

    rayrender image