Announcement

Collapse
No announcement yet.

New Script for changing properties of Vray Materials

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

  • New Script for changing properties of Vray Materials

    Hi,

    Inspired by Metin7's request for a new "Automator" script, I've written a script that allows you to change the properties of VRayMtls, VRayLightMtls & VRayFastSSS mats across the scene, selection or material editor for VRay 1.5, so I thought I'd share it with you.

    EDIT (2012-10-15) : You can now download it from my website: www.oliverradford.com/3ds-max/scripts/vmc-vray-material-control/.

    Let me know what you think or if you have any suggestions...

    Cheers,
    Olly
    Last edited by olly; 15-10-2012, 01:12 AM. Reason: Moved download to Scriptspot
    Set V-Ray class properties en masse with the VMC script
    Follow me for script updates: @ollyspolys

  • #2
    Revision v1.01:
    Added control for Standard & VRayMtlWrapper materials. Also fixed a bug: VRayMtlWrapper base materials weren't accounted for in a property change.
    Set V-Ray class properties en masse with the VMC script
    Follow me for script updates: @ollyspolys

    Comment


    • #3
      Revision v1.03:
      Removed display of unsupported properties, specifically sub-materials & maps. Added a help. Thoroughly tested this time, so hopefully no more surprises...
      Set V-Ray class properties en masse with the VMC script
      Follow me for script updates: @ollyspolys

      Comment


      • #4
        Looking at the script now

        I've been scouring the net for vray documentation for the various vray classes and structures. I'm only a maxscript noob, but the place I spend most time is with vray stuff. So I thought I'd start by trying to learn that.
        I learned that vray.output_on turns on the Vray VFB. this is not documented anywhere, and I found things out by trial and error. Is this the only way?
        Raj

        Comment


        • #5
          Hi Raj,

          To find out the scriptable properties of something in max you use either the show or getpropnames functions.

          For example:
          For vray render properties you can use: show renderers.current
          For vraymtl properties you can use: show (vraymtl())

          Hope that helps?

          Cheers,
          Olly
          Set V-Ray class properties en masse with the VMC script
          Follow me for script updates: @ollyspolys

          Comment


          • #6
            ta. that was how I discovered about the vray-frame buffer. But I arrived at that the vr.output_on after trying a few booleans that I thought fitted the bill. I was wrong a couple of times first. To me it doesn't seem logical to make that parameter turn on the frame buffer since the name is different. I would have thought that something like vray.vrayVFB would have been the obvious choice. The documentation is sadly lacking behind the development. TO be honest I think I prefer it that way too..
            Raj

            Comment


            • #7
              The names are not always meaningful as sometimes an option starts as something, and ends up as something else; in the meantime, the maxscript name can no longer be changed in order to keep compatibility with existing scripts...

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

              Comment


              • #8
                Vlado, i'd vote for a maxscript-cleanup version, even if it means putting hand to the whole lot of maxscript code already written for it.
                The slight inconsistencies can be annoying as they'd often spoil elegant ways of going about things.
                Minor, in a sense, but i'd love to see it relaid out nevertheless, if it isn't too much work.
                Lele
                Trouble Stirrer in RnD @ Chaos
                ----------------------
                emanuele.lecchi@chaos.com

                Disclaimer:
                The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                Comment


                • #9
                  Revision v1.04:
                  Added support for VrayMtl's contained within VRayOverrideMtl.
                  Set V-Ray class properties en masse with the VMC script
                  Follow me for script updates: @ollyspolys

                  Comment


                  • #10
                    Nice! Thanks for sharing.
                    "Why can't I build a dirigible with my mind?"

                    Comment


                    • #11
                      v1.05:

                      Added support for vrayblendmtl coatmtl's.
                      Set V-Ray class properties en masse with the VMC script
                      Follow me for script updates: @ollyspolys

                      Comment


                      • #12
                        v1.06:

                        Added Composite, shellac, shell, top/bottom, blend and RPM Material Support.
                        Set V-Ray class properties en masse with the VMC script
                        Follow me for script updates: @ollyspolys

                        Comment


                        • #13
                          v1.07

                          Performance Optimisations.
                          Set V-Ray class properties en masse with the VMC script
                          Follow me for script updates: @ollyspolys

                          Comment


                          • #14
                            v1.08:

                            Added support for VrayOverrideMtl.
                            Set V-Ray class properties en masse with the VMC script
                            Follow me for script updates: @ollyspolys

                            Comment


                            • #15
                              v1.10:

                              Updated for Vray SP3.
                              Set V-Ray class properties en masse with the VMC script
                              Follow me for script updates: @ollyspolys

                              Comment

                              Working...
                              X