Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Houdini: Add support to split Deadline render tasks in export + render #5420

Merged
merged 16 commits into from
Dec 6, 2023

Conversation

fabiaserra
Copy link
Contributor

Changelog Description

This adds initial support in Houdini so when submitting render jobs to Deadline it's not running as a single Houdini task but rather it gets split in two different tasks: Export + Render. This way it's more efficient as we only need a Houdini license during the export step and the render tasks can run exclusively with a render license. Moreover, we aren't wasting all the overhead time of opening the render scene in Houdini for every frame.

I have also added the corresponding settings json files so we can set some of the default values for the Houdini deadline submitter.

Testing notes:

  1. Create a simple render scene in Houdini
  2. Create an OP ROP making sure Split export and render jobs (set to default for now) and Submitting to farm are enabled
  3. Publish so it submits the render job (export + render) to the farm

@ynbot ynbot added host: Houdini module: Deadline AWS Deadline related features size/M Denotes a PR changes 500-999 lines, ignoring general files type: feature Larger, user affecting changes and completely new things labels Aug 7, 2023
Copy link
Collaborator

@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.

Looking at the amount of renderers this touches and how this is build this looks like a massive (and massively welcome) contribution - so great job.

There's definitely still some major caveats, but the concept is solid. I think having the foundation laid out in AbstractSubmitDeadline to e.g. support the same in a trivial manner in other hosts would be solid.

We could also do it differently where get_job_info or processs_submission or whatever could just receive multiple jobs like a list (or just the one for backwards compatibility). Then the Abstract Submit Deadline class would just submit each. Potentially the job infos themselves could've also prepped the dependencies in advance without the actual ids but just the actual jobs being submitted. Instead of adding extra arguments to the methods this would just allow the inherited submission plugins (like the one from houdini) to just submit any amount of jobs in order for the render. As long as they'd mark one the render job for the SubmitPublishJob logic I suppose?

def get_submission(self):
    job_info_export = ...
    job_info_render = ...
    job_info_render.dependencies = [job_info_export]
    return [job_info_export, job_info_render]

@fabiaserra
Copy link
Contributor Author

Looking at the amount of renderers this touches and how this is build this looks like a massive (and massively welcome) contribution - so great job.

There's definitely still some major caveats, but the concept is solid. I think having the foundation laid out in AbstractSubmitDeadline to e.g. support the same in a trivial manner in other hosts would be solid.

We could also do it differently where get_job_info or processs_submission or whatever could just receive multiple jobs like a list (or just the one for backwards compatibility). Then the Abstract Submit Deadline class would just submit each. Potentially the job infos themselves could've also prepped the dependencies in advance without the actual ids but just the actual jobs being submitted. Instead of adding extra arguments to the methods this would just allow the inherited submission plugins (like the one from houdini) to just submit any amount of jobs in order for the render. As long as they'd mark one the render job for the SubmitPublishJob logic I suppose?

def get_submission(self):
    job_info_export = ...
    job_info_render = ...
    job_info_render.dependencies = [job_info_export]
    return [job_info_export, job_info_render]

I really like what you suggest of abstracting the dependencies on a separate function, I can try it out tomorrow

@MustafaJafar
Copy link
Contributor

sorry for my noob question

split in two different tasks: Export + Render. This way it's more efficient as we only need a Houdini license during the export step and the render tasks can run exclusively with a render license.

do you mean something like exporting mantra ifd, and use it to render in mantra ?
if yes, then this PR may relate to this #4903


I tested it as a user, and these are my results:

I found 3 jobs

  1. mantra job (generate exrs) has 0 dependencies, uses houdini exe
  2. mantra job (generate ifds) depends on mantra exr , uses mantra exe
  3. publish job depends on mantra ifd

@moonyuet
Copy link
Member

moonyuet commented Aug 8, 2023

Great, I like the idea behind this.
I tested with vray it seems that there is a type error when creating rop instance.
image

@fabiaserra
Copy link
Contributor Author

sorry for my noob question

split in two different tasks: Export + Render. This way it's more efficient as we only need a Houdini license during the export step and the render tasks can run exclusively with a render license.

do you mean something like exporting mantra ifd, and use it to render in mantra ?

