Announcement

Collapse
No announcement yet.

reset glossiness

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

  • reset glossiness

    Hello,

    is there a easy/fast/script way to reset all the reflection/refraction glossiness of all the materials in a scene to 1.0 ?

    thanks !

  • #2
    There is a check-box in the "Global switches" rollout to disable all glossy effects in the scene (they will be treated as non-glossy instead).

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

    Comment


    • #3
      yeah i know that one, but the fact is i received a heavy scene from someone that i need to work on, especially on the materials.
      And the guy has set glossy on almost all the materials...and i need to clean this out because rendering at 1h/frame (HD) on dual quad-core, well it is not acceptable for me

      Comment


      • #4
        Code:
        theMats = getclassinstances VrayMtl
        for m in theMats do 
        (
           m.reflection_glossiness = 1
           m.refraction_glossiness = 1
        )
        this will reset them at the material level.
        The checkbox is a lot better, however, as it'll allow you to go back to the original state with a click.
        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


        • #5
          Edit: Well, shouldn't have got a cup of Coffee while writing the message

          If you want it to be really reset within the materials, you can use

          Code:
          for i in (getclassinstances vraymtl) do
              (
                  i.reflection_glossiness = 1.0
                  i.refraction_glossiness = 1.0
              )
          best regards,
          Michael
          Last edited by Sushidelic; 24-04-2009, 01:54 AM. Reason: Double Post with ^Lele^
          This signature is only a temporary solution

          Comment


          • #6
            LMAO!
            Well, you're one line short, hence more efficient!
            Coffee worked :P
            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


            • #7
              thanks, you just divided my rendering times by 20

              Comment


              • #8
                and if by any chance you know how to script :

                put all the mat ID's to 2 when the material has written "chrome" in its name

                Would be usefull as well for my post-prod

                Comment


                • #9
                  Somewhere is a great one called VMC (VrayMaterialControl.) It lets you have control over anything...I believe it was written by Olly?

                  Comment


                  • #10
                    thxs for the info will check this out !

                    Comment


                    • #11
                      Hi Muoto!

                      Instead of answering by private message, i prefer to use your thread, because it might be of interest for others as well, who knows

                      Look at the given code:

                      Code:
                       for i in (getclassinstances vraymtl) do
                          (
                              i.reflection_glossiness = 1.0
                              i.refraction_glossiness = 1.0
                          )
                      So what the script does, is to collect all Vray Materials anywhere in the scene (getclassinstances vraymtl), and then goes through all of them to change what you put inbetween the brackets.

                      I quickly listed all the properties of a Vray Material. Now it's up to you to find out how to change the script to make it work. I know you can do it - and to give you a starting hint, boolean means "true" or "false"!

                      Code:
                        .diffuse : RGB color
                        .diffuse_roughness : float
                        .reflection : RGB color
                        .reflection_glossiness : float
                        .hilight_glossiness (reflection_glossiness) : float
                        .reflection_subdivs : integer
                        .reflection_fresnel : boolean
                        .reflection_maxDepth : integer
                        .reflection_exitColor (reflect_exitColor) : RGB color
                        .reflection_useInterpolation (useInterpolation) : boolean
                        .reflection_ior : float
                        .reflection_lockGlossiness : boolean
                        .reflection_lockIOR : boolean
                        .refraction : RGB color
                        .refraction_glossiness : float
                        .refraction_subdivs : integer
                        .refraction_ior : float
                        .refraction_fogColor : RGB color
                        .refraction_fogMult (refraction_fogMultiplier) : float
                        .refraction_fogBias : float
                        .refraction_affectShadows : boolean
                        .refraction_affectAlpha : integer
                        .refraction_maxDepth : integer
                        .refraction_exitColor (refract_exitColor) : RGB color
                        .refraction_useExitColor (refract_useExitColor) : boolean
                        .refraction_useInterpolation : boolean
                        .translucency_on (translucency_type) : integer
                        .translucency_thickness : worldUnits
                        .translucency_scatterCoeff : float
                        .translucency_fbCoeff : float
                        .translucency_multiplier : float
                        .translucency_color (translucent_color) : RGB color
                        .brdf_type : integer
                        .anisotropy (brdf_anisotropy) : float
                        .anisotropy_rotation (brdf_anisotropy_rotation) : float
                        .anisotropy_derivation (brdf_anisotropy_derivation) : integer
                        .anisotropy_axis (brdf_anisotropy_axis) : integer
                        .anisotropy_channel (brdf_anisotropy_channel) : integer
                        .soften (brdf_soften) : float
                        .option_traceDiffuse : boolean
                        .option_traceReflection : boolean
                        .option_traceRefraction : boolean
                        .option_doubleSided : boolean
                        .option_reflectOnBack : boolean
                        .option_useIrradMap : boolean
                        .option_traceDiffuseAndGlossy : integer
                        .option_cutOff : float
                        .preservationMode : integer
                        .option_environment_priority : integer
                        .option_clampTextures : boolean
                        .texmap_diffuse : texturemap
                        .texmap_diffuse_on : boolean
                        .texmap_diffuse_multiplier : float
                        .texmap_reflection : texturemap
                        .texmap_reflection_on : boolean
                        .texmap_reflection_multiplier : float
                        .texmap_refraction : texturemap
                        .texmap_refraction_on : boolean
                        .texmap_refraction_multiplier : float
                        .texmap_bump : texturemap
                        .texmap_bump_on : boolean
                        .texmap_bump_multiplier : float
                        .texmap_reflectionGlossiness : texturemap
                        .texmap_reflectionGlossiness_on : boolean
                        .texmap_reflectionGlossiness_multiplier : float
                        .texmap_refractionGlossiness : texturemap
                        .texmap_refractionGlossiness_on : boolean
                        .texmap_refractionGlossiness_multiplier : float
                        .texmap_refractionIOR (texmap_ior) : texturemap
                        .texmap_refractionIOR_on (texmap_ior_on) : boolean
                        .texmap_refractionIOR_multiplier (texmap_ior_multiplier) : float
                        .texmap_displacement : texturemap
                        .texmap_displacement_on : boolean
                        .texmap_displacement_multiplier : float
                        .texmap_translucent : texturemap
                        .texmap_translucent_on : boolean
                        .texmap_translucent_multiplier : float
                        .texmap_environment : texturemap
                        .texmap_environment_on : boolean
                        .texmap_hilightGlossiness : texturemap
                        .texmap_hilightGlossiness_on : boolean
                        .texmap_hilightGlossiness_multiplier : float
                        .texmap_reflectionIOR : texturemap
                        .texmap_reflectionIOR_on : boolean
                        .texmap_reflectionIOR_multiplier : float
                        .texmap_opacity : texturemap
                        .texmap_opacity_on : boolean
                        .texmap_opacity_multiplier : float
                        .texmap_roughness : texturemap
                        .texmap_roughness_on : boolean
                        .texmap_roughness_multiplier : float
                        .texmap_anisotropy : texturemap
                        .texmap_anisotropy_on : boolean
                        .texmap_anisotropy_multiplier : float
                        .texmap_anisotropy_rotation : texturemap
                        .texmap_anisotropy_rotation_on : boolean
                        .texmap_anisotropy_rotation_multiplier : float
                        .reflect_minRate : integer
                        .reflect_maxRate : integer
                        .reflect_interpSamples : integer
                        .reflect_colorThreshold (reflect_clrThresh) : float
                        .reflect_normalThreshold (reflect_nrmThresh) : float
                        .refract_minRate : integer
                        .refract_maxRate : integer
                        .refract_interpSamples : integer
                        .refract_colorThreshold (refract_clrThresh) : float
                        .refract_normalThreshold (refract_nrmThresh) : float
                      best regards,
                      Michael
                      Last edited by Sushidelic; 25-04-2009, 11:22 AM. Reason: typo
                      This signature is only a temporary solution

                      Comment


                      • #12
                        Thanks !

                        Is this written somewhere in the SDK doc as well ?

                        Comment


                        • #13
                          Do you have the same info for vraylightmtl ?

                          Comment


                          • #14
                            Code:
                            show (vraylightmtl())
                            This signature is only a temporary solution

                            Comment


                            • #15
                              perfect !
                              learned something new today

                              Comment

                              Working...