An example USD schema/adapter implementing a simple triangular mesh decimation using libigl.
Example "Maneki" animation USD asset made available by J CUBE
- Pixar OpenUSD
- CMake
git clone https://github.com/jerenchen/usd-simple-decimation-schema.git
cd usd-simple-decimation-schema
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=</path/to/usd/plugins> -DCMAKE_BUILD_TYPE=Release ..
make -j8 && make install
The content of </path/to/usd/plugins>
should look like this:
</path/to/usd/plugins>
└── plugin
├── plugInfo.json
├── trimesh
│ └── resources
│ ├── generatedSchema.usda
│ └── plugInfo.json
├── trimeshImaging
│ └── resources
│ └── plugInfo.json
└── trimeshImaging.dylib
Finally, make sure path </path/to/usd/plugins>
is added to the env var PXR_PLUGINPATH_NAME
for plug-in discovery.
Before opening the demo, either download the example USD asset from here or via CMake:
cd usd-simple-decimation-schema/demo
mkdir build_demo && cd build_demo && cmake .. && cd ..
With both simple-deciamte.usda
and maneki_anim.usd
present in the same directory, run the following command to view the demo:
usdview simple-decimate.usda