Height-based shader creator 1.0.0 for Maya (maya script)
This tool allows the user to create a shader with a ramp that is based on the highest and lowest points on their chosen object. This tool also creates preset shaders that fake the look of some mental ray shaders (eg chrome and glass).
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 tool allows the user to create a shader with a ramp that is based on the highest and lowest points (which they input) on their chosen object. This script automates the process of measuring your object, finding the node and inputting the values manually to create the same thing. This tool also creates preset shaders using the sampler info node in various ways to fake the look of some mental ray shaders (eg chrome and glass). This simple user interface (with more information in the About button) transforms making a height-based shader into a very simple process.
Here are some quick examples:
By connecting a snow shader and rock shader into the ramp, you can make snow-covered mountains.
This is a very quick example but it is another idea of what you can do with this shader.
The water in this image was made using a height-based shader. Other ideas include: icing on a cake, dust-covered objects, half-wet shirt, foam on the top of waves, iced biscuits etc.
The other part of this script creates preset shaders using the sampler info node plugged into different values to give different effects. For example, using this node you can fake the look of glass, create a fuzzy edge around an object making it look soft and fabric-like, and fake the look of specular on chrome and satin. Below are some examples:
This is an example of what you can do with the satin preset.
This is an example of the glass preset.
This is an example of what you can do with the cloth preset.
If you have any questions, there are more detailed instructions in the script's "About" window, or you can comment below.