MatManager

Tagged with terms:
9
points
Date Updated: 
10/13/2008
Author Name: 
Marco Brunetta
Version: 
BETA 0.520

 

MatManager is aimed at improving the material workflow inside of 3ds Max . The script creates a Tree of custom material libraries, the user can then add as many libraries and materials to the tree as he wants. The materials will be automatically stored on exit, and when the MatManager is opened again they will still be there, ready for use. This makes recycling of old materials A LOT faster and easier.

However that is not all that it can do, here are some feature highlights:

MATERIAL EDITOR AND SCENE LIBRARIES: Besides user-created ibraries there are two extra libraries, one holding all the materials in the scene and one holding all the materials in the material editor. These facilitate the saving of materials in the MatManager and the browsing of the already created materials. Both of these libraries are updated automatically.

COMPATIBILITY:  The script is compatible with any shader type or material you can use inside of 3ds MAX. Vray, FinalRender, Brazil, etc., all work with the script.

AUTO.STORE BITMAPS: When saving a material that uses bitmap files, MatManager will automatically copy the bitmaps to a pre-configured location. With this feature you will never have problems with missing bitmaps!

MATERIAL PREVIEWS: MatManager will not only display your materials but also all the sub-maps that those materials use. It will also automatically generate and display previews for your materials and maps.

STORE UVW MAPS: Besides the material itself, you can also store the UVW modifier that material is using. This way you won´t have to waist time re-creating the UVW coordinates for your architectural materials.

MATERIAL SHARING: All the materials are stored in .mat files in your hard drive, this makes sharing of materials and libraries really easy even with people who do not have MatManager installed.

Additional Info: 

MatManager is still in beta stages and so it should be used at your own risk. Right now most of the features are working, however it is still not complete. For example the options panel is still incomplete and some of the options in the right-click menus don´t do anything yet. The reason I´m releasing this beta here is to find as many bugs as possible now that about 80% of the code is done.

To install the script just extract to your Max folder and look under the tools category for MatManager.

There is still no help-file for MatManager but most of the interface should be pretty easy to understand. Here are a few pointers however:

-Nodes can be drag and dropped between libraries and dragging a node from the Material Editor library or the Scene Materials library to a custom library will store it.

-Pressing the Delete key will delete the selected material/library. MatManager does not delete the bitmaps when deleting a library, instead they are moved to a "deleted libraries" folder (just in case you want to use them on another material later).

-Double clicking a material in the custom libraries or the material editor library will assign that material to the current selection (this is undoable). Double clicking a material in the Scene Materials library will select all the objects in the scene that use that material.

-Materials that have a UVW modifier associated will have an orange icon (see screen grab above) and it will be indicated next to the material preview at the bottom. Also at the bottom you will see a filed that reads "Compatible:" this indicates if the selected material is compatible with the current renderer.

If you come across any bugs or have an requests or comments please let me know here or at mbrunetta@gmail.com

 

MAIN CHANGES SINCE THE LAST PUBLIC BETA:

- New Tools: Remove Material; Assign Random Material; Synchronize Materials

- Materials can be refreshed hitting the F5 key 

- Stored UVW maps are used when generating the preview render

- Special icons and options for Blend materials and Multimaterials

- The script can now import several materials at once from the current selection

- Missing bitmaps are now show on the material tree and can be directly fixed

- Bitmaps can be directly opened in your favorite image editing software.

- Many, many bug fixes and small improvements/optimizations 

 

Version Requirement: 
MAX 9 sp2
AttachmentSize
MatManagerDemoSample.jpg98.57 KB
MatManager-0.520-DEMO.rar144.37 KB

lukashi's picture

This is really cool, I like

This is really cool, I like it!

robert's picture

Really cool tool. Have you

Really cool tool.

Have you thought about a syncronising function?

So, if you open a scene and then let syncronis all materials with a libary.. etc...

Also it could be cool to support project folders.. 

robert's picture

ok, I found the project

ok, I found the project paht...

 Some Comments:

- If I use more then one UV Channel I get an error message when the little material Preview is rendered.

- An option for turning of the preview (speed) or make it small would be nice. Indeed I find it to big (performance).

- Renaming option for Materials would be very nice. Also a Material Renamer could be integrated (there is one script here at scriptspot).

- Sympole: It would be cool if the the symbol could tell me more about the material type. Like Standard, Multimaterial, Vray, MR etc..

- Drag & Drop: Also quite importend, draging a Material in the Material editor or in the viewport (to apply it). And of course backwards.

- Search: This one thing I miss in the Material Browser. A search vor Name or Type, etc. 

 

Marco Brunetta's picture

"Have you thought about a

"Have you thought about a syncronising function?
So, if you open a scene and then let syncronis all materials with a libary.. etc..."

I didn´t get that one, could you elaborate?

"If I use more then one UV Channel I get an error message when the little material Preview is rendered."

