Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/autodesk/bifrost-usd
Bifrost nodes for USD
https://github.com/autodesk/bifrost-usd
Last synced: 5 days ago
JSON representation
Bifrost nodes for USD
- Host: GitHub
- URL: https://github.com/autodesk/bifrost-usd
- Owner: Autodesk
- License: apache-2.0
- Created: 2022-11-17T00:10:24.000Z (almost 2 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-30T16:09:23.000Z (14 days ago)
- Last Synced: 2024-10-30T17:20:50.511Z (14 days ago)
- Language: Mathematica
- Homepage:
- Size: 6.34 MB
- Stars: 41
- Watchers: 6
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Bifrost USD
==========A library of nodes to create USD-based scene graphs in Bifrost.
## About the Project
This project uses the [Bifrost SDK](https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_DevHelp_BifrostSDKAminoAPI_html) to implement the USD nodes to
manipulate data types like `layer`, `stage`, `prim` and `attribute` and leverage the [Bifrost Graph Editor](https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_working_in_bifrost_html) to create and author USD scene graphs procedurally.For Maya users, the project also includes a Maya plugin allowing to visualize USD stages created in Bifrost using the Maya USD proxy shape.
## Building
You must provide the following variables to the cmake command:
* BIFUSD_PACKAGE_NAME : By default Bifrost will load the USD Pack, named `usd_pack`, from its installation directory. You must use a different name for your custom build of the pack.
* CMAKE_BUILD_TYPE : Debug, Release, RelWithDebInfo
* CMAKE_INSTALL_PREFIX : Where you want to install the bifrost-usd-pack library
* BIFROST_LOCATION : The full path to the root directory of your Bifrost installation that contains, among others, the `sdk` subdirectory. The USD Pack will be built against this `sdk` subdirectory of your Bifrost installation.
* USD_LOCATION : The full path to the root directory of your USD library installation that contains, among others, the `cmake`, `include`, `lib`, `plugin` and `share` subdirectories.
* MAYA_RUNTIME_LOCATION : (for the Maya extension only) The full path to the root directory of your Maya development installation that contains, among others, the `bin`, `include` and `lib` subdirectories.
* BIFUSD_OSX_ACTIVE_SDK : (optional) Can be set to choose a specific macOS SDK. If not set, the currently available SDK will be used.
* BIFUSD_OSX_MIN_OS : (optional) Can be set to choose the minimum macOS deployement target. If not set, macOS 11.0 will be used.
* BIFUSD_OSX_BINARY_ARCH : (optional) Can be set to choose the target architecture to build on macOS. Acceptable values are `x64` (Intel CPU), `arm64` (Apple M1 CPU), `ub2` (Universal Binary 2 - both x64 and arm64) and empty (default) (host system's processor).
* BIFUSD_EXAMPLES : (optional) Install the examples. ON by default. Set it to OFF if you don't want to install the extra compounds packs and Maya plugin.
* BIFUSD_EXAMPLES_TESTS: (optional) Creates the examples tests. OFF by default (requires MAYA_USD_PLUGIN_DIR and LOOKDEVX_PLUGIN_DIR).
* MAYA_USD_PLUGIN_DIR: (optional) Root directory of the Maya USD plugin where the mayaUSD.mod file is located. Only required to run examples tests.
* LOOKDEVX_PLUGIN_DIR: (optional) Root directory of the LookdevX plugin where the lookdevx.mod file is located. Only required to run examples tests.__C++17 is the minimal required version going forward.__
__Python 3 version is assumed.__
__If your build uses MAYA_RUNTIME_LOCATION, you will need to use the same USD version than MayaUSD plugin.__
cmake configure example:
Note: we use the Ninja generator which is a single configuration generator.
```
cmake -G Ninja -S -B \
-DCMAKE_MAKE_PROGRAM=
-DBIFUSD_PACKAGE_NAME="studioname_usd_pack" \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX= \
-DBIFROST_LOCATION= \
-DUSD_LOCATION="/usd/20.11" \
-DMAYA_RUNTIME_LOCATION=
```cmake build and install example:
```
cmake --build --target install
```To build doxygen doc (require doxygen 1.8.14):
```
cmake --build --target usd_pack_apidoc
```To run clang-tidy
```
cmake --build --target bifrost_usd_clang_tidy
```## Testing
```
cd /test
rm `find . -name "*.usd"`
ctest . -V
```## Versioning
The USD Pack version is set in the cmake/version.info file. Such version number is prepended to your USD Pack name.## Loading the USD Pack in Bifrost Extension for Maya
You will need to disable the USD Pack shipped with Bifrost by setting the BIFROST_DISABLE_PACKS environment variable to "usd_pack" (`export BIFROST_DISABLE_PACKS=usd_pack`).
Then you will need to set `BIFROST_LIB_CONFIG_FILES` to `/-1.0.0/plugin_config.json`.`plugin_config.json` includes:
* `usd_pack_config.json`: Adds the USD nodes (available from the tab menu in the Bifrost Graph Editor).
* `usd_maya_translation.json`: Adds the Bifrost to Maya type translation (used to pass the USD stage from Bifrost to the mayaUsdProxyShape)## If you only need the Bifrost USD nodes
For example, if you only need to run the Bifrost standalone [bifcmd tool](https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_bifcmd_Using_bifcmd_html) or if you built without -DMAYA_RUNTIME_LOCATION then you can load the USD nodes in a Bifrost environment just by setting BIFROST_LIB_CONFIG_FILES to /usd_pack-1.0.0/usd_pack/usd_pack_config.json.