Yeah, all farm submission rendering pipelines that I have seen on all studios I have worked always do this, it's a big waste of license usage and resources to use the DCC license and its environment to render in the farm. Instead what you want is to export your render scene from your DCC into the scene format of the render engine (i.e., .rib for renderman, .ifd for Mantra, .ass for Arnold... in the future .usd for all that fully support Hydra) and then render directly from that scene file format so you can distribute it across multiple machines, that way you can chunk your translate task (usually 10 frames per task) to benefit from only having to open the scene once (using a single DCC license) and export to the render scene format (it's usually pretty fast if using procedurals) and then spawn all the render tasks with a different chunk size (usually 1 frame per task as renders are much slower) and using only render licenses which are usually much cheaper than the DCC one.

You can find more info here for Mantra: https://www.sidefx.com/docs/houdini/render/ifd_workflows.html
And you can see also in Deadline how this workflow is supported by default: https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/app-houdini.html?highlight=export#ifd-exporting-and-mantra-standalone

if yes, then this PR may relate to this #4903

It's a bit related but I don't think that's solving the same issue. Also while it might be useful in very edge cases I haven't personally seen the use of needing to cache and publish .ifd, redshift proxy or vray scenes before. Arnold .ass files are useful for caching as you can reference them as procedurals in any of the Arnold plugins but I'm not sure if that workflow is also common for other renderers. Maybe the redshift proxy and vray scenes are but .ifds? Given that those are unique to Houdini I'm not sure if there's much value to that. I will have a look at that PR and comment on it

I tested it as a user, and these are my results:

I found 3 jobs

  1. mantra job (generate exrs) has 0 dependencies, uses houdini exe
  2. mantra job (generate ifds) depends on mantra exr , uses mantra exe
  3. publish job depends on mantra ifd

That's correct yeah, and for an Arnold job you should see something like:
image

I think it would be nice to add better labels so it's clear what's export vs what's render (even though it's kind of obvious in some cases due to the Plugin used)

@fabiaserra
Copy link
Contributor Author

Great, I like the idea behind this. I tested with vray it seems that there is a type error when creating rop instance. image

Thanks for testing @moonyuet ! And yeah as I added as #TODO on the code, I don't have VRay plugin so I don't know what the parms of the VRay ROP are called for enabling the export step, can you check?

@fabiaserra
Copy link
Contributor Author

The one with merely exporting vrscene is "2" for render_export_mode when setting the parameters. image

Thank you @moonyuet for checking, I have now updated the code with "2" for both the create and collect of VRay ROP

@moonyuet
Copy link
Member

moonyuet commented Aug 10, 2023

I got the error below when the vray-standalone run in the farm

=======================================================
Error
=======================================================
FailRenderException : [2023/Aug/10|17:34:03] [91 MB] error: Error in file "vray_ropMain.0000.vrscene", line 0: No file "C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" exists
   at Deadline.Plugins.DeadlinePlugin.FailRender(String message) (Python.Runtime.PythonException)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\Vray.py", line 310, in handleStdoutError
    self.FailRender( self.GetRegexMatch( 0 ) )
   at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   at __FranticX_Processes_ManagedProcess_StdoutHandlerDelegateDispatcher.Invoke()
   at FranticX.Processes.ManagedProcess.RegexHandlerCallback.CallFunction()
   at FranticX.Processes.ManagedProcess.e(String di, Boolean dj)
   at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
   at Deadline.Plugins.DeadlinePlugin.DoRenderTasks()
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bgj, CancellationToken bgk)
   at Deadline.Plugins.SandboxedPlugin.RenderTask(Task task, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajq, CancellationToken ajr)