I´m looking into that right now. Is that a "missing UVW" error or something else?

 

"An option for turning of the preview (speed) or make it small would be nice. Indeed I find it to big (performance)."

I´ve already added an option to disable previews for the Material Editor and Scene materials. The preview is rendered EACH TIME you select a material from one of these libraries and this can be pretty annoying. The custom library materials instead only generate the preview once, this is then stored on the HD and unless the user forces an update of the preview, there will be no need to create a new render.
Besides this, I´ve also planed to give the user the ability to use a custom scene for previews.

 

"Renaming option for Materials would be very nice. Also a Material Renamer could be integrated (there is one script here at scriptspot)."

Have you tried pressing F2? =p
There should also be an option to rename the material in the right click menus. The renamer idea might be interesting, I´ll check it out.

 


"Sympole: It would be cool if the the symbol could tell me more about the material type. Like Standard, Multimaterial, Vray, MR etc.."

Since this release I´ve added better support for MultiMaterials (they now have their own icon and the submaterials are also displayed). The problem with custom icons for different material types is that there are A LOT of material types so it would be a lot of work, besides these would need to be hard-coded, which is not really nice. I´ve planed to add another icon however for materials that are incompatible with the current renderer. I´ll update the preview once that one is done.

 

"Drag & Drop: Also quite importend, draging a Material in the Material editor or in the viewport (to apply it). And of course backwards."

I´d love to however it is not possible. Maxscript does not support drag and drop outside the material editor. However I do think that the double clicking the material to assign to the selection is a pretty good alternative. Right now I sometimes find myself double-clicking the materials in the Material Editor =P.

 

"Search: This one thing I miss in the Material Browser. A search vor Name or Type, etc."

I´m not convinced this would be useful as the ability to create different libraries already permits pretty easy browsing of the materials, but I´ll think about it.

Marco Brunetta's picture

ALSO, here´s a short list

ALSO, here´s a short list of some stuff I´ve added since this beta release:

-A refresh option for materials in the right click menus (also the F5 key).This allows you to update the preview and the maps after a material has been edited.

-Materials that have an UVW map associated will use it when generating a preview.

-As stated above MatManager can now display the submaterials of a MultiMaterial and they have their own icon.

-Created a "Remove Materials" tool button. Nothing fancy I know, but it might be useful to clear stuff from the scene.

-The "Import from selection" option now allows you to import several materials at the same time. When more that one object is selected, a list displaying all materials will be shown, the user can then choose which ones he wants to import.

Excubitor's picture

It's a good tool. Any chance

It's a good tool. Any chance you can make up your mind soon to if your going to sell it or just release it. I need to add more libraries :)

Marco Brunetta's picture

Hehe. Right now the plan is

Hehe. Right now the plan is to sell it for around 10 Euro. I´m currently working on a website and a few demo videos for the script (besides completing the script itself of course).

frothlord's picture

I get "Image I/O Error" and

I get "Image I/O Error" and missing preview .jpg link when I choose a material in my library. What am I doing wrong? Did I install it correctly?

Marco Brunetta's picture

This means that the preview

