Export the USD or USDZ with Maya

Maya 2022 has the plugin that can export USD and USDZ files. We exported the USD files and the USDZ files with it. After several attempts and errors, we were able to export USD and USDZ files with textures.

This article summarize the setup and procedures.


Our system environment

Our system environment when we created this article is following.

  • Windows 11 Pro 21H2
  • Maya 2022.3 for Windows

Texture files path

When you export the USD files or USDZ files, you may pay attension to their file paths. If the file path contains any multi bytes characters such as Japanese hiragana, katakana, kanji, full bytes characters and so on, it cause errors. The script editor reports errors as following.

// Error: Invalid asset path string -- character 27: invalid UTF-8 code point byte 0x83

You need to put the texture files at the path that not containing multi byte characters to avoid above errors. It was my blind spot that my user name contains Japanese kanji so my home folder path contains it.

Use Usd Preview Surface

Set the material of the models that will be exported to the Usd Preview Surface. The aiStandard Surface of the Arnold is not exported.

Usd Preview Surface
Usd Preview Surface

Therefore, the Arnold can’t render the Usd Preview Surface. The Maya Software Renderer and the Maya Hardware Renderer can render them.

Render with the Maya Hardware Renderer
Render with the Maya Hardware Renderer

Set the Subdivision to None

Select the “USD Export” form the files of type in the export dialog to export the USD files or USDZ files. Set the Subdivision Method to the “None (Polygonal Mesh)”. It is available in the “Geometry” in the “File Type Specific Options”.

Set the Subdivision Method to the "None (Polygonal Mesh)"
Set the Subdivision Method to the “None (Polygonal Mesh)”

If you use default value “Catmull-Clark”, the model will be crumble as a whole. The following screen captures were exported in USDZ with “Catmull-Clark” selected at the top and “None (Polygonal Mesh)” at the bottom.

None (Polygonal Mesh)
None (Polygonal Mesh)

Set the name extension to usdz

When the name extension of the file name is usdz which is entered in the export dialog, the USDZ file will be exported. If you enter the file name without the name extension, the USD file will be exported which contains references to the texture files.

Trouble Shooting: The file references in the USD file are the absolute path

If you specify the texture files os the Usd Preview Surface with the relative file path, this cause errors and texture will be not exported when you export the USD file. You must specify with the absolute path. If you put the texture files into the home directory or its directories, it is hard to work across multiple machines.

Trouble Shooting: Find the error files

If you would like to find the files cause errors, set the “.usd File Format” option of the Output in the File Specific Options to the “ASCII” and export.

Open the exported file and search asset input:file = @@. You will be able to see the materials that were not exported. When the texure is exported successfully, the file path will be written between @ and @.

Let's share this post !

Author of this article

Akira Hayashiのアバター Akira Hayashi Representative, Software Engineer

I am an application developer loves programming. This blog is a tech blog, its articles are learning notes. In my work, I mainly focus on desktop and mobile application development, but I also write technical books and teach seminars. The websites of my work and books are here -> RK Kaihatsu.