Mass-Loading V-Ray multisubTex plugin

To try and shorten the time to this feature, and to collect some feedback, i’m sharing the scripted plugin below.

*) What it does: It extends the normal vrayMultiSubTex adding a rollout with controls that allow mass-loading of texture maps.
The buttons allow for the picking of a folder to recursively search into (for all valid image formats), or of files that can be multiple-picked.
The images are loaded alphabetically, into vrayBitmap loaders.
It is recommended to prefix image files accordingly to ensure they are loaded with the progressive IDs desired (f.e. 001_myTexture.tx, 002_myNewTexture.tx, and so on), without the need for later reordering.
It will take care of matching the number of IDs to the number of loaded files.

*) How to install it: The zip file is named eMST_001.zip. The script needs to sit in the max startup script folder: f.e. “C:\Program Files\Autodesk\3ds Max 2022\scripts”.

*) Where to find it: You’ll find it in the *General* section of the texture maps, named “enhancedVrayMultiSubTex” (Because of a limitation in the way texmap plugins work, i cannot have the map show up in the V-Ray category.)

*) What happens if the plugin isn’t found: The same as any other missing plugin class: on max file load the missing plugin name is presented in the usual dialog.
So, the script *needs* to be copied over to all the relevant workstations, like any other plugin would have to.
I understand this may limit the usefulness of the approach somewhat, but i haven’t yet come up with a better solution.

*) Future Plans: i’m planning on adding also the vraybitmap mass-controls, but that part is still being investigated for possible drawbacks.

*) Why bother: I could surely do with feedback, in the while, on how this part is working, and what changes would need to happen to make it more useful.
The final product will still be done by the devs and integrated with the original vrayMultiSubTex, but feedback on this will help speed up that process greatly.

EDIT: For those preferring to not use the plugin node, i’ve made a mass loader which creates the multiSubTex anew each time.
The only difference is that it’ll need to put the map in a slot in the material editor.
The user can pick a specific number between 1 and 24, or let the script put the map in the first non-assigned material slot (if there are none free, it’ll put the texture in slot 1.)
I have updated the script (not the map plugin) to optionally add a shared UVW randomizer to the loaded maps.
The zip file is named MST_ML_002.zip, the script needs to just be run.


eMST_001.zip (1.52 KB)
MST_ML_002.zip (2.07 KB)

Very convenient. Thank you!

Thanks for this Lele - very much appreciated.

How are you proposing to handle missing DLLs when the script is ultimately removed, either purposefully or when moving to a new version of 3ds max?

This has been my daily nightmare today.
I had started this utterly convinced the plugin would behave like these did, transparently.
It turns out i presumed wrong, and in my book that limits the usefulness of the approach big time: it’s better to handle this entirely differently: a procedure which creates a new multisubtex in some material slot.

It’s the safest, i think, way forward for now.
But ofc, this would also complicate matters for the vraybitmap override: i can make a script to pick a multisubtex and edit the vraybitmaps from the UI, if i don’t go the way of a plugin.

I could also create an mzp to help with installing it, but then i’m not sure copying a single file over to network locations isn’t simpler than opening max on each node, and dragging and dropping an MZP package in the UI.

I’m all ear for ideas, knowing they are temporary, and that they are supposed to help, not hinder, workflow. (woe me, woe me.)

This is cool, and I may well use it as I don’t work with a render farm, but if anyone wants to go down the scripting route this works ok.

Never knew, but should have known, that @joconnell had been here before to steal the thunder. :slight_smile:

Your stuff is always waaaaaaaaaaaay more solid :slight_smile:

The liar you are! ^^

I have updated the script (not the map plugin) to optionally add a shared UVW randomizer to the loaded maps.
The new zip file (MST_ML_002.zip) is attached to the top post.

Please introduce this into an official release. It is much easier.

Working on it. :slight_smile:

When running the script I’m getting:

---------------------------
MAXScript FileIn Exception
---------------------------
-- Syntax error: at =, expected name
-- In line: uvwSource = u
-- File name: C:\​Program Files\​Autodesk\​3ds Max 2022\​scripts\​MST_ML_002.ms
-- Line number: 218
---------------------------
OK
---------------------------
​

Edit nevermind I can see the batch load function is in MultiSubTex from now on. My mistake.

Why not use the embedded loader?
EDIT: cross-posted. :smile: