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.