|06 June 2013||#1|
Glasgow, United Kingdom
Join Date: Jan 2013
MAXScript Tool For Quick Matte Creation
I just created my first MAXScript tool which allows artists to quickly create Matte render elements very quickly. The tool basically is an interface for the Render Elements section of the Render Setup dialog window and works by controlling the Object ID channels of selected objects.
The first section of the tool allows you to choose whether you want your selection of objects to be contained in one Matte pass or if you want to create one matte pass for each individual object in your selection.
The next section allows you to set all the basic parameters for the Matte pass as you would do if you were to set it up normally.
The third section gives you two options for setting the Object ID's of your selected objects; "Assign Unique ID" will look at all the objects in the scene, find the highest Object ID number and create a Matte with an ID of one more than the highest in the scene and also set your objects to have that ID too. When "Assign User-Specifed ID" is selected the "Object ID" spinner is enabled and this will allow you to set your own ID.
When the "Create Matte Render Element(s)" button is pressed all the information is put together and a Matte pass is created. Note that the file path for the Matte pass is assigned AFTER the pass is created, so you have to click on the pass to refresh it.
The "Set Selection's ID" spinner allows you to changed the ID of selected objects which can be useful if you want to add certain obejcts into a Matte pass which has already been created.
The "Select Objects With ID" spinner allows you to select objects which a specifed ID which can be helpful when checking which objects are in a specific Matte pass.
Note that the naming of the render elements doesn't work well when you have the "One Per Object In Selection" option chosen because it gives all the Matte passes the same filename meaning that they save over each other and so only the last pass is saved.
This tool works with the Scanline and mental ray renderers and in 3ds Max 2008 and above. I don't have a license for VRay but I understand that VRay works with their own VRayObjectID pass.
The MacroScript will create a new category in the Customize User Interface window called "Harry's" which you might not like if you've got your own cetegory. If you do, then edit the script.
Hope you enjoy it and get some use out of it, I made it in two days for a university project I'm working on over Summer, which also means that I won't be able to develop it much further, but it didn't seem to throw any errors when I was using it.
|Thread Closed share thread|