A plugin for Pixar's USD (Universal Scene Description) that defines a custom schema for a grass blade, a Hydra Imaging Adapter for it, and a utility plugin for usdview for creating a grass blade prim.
GrassBladePlugin provides the following USD plugins:
- usdGrass: A schema library defining a Grass prim type.
- usdGrassImaging: A Hydra 1 only prim adapter which images the Grass prim type.
- usdviewGrass: A usdview plugin providing a menu command to define child Grass prim(s) under selected paths.
The following dependencies are required:
- C++ compiler
- CMake (Tested with CMake 3.27.1)
- USD (24.08)
- Boost and Intel TBB (USD dependencies)
- Python
Example snippet for building the plugins on Linux:
mkdir build
cd build
cmake \
-DUSD_ROOT="~/USD/" \
-DCMAKE_INSTALL_PREFIX="~/grassBladePlugin/" \
..
cmake --build . -- VERBOSE=1 -j8 all test install
Replace "~/USD/"
with your USD installation directory, and "~/grassBladePlugin/"
with where you wish to install this plugin.
To register the plugin as part of the USD runtime, the following environment variables will need to be defined (instructions for Linux):
Environment Variable | Value(s) |
---|---|
PYTHONPATH |
${DISPLAYLAYERPLUGIN_INSTALL_ROOT}/lib/python |
PXR_PLUGINPATH_NAME |
${DISPLAYLAYERPLUGIN_INSTALL_ROOT}/lib/usd ${DISPLAYLAYERPLUGIN_INSTALL_ROOT}/plugin/usd |
LD_LIBRARY_PATH |
${DISPLAYLAYERPLUGIN_INSTALL_ROOT}/lib |
To enable debug statements, run the following command in your terminal:
export TF_DEBUG="USDGRASSIMAGING"
This project uses https://github.com/wetadigital/USDPluginExamples as a template.