Eyeon:Manual/Fusion 6/ROI and DOD

From VFXPedia

< Eyeon:Manual | Fusion 6
Revision as of 02:16, 23 February 2010 by Peteru (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
ROI and DOD

[ Main Manual Page ]


Rendering in Fusion 6 can take advantage of advanced techniques called Region of Interest and Domain of Definition to dramatically improve

Domain of Definition

In compositing the domain of definition refers to a rectangular region that defines what part of an image actually contains data. Domain of definition makes the concept of an image's actual resolution somewhat flexible, since rendering is no longer limited to the actual width and height of the image. This has two effects on the way Fusion renders images.

Firstly, tools will no longer be required to render portions of the image that do not get affected by the tool. This helps the renderer to optimize its performance. Secondly, Fusion can now keep track of, and apply a tools effect to pixels which lie outside the visible portion of the image. This concept is often referred to as an 'infinite workspace' or 'infinite canvas'.

The term "domain of definition" is frequently abbreviated to DoD.

Image:f6-textexample.png

For example consider the above 320x240 pixel image, which shows the output of a Text+ tool rendered against a transparent black background. The text only occupies a portion of the pixels in the image. Without domain of definition Fusion would be required to process every pixel in the image. With a DoD Fusion is able to optimize effects applied to the image, producing faster results and consuming less memory in the process.

The following image shows the same image with the DoD outlined in green.

Image:F6-textDoD.png

For the most part, the domain of definition is calculated automatically and without the need for intervention from the artist. For example, all of the tools in the Creator category automatically generate the correct DoD. For tools like Fast Noise, Mandelbrot and Background this is usually the full dimensions of the image. In the case of Text+ and virtually all of the mask tools the DoD will often be much smaller.

Media loaded from disk will typically also have the DoD default to the full image width. The exception is media stored in the OpenEXR or Fusion RAW file formats. These formats are capable of storing the DoD of the image, and Fusion will apply this when loading the image.

The domain of definition is established as soon as the image is created or loaded into the composition. From there it passes downstream, where tools combine it with their 'region of interest' in order to determine exactly what pixels should be affected by the tool. The region of interest concept is described in more detail later in this chapter.

Tools will shrink, expand or move the DoD as they apply their affect the image. This causes the DoD to change from tool to tool. The current DoD for a tool is indicated in the tooltip that appears when the mouse hovers over the tool tile for a moment in the flow, as pictured below.

Image:F6-popup.png

The DoD is shown as two xy co-ordinates indicating the corners of a rectangular bounding box (in pixels). In the screenshot above the DoD rectangle is from 116,94 to 204,14.

In addition to the DoD used by each tool, the tooltip also shows the current image dimensions. It may also display a field named 'data', which describes the portion of the image which was last rendered by the tool after combining the DoD with the region of interest.

Note that this information will only appear in the tooltip if the tool has rendered at least once.

Image:f6-set_domain.png

It is also possible to set the DoD for an image manually using the Set Domain tool (found in the Miscellaneous category). This can be useful when dealing with pre-created media that does not occupy the full image dimensions. For example a rendering of a 3D character who walks toward the camera will frequently only occupy a portion of the image. The Set Domain tool can be used to animate a DoD that covers the character and ignores the rest of the image.

Sampling Outside the DoD

While the DoD's impact of Fusion composites is mostly positive, there are places where it significantly changes the way artists approach a composite. Most frequently this occurs in places where the effect must use or sample pixels that lie outside the current DoD.

The following images best demonstrate the issue. Below we see three images. The first image shows an ellipse mask, the second shows what happens when using a Channel Boolean tool to invert the image without DoD, and the third shows what the same result, but with a DoD.

Image:F6-dod_invert_normal.png

Image:F6-dod_invert_invert.png

Image:F6-dod_invert_negative.png‎

As you can see, the Invert operation is applied only within the area of the DOD. This is usually not the desired result.


Region of Interest

The region of interest is a rectangular region like the domain of definition. Unlike DoD, which tells the renderer what pixels are actually present in the image, the region of interest tells the renderer which pixels actually need to be rendered. When a tool renders it combines the current region of interest with the current DoD to determine what pixels should be affected.

The term region of interest is frequently abbreviated to RoI.

Artists often use the RoI to restrict rendering to a small region of the image. This can significantly improve performance when working with very large compositions or complex compositions.

Image:F6-roi_button.png

The RoI button in the 2D display view toolbar can be used to turn the the Region of Interest on or off for that display view. The Region -> Enable Region option in the display views context menu will also toggle the RoI. Clicking on the small arrow next to the RoI toolbar button will display the same list of options shown in this context menu.

When RoI is enabled a rectangular RoI control appears in the display view. If this is the first time RoI has been enabled it will be set to the full width and height of the image. Otherwise the last known position of the RoI for that view is used.

Image:F6-roi_control.png

Click and drag on the edges of the rectangle to adjust the size of the RoI. Click and drag on the corners of the rectangle to adjust both dimensions at once. To move the RoI without adjusting its dimensions click and drag on the small circle found at the top left corner of the RoI rectangle.

A faster way to set the RoI is to select Region -> Set and then click drag in the view to set a RoI rectangle directly.

While the RoI is active Fusion will only request rendering of the pixels inside the region when it displays an image in that view. Flipbook previews created in that view will also respect the current RoI. Saver tools will always use the full image dimensions when writing the image to disk, ignoring any RoI set in the views.

The RoI improves not only rendering speed and memory use, it can also reduce file I/O, since the Loader tool will only attempt to load pixels from within the RoI. This does require that the file format support direct pixel access. The Cineon, DPX, OpenEXR, TIFF and many uncompressed file formats are some of the formats that support this feature.

Changes to the viewed image size will cause the pixels outside the RoI to be reset to the image's background colour. This also includes switching in and out of Proxy mode, as well as Proxy mode switching that happens with Auto Proxy enabled. While the image size is maintained, so will the pixel values outside the RoI when they were last rendered. This can be useful for comparing changes made within the RoI with a previous tool state.

The following images shows how a color correction looks with an RoI applied when Auto Proxy mode is on, and when it is off.

Image:f6-roi_autoproxy.png

Image:f6-roi_no_autoproxy.png

To reset the RoI to the full width and height of the image select Region -> Reset from the context menu or the toolbar button menu.



The contents of this page are copyright by eyeon Software.