50 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.
sergo's picture

Updated to 0.8 - Vray3 support

I've updated this script to 0.8. It has some improvements that I did while ago (for that reason I don't remember exactly what did I improve).
Could you check your case with that version and I'll try to help to fix it.

P.S. Your error attachment is not visible!

Schmeade's picture

Error when saving some passes

Hey Sergo.

Love this script however I'm having an issue when saving out passes.
Almost every time I use the script I'll get an error with one of the passes saying "Sorry can't write the output bitmap"

This will only happen with one of the passes but causes my render to restart when I sent it to Backburner.

Any idea why this is happening? I've attached the error.

I'm using Max 2014, vray 2.4.

Thanks mate

asymptote's picture

Was this updated for Vray 3.0

Was this updated for Vray 3.0 ??

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

Comment viewing options

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