Announcement

Collapse
No announcement yet.

Batch tool for proxy instancing

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

  • Batch tool for proxy instancing

    Hello,
    we got thousands of proxies created over the years, back to vray 2. In the later vray versions there was the "optimize for instancing" option implemented for vray proxies.
    It would be great if you could batch "optimize/convert" old proxies.

    Is that possible or do you have to use max in order to get this done?

  • #2
    Here's something to get you started for now.
    It'll reconvert all proxies inside a scene to the single voxel per node type.
    The script will ask nothing and has no UI, and likely error out if the installations aren't standard, or if the (output) files exist, and such (although it should be graceful when doing so).
    It should simply be run (selection isn't required).
    If everything works as intended, you'll have a new version of your vrmeshes on disk (with "_O" appended to the filenames), and those versions should then be the ones linked inside the scene you operated on (saving said scene, or throwing it away is your choice, of course).

    Attached Files
    Last edited by ^Lele^; 13-09-2021, 03:55 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


    • #3
      Thank you very much. Will test it

      EDIT:
      Just wanted to say, that its working flawlessly. Thanks again.
      Last edited by dreidesign; 25-04-2019, 04:04 AM.

      Comment


      • #4
        I have expanded the script to give it an UI, and some options.
        It should be fairly straightforward, and tamper-proof (ie. you should never be able to do something you weren't supposed to, using the UI).
        Launched and ran, it will work like it used to when without an UI (ie. convert the scene proxies.)
        It can now however parse folders and subfolders in search of proxies, and mass-convert them.
        The UI should be self-explicative (info label!) in guiding you through the process.

        A word of caution: use at your own risk, the tool has no support, nor it's guaranteed to work with the naming conventions, scenes or paths you have, nor there is any guarantee it ever will.
        You can however make all and any modifications you please to it, to have it best suit your needs.


        A secondary word of caution: first try it on non-production assets, in a controlled environment.
        Only have it process the production stuff when you are sure it will work as you intended it to, and should that not be the case, do not use it at all.


        Below Scene and Disk modes, and the keep/delete, and Skip/Overwrite modes.
        Click image for larger version  Name:	sceneMode.jpg Views:	80 Size:	29.8 KB ID:	1034108Click image for larger version  Name:	diskMode.jpg Views:	90 Size:	34.0 KB ID:	1034109
        Attached Files
        Last edited by ^Lele^; 13-09-2021, 03:55 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


        • #5
          Hey lele,
          Today I wanted to process our proxies with your second script.

          But I cant get it work with overwriting the original files with their filename. When I leave the "append string" field empty, the find proxies doesnt work. When I enter something in the "append string" field, its working again. But not overwriting the original files.
          Could you help me with that?

          Comment


          • #6
            I checked, and no, i'd have to rewrite the script from scratch, as it's built around *not* touching the original material, so that string is unfortunately needed for it to operate.
            It's a safety feature i am not comfortable in lifting, but you can easily mass-rename and mass-delete files on disk with third party applications.

            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
              Ok, got that. I will then check a possible workaround with some mass-rename tools.

              Comment


              • #8
                Originally posted by dreidesign View Post
                Ok, got that. I will then check a possible workaround with some mass-rename tools.
                Thanks for the understanding.
                Let me know if you need any help with working around the issue.
                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
                  Sure, no prob. Appreciate your help, not that this is included in the vray price
                  Got it working, with bulk rename utility. Pretty easy!.

                  Just one little thing I discovered, it seems that your plugin shows the double amount of found files. Only a gui thing, as far as I could see.

                  Comment


                  • #10
                    Originally posted by dreidesign View Post
                    Just one little thing I discovered, it seems that your plugin shows the double amount of found files. Only a gui thing, as far as I could see.
                    Uff, i haven't fixed that yet?
                    I thought i did, i'll look into it again.


                    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


                    • #11
                      I fixed that issue, i think (it works fine here.).
                      I also made it so it will work fine with all max versions, not just 2020.
                      Lastly, i removed the "find" button, and now selecting a root folder automatically starts scanning it and its sub-folders for proxies.
                      It will still stop and warn the user if the folders to scan are more than 1000, and continue only if given permission, so it ought to be safe enough.

                      Let me know if anything breaks, or misbehaves.
                      Attached Files
                      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


                      • #12
                        Hi,
                        I have some really slow proxies and I`m not sure if this tool will help but I keep running into the error `no path to ply2vrmesh.exe, make sure the installation is current`. It`s a default Vray install and Ply2vrmesh.exe is located in Chaos Group\tools folder. Tried copying it to C:\ and Scripts and Proxies folder. Not sure what else to try ? Maybe it`s Win 10 being over restrictive. Any suggestions ?
                        * also added Ply2vrmesh.exe and the tools folder as an environment variable (presuming I did it right)
                        thanks
                        anthonyh

                        ***edit: Ok facepalm, I finally found the issue with the proxies after maybe a couple of years now (1 min after typing all that).
                        Seems not all network drives are equal. Had the animated proxies on a Synology Diskstation. I moved them to our old server and I can move the timeline again ! I wonder what the issue is with the Diskstation being slow, it`s only set as a file share. They aren`t big proxies, only about 10mb each. This has been such an issue in certain files I honestly can`t believe it must have been changing the proxy locations a while back when the project changed.
                        I`d still like to try the Optimiser, see if it squeezes any more speed out of them though.
                        Last edited by anthonyh; 09-04-2020, 10:13 AM.

                        Comment


                        • #13
                          Umh. Which max?
                          And which V-Ray?

                          The tool currently woks only with V4.
                          Last edited by ^Lele^; 10-04-2020, 11:22 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


                          • #14
                            Ah sorry, Vray 3.7 so I guess this won`t apply and my issue was really the server drive. Thanks for your response.

                            Comment


                            • #15
                              Script updated (also in all the other posts) to cater for V5 and V6. (thanks to Roman Vit. for the heads' up! EDIT: Twice!)
                              It also fixes a nasty typo-related bug, and uses a compiled method to look for files on disk (it ought to be quite a bit quicker with many folders to recurse.).
                              Attached.
                              Attached Files
                              Last edited by ^Lele^; 10-08-2022, 04:31 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