code of the day cotd

Code of the Day: Final Toon Shader

Final Toon Shader 3.6 script by nitisara:

Also called MakeToon this script creates an interface to creating a custom toon material node with additional attributes for any later adjustments.

Language: MEL
Type: Maya Editor Script
Script Files: 1
Number of lines: 711

Functionality: 7
The tool gives a number of custom options in creating the material including: type of shader, fill color and level, outline color, thickness and threshold. Outline for colors, depth and outline contrast. The UI is pretty straight forward and easy to use, and gives nice results with additional tweakable attributes. Some functions set the global render parameters of Maya and do not revert them to the original state.

Design: 7
The code makes use a number of global variables and quite a few larger functions. The number of variables used in some of the functions is quite long, but otherwise the code base is fairly logical and straightforward.

Style: 9
Here the code looks to be quite well organized and closely following some consistent standards. The code does include places of commented out sections of code, but otherwise does a good job of keeping maintanable readable code.

Documentation: 6
WARNING: At the time of this writing, the link website in the script points to a malicious url.

I do not believe this is the intention of the author, but still I was not pleased to see it happen. Besides this issue, most of the internal documentation is pretty useful, the code comments are useful, but could use a few more in some areas. The header comments are a mix of information, thanks and a casual (email or letter like) tone.

Reusability: 6.5
The code base is quite small, but is also tightly coupled with the number of global variables passed to almost every function. This tight coupling between functions and globals makes the code more difficult to extend or maintain, and some other areas are tightly coupled with the UI.

Overall: 7.5
The functionality produces a nice result, and gives a number of options in creating the initial material. It would be nice to have a few more options, or useful for adding additional parameters or settings to other materials, but for what it stands, it does give a nice rendered result

Until next time,
Michael Hubbard

Leave a Reply

Your email address will not be published. Required fields are marked *