top of page
  • Writer's pictureGavin Whittaker

Unlocking the Secrets of Subtractive AOV Grading in Nuke

Updated: Jun 17, 2023


Introduction

Hello to my fellow pixel wranglers and node nerds! Whether you're a Nuke novice or a seasoned veteran of the VFX trenches, we're all here because we share a love for creating magic on screen, one frame at a time. And, of course, for our shared appreciation for the fine art of tearing our hair out over the perfect comp. Today, we're going to dive into the world of AOVs and how subtractive grading can revolutionise your workflow.







Understanding AOVs

Okay, let's rewind a bit. For the uninitiated (or those who need a refresher after too many late-night sessions), AOVs, or "Arbitrary Output Variables", are our bread and butter in CG compositing. They're essentially the different components of a render that we can isolate and manipulate independently, like different lighting, shadows, specular, and so on.

Think of them as the ingredients in your favourite recipe. Sure, the final dish (the beauty pass) is delicious, but sometimes, you want to tweak the amount of spice, or subtract some salt. A traditional approach to handling these AOVs is the additive method, where we piece together each AOV to create the final image. It's like baking a cake from scratch, but sometimes we just don't have time for that!

Traditional Approaches to Grading AOVs: (The Additive/Breakout Method)

Before we wander off the beaten path and into the wilderness of subtractive grading, let's reminisce for a moment on the well-trodden road of the additive or breakout method, our old reliable 30 legged workhorse in the world of AOV grading.



