Final Gather with Mental Ray (Maya)

My last post described the GI indirect lighting method that uses photons to create the secondary lighting.
Another way to achieve indirect lighting is with Final Gather, that in contrast to GI looks at the information in the regular direct light and based on that it sends out Final Gather Points. These points land where the regular light rays land and from there it sends out their own rays that collects information about their surroundings and adjusts accordingly to how the point is to be lit. In the end, all the points average their values to get an even distribution of light in the scene.
When you use FG in your renders, you can actually use geometry as lights in your scene with a bright surface shader, so that the FG points sends this out when hitting the geometry.
Final Gather gives very nice looking lights which are soft and delicate, but it isn’t really a “true” indirect light. It is kind of fake compared to real indirect light, and therefore it isn’t the most authentic looking light out there. But it is easy to set up and works very well in many situations. Besides it is faster to render than Global Illumination.

With Final Gather the default settings in Maya usually works ok as a starting point. If your render gets noisy you can increase the accuracy in the render settings. If you set this too high, your render times can drastically increase.
Point Density controls how many points getting sent out.
The default usually works well.

One common problem with FG is that you can get noisy areas in the tight shadows in your scene.
You can remedy this by increasing the accuracy and adjusting the Point Interpolation upwards. This makes the points blend better, but at the expense of loss in detail. You can get the details back with the use of Ambient Occlusion, that I’ll explain later.

The Scale sliders (primary diffuse and secondary diffuse) is used to tone down the intensity of the FG light effect. A darker shade gives less brightness. The secondary diffuse implies using the Secondary Diffuse Bounces.
The Secondary bounces works so that the points that land on a surface, spawns another ray that bounces from the original target and creating a new sample point on the next surface.
This increases calculation but gives more even distribution and more authentic lighting.

Keep on lighting!

Global Illumination in Mental Ray Part 1 (Maya 2012)

Direct light is the light we see in our scene without Global Illumination turned on. GI will trace the light and make it bounce between surfaces to give a more real-life light behavior.
The thing that makes GI work is the use of light photons that is emitted from the light source and travel through the scene, illuminating the surfaces by Gathering information about color and luminance on the surfaces they come in contact with. This information is picked up and then the photons bounce to the next surface repeating the work.

Choosing the light type to use is important, as it will affect the way photons work within it. Generally you can think that the photon emission will follow the light emission for each light type.

There are two types of photons in Mental Ray, the first being Global Illumination and the second is Caustics.

The photon intensity setting of the light refers to the light-energy used for the photons when they leave the light source. The default value in Maya is set to 8000, which is pretty intense and often leads to blown out renders when used with small scenes.
The Exponent setting determines how fast the photons will lose their energy as they travel through space.
High values give shorter life so they lose energy faster.

Keep in mind that all these settings are calculated on values that exists in the sizes of objects and the size of your scene in the Units setting in Maya.
So if you build a scene that is many units in size this would need totally different settings in Mental Ray than if your scene is only a few units in size.

When using GI in your lights it is easy to forget that you also need to consider the direct light property, so that the direct light intensity is adjusted up or down depending on
the light you are trying to mimic. These are independent settings and can drastically alter your overall lighting!

There are many settings to control in the Indirect Lighting tab of Mental Ray. I will continue to post tips and tricks on lighting and rendering with Mental Ray in the time to come.

Setting up Mental Ray Satellite with Windows slave and Mac OS X host

I don’t know why, but every time I have to set up Mental Ray between different platforms I always stumble some before everything works perfect. Today I configured my quad core Windows computer to do the chewing when rendering from my MacBook Pro laptop.

This is a super-simple setup, but somehow it wasn’t all click and go today either. First of all, I had the slave machine configured earlier, so when I tried to telnet into the port I googled about it would not connect from my Mac host.
So, I checked with the \Windows\System32\Drivers\etc\services file on the Windows machine and got the correct port number 7412 for satellite connections, then I created the maya.rayhosts file in the preferences folder on my mac containing one simple machine.

(File: /Users/chris/Library/Preferences/Autodesk/maya/2012-x64/prefs/maya.rayhosts):

After disabling the local network firewall on Windows, it sort of worked, but I got this annoying error message from Mental Ray after the render:

MSG  0.0  info : adding new host 1 (
MSG  0.0  error  011330: mi-ray/tcp: not a service (check /etc/services)
MSG  0.0  warn   012219: using fallback inet service 7003

Then I tried to add the correct port for satellite (a different port than the one used with MR Stand alone btw) to the /etc/services.
This did not help either.

But, when I also added the “fallback service”, inet 7003/tcp to /etc/services it managed to actually shut up!

# /etc/services
# Mental ray satellite
inet		7003/tcp

So, if anybody out there experience the same “error” message, you know what to do…
BTW, the error doesn’t stop the render from running, but I believe maybe a nanosecond or two will be wasted if the ports don’t match up and the system has to mage a different route… Who knows?