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:
- Download Pre-build USD binaries from Nvidia
- 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
- get demo usd scene e.g. esper room
- 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 :
- Clone USD repo
- Add it to include path in C++ (which is specific to your C++ setup)
- Write example USD code (it can be as simple cout USD version)
- 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.