and activate to render an Alpha for this selection
- select again another object
and set this selection also to be rendered in an extra alpha pass.
make it infinitve…
basicly, you choose an object, from which you woul dlike to have an seperated alpha image…
the clue: once you have selected different objects and you make just one render, you get all teh different alpha images… not in one image, but for each selection one extra rendered image…
I’m all for an improved multimatte element where you could drag and drop an object or material or whatever which just isolates that element and writes it to a B+W file. With this you could add the functionality you’re talking about, where you right click and it adds it to the list of render elements with that object selected.
Yes that’s the same one, now incorporated directly into the vray install. It may not be as simple as you are looking for (select objects, right click, etc) but will generate an unlimited number of alpha masks for selected objects or materials. I use it all the time and since it splits it out by R,G, or B rater than just greyscale I can combine 3 mattes into one image which saves some time/files. When you open them in photoshop, etc. just be sure to not apply any color settings to them and each channel will be a pure mask, just like a regular alpha channel.
well, it does exactly that, but you’re limited to 3 mattes at a time. that is red, green and blue: the multimatte element set a matte for any rgb channel (either selected by object or mat id).
say you want a matte for two ojects in scene, the element will produce a black image with only the shapes of the selected objects (or group of objects), in, say, red and green. in any compositing app or ps you can then extract black and white mattes (alphas if you like) simply selecting the red and green channels.
PSD Manager from Cebas is pretty handy for doing this with multiple objects, and it automaticaly generates a photoshop file with all of the isolated objects on their own layer for you.
@rivoli:
hey good to hear from you again.. well thx, so I think I wasn’t wrong, I’ve tested the plug already earlier, but didnt’ know that it’s now inlcuded in the multimatte…
@megapixel:
hhmm, yeah this sounsd great… I will check it out…
I use PSD manager for all masks for still images, and MultiMatte for animations.
With PSD manager, you have to use the adaptive subdiv AA with object outline on. But it does work with Vray.
You cant strip render, but I find when I do masks, even on a file thats 5000k, its rendered in 10 minutes, as you can turn off all GI and lights, you are just interested in the PSD file at the end not the rendered image.
Hope this helps, its a very cool plug-in, I cant do without it! Just made 30 material masks in 5 mins!
I have very, very limited experience doing scripts but I thought I’d try something for this. I bascially scripted the MultimatteElement by changing the Gbuffer Id and name. Run the script and select the objects. Enter a prefix for the mattes and a starting number and hit go. Not extensively tested (Max 9) so you’re on your own if it doesn’t work. Be careful too, it will override any gbuffer id’s you already have set.
rollout ro_Mattes "Matte Generator v.01" width:338 height:133
(
edittext edt1 "Render Element Prefix" pos:[12,13] width:315 height:22 enabled:true
button btn1 "Go!" pos:[130,88] width:77 height:30
spinner spn1 "Starting G-Buffer ID " pos:[53,48] width:160 height:16 enabled:true range:[0,100,20] type:#integer
on btn1 pressed do
(
re = maxOps.GetCurRenderElementMgr()
objs = selection as array
el=multimatteelement
count= objs.count
For i = 1 to count do
(
objs[i].gbufferChannel=i+spn1.value
re.addrenderelement (el elementname:(edt1.text + (objs[i].name as string)) R_gbufID:(i+spn1.value) R_gbufIDOn:(on) B_gbufIDOn:(off)G_gbufIDOn:(off))
)
)
)
Createdialog ro_Mattes 338 133 modal:false
Do you know what would be the steps to recreate this using VRay? I have tried using different render elements and sort but cannot achieve anything like the example. The end product does not look like the original render. Do you know what combination of render elements should be used to achieve the layers done in the Cebas Example for PSD Manager.
I generally only use PSD Manager to generate masks after the render, not to get the elements out in the PSD as well. But I have managed to get them working before.
You will need the GI, Lighting, Reflections, Refraction, Specular, Self Illumination, and maybe some others depending onthe materials/scene setup.
Dont use the raw versions of each element. I dont think it will like those!
If you have a test scene, Ill happily take a look, and setup PSD Manager to work?
I’ve been trying to build a script that cycles through the selected objects and builds multiMatte elements from each set of three objects in the selection.
I’m a little burnt out at the moment and would love some clues as to how to make this work. As it is now, it only cycles over the first three objects…
rem = maxOps.GetCurRenderElementMgr()
(
local theObjects = selection as array --get all objects
local groupsSoFar = 0 --init. a counter for groups so far
local groupCount = 3 --this is the number of objects per group
local objID = 100
while groupsSoFar*groupCount <= theObjects.count do
(
objs = #()
for i = 1 to groupCount while (theIndex = i+groupsSoFar*groupCount) <= theObjects.count do
(
append objs theObjects[i]
)
print objs
groupsSoFar +=1
for o = 1 to 3 while objs.count > 0 do
(
objs[o].gbufferChannel = objID + o
theMatte = multiMatteElement
theMatteName = (objs[1].name + objs[2].name + objs[3].name) as string
print "The Matte Name =" + theMatteName
rem.AddRenderElement (theMatte elementname:theMatteName R_gbufID:objID G_gbufID:(objID +1) B_gbufID:(objID +2) R_gbufIDOn:(on) B_gbufIDOn:(on)G_gbufIDOn:(on))
)
objID +=3
)
)
I revised my last code to work in groups of three (RGB)…
rollout ro_Mattes "Matte Generator v.02" width:338 height:133
(
edittext edt1 "Render Element Prefix" pos:[12,13] width:315 height:22 enabled:true
button btn1 "Go!" pos:[130,88] width:77 height:30
spinner spn1 "Starting G-Buffer ID " pos:[53,48] width:160 height:16 enabled:true range:[1,100,1] type:#integer
on btn1 pressed do
(
re = maxOps.GetCurRenderElementMgr()
objs = selection as array
el=multimatteelement
count= objs.count
groupnum = 1
For i = 1 to count by 3 do
(
objs[i].gbufferChannel=i+spn1.value-1
if (i+1 <= count) then objs[i+1].gbufferChannel=i+spn1.value
if (i+2 <= count) then objs[i+2].gbufferChannel=i+spn1.value+1
re.addrenderelement (el elementname:(edt1.text + groupnum as string) R_gbufID:(i+spn1.value-1) R_gbufIDOn:(on) G_gbufID:(i+spn1.value) G_gbufIDOn:(on) B_gbufID:(i+spn1.value+1) B_gbufIDOn:(on) )
groupnum +=1
)
)
)
Createdialog ro_Mattes 338 133 modal:false
```Not sure if it's exactly what you want. It doesn't really cycle through the elements it just treats groups of three all at once ("count by 3)" and just checks to make sure there's an object for the extra two when changing the g-buffer ("i+1 <= count"...).
I think it works OK but let me know if there's a problem. Hope it helps.