ScriptSpot home

AutoMultiMatte

Downloads

Release history (2)
  • Version 0.81Listed version

    Listing updated

    No download linked to this version

  • Version 0.8

    Release notes

    Updated to 0.8 - Vray3 support

Other files (2)
3ds Max compatibility
Unknown
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
0.81
Other software required
VRay 2, 3
Author’s update date
Legacy votes
52
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

sergo

Credited author: Sergo Pogosyan

More by this author

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.

Setup & notes

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.

 

Comments (29)
Ali essawy

Vray next update

Is their any update for vray next ?

thanks for your effort..

Reply to Ali essawy
Ali essawy

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()
)

James Burrell

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!

Attachments
Berga & Gonzalez

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

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.

Reply to sergo
George

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

Reply to sergo
Berga & Gonzalez

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

Richard Meade

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

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!

asymptote

Was this updated for Vray 3.0 ??

tiagodmed

Corona Renderer version? :DDD

fajar

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]
	version=""
	for j in aa where j!="_" do version+=j
	version as integer -- or as string
)

myVrayVersion()
stefanbrodd

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"
return()
) */

save, restart max -> profit.

emartin8907

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

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_"

Reply to gfa2
sergo

Thanks for the fix

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

Florian Dubiel

Thumbs up

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

sergo

provide more info please

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

Reply to sergo
adi

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.

adi

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

sergo

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

spectra

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!

crystal3d

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.

Reply to crystal3d
sergo

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

birket

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)?

Reply to birket
sergo

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?

themaxxer

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

thanks
themaxxer