Multi-shot workflow for Nuke

Hi,
I am trying to figure out how to setup the multi-shot workflow in Nuke, while not giving up the Ayon functionality.
Maybe someone from community already has this working?
I do believe there is a Houdini way of switching Ayon context and do multishot renders.

Could you guys offer some insights into Nuke multishot ?

Thank you!

some inspiration:
Nuke Multishot & Digital Matte Painting Workflow with Goodbye Kansas

Random Notes

Grouping
Typically, multishot workflow requires grouping tasks by similarity, and picking hero / key / master shots. Assuming for now that every group needs one and only one master shot. It is also important to have a clear, visual representation of which tasks belong to which group in friendly gui way for efficient project management.

Grouping can be accomplished in Ayon by links, lists, or tags.
Lists are ok for grouping, but need separate mechanism to mark master shot. Not so good for filtering.
Links are great for grouping and can show hierarchy (every task in the group links to it’s master task), but are harder to visualize.
Tags are good for grouping, two tags are needed: group name and master tag. Great filtering, ok, to visualize.

Workfile
It is expected that every task has a Nuke script workfile for single shot workflow. For multishot, artist needs a way to work on one shot, and rapidly switch between group shot contexts, or even better, have a way to see the changes in several shot contexts at once.
This requires a workfile is shared between several tasks. Often, mechanism to pull out the shot from the multishot group and make it single shot is also needed in production.

Not sure how to handle farm rendering from multishot workfile, there would need to be a way to switch the context for every shot contained in multishot workfile?

Ayon Context Switching
Ayon has a mechanism to switch shot context, for Nuke it sets frame range, fps, color settings, and root format resolution. It also uses root node to store context publish options like “validate outdated containers”.
There is a handy ayon-recipes/change_ayon_context.py at e8dfc8caef99bc4bca6bf33fded2d2c74ca3fb7a · MustafaJafar/ayon-recipes · GitHub
This whole switch context, publish, repeat is maybe not ideal approach, but Nuke doesn’t even know the frame range needed for the render node when the context is “wrong”. Maybe allowing render range limit to renders the same way it is allowed for prerenders would help.

Nuke Create Render for multiple contexts in one Nuke script
There is an easy GUI way to create Ayon render for several contexts, but it forces unique variant names. So instead of renderCompMain for sh010 and renderCompMain for sh020, it produces renderCompMain1 for sh020. This requires turning off Validate Folder context.
The default anatomy doesn’t have the render path differentiated by folder context.
To support publish to different

Nuke root variables (GSV) and Ayon
It might be handy to have a way to load some context aware info from Ayon to Nuke Graph Scope Variables. Something flexible, like resolve metadata mapping.
This would need to be a part of context switching.

Thank you for brining this topic, I’d like to share my 2 cents, and thought about leaving it for the weekend to spend some time watching the Goodbye Kansas video.

Firstly, let’s define what is a multi-shot workflow, in AYON realm, it refers to master shot where you can work on the whole sequence from one workfile and publish every shot to its destination context.

Then, let’s take about the requirements in your post:

  • One script (one network graph)
  • Reuse it for all shots
  • Allow applying per shot adjustments
  • Allow switch the context while respecting the properties of each shot like frame range.
  • Allow grouping the shots in different ways

I believe at the current moment we don’t have all of that but we have this:

  • You can create a master shot and maybe place it below edit folder.
  • and in this master shot you create a publish instance for each shot. and for each publish instance, you can set frame range on the write nodes themselves.
    But, this not as easy as having one write node with context and properties changed. Also, Nuke doesn’t yet expect same product and variant but with different folder path as you have pointed out.

Why does it work in Houdini ?

Because, simply, Houdini support solaris context options, which behaves as variables on the level of the graph network, where we can create a “context option: @shot” and use this variable in the Houdini node in AYON parameters. and this trick was used in the AYON Alab demo.

  • This from master scene file, where I had list for testing different assets.
  • This from the file template for one of the assets, instead of the list, it has the asset name, folder path and etc baked in the context options.

In on of @BigRoy demos, I remember he had a big graph with switches based on Houdini’s context options and it was reused for the achieving multishot workflow.


What about doing the same in Nuke as in Houdini?

While Nuke doesn’t have the same feature but I believe we can work around it by having

  • Some custom environment variables
  • Use these variables in the folder path and task knobs on write node (I’m not sure if are using that in Nuke, but I’m just assuming it’s the same as Houdini)
    f"[regsub -all {{\\\\}} [getenv {shot_name}] \"/\"]"
    
  • Add a gizmo to control these custom env variable

BUT, I’ve just remembered this in Nuke can be very dramatic because some shots have specific luts and ocio configuration, and if I’m not mistaken some of these configurations require to restart the application.


Anyways, this topic is better answered by @jakub.jezek or @robin_de_lillo when they have time.