vrdNPRSettings

class vrdNPRSettings

(Inherits vrdSceneObject)

This class gives access to material settings for non photorealistic rendering (NPR) mode.

NPR information:

3 colors are combined:

Warm color
Cool color
Object color = Diffuse Color of the actual material, e.g. Plastic diffuse color; when a texture is assigned, diffuse color multiplied by the average color of that texture (e.g. dark grey diffuse color and a green texture = dark green object color in NPR)


How the colors are combined:

Alpha and Beta are used to blend warm color and cool color with the object color
Alpha controls how much of the warm color is used.
Alpha 0 = maximum warm color. Alpha 1 = no warm color.
Beta controls how much of the cool color is used.
Beta 0 = maximum cool color. Beta 1 = no cool color.
Examples:
Both 0.5 (default) = mix of cool and warm and object color
Both 1: neither cool nor warm but only the object color
Both 0: only cool/warm mix (based on viewing angle and object shape) but no object color

Functions

vrdNPRSettings.getAlpha()

Gets how much warm color is used.

Range: 0 = maximum warm color, 1 = no warm color

Returns:Current used amount of warm color.
Return type:float
vrdNPRSettings.getBeta()

Gets how much cool color is used.

Range: 0 = maximum cool color, 1 = no cool color

Returns:Current used amount of cool color.
Return type:float
vrdNPRSettings.getCoolColor()

Gets the shading color for the surface’s area that have normals pointing away from light sources.

Returns:Current used color for the surface’s area that have normals pointing away from light sources
Return type:QVector3D
vrdNPRSettings.getGlossyColor()

Gets the specular color.

Returns:Current used specular color.
Return type:QVector3D
vrdNPRSettings.getShininess()

Gets the specular spread.

Returns:Current used specular spread.
Return type:float
vrdNPRSettings.getWarmColor()

Gets the shading color for the surface’s area that have normals pointing to a light source.

Returns:Current used color for the surface’s area that have normals pointing to a light source.
Return type:QVector3D
vrdNPRSettings.setAlpha(value)

Sets how much warm color is used.

Range: 0 = maximum warm color, 1 = no warm color

Parameters:value (float) – Amount of warm color to be used.
vrdNPRSettings.setBeta(value)

Sets how much cool color is used.

Range: 0 = maximum cool color, 1 = no cool color

Parameters:value (float) – Amount of cool color to be used.
vrdNPRSettings.setCoolColor(value)

Sets the shading color for the surface’s area that have normals pointing away from light sources.

Parameters:value (QVector3D) – New color for the surface’s area that have normals pointing away from light sources.
vrdNPRSettings.setGlossyColor(value)

Sets the specular color.

Parameters:value (QVector3D) – New value for the specular color.
vrdNPRSettings.setShininess(value)

Sets the specular spread.

Parameters:value (float) – New value for the specular spread.
vrdNPRSettings.setWarmColor(value)

Sets the shading color for the surface’s area that have normals pointing to a light source.

Parameters:value (QVector3D) – New color for the surface’s area that have normals pointing to a light source.