=======================================================
Log
=======================================================
2023-08-10 17:33:52:  0: Render Thread - Render State transition from = 'ReceivedTask' to = 'Other'
2023-08-10 17:33:52:  0: Plugin will be reloaded because a new job has been loaded.
2023-08-10 17:33:52:  0: Loading Job's Plugin timeout is Disabled
2023-08-10 17:33:52:  0: SandboxedPlugin: Render Job As User disabled, running as current user 'Kayla'
2023-08-10 17:33:54:  0: Loaded plugin Vray
2023-08-10 17:33:54:  0: Executing plugin command of type 'Initialize Plugin'
2023-08-10 17:33:54:  0: INFO: Executing plugin script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\Vray.py'
2023-08-10 17:33:54:  0: INFO: Plugin execution sandbox using Python version 3
2023-08-10 17:33:54:  0: INFO: About: V-Ray Standalone Plugin for Deadline
2023-08-10 17:33:54:  0: INFO: The job's environment will be merged with the current environment before rendering
2023-08-10 17:33:54:  0: Done executing plugin command of type 'Initialize Plugin'
2023-08-10 17:33:54:  0: Start Job timeout is disabled.
2023-08-10 17:33:54:  0: Task timeout is disabled.
2023-08-10 17:33:54:  0: Loaded job: new_project_ep_asset_v217.hiplc - vray_ropMain (64d4aec8dd322428409cb78c)
2023-08-10 17:33:54:  0: Executing plugin command of type 'Start Job'
2023-08-10 17:33:54:  0: DEBUG: S3BackedCache Client is not installed.
2023-08-10 17:33:54:  0: INFO: Executing global asset transfer preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\GlobalAssetTransferPreLoad.py'
2023-08-10 17:33:54:  0: INFO: Looking for legacy (pre-10.0.26) AWS Portal File Transfer...
2023-08-10 17:33:54:  0: INFO: Looking for legacy (pre-10.0.26) File Transfer controller in C:/Program Files/Thinkbox/S3BackedCache/bin/task.py...
2023-08-10 17:33:54:  0: INFO: Could not find legacy (pre-10.0.26) AWS Portal File Transfer.
2023-08-10 17:33:54:  0: INFO: Legacy (pre-10.0.26) AWS Portal File Transfer is not installed on the system.
2023-08-10 17:33:54:  0: Done executing plugin command of type 'Start Job'
2023-08-10 17:33:54:  0: Plugin rendering frame(s): 1
2023-08-10 17:33:54:  0: Render Thread - Render State transition from = 'Other' to = 'Rendering'
2023-08-10 17:33:54:  0: Executing plugin command of type 'Render Task'
2023-08-10 17:33:54:  0: INFO: Starting V-Ray Task
2023-08-10 17:33:54:  0: INFO: Performing path mapping on vrscene file
2023-08-10 17:33:55:  0: INFO: The include file D:\test_project\new_project\ep\work\asset\pyblish\vrscene\vray_ropMain\vray_ropMain.0000.vrscene does not exist.
2023-08-10 17:33:55:  0: INFO: Stdout Redirection Enabled: True
2023-08-10 17:33:55:  0: INFO: Stdout Handling Enabled: True
2023-08-10 17:33:55:  0: INFO: Popup Handling Enabled: False
2023-08-10 17:33:55:  0: INFO: Using Process Tree: True
2023-08-10 17:33:55:  0: INFO: Hiding DOS Window: True
2023-08-10 17:33:55:  0: INFO: Creating New Console: False
2023-08-10 17:33:55:  0: INFO: Running as user: Kayla
2023-08-10 17:33:55:  0: INFO: Executable: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\vray.exe"
2023-08-10 17:33:55:  0: INFO: Argument:  -scenefile="C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" -interactive=0 -display=0 -rtEngine=0 -frames=1 -numThreads=0 
2023-08-10 17:33:55:  0: INFO: Full Command: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\vray.exe"  -scenefile="C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" -interactive=0 -display=0 -rtEngine=0 -frames=1 -numThreads=0 
2023-08-10 17:33:55:  0: INFO: Startup Directory: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin"
2023-08-10 17:33:55:  0: INFO: Process Priority: BelowNormal
2023-08-10 17:33:55:  0: INFO: Process Affinity: default
2023-08-10 17:33:55:  0: INFO: Process is now running
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] warning: The parameter 'interactive' has been removed and so it has been ignored!
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Reading configuration from "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\/vrayconfig.xml"
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ===============================================
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] V-Ray Standalone, version 6 Standalone Update 1.2 for x64
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Copyright (C) 2000-2023 Chaos Software EOOD. All rights reserved.
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Use -credits option for additional third-party copyright notices.
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Build 1cdbc1b0 from May  2 2023, 16:20:55
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Compiled with Microsoft Visual C++ compiler, version 19.12
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Operating system is Microsoft Windows 11 Pro (Build: 10.0.22621)
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] CPU: Intel, 11th Gen Intel(R) Core(TM) i9-11900 @ 2.50GHz, threads: 16
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ISA: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, BMI, SHA
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] RAM: 32544 MiB
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] V-Ray core version is 6.10.08
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ===============================================
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:34:00:  0: STDOUT: [2023/Aug/10|17:34:00] [22 MB] Loading plugins from "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin/plugins\vray_*.dll"
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:02] [88 MB] 79 plugin(s) loaded successfully
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:02] [88 MB] Finished loading plugins.
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:03] [91 MB] Reading scene file "vray_ropMain.0000.vrscene"
2023-08-10 17:34:03:  0: Done executing plugin command of type 'Render Task'

