Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This script was designed to help implement a lighting scheme which was used on a project I worked on. The lighting solution involved the use of a Mental Ray ambient occlusion node whos output was plugged into the ambient color channel of all the materials in the scene. The purpose for this was to provide fill lighting throughout the scene which did not excessively wash out textures or flatten the final images. This lighting solution was extremely effective for us but proved very labor intensive to set up in scenes containing 100+ materials. This script was written to automate that setup process.
The function of the script is very simple, it generates an ambient occlusion node and plugs that nodes output into the ambient color channels of all materials in the scene with the exception of the Maya defaults lambert1 and particleCloud1. The attributes of this scene-wide effect can than be universally controlled by editing the central occlusion node created by this script.
To-Use: Simply run the procedure in the desired scene.
Please feel free to use this script or any part of it as you see fit. I believe very strongly that the free exchange of tools in the creative community serves to strengthen it. I do ask that if you make use of this tool that you inform me via the contact page on my website www.chrisrigs.com. Also, feel free to contact me with any comments or suggestions you may have as to how this tool could be improved. I can make no guarantees that I will have time to address these of course, but I do like to update my tools periodically, and feedback from people who have found them useful is always appreciated.