Announcement

Collapse
No announcement yet.

Mia 2 VRay conversion script

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

  • Mia 2 VRay conversion script

    Hi,

    I´ve recently finished a melscript which converts a Mental Ray MIA material to a VRay material.

    You can download it from my website www.dryzen.com/scripts.html

    !!! The script only works with the mia_material_x_passes, so if you have a normal Mia material... use the upgrade feature of the attribute editor first.

    The script scans the most used input connections (diffuse, reflection, refraction etc.) and connects them to the VRay material.
    In the first version I´ve only done the needed connections, due to the fact that MR and VRay are working completely different the look of the materials won´t be exact the same But it will give you a good start to work with.

    I´m still working on the script, so if there is anything which should be added or changed, please let me know!

    Please give it a try and tell me what you think.

    Thanks Paul
    VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

  • #2
    Hi I tried this script, works great. Conversion is smooth

    However the newly created material won't show up in the hypershade. Never seen this happen before with Maya. even duplicating the shader does not fix this. (Maya 2010 x64)

    Also is it possible to get the bump maps to connect to the vray shader?

    That is all. Excellent work on all the scripts, makes life in Maya a lot easier.
    Maya 2020/2022
    Win 10x64
    Vray 5

    Comment


    • #3
      Hi,

      I have sometimes the same problem with materials not showing in the hypershade. It has nothing to do with the script... Don´t know how this happends

      I have a part in the script which scans the bump connection. The problem with the Mia material has 500 different ways to add bump to the shader. So my script only scans the overall_bump connection.

      But it should be no big deal to add some of the other bump ways too

      Just let me know what you use the most and I will add it for you.

      Greetings Paul
      VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

      Comment


      • #4
        How do you create the shaders in your script? You must create them through the "shadingNode" command, rather than "createNode", otherwise they won't appear in HyperShade.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          hm,

          you´re right. I´ll update the script within the next hours
          Thanks for the tipp.

          Paul
          VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

          Comment


          • #6
            update finished. www.dryzen.com/scripts/miaPassesX2VRay.zip

            I´ve changed the createNode command, so the material should now be visible in the hypershade
            I´ve also added a check for the two bump connections (overall and standard bump).
            If one of them has a connection the script will work... If both have a connection it won´t, so in that case you have to combine the bump nodes and connect them into one input of the Mia shader.

            Thats the stupid thing with the Mia material, there a 100 different ways to built up your network ^^

            Thats it!

            Greetings Paul
            VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

            Comment


            • #7
              Originally posted by paulDryzen View Post
              Thats the stupid thing with the Mia material, there a 100 different ways to built up your network ^^
              Please, don't get me started!

              Thanks Paul for the update.
              Maya 2020/2022
              Win 10x64
              Vray 5

              Comment


              • #8
                Hi,

                I´ve done some more work on my script. Now it can also convert Lambert, Blinn and Phong shading networks. The code is a little easier too.

                Next step would be an interface, but I hat interface coding So don´t wait for it ^^

                Copy the script to your scripts folder and read the info in the script file.

                Please give it a try and tell me if everything is fine.

                Thanks Paul
                Attached Files
                VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

                Comment


                • #9
                  Thanks for the update. This script is a keeper, it works really well on my pre-bought libraries!

                  Is your site down?
                  Maya 2020/2022
                  Win 10x64
                  Vray 5

                  Comment


                  • #10
                    yeah, for one day. Now everything is working fine again
                    VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

                    Comment


                    • #11
                      Cool, I see it is back up.

                      One thing I noticed with the script is when you convert some mia_materials with fresnel, the newly created VrayMat does not have the fresnel box checked. It copies over the fresnel settings okay, but the little checkbox is turned off. Try mental ray's Glass Physical preset and then convert and you'll see what I mean.

                      I don't think the Anisotropic settings are converted yet either, if I knew MEL I'd try and help out but I don't understand it yet.

                      Thanks again for the script and your work!
                      Maya 2020/2022
                      Win 10x64
                      Vray 5

                      Comment


                      • #12
                        Hi,

                        you´re right. Some values are not converted yet. I didn´t add the fresnel button because they behave totally different in the VRay material. So I decided not to do this connection. I can add it if you need it, but I suggest to change/add this value manually.

                        The Anisotropic part will come in the next update. I haven´tr found a nice way to convert these settings so that they look nearly the same in VRay.

                        Greetings Paul
                        VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

                        Comment

                        Working...
                        X