All Projects → kcoley → Gltf2usd

kcoley / Gltf2usd

Licence: mit
command-line utility for converting glTF 2.0 models to USD

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Gltf2usd

Gltf Api
API to convert OBJ, FBX and COLLADA files to glTF or GLB
Stars: ✭ 59 (-67.58%)
Mutual labels:  gltf
Gltf Viewer
glTF 2.0 Viewer written in Rust
Stars: ✭ 127 (-30.22%)
Mutual labels:  gltf
Dem.net
Digital Elevation model library in C#. 3D terrain models, line/point Elevations, intervisibility reports
Stars: ✭ 153 (-15.93%)
Mutual labels:  gltf
Gltfquicklook
macOS QuickLook plugin for glTF files
Stars: ✭ 94 (-48.35%)
Mutual labels:  gltf
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+664.29%)
Mutual labels:  gltf
Model viewer.dart
A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.
Stars: ✭ 134 (-26.37%)
Mutual labels:  gltf
3d Tiles
Specification for streaming massive heterogeneous 3D geospatial datasets 🌎
Stars: ✭ 1,054 (+479.12%)
Mutual labels:  gltf
Gltf To Usdz Research
Research and proof of concept of converting glTF to USDZ for AR Quick Look (iOS 12+).
Stars: ✭ 164 (-9.89%)
Mutual labels:  gltf
Gltfscenekit
glTF loader for SceneKit
Stars: ✭ 124 (-31.87%)
Mutual labels:  gltf
Minimal Gltf Loader
A minimal, engine-agnostic JavaScript glTF Loader.
Stars: ✭ 148 (-18.68%)
Mutual labels:  gltf
Vtuberkit
Avatar support library like an AvatarKit (Animoji)
Stars: ✭ 95 (-47.8%)
Mutual labels:  gltf
Gltf Asset Generator
Tool for generating various glTF assets for importer validation
Stars: ✭ 103 (-43.41%)
Mutual labels:  gltf
Gltfkit
An Objective-C glTF 2.0 loader and Metal-based renderer
Stars: ✭ 138 (-24.18%)
Mutual labels:  gltf
Vk raytrace
Ray tracing glTF scene with Vulkan
Stars: ✭ 91 (-50%)
Mutual labels:  gltf
Gltfast
glTF runtime loading library for Unity
Stars: ✭ 156 (-14.29%)
Mutual labels:  gltf
Ueviewer
Viewer and exporter for Unreal Engine 1-4 assets (UE Viewer).
Stars: ✭ 1,083 (+495.05%)
Mutual labels:  gltf
Code Vr
🐍 Program and explore real applications with virtual reality! Learn how to program, compete to build apps, and even collaborate with other people in realtime, in game or not!
Stars: ✭ 131 (-28.02%)
Mutual labels:  gltf
Gltf Transform
glTF 2.0 SDK for JavaScript, TypeScript, and Node.js.
Stars: ✭ 174 (-4.4%)
Mutual labels:  gltf
Sharpgltf
glTF reader and writer for .NET Standard
Stars: ✭ 159 (-12.64%)
Mutual labels:  gltf
Gltfforue4
Import glTF 2.0 in Unreal Engine
Stars: ✭ 145 (-20.33%)
Mutual labels:  gltf

gltf2usd

This tool is a command-line Python script which converts glTF 2.0 models to USD, with the goal being simple pipeline conversion from glTF to usd, usda, usdc, or usdz.

The tool is a proof-of-concept, to determine format conversion details, which could be useful for an actual C++ USD plugin. It has been developed and tested on both Windows 10 and Mac OS 10.14 Mojave Beta, using USD v18.09 and v18.11, and is built against the USD Python API.

This tool currently only works on glTF 2.0 files, based on the core glTF 2.0 specification (no extensions except PbrSpecularGlossiness and KHR_texture_transform).

Supported Features

  • glTF nodes are mapped to USD Xform
  • glTF PbrMetallicRoughnessMaterial is mapped to USDPreviewSurface
  • glTF KHR_materials_pbrSpecularGlossiness extension
  • glTF KHR_texture_transform extension (new textures are generated at the expense of a longer export time)
  • glTF Skeletal animation is mapped to UsdSkel
  • glTF node animations are supported
  • Currently supports .gltf conversion to .usd, .usda, .usdc, and .usdz

Currently not implemented:

  • .glb files
  • glTF extensions (except KHR_materials_pbrSpecularGlossiness and KHR_texture_transform)
  • Primitive modes (other than triangles)

Note:

  • The root node of the generated USD file is, by default, scaled by 100 to convert from glTF's meters to USD's centimeters. This scale is purely to be able to see the glTF models when using ARKit, or otherwise, they are too small.
  • There are several edge cases that have not been fully tested yet

Dependencies:

  • You will need to initially have USD v18.09 or v18.11 installed on your system and have the Python modules built
    • Linux users will need to build the tools themselves, or use AnimalLogic's USD Docker Container (recommended for non-CentOS users)
    • macOS users can use Apple's Prebuilt USD Toolkit. Make sure you add the USD dir to your PYTHONPATH (an easy way to do this is to run the path_to_usdpython/USD.command shell command included with the prebuilt USD Toolkit).

Python dependencies

You can install the following python dependencies using pip install -r requirements.txt:

  • Pillow (Python module for image manipulation)
  • enum34 (Python module for enums in Python 2.7)

Help Menu:

python gltf2usd.py -h
usage: gltf2usd.py [-h] --gltf GLTF_FILE [--fps FPS] --output USD_FILE
                   [--scale] [--verbose] [--arkit]

Convert glTF to USD

optional arguments:
  -h, --help            show this help message and exit
  --gltf GLTF_FILE, -g GLTF_FILE
                        glTF file (in .gltf format)
  --fps FPS             The frames per second for the animations (defaults to 24 fps)
  --output USD_FILE, -o USD_FILE
                        destination to store generated .usda file
  --scale SCALE, -s     Scale the resulting USDA model
  --verbose, -v         Enable verbose mode
  --arkit               Check USD with ARKit compatibility before making USDZ
                        file
  --use-euler-rotation  sets euler rotations for node animations instead of
                        quaternion rotations
  --optimize-textures   Specifies if image file size should be optimized and
                        reduced at the expense of longer export time
  --generate_texture_transform_texture
                        Enables texture transform texture generation
  --no-generate_texture_transform_texture
                        Disables texture transform texture generation

Sample usage:

Create a .usda file

python gltf2usd.py -g ../path_to_read_glTF_file/file.gltf -o path_to_write_usd_file/file.usda

Create a .usdz file

python gltf2usd.py -g ../path_to_read_glTF_file/file.gltf -o path_to_write_usd_file/file.usdz
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].