vrdSphereEnvironmentMaterial

class vrdSphereEnvironmentMaterial

(Inherits vrdEnvironmentMaterial)

This class is used to handle sphere environment material properties. It is used for image based lighting (IBL) from a user-provided texture.

Functions

vrdSphereEnvironmentMaterial.boostEnvironmentBrightness(factor, threshold)

Boosts brightness in the environment image for all pixels with luminance brighter than the given threshold. Changes the image pixel data.

Parameters:
  • factor (float) – Increase brightness by this factor
  • threshold (float) – Fraction (0 - 1) of maximum luminance value in the environment image
Returns:

True, if boost was successful

Return type:

bool

vrdSphereEnvironmentMaterial.createLightSources(lightSources)

Creates the lights for the given list of light sources.

Parameters:lightSources (List[vrdEnvironmentLightSource]) – A list of light sources
vrdSphereEnvironmentMaterial.findLightSources(numLights)

Calculate light sources for this environment.

Parameters:numLights (integer) – The number of light sources to create
Returns:A list of light sources that based on the given environment
Return type:List[vrdEnvironmentLightSource]
vrdSphereEnvironmentMaterial.getFrameOffset()
Returns:Offset to the image number when using an image sequence.
Return type:integer
vrdSphereEnvironmentMaterial.getHDRLightStudio()

Gets access to HDR Light Studio connection.

Returns:A vrdHDRLightStudio object, to read and write access of all properties.
Return type:vrdHDRLightStudio
vrdSphereEnvironmentMaterial.getImageNumber()

Returns image number in current image sequence.

Returns:Image number
Return type:integer
vrdSphereEnvironmentMaterial.getInlineImageSequence()

Returns if image sequence is inlined into the vpb file.

Returns:True, if inlined
Return type:bool
vrdSphereEnvironmentMaterial.getUseImageSequence()
Returns:True if image sequence is used
Return type:bool
vrdSphereEnvironmentMaterial.setEnvironment(image)

Sets the environment image.

To load an environment image, use:

envImage = vrImageService.loadImage(filename, vrImageTypes.LoadType.Environment)
Parameters:image (vrdImage) – The new environment image.
vrdSphereEnvironmentMaterial.setFrameOffset(frameOffset)

Sets an offset to the image number when using an image sequence.

Parameters:frameOffset (integer) – Frame offset
vrdSphereEnvironmentMaterial.setImageNumber(imageNumber)

Sets the image number in current image sequence.

Parameters:imageNumber (integer) – Integer number
vrdSphereEnvironmentMaterial.setInlineImageSequence(inlineImageSequence)

Inlines the image sequence into the vpb file.

Parameters:inlineImageSequence (bool) – True, to inline image sequence
vrdSphereEnvironmentMaterial.setUseImageSequence(useImageSequence)

Use an image sequence.

Uses an image sequence as a texture. The image name for the sequence will be generated based on the filename of the environment image and the image number. Use the CurveEditor to animate the image number.

Parameters:useImageSequence (bool) – True to use image sequence