vrdTonemapper

class vrdTonemapper

(Inherits vrdSceneObject)

Class to access tonemapping functionality.

Not all properties of this class are active all the time. Some of them depend on the type of tonemapper currently selected via vrdTonemapper.setTonemapperType(mapper).

The default tonemapper is ‘Reinhard Luminance’ which has the properties ‘exposure’, ‘white point’ and ‘contrast’.

To access the tonemapper of a camera or viewpoint, use vrdCameraBaseNode.getTonemapper():

cam = vrCameraService.getActiveCamera()
tm = cam.getTonemapper()
tm.setExposure(2.0)

Summary

Functions:

Functions

vrdTonemapper.estimateWhitebalanceFromPixel(x, y)

Sets the white balance based on a picked position in the renderview. The coordinates are in global screen space with bottom left corner as origin. Only coordinates over a renderview are valid, otherwise the white balance is not changed.

Parameters:
  • x (integer) – The x pixel coordinate.
  • y (integer) – The y pixel coordinate
vrdTonemapper.getAutoAdjustISO()

Returns the state of the automatic adaption of the ISO of the camera when fstop or shutterspeed are changing.

Returns:The state of the automatic ISO adaption of the camera.
Return type:bool
vrdTonemapper.getBlueResponseCurve()

Returns the blue response curve.

Returns:The blue response curve as a list of x/y values.
Return type:List[QVector2D]
vrdTonemapper.getCandelaMappingMode()

Returns the candela mapping mode.

Returns:The candela mapping mode.
Return type:vrCameraTypes.CameraCandelaMapping
vrdTonemapper.getCandelaRange()

Returns the candela range.

Returns:The candela range minimum and maximum value.
Return type:QVector2D
vrdTonemapper.getColorspace()

Returns the colorspace.

Returns:The colorspace (sRGB / ACES / AgX).
Return type:vrCameraTypes.CameraColorspace
vrdTonemapper.getContrast()

Returns the contrast.

Returns:The contrast.
Return type:float
vrdTonemapper.getExposure()

Returns the exposure of the camera.

Returns:The exposure.
Return type:float
vrdTonemapper.getGreenResponseCurve()

Returns the green response curve.

Returns:The green response curve as a list of x/y values.
Return type:List[QVector2D]
vrdTonemapper.getHdrView()

Returns the OpenColorIO view transform of the camera in HDR rendering.

Returns:The index of the view transform.
Return type:integer
vrdTonemapper.getISO()

Returns the ISO of the camera.

Returns:The ISO of the camera.
Return type:float
vrdTonemapper.getLook()

Returns the OpenColorIO look of the camera if available.

Returns:The index of the current look.
Return type:integer
vrdTonemapper.getLuminanceResponseCurve()

Returns the luminance response curve.

Returns:The luminance response curve as a list of x/y values.
Return type:List[QVector2D]
vrdTonemapper.getLuminousExposure()

Returns the calculated luminous exposure of the physical camera tonemapper.

Returns:The calculated luminous exposure of physical camera tonemapper.
Return type:float
vrdTonemapper.getRedResponseCurve()

Returns the red response curve.

Returns:The red response curve as a list of x/y values.
Return type:List[QVector2D]
vrdTonemapper.getResponseCurveFilename()

Returns the response curve file name.

Returns:Name of response curve file
Return type:string
vrdTonemapper.getResponseCurveMode()

Returns the active response curve mode.

Returns:The response curve mode.
Return type:vrCameraTypes.CameraResponseCurveMode
vrdTonemapper.getResponseCurvePower()

Returns the power of the AgX tonemapping.

Returns:The power.
Return type:float
vrdTonemapper.getResponseCurveSaturation()

Returns the saturation of the AgX tonemapping.

Returns:The saturation.
Return type:float
vrdTonemapper.getSensorResponse()

Returns the sensor response of the camera.

Returns:The sensor response of the camera.
Return type:vrCameraTypes.CameraSensorResponse
vrdTonemapper.getSensorResponseCurveMapping()

Returns the mapping of the input values to the sensor response curve lookup.

Returns:The sensor response curve mapping of the camera.
Return type:vrCameraTypes.CameraSensorResponseCurveMapping
vrdTonemapper.getShoulderStrength()

Returns the shoulder strength.

Returns:The shoulder strength.
Return type:float
vrdTonemapper.getToeStrength()

Returns the toe strength.

Returns:The toe strength.
Return type:float
vrdTonemapper.getTonemapperType()

Returns the active tonemapper type.

Returns:The tonemapper type.
Return type:vrCameraTypes.CameraTonemapper
vrdTonemapper.getView()

Returns the OpenColorIO view transform of the camera in SDR rendering.

