AutoMultiMatte

52 votes
Version: 
0.81
Date Updated: 
07/31/2015
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 - 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.

 

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

Comments

Comment viewing options

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

I'll try but I think in that

I'll try but I think in that case different render elements overwrite one another.

spectra's picture

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!

sergo's picture

Choosing just one channel

Choosing just one channel (r,g or b) doesn't force to use one ID per channel?

crystal3d's picture

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.

sergo's picture

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?

birket's picture

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

sergo's picture

Here's a version with reset

Here's a version with reset button :)
More changes yet to come!

themaxxer's picture

great script, very useful. is

great script, very useful. is it possible to add the option to set all ID's to 0 again?

thanks
themaxxer

Comment viewing options

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