Shopping Cart (0)

Mental Ray for Maya Physical Sky Lens Shader Fix

The Mental Ray Physical Sun & Sky system is located in the Maya Render Settings window.

The Mental Ray Physical Sun & Sky system is located in the Maya Render Settings window.

I’ve been using lens shaders a lot recently and I wanted to share this MEL script patch I created for the Mental Ray for Maya Physical Sky & Sun system. The update fixes an issue where the default physical sky & sun system will overwrite any existing lens shaders connected to a camera in Maya. With this script update you can drag a lens shader onto a camera in your physical sky & sun scene and select the “default” connection option without having to worry about the existing node connections.

The update moves the physical sky & sun node connections from the first lens shader input “.miLensShader” to the lens shader array connection “.miLensShaderList[0]”.

The updated script connects the exposure node to the lens shader array list.

The updated script connects the exposure node to the lens shader array list.

MEL Script Download

Modified copies of the Maya 2010-2014 physical sky scripts are included in the ZIP archive.

Maya_Physical_Sky_MEL_Script_Update.zip

Script Installation

Open the folder that matches your current Maya version.

Place the updated MEL scripts files “AEmia_physicalskyTemplate.mel” and “createMentalRayIndirectLightingTab.mel” in your user account’s Maya scripts folder.

Copy the updated MEL script files to your Maya scripts folder.

Copy the updated MEL script files to your Maya scripts folder.

Windows MEL script folder path:

My Documents\maya\2014\prefs\scripts

Mac OS X MEL script folder path:

~/Library/Preferences/Autodesk/maya/2014-x64/prefs/scripts

Linux MEL script folder path:

~/maya/2014-x64/prefs/scripts

When the mel script is placed in your personal Maya scripts folder it will override the Maya default MEL script of the same name.