kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

large texture size after convert #170

Open ang88myt opened 5 years ago

ang88myt commented 5 years ago

OneCommanderV2_08-14

ang88myt commented 5 years ago

how can I reduce it to the same size as gltf? why the texture conversion is not 1:1? Please help.

kcoley commented 5 years ago

Hi @ang88myt. Due to occlusion metallic roughness texture unpacking and texture transforms with pillow, new images get generated, though pillow does not preserve the original compression. This step was needed since texture swizzling was not working on iOS 12.

There is an —optimize-textures flag that attempts to reduce file size at the expense of a bit longer export time.

ang88myt commented 5 years ago

Hi kcoley, thank you. could your confirm the usage below if it is correct way? python gltf2usd.py -g ../path_to_read_glTF_file/file.gltf -o path_to_write_usd_file/file.usdz --optimize-textures