52 votes
Date Updated: 
Author Name: 
Sergo Pogosyan

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.

Additional Info: 

Update 2015-07-31

Small update to support Vray 3+.

I just noticed that I've never uploaded 0.8 version, so this version includes 0.8 updates and Vray3 support. Other thing is that I don't remember what was the 0.8 imrovements :)

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 - 

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.

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. 


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.


Other Software Required: 
VRay 2, 3
automultimatte07.ms18.17 KB
automultimatte081.ms21.87 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tiagodmed's picture

Corona Renderer version?

Corona Renderer version? :DDD

fajar's picture

fn myVrayVersion = ( str =

fn myVrayVersion = 
	str = renderers.current as string
	char =trimleft str ":V_Ray_Adv_"
	aa= for i=1 to 7 collect char[i]
	for j in aa where j!="_" do version+=j
	version as integer -- or as string
stefanbrodd's picture

Another fix:

Or just put comment tags around that whole block, like this:

/*	if (findString (renderers.current as string) "2_") == undefined then
messageBox "AutoMultiMatte script works only with VRay 2.x!" title:"Wrong VRay Version"
) */

save, restart max -> profit.

sergo's picture

Thanks for the fix

I got vray 3.0 now, so I'll update this script soon.

gfa2's picture

Fix for Vray 3.0

Open the script and edit the line near the bottom that says (renderers.current as string) "2_") Just change "2_" to "3_"

emartin8907's picture

Please update

Awesome time saving script!!! I got really used to using it and then got really sad when I upgraded Vray to 3.0 and discovered this script doesn't support it!

Please update to work with Vray 3.0 :D

dub73's picture

Thumbs up

great script, very handy, thanks a lot for sharing !!! w7 3ds max 2012 x64

adibh31's picture


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.

sergo's picture

provide more info please

Could you provide more information about how exactly script behaves under 3ds max 2009? Error messages, dialog boxes, etc.

adibh31's picture


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..

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.