Blog Archives

Render Tests, Combined Lighting

In looking at features in mental ray, there are a lot of combinations that can be had. Some are more helpful than others based on scene needs.

And some results might be counter intuitive.

HD Kitchen Render. Click to enlarge.

HD Kitchen Render. Click to enlarge.

In rendering you have two usual options for indirect lighting.

One involves brute force-like rendering (also known as “unbiased”) where every sample in the scene sends rays back into the scene to sample other objects and the environment. This is typically easy to tune (just crank it up until acceptable), requires less technical skill, and is pretty predictable frame to frame in variance without testing. However, it can increase render times by a large amount in complex scenes.

Option two involves interpolated (or “biased”) schemes where sparse samples are taken across the image and merged together through a interpolation algorithm. This is typically much faster to render but requires more artist tuning and may cause surprises in later frames. For Final Gather we have the option of using the fg_shooter to help mitigate this problem.

In the below examples I am combining brute force (non-caching to be specific) Final Gather with Irradiance Particles. This means Final Gather rays are used to collect detailed information in the primary bounce (typically the most important). Irradiance Particles are used to collect secondary (and higher) bounces. There are no portal lights being used. I might also call this “The Joys of Rendering On My Ancient Workstation” which can still get the job done.

Irradiance Particles have a few interesting features:

  • Additional bounces each send fewer and fewer rays so each pass of collection is faster (Final Gather is only one ray each additional bounce)
  • It only collects diffuse information (Final Gather collects specular as well as diffuse)
  • The Importon optimization phase is sadly not multi-threaded. But this is less important here since we are using it as secondary bounces and emit fewer
  • The importance based scheme means it’s smart about probing the brighter areas of your scene for information instead of wasting rays in dark spots. This effectively “aims” indirect illumination rays towards the more important areas of the scene.
2 diffuse bounces, 40 minutes

2 diffuse bounces, 40 minutes

3 diffuse bounces, 29 minutes

3 diffuse bounces, 29 minutes

5 diffuse bounces, 24 minutes

5 diffuse bounces, 24 minutes

10 diffuse bounces, 18 minutes

10 diffuse bounces, 18 minutes

Notice a few things here about how long this took to render in the image captions. . .

Unified Sampling takes less time with each increase in diffuse bounces (I do use a higher than normal setting in this case to force Unified to catch small illumination details). Adding bounces for a faster render might be counter intuitive in this case. There’s a reason for this, the decreased lighting contrast needs fewer samples per pixel. But there are things to think about in a more realistic scene.

In most scenes, texturing will create more contrast in the image. This may drive more samples through Unified Sampling. In this case you may be able to reduce the number of rays sent by brute force Final Gather since Unified is taking more samples anyway. This would be a balance you might need to tune. I would still recommend portal lights which means more direct lighting detail and a reduced need for indirect illumination rays. Also, using this type of combination might require less time to tune an image for the right lighting/detail balance that one or the other algorithm might need.

My settings for this scene are:

  • Final Gather Force – 48 accuracy, filter 1 (the filter option means nothing if rays/accuracy are less than 8)
  • Importon Density – 0.5 (this can be played with based on what you might need, but recommend it be as low as possible. Too few introduces artifacts in crevices and corners.), bounces 3
  • Irradiance Particles – rays 64 (The Maya UI limits this to 512 rays. There is no actual limit. You can change this in the mel or use our UI)

Diffuse bounces are controlled through the Final Gather trace settings, not the Irradiance Particles.

A quick primer for Irradiance Particles:

This lighting technique is best suited for interiors and as a secondary bounce usually. For exteriors I highly recommend the Environment Lighting Mode. The main reason for this choice being: It only collects diffuse information. This means something like glass will block it from getting information. Also, the optimization phase for Importons is single threaded and cannot be cached for multiple frames.

In looking at the easiest way to increase the quality of Irradiance Particles the simple answer is: increase the number of Importons emitted. This means:

  • Better detail in geometry and cracks
  • More scene information from better sampling and more rays
  • Slower renders from the emission and optimization phases

However, you can achieve better performance by balancing rays, interpolation, and Importon density if you have the time and/or desire.