- [Instructor] In the previous movie,
we saw how to store materials
in sample slots in order to save them,
even if they're not in the 3D scene
or in the view graph here.
Eventually though you may run out of sample slots
because there are only 24 of them.
Additionally, sample slots don't provide any way
for you to transfer materials among scenes.
In both of those use cases you'll want
to create a material library.
That is a file with unlimited size.
You can store as many materials as you want
and you can load them into any scene that you want.
To create a material library,
you'll go to the Material/Map Browser.
The very top is a search field
and to the left of that search field is a down facing arrow.
And the tooltip says material map, browser options,
click on that.
This is the all important hidden secret menu
for the Material/Map Browser.
The browser is a separate widow
from the material editor and it has its own commands
such as, create a new material library.
So click on that.
We're taken to our current project
and a sub folder called material libraries.
We can check on where we're saving to,
by going to this save in field,
we can click on this pull down list.
It shows us the file structure of our computer
and we see that we're currently browsed
to desktop exercise material libraries in this case.
So I'm going to be saving into my current projects,
material libraries folder.
Let's give it a file name down here at the bottom.
I'll simply call it office.mat.
I don't need to type in the dot MAT
that'll get added automatically.
So when I click save, now we have a new rollout up here
in our Material/Map Browser
and it's labeled office.mat
and it has the word LIB standing for library.
And if we hover our mouse over it, we'll see the full path
to where that dot MAT file is stored.
To add something to the material library,
click and drag from the output of the node,
such as a material or a map.
So I can click on this file cabinet blues output,
hold down the mouse and drag
and then drop it just below the words, office.mat.
And I get a blue line, release the mouse
and now that material has been added to the library.
We see that there's a little asterisk here next
to the word office.mat.
That indicates that this material library
has not yet been saved.
The change that we made is only in RAM, in volatile memory.
So we would want to save our material library once
we've added some stuff to it.
3ds Max, we'll prompt you,
if you have any open material libraries.
If you try to close and exit 3ds Max
we'll say, "You've got a material library open,
do you want to save it?"
And that's fine.
But I do think that you should explicitly
save the material library because if 3ds Max crashes
you will lose anything that you've added to that library
since the last time you saved.
So you can save by right clicking on the name
and then you'll need to in this popup window to the top
you'll see the path listed once again.
And at the very end of that path is the name
of the material library.
You get a cascading window where you take,
you get a cascading menu from which you can choose to save.
So click on that, and now the asterisk one went away.
We can also add materials and maps from the sample slots.
I can open that up.
I can drag this other file cabinet material,
just drag and drop it.
And when we drag over here, if we get a blue line
that means we're adding to the material library.
If we get a red line that means
we're going to be overwriting something
in the material library.
So I don't want that red line right now.
I'll get the blue line, release the mouse
and now I've added this file cabinet to that library.
I do want to actually override it
because this one has got a better name
and it says file cabinet pink.
It's a better description.
So click on its output and then drag
over the top of the one that's just named file cabinet
and get that red line, release the mouse.
And now I've overridden that material.
We can add these other ones as well,
drag over get that blue line from these other two materials.
Once again save, right click on the name
of the material library and from the cascading menus,
choose save.
If you don't want to see this material library,
you can close it and that's done once again
by right clicking on the name.
and from there, you can choose close material library.
To open a material library,
you'll go back to the Material/Map browser options,
click on the down facing arrow
and choose open material library.
You're taken back to your current project
material libraries.
You can select office.mat and click open
and it's been opened once more.
I do recommend only opening material library
files that are saved within your current project.
If you open some material library, that's located
in some random location, it's extremely likely
that the next time you try to open Max,
it won't find that file.
So just stay within your project folder
and everything will probably be fine.
I do recommend only opening material library
files that are saved within your current project,
but of course you can copy those dot MAT files
from one project to another.
They're very small files with very simple instructions
but it's important actually critical to understand
that material libraries do not include any bitmap files
or textures.
They only store the material definition
and that is the node structure and all of its parameters.
A material might have a node called bitmap in it
and that would get stored in your library.
But the actual disc image file to which that bitmap node
refers will not be encapsulated in the material library.
So we're going to talk about asset management later
but just be aware that externally referenced assets
such as bitmap files are handled separately.
That's how to use material libraries.