glTF-Compressor
glTF-Compressor copied to clipboard
To store the source code for the glTF-Compressor project
glTF-Compressor
This is the official Khronos glTF 2.0 image and geometry compression project using WebGL: glTF-Compressor
Table of Contents
- Version
- Credits
- Features
- Setup
- Web App
Version
Image compression using KTX 2, JPEG, PNG and WebP.
Geometry compression using DRACO, MeshOpt and MeshQuantization.
Credits
Developed by Phasmatic. Supported by the Khronos Group. Original code based on the glTF-Sample Viewer project.
Features
On top of existing glTF Sample Viewer features, this project adds functionality for:
- [x] EXT_texture_webp
- [x] EXT_meshopt_compression
- [x] KHR_draco_mesh_compression
- [x] KHR_mesh_quantization
- [x] Images preview
- [x] 3D mesh comparison (original/compressed images and geometry)
- [x] 2D image comparison (original/compressed images) with zoom operation
- [x] KTX 2 encoding
- [x] JPEG encoding
- [x] PNG encoding
- [x] WebP encoding
- [x] DRACO compression
- [x] MeshOpt compression
- [x] Mesh Quantization options
- [x] Model export (gltf, gltf-embedded, glb)
Setup
For local usage and debugging, please follow these instructions:
-
Make sure Git LFS is installed.
-
Checkout the
mainbranch -
Pull the submodules for the required glTF sample models and environments
git submodule update --init --recursive
Web App
You can find an example application for the glTF-Compressor in the app_web subdirectory of the glTF-Compressor repository. A live demo can be found at https://phasmatic3d.github.io/glTF-Sample-Viewer-KTX-demo/.
Running a local version
Open a terminal window in the repository root an run the following commands
cd app_web
npm install
npm run dev
now you can access glTF-Compressor with Chrome or Firefox at the URL http://localhost:8000