=======================================================
Details
=======================================================
Date: 08/10/2023 17:34:07
Frames: 1
Elapsed Time: 00:00:00:14
Job Submit Date: 08/10/2023 17:32:56
Job User: kayla
Average RAM Usage: 16739549184 (50%)
Peak RAM Usage: 16739549184 (50%)
Average CPU Usage: 3%
Peak CPU Usage: 5%
Used CPU Clocks (x10^6 cycles): 13191
Total CPU Clocks (x10^6 cycles): 439696

=======================================================
Worker Information
=======================================================
Worker Name: DESKTOP-1U8VP0C
Version: v10.1.22.5 Release (919d43564)
Operating System: Windows 11 Pro
Running As Service: No
Machine User: Kayla
IP Address: 192.168.50.249
MAC Address: 48:E7:DA:F4:8E:23
CPU Architecture: x64
CPUs: 16
CPU Usage: 1%
Memory Usage: 15.6 GB / 31.8 GB (49%)
Free Disk Space: 1.856 TB (453.273 GB on C:\, 1.413 TB on D:\)
Video Card: NVIDIA GeForce RTX 3070

I believe it is mainly because inputFilename is {project_name}.0000.vrscene. If it is {project_name}.0001.vrscene, it should be rendering sucessfully. See the simple test below.
image
image

@fabiaserra
Copy link
Contributor Author

I got the error below when the vray-standalone run in the farm

=======================================================
Error
=======================================================
FailRenderException : [2023/Aug/10|17:34:03] [91 MB] error: Error in file "vray_ropMain.0000.vrscene", line 0: No file "C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" exists
   at Deadline.Plugins.DeadlinePlugin.FailRender(String message) (Python.Runtime.PythonException)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\Vray.py", line 310, in handleStdoutError
    self.FailRender( self.GetRegexMatch( 0 ) )
   at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   at __FranticX_Processes_ManagedProcess_StdoutHandlerDelegateDispatcher.Invoke()
   at FranticX.Processes.ManagedProcess.RegexHandlerCallback.CallFunction()
   at FranticX.Processes.ManagedProcess.e(String di, Boolean dj)
   at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
   at Deadline.Plugins.DeadlinePlugin.DoRenderTasks()
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bgj, CancellationToken bgk)
   at Deadline.Plugins.SandboxedPlugin.RenderTask(Task task, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajq, CancellationToken ajr)

=======================================================
Log
=======================================================
2023-08-10 17:33:52:  0: Render Thread - Render State transition from = 'ReceivedTask' to = 'Other'
2023-08-10 17:33:52:  0: Plugin will be reloaded because a new job has been loaded.
2023-08-10 17:33:52:  0: Loading Job's Plugin timeout is Disabled
2023-08-10 17:33:52:  0: SandboxedPlugin: Render Job As User disabled, running as current user 'Kayla'
2023-08-10 17:33:54:  0: Loaded plugin Vray
2023-08-10 17:33:54:  0: Executing plugin command of type 'Initialize Plugin'
2023-08-10 17:33:54:  0: INFO: Executing plugin script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\Vray.py'
2023-08-10 17:33:54:  0: INFO: Plugin execution sandbox using Python version 3
2023-08-10 17:33:54:  0: INFO: About: V-Ray Standalone Plugin for Deadline
2023-08-10 17:33:54:  0: INFO: The job's environment will be merged with the current environment before rendering
2023-08-10 17:33:54:  0: Done executing plugin command of type 'Initialize Plugin'
2023-08-10 17:33:54:  0: Start Job timeout is disabled.
2023-08-10 17:33:54:  0: Task timeout is disabled.
2023-08-10 17:33:54:  0: Loaded job: new_project_ep_asset_v217.hiplc - vray_ropMain (64d4aec8dd322428409cb78c)
2023-08-10 17:33:54:  0: Executing plugin command of type 'Start Job'
2023-08-10 17:33:54:  0: DEBUG: S3BackedCache Client is not installed.
2023-08-10 17:33:54:  0: INFO: Executing global asset transfer preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64d4aec8dd322428409cb78c\GlobalAssetTransferPreLoad.py'
2023-08-10 17:33:54:  0: INFO: Looking for legacy (pre-10.0.26) AWS Portal File Transfer...
2023-08-10 17:33:54:  0: INFO: Looking for legacy (pre-10.0.26) File Transfer controller in C:/Program Files/Thinkbox/S3BackedCache/bin/task.py...
2023-08-10 17:33:54:  0: INFO: Could not find legacy (pre-10.0.26) AWS Portal File Transfer.
2023-08-10 17:33:54:  0: INFO: Legacy (pre-10.0.26) AWS Portal File Transfer is not installed on the system.
2023-08-10 17:33:54:  0: Done executing plugin command of type 'Start Job'
2023-08-10 17:33:54:  0: Plugin rendering frame(s): 1
2023-08-10 17:33:54:  0: Render Thread - Render State transition from = 'Other' to = 'Rendering'
2023-08-10 17:33:54:  0: Executing plugin command of type 'Render Task'
2023-08-10 17:33:54:  0: INFO: Starting V-Ray Task
2023-08-10 17:33:54:  0: INFO: Performing path mapping on vrscene file
2023-08-10 17:33:55:  0: INFO: The include file D:\test_project\new_project\ep\work\asset\pyblish\vrscene\vray_ropMain\vray_ropMain.0000.vrscene does not exist.
2023-08-10 17:33:55:  0: INFO: Stdout Redirection Enabled: True
2023-08-10 17:33:55:  0: INFO: Stdout Handling Enabled: True
2023-08-10 17:33:55:  0: INFO: Popup Handling Enabled: False
2023-08-10 17:33:55:  0: INFO: Using Process Tree: True
2023-08-10 17:33:55:  0: INFO: Hiding DOS Window: True
2023-08-10 17:33:55:  0: INFO: Creating New Console: False
2023-08-10 17:33:55:  0: INFO: Running as user: Kayla
2023-08-10 17:33:55:  0: INFO: Executable: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\vray.exe"
2023-08-10 17:33:55:  0: INFO: Argument:  -scenefile="C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" -interactive=0 -display=0 -rtEngine=0 -frames=1 -numThreads=0 
2023-08-10 17:33:55:  0: INFO: Full Command: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\vray.exe"  -scenefile="C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\jobsData\64d4aec8dd322428409cb78c\thread0_templbvO60\vray_ropMain.0000.vrscene" -interactive=0 -display=0 -rtEngine=0 -frames=1 -numThreads=0 
2023-08-10 17:33:55:  0: INFO: Startup Directory: "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin"
2023-08-10 17:33:55:  0: INFO: Process Priority: BelowNormal
2023-08-10 17:33:55:  0: INFO: Process Affinity: default
2023-08-10 17:33:55:  0: INFO: Process is now running
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] warning: The parameter 'interactive' has been removed and so it has been ignored!
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Reading configuration from "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin\/vrayconfig.xml"
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ===============================================
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] V-Ray Standalone, version 6 Standalone Update 1.2 for x64
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Copyright (C) 2000-2023 Chaos Software EOOD. All rights reserved.
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Use -credits option for additional third-party copyright notices.
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Build 1cdbc1b0 from May  2 2023, 16:20:55
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Compiled with Microsoft Visual C++ compiler, version 19.12
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] Operating system is Microsoft Windows 11 Pro (Build: 10.0.22621)
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] CPU: Intel, 11th Gen Intel(R) Core(TM) i9-11900 @ 2.50GHz, threads: 16
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ISA: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, BMI, SHA
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] RAM: 32544 MiB
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] V-Ray core version is 6.10.08
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] ===============================================
2023-08-10 17:33:55:  0: STDOUT: [2023/Aug/10|17:33:55] [15 MB] 
2023-08-10 17:34:00:  0: STDOUT: [2023/Aug/10|17:34:00] [22 MB] Loading plugins from "C:\Program Files\Chaos Group\V-Ray\Standalone for x64\bin/plugins\vray_*.dll"
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:02] [88 MB] 79 plugin(s) loaded successfully
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:02] [88 MB] Finished loading plugins.
2023-08-10 17:34:03:  0: STDOUT: [2023/Aug/10|17:34:03] [91 MB] Reading scene file "vray_ropMain.0000.vrscene"
2023-08-10 17:34:03:  0: Done executing plugin command of type 'Render Task'

