Data Structures | Macros | Functions | Variables
Imager Nodes

Construction and manipulation of imager nodes. More...

Data Structures

struct  ImagerProperties
 
struct  AtImagerNodeMethods
 Imager Node methods structure. More...
 

Macros

#define AI_IMAGER_NODE_EXPORT_METHODS(tag)
 Imager node methods exporter. More...
 

Functions

bool ImagerProperties::schedule_is_any () const
 

Variables

uint32_t ImagerProperties::schedule_bucket: 1
 Imager can be run in bucket mode

 
uint32_t ImagerProperties::schedule_full_frame: 1
 Imager can be run in full frame mode

 
uint32_t ImagerProperties::run_once: 1
 Imager runs only ONCE, at the end of the bucket, or end of the final completed frame. More...
 
void(* AtImagerNodeMethods::ImagerEvaluate )(AtRenderSession *, AtNode *, struct AtOutputIterator *, int, int, int, int, uint16_t)
 
void(* AtImagerNodeMethods::ImagerPrepare )(AtRenderSession *, AtNode *, const AtNode *, struct AtOutputIterator *, ImagerProperties &)
 

API for Imager Writers

AI_API bool AiImagerAddInput (AtRenderSession *render_session, const AtNode *imager, const AtNode *driver, int aov_type, AtString aov_name, AtNode *filter)
 Some imagers may need additional information in their evaluation stage. More...
 
AI_API bool AiImagerAddOutput (AtRenderSession *render_session, const AtNode *imager, const AtNode *driver, int output_type, AtString output_name)
 Adds a new output to be written to out destination driver. More...
 

Node Method Declarations

#define imager_prepare
 Imager's imager_prepare method declaration. More...
 
#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's imager_evaluate method declaration. More...
 

Detailed Description

Construction and manipulation of imager nodes.

Post-processing nodes called imagers operate on pixels before the output driver. Imagers can be chained together and used to create a variety of effects on rendered images. Examples include but are not limited to color management, camera effects such as vignetting or bloom and denoising.

Macro Definition Documentation

◆ AI_IMAGER_NODE_EXPORT_METHODS

#define AI_IMAGER_NODE_EXPORT_METHODS (   tag)
Value:
static AtImagerNodeMethods ai_imager_mtds = { \
ImagerEvaluate, \
NULL, \
}; \
static AtNodeMethods ai_node_mtds = { \
&ai_common_mtds, \
&ai_imager_mtds \
}; \
const AtNodeMethods *tag = &ai_node_mtds;
#define imager_evaluate
Imager's imager_evaluate method declaration.
Definition: ai_imagers.h:114
Imager Node methods structure.
Definition: ai_imagers.h:53
Node methods.
Definition: ai_node_entry.h:86

Imager node methods exporter.

◆ imager_prepare

#define imager_prepare
Value:
static void ImagerPrepare(AtRenderSession* render_session, AtNode* node, const AtNode* driver, struct AtOutputIterator* iterator, ImagerProperties& properties); \
AI_OPTIONAL_METHOD_INSTALL(ai_imager_mtds, ImagerPrepare) \
static void ImagerPrepare(AtRenderSession* render_session, AtNode* node, const AtNode* driver, struct AtOutputIterator* iterator, ImagerProperties& properties)
This represents a node in Arnold.
This represents an iterator that is used to iterate over group of ouputs in Arnold.
Definition: ai_imagers.h:35

Imager's imager_prepare method declaration.

The imager_prepare function will allow the imager to query the outputs that it will process and give the imager an opportunity to request any additional AOVs that may need to be rendered or additional outputs to be written to the driver.

Parameters
render_sessionrender session where this node will be used for rendering
nodepointer to the imager node
driverpointer to the driver node connected to imager stack
iteratoroutput iterator (loops over connected outputs)
propertiesImager properties, can be used to set imager properties such as schedule mode (bucket, full frame, etc...)

◆ imager_evaluate

#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's imager_evaluate method declaration.

This function is called after a bucket has been rendered, but before it is passed to the driver. It provides the rendered pixels of each output to the driver. The imager may use this function to make many modification to pixels. The renderer does not lock around this function, to allow for lengthy imager processing to happen in parallel. The contained code should not require any thread synchronization.

Parameters
render_sessionrender session where this node will be used for rendering
nodepointer to the driver node itself
iteratoroutput iterator (loops over connected outputs)
bucket_xox coordinate of the bucket (upper-left)
bucket_yoy coordinate of the bucket (upper-left)
bucket_size_xwidth of the bucket in pixels
bucket_size_yheight of the bucket in pixels
tidthread ID that rendered this bucket

Function Documentation

◆ AiImagerAddInput()

AI_API bool AiImagerAddInput ( AtRenderSession *  render_session,
const AtNode imager,
const AtNode driver,
int  aov_type,
AtString  aov_name,
AtNode filter 
)

Some imagers may need additional information in their evaluation stage.

One example of this could be denoisers, which may need specific feature AOVs. This API adds specific input AOVs to be accessible to the imager at evaluation time. These AOVs need information including their name, type and filter to create the AOV. The input AOV will only be accessible to the current imager and will not be written to the destination driver. This function is to be called in the imager_prepare stage only.

Parameters
render_sessionpointer to the render session this function call applies to
imagerpointer to the imager node
driverpointer to the driver node that the imager is connected to
aov_typeAOV format type, e.g. AI_TYPE_RGBA, AI_TYPE_RGB, AI_TYPE_FLOAT, etc...
aov_namename of the AOV to be added as an input
filterpointer to the filter node associated with the AOV

◆ AiImagerAddOutput()

AI_API bool AiImagerAddOutput ( AtRenderSession *  render_session,
const AtNode imager,
const AtNode driver,
int  output_type,
AtString  output_name 
)

Adds a new output to be written to out destination driver.

The output is accessible to the current imager and any imagers downstream the imager stack. This function is to be called in the imager_prepare stage only. An example use case of this API could be if you want the result of the imager to exist in an output that is separate from the existing outputs.

Parameters
render_sessionpointer to the render session this function call applies to
imagerpointer to the imager node
driverpointer to the driver node that the imager is connected to
output_typeoutput format type, e.g. AI_TYPE_RGBA, AI_TYPE_RGB, AI_TYPE_FLOAT, etc...
output_namename associated with the output

Variable Documentation

◆ run_once

uint32_t ImagerProperties::run_once

Imager runs only ONCE, at the end of the bucket, or end of the final completed frame.

Useful for expensive imagers.


© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com