[an error occurred while processing this directive]

Setting up and rendering illumination in Brazil r/s.

Part 1. Brazil tools review


Brazil: Luma Server

It's one of the most important tabbed pages in brazil, which contains settings for the two illumination components out of three (raytracing is configured in Brazil: Ray Server reviewed above). We mean direct illumination and secondary diffuse illumination, which can be calculated only by Monte Carlo method. Brazil allows to calculate each of these two illumination components separately. For example, by deselecting the Indirect Illumination>Enable checkbox, we'll force brazil to calculate only direct illumination with raytracing reflections/refractions (they can be disabled as well). This option is very useful at the initial stages of scene setup, when you set up lighting and configure its parameters.

Pic. 9 Direct Illumination Only. The scene contains three light sources.

You can calculate only secondary illumination, starting from the first diffuse bounce and higher. To do that, you should disable Direct Illumination calculation.

Pic. 10 Illumination from the first diffused bounce only (bounces=1).

This option may come in handy to analyze secondary illumination settings.

Pic. 11 Settings for direct and indirect illumination calculations.

Illumination can be enabled or disabled by illumination types (Direct/Indirect) or by light source types. In the Indirect Illumination group you can exclude selected objects from indirect illumination.

Pic. 12 Adaptive settings of indirect illumination.

Brazil does not calculate indirect illumination for every point visible in camera using Monte Carlo method (thereinafter – QMC). The situation resembles supersampling in case of regular AA. At first indirect illumination is calculated for the point groups visible in camera, which quantity equals the power of two, specified in Min. One and the same illumination value found is allocated to all points in the group. Then, illumination values of neighboring groups are compared with each other, and if the difference is greater than the Contrast value, the point groups are split in half and they have their secondary illumination additionally calculated. The process is repeated until the illumination difference of neighboring groups gets less than the Contrast value, or until the number of point groups reaches their maximum quantity specified in Max. Thus, this group of parameters implements the adaptive procedure for calculating indirect illumination. The most often used pairs of Min Max parameters: -4 0 for previews with Contrast from 25 and higher, -3 0 for final renders with Contrast 25 and lower. The Max values greater than zero are rather rare. The higher render resolution is, the lower Min - Max values can be used.

All the above-said with respect to adaptive procedure of calculating secondary illumination brings us to the only conclusion – brazil does not use interpolation to calculate secondary illumination at all. In practice it's one of the reasons for slow illumination calculations in brazil as well as for its high accuracy.

Pic. 13 Settings for indirect illumination calculations using quasi- Monte Carlo method (QMC).

The central group of parameters, determining the secondary illumination calculation proper using QMC (quasi- Monte Carlo). As we have already discussed QMC, I will just describe the settings.

Sampler – a list of calculation algorithms, which presently contains only one element - Quasi Monte Carlo.

View Rate – the number of sampling rays in a semisphere (rays emitted through the semisphere surface built around the point visible through camera) to calculate secondary illumination. These rays are traced in the scene up to the first crossing with the nearest surface. The new points, obtained from these crossings, have their direct illumination calculated. This is the first bounce or the first diffuse reflection, as the light falls to the surface, is diffusely reflected from it and gets to the point visible from the camera. Besides the direct illumination, ray tracing is done for these new points, results of calculated illumination are also returned to the starting point.

And finally, indirect illumination has to be calculated for the new points. So these points have their own semispheres built around, sampling rays again being emitted through them. The number of such rays is specified in the Sec Rate parameter, and the number of times the entire process is repeated is specified in the Bounces parameter.

When a sphere around a visible point is being sampled, the first light bounce or the first diffuse reflection is calculated. The first bounce gives a new set of points, sampling its spheres provides the second bounce calculation, which in its turn results in the appearance of a new set of points, sampling these points gives the value of the third bounce (diffuse reflection) etc. That's why the Bounces parameter is also called a tracing depth of indirect illumination. The higher the tracing depth is, the more accurate diffuse illumination calculation will be and the longer it will take to be calculated. The higher View Rate and Sec Rate are, the less is the noise, the smoother is a rendered image, and the longer is rendering. The View Rate value within 5 – 15 can be used for previews. Use 40 and higher for final rendering. The Sec Rate value, recommended by developers, must be a half or three thirds of the View Rate value.

Parameters of the Indirect Energy filter group are multipliers of calculated intensity and color of the calculated illumination. They can be used to reduce intensity of the secondary illumination (Diffuse or Specular lower than 1) or on the contrary, to increase it. Color boxes in this group allow to specify the color of secondary illumination.

Thus, QMC allows accurate calculations of all three illumination components. But it will take up much time to calculate. Besides, QMC cannot calculate caustic-effects of the illumination alone. Among the shortcomings of the QMC method of calculating illumination in brazil one can name the impossibility to save illumination calculation results into a file, necessity to recalculate illumination completely after you change AA settings or exposure control, lack of interpolation or any settings of the QMC properties.

You can use QMC alone to calculate secondary illumination, or use it in combination with the method of photon maps. This calculation method is called regathering. In this case QMC calculates only the first bounce, evaluation of the illumination from the second and further diffuse multiple reflections is taken from the photon map. This method provides high quality and faster calculation in comparison with the "pure" QMC.

In case of regathering, the Bounces parameter also performs an additional function. If a photon map is activated for calculations and Bounces=1, the secondary illumination is calculated only by the data from the photon map, QMC is not used at all. If a photon map is activated and Bounces=2 and higher, the first bounce is calculated by QMC, the rest – the photon map. If a photon map is not activated, all the calculations are carried out by QMC, and the Bounces value determines the depth of bounce tracing.


Igor Sivakov (igsiv@mail.ru)

December 2, 2004

[an error occurred while processing this directive]