renderpasses example for multi shot template

339 views
Skip to first unread message

s.des...@gmail.com

unread,
Jun 5, 2024, 10:35:08 AM6/5/24
to gaffer-dev

Hi,

I'm exploring the new render passes workflow in Gaffer. Is it possible to see an example of a multi-shot template that uses the render passes node?

Here are some questions:

  • In our studio, we usually have each render layer in a separate stream at the end of our graph so we can adjust each render layer independently. This includes adjusting primary visibility, mattes, etc. We also perform shader overrides in these streams. Each render layer also has its own output node to set AOVs and shot context.

    How do you manage shader overrides at the render layer level with the render pass editor? How do you edit the other settings that we typically find in the Arnold attributes node?

  • I have tested the camera inclusion/exclusion and matte inclusion/exclusion features. If I have multiple paths to copy in the cells, it quickly becomes hard to read, mainly because all paths are copied one after the other.

    Is there a better way to manage the paths or to view the paths as a list like in the path filter?

  • How do you manage the BATCH output per render pass and for a multi-shot script?

  • How do you define AOVs per render pass?


I'm really interested to know more about your workflow with the render passes !
All these new features looks really cool and I'm eager to be able to use them in our templates !!

Cheers,

Seb

s.des...@gmail.com

unread,
Jun 7, 2024, 10:55:01 AM6/7/24
to gaffer-dev
Hello John,

I have set up a template with the render passes and I think I have something that we can use.

I would like to have your input on how this template is build :)
is there something that can be enhance / optimized for you ? or used in a wrong way ?

Questions above are still valid.

Thx,

Seb

Murray Stevenson

unread,
Jun 12, 2024, 12:42:02 AM6/12/24
to gaffe...@googlegroups.com
Hi Seb,

Thanks for the questions, I've attempted to answer them inline and have attached an example script covering a few of the ideas mentioned within. Please let us know if you need anything clarified. :)


> How do you manage shader overrides at the render layer level with the render pass editor? How do you edit the other settings that we typically find in the Arnold attributes node?

At its simplest, a render pass is just the Gaffer scene evaluated with a particular value of the `renderPass` context variable, so manual scene adjustments can be made for a render pass much like any other context based edit by using a NameSwitch, Spreadsheet, Expression or ContextQuery to drive the edit based on the current value of `renderPass`.

The Render Pass Editor creates new edits following the same concepts by automatically populating a Spreadsheet with edits to the scene globals within an Edit Scope node. For a multi-shot workflow you could use multiple Edit Scopes, with one or more global Edit Scopes defining the render passes and settings common to multiple shots or a sequence, and then using shot-specific Edit Scopes to create additional render passes, disable upstream render passes that are not required for the shot, and override shot specific settings.

The attached example script expands on the Render Pass Editor example provided with the Gaffer releases, turning it into a simple multi-shot setup with shot overrides, render pass overrides, and per-shot per-render pass overrides. Hopefully the backdrops and annotations give you a rough idea of the sorts of things you can achieve by combining Edit Scopes, NameSwitches and other nodes to edit the scene.

At the pipeline-level there's also capability introduced in Gaffer 1.4.4.0 to register Render Pass "types", which can be used for more templated setups by registering adaptor node networks that are automatically applied when a render pass is configured to a specific type. One use of these can be to override shaders and attributes like is done in the example provided "shadow", "reflection", and "reflectionAlpha" types. We can provide more info on setting these up if you're interested.


> I have tested the camera inclusion/exclusion and matte inclusion/exclusion features. If I have multiple paths to copy in the cells, it quickly becomes hard to read, mainly because all paths are copied one after the other.
> Is there a better way to manage the paths or to view the paths as a list like in the path filter?

