Let’s say I want to change a color after I’m done rendering. What’s the best way to separate that object out? Elements?
I’ve tried vrayobj and mtlid - but they always comes out rastered… Any suggestions?
Let’s say I want to change a color after I’m done rendering. What’s the best way to separate that object out? Elements?
I’ve tried vrayobj and mtlid - but they always comes out rastered… Any suggestions?
The multimatte render element in combination with mat/obj id’s is the way to go. It’s anti-aliased & works with opacity maps. Our starting point here is to always add 5 multimatte’s with every project (each multimatte will hold 3 masks in RGB channel) set to mat id’s so we get anti-aliased masks for material id’s 1-15. Then we’ll add another couple multimatte’s for things like trees, cars or something that didn’t get included in the mat id’s.
Render the scene with Scanline & Max standard materials (no lights) render with everything black except what you want in the selection which you need to apply a white material with self illumination set at 100%.
This will create a prefed black and white mask which you can copy into your channel panel within photoshop…and create a selection from…
Same as PSD manager but free!
I used to do the mask render, but I am telling you that PSD manager is worth it. PSD manager creates a PSD with all your elements perfectly separated and it all happens at render time.
I’ll have to experiment with multimatte later. All I know is the default matid and objid comes out with rastered edges.
@Mark - yeah, but probably doesn’t respect opacity maps on things like trees.
@3lp - I’m thinking that the same issue would occur with opacity maps plus there might be a multimaterial object that needs certain colors/textures isolate.
@glory - I’ll have to check that one out some time.
Thanks guys for all of your replies.
I posted a quick script to automate the multimatte element a while back. Basically it changes the g-buffer ID for the selected objects and adds a corresponding multimatte element. I’ve got a newer script that works with g-buffer ID or Mat ID and is a little more automatic. I’ll see if I can find it and post that as well if your interseted. BTW - keep in mind that this script doesn’t watch out for existing ID’s and will overwrite anything you already have set. It’s rough but it gets the job done quickly for creating a lot of matte elements…
[COLOR=Red]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[/COLOR]
I just downloaded one on maxscipt.com moments before reading your post. I was having issues selecting a group of objects and applying an ID. The script made it possible.
Which script made it possible?
Has anyone had any luck with the VrayWireColor too?
I really wish there was a much simpler way to avoid the aliasing issue of the elements. There’s so many threads on this topic.
There’s a useful thread on multimatte render element here:
http://www.chaosgroup.com/forums/vbulletin/showthread.php?45711-Aliased-material-ID-render-element-solution&highlight=render+elements
I shouldnt have to use PSD manager. I have ProEXR from a while back - and my understanding is that it will comp the layers together better. I’m going to run some tests tonight.
thats a really useful script, but can it be configured so that it uses the full RGB range of the multimatte renderelement. so that it uses three objects per element?
thanks.
jujubee - since every image consists of three primary pure colors - the only way to get correct AA for the matte elements is using those channels. that is exactly what the multimatte element does. if you use wire color its more convenient as you get all the elements in one pass. but the problem is that they are integer values. so for nice looking edges on your masks multimatte is definetly the way to go. its not perfect though as joconnel already pointed out in the thread you copied, that although you get antialiaised mattes - the problem of unpremultipling against a bunch of none black stuff won’t give you the perfect edge either. so just rendering the needed element against black is the best option, but the most timeconsuming. so depending on your needs you may satisfy with the wirecolor, multimatte or isolated elements.
sorry for the typos im really bad at spelling english.
I tried multimatte. What I’m understanding is that it will output 3 colors in total and black. So if there are more than 3 items you want to isolate, you would have to do more than one pass?
As for that script dlparisi kindly posted, am I correct in assuming that as you create your scene, it automatically generates a different objID # for each new object you create right?
But still, with multimatte, you only have 3 solid colors to choose from each time you render one pass?
By the way, I upgraded to the latest beta of ProEXR and while writing from the VFB .vrimg window to .exr does incorporate all the layers into one file, it does not layer the render elements correctly in PSD with their appropriate blending types.
I’ve also started to use a script called EffectsChannelSet which can randomly generate both mtlIDs and ObjIDs for every object in a scene to help in the render pass separation:
Yeah, my more current version of the script does exactly that as well as works with Material ID’s, handles instances better (all instances are the same ID), can autonumber new G-Buffer ID’s (so it doesn’t overwrite old numbers and allows you to treat all selected objects as a group so they get the same ID (useful with the autonumber). It’s a more complicated script so I’m just going to proof it a little more before I post (hpefully later today). It’s still not perfect but works in most cases for me.
As for that script dlparisi kindly posted, am I correct in assuming that as you create your scene, it automatically generates a different objID # for each new object you create right?
But still, with multimatte, you only have 3 solid colors to choose from each time you render one pass?
Yeah it generates a new obj Id for each object, but it also sets a new Multimatte Element for each ID so you’ll get a channel with each object in it.
Thanks for sharing that script dlparisi! I’m looking forward to the new version.
you can save out as many as you like with one render - just make sure to rename the channels otherwise youll write them over.
dlparisi - very cool. and thanks for posting it soon ![]()
True, but you can add multiple instances/copies of the Multimatte element to your render elements, and just change the 3 matID numbers (so one has 1,2,3, and the next has 4,5,6, an so on). That way you can have as many as you like and it renders in one pass.
Regarding Multimatte: Why isn’t there an option to use the Alpha-channel as well? That way you could use 4 channels per pass…