A public API is now available for imagers. This adds support for custom and third-party imagers in Arnold. (ARNOLD-10322)
The API is built upon a new AI_NODE_IMAGER node type and is implemented via two main API.
imager_evaluate allows you to modify output pixels of a render.
#define imager_evaluate
static void ImagerEvaluate(AtRenderSession* render_session, AtNode* node, struct AtOutputIterator* iterator, int bucket_xo, int bucket_yo, int bucket_size_x, int bucket_size_y, uint16_t tid)
imager_prepare is an optional API allows you to query the outputs an imager will recieve and prepare any evaluation specific data.
#define imager_prepare
static void ImagerPrepare(AtRenderSession* render_session, AtNode* node, const AtNode* driver, struct AtOutputIterator* iterator, AtImagerSchedule& schedule);
Additionally, there are a couple of helper APIs for the imager_prepare method. These API let you request additional inputs to be rendered for imager evaluation, and to add additional output layers that the user may want to write to the driver.
AI_API bool AiImagerAddInput(AtRenderSession* render_session, const AtNode* imager, const AtNode* driver, int aov_type, AtString aov_name, AtNode* filter);
AI_API bool AiImagerAddOutput(AtRenderSession* render_session, const AtNode* imager, const AtNode* driver, int output_type, AtString output_name);
See Imagers Nodes in the Arnold Developer Guide for examples of imager plugins.
7.3.1.0
27 March 2024