2

Hello everyone I'm trying to unzip a USDZ file, modify a texture, and then zip the USDZ file again, but it breaks.

Is there any special way to zip the file back? Even if I decompress and compress again it stops working and has different file size.

I'm using no compression and no encryption to zip the file. One thing I have noticed is that the attribute "Needed to extract" for the USDZ file is "2.0 or later" while my new zip file value is "1.0 or later". Also the files in the original USDZ zip have some extra fields I cannot read or add to my new file.

What could be happening? Any help would be appreciated.

Andy Jazz
  • 36,357
  • 13
  • 107
  • 175

2 Answers2

3

Unzip usdz file

To unzip a usdz file in macOS use the following method (if you don't have a Mac use a Hackintosh):

  • In Finder change the extension of .usdz file to .zip.
  • Uncompress .zip file by double-clicking it.
  • Open unzipped directory and change the .png textures of your model.

enter image description here


Create usdz file again

Make sure that Xcode 13 is installed.

To convert a content of unzipped folder (binary usdc file and its textures) to usdz file format again, use the following command in Terminal.app:

usdzconvert ~/Desktop/file.usdc -diffuseColor Grammophone_Albedo.png 
                                -metallic Grammophone_Metallic.png
                                -occlusion Grammophone_AO.png
                                -normal Grammophone_Normal.png
                                -roughness Grammophone_Roughness.png

And here's a additional info about usdzconvert command for Xcode 13/12/11/10.


enter image description here

Andy Jazz
  • 36,357
  • 13
  • 107
  • 175
0

To pack my modified USDZ file back, I used the tools provided here: https://github.com/PixarAnimationStudios/USD (usdzip) which works in Windows and Linux.