(image source: https://www.artstation.com/blogs/dkgolan/2P4l/ptl-07-render-layers-and-aovs)


The additive, or breakout, method in grading AOVs is, much like assembling a LEGO set with the instruction booklet at your side. You have your separate AOVs - The lights, the direct, indirect, specular, refraction, shadows, and more - each representing a distinct 'layer' of the scene's lighting information. Your mission, should you choose to accept it, is to take these individual AOVs and combine them together to construct your final image, the beauty pass.

In a way, it's like being handed puzzle pieces one by one and then tasked with putting them together to reveal the final picture. It's a step-by-step, layer-by-layer process. Each AOV can be adjusted individually, (and often is tweaked) before it's added onto the comp. It’s methodical and precise, giving you a high degree of control over each and every element of your scene.

But every rose has its thorn, and the additive method is no exception. It can be a time-consuming process, especially when dealing with a large number of lights, AOVs, or complex scenes. Imagine baking 10 layered a cake by whisking each egg, sifting the flour, and creaming the butter all separately before mixing them together. It's a meticulous process, can it take LOTS of time!

Moreover, this process demands a deep understanding of how all the different components interact. Ever added an AOV into your comp, only to find that it's thrown everything else off balance? Yeah, we've all been there. Different AOVs may require different blending methods, such as additive, multiply, or even screen, to achieve the desired result. Balancing these various methods and understanding their impact on the final composition can be a challenging task.

But here's the catch - not all puzzles are created equal. Depending on how you choose to solve it, you may end up with a completely different picture.

One approach is to rebuild using the different AOVs (Specular, Diffuse, Etc) . It's like having a recipe with precise measurements for each ingredient. You take each AOV, then add it to your mix. It's meticulous, methodical, and offers a high degree of control over each element. However, getting the proportions wrong might leave you with a final image that's slightly off, like a cake that's too sweet or not sweet enough.

The additive method is more than just a principle; it's a practice that some studios will have integrated into their pipelines. The reality is that every VFX house has its own unique workflow.

Most studios have their own "breakout layers" tool that dovetails with the specific AOVs they receive from their lighting department. This tool is like the Swiss Army knife of compositing, designed to dissect the beauty pass into its component AOVs with surgical precision.

Imagine it as a complex dance that the lighting department and pipeline TDs of the studio choreographed. The lighting team generates the AOVs in a specific way, and the "breakout layers" tool is tuned to interpret and reconstruct these layers perfectly. It's a harmony of technology and artistic vision that culminates in the recreation of the beauty pass.

But, as anyone who's attempted a new dance routine will know, it's rarely smooth sailing (or should that be twirling?) from the start. While these tools can be incredibly useful, they can also add a layer of complexity to the process.

Rebuilding the beauty pass using the different AOVs or different lights can result in unexpected variations. For example, sometimes the sum of the parts might end up exceeding the whole, resulting in a final image that's significantly brighter than the original beauty pass - let's call it the "Double Brightness Bump".

Every studio has its own way of dealing with these challenges, and part of being a professional compositor is learning how to tango with these unique workflows.



An Introduction to Subtractive Grading/Editing

Now that we've taken a stroll down the memory lane of the additive method, let's dive into subtractive grading.

Subtractive grading is like a secret handshake in the world of AOVs, an insider technique that inverts traditional workflows. Instead of assembling your beauty pass from the base level, think of it as starting with a full deck of cards and then selectively removing and adjusting the ones you need.

In the realm of Nuke compositing, this means launching your project with your complete beauty pass or AOVs, and then tactically using subtractive operations to single out AOVs for alteration. Essentially, it's an exercise in reverse

At the heart of subtractive AOV grading lies the beauty pass, the final, fully composited render. From this, different AOVs are subtracted, enabling you to separate out the elements that constitute the remainder of the render. For instance, when you subtract the specular AOV from the beauty pass, you're left with a render sans specular highlights.


To put it simply, it's like carefully removing a card from a full deck. You're left with the deck minus that card. As long as you return the card to its original position, you're free to change its color, brightness, or other attributes before placing it back.

This could involve modifying the color or brightness of specular highlights, for example. Once you've made your adjustments, the tweaked AOV is reintegrated into the workflow. This allows you to fine-tune different aspects of the render independently, without altering the rest of the composition.

Subtractive grading offers a precise control over the final look of the render. However, it necessitates meticulous management of your AOVs and a deep comprehension of how different elements of your render contribute to the final output. For example, it's quite easy to unintentionally intensify lights to a physically inaccurate level.

To draw on the card deck analogy again, imagine if you altered the Ace of Hearts from the deck. You could change its color, hue, saturation, and in some instances, even the icon. But it still needs to be recognizable as the Ace of Hearts when it's returned to the deck, or the integrity of the game is compromised.

While this technique simplifies the task of grading a CG render by eliminating the need for complex breakout scripts, it also allows for chained or stacked adjustments. This way, it's easy to track what and when you're grading or changing AOVs.

Like additive or breakout methods, many studios often have proprietary AOV grading tools that essentially employ this subtractive method behind the scenes. So, while it might seem a little unconventional, subtractive grading is a powerful trick to have up your sleeve in the world of VFX compositing.


Subtractive Method breakdown:

below is a detailed description of how the subtractive method is achieved in a script as well as calling out some issues that folk often get and how to avoid them:

The diagram above shows the standard setup to grade AOV's subtractively.

The key takeaways are:

  • Unpremult all layers first.

  • shuffle out your target AOV

  • subtract it from the plate (i like to use from so i keep my B pipe in the right place)

  • once thats done you can grade the newly removed AOV how you like before adding it back in.

  • IMPORTANT: **REMEMBER! YOU ARE WORKING WITH RGBA HERE (in the main pipe) NOT DIRECTLY DEALING WITH THE AOV - YOU ARE CHANGING AND UPDATING THE FINAL RESULT.

  • The above is an important concept to understand because it leads directly to the next step - as you can see in the digram above, if you look at the top of the tree you can see that you have shuffled youe AOV into RGB space - now we need to put back the changes to the AOV - the ShuffleCopy at the bottom is where we put overwrite the original AOV with the changed version.

  • We do this so that if we want to make more changes further down the pipe, we want them to affect the "Changed" version of the AOV's this way we can stack and chain these methods (especially useful when you create a tool which does all this in 1 go - then you can stack the AOV tools without breaking the AOVs too much.

  • Lastly we are copying back our original alpha: because its good practice and we want to cover our arses :p

  • then dopnt froget to premult (ALL LAYERS) again.


TIP: If doing this over and over seems like too much fuss and you dont have access to an AOV tool, not to worry - i have included a download link to my AOV grading gizmo below :) (saved as group for convinence, so you can just copy and paste the text into your script and you have my tool, then feel free to save as toolset). this way you wont need to manually shuffle out and back in layers or worry about issues with alpha etc.




Download AOV Grader "Gizmo"

GW_AOV_GRADER_V001
.zip
Download ZIP • 2KB


Pros and Cons of Subtractive Grading

Subtractive AOV grading is a method used in compositing and visual effects work to manage and manipulate the different render passes of a scene. It has a number of pros and cons:


