Announcement

Collapse
No announcement yet.

Problem of rendering old Vray 2 projects with Vray 3 -- Script / Automation Possible?

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

  • Problem of rendering old Vray 2 projects with Vray 3 -- Script / Automation Possible?

    Hey y'all,
    I was wondering if it might be feasible to get a script that can update scenes with materials created in Vray 2 to Vray 3 format? Possibly it would create a log of the materials that it processed to facilitate checking through the asset editor to see if the settings transferred accurately. Also, some kind of way to globally switch off the 'linear workflow' checkbox for the older materials. I mean, is that helping anybody? I don't know of anyone who needs that box checked on their older materials....over and over, anyone who uses Vray 3 for the 1st time has to ask on a forum why all their materials look so dark, then start the laborious process of opening every material in every project and switching off the linear workflow check box. For those of us who have tons of long term projects and keep having these old Vray 2 scenes pop up that need all of these conversions done, some kind of automation to make the process easier would be a huge help. (not sure if this should be in the 'wishlist' section or not...I feel like it might deserve to be the 'Bug' section...)

    Cheers!
    GD
    Last edited by GD3DESIGN; 25-02-2018, 04:32 PM. Reason: Grammar & Dyslexia
    Core i7-8700K @ 5 GHz, Kraken X72, Asus - ROG MAXIMUS X CODE, Trident Z 64 GB @ 3000 MHz, 2x Samsung - 970 Evo, 2x EVGA - GeForce RTX 2080 Ti, Phanteks - Evolv X, SeaSonic - PRIME Ultra Titanium 1000 W, CyberPower - CP1500PFCLCD, 2x BenQ - PD3200Q, 2x Loctek D7L Monitor Arms, Corsair - K70 LUX RGB, 3Dconnexion SpaceMouse, Logitech - G602

    Windows 10 Pro, Vray 5 for 3DS Max (latest), 3DS Max 2022 (latest), Vray 5 for Sketchup (latest), Sketchup Pro 2021 (latest)

  • #2
    Hi GD,

    We have a migration script in place that makes sure that V-Ray 2 materials are upgraded to the new version.
    It is executed automatically once a scene is loaded.

    The linear workflow checkbox is enabled by this script assuming that you had the global linear workflow enabled in V2.
    If you never used it in the previous version then the migration will unfortunately make your materials darker.

    Here's a script that can disable the material option for all scene materials in V3:
    Code:
    VRay::LiveScene.active.select{|p|p.type == "BRDF"}.each{|brdf|
      if brdf.has_param?(:linear_workflow)
        brdf[:linear_workflow] = false
      end
    }
    VRay.refresh_ui
    Hope that helps.

    Regards,
    Konstantin

    Comment


    • #3
      Hello Konstantin,
      Thank you for your response and specially for the script, it will be nice time-saver. I have another big older project that revisions just came in for....so I'll see if the migration script has been updated, I seem to remember all the Vray 2.0 materials still being the old layered material and I would have to manually create new {microfacet GGX}materials to replace them.

      Also, I'd like to apologize - I just re-read my original post and it seems to come across a little on the crabby side. My bad, didn't mean to sound so 'complain-y'....so, very sorry about that. (no excuse, but I had too much too drink the night before, and due to becoming an old man....hangovers are getting worse and worse.)

      Thanks again, much appreciated!
      Core i7-8700K @ 5 GHz, Kraken X72, Asus - ROG MAXIMUS X CODE, Trident Z 64 GB @ 3000 MHz, 2x Samsung - 970 Evo, 2x EVGA - GeForce RTX 2080 Ti, Phanteks - Evolv X, SeaSonic - PRIME Ultra Titanium 1000 W, CyberPower - CP1500PFCLCD, 2x BenQ - PD3200Q, 2x Loctek D7L Monitor Arms, Corsair - K70 LUX RGB, 3Dconnexion SpaceMouse, Logitech - G602

      Windows 10 Pro, Vray 5 for 3DS Max (latest), 3DS Max 2022 (latest), Vray 5 for Sketchup (latest), Sketchup Pro 2021 (latest)

      Comment


      • #4
        can you explain how to use the script?

        Comment


        • #5
          Sure - just go to:

          'Window' --> 'Ruby Console' --> then, just copy & paste the code, from Konstanin's post above, into the ruby console listener and depress the Enter key.

          I did a quick 'fake test' on new scene I already had open and it worked great.

          Cheers,
          GD
          Core i7-8700K @ 5 GHz, Kraken X72, Asus - ROG MAXIMUS X CODE, Trident Z 64 GB @ 3000 MHz, 2x Samsung - 970 Evo, 2x EVGA - GeForce RTX 2080 Ti, Phanteks - Evolv X, SeaSonic - PRIME Ultra Titanium 1000 W, CyberPower - CP1500PFCLCD, 2x BenQ - PD3200Q, 2x Loctek D7L Monitor Arms, Corsair - K70 LUX RGB, 3Dconnexion SpaceMouse, Logitech - G602

          Windows 10 Pro, Vray 5 for 3DS Max (latest), 3DS Max 2022 (latest), Vray 5 for Sketchup (latest), Sketchup Pro 2021 (latest)

          Comment


          • #6
            Originally posted by GD3DESIGN View Post
            I have another big older project that revisions just came in for....so I'll see if the migration script has been updated, I seem to remember all the Vray 2.0 materials still being the old layered material and I would have to manually create new {microfacet GGX}materials to replace them.
            Hi GD3DESIGN,

            In general, the migration will not update the shader structure.
            The 'old' way of building layered materials is still an option so in case you load a scene with a Diffuse and Reflection layers for example, it will be loaded as it was originally set up.
            Replacing the 2 layers with a single VRayBRDF is recommended bun not necessary.

            Regards,
            Konstantin

            Comment


            • #7
              Hey Konstantin,
              I see what you are saying. That makes sense. I guess I was wondering more on the lines of if it was possible for someone to write a script, just like 'turn off linear workflow' script you shared above, that could automatically update the layered materials to the new style. I've had a problem recently while collaborating with someone who refuses to update to Vray 3. So every time I get a file back from them all of my BRDF materials are ruined. (it seems that if you open a vray 3 file on on a system running vray 2, it reverts it back to layered.) I've had to make them unload Vray before opening any of my files...(but they still accidentally do it from time to time, and it's a pain to import/replace from another file.) I already can't remember how to use the layered format...I've already got so used to the new Vray 3 material. (I've used vray for max for a while though, so I was pretty happy when this came along.)

              Although just to be clear, I'm not asking anybody to write this script...I'm pretty happy & thankful to have the 'linear workflow = false' script. Just wanted to point this out as your latest post brought this to mind and see if anyone had any input about it.

              Thanks!
              GD
              Last edited by GD3DESIGN; 14-03-2018, 05:50 PM. Reason: Bad grammar & a scorching case of Dyslexia
              Core i7-8700K @ 5 GHz, Kraken X72, Asus - ROG MAXIMUS X CODE, Trident Z 64 GB @ 3000 MHz, 2x Samsung - 970 Evo, 2x EVGA - GeForce RTX 2080 Ti, Phanteks - Evolv X, SeaSonic - PRIME Ultra Titanium 1000 W, CyberPower - CP1500PFCLCD, 2x BenQ - PD3200Q, 2x Loctek D7L Monitor Arms, Corsair - K70 LUX RGB, 3Dconnexion SpaceMouse, Logitech - G602

              Windows 10 Pro, Vray 5 for 3DS Max (latest), 3DS Max 2022 (latest), Vray 5 for Sketchup (latest), Sketchup Pro 2021 (latest)

              Comment

              Working...
              X