=======================================================
Details
=======================================================
Date: 08/10/2023 17:34:07
Frames: 1
Elapsed Time: 00:00:00:14
Job Submit Date: 08/10/2023 17:32:56
Job User: kayla
Average RAM Usage: 16739549184 (50%)
Peak RAM Usage: 16739549184 (50%)
Average CPU Usage: 3%
Peak CPU Usage: 5%
Used CPU Clocks (x10^6 cycles): 13191
Total CPU Clocks (x10^6 cycles): 439696

=======================================================
Worker Information
=======================================================
Worker Name: DESKTOP-1U8VP0C
Version: v10.1.22.5 Release (919d43564)
Operating System: Windows 11 Pro
Running As Service: No
Machine User: Kayla
IP Address: 192.168.50.249
MAC Address: 48:E7:DA:F4:8E:23
CPU Architecture: x64
CPUs: 16
CPU Usage: 1%
Memory Usage: 15.6 GB / 31.8 GB (49%)
Free Disk Space: 1.856 TB (453.273 GB on C:\, 1.413 TB on D:\)
Video Card: NVIDIA GeForce RTX 3070

I believe it is mainly because inputFilename is {project_name}.0000.vrscene. If it is {project_name}.0001.vrscene, it should be rendering sucessfully. See the simple test below. image image

Right... I had to use "0" padding on the input file path as that's what Arnold and Mantra Deadline plugins used as pattern to replace with the input frame of the task, I would need to look into the VRay plugin to check what it uses instead

@fabiaserra
Copy link
Contributor Author

Right... I had to use "0" padding on the input file path as that's what Arnold and Mantra Deadline plugins used as pattern to replace with the input frame of the task, I would need to look into the VRay plugin to check what it uses instead

Looking into the Houdini deadline submitter plugin, I see that for VRay it does this other logic:

                    elif exportType == "Vray":
                        exportFileName = ifdFile
                        if export_will_overwrite( node, jobProperties ):
                            exportFileName = hou.expandString(".$F4").join(os.path.splitext(ifdFile))
                        fileHandle.write( "InputFilename=%s\n" % exportFileName )
                        fileHandle.write( "CommandLineOptions=%s\n" % jobProperties.get( "vrayarguments", "" ) )
                        fileHandle.write( "Threads=%s\n" % jobProperties.get( "vraythreads", 0 ) )

                        # Check whether the .vrscene file names are different
                        SeparateFilesPerFrame = ( not single_export_file( node ) ) or export_will_overwrite( node, jobProperties )
                        fileHandle.write( "SeparateFilesPerFrame=%s\n" % SeparateFilesPerFrame )

I think I might need to add SeparateFilesPerFrame to the PluginInfo so that it knows not to treat the vrscene as a single file but expand the frames. I don't see any benefit on using a single vrscene file for all frames so let's try that

@fabiaserra
Copy link
Contributor Author

SeparateFilesPerFrame

@moonyuet could you try again please?

@moonyuet
Copy link
Member

it renders out the vrscene as expected.

image

but the submit publish job doesn't publish the vrscene.
image

@fabiaserra
Copy link
Contributor Author

it renders out the vrscene as expected.

image

but the submit publish job doesn't publish the vrscene. image

Awesome! Yeah I wouldn't expect any of the "translate" render scene files to be published, only the final renders, that's the usual workflow on the pipelines that I have worked on. The .vrscene, .ass, .rib... files are only used as an intermediate data to create the render but they are kind of useless after. Only on the cases where the render is faulty you'd want to check those scene files again for debugging and try re-render that same file... but our default behavior was to actually delete the intermediate render scene files as soon as the render is done to save storage so maybe we would want to add those to the explicit delete plugin but I don't see any benefit on publishing the render scenes, do you?

@moonyuet
Copy link
Member

moonyuet commented Aug 10, 2023

it renders out the vrscene as expected.
image
but the submit publish job doesn't publish the vrscene. image

Awesome! Yeah I wouldn't expect any of the "translate" render scene files to be published, only the final renders, that's the usual workflow on the pipelines that I have worked on. The .vrscene, .ass, .rib... files are only used as an intermediate data to create the render but they are kind of useless after. Only on the cases where the render is faulty you'd want to check those scene files again for debugging and try re-render that same file... but our default behavior was to actually delete the intermediate render scene files as soon as the render is done to save storage so maybe we would want to add those to the explicit delete plugin but I don't see any benefit on publishing the render scenes, do you?

make sense though, it is kinda useless after rendering. If we want to just publish the vrscene, we can just make the publisher to do this.
I do agree that we need some delete plugin to remove the temp data.

