Announcement

Collapse
No announcement yet.

V-Ray Material Library sample refresher script

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

  • #31
    Ok, awesome, this one is working now for me, thanks
    Check out my FREE V-Ray Tutorials

    Comment


    • #32
      Working for me now too

      Many thanks to all.
      Jez

      ------------------------------------
      3DS Max 2023.3.4 | V-Ray 6.10.08 | Phoenix FD 4.40.00 | PD Player 64 1.0.7.32 | Forest Pack Pro 8.2.2 | RailClone 6.1.3
      Windows 11 Pro 22H2 | NVidia Drivers 535.98 (Game Drivers)

      Asus X299 Sage (Bios 4001), i9-7980xe, 128Gb, 1TB m.2 OS, 2 x NVidia RTX 3090 FE
      ---- Updated 06/09/23 -------

      Comment


      • #33
        You're welcome.
        I've read you find the script operations generally buggy.
        Besides the one here (admittedly show-stopping for matlibs), is anything else failing you?
        Max file operations / batch stuff / overwrite and such?
        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


        • #34
          If you mean me, I was referring only to the issue discussed here with the error loading the matlib that I encountered. As that seems fixed for now everything seems fine for me at least. Everything else worked as expected so far, or I would have reported it
          Great to see it's now integrated directly into the material library, actually I totally didn't notice there is a new button appeared now
          Check out my FREE V-Ray Tutorials

          Comment


          • #35
            Yeah, unfortunately this mega bug slipped through.
            The fix was as silly as the error (one word added.), alas, catastrophic in results.
            We ran very tight with the workloads, i didn't bother QA, and this happened.
            My bad, so sorry.
            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


            • #36
              V108 adds a cleaning of custom attributes and bad class IDs, via the Autodesk's own scene converter methods present in either Max files or matlibs.
              The original files will *not* be changed in any way, however, only the created matlibs will be cleaned.
              It also shuts max down completely (that's the hope, at least) on file load, so batch operations should flow to their rightful end now.
              As i had to alter the code flow a bit to make the cleaning work, consider v 108 a bit (more) dangerous. Look out for possible issues.

              Should no more howlers be found, this will be incorporated in the Library itself at the earliest possible time.
              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


              • #37
                Hi Lele,
                I notice with the newly released V-Ray 5.1 that the max file and script are already installed by default in the "C:\Program Files\Chaos Group\V-Ray\3ds Max 2021\assets" folder. Is there any reason to overwrite these with the 1.08 update you've posted above?
                Best regards
                http://www.glass-canvas.co.uk

                Comment


                • #38
                  Overwrite the script only, yes, for now.
                  I've decided to provide direct hotfixes, even if in a slightly disorganised manner, to ensure immediate usability (i had really messed up.).
                  Currently v 107 has been integrated in the library (is or will soon be in nightlies.). V108 will be integrated pending QA's review later on.
                  Ideally v108 or more recent should be on the library button by the next hotfix.
                  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


                  • #39
                    Hi Lele, Don't know if it's possible, but is it possible to select multiple .mat files? All my shaders are in seperate .mat files. So only one each.

                    Also I'm getting the error: The Library path is not writeable to. Quitting.

                    I've downloaded the library to my NAS which is a mapped network drive and I can't actually see anything in the library either, it's just empty. I read the documentation and checked if everything was set properly in the registry and project paths but alas to no avail. At first it was set as a network path \\NASDRIVE\...\... I set everything to a regular path V:\...\.... restarted Max. Nothing.

                    I don't use Max in administrator mode as I can't find my network drives like that, and drag and drop wouldn't work either (very strange as I always thought an administrator was allowed to do more ).
                    A.

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

                    Comment


                    • #40
                      EDIT #11: V111 holds and fetches the currently open max scene. Fetching should happen in any case, also if the user holds the ESC key, at any stage of the process.
                      The behaviour of the pick buttons for when the user wants folders scanned (CTRL or ALT modifiers) has changed, and now will display a folder picking dialog, instead of a file one. Tolltips have been updated to reflect the change.

                      Get it in the first post, as usual.
                      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


                      • #41
                        Originally posted by Vizioen View Post
                        Hi Lele, Don't know if it's possible, but is it possible to select multiple .mat files? All my shaders are in seperate .mat files. So only one each.
                        Did you try CRTL+Click, or ALT+Click? (as the tooltip excessive verbiage explains)

                        Also I'm getting the error: The Library path is not writeable to. Quitting.
                        Phew. Then that's good from my side.

                        I've downloaded the library to my NAS which is a mapped network drive and I can't actually see anything in the library either, it's just empty. I read the documentation and checked if everything was set properly in the registry and project paths but alas to no avail. At first it was set as a network path \\NASDRIVE\...\... I set everything to a regular path V:\...\.... restarted Max. Nothing.

                        I don't use Max in administrator mode as I can't find my network drives like that, and drag and drop wouldn't work either (very strange as I always thought an administrator was allowed to do more ).
                        I've got absolutely no idea on how to help you there on the hardware side.
                        All the script does is actually try to write to the path, and if it fails, it reports it.
                        When you moved the library, did you do so manually? If so, you may have the registry entries still pointing at the old path, and those are the ones the script checks.
                        Try redownloading it with mtlLib.exe in the bin folder of v-ray's installation path (safer) or editing the registry key
                        Code:
                        HKEY_CURRENT_USER\Software\Chaos Group\V-Ray Material Library\Download Path
                        (i'm not sure what would break doing so, however.).
                        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


                        • #42
                          Originally posted by ^Lele^ View Post
                          Did you try CRTL+Click, or ALT+Click? (as the tooltip excessive verbiage explains)
                          Both, I can't seem to select a folder, it requests a mat file.

                          Originally posted by ^Lele^ View Post
                          I've got absolutely no idea on how to help you there on the hardware side.
                          All the script does is actually try to write to the path, and if it fails, it reports it.
                          When you moved the library, did you do so manually? If so, you may have the registry entries still pointing at the old path, and those are the ones the script checks.
                          Try redownloading it with mtlLib.exe in the bin folder of v-ray's installation path (safer) or editing the registry key
                          Code:
                          HKEY_CURRENT_USER\Software\Chaos Group\V-Ray Material Library\Download Path
                          (i'm not sure what would break doing so, however.).
                          I've specified the folder in the installation. And followed the documentation on how to point at the correct path in the register and project files, but they were setup correctly.

                          I don't like asset or work files on my workstation harddrive, too many windows and hardware failures have taught me not to do that anymore. So I don't have to worry when something goes horribly wrong or if I want to format without the idea of backing up. I'll try to sort things out then with a fresh max installation in a few weeks. Hopefully this time it will recognize the library correctly. Right now I use connecter for organizing all my .mat files with previews but your script might convince me to switch to the Vray Material Library, that's why I wanted to try it out.

                          A.

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

                          Comment


                          • #43
                            Originally posted by Vizioen View Post
                            Both, I can't seem to select a folder, it requests a mat file.
                            That's right, before v 111 it wants a single mat file, and would scan the folder that file is in.
                            V111 will allow you to select a folder.

                            I'm not sure what's up with the library install. did you poke our support yet?
                            I have however notified devs of this.
                            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


                            • #44
                              Hello Lele,

                              I am running into the following error. (Known System Exception)

                              Environment - I have the V-Ray Material Library saved on a network share which I have full read/write access to to the folder and all files. I am updating an existing (*.mat) file in the V-Ray Material Library root. (V-Ray Material Library\Stonework & Tiles.mat)

                              Script - C:\Program Files\Chaos Group\V-Ray\3ds Max 2021\assets\VRML_Refresher.ms (Version 111)

                              The script will create the proper folders, thumbnails, and copy assets but upon completing the last asset, the following error appears.



                              After selecting OK, the V-Ray Material Library will not open.

                              After restarting Max 2021, I receive the following error when I launch the library from the V-Ray toolbar. Max proceeds to crash.

                              Click image for larger version

Name:	MatLibError-03.JPG
Views:	669
Size:	41.0 KB
ID:	1105952

                              If I restart Max and run vrayShowAssetBrowser() from the Listener window, I receive the following.

                              vrayShowAssetBrowser()
                              -- Known system exception
                              -- ################################################## ######################
                              -- Address: 0x96f090bc; nCode: 0x00000000C0000005
                              -- Desc: EXCEPTION_ACCESS_VIOLATION The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
                              -- Read of Address: 0x0000000000000050
                              -- ################################################## ######################
                              -- MAXScript callstack:
                              -- thread data: threadID:15516
                              -- ------------------------------------------------------
                              -- [stack level: 0]
                              -- In top-level
                              -- ################################################## ######################
                              -- C++ callstack:
                              -- (maxutil): (filename not available): UTF8Str::UTF8Str
                              -- (vrender2021): (filename not available): destroyAssetBrowser
                              -- (vrender2021): (filename not available): VUtils::VRenderInstance::GetMtl
                              -- (vrender2021): (filename not available): showAssetBrowser
                              -- (vrender2021): (filename not available): NURBSTrimPoint::GetParameter
                              -- (MAXScrpt): (filename not available): Primitive::apply
                              -- (MAXScrpt): (filename not available): CodeTree::eval
                              -- (MAXScrpt): (filename not available): IsMAXScriptListenerInViewport
                              -- (USER32): (filename not available): IsWindowInDestroy
                              -- (USER32): (filename not available): IsWindowInDestroy
                              -- (USER32): (filename not available): IsWindowInDestroy
                              -- (USER32): (filename not available): CallWindowProcW
                              -- (USER32): (filename not available): CallWindowProcW
                              -- (UIControls): (filename not available): (function-name not available)
                              -- (UIControls): (filename not available): (function-name not available)
                              -- (USER32): (filename not available): CallWindowProcW
                              -- (USER32): (filename not available): DispatchMessageW
                              -- (USER32): (filename not available): IsDialogMessageW
                              -- (3dsmax): (filename not available): NodeAndAnims::SetNode
                              -- ################################################## ######################


                              If I run ​​​​​​​vrayShowAssetBrowser() from the listen a second time, the V-Ray Material Library shows up empty.

                              Click image for larger version

Name:	MatLibError-02.JPG
Views:	566
Size:	21.3 KB
ID:	1105953

                              Any thoughts on what might be happening? I can be available for a private screen share if that helps.

                              Thank you for the help.

                              Comment


                              • #45
                                It's not yet clear to me why that is happening.
                                Could i get the material library you used?
                                You can find my email address in the signature below.

                                EDIT:
                                I only need the .mat file for inspection, right now, no need for textures yet.
                                Also, what v-ray version are you running, exactly?
                                Last edited by ^Lele^; 05-03-2021, 10:44 AM.
                                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

                                Working...
                                X