-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from OmooLab/feature/dev
Feature/dev
- Loading branch information
Showing
19 changed files
with
691 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,8 @@ on: | |
- "release/*" | ||
|
||
jobs: | ||
draft_release: | ||
name: Draft Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.draft_release.outputs.upload_url }} | ||
version: ${{ steps.set_env.outputs.version }} | ||
steps: | ||
- name: Set Version Env | ||
id: set_env | ||
run: | | ||
ref_name=${{ github.ref_name }} | ||
echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT" | ||
- name: Get release | ||
id: draft_release | ||
uses: cardinalby/[email protected] | ||
with: | ||
releaseName: Draft | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
# draft_release: | ||
# name: Draft Release | ||
# permissions: | ||
# contents: write | ||
# pull-requests: write | ||
# runs-on: ubuntu-latest | ||
# outputs: | ||
# upload_url: ${{ steps.draft_release.outputs.upload_url }} | ||
|
@@ -41,25 +18,50 @@ jobs: | |
# run: | | ||
# ref_name=${{ github.ref_name }} | ||
# echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT" | ||
# - name: Draft Release ${{ steps.set_env.outputs.version }} | ||
# uses: release-drafter/release-drafter@v5 | ||
# - name: Get release | ||
# id: draft_release | ||
# uses: cardinalby/[email protected] | ||
# with: | ||
# name: ${{ steps.set_env.outputs.version }} | ||
# tag: ${{ steps.set_env.outputs.version }} | ||
# releaseName: Draft | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# GITHUB_TOKEN: ${{ github.token }} | ||
|
||
draft_release: | ||
name: Draft Release | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.draft_release.outputs.upload_url }} | ||
version: ${{ steps.set_env.outputs.version }} | ||
steps: | ||
- name: Set Version Env | ||
id: set_env | ||
run: | | ||
ref_name=${{ github.ref_name }} | ||
echo "version=${ref_name#release/}" >> "$GITHUB_OUTPUT" | ||
- name: Draft Release ${{ steps.set_env.outputs.version }} | ||
uses: release-drafter/release-drafter@v5 | ||
id: draft_release | ||
with: | ||
name: ${{ steps.set_env.outputs.version }} | ||
tag: ${{ steps.set_env.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build_houdini_package: | ||
name: Build Houdini Package | ||
upload_houdini_package: | ||
name: Upload Houdini Package | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Zip Package | ||
run: | | ||
zip -r package.zip packages python README.md | ||
rm -r assets/Icons | ||
rm -r assets/OCIO | ||
zip -r package.zip assets packages python README.md | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
|
@@ -70,18 +72,99 @@ jobs: | |
asset_path: ./package.zip | ||
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}.zip | ||
asset_content_type: application/zip | ||
|
||
build_blender_addon: | ||
name: Build Blender Add-on | ||
|
||
upload_substance_plugin: | ||
name: Upload Substance 3D Painter Plugin | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Zip Add-on | ||
run: | | ||
cd plugins/Substance3D_Painter | ||
zip -r package.zip assets python | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./plugins/Substance3D_Painter/package.zip | ||
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_SubstanceBridge.zip | ||
asset_content_type: application/zip | ||
|
||
upload_blender_addon: | ||
name: Upload Blender Add-on | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Zip Add-on | ||
run: | | ||
mv plugins/Blender plugins/OmooAsset | ||
zip -r package.zip plugins/OmooAsset | ||
cd plugins/Blender | ||
zip -r package.zip OmooAsset | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./plugins/Blender/package.zip | ||
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Blender.zip | ||
asset_content_type: application/zip | ||
|
||
upload_cinema4d_plugin: | ||
name: Upload Cinema4D Plugin | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install Dependencies | ||
run: | | ||
cd plugins/Cinema4D | ||
python -m venv venv | ||
source venv/bin/activate | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip list | ||
- name: Zip Package | ||
run: | | ||
cd plugins/Cinema4D | ||
mkdir -p python311/libs | ||
mv venv/lib/python3.11/site-packages/pxr python311/libs/ | ||
mv venv/lib/python3.11/site-packages/usd_core-24.3.dist-info python311/libs/ | ||
zip -r package.zip plugins python311 | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./plugins/Cinema4D/package.zip | ||
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_Cinema4D.zip | ||
asset_content_type: application/zip | ||
|
||
upload_ocio_config: | ||
name: Upload OCIO Config | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Zip Package | ||
run: | | ||
cd assets | ||
zip -r ../package.zip OCIO | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
|
@@ -90,42 +173,5 @@ jobs: | |
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./package.zip | ||
asset_name: OmooAsset-Blender_${{ needs.draft_release.outputs.version }}.zip | ||
asset_name: OmooAsset_${{ needs.draft_release.outputs.version }}_OCIO.zip | ||
asset_content_type: application/zip | ||
|
||
# build_cinema4d_plugin: | ||
# name: Build Cinema4D Plugin | ||
# needs: draft_release | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout Code | ||
# uses: actions/checkout@v4 | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Install Dependencies | ||
# run: | | ||
# python -m venv venv | ||
# source venv/bin/activate | ||
# python -m pip install --upgrade pip | ||
# python -m pip install -r requirements.txt | ||
# python -m pip list | ||
# - name: Move Dependencies | ||
# run: | | ||
# mkdir -p pythonlib${{ matrix.python-version }}/Lib | ||
# mv venv/lib/python${{ matrix.python-version }}/site-packages pythonlib${{ matrix.python-version }}/Lib/ | ||
# rm -r venv | ||
# - name: Zip Package | ||
# run: | | ||
# zip -r package.zip packages preferences pythonlib${{ matrix.python-version }} python nodes.json README.md | ||
# - name: Upload Release Asset | ||
# id: upload-release-asset | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ needs.draft_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
# asset_path: ./package.zip | ||
# asset_name: Omoospace-Houdini_${{ needs.draft_release.outputs.version }}_py${{ matrix.python-version }}.zip | ||
# asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,4 +164,8 @@ HDAs/backup | |
|
||
pythonlib* | ||
|
||
*.rat | ||
*.rat | ||
|
||
# act (Github Action Locally) | ||
.actrc | ||
.secrets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,73 @@ | ||
# OmooKit for Houdini | ||
![alt text](docs/images/overview.png) | ||
|
||
A toolkit for biomedical visualization in houdini. | ||
# OmooAsset | ||
|
||
## Getting Started | ||
USD based 3D model storage solution, our goal is **"create once, render anywhere"**. | ||
|
||
### Dependencies | ||
Currently supported platforms: | ||
|
||
- Python >= 3.9 | ||
- Houdini >= 19.5 | ||
- Houdini 20 | ||
- Blender 4.x | ||
- Cinema4D 2024.x (Redshift) | ||
- Threejs (.glb) | ||
|
||
Pull this repository. | ||
[中文文档](https://uj6xfhbzp0.feishu.cn/wiki/L7dVwVfP7iffHskjHL0cjCaqnfc?from=from_copylink) | ||
|
||
```bash | ||
$ git clone https://github.com/OmooLab/OmooKit-Houdini.git | ||
$ cd OmooKit-Houdini | ||
``` | ||
# Why OmooAsset ? | ||
|
||
It is reasonable to assume that as long as the platform has full support for USD | MaterialX, all models can be loaded consistently. It is conceivable that eventually all platforms will highly support for reading and writing USD | MaterialX, but it is still conceivable that the definition of channels for rendering will not be completely consistent. For example, some renderers support the effect of model scaling on displacement strength, while others do not. **This is a problem that Omoo Asset is trying to solve by making sure that models are "rendered" consistently across all renderers.** | ||
|
||
We have defined a subset of MaterialX, [OmooLab Standard Surface (OSS Material)](docs/OmooLab_Standard_Surface.md), which is unique in that the material parameters are almost entirely controlled by textures. Just like USD can only store pure geometry, not controllers and modifiers, all physical properties of the material are baked and calculated into textures. | ||
|
||
Omoo Asset is exported via Houdini's Omoo Export SOP. For principled shader it is converted to a USD Preview Surface (a Houdini native feature), so in any case, all materialas in Omoo Assert include at least USD Preview Surface, which ensures that the Omoo Asset can be loaded as a .usd with all materials' textures, even without any plugins. We also provide plug-ins for each platform to ensure maximum consistency in material rendering: | ||
|
||
- [Blender 4.x](docs/Blender.md) | ||
- [Cinema4D 2024.x (Redshift)](docs/Cinema4D.md) | ||
|
||
If you just want to import Omoo Assets, you can click the links above. | ||
|
||
# Getting Started | ||
|
||
## Houdini HDA Installation | ||
|
||
1. Download the latest release version of OmooAsset. [https://github.com/OmooLab/OmooAsset/releases](https://github.com/OmooLab/OmooAsset/releases) | ||
|
||
### Add it to houdini | ||
2. Unzip all files to any directory. e.g. `path/to/OmooAsset` | ||
|
||
Create a env file in packages `houdiniX.Y/packages/env.json` | ||
3. Reference it's package path to houdini package json file `houdiniX.Y/packages/env.json`. | ||
|
||
```json | ||
{ | ||
"package_path": [ | ||
"Path/to/OmooKit-Houdini/Packages" | ||
] | ||
"package_path": ["path/to/OmooAsset/packages"] | ||
} | ||
``` | ||
|
||
# Omoo Asset Sturcture | ||
|
||
### Directory Sturcture | ||
|
||
```bash | ||
<AssetName> | ||
|-- Components # Layers, textures, any other files | ||
| |-- Clips # Optional | ||
| |-- Textures # Optional | ||
| |-- <AssetName>.geometries.usd | ||
| |-- <AssetName>.materials.usd # Optional | ||
| `-- <AssetName>_payload.usd | ||
`-- <AssetName>.usd # Main file | ||
``` | ||
|
||
### USD Prim Path Sturcture | ||
|
||
Note that the Omoo Asset is not used to store the scene, just models, so there will only be one Asset (Component) in each omoo asset. | ||
|
||
```bash | ||
<AssetName> # Xform (Component) | ||
|-- Geometries # Scope | ||
| |-- <Mesh_1> # Mesh | ||
| | `-- <Material_1_group> # GeomSubset | ||
| |-- <Mesh_2> # Mesh | ||
| `-- <Mesh_3> # Mesh | ||
|-- Materials # Scope (optional) | ||
| `-- <Material_1> # Material | ||
``` |
Git LFS file not shown
Oops, something went wrong.