Hey,
I exported multiple objects of a scene as single proxy. All the parts had proper G-Buffer ID for the MMREs assigned. After the export and bringing the parts back in as proxy, the assignments are gone. Is this a known issue and can it be fixed?
Hey Olli! How are things? : )
I think the object IDs get overridden by the ID of the proxy object, which makes sense. If you’d like to have masks for the objects separately you can use face IDs when you’re not using multi/sub maps or materials. If you want I can write a quick script that will read the Object ID and then apply a Material modifier to that object set to the same number.
Also, you can check if Object User Properties are exported and imported. Then you can use a VRayUserScalar map to read out the ID, getting it into the render elems is a bit trickier though but can be done.
Moin Rens,
things are good!
I think the script would be nice, would do exactly what I need! However, it has to work on around 4000 objects… For me it’s still just cars, you know
Here’s the script, this just adds a Material modifier to the selected (geometry) objects, set to whatever the object’s object ID is set to, also attached as ZIP:
-- mail@rensheeren.com
try (destroyDialog rlt_OIDtoMATID)
catch()
rollout rlt_OIDtoMATID "OID to MATID-Modifier" width:200
(
button btn_go "Add to Selected"
on btn_go pressed do
(
for o_obj in selection do
(
if superclassof o_obj == GeometryClass do
(
f_OID = o_obj.gbufferchannel
o_mod = materialmodifier()
o_mod.materialID = f_OID
addModifier o_obj o_mod
)
)
)
)
createDialog rlt_OIDtoMATID