Scripted

Parent Previous Next


 * RR v9 feature * 

Houdini to Royal Render (HtoRR) is a python based houdini plugin which enables artist to submit Royal Render jobs directly within Houdini. It is capable of parsing ROP/LOP networks into Royal Render submissions and send these to the farm. 


NOTE:   RR9 BETA VERSION

This beta version works with RR 8.3.04 in expire trial mode.
The latest features requires RR 8.3.06.


Some features like PDG require the RR9 beta with its python modules as well



It works for 6 months after the RR8 version you use was released.

BETA Installation



Note: 
We update the plugin from time to time.

There is a "Changes log" in file \render_apps\_submitplugins\Houdini\README.md

Submission


HtoRR offers different ways to submit jobs to Royal Render.

To submit a job to Royal Render you can 

  1. Menu Render -> Submit to Royal Render
    If you have selected nodes, then these selected nodes and their incoming nodes will be parsed and submitted.
    If no nodes are selected, all available ROP networks will be submitted

  2. Right-click on a node and select "Submit to Royal Render".

  3. Add a rrSubmitter node to your /our or /stage graph and connect it to the ROP/LOP
    Note: As LOPs do not have output connections, you have to add the LOP path to the rrSubmitters parameter "Output Driver".



Hint:
To disable a node from being parsed, the user can set this node to bypass.
Incoming nodes will still be parsed, but without adding further functionality.  


Special node type support

RR supports special nodes as well:


New Royal Render Nodes


The Houdini to Royal Render plugin comes also with three additional node types:


The plugin is designed to handle large and complex ROP networks to facilitate different kinds of production needs.
It is therefore possible to use and combine multiple rrSubmitter,  rrOverride nodes. 
If you override a setting in a rrSubmitter node, then this override is applied to the parent input ROPs only.

 



rrSubmitter

The RR Submitter node enables you to set basic Royal Render settings for jobs which eventually will be generated upstream.
It also comes with the functionality to send the submission generated by the incoming nodes directly to the farm without opening the Royal Render Submitter window. 



Spare parameter:

If you do not want to use the rrSubmitter node, then you can add spare parameter to your ROP for job overrides.
Supported spare parameter names are:


UI layout




Archive Mode

If you submit a ROP that has activated an archive export (.usd / .ifd.sc / .ass.gz / .rs /.rib ), then you can choose which job RR should submit.
Note that you can use multiple rrSubmitter nodes with different settings (see examples at the end of this help page)

Output Driver

Instead if using an input connection, you can specify the ROP to the parsed.

Automatically Save Hip Files

Save the hip file before submission.




Job Settings

Most override have a checkbox to enable the override for that setting.
If you enable the override, it is set for all incoming nodes.


RR Renderer Name

Overrride the renderer name that should be used for the rrJob.
This way you can choose a different render config for your job.

Only required if you have created custom render configs, e.g. if you have enabled RRs REZ support in these ones.

Note that you can use it to add a prefix or suffix to the renderer name as well. Like   *_rez

Assign To

Override clients or client groups to submit the job to.

Priority

Override rrJob setting "Priority".

Distribution Mode

Full

The submitted job will be distributed in random order between all clients set at the "Assign to" option

Frame After Frame

The submitted job will be processed by only one client at a time in the correct frame order. The job is not necessarily completly processed by only one client. A client can pick up the work at the point where another client left off.

One Client

The complete job will be processed by one client in the correct frame order. If the job is interrupted, it will start from the beginning. 

Sequence Divice

Override rrJob setting "Sequence Divide"

Memory

Override rrJob setting "Required Memory"

Local Scene Copy

Override rrJob setting "Local Scene Copy"

Little job

Override rrJob setting "Little Job"

Delete output on submission

The rrSubmitter automatically deletes frames that had been rendered before.
Useful if you use the Submit Console as it does not have any user interface you ask you if you want to delete existing files

Ignore ROP Inputs

Each ROP is send to the farm "without input connections".  This means that the input of a ROP will not be evaluated.
Each ROP waits for its input ROPs before it starts to render.

Job Settings

A list of all rrSubmitter options. The format is the same as within the rrSubmitter default files. 

e.g. RenderPreviewFirst=1~0; SendDisabled=1~1

Job Variables

A list of Custom Job Variables.

The format is

MyVar=Value; AnotherVar=OtherValue

Env Variables

A list of additional environment variables. 

The format is

MyVar=Value; AnotherVar=OtherValue


Note:
The Houdini scene variable $JOB is automatically added to the job.

If you want to add other scene variables, add them like this:
MYCUSTOMVAR=$MYCUSTOMVAR ;  MYVAR2=$MYVAR2 


Note:

You can modify our example on-Submission script in the rrSubmitter as well to add env vars.

The python script can automatically include env var XY for render app Houdini.






Scene Overrides

Camera

Override the camera for rendering

Frames

Override the frame range

Resolution

Override the frame resolution

Take

Limit the take to be rendered





rrDependency

The rrDependency node creates dependencies between jobs, where a job is waiting to be started until a target job is finished.
The order of the incoming nodes controls the dependencies between jobs.
For example, all jobs generated by nodes from the second input are dependent on the jobs coming from the first input. 



Example scene using RR Dependency:




Note: 
Instead of using the rrDependency nodes, you can check "Ignore ROP Inputs (auto create dependencies)" in the rrSubmitter node as well.

Then each ROP is send to the farm "without input connections". This means that the input of a ROP will not be evaluated.



Note: 
As LOPs in /stage do not have any output connection, please use Fetch nodes in /out to combine your LOPs.



rrPython


Specify a python script that should be executed with Hython.
By default, RR adds these commandline flags that you can read in your python script:
 -scene <SceneFile>

-FlagA <FlagA>
-FlagB <FlagB>
-FlagC <FlagC>

-frStart <SeqStart>

-frEnd <SeqEnd>

-frStep <SeqStep>        

You do not have to use them in your script.

If you want to other/additional flags and values, please use Additional Commandline Param.




rrGenericJob


You can submit any Job of any render application with this node.
We have added some render apps and renderer as preset in the dropdown list.
This node can be used to render e.g. a Nuke comp or Denoise that dependends on (waits for) your Houdini ROPs.


PGD / TOP graph


PDG schedulers

General Note:
You can add one or multiple schedulers to your TOP graph.

If you add multiple schedulers, then you have to assign the scheduler in each of your TOP nodes.

Example:

Use the localScheduler for a fast simulation or a node with a few tasks only.
Then use the royalScheduler for the render nodes that take time to process.




Types of PDG submission

Houdini offers 3 types of PDG submission:


"Submit as job"

The whole Houdini scene is send to a rrClient to execute the TOP graph.
It is the same as if you would open the scene in Houdini on some other machine and click on the "> cook" button.
This means it uses the scheduler that you have assigned to your TOP nodes in your scene.
If you want that the other machine processes all tasks, then you have to add a localScheduler node to your TOP graph and assign it in EACH of your TOP nodes.
If you have assigned a royalScheduler, then this machine controls the TOP execution only.

Per Task submission

Each time a task is ready, Houdini sends it to RoyalRender.
RR creates a job per TOP node and each frame of that job node is actually a task.
The "frames"/tasks are activated by Houdini once they are ready to process.

"Fully Static Cook"


 - - NOT SUPPORTED BY ROYAL RENDER - -

This would submit all tasks of the TOP onto the farm with all required dependencies.
On the RoyalRender side, this would flood the render queue with hundreds of separate 1-frame jobs (depending on the size of your graph)
And on the Houdini side, it has multiple disadvantages. Like some TOP nodes are not supported. 
Therefore SideFX states this information for PDG schedulers: 
"For the above reasons we do not recommend attempting to generate fully static jobs from PDG graphs."






Usage







Distributed Simulations

Houdini supports to split some simulations onto multiple clients.
https://www.sidefx.com/docs/houdini/dyno/distribute.html


There is a good video with example scenes:
https://www.sidefx.com/tutorials/h15-masterclass-distributed-simulations/



Usage


The Houdini distribution or slice tool automatically creates a HQueue submission node in /out.

Instead of entering all values again into a RR node, RR reads all values from this HQueue submission node instead.

(You may connect a rrSubmitter node to the output of the HQueue submission node, but this is not required).


RR reads these settings from the HQueue submission node:



RR creates two jobs:

  1. The first job starts the simulation tracker which is requires for sharing information between the simulation slices.
    It updates the second job with its IP address to let the other clients know where to connect to.
    And it enables the second job that is waiting for this job to be started.
  2. The second job starts the simulation on multiple clients.
    Once all clients are done with the simulation, a post-render script sends a command to the simulation tracker to shut down.



Note:
If you want to reset the job, you have to abort and reset both jobs.
As the first job is required to start first to set the simulation tracker IP.

Solaris Gallery snapshot



You can use Royal Render to render snapshots for your Houdini Solaris Gallery.


Usage


The first time you want to use Royal Render, you have to tell Houdini that it should use Royal Render for the snapshot generation.
Click on the "Background" button and hold down the mouse button to be able to choose Royal Render.

The next time you want to use Royal Render, a single click on the "Background" button is sufficient.




Configuration


The configuration opens the first time you use Royal Render.

Or you can open it with a click on the config button.


Render Delegate

Choose the renderer you want to use

Required: USD Directory

You have to specify a (temp) folder for the .usd files on your fileserver.
Otherwise the rrClient is not able to find the .usd file.

Optional: Override Gallery Folder

By default, RR renders the images into the same folder as Houdini "Live Render" option.
Which is folder $JOB/gallery/$HIP.state/

You may override the folderfor the rendered images.




API


The Houdini to Royal Render plugin comes with a small API (htorr) to integrate the plugins functionalities into custom tools.  

The interface provides a wrapper class for all supported node types. An appropriate instance of this class can be created with a `hou` alike method `htorr.node(pathToNode)`. The returned node wrapper instance has a attribute `jobs`, which is a custom list of all the jobs generated by this node. To submit a job use the lists method `submit(gui=false)`.


Example:

import htorr

rrnode = htorr.('/out/merge1')

print(rrnode.jobs())

rrnode.jobs().submit()


API Documentation

The plugin is documented via Doxygen. Natively the support for python in Doxygen is limited. Therefor doxypypy is used, which is a Doxygen filter to enable better python syntax support. It can be installed via pip with ```pip install doxypypy```. In order the use it in conjunction with Doxygen the file "py_filter.bat" is needed.


 



Examples


This example uses 2 rrSubmitter nodes to be able to override different options for rrJob ".ifd create" and ".ifd render".

The dependency is required to chain the 2 jobs again.

The last rrSubmitter3 node is not required. It was just added to have a Submit button. 
You could use the Submit command in the Houdini menu as well.




Merge and switch node parsed upstream:




Combination of RR and Houdini nodes:




Extended combination of RR and Houdini nodes: