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

Support render targets for 'usdrender' product type #8

Conversation

MustafaJafar
Copy link

Changelog Description

Support render targets for 'usdrender' product type
This also includes

  • Submitted to Deadline Husk Standalone renders (with split export jobs)
  • Mark render as reviewable.

Additional info

It works fine on my side.
But, for some reason I don't know yet, the jobs are submitted twice ?!
image

Testing notes:

  1. Publish usdrender from Houdini using the four options:
  • Local machine rendering
  • Use existing frames (local)
  • Farm Rendering
  • Farm Rendering - Split export & render jobs
  1. Also test Review mark as reviewable.

Copy link
Owner

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Nice stuff - some small comments.

@@ -26,6 +26,7 @@ class ValidateUSDRenderProductPaths(pyblish.api.InstancePlugin):
hosts = ["houdini"]
label = "Validate USD Render Product Paths"
optional = True
enabled = False
Copy link
Owner

Choose a reason for hiding this comment

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

Does this just hint that this should be configurable in studio settings and disabled by default? Why are you disabling it?

Copy link
Author

Choose a reason for hiding this comment

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

Does this just hint that this should be configurable in studio settings and disabled by default?

I think yes. tbh, I have no idea what is this $HIP/renders/$HIPNAME:r/$OS/$HIPNAME:r.$OS.$F4.exr and it was not in the node on creation by default. and that note encouraged me to just disable the validator 😅

(colorbleed): This workflow might be relatively Colorbleed-specific

Copy link
Owner

Choose a reason for hiding this comment

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

Yup, so basically what happens is that the USD Render ROP writes out an intermediate __render__.usd file or alike - however, by default that's just a static path, not a render file for your particular workfile if I recall correctly. And thus, if the user quickly submits to deadline three files from the same work folder it basically means that the each job would overwrite that render.usd file the other two jobs are also writing - hence you can't submit multiples at once. By making sure those files have unique names (e.g. containing $HIPNAME that solves that particular issue).

Copy link
Author

Choose a reason for hiding this comment

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

I think I get it now. it important when publishing multiple usdrender instances at once.

image
image

usd_file_per_frame = "$F" in instance.data["ifdFile"]
usd_file_per_frame = instance.data["farm"]
Copy link
Owner

Choose a reason for hiding this comment

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

This change is incorrect, sorry. We render our USD render usd files as singular files, one big chunk instead of per frame - even on the farm because the files are smaller relatively (no duplication of the same data structure) and the server has better "in-memory" load of the one file and the USD files from render scene is usually small due to containing 99% references/sublayers instead of local geometry.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, I miss interpreted the meaning of that line!
So, in the current implementation "ifdFile" exists only if the render target was set to "farm_split" aka "Farm Rendering - Split export & render jobs".
So, this validator will crash for other render targets. because of a key error.

Comment on lines +136 to +137
# As long as we have one AOV then multipartExr should be True.
instance.data["multipartExr"] = len(files_by_product) <= 1
Copy link
Owner

Choose a reason for hiding this comment

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

This is technically not entirely true. It may just not have multiple AOVs and is then not multipart, right? USD Render Products are also completely capable of writing no beauty but only e.g. a Z-pass (even though you'd usually not do that I suppose)
Out of curiosity, why do we need this?

Copy link
Author

Choose a reason for hiding this comment

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

why do we need this?

Well, searching for "multiPartExr" in this file pyblish_functions.py can answer the question.

As far as I was able to understand the logic. if there's one AOV, the logic will assume it's reviewable.
And I was merely trying to adopt the same logic.

@MustafaJafar MustafaJafar marked this pull request as draft June 6, 2024 12:55
@MustafaJafar
Copy link
Author

Closing in favor of #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants