Announcement

Collapse
No announcement yet.

Changing file extension in VRayHDRI via script

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

  • Changing file extension in VRayHDRI via script

    so here is the issue:
    - about 1000 8k png bitmaps on about 400 meshes --> mip mapping on demand via tiled exrs
    - it takes over 20 minutes for 'V-Ray Bitmap to VRayHDRI converter tool' to deal with one mesh
    - 'img2tiledexr' converted it in about 2h so I have the assets ready to use.

    one option is to manually change file extensions in max's Asset Tracking and automatically reconnect to tiled exrs but obviously a lot of work.
    tried some available scripts, messed around a bit with what I had but no luck so far.

    any ideas?
    Marcin Piotrowski
    youtube

  • #2
    I have to add I have almost zero experience with maxscript.
    Marcin Piotrowski
    youtube

    Comment


    • #3
      Hm, maybe you can use the bitmap to vrayhdri converter again - if it sees that the tiled file already exists, it will not re-create it, but will just update the file name. I'm not sure about this however, it's best to test on a small scene first.

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

      Comment


      • #4
        V-Ray Bitmap to VRayHDRI converter tool just overrides old exr with new ones so no luck here.

        Marcin Piotrowski
        youtube

        Comment


        • #5
          Piotrus, would you clarify to me exactly what it is you need?
          If you need to relink the exrs after tiling, so its' filename_Tiled.exr ?
          If so, please let me know where the _tiled files are (all lumped in one folder, by the side of the originals), and i may be able to write you a two-liner in a minute or so.
          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


          • #6
            oh, nevermind, i had one done ages ago, of course, and i forgot about it.
            Here (target a root, press, go grab a coffee.).
            Suggestion: have wireframe display active, be in the creation panel, activate expert mode, close all and any material editors/reference editors.
            If during the process max needs to update each path changed, you are going to be sitting there for an awful, awful long time.


            autoTiledSwitcher_001.zip
            Attached Files
            Last edited by ^Lele^; 27-07-2017, 07:51 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


            • #7
              Originally posted by ^Lele^ View Post
              Piotrus, would you clarify to me exactly what it is you need?
              If you need to relink the exrs after tiling, so its' filename_Tiled.exr ?
              If so, please let me know where the _tiled files are (all lumped in one folder, by the side of the originals), and i may be able to write you a two-liner in a minute or so.
              all tiled exrs are in one folder. meshes have png textures aplied (HumanAlloy people models). I am converting max's bitmaps to VRayHDRIs and than manually changing extensions in Asset Tracking fron .png to .exr. Can not figure out the script that will access and change asset file extension inside VRayHDRI.
              Marcin Piotrowski
              youtube

              Comment


              • #8
                the script i posted needs VRayHDRI maps, any input map type loaded (png, jpg, whathaveyou), and you can change which string, if any, shoiuld be appended to the filename during the search (ie: "_tiled" by default. feel free to leave it empty.).
                So, with the original scene, converto to vrayhdri, run the script, and it will be done quite quickly.
                Let me know if it throws any errors (try it first...).
                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
                  works like a charm. thank you.

                  one small feature suggestion if I may - V-Ray Bitmap to VRayHDRI tool needs "only selected nodes" option like VRay scene converter.
                  Marcin Piotrowski
                  youtube

                  Comment


                  • #10
                    Glad to hear it helped!

                    I agree, will report it as a suggestion.
                    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