Announcement

Collapse
No announcement yet.

Convert old materials to GGX shader?

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

  • Convert old materials to GGX shader?

    Hi everyone,

    I really like the latest shader model, GGX that is popping op in all the different renders, including Vray.

    But I was wondering if anyone has made a script that allows me to basically convert entire old scenes to use this? (I understand that technically certain values behave slightly different)

    And also is there a way to force vray to set ALL newly created materials to GGX ? instead of having to switch it every single time?

    Thanks

  • #2
    Just posting because I like the idea about GGX being default.
    A.

    ---------------------
    www.digitaltwins.be

    Comment


    • #3
      Assuming your selected objects all have a VRayMtl applied (or it won't work) type the following in the script listener window and press enter on the numeric keypad:

      $.material.brdf_type = 4

      Also you could try the VMC script off Script Spot. You will then need to find the brdf_type in the dropdown and change the value to 4.

      Comment


      • #4
        Better yet:

        Code:
        for obj in selection do
        (
        	if obj.material != undefined and ClassOf obj.material == VrayMtl then
        		obj.material.brdf_type = 4 --ggx brdf
        )
        Save that to a .ms file. Make a selection and run it. You should be OK if you end up selecting lights, etc.

        Comment


        • #5
          Code:
          for o in getclassinstances VrayMtl do o.brdf_type = 4
          I generally find I have to increase the glossiness value when converting. Here's with a 10% increase.

          Code:
          for o in getclassinstances VrayMtl do 
          (
          o.brdf_type = 4
          o.reflection_glossiness *= 1.1
          )
          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


          • #6
            Would this brdf work for all material types?
            Bobby Parker
            www.bobby-parker.com
            e-mail: info@bobby-parker.com
            phone: 2188206812

            My current hardware setup:
            • Ryzen 9 5900x CPU
            • 128gb Vengeance RGB Pro RAM
            • NVIDIA GeForce RTX 4090 X2
            • ​Windows 11 Pro

            Comment


            • #7
              Awesome guys!!

              Thank you for the effort and the scripts!

              Comment


              • #8
                All I need now, is for it to work with multi sub materials :$ it doesn't seem to like those.

                Comment


                • #9
                  Did you try Dave's script rather than mine? I haven't tried it, but it looks like it would work with multi-sub. Mine would not.

                  Comment


                  • #10
                    Yeah I am also wondering if GGX should be used for all materials????
                    Ashton Woolley
                    Senior CGI Generalist

                    ASHTONWOOLLEY.COM

                    Comment

                    Working...
                    X