Release Notes for Katana 2.6v2

Release Date

21 July 2017

Previous Releases

System Requirements

Qualified Operating Systems

Hardware Requirements

Feature Enhancements

Viewer API

Support for 64-bit Object IDs

Object IDs in the Catalog/Monitor can now be stored using 64 bits, rather than the previous limit of 24 bits.

Previous Behavior

In previous releases of Katana, objects IDs are stored in a single floating channel (the alpha channel). In theory, this would limit the number of unique IDs to 232 but, due to the integer to float conversion, the number is actually smaller (224).

One of the first tasks after the renderer plug-in connects with Katana was requesting the valid ID range. For example:

// request IDs
int64_t nextId, maxId;
m_objectIdState.idSender->getIds(&nextId, &maxId);
 
// copy ID values into atomics
m_objectIdState.nextId = nextId;
m_objectIdState.maxId  = maxId;

Katana would return 1 as the next ID, and 1000000 as the maximum ID. For each object, the plug-in will find a unique ID between nextId and maxId and send them to Katana:

// This will give us the next ID whilst it increments the
// nextId member for the next call.
int64_t id_value = getNextId();
 
// Send the ID and scene graph location path back to Katana
m_objectIdState.idSender->send(id_value, objectName.c_str());

The object's ID is also sent to the renderer, which will eventually construct the image with the object ID in every pixel. That image is then sent to Katana, along with the rendered scene. For example, in RfK 21.4, we can see:

dataMsg->setData(dataArray, (dataMsg->width() * dataMsg->height() * entrysize) );

The dataArray is an array of floats. Each entry consists of 5 floating channels (i.e. entrysize is 20 bytes). However, only the first of the 5 floating channels are processed; the other 4 channels are dropped on the Katana side. Once the data is received, the floating value is cast to an integer to convert to an object ID:

float alphaChannel = reinterpret_cast<float*>(data)[i];
int32_t objectId = static_cast<int32_t>(alphaChannel);

New Behavior

In Katana 2.6v2, Foundry::Katana::Render::idSendInterface::getIds() has been deprecated. This means that the renderer plug-ins are allowed to use any value in the range [1, 264 - 1]. The value 0 (zero) remains reserved and cannot be used. Katana will use this value to indicate that no object is present and, also, to determine whether the IDs have 32 or 64 bits. Katana will map the 64-bit value to the object location. For example, the following is now possible:

// Get a "unique" ID by generating a 64-bit hash
uint64_t objectId = hash64(objectName);
m_objectIdState.idSender->send(objectId, objectName.c_str());

After the renderer has constructed the image with the object IDs, it needs to be sent to Katana. Previously only the first channel was read, whilst the rest of the transmitted channels were discarded.

In Katana 2.6v2, there are two different options. For backwards compatibility, the renderer plug-in can still transmit a single channel and it will behave as it did in previous releases. Alternatively, the renderer plug-in can send 3 channels. If the first channel contains 0, the next two following channels should contain the high and low parts of the 64-bit object ID.

// Split the 64-bit object ID into two parts
uint32_t lo = static_cast<uint32_t>(objectId);
uint32_t hi = static_cast<uint32_t>(objectId >> 32);
 
// Set the data for a single pixel
uint32_t data[] = { 0, lo, hi };
uint32_t entrysize = sizeof(data);  // i.e. sizeof(uint32_t) * 3 channels
dataMsg->setData(data, 1 * 1 * entrysize);

Shelf Item Scripts and Keyboard Shortcuts

Performance Improvements

Other Feature Enhancements

Bug Fixes

Viewer API

Other Bug Fixes

Known Issues