The recursion limit is the maximum number of times that a ray can “bounce” within the scene when rendering a frame. The higher the recursion limit is, the more accurate the scene appears, due to the higher numbers of reflections and refractions. However, a deeper recursion in highly reflective/specular scenes may stress interactivity as many secondary rays may be required for computing reflection and refraction effects. The recursion limit can be used to reduce the number of rays shot – possibly only during user interaction.
The recursion limit is set with the SoPreferences SoPreferences SoPreferences DIRECTVIZ_RECURSION_LIMIT parameter or SoDirectVizManager SoDirectVizManager SoDirectVizManager recursionLimit field.
Recursion can be disabled – forcing recursion limit to 1 – when in subsampling mode (i.e., during interaction) by setting the SoPreferences SoPreferences SoPreferences DIRECTVIZ_SUB_RECURSION parameter or SoDirectVizManager SoDirectVizManager SoDirectVizManager subRecursion field to 0. This can be changed interactively with the check button of the recursion limit item in the DirectViz control dialog.