This R package contains functions to read, write and display .gltf and .glb files containing 3D models, following the official spec at . It also contains functions to convert rgl mesh3d objects and scenes to and from glTF objects.

It is currently in active development. Please add issues or pull requests if something important to you is missing.

A pkgdown website is here:

To install, run


Sample code:


gltf <- readGLB("")
mesh <- as.mesh3d(gltf)
snapshot3d(webshot = FALSE, filename = "man/figures/engine.png")

Most of this package is written by Duncan Murdoch and licensed under GPL 2.0.

Sample files in inst/glb and inst/localtests are unmodified copies of files from, and have details of copyright and licenses listed there. All have permissive licenses, some requiring acknowledgment.

Files in inst/localtests are in the Github repository, but are not included in the package tarball.


  • 2CylinderEngine.glb was produced by Okino Computer Graphics.
  • AntiqueCamera.glb was produced by Maximilian Kamps and UX3D.
  • Avocado.glb was produced by Microsoft.
  • BarramundiFish.glb was produced by Microsoft.
  • BoxAnimated.glb was produced by Cesium.
  • BrainStem.glb was created by Keith Hunter and is owned by Smith Micro Software, Inc. 
  • DamagedHelmet.glb was created by theblueturtle_.
  • NormalTangentTest.glb and NormalTangentMirrorTest.glb were created by Ed Mackey and are owned by Analytical Graphics, Inc., licensed under CC-BY 4.0

Files src/mikktspace.c and src/mikktspace.h are written by Morten S. Mikkelsen and used under the permissive license included within them.