Skip to content

Godot GDExtension: Draco-Compressed GLTF/GLB Import Support

License

Notifications You must be signed in to change notification settings

itslebi/GDDraco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDDraco

Godot GDExtension: Draco-Compressed GLTF/GLB Import Support

This GDExtension adds support to the Godot Engine for importing .gltf and .glb files with Draco-compressed meshes via the KHR_draco_mesh_compression extension.

This extension uses the Draco Decoder found in Blender's Draco SDK Wrapper and it uses the official Draco SDK version 1.5.7.


Index


Features

  • Full support for loading Draco-compressed geometry in glTF 2.0 files.
  • Seamless integration with Godot's existing GLTF/GLB import pipeline.
  • Built as a GDExtension — no need to recompile the engine.
  • Cross-platform support (depending on how you build the Draco library).

How to Use

Prerequisites

  • Godot 4.5
    ⚠️ This extension was tested with Godot 4.5. It may work with other 4.x versions, but compatibility is not guaranteed.

1. Download the Latest Release

You can find the latest release for Windows and Linux in Releases. For MacOs users you can follow the guide on the developer build to build your own release.

2. Add it to your project

Unzip the file from the release and add the resulting folder on your main project directory.

3. Done

You can import your .glb and .gltf now.


Developer Build

Prerequisites

  • Godot 4.5
    ⚠️ This extension was tested with Godot 4.5. It may work with other 4.x versions, but compatibility is not guaranteed.
  • C++ build environment (GCC/Clang/MSVC)
  • Python
  • SCons (used for building)
    ⚠️ Godot CPP is used by this project and is provided in the source code already. ⚠️ Draco SDK is used by this project and is provided in the source code already. ⚠️ VS Code is recommended and the base import path settings are provided.

1. Clone the Repository

git clone https://github.com/itslebi/GDDraco
cd GDDraco

2. Building

Run the following command inside the main GDDraco folder:

scons target=template_release

⚠️ If Godot CPP does not build automatically please refer to their documentation and build it manually.

⚙️ This will build the GDExtension and output the compiled binary (.dll or .so) in the demo/bin/ directory.

3. Testing

⚠️ Remember to verify if your compiled binary is present in the gddraco.gdextension file. Use the demo project in the demo/ folder:

  • Open the project with Godot
  • Reimport the existing .glb file with Draco compression
  • Or try importing your own files

License

GDDraco is open source and licensed under the MIT License. You are free to use, modify, and distribute this software as long as the original license and copyright notice are included.

Please note:

  • Google Draco is licensed under the Apache 2.0 License
  • Blender source code used for the wrapper is licensed under Apache 2.0 License (note that blender's source code is actually under GPL but these files contain an header stating otherwise).

Make sure to verify compatibility based on how you distribute or bundle binaries.


Credits

This extension was made by me alone but it would not be possible without the below open source projects!

© 2025 @itslebi — Contributions welcome!