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?

I have to add I have almost zero experience with maxscript.

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

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

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.

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
autoTiledSwitcher_001.zip (1.03 KB)

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.

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…).

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.

Glad to hear it helped!

I agree, will report it as a suggestion.