AutoMultiMatte

53 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.
LuisON's picture

Thank you very much! :D

Thank you very much! :D

Ali_essawy's picture

Vray next update (fix)

I found a way to work with vray Next by removing this part of the script

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

Ali_essawy's picture

Vray next update

Is their any update for vray next ?

thanks for your effort..

j.a.burrell's picture

Corona Version

Hey I hacked this to work with Corona. Sergo, I love your script, perhaps you can take a look at my attempt and make an 'official' version of the Corona one?

Cheers!

AttachmentSize
sergo_pogosyan-coronaautomultimatte.ms 18.47 KB
bergagonzalez's picture

Sorry I missed your

Sorry I missed your question.
Looking forward to your progress!! Thanks Sergo!!!!!

croitorgeorge's picture

Replacement for MultiMatte

Hi Sergo,

The replacement for MultiMatte is CMasking_Maks. There is an option to create Monocromatic mask or RGB masks.

Looking forward to test the Corona AutoMultiMatte!

If you have any questions please write me.

Best Regards,
George

sergo's picture

Hi, I'm not familiar with

Hi,

I'm not familiar with Corona. Which render element do you think is the replacement for MultliMatte? CMasking_ID or CMask_Mask?

Thanks,
Sergo.

bergagonzalez's picture

Corona Update

Hi Sergo,

I have used this script for many years and it's super helpful.
Now we have switched to Corona and I can't use it anymore.

I'd appreciate if you could tell me if you plan to make the Corona version.

If so I'll cry for joy like a little child.

Please let me know if I can do anything on my side to encourage you to go on this quest.

Best!!

sergo's picture

Updated to 0.8 - Vray3 support

Hi!
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

Comment viewing options

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