drwave / usd-sketchup

Source & macOS binary of USD exporter for SketchUp
Other
63 stars 5 forks source link

texture export can sometime report the wrong file extension #17

Closed drwave closed 5 years ago

drwave commented 6 years ago

When exporting this file, we see that it writes out a PNG into the Textures directory "B23A2.png", but in the USDA file we're writing out a reference to the texture, we're writing out "B23A2.BMP". I assume that's because it was originally a BMP file, but SketchUp has decided to change it to PNG (which is great, since USD doesn't generally support BMP), but wherever we're reading the texture name we need to make sure it's mapping to the file on disk.

FloorTile_NoComponent.zip Archive.zip

drwave commented 5 years ago

I'm currently handling tga and bmp - will reopen if we find other extensions that this happens with.

wave-electron commented 5 years ago

@drwave Just tried your latest exporter plugin. Still not working. For usda conversion. Creates the uv_map as png & saves it om directory under filename_textures, but it is still referencing the tga file extension still in the usa file. So maybe you forgot to update the file extension to the new png extension in your code?

 asset inputs:file = @GiraffeTest_textures/Giraffe_D.tga@

Not_working.zip

In respect to a direct usdz conversion, also not displaying material, after unpacked the usdz achive and no material exists to reference... only a usdc file present. I also exploded any components before exporting. It does say on the export dialogue for the usdz export that a material was found.

wave-electron commented 5 years ago

@drwave So after changing the tga extension in the usda file manually to png... then using the usdz_converter the new usdz file previews correctly in iOS12.

drwave commented 5 years ago

Huh. Will try to repro here.

On Sep 18, 2018, at 9:28 PM, Ashley Joyce notifications@github.com wrote:

@drwave https://github.com/drwave Just tried your latest exporter plugin. Still not working. For usda conversion. Creates the uv_map as png & saves it om directory under filename_textures, but it is still referencing the tga file extension still in the usa file. So maybe you forgot to update the file extension to the new png extension in your code?

asset inputs:file = @GiraffeTest_textures/Giraffe_D.tga@ Not_working.zip https://github.com/drwave/usd-sketchup/files/2395395/Not_working.zip In respect to a direct usdz conversion, also not displaying material, after unpacked the usdz achive and no material exists to reference... only a usdc file present. I also exploded any components before exporting. It does say on the export dialogue for the usdz export that a material was found.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/drwave/usd-sketchup/issues/17#issuecomment-422647876, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmgOuPnctaHJsxvYvQEuQKkr54n9B-4ks5uccgCgaJpZM4WqmcU.

drwave commented 5 years ago

Please uninstall the plug-in (throw it in trash) and reinstall from the one on GitHub.

I just did that with the one I uploaded yesterday, exported the giraffe, and get:

                asset inputs:file = @GiraffeGit_textures/Giraffe_D.png@

So I believe the correct one is there already.