AutoMultiMatte

This script utilizes new EffectID property of the VrayMaterials in Vray 2.0 and creates MultiMatte render elements for the all or for the selected objects' Vray materials and assigns proper values to their Effects ID property.
Update 2011-07-15
MultiMatte render element now formed of user prefix + material name + _number. May have 1-3 material name in one render element, depending on color channel selection. Number part is optional, if disabled then, in case when scene contains materials with same name, render element output name collisions are possible.
Thanks to Jaimie Forrester (UK London) for suggestions - http://www.scriptspot.com/users/j-forrester
Since the version 2.0 VRay renderer's VrayMaterial contains new option - "Effect ID" - for assigning more than 16 Effects ID-s.
This script utilizes this new property and creates MultiMatte render elements for the all or for the selected objects' Vray materials and assigns proper values to their Effects ID property.
Current version of the script works ( finds VrayMaterials within these materials, in other words ) with composite materials listed below:
- Multimaterial
- Blend
- VRayBlendMtl
- VRay2SidedMtl
- VRayOverrideMtl
- Shellac
- TopBottom
- Shell Material
Some works well some does not, but it's mostly of material restrictions. Multimaterial and TopBottom materials work as expected.
Vray composite materials don't work as expected and if someone knows how to show that materials in Effects Channel please let me know.
Installation:
As usual - run downloaded script with Maxscript -> Run Script command from any folder on your hard drive. Resulting command 'AutoMultiMatte' will be availlable in 'Sergo Pogosyan' category.
Usage:
Run script, select the material scope (selected or whole scene) and hit "Create Elements". Render.
In some cases set the starting number of Effect ID-s for selected materials and name prefix for the autogenerated render elements. This info will be stored in INI file.
| Attachment | Size |
|---|---|
| automultimatte07.ms | 18.17 KB |


Comments
Thumbs up
great script, very handy, thanks a lot for sharing !!! w7 3ds max 2012 x64
2009
when i add this script it shows in customize track but when i add it to make new button it does'nt appear,it shows blank though i have named it to automultimatte as i did in max2012.Bottom line is the button that i created is blank so it does'nt work.
provide more info please
Could you provide more information about how exactly script behaves under 3ds max 2009? Error messages, dialog boxes, etc.
Google+
AutoMultiMatte
hi,Sergo i m aditya.I hav used your script on max 2012 64bit it is too great but unfortunately i m trying to use on 2009 64bit but it does not work so please can u provide me this script for my 2009 max 64bit.Please.
And yaa thank you for script...
bye for now..
I'll try but I think in that
I'll try but I think in that case different render elements overwrite one another.
Google+
Is it possible to add an
Is it possible to add an option to not use material names at all, and just use numbers maybe?
Problem being that sometimes I end up with names that are really really long, and I've found problems sending things to render if some of the matte names are too long.
Im not very organised with material naming anyway!
Choosing just one channel
Choosing just one channel (r,g or b) doesn't force to use one ID per channel?
Google+
any chance to
add an option so that only one ID is assigned per element, you know the AAliasing spoils the mattes of bees, trees, whales the snails.
Agree with you, we are making
Agree with you, we are making mattes after the render almost all the time :) I just turn off GI and lighting to render mattes quickly.
It is possible to override materials but how to deal with transparent materials?
Google+
Possible idea
Quite often, we need mattes after a render has been created. Would it be possible to add some sort of temporary material overide, yet retain the multimatte information so that we can render out all the mattes quickly (without GI etc)?
----------------------
www.blinkimage.com