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 regions where the transformed texture does not cover the viewport, the backplate background color is displayed instead.

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::ITexture::set_gamma() and related methods.

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

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

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

Defines the texture through a texture lookup function represented as a DB element of type mi::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. 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.