Setup USD environment for the first time

Hello everyone,

I am new to the openUSD world.
I followed many USD courses/guides where I learned about USD concepts and wrote some python code to play around with USD in Jupyter notebooks as well as Houdini.

So far I tried the following setups:

Setup 1: usd-core and jupyter notebook

It’s the easiest setup to get your hands dirty.

This extensivly used in Nvidia’s tutorials, e.g. USD-Tutorials-And-Examples

Steps:

Run the following commands in terminal.

pip install jupyter
pip install usd-core

Verify installation

In jupyter I can run the following example to verify my installation.

from pxr import Usd
print(Usd.GetVersion())

Setup 2: Pre-Built Libraries and Tools

This setup offers more capabilities. e.g. you have usdview tool.

You should use a compatible built version with the version of python on your machine.

Steps:

  1. Download Pre-build USD binaries from Nvidia
  2. Set Environment variables before running python/jupyter (I don’t won’t to set them in user or system environment. so, I set them before running USD tools)
set PATH=%PATH%;E:\USDROOT\bin;E:\USDROOT\lib; 
set PYTHONPATH=%PYTHONPATH%;E:\USDROOT\lib\python;E:\USDROOT\python\Lib;

Verify installation

You can run the same example.

from pxr import Usd
print(Usd.GetVersion())

Also, you can run usdview

  1. get demo usd scene e.g. esper room
  2. Run usdview
    usdview esper_room_v3\EsperRoom.usda
    

Setup 3: Use Houdini Command Line Tools

Since I’m a Houdini guy I have access to Houdini command line tools.
Houdini comes with pre-built Libraries!

No steps or verification required.
you only use hcmd!
this is how it looks on my side.

"C:\Program Files\Side Effects Software\Houdini 19.5.805\bin\hcmd.exe"

My issue

So far this was good enough. BUT, How could I setup my environment for developing in C++ and Python.
Are there any step by step guides that demonstrate the full process ?
As far as I know the full process is as follows :

  1. Clone USD repo
  2. Add it to include path in C++ (which is specific to your C++ setup)
  3. Write example USD code (it can be as simple cout USD version)
  4. compile and run it

But, when do I need to build the library or my code ? and How do I add the python bindings ?

And, Many many thanks.
Mustafa.

1 Like

why can’t I modify my own post ?

This might have to do with you being a new user to the forum.

It’s a common ‘anti-spam’ pattern to disable editing posts for new users because there’s a tendency for bots to post “valid topics” and then edit them after a few days or so to the actual spam message. It could be that you need to have a higher “trust level”. It could even be that now after your second post here that your trust level has increased and you can now suddenly edit! :slight_smile: But could also be that you need to be just one level higher, which I think is “member”. According to this the default behavior for “editing posts up to 30 days” you need to be Trust Level 2: Member.

Ah, reading it again I think at Trust Level 1 (which you are now) you should not be able to:

Edit your own posts after more than 24 hours

Which would mean that you should now still be able to edit your new post, but not the first if the first was say now 24+ hours ago.

Anyway, had a quick look on my own posts - I seem to be able to edit my older posts so it doesn’t appear that there’s a very short time limit set for how long a post can be edited for.

1 Like

Thanks man! I guess I need to be more active here.
because I have good news!
I was able to fix my issue and wrote my first cpp program that includes pxr/pxr.h and can’t wait to update my post.