AmbientOcclusionConfiguration

@Serializable
data class AmbientOcclusionConfiguration(    val aoEnabled: Boolean? = null,     val aoQuality: MPIOptions.AMBIENT_OCCLUSION_QUALITY? = null,     val aoRadius: Double? = null,     val aoResolution: MPIOptions.AMBIENT_OCCLUSION_RESOLUTION? = null,     val aoSamples: Double? = null,     val autoRenderBeauty: Boolean? = null,     val color: String? = null,     val denoiseIterations: Double? = null,     val denoiseRadius: Double? = null,     val denoiseSamples: Double? = null,     val depthAwareUpsampling: Boolean? = null,     val gammaCorrection: Boolean? = null,     val intensity: Double? = null,     val logarithmicDepthBuffer: Boolean? = null,     val renderMode: Double? = null,     val screenSpaceRadius: Boolean? = null)

Configuration for an ambient occlusion.

Constructors

Link copied to clipboard
fun AmbientOcclusionConfiguration(    aoEnabled: Boolean? = null,     aoQuality: MPIOptions.AMBIENT_OCCLUSION_QUALITY? = null,     aoRadius: Double? = null,     aoResolution: MPIOptions.AMBIENT_OCCLUSION_RESOLUTION? = null,     aoSamples: Double? = null,     autoRenderBeauty: Boolean? = null,     color: String? = null,     denoiseIterations: Double? = null,     denoiseRadius: Double? = null,     denoiseSamples: Double? = null,     depthAwareUpsampling: Boolean? = null,     gammaCorrection: Boolean? = null,     intensity: Double? = null,     logarithmicDepthBuffer: Boolean? = null,     renderMode: Double? = null,     screenSpaceRadius: Boolean? = null)

Properties

Link copied to clipboard
val aoEnabled: Boolean? = null

Enable ambient occlusion. Only works in single buffer mode and when device supports WebGL2.

Link copied to clipboard
val aoQuality: MPIOptions.AMBIENT_OCCLUSION_QUALITY? = null

Change the quality of ambient occlusion in the scene. Greater quality means less noise, but worse performance.

Link copied to clipboard
val aoRadius: Double? = null

Controls the radius/size of the ambient occlusion in world units. Should be set to how far you want the occlusion to extend from a given object. Set it too low, and AO becomes an edge detector. Too high, and the AO becomes "soft" and might not highlight the details you want.

Link copied to clipboard
val aoResolution: MPIOptions.AMBIENT_OCCLUSION_RESOLUTION? = null

Use half-resolution" mode for performance-critical applications. This will cause the AO to be calculated at half the resolution of the screen, and then upscaled to the full resolution. This is a great way to get a performance boost (generally 2x-4x) at the cost of some quality (the AO will lack fine details and temporal stability will be slightly reduced).

Link copied to clipboard
val aoSamples: Double? = null
Link copied to clipboard
val autoRenderBeauty: Boolean? = null

It is recommended to not change this value, otherwise rendering issues may occur.

Link copied to clipboard
val color: String? = null

The color of the ambient occlusion. Recommended in scenes where bounced light has a uniform "color", for instance a scene that is predominantly lit by a blue sky. The color is expected to be in the sRGB color space, and is automatically converted to linear space for you. Keep the color pretty dark for sensible results.

Link copied to clipboard
val denoiseIterations: Double? = null
Link copied to clipboard
val denoiseRadius: Double? = null
Link copied to clipboard
val denoiseSamples: Double? = null
Link copied to clipboard
val depthAwareUpsampling: Boolean? = null

The half aoResolution mode uses depth-aware upscaling by default. The AO effect looks bad without depth-aware upscaling, so it is not recommended to disable it. However, if performance is truly that critical, you can do so by setting depthAwareUpsampling to false.

Link copied to clipboard
val gammaCorrection: Boolean? = null

Should be automatically set to the correct value. If you are getting washed out colors, try setting gammaCorrection to false, and if you are getting dark colors, try setting it to true.

Link copied to clipboard
val intensity: Double? = null

A purely artistic control for the intensity of the AO has the effect of darkening areas with more ambient occlusion. Useful to make the effect more pronounced. An intensity of 2 generally produces soft ambient occlusion that isn't too noticeable, whereas one of 5 produces heavily prominent ambient occlusion.

Link copied to clipboard
val logarithmicDepthBuffer: Boolean? = null
Link copied to clipboard
val renderMode: Double? = null
Link copied to clipboard
val screenSpaceRadius: Boolean? = null

When screenSpaceRadius is set to true, the aoRadius parameter represents the size of the ambient occlusion effect in pixels (recommended to be set between 16 and 64).