I was wondering if there is a possibility to use the USD Render publish in Houdini with the option to export the render.usd file locally in the current houdini session and submit this to deadline for farm rendering with husk.
Right now, the closest option is “Farm Rendering - Split export & render jobs” - which is fine but in some cases not ideal;
for example when there are no free houdini licenses available on the farm for the export job because of blocked fx-jobs or something similar.
In case this is not possible - could somebody point me in the right direction which publish plugins I would need to adjust?
The first step would probably be to implement a new render target item here:
But from there on it is kind of hard to figure out the next steps.
I currently have a custom solution implemented for this outside of ayon at our company but I wanted to take a look into this and see if it would be possible with vanilla ayon, or at least with a little bit of custom code/addon.
It’s slightly tricky, because you may need to add a special Extractor that triggers the render_rop logic for that particular case with that setting. Because you do want instance.data["farm"] = True to remain True, but do want to still trigger the ROP locally too. You may get by with customizing the extract_render.py to handle this special case to render the rop, but then return early. A dedicated Extractor for usdrender may make most sense:
And you’d want to set instance.data["splitRender"] = False after CollectUsdRender has collected the ifdFile (because that’s still needed for the deadline logic to still submit the Husk render job.)
Perhaps this would work:
class ExtractUSDRenderIfd(plugin.HoudiniExtractorPlugin):
"""Export the render USD locally from Houdini, then render on farm with Husk."""
order = pyblish.api.ExtractorOrder
label = "Extract Render USD locally"
families = ["usdrender"]
def process(self, instance):
creator_attribute = instance.data["creator_attributes"]
if not instance.data.get("farm"):
return
if creator_attribute.get("render_target") != "local_export_farm_render":
return
self.render_rop(instance)
# Mark split render to be disabled so that farm submission plug-ins
# will only submit the Render Job with the IFD file
instance.data["splitRender"] = False
I did check the code when I wrote the example, I think if initially split render is true and hence the ifdFile gets set and then you disable it there in an extractor order it may be doing what you need too in AYON deadline.
Anyway, was merely presenting an approach that I suspect @sebastian.brandhuber can figure out from there.
After a little bit of testing, local export and farm rendering working as expected now, but I had to add a bit of custom code in a couple of files both in ayon-houdini and ayon-deadline.
I also found this old issue from Roy in ayon-houdini, which helped aswell as a start.
If this is still valid, I could either comment with a detailed list of my changes in there or create two pull requests for ayon-houdini and ayon-deadline? @BigRoy@mustafa_jafar
Pull requests would be more than welcomed. It’d be great to have them where we can give it a go and/or make suggestions and hopefully merge them as your contributions.
Thanks.