View Full Version : New Script: ZMATS (Lite) a Materials Manager
Svengali
02-09-05, 09:05 AM
ZMatsSplash.jpg
WHAT IS ZMATS?
Are you like me? Over the last few years I've been using ZBrush and I've collected and created hundreds of materials. Some have become real favorites.
To manage these materials I depended on the wonderfully intuitive and versatile ZLIST, created by Pixolator for ZBrush 1.23 and 1.55. When ZBrush 2.0 came out I continued to use ZLIST but ran into chronic problems with the interface. (I suspected there were conflicts between old commands and new ones that were added to ZBrush 2.0)
About two months ago I began looking at the source script for ZLIST with the idea that I might be able to find the conflicts and fix them. Fairly quickly, I abandoned that idea and decided it might be faster and more useful for me to simply write a "work-alike" version from scratch. I would try to apply the "KISS" design philosophy.
The result is ZMATS, a very simple Materials Manager specifically for use with ZBrush 2. In a nutshell, ZMATS saves, loads and organizes your materials. Unlike ZLIST, ZMATS will only manage materials. Also, in ZMATS you can't delete - however you can overwrite materials. I managed to add a few new features...
ADDED FUNCTIONALITY
Multiple Bank Storage: There are five BANK buttons (A,B,C,D and E) and each bank can store four hundred materials. Total material storage for ZMATS is 2,000 different materials.
Each material being stored is applied to a sphere. (The spheres are branded with a depressed "Z" to better display some characteristics of the stored material.)]
Many times the character of the material depends on lights and color. Besides the material, ZMATS also stores the lighting setup and the RGB color in use at the time the material was stored. You can separately reload the lights and/or color by clicking on the mini-icons in the lower left and right corners of the material's window.
An Undo button lets you recover a previous material if you accidently load a new material before saving the old. The Undo operation is one level only.
The Help button provides a complete explanation of ZMATS button functionality.
Material files from ZLIST can be copied directly into one of the ZMATS Bank directories. The file formats are exactly the same.
INSTALLING ZMATS
ZMATS comes in a .ZIP file. Unzip it into your Startup\Zplugs directory. When correctly installed you should restart ZBrush2 and you'll find a new button in the ZPlugin menu under the PSNAP group. It's called Zmats and it launches the ZMATS.zsc script. This button can be Control-dragged to one of the shelves on your interface and made a permanent part of your CustomUI by pressing Shift+Control+I. Then, anytime you need to load or save a material, just press the button.
The subdirectories for the installed version of ZMATS should look like this:
ZStartup\Zplugs subdirectory will contain:
ZMATSLAUNCHER.ZSC
Zmats subdirectory
ZStartup\Zplugs\Zmats subdirectory will contain:
Zmats.zsc
Zmats.psd
Empty.jpg
Left1.jpg
Left5.jpg
LeftEnd.jpg
Right1.jpg
Right5.jpg
RightEnd.jpg
light2.jpg
undo.zmt
UnDoA.zmt
UnDoB.zmt
ztool.ztl
matexample.psd
bankA subdirectory
bankB subdirectory
bankC subdirectory
bankD subdirectory
bankE subdirectory
ZStartup\Zplugs\Zmats\bankA subdirectory will contain:
BankA folder.txt
ZStartup\Zplugs\Zmats\bankB subdirectory will contain:
BankB folder.txt
ZStartup\Zplugs\Zmats\bankC subdirectory will contain:
BankC folder.txt
ZStartup\Zplugs\Zmats\bankD subdirectory will contain:
BankD folder.txt
ZStartup\Zplugs\Zmats\bankE subdirectory will contain:
BankE folder.txt
As always, if you have any questions or problems, please post them in this thread. I hope you find ZMATS useful!
Sven
chadtheartist
02-09-05, 09:19 AM
This is great Sven! I haven't downloaded it yet, but I will try it out as soon as possible.
How easy, or hard, would it be to share materials using this script? I'd like to convert all of my materials that I have saved, to this, and share that when I get done.
Thanks for making this available!
Chad
andreseloy
02-09-05, 05:10 PM
Bunchs of thanks”””
Andreseloy
andreseloy
02-09-05, 05:37 PM
1.-ZB>ZData>ZPlug>Open the folder content in ZPlug?
2.-You put in the post ZB>Startup>ZPlug ?
I have the first configuration and if i remember i never has changed anything there.
It work when i load from zscript panel but if i put in the startup ZB dont open anymore.
Can you help me or just i have to save when it launch from zscript panel.
Thx
Andreseloy
Aztec...soljA
02-09-05, 05:42 PM
HERO! (http://cabanedebart.free.fr/grabpics+other/Bartman%20lets%20loose.gif)
Svengali
02-09-05, 06:21 PM
Hi Andre,
My apologies... By mistake I wrote the name of the subdirectory as Startup when it should be ZStartup, sorry. I have to edit that in the original post...
OK, what you need to do first is read this post (http://www.zbrushcentral.com/zbc/showthread.php?p=187434) by Aurick where he explains how to create a new subdirectory for plugins.
You might also want to read in this thread (http://www.zbrushcentral.com/zbc/showthread.php?t=23194) by Marcus-Civis, look at post #20 for a list of the only plugin files that should be in the ZData\ZPlugs subdirectory.
All you actually have to do is go into the ZBrush\ZStartup subdirectory and create a new ZPlugs subdirectory in there.
Then unzip ZMATS.ZIP into that ZPlugs subdirectory.
When you restart Zbrush, you will find the new ZMats button in the Zplugin menu under PSnap.
Sven
japa dapa doooh :D
Svengali, my friend - you made my day! Thx for all the effort! I know I will love the ZMats, like I love MaskGroups, MapIt and PSnap!
Agree... you are my hero ;)
greets
froyd
Hi Sven,
This is just a great script! I love the interface, calming and soothing, easy to look at. I've been using ZList along time and have many materials (on my second ZList now). I tried to put files from it into the ZMat, bank A, and nothing shows up. There are 3 files to each material.. copied all 3. Is there something I am missing?
Thanks for your time,
wenna
Svengali
02-09-05, 09:24 PM
I appreciate the kind words guys!
Since Wenna has reported a problem with the ZList materials, I would be curious if anyone else has been successful in transferring their ZList data into ZMATS? If yes, let me know and if not, tell me what problem you are having?
I would also be interested to have anyone confirm that they got ZMATS installed and working... able to store and load materials as advertised.
Thanks!
- - - - - - - - - - - - - - - - - - - - - -
Hi Wenna,
The files from ZList should work.
The two types of files you need to copy over are those with prefixes of T and ZL. (The .dat files are not needed.)
I just did a test and copied ZList files: T001.psd - T400.psd and ZL001.psd - ZL400.psd into the directory named BankB.
They were immediately viewable in ZMATS as soon as I clicked the BankB button.
Check that the prefixes you have are the same as those listed above. Other than that I don't know what to recommend unless...
If you want, pick out a matched pair of files, one T and one ZL (pick a simple material so the ZL file is fairly small.) Zip them up and post the file here. I'll have a look and try to see why they won't load.
On the other hand, if you have filename prefixes that are different, please let me know about that, too.
Sven
There's my problem! I was actually trying the files from the MaterialList not the ZList. They have different file beginnings (ML....) I did at one time use the zlists to save tools in and kept my materials separate since I had so many LOL. Thanks and I have saved and used a few materials, works great! It would be a job to load and save between the two scripts, but the idea of have only one list of materials is so tempting! I will be saving new ones in this script as it works great!
Thanks again for this!
wenna
ryankingslien
02-09-05, 10:02 PM
Very cool Sven! Thank you so much!
r
Reactor
02-09-05, 10:46 PM
Wow, this is a cool plugin! One question though- is it possible to put a displayable name with each material thumbnail? Also, is it possible to have an option that only displays the name, and not the thumbnails (to save memory)?
Awesome, otherwise.
Svengali
02-09-05, 11:03 PM
Wenna,
I thought that might be the problem. Try this experiment on COPIES of one pair your the ML files.
Take ML001.psd and rename it to T001.psd
Take ML001.zmt and rename it to ZL001.psd (yes, these must also be renamed to .psd even though they contain the material's data.)
drop these into one of the empty Tool directories and see if it loads. If so, then all you have to do is COPY all of the ML- - -.psd and ML- - -.zmt files to one of the Bank subdirectories. Then, if you have a group-renaming utility, rename the entire set like those above and you will have converted them to work in ZMATS.
I emphasize that you should work with copies ONLY! Keep your original materials safe.
Let everyone know if this works. (I tried this on some ML files I've had and it worked - no problem.)
Sven
GREEEEAAAAT :tu: :tu: :tu:
cameyo
Yes! It worked!!!! I was trying to save a few of my favorites and it was taking forever... now all I need is a group converting tool... any suggetions? Seems like I had something like this somewhere but can't remember which program did it... memory is the first to go! (Hair is second LOL)
Thanks ever so much for doing this!! I may even start going beyond the skinning part!
wenna
aminuts
02-09-05, 11:58 PM
woohoo Sven!!!
If I haven't said it before....I think I love you!!
Another fantastic useful plugin!!
I need more room in my signature!!
:tu: :tu: :tu: :tu: :tu:
andreseloy
02-10-05, 12:11 AM
This is my ZB older contents: please evaluated if there something wrong because i cant launch Zmat, as you can see the other plugin are there and work fine, the last was Pixolator ZtimeLapse and i use in a dially manner.
Thanks for your help
Andreseloy
aminuts
02-10-05, 12:48 AM
editing my last after relooking....
you need to have the zmats folder in the zplugs folder right now you have the contents of that folder in your startup folder instead.
move them to the
zstartup/zplugs/zmats folder and it should work.
to be more clear.......move all the files from the far right picture to the zbrush2/zstartup/zplugs/zmats folder.
50'sKID
02-10-05, 01:59 AM
Thank you SOOO much, Sven. 50.
Frenchy Pilou
02-10-05, 02:36 AM
...for the big Materials data Base :cool:
Pilou
Strannik
02-10-05, 02:56 AM
Is there a way to rename materials/banks?
I have had huge success! Your suggestion worked perfectly! I downloaded a file renamer (free) if anyone needs one. It's a small easy program.
Link: http://www.sofotex.com/Batch-File-Renamer-download_L21385.html
Also, for those that still have MaterialPack... works the same way. Rename all files named MP***.psd to T**.psd and also the MP***.zmt to ZL***.psd.
Now, I have all my materials on hand with one click! Thanks again for your generosity!
ps... a future suggestion, I would love to have something like this for alphas. I have collected so many, and scattered through different scripts. Not to mention the ones I've made! :))
Sebcesoir
02-10-05, 05:31 AM
Damn man thats terrific!!!!!!
Thanks a lot or your amazing scripting work!
ringbearer
02-10-05, 06:29 AM
Thank you! Works perfectly, I can see that I'm gonna be busy organizing my materials.:D :D
Svengali
02-10-05, 06:53 AM
Once again, thanks for the comments everyone. I also want to thank Pixolator for the inspiration for the MATS utility (and his earlier material managers as well.) As the old saying goes, "We stand on the shoulders of Giants."
Wenna, glad that worked out!
ABOUT CUSTOM LABELING
There have been several questions about saving custom names for each material and whether this could be done. I thought about that and may later try to add something to ZMATS (v1.1) that will make this possible. Two thousand generically named materials in five generically named directories could tend to be confusing.
I do wish ZScript had more and better options for user input than the StrAsk command. Maybe with the coming SDK someone will write one. :)
- - - - - - - - - - - - - - - - - - -
Andre,
As Aminuts said, all you need do is take those files you now have in the ZStartup subdirectory (your label 5) and drop them into the subdirectory named ZMATS (the folder in the list you label as 4).
When you startup ZBrush2 again, look in the Zplugin menu under the PSNAP group and you should see a button named ZMats. Click that and the ZMATS interface should pop right up.
Let me know how it goes?
Sven
Svengali
02-10-05, 07:06 AM
Yeah, I want to give special credit to this guy who tested ZMATS early on. We all should thank him for the LIGHTBULB icon in each material window that links to the lighting-setup files that were active when the material was saved. Brilliant idea and great feedback, my friend!
Sven :tu: :idea:
andreseloy
02-10-05, 07:19 AM
My error was looking for a separated thumbnail different from PSNAP and not INSIDE PSNAP, was all the time correct but i didnt see earlier”
Thanks and excuse me please”
Andreseloy
aminuts
02-10-05, 08:09 AM
haha like you said Sven, we stand on the shoulders of giants!
was very happy to see it available when i got back from work.:D
marcus_civis
02-10-05, 08:57 AM
Sven,
This is brilliant! It works beautifully and will be very useful. I think the way you've solved the cavity shader issue is very smart. Thanks! :tu:
Just a couple of little little points: I found I needed to switch Fibers on in the Render menu to get them to show in ZMats (only a problem if you do as I did and simply loaded a material from elsewhere and pressed Save). And... I'm not sure I like my interface colors changed (I have my ZScript buttons/sliders set the color I like them!) Otherwise perfect.
And Sven, if you don't mind... :)
For anyone that wants to rapidly batch convert Material List or Material Pack files here's a little zscript utility. Load the zscript, press the button and select the first file such as 'ML001.zmt' (ignore anything named zero such as 'ML000.zmt'). Up to 100 files (of both types) will be converted and put in the 'FileOutput' folder. Just copy them to an empty ZMats bank. Should work on Macs too!! :)
Thank you so much Sven_ superb little script that works perfectly!
Svengali
02-10-05, 10:04 AM
Hi Marcus,
Thanks for the feedback and the nice little conversion utility.
I have to plead guilty on the changing button and slider colors. I was experimenting with saving and restoring the user's original color choices but got sidetracked on something else. Ultimately my intent was to make the color change a user option. I forgot to disable the button color changes but didn't realize that code was still in the script until after I posted ZMATS... since these are the colors I use for my own interface.
In the next release I will fix that. By the way, the main reason I changed the button and slider colors in the first place was that the original ZList and MaterialsList spheres had transparent backgrounds. Since many users have not customized their interfaces, the five material windows displayed the material spheres against the default dark crimson button colors.
Also thanks for pointing to the fibers issue... There is a sneaky problem with that too. Since the material spheres are generated at 1 to 1 scale, the bushier fibers tend to overgrow the material window! You can see how solving this could get complicated. I just left it up to the user to decide when and how fiber materials would be stored.
You (and all the other scripters who write ambitious ZScripts) know the complicated code you must sometimes write to maintain the feeling of simplicity and convenience in the user's interface. Actually, for me that is one of the most interesting challenges. I think the ZBrush software is a pretty good resolution of this delicate balance: versatility vs ease-of-use.
Anyway, thanks again for making the conversion process (MaterialList to ZMATS) simple and relatively painless!
For anyone who hasn't down-loaded Pixolator's MaterialList of 100 free original materials you'll find that HERE. (http://www.zbrushcentral.com/zbc/showthread.php?t=2466&highlight=MaterialList)
Another similar group of 100 free original materials (called FleshPack) can be found at Glen Southern's website. (http://www.southerngfx.co.uk/general/resources/zscripts/Zscripts.htm)
later, Sven
marcus_civis
02-10-05, 11:19 AM
Hi Sven,
You're absolutely spot on when you say that scripting is a balancing act. I quite understand your reasoning behind both the button color and the fibers issue. Neither is much of a problem and I do like the grey color you've choosen! (The inability to change the button/slider colors without changing the user's settings was frustrating for me when writing ZSwatch. Dark red is no the best color to judge other colors next to it!)
So, what next? :)
Hardtwist
02-10-05, 12:02 PM
Thank you very much for this plugin Sven and to the tester that worked on it with you. This will come in very handy. I have it installed and have saved some of my mats and all works well. Now I am off to convert my old mats.
Thanks
JIM :tu:
If no one has thanked you enough, allow me...Thankyou thankyou thankyou. I love this script
If Pix doesn't object, and Southern doesn't object, I have renamed all of the materials (on my computer) in Pix's material pack and Southern's skin pack to match the naming on this ZMats script. I saved Southern's in BankB and Pix's in BankC and they all work perfectly, with icons and everything. If these 2 guys (and Svengali, of course) don't object, I would be happy to zip the 2 banks into a file that others can add to their ZMats folders.
Let me know, and it will be done!
Sven gave me an earlier version of his " Z-mats"script and i think its great !
I'm glad everyone can use it now...this is a very talented guy , and i hope he
will surprise us in the future with other great things :tu:
jantim
This is awesome Sven, a truly awesome plug-in, thanks so much :D
Could I just add something though (a bit cheeky but hey).........
As much as I love the ZMATS plug-in, it would be really cool (IMHO) if you also had the option to pull up a whole bank onto the screen at once, so that you can browse easier & quicker (kinda like what 3DSMax's material manager does) Maybe even be able to delete & name them???
Oh & before I go, ZALPHAS plug-in maybe??? ;)
Thank you again :tu:
PS Hey Slosh thanks for the offer of the ZMATS folders, I just read this to late, already done it (must login more often)
Svengali (http://www.zbrushcentral.com/zbc/member.php?u=3419) vbmenu_register("postmenu_191081", true); :tu: :tu: :tu:
Thanks for your great zscript,it would be really cool,
i test it at once, here is my result:
Snap10.jpg (http://www.zbrushcentral.com/zbc/member.php?u=3419)
There seems to be have some problem
Snap1.jpg (http://www.zbrushcentral.com/zbc/member.php?u=3419)
Snap2.jpg
and i hope that i could name these zmts:D
Thank you again:tu: :tu: :tu:
Svengali
02-11-05, 08:20 AM
Once more, thanks all. ZMATS is a utility I use all the time myself. It's so easy you get addicted to trying out all those different materials on an object. It's makes whipping up and saving variations on a material simple.
tdrs: The rendering of the sample spheres are influenced by whatever ZBrush settings are in effect, so I can't say exactly why you are getting those odd results. Some materials are extra sensitive to lighting and color of the object - especially those materials from Froyd. What happens of you restart ZBrush and use the lighting and coloring that Froyd recommends. That's worked fine for me when I added his materials to my own library and I was glad that ZMATS stores lighting and color with each material.
As for naming materials, perhaps that will be added to the next version.
- - - - -
Bucky: The thing about a utility like this is that access has to be fast. I'm already doing some cheats so that the materials display almost immediately. I'm afraid generating a full screen of mat-samples and keeping it up to date would kill quick access. In the future the promised SDK might provide a way to do this.
A ZALPS utility might be neat - As would a ZMODS and a ZTEXS?
- - - - -
Slosh: I think your offer to post the converted libraries is generous and would make a lot of people happy. However, you really need to get permission from the makers of the original libraries. Explain to them what you want to do and why. Then, it's up to them.
I suspect that in the next few weeks there may be new libraries posted from other ZBrush users as well. One issue will likely be finding a server that can store large files and that can handle the traffic. :D
Sven
This is really very good of you to share your hard work and talent with us Sven! :tu::tu::tu:
It is really MUCH appreciated!
All the best.
This is by far the best & most useful script I've downloaded here on ZBC, I think ZB has to be one of the wisest purchases I've ever made, & with guys like Sven, Cameyo etc writing such cool stuff it's just gonna get better.
Respect to you guys :D
Svengali:
After using the plug-in several days, I found a problem:Load the material at the same time, but it can't load its color and light set , I can only load it in hand, I hope that you can help me.
Svengali
02-12-05, 09:34 AM
tdrs,
I think what you are saying is that the lights and color must be loaded separately from the material. That's true. That's the way it works.
When you save the material, the lights and color are saved at the same time.
But I made it so that when you load the material again, loading the color and/or the lights is optional. This is so ZMATS doesn't accidently over write current lighting or color choices that you might not want to lose.
Sven
Very nice Svengali :tu: The inclusion of the lighting setup and the undo button is very handy. Time to build the mother of all material libraries.
Thanks.
Great and very helpful :tu::tu::tu:
Thank you Sven :tu:
After I transfered all my mats, including pix“s and southerns packs, I whish i would have checked back here earliere :) Marcus“s batch conversion would have saved me 1 or 2 hours :P
Thanks again for that great script. For me its one of the most useful scripts for ZBrush, besides XYZAdjust and MaskGroups.
What would we all do wihtout your altruistic effort! You have my admiration!
greets
froyd
Great stuff! A most excellent upgrade, thanks Sven!
kingkutz
08-17-05, 07:16 AM
i did some searching and found some free storage sites
http://www.rapidshare.de
http://www.megaupload.com
http://www.qfile.de
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.