Announcement

Collapse
No announcement yet.

Assign material ID to existing VRayProxy?

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

  • Assign material ID to existing VRayProxy?

    I'm doing some product renderings where I need to create image sets of the product in every color. I've been using a Material modifier with an animated material ID for this purpose. However, the scenes are pretty complex, so I'd like to use VRayProxies for the geometry.

    If I put a Material modifier on the VRayProxy, it renders as the preview geometry.
    Making dozens of copies of the same VRayProxy differing only in Material ID and then setting up visibility tracks to swap them seems like a huge waste of effort.

    Is there some other way to alter the Material ID of an entire VRayProxy?

  • #2
    Hi,

    It works for me. Here is my setup : One Proxy Geo > animated Material modifier (ID from 1 to 3) > Multisub object material with different materials for slots from 1 to 3
    Can you give me more details about your setup if missed something? What is your V-Ray version?
    Tashko Zashev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      VRay version is 2.40.04 on max Design 2014. I'll post a sample scene if it still doesn't reproduce.

      Comment


      • #4
        Originally posted by jackbird View Post
        VRay version is 2.40.04 on max Design 2014. I'll post a sample scene if it still doesn't reproduce.
        Yes, please post your file to see the setup you are using. It should work even with 2.4.
        Tashko Zashev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Here you go.

          Click image for larger version

Name:	mtl_modifier_disabled.jpg
Views:	1
Size:	17.6 KB
ID:	855432Click image for larger version

Name:	mtl_modifier_enabled.jpg
Views:	1
Size:	46.1 KB
ID:	855433
          Attached Files

          Comment


          • #6
            Thank you very much for attaching the file.
            I was testing on a scene with Show whole mesh set for the proxy object and this was the reason way it worked for me.
            However, I'm looking for a workaround that will help you to get the required result right now.
            Tashko Zashev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #7
              Would it be a solution for you to add and animate the MatID modifier and then export animated Proxy frames depending on the number of material Ids?
              Then render different frame to get different material.
              Tashko Zashev | chaos.com
              Chaos Support Representative | contact us

              Comment


              • #8
                I don't even see the "show whole object" option in the VRayProxy. If I flip that on with a pre-render script and off with a post-render script that might work, except it's going to make job submission pretty slow.

                Here's the simplified scenario:

                Client makes motorcycles. There are 3 colors of paint, 3 colors of upholstery and 3 colors of trim. Motorcycle consists of 4 VRay proxies linked to a null:

                Painted elements
                Fabric elements
                Trim elements
                Everything else (with a big Multi-sub material)

                So a final render set is 27 frames long:

                0: Paint 1, Fabric 1, Trim 1
                1: Paint 1, Fabric 1, Trim 2
                2: Paint 1, Fabric 1, Trim 3
                3: Paint 1, Fabric 2, Trim 1

                etc.

                So I'm not sure numbered sequences are going to work there.

                Plus in the real production setting I'm rendering these off as transparent layers and not animating the materials of the matte objects in order to get consistent lighting and reflections across the different colors. And there are dozens of paint, fabric, and trim colors.

                Comment


                • #9
                  Actually you are right, this option is only available in V-Ray 3, please excuse me for the inconvenience.
                  If I flip that on with a pre-render script and off with a post-render script that might work, except it's going to make job submission pretty slow.
                  This workflow might not work well due to some limitations when using prerender script with V-Ray and 3ds max batch rendering/render manager.

                  I see that you don't prefer to use animated materials, but what about if you add an animated V-Ray blend material inside the Mutlisubobj. to switch between the colors/shaders?
                  Something like that :
                  Click image for larger version

Name:	2015-02-26 08_48_22}.jpg
Views:	1
Size:	248.3 KB
ID:	855438

                  Will keep trying to find other solutions.
                  Tashko Zashev | chaos.com
                  Chaos Support Representative | contact us

                  Comment


                  • #10
                    Easiest solution is to download RPManager, and even if you don't want to use it, you can use the RP Material which allows you to have multiple materials in one material and change the index to change which one you want to render.

                    I remember discussing a long time ago with Vlado to have a Vray MultiSub material which would have this sort of functionality for exactly this purpose, when you want to have multiple materials per object but not in a multi-sub.

                    Daniel Santana from YCDIVFX was working on his own version with some extra-funky properties, hopefully he'll release this soon.
                    Maxscript made easy....
                    davewortley.wordpress.com
                    Follow me here:
                    facebook.com/MaxMadeEasy

                    If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

                    Comment


                    • #11
                      Originally posted by tashko.zashev View Post
                      I see that you don't prefer to use animated materials, but what about if you add an animated V-Ray blend material inside the Mutlisubobj. to switch between the colors/shaders?
                      Due to what the actual workflow is like, I don't think that will work. Right now, I have a 3-line Script controller for the material ID inside a list controller that switches between the script and a constant. I have the list weights wired to a checkbox on a control panel object, and I can paste the material modifier as an instance to whatever I need to change in various scenes (there are about 100 different products).

                      If I'm going in and manually adjusting keyframes on dozens of color swatches in the VRayBlend, it's going to be laborious and error-prone.

                      RPManager looks interesting, but $300 to work around something that works 99% of the way there feels difficult.

                      Comment


                      • #12
                        Originally posted by jackbird View Post
                        Due to what the actual workflow is like, I don't think that will work. Right now, I have a 3-line Script controller for the material ID inside a list controller that switches between the script and a constant. I have the list weights wired to a checkbox on a control panel object, and I can paste the material modifier as an instance to whatever I need to change in various scenes (there are about 100 different products).

                        If I'm going in and manually adjusting keyframes on dozens of color swatches in the VRayBlend, it's going to be laborious and error-prone.

                        RPManager looks interesting, but $300 to work around something that works 99% of the way there feels difficult.
                        The RP Manager material doesn't require a license, It would be nice if they released that as a freebie, but if you install the demo you have the material forever. Not strictly ethical, but would give you a free solution, otherwise wait about till maybe only next week, Daniel is planning on sending me his last build to test.
                        Maxscript made easy....
                        davewortley.wordpress.com
                        Follow me here:
                        facebook.com/MaxMadeEasy

                        If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

                        Comment


                        • #13
                          I can totally wait a week - please drop me a line. jon [at] jonseagull dotcom.

                          Comment

                          Working...
                          X