About the Domain of Definition (DOD)

 

The Domain Of Definition

The Domain of Definition (DOD) is a rectangular zone that Shake uses to bind the significant pixels in an image in order to optimize rendering speed. Everything outside of the DOD is considered as background (black by default), and is therefore ignored in most computations. Proper handling of the DOD is an extremely powerful way to speed up your render times.

To demonstrate the DOD node's efficiency, do the following:

To test this:

 


Assigning a DOD

All images from disk are automatically assigned a DOD that is equal to the resolution of the image. There are five ways to alter the DOD:

 


 


 


 

Note: When using onscreen controls to edit a shape (for example, a Rotoshape or QuickPaint object) that has control points within the boundaries of the DOD, move the cursor over the shape inside of the DOD, and then drag-select the points.


Combining images with a DOD is an excellent way to optimize green/bluescreen images that need garbage mattes, because it simultaneously removes the garbage areas and assigns an efficient DOD to the image. Here is an example tree:


building (OK, it's a girl, deal with it)
QuickShape1
Primatte1
Inside1

 

With a good understanding of the role of the DOD, you can optimize the tree before and after the node in question. The above example not only optimizes any nodes you attach to Inside1, but executes the Primatte and reads in the part of the image that is inside of the DOD, reducing processing and IO activity.

 

Keying, Color Correcting, and the BGColor

This section discusses the area outside of the DOD, which is called the Background Color, (BGColor) for short.

The two main keyers in Shake, Keylight and Primatte, recognize the background color, and have a toggle to either key it in or out. By default, the background area is left black in the Alpha by the keyer. However, by toggling BGColor on, it turns the background completely white.

When color correcting the BGColor, Shake processes it very quickly, as it recognizes there is a pure correction applied to previously black pixels. If the color correction doesn't change black, like Gamma or Mult, it is ignored. If it does affect the black areas, like Add or Compress, it processes these areas, but understands that they are still the result of a lookup process. Therefore, the DOD does not get reasserted to the resolution frame. This is the same process that is used when the Infinite Workspace kicks in. So even though the pixels outside of the DOD are not visibly different from the pixels inside, the DOD remains in place.

 

There may be cases, however, where you want to take advantage of the DOD for masking purposes. In this tree, an image is scaled down, and the the brightness raised up with an Add node. This, however, turns the area outside of the image a medium grey. Since this area is recognized to be outside of the DOD, it can be returned to black with the Color - SetBGColor node, which sets the color for the area outside of the DOD.

building
Move2D1
Add1
SetBGColor1

 

 

Masking Using the Constraint Node

The Layer - Constraint node.also limits a process. The Constraint node mixes two images according to a combination of modes. The modes are Area of Interest (AOI), tolerance, channel, or field. For this discussion, AOI applies. Toggle it on, and then set the area box. Only the area inside of the box of the second image is calculated.