With my background in VFX I’ve been closely watching the development around USD for a couple of years. However it took me until 2019 to get hands-on experience with it. Since then I built different versions of Pixar’s USD framework and the USD Maya plugin from Autodesk for Windows.

Building both seems to be a daunting task, but it turns out to be pretty straightforward, once the setup is correct. Especially for building the USD Maya plugin I found it important to use the correct combination of versions.

This blog post describes my process of building v20.11 of the Pixar USD Framework, v0.5.0 of the Autodesk USD plugin for Maya 2018.6, and v0.6.0 of the Autodesk USD plugin for Maya 2020.2.

I settled with these versions because v0.6.0 of the Autodesk USD plugin would not run for Maya 2018.6 and Maya 2020.3. That’s why ended up building v0.5.0 for Maya 2018.6.

Additional Resources

Both repositories provide detailed information on how to build them. However I found that especially for Windows they lack some specifics.

In this regard a blog post from Manic Machine has been very helpful. It goes more into the details of building USD for Windows.

Prerequisites

Make sure you have the following programs installed. Chocolatey is a great source for them.

Visual Studio

It’s important to use the correct version of Visual Studio based on the targeted version of Maya.

Visual Studio 2015 (for Maya 2018.6)

choco install visualstudio2015professional
choco install visualcppbuildtools

Visual Studio 2017 (for Maya 2020.2)

choco install visualstudio2017professional
choco install visualcpp-build-tools

Python

choco install python2

It’s important that the python and pip commands point to the Python 2 installation. Also the following Python packages are needed.

pip install pyopengl
pip install pyside
pip install pyyaml
pip install jinja2

I tried to use a virtual environment for installing the required Python packages and running the build, but it wouldn’t work. The virtual environment doesn’t provide the Python libraries that are needed during the build.

CMake and NASM

choco install cmake
choco install nasm

I ran into some issues with CMake for Visual Studio being outdated and causing problems. Uninstalling the version that ships with Visual Studio and using this one instead solved the problem.

The paths for both, CMake and NASM, need to be added to the PATH environment variable. In my case these are the following ones.

C:\Program Files\CMake\bin
C:\Program Files\NASM

Maya

To follow along with the build instructions of this blog post an installation of Maya 2018.6 and Maya 2020.2 is needed. Also the corresponding development kits are needed that can be downloaded from the Maya Developer Center.

Build Pixar USD Framework

NVIDIA provides pre-built versions of the USD framework. However, they don’t include boost dependencies that are needed for building the Maya USD plugin.

  1. Open the Developer Command Prompt for Visual Studio. It’s important to use exactly the command prompts listed below. Otherwise this will leads to problems during the build process that are difficult to debug.
    • Maya 2018.6: Developer Command Prompt for VS 2015
    • Maya 2020.2: Developer Command Prompt for VS 2017
  2. Clone the repository for the Pixar USD Framework.
    • C:\git\github\pixar> git clone https://github.com/PixarAnimationStudios/USD
  3. Check out the tag for the version you want to build. At the time of writing this blog post v20.11 was the latest version.
    • git fetch –all
    • git tag -a v20.11 -m
  4. Run the Python build script. The boost arguments are needed to build parts of the Maya USD plugin.
    • Maya 2018.6: C:\git\github\pixar\usd> python build_scripts\build_usd.py "C:\build\pixar\usd\v20.11-msvc.14.00" --buildargs boost,"--with-date_time --with-thread --with-system --with-filesystem"
    • Maya 2020.2: C:\git\github\pixar\usd> python build_scripts\build_usd.py "C:\build\pixar\usd\v20.11-msvc.14.16" --buildargs boost,"--with-date_time --with-thread --with-system --with-filesystem"

Build USD Maya Plugin

  1. Download the Maya Developer Kits for Maya 2018.6 and Maya 2020.2. It’s important to use the developer kit matching the installed version of Maya. Place them in the following locations.
    • Maya 2018.6: C:\git\github\autodesk\Autodesk_Maya_2018_6_Update_DEVKIT_Windows
    • Maya 2020.2: C:\git\github\autodesk\Autodesk_Maya_2020_2_Update_DEVKIT_Windows
  2. As before for the Pixar USD framework, open the Developer Command Prompt for Visual Studio. It’s important to use exactly the command prompts listed below. Otherwise this will leads to problems during the build process that are difficult to debug.
    • Maya 2018.6: Developer Command Prompt for VS 2015
    • Maya 2020.2: Developer Command Prompt for VS 2017
  3. Clone the repository for the Autodesk USD plugin for Maya. C:\git\github\autodesk> git clone https://github.com/Autodesk/maya-usd
  4. Check out the tag for version v0.6.0.
    • git fetch –all
    • git tag -a v0.6.0 -m
  5. Run the Python build script to build the plugin for Maya 2018.6 and Maya 2020.2.
    • Maya 2018.6: C:\git\github\autodesk\maya-usd> python build.py --maya-location "C:\Program Files\Autodesk\Maya2018" --pxrusdlocation C:\build\pixar\usd\v20.11-msvc.14.00 --devkit-location C:\git\github\autodesk\Autodesk_Maya_2018_6_Update_DEVKIT_Windows D:\build\autodesk\maya-usd\v0.6.0-usd.20.11-maya.2018.6-msvc.14.00 --stages=clean,configure,build,install,package
    • Maya 2020.2: C:\git\github\autodesk\maya-usd> python build.py --maya-location "C:\Program Files\Autodesk\Maya2020" --pxrusdlocation C:\build\pixar\usd\v20.11-msvc.14.16 --devkit-location C:\git\github\autodesk\Autodesk_Maya_2020_2_Update_DEVKIT_Windows D:\build\autodesk\maya-usd\v0.6.0-usd.20.11-maya.2020.2-msvc.14.16 --stages=clean,configure,build,install,package

Troubleshooting

The build may fail for multiple reasons. The most common ones are listed below:

  • Missing dependencies like compiler, tools, redistributables.
  • Version of Pixar USD Framework is not compatible with version of USD Maya plugin.