Tool to validate glTF assets.
Validation is performed against glTF 2.0 specification.
Validator writes a validation report (in JSON-format) with all found issues and asset stats.
Live drag-n-drop tool: http://github.khronos.org/glTF-Validator
- JSON syntax check and GLBv2 file format correctness.
- Asset description validation
- All properties and their types from JSON-Schemas (including implicit limitations on valid values).
- Validity and compatibility of internal references.
- Correctness of
Data URI
encoding.
- Binary buffers validation
- Forbidden or incorrect accessor values (e.g.,
NaN
, invalid quaternions, indecomposable matrices, etc). accessor.min
andaccessor.max
values.- Sparse accessors encoding.
- Animation inputs and outputs.
- Forbidden or incorrect accessor values (e.g.,
- Images validation
- Warning on non-power-of-two dimensions.
- Full list of detectable issues.
You can use hosted web front-end tool. It works completely in the browser without any server-side processing.
- Download and install Dart SDK for your platform.
- Add Dart SDK
bin
folder to your PATH (more info here). - Add packages
bin
folder to your PATH (~/.pub-cache/bin
for Linux and Mac;%APPDATA%\Pub\Cache\bin
for Windows).
- Clone this repository,
master
branch. - From the repository root folder, run
pub get
to get dependencies. - Run
pub global activate --source path ./
to addgltf_validator
executable to your PATH.
Usage: gltf_validator [<options>] <input>
Validation report will be written to `<asset_filename>_report.json`.
If <input> is a directory, validation reports will be recursively created for each glTF asset.
Validation log will be printed to stderr.
Shell return code will be non-zero if at least one error was found.
-r, --[no-]validate-resources Validate contents of embedded and/or referenced resources (buffers, images).
-p, --[no-]plain-text Print issues in plain text form to stderr.
-w, --[no-]warnings Print warnings to plain text output.
- Web version can't differentiate between JSON integers and floats of the same value, e.g.,
1
vs1.0
. - JSON charset encoding restrictions are not enforced.
- Explicit
null
values are not allowed by JSON-Schemas but could sometimes pass validation as if property was undefined.