This means that the preview image is not being generated and thus it can't be loaded. Does this happen ON EVERY material or just one in particular?
If it happens on every material it might be that you are not capable of writing files in the library path or some other network problem perhaps.
Check the library storage path in the options panel and make sure it´s a valid path (I'll replace this panel with a more user-friendly one for the next release). By default MatManager creates a "MatManager" sub-folder in 3D Studio´s default material library folder.

frothlord's picture

Dunno what I'd be doing

Dunno what I'd be doing wrong. I coped the UI and SCRIPTS folders to the max 9 directory. It recognizes my custom mat libraries but it comes up with that I/O error whenever I click on a shader.

Marco Brunetta's picture

OK, I know what it is then.

OK, I know what it is then. Right now is still not a good idea to put your own .mat files directly as you will get these kinds of errors. The problem is that MatManager looks for the preview file in the folder with the same name as the .mat file, however since that folder does not exist it gives you that error. You can probably fix the error by manually adding the folder yourself.
Normally MatManager creates the folder when a new library is created from within the script itself, I'll add some code to make sure that if the library does not exist it is created.

On a side note, I've also worked on an IMPORT button (you can see it at the top of the rollout, but is disabled on this version) that will not only import the chosen .mat, but will also look and copy the bitmaps files to the MatManager automatically and replace the bitmap paths with the new locations.

Excubitor's picture

Hows it coming along? I'm a

Hows it coming along? I'm a bit limited by the fact that you can't add more than a certain number of materials - and have encountered some bugs. If your going to charge 10 Euro for it, I'm ok with that. But when do you think you will get to where you have a live version :)

Marco Brunetta's picture

It's actually not very far

It's actually not very far off from finished. The MatManager code is about 97% done, and right now I'm mostly working on a set of additional tools to go along with it (stuff like "assign random materials" and the "syncronise materials" that robert suggested above).

Be sure to mail the bugs to mbrunetta@gmail.com

thanks!

Marco Brunetta's picture

Crap! seems like the server

Crap! seems like the server where I had stored the file has died. No matter, the next version is almost ready, hopefully it will be up on the weekend.

Marco Brunetta's picture

Updated version is up!

Updated version is up!

thempus's picture

This script works on max

This script works on max 2009?

Marco Brunetta's picture

Yes, anything from MAX 9 sp2

Yes, anything from MAX 9 sp2 onwards should work without problems. Do keep in mind that the .mat files are not backwards compatible, so any library saved in MAX 2009 WILL NOT open in MAX 9 for instance. This however is a (stupid) limitation imposed by Autodesk and not a problem with the script.
Eventually I expect to create my own library format to be able to circumvent this issue.

thempus's picture

i can't make this work fine

i can't make this work fine on MAX 2009 :(

Marco Brunetta's picture

Well, what kind of error is

Well, what kind of error is it giving you? I'm running it without problems in MAX 2009.

thempus's picture

- can't use the buttons on

- can't use the buttons on the options windows
- if change the library storage path creates new "Material editor" and "scene materials" and cant delete the matlibs and do anything
- cant import some matlibs (just imported 1 from 8 i have)
- when apply a material with uvwmap twice creates uvwmap twice
- can't generating any preview

I think its fantastic script look eager for final release

Marco Brunetta's picture

- can't use the buttons on

- can't use the buttons on the options windows

Yes, most of the stuff on the options panel is just for show right now. These will be working on the final release. It's all pretty easy stuff to do, so I've been focusing on other more complicated maters.

- if change the library storage path creates new "Material editor" and "scene materials" and cant delete the matlibs and do anything

You mean besides the ones that should already be there? That's odd, I'll look into it. The code that takes care of the changing of the storage path has always been a bit quirky, so a rewrite is probably needed.

- cant import some matlibs (just imported 1 from 8 i have)
This is just a demo, so the script will not open libraries that hold more than 5 materials...sorry.

- when apply a material with uvwmap twice creates uvwmap twice
Well yes, that's the way it's supposed to work. The script always adds the UVW automatically. The best I could do would be have some sort of confirmation dialog pop up if the object already has a UVW Map modifier.

- can't generating any preview
I am guessing this is related to the problem with the library storage path as the same path is used to store the previews. Does this still happen if you use the default path?

Marco Brunetta's picture

I just tried it, and yes,

I just tried it, and yes, changing the library storage path is indeed troublesome. I'll fix it and upload a correct version ASAP.

BTW, if you still want to use your own path, make sure you end with a "\" at the end, that might be causing the problems with the previews.

Marco Brunetta's picture

I re-did most of the options

I re-did most of the options panel. Some of the options are not pluged-in yet, but you should be able to switch library storage path without problems. Let me know how it goes.

thempus's picture

Hi, now everything works

Hi, now everything works fine , i just want to pay for the final version hehe!
i made a script that apply the material with the uvwmap and remove the old uvwmap if it exist, the script don't work in the best way but prevent extra uvwmaps to be applied.
i'm studing maxscript inspired in this script that make our lifes more easier. thank you

thempus's picture

Can you make a feature that

Can you make a feature that works like that? you select a group of objects of a chair of plastic and metal, and the feature will list the selected materials and you can mark a specific material to replace to another material in the matmanager browser(ex: platic -> wood) so in this way i can replace materials of selected objects in a few clicks and on the traditional way to do this we need to import the material to material editor and select objects by material then open groups and select by material again, remove the old uvwmap and in the end apply a new material from matmanager.
we can't just replace the material in medit because the same material can be applied to other objects.
can you understand my english? hehe

Marco Brunetta's picture

Kinda of like a Material

Kinda of like a Material Replacer? Yes that is certainly doable... good idea!
I'll code an additional tool for matmanager.
Right now there is a tool called Synchronize Materials that does something similar but based on the material's name. You can use that to look for materials in the current selection that have the same name as the ones stored in matmanager and automatically replace them.

thempus's picture

Hows it coming along?

Hows it coming along?

Marco Brunetta's picture

Very well actually... only

Very well actually... only I've decided to drastically change the way the data structure used by MatManager to a more object-oriented approach. This of course means TONS AND TONS of code re-writing and/or translation... fun!
However once it's done the benefits will be worth the effort. For instance, on the version uploaded here, you can only see the first level of texture maps in the materials. The version I'm rewriting is already capable of displaying the full tree of any material stored (including submaterials, all the texture maps levels in any material, etc.). In turn this will give the user the ability to directly edit or apply to the scene any of the nodes in the tree... pretty cool, if my head does not explode first.

Comment viewing options

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