https://github.com/jerenchen/usd-simple-decimation-schema
A simple USD schema/adapter for triangular mesh decimation
https://github.com/jerenchen/usd-simple-decimation-schema
geometry-processing mesh-decimation openusd
Last synced: 11 months ago
JSON representation
A simple USD schema/adapter for triangular mesh decimation
- Host: GitHub
- URL: https://github.com/jerenchen/usd-simple-decimation-schema
- Owner: jerenchen
- License: bsd-3-clause
- Created: 2023-04-28T22:08:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-12T04:48:51.000Z (almost 2 years ago)
- Last Synced: 2025-03-20T22:07:01.566Z (about 1 year ago)
- Topics: geometry-processing, mesh-decimation, openusd
- Language: C++
- Homepage:
- Size: 569 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# usd-simple-decimation-schema
An example USD schema/adapter implementing a simple triangular mesh decimation using [libigl](https://github.com/libigl/libigl).

Example "Maneki" animation USD asset made available by [J CUBE](https://j-cube.jp/solutions/multiverse/assets/)
## Prerequisite
* [Pixar OpenUSD](https://github.com/PixarAnimationStudios/OpenUSD)
* CMake
## Build
```shell
git clone https://github.com/jerenchen/usd-simple-decimation-schema.git
cd usd-simple-decimation-schema
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release ..
make -j8 && make install
```
The content of `` should look like this:
```shell
└── plugin
├── plugInfo.json
├── trimesh
│ └── resources
│ ├── generatedSchema.usda
│ └── plugInfo.json
├── trimeshImaging
│ └── resources
│ └── plugInfo.json
└── trimeshImaging.dylib
```
Finally, make sure path `` is added to the env var `PXR_PLUGINPATH_NAME` for plug-in discovery.
## Demo
Before opening the demo, either download the example USD asset from [here](https://j-cube.jp/solutions/multiverse/assets/) or via CMake:
```shell
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:
```shell
usdview simple-decimate.usda
```
## Resources
* [USD-Cookbook: Custom schema with Python binding](https://github.com/ColinKennedy/USD-Cookbook/tree/master/plugins/custom_schemas_with_python_bindings)