serially numbered renderelements

when setting up more than one multimatte element you have to add some numbers or something else to its name. if not only the first elment in the list will be saved because all elments have the same name.

it would be great if every element gets an unique name automatically.

best regards
themaxxer

+1…

Yep, lost a couple days of rendering with this, I think I learned my lesson but some sort of unique name would be great never know when this aging mind will fail again, heh.

hm. tough one. Only make it unique name pls not Autonaming like the MtlSelect does as we’re facing enough “too long name” and similar issues and got it all working nicely and safely on our end finally.

Regards,
Thorsten

Something like outputfilename_mme_rAgBbCmidX where outputfilename is the filename which you entered for the actual render (with a warning you have to set this first), A,B and C are the numbers of the respective buffers and X is 0 or 1 whether it’s a material or object buffer…And the default location should be where the actual render goes. This way I never have to enter a filename and location for the renderelements again.

well you can name your output elements as well. So if you name your multimatte before hand it will be fine.

Please explain. The point is to automatically name render elements, so they are representative for their containing mattes and unique (of course). Even if you load the multimatte elements setup from another file, the filenames are still not as in the loaded file but are all the same ?!?!

i dont quite understand what you mean by loading them from another file.
If you create a multimatte element, there is a name filed at the bottom. You can change that name to whatever you want it to be, and the rendered file name will be the same as that name.

I know about the name field but that is not the problem.

Suppose I want to render a file that needs 30 buffers, which I could render with 10 Multimatte Elements.

I fill in the file name (let’s say render1.tif) in the render output field of the common tab in the render scene dialog.

Then I add 10 Multimatte Elements in the Render Elements tab of the render scene dialog. Whatever I change in the matte renderelement parameters, the filename for that element always is the same: render1_MultimatteElement.tif, which results in all the output overwriting each other if you don’t set unique filenames.

At the top of the Render Elements window there is a merge button by which you can load these 10 elements from a previous file so you don’t need to set all the different buffers again, but the filenames again are all the same and you need to set them to prevent overwriting.

If you need 10 renderings on a project with each 10 mattes this results in 100 times entering all these unique filenames, if you ( like I do) write these 10 renderings in the same project output directory. So an automatic filenaming would be very welcome. Even if it’s a very small annoyance :wink:

Actually there is a script (EffectsChannelSet) that detects all material and object ID’s and sets Multimattes with correct naming for all of them. The page is Russian but with some translation engine you should know what all the plugins do…interesting stuff…very nice !!!

http://www.3d-kstudio.com/readarticle.php?article\_id=3

well automatic naming would be nice of course. Here is what Im talking about. Open example scene (max 2008 vray sp3) and render.

http://www.godray.org/~work/example.max

I’d like to stress that the proposed structure will eventually break EXRs beeing rendered. As the filename for split renderelements is derived from the element name and EXR channels have a character limit. This is a problem already with VRayMtlSelect Elements if you dont beware when naming your materials. So i’d definately vouch against fully automatic naming. I’d say make it a warning with the oportunity to autofix it. Or make it the default when ADDING MMREs but dont enforce them as in MtlSelects (wich is kinda needed and i am aware of that :stuck_out_tongue: )

Regards,
Thorsten

You can script that type of naming yourself, you know?
look into the renderElementManager.

This script does do a nice job. The vray camera lister is nice too, although it doesn’t like spaces in the camera names.

hello lele

no, I don’t know how to code this!?
could you help me/us? :slight_smile:

best regards
themaxxer

I am a total hack with mxs. I made this to update the paths of my elements to match the main output path. I don’t have time right now but something similar could be made to number the output filenames.


global theRenderFile = rendOutputFilename --gets the render output path and file name and stores it in the variable "theRenderFile"
global theRenderPath = getfileNamePath theRenderFile --strips out just the path part of "theRenderFile" from above and stores it in the variable "theRenderPath"

makeDir (theRenderPath +@"elements\") -- makes a directory in "theRenderPath" called "elements"

global re = maxOps.GetCurRenderElementMgr() -- creates a MixinInterface for the Render Element Manager. Basically creates a temporary maxscript interface into this tab in the Render Setup dialog.

for i in 0 to (re.numrenderelements()-1) do --starts a loop that will repeat as many times as there are Render Elements. The zero and -1 are an offset. Some lists of things are zero based, as in, the first element in the list is 0, the second is 1, the third is 2...
(
    theFile = re.GetRenderElementFilename i     --get the file name and path of the Render Element output path. Variable "i" will change each time the loop is run; from 0 to 1 to 2 to 3 to 4... 
    theFileName = fileNameFromPath theFile     --strip out just the filename part of the path in the last step
    theFile = (theRenderPath +@"elements\"+ theFileName ) -- create a new path and filename variable that  uses the Render Output path plus the "elements" folder plus the original name of the Render Element.
    re.SetRenderElementFilename i theFile --set the output path and filename of teh Render Element to our new path variable from the last step.
)