Python gltf to usdz converter using docker image plattar/xrutils.
This can convert .gltf
and .glb
files into apples .usdz
file type using googles available usd_from_gltf.
A requirements.txt is included and can be used to install the necessary requirements.
pip install -r requirements.txt
or (if python3 and pip3 are not the default)
pip3 install -r requirements.txt
Also docker has to be installed on the host machine. If you're using this tool on a windows machine you will have to activate the WSL option in docker and install the WSL extension for windows.
Run the main.py script with the argument -h
to see the the command info.
On the first run the script will automatically pull the docker image into your docker environment.
For a single file conversion simply type:
python main.py path/to/input/file.gltf
This will create a _out
folder inside the projects root directory.
You can also define a custom output directory by using the -o <output_path>
flag:
python main.py path/to/input/file.gltf -o /path/to/output/dir
When defining the input you can also set the parameter to a directory containing gltf files. By default every directory gets read out recursively ,so including all of its subdirectories.
To disable this set the -r
flag to False
.