Those columns accept Set Expressions so you could also use sets which can be a bit easier to manage than long lists of paths. It's unclear which Gaffer version you are testing with, but we've recently improved the editing experience with Gaffer 1.4.5.0's new SetExpressionPlugValueWidget. This adds syntax highlighting for Set Expressions with auto-complete of set names, and turns the widget into a multi-line editor so you could split your lists of paths over multiple lines. There's still more to improve as far as how large amounts of data are presented in the overall table view of the Render Pass Editor, but this new widget should be quite an improvement to the editing experience so it'd be worth updating to a more recent release if you're still on 1.4.3.0 as your example script suggests...


> How do you manage the BATCH output per render pass and for a multi-shot script?

Assuming your multi-shot outputs are already using context variables such as ${shot} to define their output paths, you'd also include ${renderPass} in the output path to make a multi-shot, mult-renderPass aware output such as "/path/to/project/renders/${shot}/${renderPass}/beauty/beauty.####.exr" - though it appears you're doing this already in your example script so it seems you've already figured this out, or maybe I'm misunderstanding the question?


> How do you define AOVs per render pass?

At present you'd use Outputs & DeleteOutputs nodes upstream of a NameSwitch node selecting based on ${renderPass} to create and delete AOVs per render pass. Looks like you've already taken this approach in your example script, though one potential improvement would be to leverage the NameSwitch's pattern matching with some conventions on the names of the created render passes to set up common sets of AOVs for particular groupings of render passes to avoid having to create a switch input for each and every render pass. Outputs nodes can also be chained together, so you could have a common set of outputs defined on one node and then switch in additional nodes for just the render passes that require extra outputs.

Gaffer's output definitions could do with an upgrade and once we make them a bit more procedural we would like to add support for AOV configuration in the Render Pass Editor in the future...


> All these new features looks really cool and I'm eager to be able to use them in our templates !!

Thanks! We're glad you're seeing the potential! Things will continue to evolve in future 1.4 releases, there's always more to be done and feedback is very much appreciated...

Cheers,

M

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/696026ba-ab05-4b5a-bf5f-25c4be17a685n%40googlegroups.com.
multiShotRenderPassExample.gfr

s.des...@gmail.com

unread,
Jun 12, 2024, 8:27:40 AM6/12/24
to gaffer-dev
Hello Murray,


Thanks for all the information and the example template.

That all seems pretty clear to me!
There's just one point that I find surprising in your template.
I see in the template that you first create the render passes and then use a nameswitch with the context variable '$renderpass' further down the stream.

I thought that the context variables could only be read by the nodes further up the stream. Am I missing something ?

Thx,

Seb



.

John Haddon

unread,
Jun 12, 2024, 8:53:25 AM6/12/24
to gaffe...@googlegroups.com
On Wed, Jun 12, 2024 at 1:27 PM s.des...@gmail.com <s.des...@gmail.com> wrote:
I see in the template that you first create the render passes and then use a nameswitch with the context variable '$renderpass' further down the stream.

I thought that the context variables could only be read by the nodes further up the stream. Am I missing something ?

That's correct : context variables travel upstream, so can only be read upstream of the node that created them. But the `${renderPass}` variable is given a default value globally in the Script Settings, so is available to all nodes (at least once the current render pass has been set using the RenderPassEditor). The other place that sets the variable is the RenderPassWedge node, which will typically be near the bottom of the graph, below the Render node. So that will also be available to all the upstream nodes.

Note that creating a render pass does not set the `$[renderPass}` variable. This is true whether you use the RenderPasses node directly, or the RenderPassEditor via an EditScope. What creating a render pass does is add the name of the pass to the `renderPass:names` option in the scene. That data travels downstream like all other scene data, and is used by the RenderPassEditor to display the list of passes, and the RenderPassWedge node to know what passes to iterate over. In other words, the `renderPass:names` option provides the valid values for the `${renderPass}` context variable.

Hope that makes sense?
Cheers...
John

 

s.des...@gmail.com

unread,
Jun 18, 2024, 11:48:35 AM6/18/24
to gaffer-dev
It's perfectly clear, thx

Seb
Reply all
Reply to author
Forward
0 new messages