Archives For January 2019

Pixar USD on Windows 10

January 4, 2019

Well after a mind-numbing experience building USD on Windows, a feat I won’t be repeating in a hurry, due to how shit it is, I present a much easier route, which results in minimal hair loss. Victor Yudin has been busy compiling and releasing USD + goodies under his saturn github.

It comes with UsdView, Embree plugin, Maya 2018 plug, MaterialX, and OSL support. Hurray! Thank Jesus. What we will do is get his compiled version up and running, bind the cmd file to the .usd extension so we can just double-click, and even add a USD icon!
It will be, almost useful.

Grab this version: https://github.com/VictorYudin/saturn/releases/download/1.0.160/usd-v18.11.tar.xz

As the latest Houdini 17 USD plugins(which we will compile in the next exciting episode)
are built against v18.11, not the more recent v19.01, simple huh?

usd_unzipped

So once we unzip it’s almost ready to go, except that the “usdview.cmd” script inside the bin folder only contains the following:

@python “%~dp0usdview” %*

We need to add some more info in here to help point everything to the correct versions/locations of all the shit it needs. So delete that lonely line, and fillĀ  the script with the following.

@set BINP=%~dp0
@set LIBP=%~dp0..\lib
@set PYP=%~dp0..\lib\python
@set PATH=%PATH%;%BINP%;%LIBP%
@set PYTHONPATH=%PYTHONPATH%;%PYP%
@start pythonw “%~dp0usdview” %*

This is so simple, it feels like installing a Windows 98 screen saver. Let’s continue! Next on the list is testing out our setup to see if UsdView launches. Now is a good time to grab some USD data, head on over to: http://graphics.pixar.com/usd/downloads.html and grab the kitchen set. Once you’ve unpacked, we need to open a terminal, and cd to the bin folder. the command for launching is simply: usdview “path/to/usd” see below.

usdview_launch

Like the Angel in it’s a Wonderful Life, you just have to believe you are making a difference, and to hang on. Let’s see what happens….

usdview_gl_hydra.JPG

Huzzah! We made it Wendell. By default the viewport is the hydra openGL, but Victor compiled Embree too, so if we go to View>Hydra Renderer> Embree we will toggle over to ray traced land. It’s a fair bit slower, so be mindful of zooming around. There is preliminary AOV support in this mode.

usdview_embree

And prim ID and Normal AOVs.

usdview_embree_aovid

usdview_embree_aovn

Sweet. Now this is all good and well, and we could/should create a shell working environment that has usdview in the path, etc, etc, but let’s go all out lazy Windows double-click shall we?

The file extension .usd isn’t registered in Windows, so we need to do this manually. Fire up a terminal in “admin-super-overlord-mode”

type the following: ftype extfile=”W:\Pipeline\usd\bin\usdview.cmd” “%1”

obviously replace the path with your location.

Next type the following: assoc .usd=extfile

Now if you double-click the Kitchen_set.usd file it should launch usdview. For our final trick, we need to use a nice free utility, that doesn’t even install!

file types manager

Grab the x64 version here: http://www.nirsoft.net/utils/filetypesman-x64.zip and unzip that bad boy. Launch the application directly, and scroll on down to .usd file type.

filetypeman1

Right click the usd extension and select “edit selected file type.” navigate to the location of the .ico file, and maybe even pop a brief description in. Here’s a link to a little USD ico file I made: usd_simple64.ico

filetypeman2.JPG

In the next exciting installment we compile the Houdini 17 USD plugins from scratch, and demo exporting out.
usdview.gif