render elements, specifically VrayMtlID

i am messing around with Vray Render Elements. the VrayZDepth works great, but i am having problems getting others to do much of anything.

specifically, i am trying to get the VrayMtlId to work, but it doesn’t seem to do anything. …has anyone else messed with this? the documentation is currently less than adequate, and a search on this site returns 0 results.

just to be sure, you have set a material id on some mats, yes ?

i assigned the material id in the modifier stack. is this the proper method?

there’s a tiny number just between put to library and show map on viewport in the mat options. default is 0, any other number than this should give you different id colors. never actually used it though, just like render and object id, I can’t seem to have vray doing any antialiasing on them. wire color is the one that usually works best for me.

Hi,

you can’t anitalias the ObjectID and MaterialID elements. They represent integer numbers and you cant anitalias this directly.

Best regards,

Dieter

Not quite. The VRayMtlID element shows you the ID of the material being rendered, and not the material IDs that you assign to mesh faces. To set the ID of a material, follow rivoli’s advice.

Best regards,
Vlado

Just so I haven’t missed anything - can the VRayWireColor renderpass be antialiased ?

Hi,

yes you can. If you set three colors too red (255,0,0) green (0,255,0) and Blue ( 0,0,255) you have at least 3 anitaliased usable alpha mattes.

Best regards,

Dieter

Hi Dieter

Thanks for that, it works great. Although, some of the geometry gives a rough edge but I think this has nothing to do with aliasing.

regards

N

Wouldnt be cool to have a script capable of assigning random -non repeated and distinctive - colors to wireframes in order to use the vraywire color? It could even be possible to use it in combustion as a replacement for objectid element, using the Rpf Builder operator…this way we’d get better masks…

P.S. This was my 600 post! :slight_smile:

max assigns random colours to objects in the first place - they may become similar if you copy / instance objects but if you don’t change the wire colour yourself you should get a pass with pastel colours suited to a 70’s bathroom.

i have the vrayMtlID working now, thanks for the help.

…but, as eluded to above, can these channels be antialiased? …if so, what type of antialiasing are you using?

@ panthon, you couldt perhaps just use something like
for o in $* do o.wirecolor = random white black
that shouldt make random wirecolors…im not shure about repetition though
Hope it helps
ptr

There is already a gbuffer called “NodeRenderId” (or similar) that auto assigns a colour to every object in the scene.