vrdGlassMaterial

class vrdGlassMaterial

(Inherits vrdBRDFMaterial)

This class is used to handle all glass material properties.

class MediumType
Custom
Diamond
Polysilicon
AcrylicGlass
PlasticPolystyrene
PlasticPolycarbonates
Ethanol
Methanol
Water19degrees
Water24degrees
CrownGlassBorosilicateGlass
GlassLanthanumDenseFlint
GlassBariumFlint
GlassDenseFlint
QuartzFusedSilica
FusedGermania
class FresnelQuality

Defines the computation method for the fresnel term.

Fast

Fast: Schlick approximation for the fresnel term is used.

Accurate

Accurate: Cook-Torrance approximation for the fresnel term is used.

class DispersionInputType

Defines how the refraction indices for different wavelengths are calculated.

AbbeD

Abbe Number d-line: Bases the calculation on the d Fraunhofer line at 587.56nm.

AbbeE

Abbe Number e-line: Bases the calculation on the e Fraunhofer line at 546.07nm.

Spectral

Spectral Distribution: Uses the refraction indices defined by the spectrum.

Summary

Functions:

Functions

vrdGlassMaterial.getAbbeNumber()

Gets the approximate dispersion of the glass material.

Returns:Current value for the approximate dispersion of the glass material.
Return type:float
vrdGlassMaterial.getBumpTexture()

Gets access to all properties of vrdBumpTexture.

Returns:An vrdBumpTexture object, to read and write access of all properties.
Return type:vrdBumpTexture
vrdGlassMaterial.getDensity()
Returns:Current material density.
Return type:float
vrdGlassMaterial.getDispersionInputType()
Returns:Current dispersion input type.
Return type:vrdGlassMaterial.DispersionInputType
vrdGlassMaterial.getDisplacementTexture()

Gets access to all properties of vrdDisplacementTexture.

Returns:An vrdDisplacementTexture object, to read and write access of all properties.
Return type:vrdDisplacementTexture
vrdGlassMaterial.getExteriorColor()

Gets the value for exterior transparency color.

Returns:Current color.
Return type:QVector3D
vrdGlassMaterial.getExteriorColorSpectrum()

Gets the exterior transparency color spectrum.

Returns:Current exterior transparency color spectrum.
Return type:vrSpectrum
vrdGlassMaterial.getExteriorTransparencyTexture()

Gets access to all properties of vrdExteriorTransparencyTexture.

Returns:An vrdTexture object, to read and write access of all properties.
Return type:vrdTexture
vrdGlassMaterial.getFresnelQuality()

Gets computation method for the fresnel term.

Returns:Current quality.
Return type:vrdGlassMaterial.FresnelQuality
vrdGlassMaterial.getIncandescence()

Gets access to all properties of vrdIncandescence.

Returns:An vrdIncandescence object, to read and write access of all properties.
Return type:vrdIncandescence
vrdGlassMaterial.getIndexOfRefractionSpectrum()

Gets the refraction spectrum of the glass material.

Returns:The current index of refraction spectrum.
Return type:vrSpectrum
vrdGlassMaterial.getInteriorColor()
Returns:Current interior transparency color.
Return type:QVector3D
vrdGlassMaterial.getInteriorColorSpectrum()
Returns:Current interior transparency color spectrum.
Return type:vrSpectrum
vrdGlassMaterial.getMediumType()
Returns:Current medium type.
Return type:vrdGlassMaterial.MediumType
vrdGlassMaterial.getReflectionColor()

Gets the material color for reflections.

Returns:Current color for the reflections.
Return type:QVector3D
vrdGlassMaterial.getReflectionColorSpectrum()

Gets the material reflection color spectrum.

Returns:Current reflection color spectrum.
Return type:vrSpectrum
vrdGlassMaterial.getReflectivity()
Returns:Current reflectivity value. When no custom reflectivity is used this value is autmatically computed from the current medium / refraction index.
Return type:float
vrdGlassMaterial.getRefractionIndex()
Returns:Current refraction index value.
Return type:float
vrdGlassMaterial.getRoughness()
Returns:The current roughness value of this material.
Return type:float
vrdGlassMaterial.getRoughnessTexture()

Gets access to all properties of vrdRoughnessTexture. The roughness texture is only used if Use Roughness is enabled for this material.

Returns:An vrdRoughnessTexture object, to read and write access of all properties.
Return type:vrdRoughnessTexture
vrdGlassMaterial.getSimulatedThickness()
Returns:Current value for simulated thickness.
Return type:float
vrdGlassMaterial.getTextureSettings()

Gets access to all properties of vrdTextureSettings.

For vrdGlassTexture, the texture mapping type can only be changed for all textures at once through this object, and set to either vrTextureTypes.MappingType.UVMapping or vrTextureTypes.MappingType.TriplanarMapping.

For triplanar mapping, the triplanar settings from this vrdTextureSettings object are used. Repeat mode is to be set in the individual vrdTexture objects. Please note, the repeat, offset and rotate settings for UV mapping in the individual vrdTexture objects are applied in addition to the global triplanar settings.

For UV mapping, settings like repeat, offset, rotate need to be changed in the individual vrdTexture objects, e.g. in vrdGlassMaterial.getRoughnessTexture().

Returns:An vrdTextureSettings object, to read and write access of all properties.
Return type:vrdTextureSettings
vrdGlassMaterial.getUseCustomReflectivity()
Returns:If custom reflectivity value is used.
Return type:bool
vrdGlassMaterial.getUseDensity()
Returns:If density evaluation is enabled.
Return type:bool
vrdGlassMaterial.getUseDispersion()
Returns:True if dispersion effects are enabled for this material in spectral raytracing.
Return type:bool
vrdGlassMaterial.getUseRoughness()
Returns:If glossy reflections and refractions are enabled.
Return type:bool
vrdGlassMaterial.getUseSolidShadows()
Returns:Current state for solid shadows.
Return type:bool
vrdGlassMaterial.setAbbeNumber(value)

Sets the approximate dispersion of the glass material. (Also known as the V-number or constringence of a transparent material) It is used to classify the chromaticity of glass and other optical materials. The higher the value, the lower its dispersion.

Parameters:value (float) – New value for approximate dispersion of the glass.
vrdGlassMaterial.setDensity(value)

Sets the density value for beer-lambert law evaluation I(x) = I(0) * e^(-c*d*t). See vrdGlassMaterial.setUseDensity(value).

Parameters:value (float) – New value for the density.
vrdGlassMaterial.setDispersionInputType(type)

Defines how the refraction indices for different wavelengths are calculated.

Parameters:type (vrdGlassMaterial.DispersionInputType) – New input type.
vrdGlassMaterial.setExteriorColor(value)

Sets the material exterior transparency color. This acts like a color filter for the light coming from behind the surface. A darker color blocks more light and makes the surface more opaque. In OpenGL the exterior transparency sets the color of the glass when the surface normal is facing towards the camera. This is in contrast of the interior transparency which sets the color when the normal is facing away from the camera. Raytracing uses this attribute for both sides.

Parameters:value (QVector3D) – New value for exterior transparency color.
vrdGlassMaterial.setExteriorColorSpectrum(value)

Sets the exterior transparency color spectrum.

Parameters:value (vrSpectrum) – The new exterior transparency color spectrum.
vrdGlassMaterial.setFresnelQuality(type)

Defines the computation method for the fresnel term.

Parameters:type (vrdGlassMaterial.FresnelQuality) – New quality.
vrdGlassMaterial.setIndexOfRefractionSpectrum(spectrum)

Sets the refraction spectrum of the glass material.

Parameters:spectrum (vrSpectrum) – The desired index of refraction spectrum.
vrdGlassMaterial.setInteriorColor(value)

Sets the material interior transparency. It acts the same as the exterior transparency by filtering the light coming from behind the surface. A darker color blocks more light making the surface more opaque. In OpenGL the interior transparency sets the color of the glass when the surface normal is facing away from the camera. This is in contrast of the exterior transparency which sets the color when the normal is facing towards the camera. Raytracing ignores this attribute.

Parameters:value (QVector3D) – New value for interior transparency color.
vrdGlassMaterial.setInteriorColorSpectrum(value)

Sets the interior transparency color spectrum.

Parameters:value (vrSpectrum) – The new interior transparency color spectrum.
vrdGlassMaterial.setMediumType(type)

Offers a wide selection of refraction indices based on materials existing in reality. The selected medium changes the refraction index automatically.

Parameters:type (vrdGlassMaterial.MediumType) – New medium type.
vrdGlassMaterial.setReflectionColor(value)

Sets the material color for reflections.

Parameters:value (QVector3D) – New color for reflections.
vrdGlassMaterial.setReflectionColorSpectrum(value)

Sets the material reflection color spectrum.

Parameters:value (vrSpectrum) – The new reflection color spectrum.
vrdGlassMaterial.setReflectivity(v)

Controls the intensity of the reflection on the surface. The higher the value, the more the influence from the environment and objects around.

Parameters:v (float) – New reflectivity value.
vrdGlassMaterial.setRefractionIndex(value)

Sets the material’s refraction index (IOR). Only supported in Raytracing rendering mode.

Parameters:value (float) – New refraction index value.
vrdGlassMaterial.setRoughness(roughness)

Controls the sharpness of the glossy reflections and refractions. The higher the value, the rougher the microscopic structure of the surface.

The roughness value is used when Use Roughness is enabled and no roughness texture is active.

Parameters:roughness (float) – New value of roughness for this material.
vrdGlassMaterial.setSimulatedThickness(value)

Sets the material’s simulated thickness.

Parameters:value (float) – New value for simulated thickness.
vrdGlassMaterial.setUseCustomReflectivity(value)

Enable or disable the use of custom reflectivity value. See vrdGlassMaterial.setReflectivity(v). When disabled the reflectivity value is computed from the current medium / refraction index.

Parameters:value (bool) – New state.
vrdGlassMaterial.setUseDensity(value)

Enables beer-lambert law evaluation I(x) = I(0) * e^(-c*d*t).

When this option is enabled the exterior transparency color lets you specify the spectral or rgb absorption coefficient c (a value of 1 specifies no absorption while a value of 0 absorbs everything). The material density factor specifies the factor d which can be used for converting the unit of the distance t to match the unit of the absorption coefficient.

Parameters:value (bool) – New state.
vrdGlassMaterial.setUseDispersion(value)

Simulates how different wavelengths of light are refracted, resulting in dispersion effects. Use Dispersion only works with spectral raytracing.

Parameters:value (bool) – True to enable dispersion effects for this material in spectral raytracing.
vrdGlassMaterial.setUseRoughness(value)

Makes the glass frosted with glossy reflections and refractions, when enabled.

Parameters:value (bool) – New state.
vrdGlassMaterial.setUseSolidShadows(value)

Casts a solid (black) shadow (if a render mode is selected that can calculate caustic effects due to refractions). Otherwise, the color of the shadow is calculated solely on the Glass’s color.

Parameters:value (bool) – New state for solid shadows.