neuray Services API Programmer's Manual

Tonemapping

[neuray Services API]

Description

Render tonemapping is a built in feature of neuray Services. Tonemapping is enabled by attaching the following attribute to the scenes camera:

  • attribute string "tm_tonemapper" "tonemapper_name"

The tonemapping system will search for a registered tonemapper called "tonemapper_name" and process the rendered canvas using that tonemapper. The following tonemappers are supported directly by the neuray Services core:
  • mia_exposure_photographic

  • mia_exposure_simple

  • max_tone_op_log

Additional tonemappers can be supported by implementing mi::nservices::ITonemap_operator and registering with the neuray library as a normal user class. These will automatically be discovered and used by the tonemapping framework under the registered name.

All rendered images are tonemapped except in the following cases:

  • the "sketch" renderer is used. This renderer does not require tonemapping.

  • the "iray", "hybrid" or "preview" renderer is used, the iray internal tonemapper is enabled and the configured tonemapper is "mia_exposure_photographic". These renderers will provide the tonemapping internally.

This behavior can be overridden by adding the following attribute to the scenes camera:

  • attribute string "tm_override"

The following values are supported:
  • "on" - tonemapping is always applied

  • "off" - tonemapping is never applied

  • "auto" - the above tonemapping application algorithm is used.

If the attribute does not exists, or is not equal to any of the above values then "auto" mode is used.

Note that if the user implements a custom render command then automatic tonemapping will not occur. To tonemap the canvas the user will need to send the post render event in both pre and post tonemapping phases to tonemap the canvas.

Classes

class 
Defines a context in which a tonemapping operation is performed. More...
class 
Provides a contract for tone mapping implementations. More...
class 
This mixin class can be used to implement the minservices::ITonemap_operator interface. More...