Returns:The index of the view transform.
Return type:integer
vrdTonemapper.getWhiteBalance()

Returns the white balance of the camera.

Returns:The white balance.
Return type:float
vrdTonemapper.getWhitePoint()

Returns the white point of the camera.

Returns:The white point of the camera.
Return type:float
vrdTonemapper.loadResponseCurve(fileName)

Loads a saved response curve from a file.

Parameters:fileName (string) – The file name containing a saved response curve.
Returns:True if loading was successful, False otherwise.
Return type:bool
vrdTonemapper.saveResponseCurve(fileName)

Saves the response curve to a file.

Parameters:fileName (string) – The file name to use (ending: .crv).
Returns:True if saving was successful, False otherwise.
Return type:bool
vrdTonemapper.setAutoAdjustISO(value)

Sets the state of the automatic adaption of the ISO of the camera when fstop or shutterspeed are changing.

Parameters:value (bool) – The automatic ISO adaption state value
vrdTonemapper.setBlueResponseCurve(values)

Sets the blue response curve.

Parameters:values (List[QVector2D]) – The blue response curve as a list of x/y values.
vrdTonemapper.setCandelaMappingMode(mapping)

Sets the candela mapping mode.

Parameters:mapping (vrCameraTypes.CameraCandelaMapping) – The candela mapping mode.
vrdTonemapper.setCandelaRange(rangeMinMax)

Sets the candela range.

Parameters:rangeMinMax (QVector2D) – The candela range minimum and maximum value.
vrdTonemapper.setColorspace(value)

Sets the colorspace.

Parameters:value (vrCameraTypes.CameraColorspace) – The colorspace (sRGB / ACES / AgX).
vrdTonemapper.setContrast(value)

Sets the contrast.

Parameters:value (float) – The contrast.
vrdTonemapper.setExposure(value)

Sets the exposure of the camera.

Parameters:value (float) – The exposure value.
vrdTonemapper.setGreenResponseCurve(values)

Sets the green response curve.

Parameters:values (List[QVector2D]) – The green response curve as a list of x/y values.
vrdTonemapper.setHdrView(value)

Sets the OpenColorIO view transform of the camera in HDR rendering.

Parameters:value (integer) – The index of the view transform.
vrdTonemapper.setISO(value)

Sets the ISO of the camera.

Parameters:value (float) – The ISO value
vrdTonemapper.setLook(value)

Sets the OpenColorIO look of the camera if available.

Parameters:value (integer) – The index of the current look.
vrdTonemapper.setLuminanceResponseCurve(values)

Sets the luminance response curve.

Parameters:values (List[QVector2D]) – The luminance response curve as a list of x/y values.
vrdTonemapper.setRedResponseCurve(values)

Sets the red response curve.

Parameters:values (List[QVector2D]) – The red response curve as a list of x/y values.
vrdTonemapper.setResponseCurveMode(mode)

Sets the response curve mode.

Parameters:mode (vrCameraTypes.CameraResponseCurveMode) – The response curve mode.
vrdTonemapper.setResponseCurvePower(value)

Sets the power of the AgX tonemapping.

Parameters:value (float) – The power value.
vrdTonemapper.setResponseCurveSaturation(value)

Sets the saturation of the AgX tonemapping.

Parameters:value (float) – The saturation value.
vrdTonemapper.setSensorResponse(value)

Sets the sensor response of the camera.

Parameters:value (vrCameraTypes.CameraSensorResponse) – The sensor response of the camera.
vrdTonemapper.setSensorResponseCurveMapping(value)

Sets the mapping of the input values to the sensor response curve lookup.

Parameters:value (vrCameraTypes.CameraSensorResponseCurveMapping) – The sensor response curve mapping of the camera.
vrdTonemapper.setShoulderStrength(value)

Sets the shoulder strength.

Parameters:value (float) – The shoulder strength.
vrdTonemapper.setToeStrength(value)

Sets the toe strength.

Parameters:value (float) – The toe strength.
vrdTonemapper.setTonemapperType(mapper)

Sets the tonemapper type.

Some properties of this class are only in effect depending on the type of tonemapper in use. If unsure, check VRED’s tonemapping user interface.

Parameters:mapper (vrCameraTypes.CameraTonemapper) – The type of tonemapper to use.
vrdTonemapper.setView(value)

Sets the OpenColorIO view transform of the camera in SDR rendering.

Parameters:value (integer) – The index of the view transform.
vrdTonemapper.setWhiteBalance(value)

Sets the white balance of the camera.

Parameters:value (float) – The white balance.
vrdTonemapper.setWhitePoint(value)

Sets the white point of the camera.

Parameters:value (float) – The white point.