Bulk conversion obj to glTF

Hi, we have about 3000 different 3d washbasins safed as .obj files. We want to convert them to .gltf with draco compression. However, we did not find a tool that can do bulk conversions.
Does anybody know of such tool?
Cheers
Urs

If you have a command-line tool that can do a single conversion, “bulk conversion” is just a script that executes that tool multiple times.

1 Like

I think you’ll need two tools, one to convert (obj2gltf) and another to draco compress (gltf-transform). Then you can just script them to run in batch. Something like this:

#!/bin/bash
FILES="path/to/*.obj"
for file in $FILES; do 
    echo "Converting $file..."
    obj2gltf -i "$file"  -o "${file%.obj}.glb"
    gltf-transform draco "${file%.glb}.glb" "${file%.glb}-draco.glb" 
done
1 Like

Thanks you - this helps a lot!