glTF-to-USD converter w/ MaterialX (Apache-2.0); normalizes glTF assets to USD in kreeader-studio | mirror of github.com/pablode/guc
  • C++ 89.7%
  • CMake 7.2%
  • C 3.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-11-16 10:48:28 +01:00
.github/workflows GA: remove USD v24.03 and v24.05 2025-11-10 19:48:32 +01:00
cmake Backport MSVC compiler flag change from USD 2025-08-02 20:08:21 +02:00
docs Major documentation improvements 2025-11-16 10:48:24 +01:00
extern Implement EXT_meshopt_compression extension 2024-10-27 16:02:39 +01:00
src Don't use deprecated UsdObject::SetDisplayName in future USD versions 2025-11-10 19:48:32 +01:00
.gitignore initial commit 2022-05-02 10:30:58 +02:00
.gitmodules Add meshoptimizer v0.21 submodule 2024-10-27 14:56:12 +01:00
CHANGELOG.md Update changelog for v0.5 release 2025-11-16 10:48:28 +01:00
CMakeLists.txt Fix incorrect comment regarding monolithic USD 2025-02-09 12:08:01 +01:00
LICENSE Add meshoptimizer to LICENSE file 2024-11-09 09:13:57 +01:00
preview_glTFSampleViewer.png initial commit 2022-05-02 10:30:58 +02:00
preview_hdStorm.png initial commit 2022-05-02 10:30:58 +02:00
README.md Major documentation improvements 2025-11-16 10:48:24 +01:00

guc

USD v25.11 USD v25.08

guc is a glTF to Universal Scene Description (USD) converter.

It aims to represent glTF assets a closely as possible within USD. To that end, it uses MaterialX as a standard for material and look interchange.

All glTF features with the exception of animation and skinning are implemented and get continuously tested in guc's test suite.

Wayfair's Iridescent Dish with Olives (CC BY) converted to USD+MaterialX with guc and rendered in Storm (left). The same model in Khronos's glTF Sample Viewer (right).

Build

You need USD v24.08+ (e.g. v25.08) with MaterialX support enabled.

Do a recursive clone of the repository and set up a build folder:

git clone https://github.com/pablode/guc --recursive
mkdir guc/build && cd guc/build

Pass following parameters in the CMake generation phase:

cmake .. -Wno-dev -DCMAKE_BUILD_TYPE=Release

Build the executable:

cmake --build . -j8 --config Release

Note: set BUILD_SHARED_LIBS for shared builds, and CMAKE_MSVC_RUNTIME_LIBRARY to USD's MSVC ABI.

Usage

guc 0.5 - glTF to USD converter

Usage: guc [options] [--] <gltf_path> <usd_path>

Options:
  -m, --emit-mtlx                            Emit MaterialX materials in addition to UsdPreviewSurfaces
  -u, --mtlx-as-usdshade                     Convert and inline MaterialX materials into the USD layer using UsdMtlx
  -v, --default-material-variant=<index>     Index of the material variant that is selected by default
  -s, --skip-validation                      Skip glTF validation for reduced processing time
  -l, --licenses                             Print the license of guc and third-party libraries
  -h, --help                                 Show the command help

Both glTF and GLB file types are valid input. USDA, USDC and USDZ formats can be written.

Documentation

Extension support

Name Status                        
EXT_meshopt_compression Complete
KHR_draco_mesh_compression Complete
KHR_gaussian_splatting 🚧 In Progress
KHR_lights_punctual Partial 1
KHR_materials_clearcoat Complete
KHR_materials_emissive_strength Complete
KHR_materials_ior Complete
KHR_materials_iridescence Complete
KHR_materials_sheen Complete
KHR_materials_specular Complete
KHR_materials_transmission Complete
KHR_materials_unlit Complete
KHR_materials_variants Complete
KHR_materials_volume Partial 2
KHR_mesh_quantization Complete
KHR_texture_transform Complete

[1] Spotlight cone falloff is ignored.
[2] Thickness is not supported by the MaterialX glTF PBR implementation.

License


   Copyright 2024 Pablo Delgado Krämer

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.