Building OpenUSD on Windows (Patreon)
Downloads
Content
Many DCC apps come prepackaged with builds of Pixar's OpenUSD, but sometimes it's nice to create your own standalone version. In particular, it's very powerful to enable running a full-fledged renderer, such as RenderMan, in usdview.
OpenUSD is simple to build with the features you want. Let's look at how it's done!
To start, you'll need Visual Studio with the "Desktop development with C++" Workload selected: https://visualstudio.microsoft.com/vs/community/
You'll also need Python installed. After some testing I found that the version of OpenColorIO that works with the current USD release requires Python 3.10. You can download that version of Python here: https://www.python.org/downloads/release/python-31011/
Before starting to build USD, there are a few required Python modules. In any terminal, type:
pip install pyopengl pyside6 numpy opencolorio==2.1.3
USD comes with its own excellent build script, build_usd.py. I've taken things one step further and made a PowerShell script to totally automate the build process. Download the attached buildusd.ps1, open it in any text editor and change the $source_path and $dest_path variables to suit your needs.
(Note that you'll need RenderMan installed; the script looks for the RMANTREE environment variable.)
Next, open up a Developer PowerShell for VS 2022. You can type:
python
to confirm that Python is working before you start.
WARNING: the PowerShell script starts by removing the contents of both $source_path and $dest_path. Make sure you don't have anything important in there!
Navigate to where you downloaded the script and type:
./buildusd
Well... that's about it! in 20-30 minutes you should have a functional build of USD ready to go.
Finally, open up an Administrator PowerShell or Command Prompt and navigate to your USD build's bin folder. (Admin is required sometimes for RenderMan's license check.) Then type:
./usdview <example_scene.usd>
Replace the bracketed section with the path to the USD file you'd like to view. If all went well the scene should load and you should be able to select Prman from the Renderer menu.
Conclusion
Ultimately I'm working to configure this as a powerful lookdev tool when texturing. You could paint textures in Substance Painter or Mari, for example, then quickly switch over to usdview to see a fully rendered version of your scene in RenderMan. I'll post a new article if (when!) I get it all working.