Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish component builder LOP usd while maintaining hierarchical structure #163

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Nov 5, 2024

Changelog Description

Implements a prototype creator that can publish the output USD of a Component Builder LOPs network.

Additional review information

Example graph:

image

Publisher:

image

The published asset is contained within a single publish with all its relative paths and localized files:

image

Note that this screenshot does not contain the textures - but that's only because I didn't have them on my disk in this case. That's then logged forgivingly as a warning during publish. For example:

image

Selecting the Creator in the publisher UI and pressing the question mark on the top right of the publisher UI will try and guide you about what it does and how to use it.

image

Testing notes:

  1. Create component builder network in LOPs
  2. Select a component output node in the graph
  3. Create the component builder LOPs instance
  4. (Optional) Disable the USD contribution workflow on the instance. (Since the component builder basically 'defines' the full USD asset it makes little sense to contribute it as part of a parent asset using a contribution workflow.)
  5. Publish

@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Nov 5, 2024
@BigRoy BigRoy requested a review from MustafaJafar November 5, 2024 22:21
@BigRoy BigRoy self-assigned this Nov 5, 2024
…ent-builder-usd-while-maintaining-hierarchical-structure
…d-while-maintaining-hierarchical-structure' of https://github.com/BigRoy/ayon-houdini into enhancement/147-ay-7047_publishing-component-builder-usd-while-maintaining-hierarchical-structure
Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error on integration step because it expected a thumbnail.
The fix to click Generate Thumbnail

DEBUG: Copying file ... \\storage\work\ayon\RnD\features\hou_component_builder\work\Generic\usd\assets\componentoutput1\thumbnail.png -> \\storage\work\ayon\RnD\features\hou_component_builder\publish\usd\usdSimpleCube\v004\thumbnail.png
CRITICAL: Error when registering
Traceback (most recent call last):
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 158, in process
    self.register(instance, file_transactions, filtered_repres)
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 290, in register
    file_transactions.process()
  File "E:\Ynput\ayon-core\client\ayon_core\lib\file_transaction.py", line 140, in process
    copyfile(src, dst)
  File "C:\Users\Mustafa Taher\AppData\Local\Ynput\AYON\dependency_packages\ayon_2411052009_windows.zip\dependencies\speedcopy\__init__.py", line 332, in copyfile
    ret = COPYFILE('\\\\?\\' + source_file,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_ctypes/callproc.c", line 1000, in GetResult
FileNotFoundError: [WinError -2147024894] The system cannot find the file specified

Traceback (most recent call last):
  File "C:\Users\Mustafa Taher\AppData\Local\Ynput\AYON\dependency_packages\ayon_2411052009_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 170, in process
    raise exc
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 158, in process
    self.register(instance, file_transactions, filtered_repres)
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\integrate.py", line 290, in register
    file_transactions.process()
  File "E:\Ynput\ayon-core\client\ayon_core\lib\file_transaction.py", line 140, in process
    copyfile(src, dst)
  File "C:\Users\Mustafa Taher\AppData\Local\Ynput\AYON\dependency_packages\ayon_2411052009_windows.zip\dependencies\speedcopy\__init__.py", line 332, in copyfile
    ret = COPYFILE('\\\\?\\' + source_file,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_ctypes/callproc.c", line 1000, in GetResult
FileNotFoundError: [WinError -2147024894] The system cannot find the file specified

@MustafaJafar
Copy link
Contributor

MustafaJafar commented Nov 11, 2024

using the following publish template :

  1. in ayon+anatomy://RnD/templates/publish
    {
      "name": "HoudiniComponentBuilder",
      "directory": "{root[work]}/{project[name]}/{hierarchy}/{folder[name]}/publish/{product[type]}/{product[name]}/{@version}",
      "file": "{originalBasename}.{ext}"
    }
  2. in ayon+settings://core/tools/publish/template_name_profiles
    image

allows me to replicate have the same output with the same names in the publish folder.
but keep in mind this publish template will also be applied to all USD products!
image

@MustafaJafar
Copy link
Contributor

using the following publish template :
.
.
allows me to replicate have the same output with the same names in the publish folder.
but keep in mind this publish template will also be applied to all USD products!

I've just broken the contribution workflow. it doesn't respect the publish template.

@MustafaJafar
Copy link
Contributor

I tried publishing the output of component builder as an assembly variant in usd contribution.
I may be missing a step.
Anyways, do you think it's a good thing/valuable to publish the component builder a an assembly product in a usdAsset?


Side question: What tasks types are most suitable for component builders? since component builders include look and model products.

…ent-builder-usd-while-maintaining-hierarchical-structure
@BigRoy
Copy link
Contributor Author

BigRoy commented Nov 13, 2024

I tried publishing the output of component builder as an assembly variant in usd contribution.
I may be missing a step.
Anyways, do you think it's a good thing/valuable to publish the component builder a an assembly product in a usdAsset?

I'd say component builder makes little sense with the contribution workflow - yet at the same time, there may be an edge case where one may want to do that and instead have it be the full usd asset itself.

Side question: What tasks types are most suitable for component builders? since component builders include look and model products.

Generic task type maybe. But yes, there isn't a clear 'default' task type in AYON that is the combination of those two.

BigRoy and others added 2 commits November 13, 2024 13:10
…ent-builder-usd-while-maintaining-hierarchical-structure
…ent-builder-usd-while-maintaining-hierarchical-structure
@MustafaJafar MustafaJafar self-requested a review November 19, 2024 09:02
@MustafaJafar
Copy link
Contributor

MustafaJafar commented Nov 19, 2024

I've created ynput/ayon-usd#78 to track the issue of using publish templates and contribution workflow.

Gave it another test with the default publish template.
When using a used rop (which publish each layer of the component builder as a separate layer + one additional layer by the usd rop itself), the contribution workflow works as usual.

When using the new component builder creator (with contribution enabled and variant disabled), the contribution workflow breaks because the default prim was not set properly. (this is fixed by configuring the node properly, see #163 (comment))

When using the new component builder creator (with contribution enabled and variant enabled), it works.

and Here's an example where I published both the component builder directly and using a USD ROP along with contribution workflow.
Animation_40

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR works pretty well on my side.
Some few notes.

@MustafaJafar MustafaJafar self-requested a review November 21, 2024 09:08
Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!

…ent-builder-usd-while-maintaining-hierarchical-structure
BigRoy and others added 2 commits December 5, 2024 14:01
…ent-builder-usd-while-maintaining-hierarchical-structure
…ent-builder-usd-while-maintaining-hierarchical-structure
@antirotor antirotor merged commit 072ffcb into ynput:develop Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants