Iray Programmer's Manual

Virtual backplate

A virtual backplate is specified by a texture and a background color. All primary camera rays that would usually end up in the environment dome, perform a lookup in the backplate instead.

All lighting effects (illumination, reflection, refraction, etc.) are in general not influenced by the backplate. There is one exception though: perfectly specular and thin walled transmitting materials can be used to make the backplate appear through windows, e.g., if both the windshield and the back window of a car are modeled as thin walled glass, looking through both yields a backplate lookup instead of the environment dome.

The backplate texture is scaled to exactly fit the rendering resolution, i.e., rendering an empty scene will display the texture at full scale. By setting its uv transform, scale and offset of the texture can be influenced. In this case, the wrap mode parameters control the tiling of the texture. In regions where the transformed texture does not cover the viewport, including repetition controlled by the wrap mode, either the backplate background color is displayed or the environment lookup is used if the wrap mode and clip parameters are set to values that clip the texture.

By default, the backplate is not tonemapped, i.e., the backplate image in the final tonemapped rendering looks exactly like the backplate provided as input. Optionally, the tonemapper used on the rendered image, see Section can also be enabled for the backplate. These tonemappers can include a gamma correction, which is not seen as part of the tonemapping itself, and is always applied to the backplate.

Note: The regular texture pipeline has support for inverse gamma correction, which can compensate the gamma correction. If needed, the setting for the inverse gamma correction can be explicitly controlled with the mi::neuraylib::ITexture::set_gamma() and related methods.

The virtual backplate is controlled with the following methods on the mi::neuraylib::ICamera class.

Method signature Description
mi::Sint32 mi::neuraylib::ICamera::set_backplate_function(
    const char* name)

const char* mi::neuraylib::ICamera::get_backplate_function()

Defines the texture through a texture lookup function represented as a DB element of type mi::neuraylib::IMdl_function_call. The only supported MDL function at this point is base::file_texture. There is no backplate by default, in which case the environment dome lookup is used.

void set_backplate_background_color(
    const Color_struct &color)

Color_struct get_backplate_background_color()

Defines the background color in regions of the viewport that a transformed texture would not cover and the parameters of the base::file_texture backplate function indicates that the texture is clipped. Only used if a backplate texture is defined. Default is mi::Color(0,0,0,0).

void set_backplate_tonemapping_enabled(
    bool flag)

bool get_backplate_tonemapping_enabled()

Tonemapping is disabled by default on the backplate. It can be controlled using these methods. The gamma correction in the tonemapper is not controlled through this flag and is always applied to the backplate as well.

void set_backplate_dof_enabled(
    bool flag)

bool get_backplate_dof_enabled()

Depth of field is disabled by default on the backplate. It can be controlled using these methods.