glTF (GL Transmission Format) Writer Parameters
glTF Version
This parameter controls the type of files the writer will produce.
Normal (textures and binary data are stored in separate files)
This is the default value for the parameter.
- The writer will produce a number of files for each feature type.
- The structure and metadata of the 3D scene will be stored in a .gltf file.
- Coordinates and other related geometry data will be stored in a .bin file, which will be referenced from the .gltf file.
- Any textures will be written to separate files, as determined by the values in the Texture/Material parameters group.
Single JSON File (textures and binary data are stored as base64 strings)
This option is useful when a 3D scene is required to be stored in a single file, rather than spread across multiple files.
- The writer will produce a single .gltf file per feature type, and this file will contain an entire 3D scene.
- All textures and geometry data will be stored in the JSON as base64 encoded strings.
Single Binary File (using the KHR_binary_glTF extension)
This option will produce smaller files than the Single JSON File... option.
- The writer will produce a single .glb file per feature type, and this file will contain an entire 3D scene.
- The writer will use the KHR_binary_glTF extension, which allows binary geometry data as well as textures to be stored in a single file.
Texture/Material
This parameter is only applicable when the glTF File Format parameter is set to Normal. It defines the folder the in which the writer should output texture files used in the 3D scene. The texture output folder is usually a subfolder of the output dataset but can be any path relative to the output dataset. All texture image files for the dataset being produced will be written to this folder.
Textured appearances that are shared between feature types of the same dataset will produce materials in different glTF files that share the same texture image file. If possible, texture file names will be the same as the original raster filename.
Specifies the preferred format for associated texture files. This preference will be used as long as the specified format supports the properties of the texture raster; if not, it will be overridden.
In the default Auto mode, the writer chooses the best representation based on the incoming texture raster.
If the preferred format is ignored, a message is added to the log file. Possible reasons that the preference will be ignored include a lack of raster palette support, alpha channel support, or color depth support in the selected format.
JSON Formatting
These parameters are only applicable when the glTF File Format parameter is set to Normal or Single JSON File.
- Pretty Print: The JSON produced by the glTF writer will be formatted for easier readability. This will increase the output file size.
- Linear: The JSON produced by the glTF writer will be written without any unnecessary whitespace. This reduces the output file size at the expense of human readability.
This parameter is only applicable when the Formatting Type parameter is set to Pretty Print. This parameter allows you to control how indentation whitespace is written in the formatted JSON. Each indentation level may be written as a number of space characters, or as a single tab character.
Coordinate System
Note that not all formats offer all the options described below.
- Yes: Coordinates of all the points in the written features will be normalized to the interval [-0.5, 0.5] on the largest side of their XYZ-bounding cube. The other dimensions will be scaled proportionally.
Additionally, the transformation matrix required to scale the model back to world coordinates will be written to a companion .fwt file. This can be used to improve precision of the written coordinates. The companion .fwt file will have the same name as the primary data file and will be written in the same folder. For folder-based formats, the file global.fwt will be written instead.
- No: The original coordinates will be written as provided. Coordinates will not be projected; .fwt world and .prj files will not be generated.
- Create Projection File Only: A companion .prj file containing the coordinate system and having the same name as the primary data file will be written in the same folder. For folder-based formats, the file global.prj will be written instead. Coordinates will not be projected and a world file will not be generated.
- Transform Coordinates Only: Transforms the coordinates as in the Yes option, but companion .prj and .fwt world files will not be generated.