Pros:

  1. Efficiency: By subtracting a pass (or multiple passes), tweaking it, and then adding it back in, artists can directly target and adjust specific elements of the scene without affecting others. This can save a lot of time compared to having to individually adjust numerous overlapping passes.

  2. Focus: Subtractive grading helps artists avoid getting overwhelmed by the complexity of the scene. By dealing with one AOV pass at a time, artists can focus on the task at hand and not get distracted by other elements.

  3. Control: This method offers a high degree of control. Since you're working with individual AOVs, you can fine-tune each one to get the desired look.

  4. Cleanliness: Subtractive grading can lead to a tidier node graph in Nuke or other compositing software. By isolating each pass, the artist's work is more organized, easier to navigate, and more understandable for anyone else who may need to work on or review the project.

  5. Problem Solving: When unexpected issues arise in compositing, being able to isolate and manipulate individual passes is incredibly valuable. This method allows for precise troubleshooting.

Cons:

  1. Dependence on Accurate Passes: The success of subtractive grading largely depends on the quality and accuracy of the AOV passes. If these are not accurately rendered or there's data missing, it can lead to complications in the subtractive process.

  2. Potential for Errors: If you're not careful, it's possible to subtract too much or adjust an AOV in a way that doesn't align with the other passes. This can lead to inconsistencies in the final image.

  3. Requires Knowledge: Subtractive AOV grading is a more advanced technique and requires a good understanding of how different AOV passes contribute to the final image. It may not be suitable for beginners or those not familiar with the process.

  4. Time-Consuming Setup: Although subtractive grading can make the actual grading process more efficient, correctly setting up the subtractive process for each AOV pass without a AOV tool and can also be time-consuming .

Despite the potential challenges, many artists find that the advantages of subtractive grading outweigh the disadvantages, particularly on complex projects where the highest level of control and precision is required.


Subtractive vs. Additive Approaches:

While each method has its respective merits and shortcomings, the choice between additive and subtractive grading is largely contingent upon a variety of factors. These can include the specific demands of a project, the existing workflow of the studio, the tools available, and the level of expertise of the artists involved. Let's dive into a more detailed comparison:

Complexity and Control:

The additive method is akin to building a puzzle piece by piece, where every component is distinctly visible and modifiable. While this provides a comprehensive view of all the AOVs and their impact on the final image, it can sometimes lead to an overwhelming number of components to manage. Additionally, tweaking one AOV can often upset the balance, necessitating adjustments to other AOVs as well.

Subtractive grading, on the other hand, allows artists to focus on one AOV at a time, simplifying the grading process. It provides a streamlined approach to modifying a single component without causing a ripple effect on other elements. This could potentially make it easier for artists to isolate and rectify issues, giving them greater control over the final image.


Efficiency and Workflow:

While additive grading can be a time-consuming process due to the handling of multiple AOVs, it also provides a high level of precision and control. This is particularly beneficial for complex scenes requiring detailed manipulation. On the other hand, the process can be slow and requires a solid understanding of how different components interact.

Subtractive grading can be a quicker alternative, particularly when using an AOV tool that handles much of the process under the hood. It offers a more efficient way to target and adjust specific elements without needing to tweak overlapping AOVs individually. Furthermore, the ability to chain or stack adjustments makes it easier to manage modifications. This approach is therefore often preferred when efficiency and ease-of-use are paramount.

Troubleshooting:

Troubleshooting in an additive workflow can sometimes be a daunting task, especially with a large number of overlapping AOVs. Errors could stem from various points and could be challenging to isolate.

Conversely, subtractive grading allows for precise troubleshooting. By isolating and manipulating individual AOVs, artists can easily locate and rectify any anomalies. This process simplifies the task of resolving unexpected issues, making the overall troubleshooting process more efficient.


Learning Curve:

Additive grading requires an in-depth understanding of the interaction of different AOVs and the impact of each on the final image. While this might be a steep learning curve for beginners, it offers a greater depth of control for experienced artists.

Subtractive grading, on the other hand, can be more accessible for those just starting out, especially when an AOV tool is available. Even though it still demands a solid grasp of how different AOVs contribute to the final image, the process of focusing on one AOV at a time makes it a more manageable technique to learn and master.


Conclusion

Whether you're a subtractive grading enthusiast or an additive method purist, understanding both approaches and knowing when to use them is essential in our ever-evolving industry.

The world of compositing is akin to an endless playground where new techniques are waiting to be discovered. So, let's not get too comfortable in our workflows and keep pushing those pixels in new and exciting ways.


So, go forth, experiment with subtractive grading, and who knows? Your next node masterpiece may just be a subtraction away.


1,406 views0 comments

Recent Posts

See All
bottom of page