batch material creation from image+alpha

Is any script where I can reate as many
materials I want just by selecting a series
of images and and a series of their alpha masks?

I mean I creat a standard material and assign
as diffuse map a jpg image and as opacity
map another jpg image.

How can I do this automatically with a script?
Means selecting 10 jpgs as diffuse maps, then
selecting other 10 jpg as opacity maps and then
3ds max automatically creates 10 standard materials...

thank you.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pproestos's picture

ok I figured that out

ok the script is perfect...
It fills 24 slots with their original names and that's ok

then to save them all together in one library I changed
this parameter:

Change UseOldMtlBrowser=0 to =1

and now I can save all material slots in one library!

again another big thank you.

jos's picture


Okey great! I havnt much time now, so fortunately you've solved it.

pproestos's picture


Jos filename works!
But I think they are not inserted automatically into
a material library.

If it's not possible, is there a script
that puts all together 24 slot materials into a library and
not one by one?

Your help is unique for me.
thank you again.


pproestos's picture

it's perfect

Jos you are a GOD.
thanks again very much.

pproestos's picture

thank you

guys you are GENIOUS!
I am out of speech...

thank you VERY much from my heart.
I will try it and tell you.

you save my life...


jos's picture

you're welcome skifx

you're welcome skifx

jos's picture

just run the script. it will

just run the script. it will create the materials in the material editor.
If I have to add something, feel free to ask. (like naming etc.)

AttachmentSize 1.7 KB
barigazy's picture

well done, jos. Works

well done, jos.
Works great.
I was try to wrote just a function but this is more practical.


barigazy's picture

It's better solution to

It's better solution to create temp mat. liblary because the material editor have only 24 mats. If you use this method then in line 26 you need to put this:

for i=1 to MaskArr.count where i < 25 do ...


jos's picture


I was aware of the limitation. Just quickly wrote this one. Was just for the case of skifx (he needed 10). So If someone wants more functionality just ask!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.