Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2 | 3 | 4 | 5
Indirect Illumination with Mental Ray

By Andrew Klein
| Your Rating:
rating star nonerating star nonerating star nonerating star nonerating star none
(0 Votes)
| 81020 Views
| 0 Comments
| Comments 0
Date Added: 9th December 2009
Software used:
Maya, mental ray

For all intents and purposes, we can now call this scene done. But let's look at some ways to push it even further!

The Mental Ray Portal Light
This is highly suggested in your workflow. The problem is, by default we aren't using all of our Final Gather Rays. Some of these rays aren't getting into the room, but they are being calculated anyway. New since Maya 2008 is the Portal Light. Essentially an Area Light with a special Mental Ray shader mapped through it, this light, placed over the opening of the window, can dramatically aid the scene.

Mental Ray Portal Light (new to Maya 2008):

"A classic problem in computer graphics is lighting a scene solely through indirect light, like from a sky, or other "environment" light from an acquired HDRI or similar. This is accomplished in mental ray using Final Gathering (henceforth abbreviated as FG), and is done by tracing a large number of "FG rays" to see which hit the environment (or other lit surfaces). Since this is a large number of rays, the results are cached (for performance) at FG points and the result is interpolated, "smoothing" the result. To solve all these issues the concept of a portal light is introduced. The portal light is a (rectangular) area light which is placed in the window, which obtains it's proper intensity and color from the sky outside the window (i.e. an environment shader, like mia_physicalsky or similar) and how much of that sky that is "seen".

Practically, this makes the portal light behave as a "FG concentrator" so instead of having to send thousands of FG rays around the scene to "find" the window, the portal light actually blocks FG rays, and instead converts light from beyond the window to direct light, with high-quality area shadows with no interpolation related issues possible.

FG will now see a well lit room rather than a black room, and can be performed at much lower FG ray counts. Furthermore, since the light from the window is now direct, we gain one extra light bounce "for free"."

"The mia_portal_light shader should be applied both as light- and photon emitter shader on a rectangular area light. The mental ray light instance must be set to be visible (this is a technical requirement for the portal light to be able to "block" final gather rays. If the light actually is visible or not in the rendering is instead handled by the shader).
Furthermore, the mental ray light instance must be set up such that the rectangular area light is extended in the X/Y plane of the lights own coordinate space, and any transformation of the light must be handled with the light instance's transform"
-- From the Maya Help Documentation

Make sure that the Light Portal is connected to the Area Light as both a Photon Emitter and a Light Shader (Fig.24). Also, under the Area Light's "Mental Ray-Area Light" rollout, make sure that Visible is checked; otherwise the effects will not be calculated.

482_tid_Fig_24.jpg
Fig. 24

You can even use the light portal to make the scene brighter using the Intensity Multiplier feature. Or you can deepen the shadows by turning on both Shadows and Emit Direct Photons (Fig.25).

482_tid_Fig_25.jpg
Fig. 25

Remember, with Final Gather, changing any of the following settings can have a dramatic effect on the render:

  1. The camera background colour
  2. The object's materials coloured Incandescence or Ambient colour attributes
  3. Irradiance contributions from shaders
  4. Irradiance colour mapping contributions from shaders
  5. The number and location of lights in the scene

Self Illumination
If Final Gather is turned on in a scene, an object may illuminate the scene (without even any lights present) as long as it has values set for it's Ambient Colour, Incandescence, or Irradiance that are higher than black (0).

Ambient Colour and Incandescence
I have now decided to turn the sphere on the table into a globe-lamp. Instead of making a volume light, I can simply adjust the Ambient Colour and Incandescence values (Fig.26).

482_tid_Fig_26.jpg
Fig. 26

Ambient Colour Channels, as well as Incandescence Channels, are present on all Maya materials. Ambient Colour serves to often brighten or soften the look of a material, complementing diffuse values. Incandesce is often used to make an object look like it is the source of light. If Mental Ray is used, all standard Maya materials also have Irradiance attributes which can be upped or mapped to multiply the already existing irradiant light. Also, if your saturation values for ambient colour and incandescence can go beyond 1, you can cause a more "powerful" light source from your material. Here, while the Incandescence looks to be red, I have set its value to that of 3, making it extra bright.

Here we see a self-illuminated object added to the scene (Fig.27). Notice how it lights the surrounding parts of the room too. There are no extra lights in this scene, other than the physical sun and sky, and the light portal.

482_tid_Fig_27.jpg
Fig. 27

When testing certain settings, it can be helpful to freeze your Final Gather and Global Illumination Maps from rebuilding each time. This can save dramatic amounts of render time. However, here are some warnings when doing this, as follows:

For Global Illumination (Fig.28):
The Photon Map Rebuild (on/off) option for Global Illumination defines if a photon map should be regenerated for your new render or if a new photon map should be created. When you render a scene for the first time, photons are generated. For later renders, you can turn this off and continue tweaking the camera, direct light intensity, light colour, and the GI radius, accuracy and scale settings without having to make a new map. However, changing texture or material values, camera position or object position, or any photon settings will have peculiar (incorrect) results. (See the following renders for examples.)

482_tid_Fig_28.jpg
Fig. 28


For Final Gather (Fig.29):
If rebuild is switched from on to Freeze, then new data will not be written in the FG file. Can be used to reduce light flicker in an animation, and VERY useful when not changing any of the FG settings and you are trying to tweak a still image.

482_tid_Fig_29.jpg
Fig. 29





< previous page next page >
 
1 | 2 | 3 | 4 | 5
Related Tutorials

Tutorial

Gallery Image.



Keywords: global, illumination, gi, final, gather, xsi,

Go to tutorial
rating star nonerating star nonerating star nonerating star nonerating star none (0)
Comments 0 Views 6117

Tutorial

Gallery Image.



Keywords: global, illumination, gi, final, gather, maya,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 0 Views 48139

Tutorial

Gallery Image.



Keywords: Lightwave, Rendering, Product, Battery, Lighting, Advertising, Graphics

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 8 Views 29970

Tutorial

Gallery Image.



Keywords: beginners, fundamentals, 3ds max, lighting, rendering,

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star half
Comments 0 Views 23658
Readers Comments (Newest on Top)
avatar
(ID: 238516, pid: 0) Elise on Tue, 10 December 2013 10:26pm
The way you explain GI and FG is the clearest i've ever found. All of your definitions are humanly understandable - as opposed to Maya's aweful manuel. Thank you for creating this!
avatar
(ID: 151509, pid: 0) DoctorBeat on Sat, 22 September 2012 12:33pm
You saves my life man! Thank you http://forums.3dtotal.com/showthread.php?p=927194#post927194
avatar
(ID: 136011, pid: 0) Jun on Thu, 26 July 2012 3:37am
Hi, This tips are very useful for me. It helps me understanding mental ray. Thanks very much!
Add Your Comment