user: Show practical ways to work with Settings in a Blender add-on or script – include code.

assistant: ### Max Bounces

Total
:   Maximum number of light bounces. For best quality, this should be set to the maximum.
    However, in practice, it may be good to set it to lower values for faster rendering.
    A value of 0 bounces results in direct lighting only.

Diffuse
:   Maximum number of diffuse bounces.

Glossy
:   Maximum number of glossy bounces.

Transmission
:   Maximum number of transmission bounces.

Volume
:   Maximum number of volume scattering bounces.

Transparent
:   Maximum number of transparency bounces.

    Note, the maximum number of transparent bounces is controlled separately from other bounces.
    It is also possible to use probabilistic termination of transparent bounces,
    which might help rendering many layers of transparency.

### Clamping

Direct Light
:   This option limits the maximum intensity a sample from rays which have not yet bounced can contribute to a pixel.
    It reduces noise at the cost of accuracy. Setting this option to 0.0 disables clamping altogether.
    Lower have a greater affect (dimmer samples) on the resulting image than higher values.

Indirect Light
:   The same as *Direct Light*, but for rays which have bounced multiple times.

### Caustics

A common source of noise is [Caustics](../../../glossary/index.html#term-Caustics).

Filter Glossy
:   When using a value higher than 0.0, this will blur glossy reflections after blurry bounces,
    to reduce noise at the cost of accuracy. 1.0 is a good starting value to tweak.

    Some light paths have a low probability of being found while contributing much light to the pixel.
    As a result these light paths will be found in some pixels and not in others, causing [Fireflies](../../../glossary/index.html#term-Fireflies).
    An example of such a difficult path might be a small light that is causing a small specular highlight
    on a sharp glossy material, which is observed through a rough glossy material.
    In fact in such a case there practically occurs a caustic.

    With path tracing it is difficult to find the specular highlight,
    but if you increase the roughness on the material, the highlight gets bigger and softer, and so easier to find.
    Often this blurring will hardly be noticeable, because it is blurred by the material anyway,
    but there are also cases where this will lead to a loss of detail in lighting.

Caustics
:   Reflective
    :   While in principle path tracing supports rendering of caustics with a sufficient number of samples,
        in practice it may be inefficient to the point that there is just too much noise.
        This option can be unchecked, to disable reflective caustics.

    Refractive
    :   The same as above, but for refractive caustics.

### Fast GI Approximation

Approximate diffuse indirect light with background tinted ambient occlusion.
This provides fast alternative to full global illumination (GI),
for interactive viewport rendering or final renders with reduced quality.

Method
:   Fast GI approximation method.

    Replace:
    :   Replace global illumination with ambient occlusion after a specified number of bounces.

    Add:
    :   Add ambient occlusion to diffuse surfaces.

AO Factor
:   The strength of the ambient occlusion.

AO Distance
:   Distance from shading point to trace rays. A shorter distance emphasizes nearby features,
    while longer distances make it also take objects farther away into account.

    This option can also be overridden per object
    in the [Object Properties](../object_settings/object_data.html#bpy-types-cyclesobjectsettings-ao-distance),
    which is useful when you have both small and large scale objects in the same scene.

Viewport Bounces
:   Replace global illumination with ambient occlusion after the specified number of bounces
    when rendering in the 3D Viewport. This can reduce noise in interior scenes with little visual difference.

Render Bounces
:   Number of bounces when rendering final renders.