ID 427535 - Catalog items hold ID buffers for every layer ('render output'/'AOV'/'pass')

Follow

Problem summary:

When preview rendering multiple render outputs and an ID pass is enabled, the Catalog creates an ID buffer for every output (Catalog 'layer'), even though the Katana Monitor currently supports the use of an ID buffer only on the primary output (see ID:95732) and under typical usage (multiple AOVs for a single camera and geometry collection), multiple outputs will share an ID buffer. This means that a Catalog Item may consume significantly more memory than is necessary.

Steps to reproduce:

  1. Load the attached project, 'Multi-Light_Mulit-Camera_3Delight.katana'. This generates a simple scene that is configured to generate additional per-light and camera render outputs.
  2. Perform a Preview Render of the Render node.
  3. Middle-mouse drag the Catalog Item from the Catalog tab to the Python tab to generate an expression of the following form: `catalogItem = CatalogAPI.CatalogItem.CreateCatalogItemFromID('i_1_0')`
  4. Append the following code and execute:

```


for layerView in catalogItem.getLayerViews():
    layer = layerView[0]
    print layer, "buffers consume", int(catalogItem.getBuffer(layerView).getSize() / 10**6), "MB."

```

This prints "134 MB" for each layer. This corresponds to two 4-channel 32-bit 2048*2048 buffers: one for the image, one for the ID buffer (4 channels * 4 bytes per channel * 2048 * 2048 pixels = 67 MB).

Only one ID buffer is required per camera, and only the primary output's ID buffer is used by the Monitor tab's Pixel Probe (only when displaying the primary output).

 

This has always been the case in commercial Katana.

    We're sorry to hear that

    Please tell us why