Iray SDK API nvidia_logo_transpbg.gif Up
Rendering and Picking

Interfaces related to rendering and picking, for example, canvases and render contexts. More...

Classes

class  mi::neuraylib::ICanvas_base
 Abstract interface for a canvas (base class). More...
 
class  mi::neuraylib::ICanvas
 Abstract interface for a canvas represented by a rectangular array of tiles. More...
 
class  mi::neuraylib::ICanvas_cuda
 Abstract interface for a canvas with CUDA device memory storage. More...
 
class  mi::neuraylib::ICanvas_opengl
 Abstract interface for a canvas that represents an OpenGL buffer. More...
 
class  mi::neuraylib::IImage_api
 This interface provides various utilities related to canvases and buffers. More...
 
class  mi::neuraylib::IPick_array
 This interface represents the return value of a pick operation. More...
 
class  mi::neuraylib::IPick_result
 This interface represents a single object hit by a pick operation. More...
 
class  mi::neuraylib::IProgress_callback
 Abstract interface to report progress of a long-running operation back to the caller. More...
 
class  mi::neuraylib::IReady_callback
 Abstract interface to report completion of an asynchronous operation back to the caller. More...
 
class  mi::neuraylib::IRender_context
 This interface is used for doing actual rendering and picking. More...
 
class  mi::neuraylib::IRender_counters
 Performance counters for render modes. More...
 
class  mi::neuraylib::ICanvas_parameters
 Abstract interface for render target canvas parameters. More...
 
class  mi::neuraylib::IRender_target_base
 Abstract interface for a render target (base class). More...
 
class  mi::neuraylib::IRender_target
 Abstract interface for a render target. More...
 
class  mi::neuraylib::IRender_target_cuda
 A render target which is specialized for rendering to CUDA device memory. More...
 
class  mi::neuraylib::IRender_target_opengl
 Abstract interface for a render target which is specialized for rendering to an OpenGL buffer. More...
 
class  mi::neuraylib::IScene
 The scene is the top-level element describing a subset of DB elements to be rendered. More...
 
class  mi::neuraylib::ITile
 Abstract interface for a tile. More...
 

Enumerations

enum  mi::neuraylib::Canvas_type {
  mi::neuraylib::TYPE_RESULT ,
  mi::neuraylib::TYPE_RESULT_IRRADIANCE ,
  mi::neuraylib::TYPE_RESULT_IRRADIANCE_PROBE ,
  mi::neuraylib::TYPE_ALPHA ,
  mi::neuraylib::TYPE_SHADOW ,
  mi::neuraylib::TYPE_AMBIENT_OCCLUSION ,
  mi::neuraylib::TYPE_RAYLENGTH ,
  mi::neuraylib::TYPE_DEPTH ,
  mi::neuraylib::TYPE_MATERIAL_TAG ,
  mi::neuraylib::TYPE_MATERIAL_ID ,
  mi::neuraylib::TYPE_OBJECT_ID ,
  mi::neuraylib::TYPE_NORMAL ,
  mi::neuraylib::TYPE_TEXTURE_COORDINATE ,
  mi::neuraylib::TYPE_BSDF_WEIGHT ,
  mi::neuraylib::TYPE_CONVERGENCE_HEATMAP ,
  mi::neuraylib::TYPE_POST_TOON ,
  mi::neuraylib::TYPE_MOTION_VECTOR ,
  mi::neuraylib::TYPE_WORLD_POSITION ,
  mi::neuraylib::TYPE_SELECTION_OUTLINE ,
  mi::neuraylib::TYPE_MULTI_MATTE ,
  mi::neuraylib::TYPE_COUNT ,
  mi::neuraylib::TYPE_UNDEFINED = 0xffffffffU
}
 The type of a canvas in an mi::neuraylib::IRender_target_base. More...
 
enum  mi::neuraylib::Canvas_parameter {
  mi::neuraylib::PARAM_COLOR_LPE ,
  mi::neuraylib::PARAM_ALPHA_LPE ,
  mi::neuraylib::PARAM_INDEX ,
  mi::neuraylib::PARAM_EDGE_COLOR ,
  mi::neuraylib::PARAM_EDGE_COLOR_2 ,
  mi::neuraylib::PARAM_SHADE_COLOR ,
  mi::neuraylib::PARAM_SCALE ,
  mi::neuraylib::PARAM_PROCESSING_DISABLED ,
  mi::neuraylib::PARAM_MULTI_INDEX ,
  mi::neuraylib::PARAM_SELECTION_SUBSET ,
  mi::neuraylib::PARAM_BIAS ,
  mi::neuraylib::PARAM_COUNT ,
  mi::neuraylib::PARAM_UNDEFINED = 0xffffffffU
}
 The type of a render target canvas parameter in mi::neuraylib::ICanvas_parameters. More...
 

Functions

Uint32_2 mi::neuraylib::get_resolution (const ICanvas_base &canvas)
 Convenience function which returns a canvas' resolution in a struct. More...
 
base::Handle< IPick_arraymi::neuraylib::pick (IRender_context &render_context, ITransaction *trans, const math::Bbox< Uint32, 2 > &rectangle, const Float32_2 &pixel_offset=Float32_2(.5f), const bool recursive=false)
 Picks what is behind a rectangle in the scene. More...
 

Detailed Description

Interfaces related to rendering and picking, for example, canvases and render contexts.

Enumeration Type Documentation

 Canvas_parameter

The type of a render target canvas parameter in mi::neuraylib::ICanvas_parameters.

See Section "Render target canvases" of the Iray Programmer's Manual for details on which canvas types accept which parameters.

Enumerator
PARAM_COLOR_LPE 

IString color LPE.

PARAM_ALPHA_LPE 

IString alpha channel LPE.

PARAM_INDEX 

ISint32 channel index or canvas index.

PARAM_EDGE_COLOR 

IFloat32_4 edge color.

PARAM_EDGE_COLOR_2 

IFloat32_4 secondary edge color.

PARAM_SHADE_COLOR 

IFloat32_4 shading color.

PARAM_SCALE 

IFloat32 scale, meaning depends on type of canvas.

PARAM_PROCESSING_DISABLED 

Disables all processing for the canvas.

                     For most canvas types, setting this parameter will write the
                     raw output of the renderer to the canvas.
                     Note that setting this parameter does not preclude the
                     existence of another canvas with otherwise identical
                     parameters. This allows applications to retrieve both the
                     processed canvas and the raw output of the renderer.

                     Note that setting this parameter on canvases which are
                     generated by postprocessing (e.g. #TYPE_POST_TOON) is not
                     useful and no guarantee is made as to the contents of such
                     canvases.
PARAM_MULTI_INDEX 

ISint32_4 multidimensional index.

PARAM_SELECTION_SUBSET 

internal use only

PARAM_BIAS 

IFloat32_2 bias, meaning depends on type of canvas.

PARAM_COUNT 

number elements in this enum

PARAM_UNDEFINED 

not a valid parameter

 Canvas_type

The type of a canvas in an mi::neuraylib::IRender_target_base.

This type dictates what is rendered into any given canvas. Native pixel types are documented below but conversions are possible.

See Section "Render target canvases" of the Iray Programmer's Manual for details.

Enumerator
TYPE_RESULT 

"Color" (includes alpha) or "Rgb_fp" result

TYPE_RESULT_IRRADIANCE 

"Rgb_fp" irradiance instead of standard result

TYPE_RESULT_IRRADIANCE_PROBE 

"Rgb_fp" irradiance probes

TYPE_ALPHA 

"Float32" alpha channel

TYPE_SHADOW 

"Rgb_fp" shadows

TYPE_AMBIENT_OCCLUSION 

"Rgb_fp" ambient occlusion

TYPE_RAYLENGTH 

"Float32" ray length

TYPE_DEPTH 

"Float32" orthogonal distance to sensor

TYPE_MATERIAL_TAG 

"Float32_4" material DB tag

TYPE_MATERIAL_ID 

"Float32_4" material_id attribute

TYPE_OBJECT_ID 

"Float32_4" object_id attribute

TYPE_NORMAL 

"Float32_3" shading normal

TYPE_TEXTURE_COORDINATE 

"Float32_3" texture coordinates

TYPE_BSDF_WEIGHT 

"Float32_3" BSDF weight estimate

TYPE_CONVERGENCE_HEATMAP 

"Float32" convergence heatmap

TYPE_POST_TOON 

"Color" (includes alpha) or "Rgb_fp" toon shading effect

TYPE_MOTION_VECTOR 

"Float32_3" motion vector

TYPE_WORLD_POSITION 

"Float32_3" worldspace hit point

TYPE_SELECTION_OUTLINE 

"Color" or "Rgb_fp" result with outlines around selection

TYPE_MULTI_MATTE 

"Float32_4" multi-matte: one mask per channel

TYPE_COUNT 

number of elements in this enum

TYPE_UNDEFINED 

not a valid canvas type

Function Documentation

 get_resolution()

Uint32_2 mi::neuraylib::get_resolution ( const ICanvas_base canvas)
inline

Convenience function which returns a canvas' resolution in a struct.

 pick()

base::Handle< IPick_array > mi::neuraylib::pick ( IRender_context render_context,
ITransaction trans,
const math::Bbox< Uint32, 2 > &  rectangle,
const Float32_2 pixel_offset = Float32_2(.5f),
const bool  recursive = false 
)
inline

Picks what is behind a rectangle in the scene.

This utility casts a ray into every pixel contained in rectangle (bounds inclusive) at the provided pixel_offset. Objects which are hit by this operation are returned as a mi::neuraylib::IPick_array.

Parameters
render_context
transThe transaction used to access the database.
rectangleThe inclusive range of pixels through which rays will be cast.
pixel_offsetThe position of the ray within each pixel. The default marks the pixel center.
recursivePick all objects along each ray, not just the closest one.
Returns
The array of picked objects, NULL on error.