glTF Reader

gl Transmission Format
File Extension glTF, GLB
Supported Versions Version 2.0 only
Platforms wy ly my an in
Tessellation t_green Supported
B-rep c_grey N/A
PMI c_grey N/A

The glTF (gl Transmission Format) Reader provides full access to visualization data that is stored within a particular glTF file.

A file does not need to have a particular extension to be read correctly by HOOPS Exchange. However, the file extensions of glTF files that you can expect to be loaded by HOOPS Exchange include:

  • .gltf
  • .glb

[Experimental] Draco compressed glTF files are supported.

How to Import From glTF

To load a glTF file, use A3DAsmModelFileLoadFromFile(). The A3DParamsLoadData structure is used to customize the loading behavior:

A3DAsmModelFile* pModelFile = 0;

A3DRWParamsLoadData sReadParam;
A3D_INITIALIZE_DATA(A3DRWParamsLoadData, sReadParam);
sReadParam.m_sGeneral.m_bReadSolids = true;

// ... set other A3DRWParamsLoadData fields as necessary

A3DAsmModelFileLoadFromFile("path/to/file.gltf", &sReadParam, &pModelFile);

See Simple Load and Export for more about loading model files.

B-rep

This concept is not supported by glTF.

PMI

This concept is not supported by glTF.

The detailed description of the material data format is included in the documentation of the A3DGraphMaterialData structure. For more information about accessing textures and attributes, please read the documentation for the A3DGlobalData, A3DGraphMaterialData, A3DGraphTextureApplicationData and A3DMiscAttributeData structures.

Physically-Based Rendering Material

As of version 2019 HOOPS Exchange now supports physically based rendering (PBR) materials with A3DGraphMaterialData structure. PBR related information are read from glTF formats.

Miscellaneous

Supported

  • Version 2.0 files only (tinygltf limitation; only “asset” data is correctly parsed from 1.0 files)
  • Vertex position, normal, color, texture coordinate sets 0 and 1
  • Triangles
  • Full texture support and material data: normal, occlusion, emissive
  • Physically Based Rendering (PBR) textures and constants: base color, metallness, roughness
  • Texture file formats: JPEG, PNG, BMP, GIF (handled by tinygltf)
  • Cameras

Unsupported

  • Version 1.0 files
  • Vertex tangents
  • Animations
  • Skins
  • Extensions
  • Shaders
  • Sparse accessors (currently not supported by tinygltf)
  • Byte-swapping for Big-Endian platforms

Assembly

This concept is not supported by glTF.

Views

This concept is not supported by glTF.

Restrictions

  • Compressed .glb files are currently unsupported.
  • Reading glTF is not available on iOS and Android.