The Google scanned object dataset is in sdf format which references the mesh files in obj format.
This code attempt to convered the sdf format to gltf format.
The basic logic is, given an output directory and a path to the dataset, the code will:
- Create the output directory
- create a list of the dataset's .zip files
- For each .zip file in the list, it will:
- Copy the .zip file to a temporary directory
- Unzip the .zip file
- link the texture to the meshes directory
- call obj2gltf to convert the obj file to gltf file, using the .zip file's name as the gltf file's name
- Move the gltf file to the output directory
- Delete the temporary directory