Rayshader in Rmd

How can I get a rayshader plot to appear in a HTML document made via Rmd? Simple example in gist at: rayshader rmd · GitHub

When I try to knit this, there is a space for the rayshader output but nothing appears.

1 Like

This is a bit of a shot in the dark, as I haven't tried it myself, but can it be done inside a rglwidget?

Is it just the snapshot you're interested in, or a 3D widget? You can get the latter by calling rgl::rglwidget() before rgl::rgl.close(). Also, is the snapshot not appearing when you run the code interactively, and are you knitting this document on your local computer? Using rgl on headless (remote servers, usually) machines is fairly difficult, but locally it shouldn't be an issue.

Thanks - I'll test that out tonight and ideally want a 3D widget. It runs interactively but not when I knit. I'm running this all locally on my PC, not a server for both the toy example and my real data.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.