Universal Render Adjuster v2.0 (U.R.A.)
Universal Render Adjuster is a dynamic node building toolset designed to simplify and unify render grading and adjustment within nuke. It is built leveraging the default nuke nodes, no plugins or installs required.
The core concept for this tool is to start small and begin to expand changes only when necessary, allowing subdivision of render groups. It maintains concatenation of all rendered image passes, allowing all nodes and breakouts to work in tandem.
A group is simply a subset of image passes that add back up to beauty, you can break apart as much or as little control as you would like.
The primary groups that the tool is pre configured for are:
- bounce: this group is control for ray bounce adjustments
direct + indirect + emission = beauty
- light group: this group controls lights within the scene.
light_group_key + light_group_hdri + light_group_fill + light_group_rim = beauty
- shader: this group controls for surface response.
coat + diffuse + emission + sheen + specular + transmission + volume = beauty
Each group allows changes to be made to the components in the group, the changes made will update all other channels in all other groups and can even be used to adjust single components in other groups.
The panel interface: Preferences are where we can select which config we will use for the breakout, these can be for support of different renderers or simply custom definitions. We can also adjust the work area, this will control the spacing on the constructed nodes. There is also an option to select the grade to use in collapsed builds. Builds give you the option to construct as collapsed adjust nodes or as expanded node blocks. There are toggles for which groups to include in the build. The toggles allow you to select which groups you would like to construct. Nodes menu is a place where you can build individual nodes that are built in the total build if you want to make something custom or if you need to add more control on a selected channel. Injection nodes can also allow separate renders to be combined. Since v2.0 the tool separates the group changes from the individual channels, this only means that the channels inside the stream will not have all the changes baked into them. The new bake channels node is a way to collapse the group changes into the individual channels. (Optional) Extras are functions that do not relate to building but are helpful in dealing with existing nodes that have been built. |
A collapsed tree is a great starting point, it creates up to three adjustment nodes allowing you to grade each channel available at the time of build. The adjustments are wrapped in unpremult and premult operations to allow correct adjustment of the beauty image passes. Note, data passes will also get affected, so it may make sense to have a second data pipe that bypasses the mults.
The label dot is the first piece in the build, it is a simple string identifier for what this breakout is operating on. | |
Unpremult all channels is used for simplicity. If data is also in stream, it is wise to have a separate pipe to bypass premult and unpremult operations | |
The ura_config node sets up the required data and channels for ura to function. Unless your config for ura changes this node does not need to be updated. | |
The adjust nodes, the build will only construct one for each group based on availability. If you do not have any component of a group available, it will not construct an adjust for that group. They are dynamically constructed and must have the image passes in the channel stream on build time. | |
Premult all channels is used for simplicity. If data is also in stream, it is wise to have a separate pipe to bypass premult and unpremult operations | |
The end marker is nothing but a no-op marker. When adjusts are expanded, it will push all nodes below until this marker. If the marker is not there, it will push any dependent node. |
Expanded builds are for maximum control setups; instead of building the adjust nodes, the tool builds the expanded trees. This feature is legacy and is left in for users that like to tweak everything, but it should be noted that you can always start collapsed and hit the expand on the adjust at any time.
While working in an expanded tree, it is important to note that the “channel_merge” node at the bottom of each branch can be enabled and disabled to show the changes to that branch.
Adjust nodes are the core of the collapsed build, they are micro trees that control groups of changes. Those changes are broken up into three main groups:
bounce_adjust
light_group_adjust
shader_adjust
The panel of all adjust nodes will look similar, but the amount and name of the controllers will depend on what group it is built for. The above image is of an arnold light group adjust node, it has light groups available called: “back”, “white”, “magenta”, “emit_direct”, “emit_indirect” and “blue”.
The albedo is the color map rendered for total render, this allows you to work on “raw lighting” if it has been configured.
The ura_layer_contact layer will be generated at the group merge and can be shuffled out or viewed through the viewer to see all the channels in the group at once. If working collapsed, this can be viewed at each collapsed adjust node, in expanded it will be at the group_merge for that group. The group merge has a refresh button that will rebuild this contact sheet based on the ura_config settings. If there are missing channels in the contact, hitting refresh should bring them in.
Leftovers is the channel where any “unused” image components are stored, if you enable all adjustments this image should be black. If it is not black then it means the back to beauty recipe is incorrect or there is a channel missing.
e.g. if you have RGBA_blue and RGBA_blue_indirect, this means that you have 2x the indirect for the channel of RGBA_blue and leftovers will show the color for the difference to help track down the issue.
The controllers are grouped, if you open the groups you will see the available controls for each channel.
The mask channel is exposed for each controller, this allows an adjustment to be masked to specific areas, or even masked by a shadow matte render channel.
IMPORTANT: The default is to have all changes disabled, this is to ensure that we only calculate changes that we want. “disable adjustment” must be ticked off for your changes to make an effect
The beauty channel selection is the reference channel for the unchanged beauty before this adjustment. It will usually only be rgba, but if you are using an adjust on a single component of the rgba like specular, it needs to be set to a total beauty reference image. (described in detail in the “subdividing groups” section)
Finally the expand button, this is a node expand function. It is designed to breakout control for advanced changes. Unfortunately this is a one way trip, the tool has no ability to regroup the adjust after expansion. This is really meant for the moment when the adjust node’s controls are no longer enough to make the required changes.
Once expanded, the disabling and enabling of each branch is controlled at the bottom of the branch with the “channel_merge” node.
Staying grouped has major advantages over breaking out, one of those advantages is the ability to reanalyze the incoming channel list and rebuild the adjust with any new channels provided.
It is usually the case that many changes may be made on a version of a render, then a new pass is available on a new version of the same render. In the above image, changes were made to the two lights on v001 of a render. In v002, a new “magenta” light was added; selecting the existing light group adjust, you can hit the “rebuild selected adjust” button and it will maintain all the changes on the panel and add any new channels to the panel.
This tool is designed for lookdev, lighting and final comping, for that reason we have the ability to export the settings from an adjust node to a JSON file. This will create an output dictionary which can be input into the lighting application to adjust the lights.
Selecting the adjusts in the nodegraph and hitting this button will create a dialog to save the file. The folder will open to the folder at the environment variable URA_EXPORT and if that is not found it will open at the nuke script's save location.
Each selected adjust node will create a JSON file based on the input/filename metadata so it is clear what each adjust was operating on.
channel_inject nodes are special merge nodes that allow separate render passes to combine upstream of a breakout. This means we could provide a separate render for a light group not present in the main beauty and simply inject it while maintaining the channel concatenation.
bounce_inject
light_group_inject
shader_inject
The group needs to be set based on the incoming channels you want to ingest and adjust other groups by.
e.g.
light_group -> adjusts bounce and shader
shader -> adjusts bounce and light_group
bounce -> adjusts light_group and shader
The “not in beauty” toggle is for passes that need to be plused into the RGB as well as the separate channels that need to be injected. This is common when rendering an additional light as a separate layer. If the A pipe result is already in the beauty then this toggle should be turned off so it does not double up in the RGB image
The channels present for the A pipe of an inject should be the RGB sum of all the channels that we want to inject as well as the separated channels in the stream.
e.g. RGBA_magenta, RGBA_blue and RGBA that is the sum of the two light groups.
This will add to the stream the channels for those two lights and modify the other groups by this new change.
**IMPORTANT**
This should not be used if a pass was not originally rendered, then becomes available later.
e.g. v001 of a render had volume pass rendered as a separate render layer we can simply copy in the volume pass upstream of the breakout and work as if it was rendered in the main image, then when v002 of the render is rerendered and the volume pass is contained, our tree and adjustments do not need to be updated.
The inject node is for when we want to adjust the RGB and Group channels with the incoming image
In this menu, you can construct any of the nodes that the total build makes. Making these one at a time or adding one to a selected point in your script, will always be made under the selected node.
Remove empty is an additional utility, this is a simple node that checks the incoming image passes and removes any channels that do not contain information. If you run this node before your breakout, you can prevent “useless” controllers from being built.
IMPORTANT: Make sure to execute the tool on a frame when the render is visible in the frame to prevent removal of passes that contain information.
This toolset allows you to make changes to a group and have those changes affect a single channel. For example, this allows you to make a bounce adjustment to the specular pass, or a sss change to a rim light. This sort of subdivision opens up very complex changes, without increasing render layer count.
To make one of these changes, simply select a node in one of the shuffled branches. e.g. “RGBA_white”, then on the panel hit “bounce_adjust” to create a bounce_adjust for the RGBA_white channel. Now you can make any change to the bounce adjust and it will change only the RGBA_white pass.
This subdivision extends, any group can affect any other group:
shader -> used on light_group or bounce
bounce -> used on light_group or shader
light_group -> used on shader or bounce
This means you can change the sss shader in a single light group or the specular in the indirect, etc.
Albedo or color map division is automatically done to any pass that has a map available and configured. It should be noted that if you enable a change to an albedo, any pass divided by that map should also be enabled for correct concatenation of passes in the pipe downstream.
Between the MergeExpression nodes will be the “raw” pass for adjustment without color information. In the above example, if a change were done to the albedo pass itself, all three changes should be enabled.
There is a nuke preferences menu made available with URA, this is a per user area to make overrides or set up defaults for the user.
The override locations will allow URA to read nodes, grades or configs from the location defined in this panel, before falling back on the install default locations.
These can also be set to environment variables to open up “show”, “dept” or even “facility” specific configs or grade options.
eg:
[python {os.environ['render_configs']}] -> /Volumes/Projects/Show/RenderConfigs
Could be used to dynamically give different shows a separate config for URA to load
[python {os.environ['dept_grades']}] -> /Volumes/Dept/LightingGrades
Could be used to enable department specific grade nodes to be used
or manual pathing is also supported for individual artist overrides.
The workarea multiplier is the default that will load into the URA ui when called and the shortcut will update the hotkey combo that nuke will set for the panel to open (nuke restart required to take effect on the hotkey only)
It is a great idea to merge all CG elements together using merge “all” channels in nuke then using URA to grade the “scene”. This way you can have all the light_groups adjust together within all the render layers, but you have the option to use a “shader” adjust upsteam to tweak a single asset.
URA keeps track of the changes so you can use as many or as few adjusts as you would like or need, but the more that you break out the more render time it will take. If you can just grade then whole scene together with only 3 adjusts, this will be the fastest.