3DS Max/Mental Ray: Basic Final Gather Explained

Before you read this post, please consider looking at 3DS Max/Mental Ray: Setting up a daylight rig & lighting definitions

So, what is Final Gather?

Final Gathering is a method of simulating indirect light by firing rays around a space in a very similar way to how they bounce in reality, with one fundamental difference; they originate from the camera (Or viewing position) and journey onto points within the scene. After this happens, a further network of hemispheric rays are then expelled from the original points and these bring back additional information that is then averaged between a set number of neighbouring points, or catchment area to create a smooth shading model. As points originate from the camera, it is not necessary to have a traditional light source in a scene, it is also possible to use a surface, or object to illuminate the existing geometry and the space around it. Final Gather is resolution dependent and random in its nature, so often animated movement presents difficulty as ‘flickering’ can occur from frame to frame and furthermore as the resolution of an image is increased, the amount of samples taken also rises.

What are the key settings in 3DS Max?

Within the Final Gather roll-out there are a series of options that control the spread of indirect illumination that are crucial to the rendering process: Point Density, Rays per Point, Interpolation Over Num. FG Points and Bounces. Point Density influences the initial resolution of the rays that are emitted from the camera, which exist in a hexagonal grid-like pattern. Increasing this value will create a denser initial grid, providing more information and increasing the potential quality of the image. From this hexagonal network, every Final Gather point then shoots an amount of rays into the scene based upon the Rays per Point setting and the greater this amount, the more information and accuracy is attained as each point cross references an ever rising amount of information regarding the surfaces around it.

Interpolation Over Num. FG Points uses a defined threshold to take samples up to and once it hits the necessary limit, it stops taking additional information into account. The higher this setting, the more information Mental Ray is allowed to use to average out the final calculation. This process obviously heavily relies on other factors, such as the Point Density and setting this too high could result in lost detail. However, setting it too low risks producing blotchy samples as not enough information will exist to accurately smooth out the final solution.

The Bounces setting tells Mental Ray to rebound rays off the surfaces they encounter a defined number of times, so that points carry light further through the scene. As mentioned by Reinhart et al in their study on the daylight system, bounced light is the single most important attribute for creating accurate indirect illumination and, “For interior renderings, a Final Gather Bounce of 4 to 7 is recommended.” (Reinhart, C, Breton, P.F, Landry, Marion 2008: 7). Below is information on the preset settings within 3DS Max.

Mental Ray presets

Fig. 6A table highlighting the preset Final Gather settings inside of 3DS Max

Obviously these settings are very primitive and fail to take into account many factors that will influence how you wish to set up your Final Gather solution such as resolution, geometry complexity and the amount of light in the scene. Animated content will also influence how you set up your model, but that will be covered in a later post.

Some examples of Final Gather


FG (Point Density [0.1] Rays [1] Points [1] Bounces [1] Weight [1.0] Multiplier [1.0])Point Density 0.1 Rays per Point 1 Interpolation 1 Bounces 1

FG (Point Density [5.0] Rays [1] Points [1] Bounces [1] Weight [1.0] Multiplier [1.0])Point Density 5.0 Rays per Point 1 Interpolation 1 Bounces 1

FG (Point Density [0.1] Rays [50] Points [50] Bounces [4] Weight [1.0] Multiplier [1.0])Point Density 0.1 Rays per Point 50 Interpolation 50 Bounces

FG (Point Density [0.1] Rays [100] Points [100] Bounces [4] Weight [1.0] Multiplier [1.0])Point Density 0.1 Rays per Point 100 Interpolation 100 Bounces

FG (Point Density [1.0] Rays [250] Points [250] Bounces [4] Weight [1.0] Multiplier [1.0])Point Density 1.0 Rays per Point 250 Interpolation 250 Bounces

With Interpolation and Rays per Point set to 250, the image is finally looking smooth. Consistent shading can be seen across the entire image and this has occurred by balancing a tight enough Point Density grid to catch small details in the geometry with enough Rays per Point to provide sufficient information to each Final Gather point and a large enough Interpolation to smooth out details sufficiently. Consequently, having too large a catchment area can cause the bleeding of shading and the loss of detail.

Can we see the actual samples?

Yes! By using the diagnostics tool in the processing tab of 3DS Max it is possible to gain an insight into what is going on in the calculations. Below are a few examples:

CombinedPoint Density 0.1 Rays per Point 1 Interpolation 1 Bounces 1 (With Diagnostics overlayed)

FG (Point Density [0.1] Rays [1] Points [1] Bounces [1] Weight [1.0] Multiplier [1.0]) ProcessingPoint Density 0.1 Rays per Point 1 Interpolation 1 Bounces 1 (Diagnostic view)

FG (Point Density [0.1] Rays [100] Points [1] Bounces [1] Weight [1.0] Multiplier [1.0]) ProcessingPoint Density 0.1 Rays per Point 1 Interpolation 100 Bounces 1 (Diagnostic view)

FG (Point Density [1.0] Rays [250] Points [250] Bounces [1] Weight [1.0] Multiplier [1.0]) DiagnosticPoint Density 1.0 Rays per Point 250 Interpolation 250 Bounces 1 (Diagnostic view)

From the images above you can see that the diagnostic view is not only altered by changing the Interpolation and Rays per Point settings, the extra information is also being used to create a wider catchment area to create effective shading in the more complicated areas of the scene. In the final image, we see the diagnostic for the smoothest image. It is possible to see exactly where shadow falloff has occurred due to the samples that have been taken.

Is Final Gather the only way to compute indirect illumination?

No! The other main way is Global Illumination, which in 3DS Max and Mental Ray is achieved through Photon Mapping. An introduction into this process can be found below:

3DS Max/Mental Ray: Photon Mapping/Global Illumination

References

Reinhart, C, Breton, P.F, Landry, Marion 2008 Daylight Simulation in 3DS Max 2009

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s