Multi Vray Object Properties on same Object.

Hi,

Sorry to bother you, but I would like to know, if there is a possibility to have Vray Object Properties on same object.
To clarify my question lets say I have A room with some crow flying.
What I’ve done:
- Put a VOP on the Crow Fur with object ID 1.
- Put a VOP on the Crow Body with object ID 2.
- Put a VOP on the Crow Feathers with object ID 3.

Configure a Render Element with MultiMatte.

Now, I would like to have an other MultiMatte with:
- One VOP on the Room with object ID 4.
- One VOP on the Crow (Main Group containing the Fur, Body, Feathers) with object ID 5.

FYI outliner looks like that:
Room
Group Crow
Fur
Body
Feather

But here comes the problem… Since I already have a VOP on the fur, the body and the Feather, my VOP on the Crow Group simply doesn’t work.
Is there any way to make it work without using a RenderLayer ?

And by the way… Is there any way to turn Primary Visibility Off to object, and still get the object visible in the MultiMatte ? Yes, I can turn Matte Surface On, but i’ll lose the shadow cast by object…

Thank you in advance for your precious time and your attention.

Have a very nice day.

Hi,

In regards to the first issue, why you just don’t use Material ID attributes to get additional multimatte color ID for the Group Crow? Would that work for your workflow ?

And by the way… Is there any way to turn Primary Visibility Off to object, and still get the object visible in the MultiMatte ? Yes, I can turn Matte Surface On, but i’ll lose the shadow cast by object…
Unfortunately this is not possible to be done in one pass. Objects with Primary visibility OFF are not rendered in the multimatte element. There is a workaround for that and you can try it - use a Refractive shader with IOR 1 / Affect shadows OFF to hide this object from the RGB pass and make it visible for the Multimatte one.

Thank you for your answer.

Yes Material ID would work. Problem is that we have ton of shaders. Since we do not find a way to select multiple shaders and assign to them the Material ID Attribute with the right ID, it would be very time-consuming (no scripter here…).
Maybe there is a simple build-in function which do that thing ?

Second solution is great for multi renderlayer but since the render time is heavy, I try my best to keep all in a single renderlayer. So I can’t assign a refractive shader to object since I need their original shader for reflection, opacity, and cast shadow. (By the way there is fur so yeah). But hey, we can’t have all the good without some bad. But question was worth trying :wink: !

Thank you again for your time and your answers !

Have a very nive day !

You can use this Python script to assign Mat ID attributes to the current material selection (hypershade):

import maya.cmds as cmds
selectedM = cmds.ls(sl=1)
try:
    for selectedMat in selectedM:
        mel.eval(‘vray addAttributesFromGroup ’ + selectedMat + ’ vray_material_id 1’)
except:
    pass
try:
    for mats in selectedM:
        x = selectedM.index(mats)
        cmds.setAttr(‘%s.%s’%(mats,‘vrayMaterialId’) ,1)
except:
    pass

It will add mat ID = 1 to all materials selected. If you want to change the ID value just edit:

cmds.setAttr(‘%s.%s’%(mats,‘vrayMaterialId’) ,1)

Thank you so much ! You are amazing !

Have a very nice day. :wink: