Announcement

Collapse
No announcement yet.

MMRE not working on Proxy Object

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MMRE not working on Proxy Object

    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
    https://www.behance.net/Oliver_Kossatz

  • #2
    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.
    Rens Heeren
    Generalist
    WEBSITE - IMDB - LINKEDIN - OSL SHADERS

    Comment


    • #3
      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.
      Rens Heeren
      Generalist
      WEBSITE - IMDB - LINKEDIN - OSL SHADERS

      Comment


      • #4
        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
        https://www.behance.net/Oliver_Kossatz

        Comment


        • #5
          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:

          Code:
          -- 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
          Attached Files
          Rens Heeren
          Generalist
          WEBSITE - IMDB - LINKEDIN - OSL SHADERS

          Comment


          • #6
            Thanks, buddy! Will try it out immediately!
            https://www.behance.net/Oliver_Kossatz

            Comment

            Working...
            X