mia_portal_light

 
 
 

Category: mental ray > Light

Shader Family: Light

Output: Color

Related Softimage shader: Portal Light (mia)

This shader is most often applied to a rectangular area light which is placed in the window of a room scene. The shader obtains its proper intensity and color from the sky outside the window (for example, an environment shader such as the mia_physicalsky shader or similar) and how much of that sky can be seen.

When used with final gathering, the mia_portal_light acts as a final gathering concentrator, so that instead of having to send thousands of final gather rays around the scene to "find" the window, the portal light actually blocks final gather rays, and instead converts light from beyond the window to direct light, including high-quality area shadows.

Final gathering will now see a well lit room rather than a black room, and can use much lower final gather ray counts. Furthermore, since the light from the window is now direct, you gain one extra light bounce for "free".

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

on

Enables or disables the light.

multiplier

A multiplier for the intensity of the light.

tint_color

Modifies the light color.

When tint_color is white, and the Intensity is 1.0, the light emitted is equal in intensity and color to the environment light that final gathering would have seen if allowed to send many thousands of (unfiltered) final gather rays.

reverse

The light normally shines in the positive Z direction of the light object's coordinate space. If reverse is on, it shines in the negative Z direction.

cutoff_threshold

This is a performance optimization option. Any light below this level is ignored, and no shadow rays are traced (which is what consumes the bulk of the render time of an area light). Of course, this makes the scene slightly darker since light is ignored, but can save a lot of excess render time.

shadows

Turns shadows on or off.

use_custom_environment

When off, the mia_portal_light shader gets the color of the light from the global environment shader defined for the scene.

When on, the mia_portal_light shader calls the shader that is connected to its custom_environment input port in order to get the color of the light.

Light card example: While this shader is intended to be a portal to an environment, you can also use it as a "light card" by connecting a shader that returns a solid background color into its custom_environment input port. If use_custom_environment is on, and no custom environment is actually passed, the shader behaves like a white light card.

custom_environment

When use_custom_environment is on, the mia_portal_light shader calls the shader that is connected to this parameter port in order to get the color of the light.

visible

Specifies whether or not the light emitting surface is visible in the render.

When off, eye rays, reflection rays, etc. go straight through so that the portal light itself remains unseen and you can still "see" out the window.

When on, the actual light emitting surface becomes visible to eye rays, reflection rays, etc. and you cannot "see" out the window anymore, although you can still "see" the environment shader's result. This is useful when using the mia_portal_light as a light card shader (see use_custom_environment option).

lookup_using_fg_rays

When off, a ray is cast into the environment and the environment shader is called to compute the color of the light.

However, some shaders behave differently if they are called by a final gather ray or by another ray (for example, the mia_physicalsky shader does not show the "image" of the visible sun to final gather rays). Since the main purpose of the mia_portal_light shader is to act as a final gather concentrator, it should therefore follow that behavior. So when lookup_using_fg_rays is on, it calls the environment with the final gather ray type, so that shaders that switch their behavior based on this can return the color appropriate for a final gather ray.

shadow_ray_extension

If shadow_ray_extension is 0 (zero), the mia_portal_light shader begins tracing shadow rays at the light. When positive, the shadow rays actually start at that distance "outdoors". So if there is a large object just outside the window, its shadow will be taken into account. Conversely, a negative value allows the shadow rays to begin at that distance inside the window, which allows the shadow generation to skip over troublesome geometry near the window (such as flowers, curtains, etc.) that would otherwise just introduce noise into the shadows.

emit_direct_photons

If emit_direct_photons is on, the light only shoots photons and does not actually emit any direct light at all.

transparency

The transparency has two functions:

  • When visible is on, transparency is a multiplier for the "visible color" of the area light. When set to white, the directly "visible" color is the one dictated by the laws of physics for a surface that emits that amount of light.

    Modifying the parameter values away from white allows you to artificially change the balance between the visible result (which is changed by changing this parameter) and the intensity of the emitted light (which is not affected by this parameter). This can be useful to avoid noise

  • When visible is off, transparency defines the transparency of the area light. This allows the mia_portal_light shader to double as a "gel" on the window, to subdue the intensity of what is seen outdoors, which otherwise tends to appear overexposed and blown out. The actual emitted light intensity is not affected by this, nor does this affect the intensity of other light rays travelling through the window, it only affects what is visible to the eye, in refractions or reflections.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License