# MMRE not working on Proxy Object

**URL:** <https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490>\
**Category:** Issues\
**Created:** [August 22, 2017, 2:28pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490 "2017-08-22T14:28:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kosso\_olli](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kosso\_olli](https://forums.chaos.com/u/kosso_olli)\
**Post date:** [August 22, 2017, 2:28pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/1 "2017-08-22T14:28:22Z")

</div>

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?

Max 2017, V-Ray 3.60.03

Regards

Oliver

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [August 22, 2017, 3:52pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/2 "2017-08-22T15:52:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [August 22, 2017, 4:04pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/3 "2017-08-22T16:04:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kosso\_olli](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kosso\_olli](https://forums.chaos.com/u/kosso_olli)\
**Post date:** [August 23, 2017, 8:29am UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/4 "2017-08-23T08:29:33Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![Rens](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/rens/32/16004_2.png) [@Rens](https://forums.chaos.com/u/Rens)\
**Post date:** [August 24, 2017, 2:11pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/5 "2017-08-24T14:11:30Z")

</div>

Well, for you it’s never ‘just’ cars! ; )

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:

```auto

-- 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

```

[OID\_to\_MATIDMod\_v001.zip](https://forums.chaos.com/uploads/short-url/AbDrTflAqhtAY2AYOM54IR7DuMO.zip) (411 Bytes)

---

<div class="post-metadata">

**Author:** ![kosso\_olli](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kosso\_olli](https://forums.chaos.com/u/kosso_olli)\
**Post date:** [August 24, 2017, 2:41pm UTC](https://forums.chaos.com/t/mmre-not-working-on-proxy-object/84490/6 "2017-08-24T14:41:53Z")

</div>

Thanks, buddy! Will try it out immediately!
