vrdLightmap

class vrdLightmap

(Inherits vrdSceneObject)

This class gives access to a lightmap.

Functions

vrdLightmap.deleteTexture()

Deletes the texture image.

vrdLightmap.getIlluminationBakeSettings()
Returns:The stored illumination settings which were used to bake the lightmap.
Return type:vrdIlluminationBakeSettings
vrdLightmap.getIlluminationPreview()
Returns:A preview image of the baked illumination.
Return type:QImage
vrdLightmap.getName()
Returns:The lightmap name.
Return type:string
vrdLightmap.getShadowPreview()
Returns:A preview image of the baked ambient occlusion or shadows.
Return type:QImage
vrdLightmap.getSize()
Returns:The size of the texture image in pixels.
Return type:QSize
vrdLightmap.getTexture()

The image contains the data which is used for rendering.

VRED generates HDR lightmap textures, as follows:

For a base lightmap, the format is RGBA and the data type 16bit floating point. The channels RGB contain the direct and indirect lighting information depending on the used bake mode. The alpha channel holds the ambient occlusion or shadow data.

For a separate lightmap, the format is RGB and the data type 16 bit floating point, holding illumination values from light sources.

Returns:The texture image.
Return type:vrdImage
vrdLightmap.getTextureBakeSettings()
Returns:The stored texture settings which were used to bake the lightmap.
Return type:vrdTextureBakeSettings
vrdLightmap.getUseExternalReference()
Returns:True if the lightmap texture should be externally referenced, False otherwise.
Return type:bool
vrdLightmap.setName(name)

Sets the name of the lightmap.

The name is e.g. used to create the file name when exporting lightmap textures. It is normally kept once it exists.

Parameters:name (string) – The name of the lightmap.
vrdLightmap.setTexture(image)

Sets the texture image of the lightmap.

VRED expects the texture data to be in a certain format (see vrdLightmap.getTexture()). If the image contains VRED readable bake meta-data then those are set as the last used bake settings. Please note: The vrBakeTypes.DirectIlluminationMode determines how the renderer interprets the image data.

Parameters:image (vrdImage) – The lightmap texture.
vrdLightmap.setUseExternalReference(value)

Sets whether the lightmap texture should be externally referenced or not.

Externally referenced textures will not store its data within the VRED project file. Instead, only the file path to the image is stored. This option only takes effect if the lightmap was already saved as a file.

Parameters:value (bool) – True for use as external reference, False otherwise.