Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2003
    Location
    London UK
    Posts
    935

    Vray properties and the listener

    Using Max 9 with the latest Vray
    I have little to no experiance with max script but I'm trying to automate a very repetative task using recorded commands from the "Maxscript listener" Trouble is it will record opening the vray properties dialogue for an object but not the changes to the settings within the dialogue. Is this a limitation for the listener or is there another way to automate these setting changes?

    The specific settings I need to turn off are: Generate GI, Recieve GI, and Visable to GI

    thanks all
    Graz
    3D Studio Max, Vray and motion graphics specialist
    Elyarch Ltd - London UK

  2. #2
    Join Date
    May 2002
    Location
    Playa Del Rey, CA
    Posts
    150
    you can get at them by doing the following...

    below code was copied from a post by Dimo on the chaosgroup vray forum...

    setUserProp $Box01 "VRay_Matte_Enable" True
    setUserProp $Box01 "VRay_Matte_Alpha" (-1)
    setUserProp $Box01 "VRay_Matte_Shadows" True
    setUserProp $Box01 "VRay_Matte_ShadowAlpha" True

    Look into "setUserProp" in the maxscript help file for more info about getting at the properties you want to change.

    Tim J

  3. #3
    Join Date
    Apr 2003
    Location
    London UK
    Posts
    935
    Seraph135:
    Thanks for the tip, very helpfull but I'm now stabin in the dark. I can change the vray property values you suggested without a problem using the code you gave, but I can't find the syntax to change the Generate GI/ Recieve GI/ Visable to GI.
    I've tried every type of wording I can think of and googled the syntax too.

    I found that None of these work:
    setUserProp $Box01 "VRay_Generate_GI" False
    setUserProp $Box01 "VRay_Gen_GI" False
    setUserProp $Box01 "VRay_GenerateGI" False
    setUserProp $Box01 "VRay_Generate_GI" off
    setUserProp $Box01 "Generate_GI" False

    can anyone think of some other syntax?
    3D Studio Max, Vray and motion graphics specialist
    Elyarch Ltd - London UK

  4. #4
    Join Date
    May 2002
    Location
    Playa Del Rey, CA
    Posts
    150
    select an object and run this code without the ""

    "getuserpropbuffer $"

    This will give you a list of all the user properties.

  5. #5
    Join Date
    Apr 2003
    Location
    London UK
    Posts
    935
    thanks again for your help.
    I can't seem to get anything other than:

    ""

    as the result of the code:

    getuserpropbuffer $

    I also tried:
    getuserpropbuffer $sphere01
    which gave the same "", (there was an object of that name in the scene.)

    I also found the code:

    showProperties $

    It gives me a list of properties but these are the main object specific properties and not those that are for all max objects.

    I know I'm doing something really stupid here as I'm still not familiar with max script.

    Thanks again
    Graz
    3D Studio Max, Vray and motion graphics specialist
    Elyarch Ltd - London UK

  6. #6
    Join Date
    May 2002
    Location
    Playa Del Rey, CA
    Posts
    150
    Hhhmmm...ok. I tried this again and I was able to recreate the issue your getting. It seems that the vray properties are not visible to maxscript until you've opened the vray properties manually once. After that the code works. I have no idea why you would have to open the properties manually first, but that does solve the problem. Seems as though it has to be done to each object though. So scripting settings will require you to first make sure the objects your trying to alter properties for have their vray properties visible to maxscript.

    Tim

  7. #7
    Join Date
    Apr 2003
    Location
    London UK
    Posts
    935
    Ah ha! Many thanks for spotting that. Yup it all works great now.

    I'm going to try to create a macro script now, and assign these three parameter changes for the vray properties of any currently selected objects. Wish me luck!!

    thanks again for your help
    Graz
    3D Studio Max, Vray and motion graphics specialist
    Elyarch Ltd - London UK

  8. #8
    Join Date
    Jul 2016
    Posts
    2

    ? think this is usefull

    "getuserpropbuffer $" write this and enter




    "VRay_Mesh_Geometry = 2
    Visible_In_Reflections = true
    VRay_MoBlur_GeomSamples = 2
    VRay_GI_Generate = True
    VRay_GI_Receive = True
    VRay_GI_Multipier = 1,000000
    VRay_GI_GenerateMultipier = 1,000000
    VRay_GI_SubdivsMultiplier = 1,000000
    VRay_Caustics_Generate = True
    VRay_Caustics_Receive = True
    VRay_Caustics_Multipier = 1,000000
    VRay_MoBlur_DefaultGeomSamples = True
    VRay_Matte_Enable = True
    VRay_Matte_Alpha = -1,000000
    VRay_Matte_Shadows = True
    VRay_Matte_ShadowAlpha = False
    VRay_Matte_ShadowColor = [0,0,0]
    VRay_Matte_ShadowBrightness = 1,000000
    VRay_Matte_ReflectionAmount = 1,000000
    VRay_Matte_RefractionAmount = 1,000000
    VRay_Matte_GIAmount = 1,000000
    VRay_Matte_GI_OtherMattes = True
    VRay_GI_SurfaceID = 0
    VRay_GI_VisibleToGI = False
    VRay_GI_VisibleToReflections = False
    VRay_GI_VisibleToRefractions = False
    VRay_Secondary_Matte_Enable = False
    VRay_MoBlur_Override = False
    VRay_MoBlur_Override_Duration = 1,000000
    VRay_MoBlur_Velocity_Override = False
    VRay_MoBlur_Velocity_Channel = 1
    VRay_MoBlur_Velocity_Multiplier = 1,000000
    "

  9. #9
    Join Date
    Jul 2016
    Posts
    2
    try(setUserProp obj "VRay_GI_VisibleToGI" false)catch()
    try(setUserProp obj "VRay_GI_VisibleToReflections" false)catch()
    try(setUserProp obj "VRay_GI_VisibleToRefractions" false)catch(

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •