Material library - duplicate entries in .mat

Material library - duplicate entries in .mat

darawork
Advisor Advisor
1,036 Views
5 Replies
Message 1 of 6

Material library - duplicate entries in .mat

darawork
Advisor
Advisor

Hi,

 

Does anyone know of a script or routine to rid a .mat file of duplicate entries?

 

I've merged a few .mat files and it has resulted in a lot of duplicates of the same material and name.

 

 

There are a few commercial script 'Material Managers' but I'd like to find a small free routine if possible.

Or is this already possible to do inside Max already with an existing function that I may not know about?

 

 

Thanks guys.

 

 

Screenshot of problem:

 

Untitled.jpg

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

0 Likes
1,037 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

in Mat Ed, does Utils>Condense help ?

0 Likes
Message 3 of 6

darawork
Advisor
Advisor

Thanks for the suggestion, but that process does not get rid of duplicate entries.

 

"Condense Material Editor Slots Sets all unused materials in the Material Editor to the default type, retaining only materials in the scene and moving those materials to the first slots in the editor. This action is not undoable, but you can restore the previous state of the Material Editor with the Restore Material Editor Slots command"

 

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/3DSMa...

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

0 Likes
Message 4 of 6

Alfred.DeFlaminis
Alumni
Alumni

Hello @darawork,

 

Good to see you again, I hope things are going well!  Did you merge these via script or something?  Technically this shouldn't happen since merging materials with the same name usually leads to a rename dialog, but I did find a post from a while back where you were looking for a merge script.  

 

I suppose it could be possible to do this via Maxscript but it's beyond my ability.  I know it's possible to just delete them but it's not quite what you're looking for.  I think the best bet here is if I move this thread to the programming forum to see if anyone there has an idea.  I will do this now.


Best Regards,

 

 

 

 

 

Message 5 of 6

darawork
Advisor
Advisor

Thanks Alfred, sorry I've not been around much. Very busy in my new job these last few weeks.

 

Yeah, I merged the .mats with a small script. It would be handy if someone knew a routine to rid duplicates, but not life saving at this stage. Now... I'm looking for a vRaymtl to Unreal engine converter. Similar rarity, like hens teeth.

Darawork
AutoDesk User
Windows 11, 3DS Max 2026, Revit 2026, AutoCad 2026, Dell Precision 7875 nVidia - Quadro RTX4000 ATA - AMD Ryzen Threadripper PRO 7965WX 24-Cores - 128GB RAM

0 Likes
Message 6 of 6

Alfred.DeFlaminis
Alumni
Alumni

Hello @darawork,

 

Busy is good right?  Smiley Very Happy   I'm glad things are going well for you!  

 

I'm trying to jog my memory here but I think the google term to search for is "Vray to standard materials". I think there is a script for this but it may be old or only supports certain map types.  Might be worth asking on the Chaosgroup forums though I recall a thread recently about this that didn't have a solution posted.  Wish I could be more help there but since it's 3rd party I'm a bit limited.  I hope it works out though!

Best Regards,