WOLFRAM

GLTF (.gltf, .glb)

[Experimental]
  • Export supports the GLTF file format.

Background & Context

    • MIME type: model/gltf+binary, model/gltf+json
    • Graphics Language Transmission Format.
    • 3D graphics format.
    • Commonly used to share 3D scenes and models.
    • Developed in 2015 by the Kronos Group.
    • ASCII or binary format.
    • Provides schemas for standard encoding of 3D scenes and models.

Export

  • Export["file.gltf",expr] exports a 3D object to a binary GLTF file. The expr can be any 3D geometric region that is ConstantRegionQ or a Graphics3D object.
  • The export format can be specified with Export["file",expr,"GLTF"].
  • File formats and file extensions used by the GLTF specification include:
  • "GLTF"ASCII encoded
    "GLB"binary encoded
  • See the following reference pages for full general information:
  • Exportexport to a file
    CloudExportexport to a cloud object
    ExportStringexport to a string
    ExportByteArrayexport to a byte array

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Export a 3D model to an ASCII GLTF file:

Out[1]=1

Print the raw textual contents of the file:

Scope  (6)Survey of the scope of standard use cases

Basic Uses  (2)

Export to a binary GLTF file:

Out[1]=1

ASCII GLTF file:

Out[1]=1

Graphics  (2)

Export Graphics3D objects:

Out[1]=1

Graphics from a file:

Out[1]=1
Out[2]=2

Regions  (2)

Export special regions:

Out[1]=1

Formula regions:

Out[2]=2
Out[3]=3

Properties & Relations  (3)Properties of the function, and connections to other functions

Export to a cloud object:

Out[1]=1

Export to a string:

Out[2]=2

Export to a byte array:

Out[1]=1