DepthBuddy Documentation

About

The DepthBuddy is used to create 3D ramps based on Depth/Z, World Position or PRef data, for use in the mask inputs of other nodes. It has a built in preview feature to help you place your masks easier, controls to adjust the resulting ramps, and can generate ramps in any direction, when using position data

Contents

How To Use

Getting Started


Connect the primary input to a render pass or pipe that contains depth and/or position data, then look at the DepthBuddy with your viewer. You will be presented with a black and white preview of the input rgb by default, this is to help you place the masks easier, and does not affect the result

AOVs


By default the DepthBuddy might not have an AOV loaded into it, or you may want to change it for a specific task. You can do so with the AOV channel knob

Below are types of Data AOVs DepthBuddy supports

  • Depth/Z either filtered or unfiltered

  • Position World/Object/Camera/Reference

If you are interested in setting a permanent default AOV, and/or limiting the AOVs available to the node, see the Setup/Installation section below

Ramp Placement


Hold Ctrl+Alt while sampling the preview image to pick where the Start/End points of the 3D ramp will be. The ramp will be displayed as a light purple colour over the preview image

Ramp Limits


When the Limit knob is set to None, the DepthBuddy will generate a ramp between any two points in Depth or Position data. This allows you to make ramps that can go in any direction when using Position data

however you can also restrict the ramp to one of the major axes if you prefer, by changing the Limit knob to X, Y or Z

Ramp Falloff


Use the Falloff knobs to adjust how quickly the mask transitions from on to off, and how it does so mathematically

Ramp Offset


Use the Offset knob to change where the ramp is in relation to the Start/End points. This can be used to adjust the position of your ramp, without changing the length, and therefore look of it. You can also change the sensitivity of this knob with the drop down menu on the right

Connect


Connect the DepthBuddy to the mask input on any standard nuke node to isolate the operation to the 3D ramp you’ve created

The preview image is restricted to the rgb channels and has no affect on the masks alpha, so you don’t need to disable it before rendering/saving!

Advanced Options

Advanced Falloff


Change the Falloff knob to Advanced to adjust the falloff more precisely, via a curve editor. Select the Master curve and adjust/add Bezier handles to alter the way the falloff occurs for this shape. Using a curve editor like this allows us to make custom profiles, or mix things like linear and smooth together, to have more control over the results


Precision Fix

Use Precision Fix to remove single and sub pixel errors. These generally appear on the edges of overlapping objects that can’t be resolved properly in the data AOVs


Edge Blur

Use Edge Blur to soften the edge of shapes. You can use the options on the Advanced Tab to adjust the values more precisely

*Be careful where you use this as it can cause other edge issues if used too aggressively. It’s best used for edges that have aliasing issues, and very light grading*


Erode Shapes

Use Erode to grow or shrink the edge of the mask. DepthBuddy uses a custom erode that is capable of true subpixel values, so you can Erode the shapes very precisely

*Be careful where you use this as it can cause other edge issues if used too aggressively. It’s best used only in emergencies, and for objects with very light grading*


Smooth Shapes

Use Smooth to average the AOV data together and reduce fine details

*Be careful where you use this as it can cause other edge issues if used too aggressively. It’s best used only on high frequency objects like hair/grass, and for objects with very light grading*


Preview Options

Use this section to adjust the preview appearance, like the colour, black and white values, and clamp features


Input AOVs

Use this section to set the default AOVs that will show up in the main AOV drop down menu. You can read more about this in the Setup/Installation section below


Calibration

Use this section to calibrate the tool to your renders world space coordinates. You can read more about this in the Setup/Installation section below

Tips & Tricks


PRef

Use a Position Reference aka PRef AOV to automatically track DepthBuddy ramps to animations


Complex Ramps

Use the Advanced Falloff to create masks that can exist in two or more places in depth, at a time. Below I've created a 3D vignette where the falloff goes in both directions

Setup / Installation


Install

For Personal use. Place the downloaded .nk file into your ToolSets directory. If the ToolSets folder doesn’t exist you can create it. After doing this, and restarting nuke, the Tool will show up when you tab search in nukes node graph for its name

You can read more about this process in the official docs here

For Pipeline use. Always speak with your studios Pipeline support staff before trying to install anything. Every studio is different, but you’ll likely need to ask them to place the file into a central tool repository so everyone can access it


Setup

The Buddy System comes with some calibration functions that can be adjusted before the tool is handed out to your team, or on the fly as needed by the artists. Since all projects are a little different, following these steps should help get the best experience out of the tool

  • Under Advanced > Input AOVs, use the 4 channel knobs to set the default AOVs the tool can use, this will limit the options in the primary AOV knob to reduce clutter/confusion. After setting this, you can uncheck/check the All box to the right of the AOV, at anytime to allow access to all the input AOVs again

  • In addition to the above you may want to set the primary AOV knob to use a preferred AOV by default, like Depth. You can do this at anytime, and simply save over the file as outlined in the install section above to bake in that AOV in permanently

The example on the right is from the MaskBuddy, but the AOV setup step is the same across all the Buddy tools

  • Under Advanced > Calibration, you can use the Convert “Z Up“ to “Y Up“ check box to reorient the world position data into a Y up world. Some applications use Z as the up Axis, and this will cause certain ramp types, like the Y and Z to be generated sideways (Depending on your point of view)

Development Goals


To-Do

Below are some of the things I still would like to do with the tool, if time permits. If there is something you think would be a nice addition, feel free to reach out!

  • Add more ramp zones, similar to the MaskBuddies multiple shapes

  • Possibly add deep support, for more precise masks

  • Add mirror ramp option

  • Simplify internal node tree

Contributors


Thanks!

Below are some of the people who helped develop this tool through direct support or indirectly via online resources

  • Mark Rodziewicz

  • Sheldon Lisoy

  • Adam Dent

FAQ / Bug Reporter

Frequently Asked Questions

  • The Buddy Systems colour picker uses nukes indirect sampling method to allow the user to sample the data AOV while looking at the rgb of the preview image. Make sure you are pressing and holding CTRL+ALT while sampling the preview image, and not just CTRL/CMD

  • This can sometimes happen the first time you load a large render, and it hasn't been fully cached yet. To fix, look at the render with your viewer and wait for the image to be fully loaded before you try sampling the preview image. After the image is fully loaded the first time, you shouldn't need to wait for the viewer to update again, and can sample at any time

  • The Buddy System tools require rgb and alpha channels to work. If your render doesn’t have an alpha channel the preview image and resulting masks/shapes cannot be generated

  • A few things to try here

    • Make sure you have loaded the correct type of data AOV into the AOV knob at the top of the tool

    • Make sure your tools primary input (The input without a name) is connected to a render with an alpha channel

    • Double check that the result isn’t just really tiny, by adjusting the scale or global scale sliders

    • If the tool has a Cam input, make sure you have the scene camera connected to it

  • The buddy tools use python scripts to dynamically update their internals based on user input, and this doesn’t work well with the gizmo format. You can try to convert them to a gizmo, and it might work depending on the tool, but it’s highly recommended to keep them as group nodes. If you are looking to TAB create the buddy nodes they can be save as ToolSets https://learn.foundry.com/nuke/content/reference_guide/toolsets_nodes/create.html

Report A Bug

It doesn’t have to be a bug, ideas to improve the tool, or words of affirmation are appreciated too!

Previous
Previous

MaskBuddy

Next
Next

CardBuddy