neuray API Programmer's Manual

Rendering and Picking

[Neuray API]

Description

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

Classes

class 
Abstract interface for a canvas with CUDA device memory storage. More...
class 
Abstract interface for a canvas that represents an OpenGL buffer. More...
class 
Abstract interface for render target canvas parameters. More...
class 
This interface represents the return value of a pick operation. More...
class 
This interface represents a single object hit by a pick operation. More...
class 
Abstract interface to report progress of a long-running operation back to the caller. More...
class 
Abstract interface to report completion of an asynchronous operation back to the caller. More...
class 
This interface is used for doing actual rendering and picking. More...
class 
Performance counters for render modes. More...
class 
Abstract interface for a render target. More...
class 
Abstract interface for a render target (base class). More...
class 
A render target which is specialized for rendering to CUDA device memory. More...
class 
Abstract interface for a render target which is specialized for rendering to an OpenGL buffer. More...
class 
The scene is the top-level element describing a subset of DB elements to be rendered. More...

Enumerations

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

Functions

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)
Picks what is behind a rectangle in the scene. More...

Enums

enum mi::neuraylib::Canvas_parameter

The type of a render target canvas parameter in mi::neuraylib::ICanvas_parameters. See Section [:ipmlink reference 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_INTERNAL
internal use only
PARAM_COUNT
number elements in this enum
PARAM_UNDEFINED = 0xffffffffU
not a valid parameter
enum mi::neuraylib::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 [:ipmlink reference 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 = 0xffffffffU
not a valid canvas type

Functions

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
trans
The transaction used to access the database.
rectangle
The inclusive range of pixels through which rays will be cast.
pixel_offset
The position of the ray within each pixel. The default marks the pixel center.
recursive
Pick all objects along each ray, not just the closest one.

Returns

The array of picked objects, NULL on error.