VRay SDK for C#
Loading...
Searching...
No Matches
VRay.RenderElement Class Reference

Represents a VRay render element (or channel). Use this class to obtain the raw data stored in a render element, or to construct VRayImage instances from it. More...

Classes

class  GetDataOptions
 Controls what the buffer returned by GetData() contains. More...
 

Public Member Functions

byte[] GetData (GetDataOptions options)
 Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More...
 
float[] GetDataAsFloat (GetDataOptions options)
 Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More...
 
int[] GetDataAsInt (GetDataOptions options)
 Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More...
 
VRayImage GetImage (GetImageOptions options, int layerIndex=0)
 Creates a VRayImage using the data stored in the render element. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More...
 
VRayImage GetImage (RectRegion region=null, int layerIndex=0)
 Creates a VRayImage using the data stored in the render element. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More...
 
string GetMetadata ()
 Get render element metadata. Currently works only for Cryptomatte render element and returns manifest and metadata. More...
 
override string ToString ()
 

Properties

RenderElementFormat BinaryFormat [get]
 Gets the internal data format of the current render element.
 
RenderElementPixelFormat DefaultPixelFormat [get]
 Gets the default pixel format of the current render element.
 
string Name [get]
 Gets the display name of the channel.
 
Plugin Plugin [get]
 Gets the associated plugin. Might be invalid for special channels like EffectsResult.
 
RenderElementType Type [get]
 Gets the enumerated type of the render element.
 

Detailed Description

Represents a VRay render element (or channel). Use this class to obtain the raw data stored in a render element, or to construct VRayImage instances from it.

Member Function Documentation

◆ GetData()

byte[] VRay.RenderElement.GetData ( GetDataOptions  options)

Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsSee class GetDataOptions comments
Returns
The data as a byte array

◆ GetDataAsFloat()

float[] VRay.RenderElement.GetDataAsFloat ( GetDataOptions  options)

Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsSee class GetDataOptions comments
Returns
The data as a float array

◆ GetDataAsInt()

int[] VRay.RenderElement.GetDataAsInt ( GetDataOptions  options)

Retrieves the render element raw data with given format options. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsSee class GetDataOptions comments
Returns
The data as an int array

◆ GetImage() [1/2]

VRayImage VRay.RenderElement.GetImage ( GetImageOptions  options,
int  layerIndex = 0 
)

Creates a VRayImage using the data stored in the render element. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
optionsOptions include an image clipping region, VFB color corrections, etc.
layerIndexThe Cryptomatte layer index (between 0 and num_level/2). For ObjectSelect value 1=filter layer and 2=alpha layer. For all other types this should be 0.
Returns
A new VRayImage.

◆ GetImage() [2/2]

VRayImage VRay.RenderElement.GetImage ( RectRegion  region = null,
int  layerIndex = 0 
)

Creates a VRayImage using the data stored in the render element. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
regionOptional image clipping region. Pass null to get the entire unclipped image.
layerIndexThe Cryptomatte layer index (between 0 and num_level/2). For ObjectSelect value 1=filter layer and 2=alpha layer. For all other types this should be 0.
Returns
A new VRayImage.

◆ GetMetadata()

string VRay.RenderElement.GetMetadata ( )

Get render element metadata. Currently works only for Cryptomatte render element and returns manifest and metadata.

Returns
A string containing the meta data or null.

The documentation for this class was generated from the following file: