Module vrAmbientOcclusion
[frames] | no frames]

Module vrAmbientOcclusion

Functions
 
computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, intensityThreshold, weighting)
Calculates ambient occlusion and indirect illumination including color bleeding.
 
computeMissingAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, intensityThreshold, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, weighting)
Calculates ambient occlusion and indirect illumination including color bleeding for the selected nodes that do not have a calculation yet.
integer
getAmbientOcclusionMode()
Returns the current ambient occlusion mode.
 
setAmbientOcclusionMode(mode)
Sets the ambient occlusion mode.
Variables
  VR_AO_MODE_CLASSIC = 0
  VR_AO_MODE_LIGHT_AND_SHADOWS = 2
  VR_AO_MODE_SHADOWS = 1
  VR_AO_WEIGHTING_COSINE = 1
  VR_AO_WEIGHTING_UNIFORM = 0
Function Details

computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, intensityThreshold, weighting)

 

Calculates ambient occlusion and indirect illumination including color bleeding. There are four valid sets of parameters:

computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength)

computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, overrideMaterialColor, materialColorR, materialColorG, materialColorB)

computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, intensityThreshold)

computeAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, intensityThreshold, weighting)

Parameters:
  • quality (unsigned integer) - The quality level (value from 0 to 5) for the ambient occlusion calculation.
  • minDistance (float) - The minimum distance a ray searches for intersections.
  • maxDistance (float) - The maximum distance a ray searches for intersections.
  • indirectIllumination (bool) - Turns indirect illumination on or off.
  • colorBleeding (bool) - Turns color bleeding on or off.
  • gatherQuality (unsigned integer) - The quality level (value from 0 to 4) for the indirect illumination gathering passes.
  • numIndirections (unsigned integer) - The number of bounces (gathering passes) for the indirect illumination.
  • subdivide (bool) - Turns geometry subdivision on or off.
  • minEdgeLength (float) - Sets the minimum length an edge may have after subdivision.
  • overrideMaterialColor (bool) - Turns material color override on or off (Optional).
  • materialColorR (float) - Red component of the material override color (Optional).
  • materialColorG (float) - Green component of the material override color (Optional).
  • materialColorB (float) - Blue component of the material override color (Optional).
  • subdivisionQuality (int) - The quality level (value from 0 to 2) for the subdivision of the geometry (Optional).
  • intensityThreshold (float) - Sets the intensity threshold for a subdivision (Optional).
  • weighting (int) - Sets how the ambient occlusion samples in the hemisphere above the calculation point are weighted.

    VR_AO_WEIGHTING_UNIFORM: All ambient occlusion samples have the same weight.

    VR_AO_WEIGHTING_COSINE: Ambient occlusion samples in the direction of the surface normal have moreinfluence on the result. This can improve the contrast of the occlusion (Optional).

computeMissingAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, intensityThreshold, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, weighting)

 

Calculates ambient occlusion and indirect illumination including color bleeding for the selected nodes that do not have a calculation yet. There are three valid sets of parameters:

computeMissingAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, intensityThreshold, overrideMaterialColor, materialColorR, materialColorG, materialColorB)

computeMissingAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, intensityThreshold, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality)

computeMissingAmbientOcclusion(quality, minDistance, maxDistance, indirectIllumination, colorBleeding, gatherQuality, numIndirections, subdivide, minEdgeLength, intensityThreshold, overrideMaterialColor, materialColorR, materialColorG, materialColorB, subdivisionQuality, weighting)

Parameters:
  • quality (unsigned integer) - The quality level (value from 0 to 5) for the ambient occlusion calculation.
  • minDistance (float) - The minimum distance a ray searches for intersections.
  • maxDistance (float) - The maximum distance a ray searches for intersections.
  • indirectIllumination (bool) - Turns indirect illumination on or off.
  • colorBleeding (bool) - Turns color bleeding on or off.
  • gatherQuality (unsigned integer) - The quality level (value from 0 to 4) for the indirect illumination gathering passes.
  • numIndirections (unsigned integer) - The number of bounces (gathering passes) for the indirect illumination.
  • subdivide (bool) - Turns geometry subdivision on or off.
  • minEdgeLength (float) - Sets the minimum length an edge may have after subdivision.
  • intensityThreshold (float) - Sets the intensity threshold for a subdivision.
  • overrideMaterialColor (bool) - Turns material color override on or off.
  • materialColorR (float) - Red component of the material override color.
  • materialColorG (float) - Green component of the material override color.
  • materialColorB (float) - Blue component of the material override color
  • subdivisionQuality (int) - The quality level (value from 0 to 2) for the subdivision of the geometry (Optional).
  • weighting (int) - Sets how the ambient occlusion samples in the hemisphere above the calculation point are weighted.

    VR_AO_WEIGHTING_UNIFORM: All ambient occlusion samples have the same weight.

    VR_AO_WEIGHTING_COSINE: Ambient occlusion samples in the direction of the surface normal have moreinfluence on the result. This can improve the contrast of the occlusion (Optional).

getAmbientOcclusionMode()

 

Returns the current ambient occlusion mode. The modes are VR_AO_MODE_CLASSIC, VR_AO_MODE_SHADOWS and VR_AO_MODE_LIGHT_AND_SHADOWS

Returns: integer
The current mode.

setAmbientOcclusionMode(mode)

 

Sets the ambient occlusion mode. Accepted modes are VR_AO_MODE_CLASSIC, VR_AO_MODE_SHADOWS and VR_AO_MODE_LIGHT_AND_SHADOWS

Parameters:
  • mode (integer) - The new mode.