@BigRoy
Copy link
Collaborator

BigRoy commented Aug 10, 2023

Yeah I wouldn't expect any of the "translate" render scene files to be published, only the final renders, that's the usual workflow on the pipelines that I have worked on. The .vrscene, .ass, .rib... files are only used as an intermediate data to create the render but they are kind of useless after.

👍 It's the same here. Being able to disable cleanup of them could be nice for debugging.

But it's also useful for e.g. re-rendering if a certain frame did something weird on a particular machine! So we'd probably clean up later rather than directly.

@moonyuet
Copy link
Member

moonyuet commented Aug 15, 2023

i have tried mantra ifd files but it seems that it only supports Houdini 18.5 or lower. so when I used 19.0 or 19.5, it fails to find the render plugin and errors out in deadline.
image

The log below:

=======================================================
Error
=======================================================
Error: RenderPluginException : GetConfigEntry: Attempted to access non-existent config key: Mantra19_0_Executable
   at Deadline.Plugins.DeadlinePlugin.GetConfigEntry(String key) (Python.Runtime.PythonException)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64db777adfd2aa5fd0aeadac\Mantra.py", line 47, in RenderExecutable
    renderExeList = self.GetConfigEntry("Mantra" + version.replace( ".", "_" ) + "_Executable")
   at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   at __FranticX_GenericDelegate0`1\[\[System_String\, System_Private_CoreLib\, Version=4_0_0_0\, Culture=neutral\, PublicKeyToken=7cec85d7bea7798e\]\]Dispatcher.Invoke()
   at FranticX.Processes.ManagedProcess.RenderExecutable()
   at Deadline.Plugins.DeadlinePlugin.RenderExecutable()
   at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bgj, CancellationToken bgk)
   at Deadline.Plugins.SandboxedPlugin.RenderTask(Task task, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajq, CancellationToken ajr)

=======================================================
Log
=======================================================
2023-08-15 21:04:03:  0: Render Thread - Render State transition from = 'ReceivedTask' to = 'Other'
2023-08-15 21:04:03:  0: Loading Job's Plugin timeout is Disabled
2023-08-15 21:04:03:  0: SandboxedPlugin: Render Job As User disabled, running as current user 'Kayla'
2023-08-15 21:04:05:  0: Loaded plugin Mantra
2023-08-15 21:04:05:  0: Executing plugin command of type 'Initialize Plugin'
2023-08-15 21:04:05:  0: INFO: Executing plugin script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64db777adfd2aa5fd0aeadac\Mantra.py'
2023-08-15 21:04:05:  0: INFO: Plugin execution sandbox using Python version 3
2023-08-15 21:04:05:  0: INFO: About: Mantra Plugin for Deadline
2023-08-15 21:04:05:  0: INFO: The job's environment will be merged with the current environment before rendering
2023-08-15 21:04:05:  0: Done executing plugin command of type 'Initialize Plugin'
2023-08-15 21:04:05:  0: Start Job timeout is disabled.
2023-08-15 21:04:05:  0: Task timeout is disabled.
2023-08-15 21:04:05:  0: Loaded job: new_project_ep_asset_v217.hiplc - mantra_ropMain (64db777adfd2aa5fd0aeadac)
2023-08-15 21:04:05:  0: Executing plugin command of type 'Start Job'
2023-08-15 21:04:05:  0: DEBUG: S3BackedCache Client is not installed.
2023-08-15 21:04:05:  0: INFO: Executing global asset transfer preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\desktop-1u8vp0c\plugins\64db777adfd2aa5fd0aeadac\GlobalAssetTransferPreLoad.py'
2023-08-15 21:04:05:  0: INFO: Looking for legacy (pre-10.0.26) AWS Portal File Transfer...
2023-08-15 21:04:05:  0: INFO: Looking for legacy (pre-10.0.26) File Transfer controller in C:/Program Files/Thinkbox/S3BackedCache/bin/task.py...
2023-08-15 21:04:05:  0: INFO: Could not find legacy (pre-10.0.26) AWS Portal File Transfer.
2023-08-15 21:04:05:  0: INFO: Legacy (pre-10.0.26) AWS Portal File Transfer is not installed on the system.
2023-08-15 21:04:05:  0: Done executing plugin command of type 'Start Job'
2023-08-15 21:04:05:  0: Plugin rendering frame(s): 2
2023-08-15 21:04:05:  0: Render Thread - Render State transition from = 'Other' to = 'Rendering'
2023-08-15 21:04:06:  0: Executing plugin command of type 'Render Task'
2023-08-15 21:04:06:  0: INFO: Stdout Redirection Enabled: True
2023-08-15 21:04:06:  0: INFO: Stdout Handling Enabled: True
2023-08-15 21:04:06:  0: INFO: Popup Handling Enabled: True
2023-08-15 21:04:06:  0: INFO: QT Popup Handling Enabled: False
2023-08-15 21:04:06:  0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2023-08-15 21:04:06:  0: INFO: Using Process Tree: True
2023-08-15 21:04:06:  0: INFO: Hiding DOS Window: True
2023-08-15 21:04:06:  0: INFO: Creating New Console: False
2023-08-15 21:04:06:  0: INFO: Running as user: Kayla
2023-08-15 21:04:06:  0: Done executing plugin command of type 'Render Task'

=======================================================
Details
=======================================================
Date: 08/15/2023 21:04:09
Frames: 2
Elapsed Time: 00:00:00:06
Job Submit Date: 08/15/2023 21:02:50
Job User: kayla
Average RAM Usage: 16670705664 (49%)
Peak RAM Usage: 16684474368 (49%)
Average CPU Usage: 2%
Peak CPU Usage: 5%
Used CPU Clocks (x10^6 cycles): 2126
Total CPU Clocks (x10^6 cycles): 106255

=======================================================
Worker Information
=======================================================
Worker Name: DESKTOP-1U8VP0C
Version: v10.1.22.5 Release (919d43564)
Operating System: Windows 11 Pro
Running As Service: No
Machine User: Kayla
IP Address: 192.168.50.249
MAC Address: 48:E7:DA:F4:8E:23
CPU Architecture: x64
CPUs: 16
CPU Usage: 0%
Memory Usage: 15.5 GB / 31.8 GB (48%)
Free Disk Space: 1.862 TB (460.065 GB on C:\, 1.412 TB on D:\)
Video Card: NVIDIA GeForce RTX 3070

I tried to submit manually to deadline too. I find out that the "SceneFile" probably need to be similar to the way set in "InputFilename" in vray job submission
image

@fabiaserra
Copy link
Contributor Author

i have tried mantra ifd files but it seems that it only supports Houdini 18.5 or lower. so when I used 19.0 or 19.5, it fails to find the render plugin and errors out in deadline. image

Yeah that is because the vanilla installation of Deadline doesn't have the executables for Houdini/Mantra 19.0 and 19.5, you have to go to the Mantra.param file of the ./plugins/Mantra folder of your repo and create the entries for those.

I tried to submit manually to deadline too. I find out that the "SceneFile" probably need to be similar to the way set in "InputFilename" in vray job submission image

I think that separation of frames isn't a thing in Mantra as it is in VRay, I tested it on my side and the split of export + render for Mantra renders are working as expected

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

LGFM... I also checked with mantra too....
image

@krishnaavril
Copy link

I'm curious to check this out when its merged with develop branch and stable. ### Thank You @fabiaserra @moonyuet @BigRoy @MustafaJafar

@BenSouchet
Copy link

Hi @antirotor , you reviewed this PR #4903 last week, thank you! Could you look at this one when you have some time.

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

Looking through the code it looks good, I am still unable to test it in Houdini.

Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

Looking through the code it looks good, I am still unable to test it in Houdini.

@antirotor antirotor merged commit f15c218 into ynput:develop Dec 6, 2023
1 check passed
@ynbot ynbot added this to the next-patch milestone Dec 6, 2023
@MustafaJafar
Copy link
Contributor

I'm sorry for being late.. but this PR needs some follow up PRs to fix some issues..

This PR only works when I have these two options enabled
image

If Submitting to Farm is disabled and split render is enabled , two jobs will be sent to deadline without the publish job.
If Submitting to Farm is disabled and split render is disabled , it will error on Submit Render to Deadline in integration phase
If Submitting to Farm is enabled and split render is disabled , it will error on Submit Render to Deadline` in integration phase

image

Also, it broke many product types as get_output_parameter was refactored.. I made this PR #6037 but still can't figure out how to fix Karma product type.

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community contribution host: Houdini module: Deadline AWS Deadline related features size/M Denotes a PR changes 500-999 lines, ignoring general files type: feature Larger, user affecting changes and completely new things
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants