vrdSubsurfaceScattering

class vrdSubsurfaceScattering

(Inherits vrdSceneObject)

This class is used for all subsurface scattering properties.

class Mode
Off
ThinWalledTranslucency
VolumeScattering
class MediumType
Custom
Diamond
Polysilicon
AcrylicGlass
PlasticPolystyrene
PlasticPolycarbonates
Ethanol
Methanol
Water19degrees
Water24degrees
CrownGlassBorosilicateGlass
GlassLanthanumDenseFlint
GlassBariumFlint
GlassDenseFlint
QuartzFusedSilica
FusedGermania

Functions

vrdSubsurfaceScattering.getAsymmetry()

Gets the value of the directional characteristic of scattering events.

Returns:Current used value of the directional characteristic of scattering events.
Return type:float
vrdSubsurfaceScattering.getAttenuation()

Gets how deep light penetrates a surface.

Returns:Current value how deep light penetrates a surface.
Return type:float
vrdSubsurfaceScattering.getColor()

Gets the color of the scattering/translucent light.

Returns:Current color for the scattering/translucent light.
Return type:QVector3D
vrdSubsurfaceScattering.getColorSpectrum()

Gets the scatter color spectrum.

Returns:The current used spectrum for scatter color.
Return type:vrSpectrum
vrdSubsurfaceScattering.getDepth()

Gets the maximum number of scatter events that can happen before a ray leaves the volume.

Returns:Current value of the maximum number of scatter events that can happen before a ray leaves the volume.
Return type:integer
vrdSubsurfaceScattering.getMediumType()

Gets the type of common index refraction values.

Returns:Current index of common index refraction values.
Return type:vrdSubsurfaceScattering.MediumType
vrdSubsurfaceScattering.getMode()

Gets the currently active subsurface scattering mode.

Returns:Current subsurface scattering mode
Return type:vrdSubsurfaceScattering.Mode
vrdSubsurfaceScattering.getRadius()

Gets the maximum distance a ray can travel before hitting a particle.

Returns:Current value for the maximum distance light can scatter below the surface.
Return type:QVector3D
vrdSubsurfaceScattering.getRadiusSpectrum()

Gets the scatter radius spectrum.

Returns:The current used spectrum for scatter radius.
Return type:vrSpectrum
vrdSubsurfaceScattering.getRefractionIndex()

Get the index of refraction of the material.

Returns:Current value of the index of refraction.
Return type:float
vrdSubsurfaceScattering.getRoughness()

Gets the amount of diffusion of a material.

Returns:The current value of roughness for this material.
Return type:float
vrdSubsurfaceScattering.getTexture()

Gets access to all properties of vrdTexture.

Returns:All properties of vrdTexture.
Return type:vrdTexture
vrdSubsurfaceScattering.getUseRoughness()

Query whether surface roughness should be considered when entering or leaving the medium or not.

Returns:Current state whether to evaluate the surface roughness when entering or leaving the medium or not.
Return type:bool
vrdSubsurfaceScattering.getWeight()

Gets the blending factor between diffuse reflections and subsurface scattering.

Returns:Current used factor for blending between diffuse reflections and subsurface scattering.
Return type:float
vrdSubsurfaceScattering.setAsymmetry(asymmetry)

Sets the directional characteristic of scattering events. The asymmetry sets the Henyey-Greenstein anisotropy coefficient between -1 (full back-scatter) and 1 (full forward-scatter). The default is 0 for an isotropic medium which scatters the light evenly in all directions, giving a uniform effect. Positive values bias the scattering effect forward, in the direction of the incoming ray while negative values bias the scattering backward toward the incoming ray.

Parameters:asymmetry (float) – New value of the directional characteristic of scattering events.
vrdSubsurfaceScattering.setAttenuation(attenuation)

Sets how deep light penetrates a surface. It calculates a scaling factor that multiplies the Radius Color to adjust the density of particles inside the volume. The scaling factor is calculated as radius scale = (1.0 / (Attenuation*Attenuation))) A value of 0.0 will therefore make the material completely transparent while a value of 1.0 will make it completely solid.

Parameters:attenuation (float) – New scaling value the radius to increase or decrease the density of particles in the volume.
vrdSubsurfaceScattering.setColor(color)

Sets the color of the scattering/translucent light.

Parameters:color (QVector3D) – New color for the scattering/translucent light.
vrdSubsurfaceScattering.setColorSpectrum(value)

Sets the scatter color spectrum.

Parameters:value (vrSpectrum) – New spectrum for scatter color
vrdSubsurfaceScattering.setDepth(depth)

Sets the maximum number of scatter events that can happen before a ray leaves the volume.

Parameters:depth (integer) – New value of the maximum number of scatter events that can happen before a ray leaves the volume.
vrdSubsurfaceScattering.setMediumType(type)

Provides a large collection of common index refraction values.

Parameters:type (vrdSubsurfaceScattering.MediumType) – New index of common index refraction values.
vrdSubsurfaceScattering.setMode(mode)

Sets the subsurface scattering mode to use. The subsurface scattering mode specifies the algorithm used to calculate subsurface scattering effects. Two modes are available at the moment: ThinWalledTranslucency simulates a simple translucency effect for single sided objects like a sheet of paper or leaves VolumeScattering uses random walk subsurface scattering to simulate the effects of subsurface scattering on solid objects.

Parameters:mode (vrdSubsurfaceScattering.Mode) – The subsurface scattering mode to use.
vrdSubsurfaceScattering.setRadius(radius)

Sets the maximum distance light can travel inside the volume before hitting a particle. The higher the value the smoother the appearance of the subsurface scattering. The lower the value the more opaque the look. Increasing the radius can radically change a material’s appearance. Since subsurface scattering is scale dependent, adjust Attenuation as per the size of your model.

Parameters:radius (QVector3D) – New value for the maximum distance a light can travel before hitting a particle.
vrdSubsurfaceScattering.setRadiusSpectrum(value)

Sets the scatter radius spectrum.

Parameters:value (vrSpectrum) – New spectrum for scatter radius
vrdSubsurfaceScattering.setRefractionIndex(indexOfRefraction)

Sets the index of refraction of the material. It defines how light is refracted when entering or leaving a volume of a different density.

Parameters:indexOfRefraction (float) – New value of the index of refraction.
vrdSubsurfaceScattering.setRoughness(roughness)

Defines the amount of diffusion that is applied to translucent light.

Parameters:roughness (float) – New value of roughness for this material.
vrdSubsurfaceScattering.setUseRoughness(useRoughness)

Sets whether the surface roughness should be considered when entering or leaving the medium.

Parameters:useRoughness (bool) – New state whether to evaluate the surface roughness when entering or leaving the medium or not.
vrdSubsurfaceScattering.setWeight(weight)

Sets the blending factor between diffuse reflections and subsurface scattering. When set to 1.0, there is only subsurface scattering, and when set to 0 it is only the normal diffuse term. In most cases, you want this to be 1.0 for full subsurface scattering. Note that the glossy or specular term are not affected by this weight but the index of refraction controls the reflectivity of the glossy or specular term in order to stay physically plausible.

Parameters:weight (float) – New value for the blending factor between diffuse reflections and subsurface scattering