kcoley / gltf2usd

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

Texture conversion ends up in white texture #159

Closed ghost closed 5 years ago

ghost commented 5 years ago

Somehow this glTF material gets its texture converted to a white map and the original textures get replace by white ones.

This was working before but somehow now it's not anymore. Any idea on your side why its broken?

conver-me.zip

ghost commented 5 years ago

We find the problem.

When we create an USDZ in the same folder than our glTF with an ORM map (occlusion roughness metalness). The converter splits the O and somehow overrides the source file. After that, it uses the newly created file to create the R and M:

this files: 68747470733a2f2f692e696d6775722e636f6d2f41424250774d462e706e67

become: 68747470733a2f2f692e696d6775722e636f6d2f766671446364542e706e67


if you use a different folder: 68747470733a2f2f692e696d6775722e636f6d2f7051637a4338572e706e67

kcoley commented 5 years ago

@sayduck-daniel just merged a fix so usd creation happens in a temp directory before being copied over to the specified directory